-
Notifications
You must be signed in to change notification settings - Fork 654
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
PIXFORMAT_RAW support missing? I want to generate DNGs.... #249
Comments
the problem is that this would be too much data for the ESP32 to be able to acquire and process. We can try this with our newer chips (S2/S3) soon. Most boards are not wired to support the 10bit data bus also, so 8bit would be the max |
I would be very open to contribute to an open ESP-pro cam project. -Multi-device frame synchronization Last year I built a cam array with 72 ESP-cams for photogrammetric 3D-Scanning, which is surprisingly capable but still rather a hobby than a product. With the above-mentioned capabilities, people could potentially build their own cinema-grade scanner for less than 1000€ -depending on the module price of cause. |
We do not have enough pins for Ethernet. I need to check if ESP32-S3 will have Ethernet, because it was removed from S2. |
8bpp raw should be the same data size as gray. I do see timeouts when trying to capture full resolution gray... is that the same problem? I would have expected 1 buffer of raw 1632x1232 to fit in the PSRAM, although the JPEGs are quite a bit smaller. There is still the possibility to use the ROI support to send portions of a raw frame at a time, although then the portions would be from different captures.... I suppose without 10bpp, the JPEGs might actually give better data than raw in terms of dynamic range (assuming all 10bpp are used in the OV2640 JPEG pipeline). Incidentally, I'm a computer engineering professor at the University of Kentucky. One of the things I'd be using this for is Lafodis160, a 160mm-diameter LArge-FOrmat DIgital Scanning camera that I published on at Electronic Imaging 2021 in January. Currently, it is sampling each position using JPEGs. The saving grace for it is that I'm normally only trying to get the equivalent of 5um pixels for the stitched capture, so multiple 2.2um sensor pixels contribute to each spot and the JPEGs don't hurt image quality too much. |
Obviously, me too. I've been using CHDK with Canon PowerShots for over a decade... for example, I'm the guy who wrote the Lua reference card for CHDK.
I actually have an undergraduate senior project team in the early stages of working on an "ESP32-CAM Swarm" project trying to do single-point control and precise wireless sync of a large number of ESP32-CAM-based camera modules. How did you do your sync? The obvious thing would be using UDP broadcast, which they're supposed to be testing, but they're also looking at other methods, such as using NIR to sync. They also haven't yet done testing to determine precise lags and variability in triggering the OV2640. If you have pointers to any of your work WRT ESP32-CAM sync, that would be appreciated.... |
Hey, feel free to check out my ESP 3D Scanner project - I will update my horrible code within the next 10 days or so. You mentioned one RAW grey not fitting in the PSRAM. I found out that anything crossing over 50% of the total PSRAM size gets corrupted. Limiting the PSRAM to half its size kind of mitigates this for JPG at quality 0 - meaning I am able to get up to almost uncompressed JPG up to 955kb - RAW grey does not cause issues. This "hack" is not yet in my repo, but was easy to implement. Synch is a rather relative word, because of the mentioned variability regarding the OV2640 (or OV3660). Bottlenecks of my system are my abysmal code and the way my WIFI router handles UDP and limit of max simultaneous connections. If I were your student, I'd try with 433MHz - periodically sending a times stamp (now [0]), and control via command and generously spaced execution time stamp, but I'm also an idiot... I am trying to check out your Lafodis project, but the pdf is not loading ... |
The PDF loaded ... I am stunned! |
Looks good at a quick glance. I'll point my students at it. :-)
Very interesting. If PIXFORMAT_GRAYSCALE works, 8bpp PIXFORMAT_RAW should be doable too.
12ms is pretty good; I doubt we can get the OV2640 to trigger much more consistently than that.... The idea of using sync to establish global time and then triggering at agreed-upon times is an old standard for us. For example, we advocated that in
Sorry about that. For political reasons, I don't host Aggregate.Org (my research group website) on nodes in my supercomputing machine room... instead, it's on a University of Kentucky virtual host that keeps throttling it because it gets "too much" traffic. It will eventually load if you keep hitting it. IS&T should have the paper freely online soon, but it usually takes a few months after the conference before papers are posted. |
About the cam module: do you know if the variability in capture time comes from the driver or from the cam module itself? |
Not yet. It does seem like the OV2640 is capable of very precise external sync, but I'm not even sure the wiring allows it here. |
Thanks! Will investigate. |
Is that "literal"? |
Yes. Images taken with full psram often get corrupted which leads to incomplete images. Limiting the psram solves this. Don’t know if this still applies to the latest software, but it works for me. |
Wow - I never considered that. I've been unraveling the jpeg to look for strange elements in the huffman codes, to find bad jpegs. So the magic number is 3FA0 0000. I'll try avoiding that buffer! |
I had the same requirements and looked a little into the code a few month ago. Unfortunately it seems, that 8bit RGB or RAW is not possible with the current version of the ESP32. The driver has no raw support implemented and RGB888 is basicly RGB565 upscaled to 256 as max value. So you will only get 16 bit colour depth. The JPEG format might have some advantage here. I did try to solve that issue and experimented a little with the code. I changed the registers to RGB888 disabled all sensor features and changed the DMA mode but it seems, that the ESP32's ISP is not fast enough to catch the data from the sensor in time. I ended up with missing pixels and was unable to resolve this issue. I am also open to contribute to that matter but I am not an expert. I am a PhD student at the technical University in Berlin and I am using the esp-cam modul as a portable light measurement device, or so is the plan. |
This issue appears to be stale. Please close it if its no longer valid. |
Although the JPEG and GRAYSCALE formats are fairly useful with the OV2640, I'm trying to get maximum RGB image quality and I want to do my own Bayer conversion. The catch is, there doesn't seem to be any support for PIXFORMAT_RAW in the driver, let alone any way to tell it I'd like the 10bpp rather 8bpp version of that. Basically, my plan is to wrap the truly raw sensor data as an uncompressed DNG and do the Bayer conversion later; I'm even happy to do my own bad-pixel repairs. Dave Coffin (the author of DCRaw) has a simplified DNG-wrapping program elphel_dng.c, but it's even easier to just stick a pre-computed DNG header on the data. Anyway, I'd be perfectly happy with the driver just allowing me to get the 8 or 10bpp raw sensor data without a header. Is that doable?
The text was updated successfully, but these errors were encountered: