-
Notifications
You must be signed in to change notification settings - Fork 7.4k
video: ov5640 support for vga , qvga and qqvga not there #86519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Looks like the issue is resolved in main branch but not committed to the release branch of 4.0 |
Quick note: Today I started experimenting to see if I could get this camera to work with the ArduinoCore-zephyr project, in my case Note: The main camera code in camera.cpp, is looking at the table of Width, Height, Format for a match. And the current stuff up
Whereas the OV2640 has a much more complete table:
Will try more with 2640, but wish the OV5640 was updated. Thanks. |
I think I missed this message earlier! The OV5640 has a built-in GPU that pemits to emmit JPEG data directly, with an integrated auto-focus, auto-exposure, auto-white-balance, which makes it a popular image sensor for makers and firmware developers, who can skip all the effort of doing all this image post processing on a low-power platform. This however makes the OV5640 very complex (and in turn increases noise on the output image), and makes it the biggest image sensor driver of all Linux, so it is normal that it appears particularly complex.
Still, the basics are:
The Zephyr drivers seems to combine them in just one big block without annotation: Lines 469 to 474 in ed45960
One way would be to directly add the extra registers for the missing resolution by looking at the now-public datasheet. One way would be to first document the registers (with |
For Portenta and very small resolutions, there is also the HM01B0 image sensor, 320x320 array, available on a shield. It is not supported yet, but offers an alternative. |
In fact, the ov5640 supports 2 modes:
|
I believe their current V2 shield now has the HM0360 on it. I believe both of these are gray scale cameras. For There is support in the Arduino library arducam_dvp, for both of these Monochrome cameras as well as OV7670 and OV7675 on the MBED releases for these boards. Hopefully should not be too hard to hopefully migrate this support into this code base.
Side notes about the OV5640/OV2640 for setups, wishing to use smaller memory. There are a couple of other capabilities of these A few of us have played around with some of these capabilities on Teensy 4.x board (mainly T4.1 and MicroMod or custom). |
QVGA and QQVGA in CSI2 mode is now done in #87911.
I asked @CharlesDias last time if he can add support for JPEG as I don't have HW which can receive JPEG.
It would be nice if you can upstream these code to support these features |
Oops, I actually put the wrong link in for our camera stuff, it was: Porting this code over, is currently beyond my abilities using zephyr. My experience so far has been testing and trying to contribute The Teensy_Camera code, which @mjs513 and I (and maybe a few others) modified and extended code originally by: Background on this code: - sorry in advance, probably way too much information, but... Was done to run using Arduino, with the PJRC Teensy boards. Our Lower-level code for reading data in from the different cameras depended on which of the Teensy boards we were running it on. With all of them (T4, T4.1 and Micromod) as well as a couple of custom boards. we have support and settings to do reads using GPIO registers. With the T4.1 it uses the CMOS Sensor Interface(CSI) in 4 bit mode as enough of the CSI capable pins were exported on this board. Supporting JPEG in polling mode is pretty easy to look for the End Marker. In DMA mode it is more difficult. We have hacks, in that we chain multiple DMA setting objects, and Interrupt as each one completes, and then we try to scan this buffer. With the MicroMod - We are using FlexIO pin and defined a FlexIO sequence that more or less emulates the CSI. Like CSI, easier do wo when we poll versus using DMA. With the T4 - Use GPIO1 and maybe FlexIO3 (Does not support DMA), and bits are not all consecutive, so have to manipulate each item as it is read in. Porting to Zephyr: As I mentioned beyond my Zephyr knowledge. I should probably try programming some boards directly using zephyr. Looking at the Teensy Page (https://docs.zephyrproject.org/latest/boards/pjrc/teensy4/doc/index.html) I don't get the impression that there is currently support for the subsystems I mentioned (CSI, FlexIO). I Could be wrong, but... |
I am very glad to see this image sensor implementation effort! Also, thank you for explaining the history and rationale behind the project. I just realized that you meant CSI as Camera Sensor Interface which OmninVision calls DVP, not MIPI-CSI (Camera Serial Interface) which is much more costly and higher speed. Not sure about FlexIO support in Zephyr yet. I wanted to test #76124 with the MCXN947 (a different NXP chip with DVP support), but we have some work to do first. :) I ordered an Arduino Giga.
I just opened a PR trying to simplify new image sensor driver contributions, so that it requires fewer Zephyr knowledge, and facilitate reviews. This is a proposal, no idea if that will land on Zephyr or when, but I this helps with porting more things. When I have time, I will try converting a few sensors to this simplified model as an example, and ping you back. P.S. I misclicked, did not mean to close it at all! |
By the way, you might soon be able to have the devboard detected as a regular webcam, which means no need for a custom software to extract the images. Just opening the video stream with any webcam app. This should help image sensor driver development too. This was tested with the GC2145 on the Arducam Nicla. Just like the awesome OpenMV team did lately. |
I will try to complete the fix on MCXN947 this weekend, thanks for reminding.
Thanks for adding me in this PR as well as some others. I noticed that recently, the zephyr-bot didn't add me as a reviewer anymore for all recent video-related PRs, don't really know the reason :(. |
Describe the bug
The current driver for 0v5640 does not support vga , qvga or qqvga resolutions
Impact
The ov5640 camera supports the above mentioned resolutions but the driver does not support so using this driver with microcontrollers which have ram lesser than 614.4kB in its current state is not possible
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: