OV2640 module for H7 cam

General discussion about topics related to OpenMV.
User avatar
chrisPyres66
Posts: 127
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: 3448
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: 127
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: 3448
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: 127
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: 3448
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: 127
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: 3448
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: 127
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: 3448
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: 127
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: 127
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: 3448
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,

Return to “General Topics”

Who is online

Users browsing this forum: MSN [Bot] and 2 guests