OV2640 module for H7 cam

General discussion about topics related to OpenMV.
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

OV2640 module for H7 cam

Postby chrisPyres66 » Tue Nov 05, 2019 11:39 am

Dear All,

I know the cam H7 is working with ov7725 (640x480), and the cam M4 with the ov2640 (1600x1200 but used in 320x240).
Like all the code exists, i would like to know if it is possible to build an 0v2640 module for cam h7, and record jpeg image in uxvga ?

Thanks,
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: OV2640 module for H7 cam

Postby kwagyeman » Tue Nov 05, 2019 1:46 pm

Yes, the driver support and everything is fully done and working. However, the OV2640 module has... bad image quality when not in UXGA mode... so, we have no plans to sell the thing. I did implement a fully featured driver with JPEG support.
Nyamekye,
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: OV2640 module for H7 cam

Postby chrisPyres66 » Wed Nov 06, 2019 4:36 am

A board with 24pin fpc connector could be great to test other camera.
The only problem for ov2640 is the power supply of 3v in place of 3.3v.
In M4, you could change the regulator output reference.

However I started openmv with F7, is it possible to have UXGA (1600x1200) with M4 through openmvIDE or it is only possible with H7 for memory ?
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: OV2640 module for H7 cam

Postby kwagyeman » Wed Nov 06, 2019 11:11 am

The jpeg mode will work for all cameras. You can use the OV2640 with any model.
Nyamekye,
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: OV2640 module for H7 cam

Postby chrisPyres66 » Thu Nov 07, 2019 12:16 pm

Ok, but how do you get image without using snapshot which is not working in this mode ?
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: OV2640 module for H7 cam

Postby kwagyeman » Thu Nov 07, 2019 12:54 pm

The OV2640 driver works with snapshot.

If you want to capture a jpeg image set the pixel format to JPEG.
Nyamekye,
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: OV2640 module for H7 cam

Postby chrisPyres66 » Fri Nov 08, 2019 3:47 am

With 3.4.0 version and this python code :

Code: Select all

import sensor, image

if sensor.get_id() == sensor.OV2640 :
   print('OV2640')

sensor.reset()                      		# Reset and initialize the sensor.
sensor.set_pixformat(sensor.JPEG)   	# Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.UXGA)   	# Set frame size to QVGA (320x240)
sensor.skip_frames(time = 2000)     	# Wait for settings take effect.

while(True):
    img = sensor.snapshot()
    print(sensor.snapshot().size())
I have got "OSErroor: Operation not supported on JPEG"
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: OV2640 module for H7 cam

Postby kwagyeman » Fri Nov 08, 2019 12:37 pm

Which line? Also, v3.5.0 is out online on the GitHub. Please download and install it.
Nyamekye,
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: OV2640 module for H7 cam

Postby chrisPyres66 » Fri Nov 15, 2019 4:07 am

Ok with the 3.5.1 firm, the mjpeg function did an uxga video on the sdcard with the ov2640 in jpeg mode.
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: OV2640 module for H7 cam

Postby kwagyeman » Fri Nov 15, 2019 11:51 am

Awesome!
Nyamekye,
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: OV2640 module for H7 cam

Postby chrisPyres66 » Mon Nov 18, 2019 9:12 am

Opposite to the subject of this post, i tried it on a F7 board.
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: OV2640 module for H7 cam

Postby chrisPyres66 » Wed Nov 20, 2019 8:01 am

Are you going to add jpeg mode for the ov5640 too ?
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: OV2640 module for H7 cam

Postby kwagyeman » Wed Nov 20, 2019 10:58 am

Yes, the driver for it still needs work.
Nyamekye,
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: OV2640 module for H7 cam

Postby chrisPyres66 » Mon Nov 25, 2019 11:19 am

How did you manage I/o voltage between 2.8v of sensor and 3.3v of uc ?
Did you use a level voltage switcher ?
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: OV2640 module for H7 cam

Postby kwagyeman » Mon Nov 25, 2019 11:37 am

We just send it 3.3v. The sensor will only be damaged if the voltage difference is above 0.7v.
Nyamekye,
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: OV2640 module for H7 cam

Postby chrisPyres66 » Tue Nov 26, 2019 10:43 am

Ok, but could you use the maximum speed to communicate ?
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: OV2640 module for H7 cam

Postby kwagyeman » Tue Nov 26, 2019 1:51 pm

Yes? Not sure what you are asking.
Nyamekye,
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: OV2640 module for H7 cam

Postby chrisPyres66 » Tue Dec 10, 2019 6:11 am

well, i was badly thinking about rising and falling edges time consideration... but it is ok !

I tried OV5640, and VGA mode give colored images.
Do you have timeline for OV5640 driver ?
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: OV2640 module for H7 cam

Postby kwagyeman » Tue Dec 10, 2019 10:34 am

It's my next task. I have to get the driver for this done ASAP.
Nyamekye,
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: OV2640 module for H7 cam

Postby chrisPyres66 » Fri Dec 13, 2019 8:00 am

Hello,

I just tested the OV5640, and in first approach i get in openmvide
- QVGA image with violet color
- VGA image with psychedelic color
- no jpeg mode

I tried to modify the registers through __write_reg and __read_reg function without success ??
Therefore i did it before compiling, and i could remove qvga violet color by switching off the night mode in AEC-CTRL00 at 0x3A00[bit 2].

I have the datasheet here :
https://www.google.com/url?sa=t&rct=j&q ... c3Z_NoK1r5
but all the registers are not explained, do you have more ?

Hope it helps for all !
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: OV2640 module for H7 cam

Postby kwagyeman » Fri Dec 13, 2019 11:43 am

The driver is not complete yet. I need to finish it.
Nyamekye,
hermaml
Posts: 1
Joined: Wed Jan 08, 2020 5:25 pm

Re: OV2640 module for H7 cam

Postby hermaml » Wed Jan 08, 2020 5:29 pm

I just installed the OMV-MOD-GS-V1 on my Cam H7, getting error OSError:Pixel format is not supported! on line sensor.set_pixformat(sensor.RGB565) of helloworld example. Version of IDE is 3.5.2?
What is the best way to work around?
User avatar
kwagyeman
Posts: 4431
Joined: Sun May 24, 2015 2:10 pm

Re: OV2640 module for H7 cam

Postby kwagyeman » Thu Jan 09, 2020 1:15 am

Use grayscale, as that camera is only grayscale.
Nyamekye,

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 6 guests