ArduCAM / ArduCAM_USB_Camera_Shield

This is the repository for ArduCAM USB Camera Shield
126 stars 69 forks source link

OV9281 config file question #185

Open MaximeRiouEPFL opened 1 year ago

MaximeRiouEPFL commented 1 year ago

Setup

How to reproduce Using the python demo script and adding the following line to make the camera display a test pattern

ArducamSDK.Py_ArduCam_writeSensorReg(handle, 0x5E00, 0b10000010)

after https://github.com/ArduCAM/ArduCAM_USB_Camera_Shield/blob/bf2984cffb37cda9b57e4f7cfc377a502f6137e4/Linux_x86/Python/Streaming_demo/ArduCam_Py_Demo.py#L202 The output image is the following RGB image. Given that the OV9281 camera is monochrome I find this odd.

image0

Question In the ov9281 config file, under [camera parameter], I found: https://github.com/ArduCAM/ArduCAM_USB_Camera_Shield/blob/bf2984cffb37cda9b57e4f7cfc377a502f6137e4/Config/USB3.0_UC-593%20Rev.C/MIPI/OV9281/Channel_A/1Lane/OV9281_MIPI_1Lane_RAW10_10b_1280x800_40fps.cfg#L67 Which would stand for RAW/RGB. Given the OV9281 is a monochrome camera, why is it configured like this? Shouldn't it be FORMAT=4 (Mono)? In my understanding, if the correct setting is monochrome and the camera is set to raw/RGB, why is there no segmentation fault or a similar error given that it is trying to read 3 times more data?

Why do the images not appear RGB when running normally? image0

Other question Every time I start recording, there is the following error

Error capture image, rtn_val =  65317

Which stands for ArducamSDK.USB_CAMERA_FRAME_INDEX_ERROR = 0xFF25 And then everything works fine:

fps: 44 /s

Is there a way to not get this error at the start?