Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

OV2640 2MP Mini: Take RAW Grayscale image

Open dilpreetdan opened this issue 8 years ago • 9 comments

Hello, How can we take a grayscale RAW image from the OV2640 2MP Mini camera? I need a 160*120 image with 8 bits per pixel data.

Can you please provide some code for the same.

Thanks!

dilpreetdan avatar Jun 01 '17 06:06 dilpreetdan

Hello, Any help in this would be really appreciated!

dilpreetdan avatar Jun 10 '17 12:06 dilpreetdan

@dilpreetdan Hi, Very sorry for we do not provide source code of Host V2.

Let us know if you need more help. Regards, ArduCAM support team.

UCTRONICS avatar Jun 10 '17 12:06 UCTRONICS

Thanks for responding.

Firstly, I think this is another thread to reply to. Secondly, I see that the source code of Version 1 was available. Thirdly, using the source code of version 1, I could verify that the bitmap image is not getting produced. (https://github.com/ArduCAM/Arduino/issues/205) Please rectify such problems so that a correct BMP image is produced.

Thanks!

dilpreetdan avatar Jun 10 '17 12:06 dilpreetdan

@dilpreetdan Hi, We have tested our host_V2 and Video_Streaming code and they can work fine for getting BMP image .

Pleaase download our Host_V2 from https://github.com/ArduCAM/Arduino/tree/master/ArduCAM/examples/host_app/ArduCAM_Host_V2.0_Windows Please download this code: https://github.com/ArduCAM/Arduino/tree/master/ArduCAM/examples/mini/ArduCAM_Mini_Video_Streaming

Let us know if you need more help. Regards, ArduCAM support team.

UCTRONICS avatar Jun 10 '17 12:06 UCTRONICS

206

As you can see from the image, temp=0x31 and temp=0x30 doesn't happen in the order. While the instructions on the top of the file say:

// 8. If receive 0x31 ,set camera to BMP output mode. // 6. If receive 0x30,camera will capture a BMP photo and buffer the image to FIFO.Then write datas to Serial port.

This should help you identify the problem. Please can you verify in your BMP image if the header is correct. Thanks!

dilpreetdan avatar Jun 10 '17 12:06 dilpreetdan

Surprisingly, with Arducm Host v1.exe this is not the issue. I could verify that from the source code. 206 1

I think in the python script where I receive the data, I should be counting length <153664 and it should help with the BMP.

dilpreetdan avatar Jun 10 '17 13:06 dilpreetdan

@dilpreetdan Hi, Thank you for your advice and we will optimize our host V2 as soon as quickly. Regards.

UCTRONICS avatar Jun 10 '17 13:06 UCTRONICS

Hello, Please provide some feedback on grayscale image. How do I take a grayscale image (like .PGM format).

Thanks!

dilpreetdan avatar Jun 19 '17 12:06 dilpreetdan

Any updates on the RAW grayscale image? @dilpreetdan @UCTRONICS

nikita-kotsehub avatar Jul 26 '21 10:07 nikita-kotsehub