ArduCAM_USB_Camera_Shield icon indicating copy to clipboard operation
ArduCAM_USB_Camera_Shield copied to clipboard

OV5642 cfg nor json file seem to work

Open Frans66 opened this issue 6 years ago • 29 comments

Trying to run Python3 version of USB master for windows and Linux_x86. Both show same issue. Output from Windows version:

color mode 0
Serial: ÿÿÿÿ-ÿÿÿÿ-ÿÿÿÿ
Capture began, rtn_val =  0
Error capture image, rtn_val =  65317
Error capture image, rtn_val =  65314
Error capture image, rtn_val =  65314
Error capture image, rtn_val =  65314

Also new Windows USBTest program shows same issue. Old Windows USB Test program works flawlessly though. Can you please indicate what I'm doing wrong?

Frans66 avatar Sep 23 '18 11:09 Frans66

Would you please send me the hardware setup photos to [email protected] ?

ArduCAM avatar Sep 25 '18 01:09 ArduCAM

While making the pictures I noticed camera hardware after a while didn't react at all to any version of software. USB board does, but camera doesn't. I'll first order new hardware and see if that solves the issue

Frans66 avatar Sep 25 '18 19:09 Frans66

Please don't order any new board before sending me the your hardware setup then I will give you some suggestions.

ArduCAM avatar Sep 26 '18 14:09 ArduCAM

Good Morning Everyone,

I am sorry but I almost have the same issues indicating the following message : "Error capture image, rtn_val = 65317". I've been looking for a while about it on different topics but without any conclusion. Do you guys have any leads or solution to fix it ?

I am working on ArduCAM AR0134 global shutter camera with Linux UBUNTU 16.04 thanks to a Jetson TX2 and I try to launch the device on ROS.

Thank you for your attention and have a nice day !

Sincerely,

Hydrorion avatar Nov 20 '18 09:11 Hydrorion

Hi, also the same problem with OV5642. Hardware below: 20190213182420 Thanks!

trimera avatar Feb 13 '19 17:02 trimera

@guthubing I can't tell the version of the USB camera shield, is it Rev.B, Rev.C or Rev.D? To diagnose the problem, you can open the camera from the windows GUI, and try to read the OV5642 sensor register address 0x000A and 0x000B, it should read 0x56, and 0x42 respectively. I need you feedback to isolate this issue, before we go ahead to next level.

ArduCAM avatar Feb 14 '19 01:02 ArduCAM

@guthubing you can also try other config files from: www.arducam.com/downloads/modules/industrial/Config/OV5642

ArduCAM avatar Feb 14 '19 02:02 ArduCAM

@ArduCAM Thanks for reply. It is Arducam USB2.0 Camera Shield, not Arducam shield. I tried the camera with windows GUI. The value that is read by RegAddr. 0x000A/B is 0x0. Besides, it doesn't work with the notice "USB transfer data index error". image I checked also the USB cable, connection and driver, which work well during the test.

trimera avatar Feb 14 '19 10:02 trimera

@ArduCAM And by trying the python demo code ArduCam_Py_Demo.py the result looks like this: ('color mode', 0) Serial: -- ('Capture began, rtn_val = ', 0L) ('Error capture image, rtn_val = ', 65317L) ('Error capture image, rtn_val = ', 65314L) ('Error capture image, rtn_val = ', 65314L) ('Error capture image, rtn_val = ', 65314L)

With the new config you provided to me it seems not working: Traceback (most recent call last): File "C:\Users\xuexi\Dropbox\Abschlussarbeit\Arducam\ArduCAM_USB_Camera_Shield-master\ArduCAM_USB_Camera_Shield-master\Windows\Python\Streaming_demo\ArduCam_Py_Demo.py", line 221, in if camera_initFromFile(config_file_name): File "C:\Users\xuexi\Dropbox\Abschlussarbeit\Arducam\ArduCAM_USB_Camera_Shield-master\ArduCAM_USB_Camera_Shield-master\Windows\Python\Streaming_demo\ArduCam_Py_Demo.py", line 53, in camera_initFromFile config = json.load(open(fialeName,"r")) File "C:\Python27\lib\json_init_.py", line 291, in load **kw) File "C:\Python27\lib\json_init_.py", line 339, in loads return _default_decoder.decode(s) File "C:\Python27\lib\json\decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python27\lib\json\decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded thanks.

trimera avatar Feb 14 '19 10:02 trimera

@guthubing sorry I made a mistake. the ID register address is 0x300A and 0x300B, please try it again and get back to me about the result.

ArduCAM avatar Feb 14 '19 12:02 ArduCAM

@ArduCAM It works this time. image image

trimera avatar Feb 14 '19 12:02 trimera

@guthubing Since the I2C access is good, which means the camera can be detected. you can also try other config files from: www.arducam.com/downloads/modules/industrial/Config/OV5642 especially the YUV setting?

ArduCAM avatar Feb 14 '19 12:02 ArduCAM

@ArduCAM It doesn't work for the new config file: C:\Users\xuexi>python C:\Users\xuexi\Dropbox\Abschlussarbeit\Arducam\ArduCAM_USB_Camera_Shield-master\ArduCAM_USB_Camera_Shield-master\Windows\Python\Streaming_demo\ArduCam_Py_Demo.py C:\Users\xuexi\Dropbox\Abschlussarbeit\Arducam\ArduCAM_USB_Camera_Shield-master\ArduCAM_USB_Camera_Shield-master\python_config\OV5642_QVGA_YUV_54fps.json Traceback (most recent call last): File "C:\Users\xuexi\Dropbox\Abschlussarbeit\Arducam\ArduCAM_USB_Camera_Shield-master\ArduCAM_USB_Camera_Shield-master\Windows\Python\Streaming_demo\ArduCam_Py_Demo.py", line 221, in if camera_initFromFile(config_file_name): File "C:\Users\xuexi\Dropbox\Abschlussarbeit\Arducam\ArduCAM_USB_Camera_Shield-master\ArduCAM_USB_Camera_Shield-master\Windows\Python\Streaming_demo\ArduCam_Py_Demo.py", line 53, in camera_initFromFile config = json.load(open(fialeName,"r")) File "C:\Python27\lib\json_init_.py", line 291, in load **kw) File "C:\Python27\lib\json_init_.py", line 339, in loads return _default_decoder.decode(s) File "C:\Python27\lib\json\decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python27\lib\json\decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

trimera avatar Feb 14 '19 13:02 trimera

@guthubing I mean you copy these config files to the Config folder of the Windows GUI tool and test on our GUI first before moving to python or other platform. And please try the OV5642 YUV setting first, make sure if it is working.

ArduCAM avatar Feb 14 '19 13:02 ArduCAM

@ArduCAM The OV5642 YUV could work with strange color: image But the other 3 config files can not work with warning "USB transfer data index error".

trimera avatar Feb 14 '19 14:02 trimera

@guthubing it is working now, please press the button on the lower right corner to switch the display mode to get the correct color. You still didn't tell me the board revision of your USB2 camera board.

ArduCAM avatar Feb 14 '19 14:02 ArduCAM

@ArduCAM Thanks!. It is USB 2.0 shield Rev.B.

trimera avatar Feb 14 '19 14:02 trimera

Change the display mode, is it working correctly? We will check the work around for Rev.B hardware for JPEG config files soon.

ArduCAM avatar Feb 14 '19 14:02 ArduCAM

@ArduCAM It works generally well, with warning "bad frame recieved". Besides, how could I expand the resolution from 320x240 to original 2592x1944 of OV5642? thanks.

trimera avatar Feb 14 '19 14:02 trimera

@guthubing I added another full 5MP YUV config OV5642_YUV_1944.cfg in the link: www.arducam.com/downloads/modules/industrial/Config/OV5642 You can try that .

ArduCAM avatar Feb 14 '19 14:02 ArduCAM

@ArduCAM Unfortunatly it doesn't work with YUV_1944 file. After clicking open button, there's only still image from last capturing with warning "bad frame recieved" appearing 2~3 times per second. When the camera is closed and restarted again, there's warning "USB device create error", no matter what config file it is now. So I have to reconnect the USB again. grafik

trimera avatar Feb 14 '19 15:02 trimera

@guthubing please be patient, we will work that today and give you update.

ArduCAM avatar Feb 15 '19 00:02 ArduCAM

@guthubing I am still working on the maximum resolution config file. In the mean time, would you please help me check if the following config files work, they only work for REV.B board. www.arducam.com/downloads/modules/industrial/Config/OV5642/OV5642_QVGA_JPEG_REVB.cfg www.arducam.com/downloads/modules/industrial/Config/OV5642/OV5642_JPEG_720p_REVB.cfg www.arducam.com/downloads/modules/industrial/Config/OV5642/OV5642_JPEG_1080p_REVB.cfg

ArduCAM avatar Feb 15 '19 14:02 ArduCAM

@guthubing I found there is still some bugs on Rev.B board. The above confg file, you have to open->close and open again then click play to get the video out.

ArduCAM avatar Feb 15 '19 15:02 ArduCAM

@guthubing The following config for 5MP, but you have to load the smaller resolution config file and open then close and load this config: www.arducam.com/downloads/modules/industrial/Config/OV5642/OV5642_JPEG_QSXGA_TEST.cfg The Rev.B board is quite old, and has some incompaitibility issues, now we have update the board to REV.D.

ArduCAM avatar Feb 15 '19 15:02 ArduCAM

@ArduCAM OV5642_QVGA_JPEG_REVB.cfg could work for only few seconds, they it stopped with warning "USB transfer time out error". OV5642_JPEG_720p_REVB.cfg worked well. For OV5642_JPEG_1080p_REVB.cfg there's image, but unrecognizable. Some part of the image break into pieces and come out randomly.

trimera avatar Feb 15 '19 15:02 trimera

@ArduCAM OV5642_JPEG_QSXGA_TEST.cfg did work, but with about 1 fps, which is far from 5fps in description. Is it config file matter or I have to get a new version, for a better fps?

trimera avatar Feb 15 '19 15:02 trimera

@ArduCAM Could you send me the link of OV5642 full resolution config file formal edition once you finish it? Thanks!

trimera avatar Feb 21 '19 12:02 trimera

Hi @guthubing / @ArduCAM I'm having the same problem. Can you please share the config files with me, please? The given links are not working anymore to download the cfg files. Specially looking for (OV5642_JPEG_720p_REVB.cfg)

amalhub avatar Jul 17 '19 03:07 amalhub