The basic idea is like taking a high-res, low-framerate video and summing the frames into a buffer instead of encoding them into a video stream:
1) Allocate a 16- or 24-bit-per-pixel buffer the same size as the sensor, and zero it out
Start reading scanlines from the sensor, adding each pixel onto the value already in the buffer for that position
Open the shutter
- the code that reads the stills data from the sensor runs on the DSP and stores the data for the entire frame directly into a buffer in RAM,- the sensor's video modes are limited and none are full-resolution,
- and that anything to do with modifying the DSP is practically impossible.
Are there any ways to get access to individual scanlines
I have time to work on this if it's not a complete dead-end.
How much experience do you have with1) C2) ARM assembler3) Reverse engineeringIf you have a decent amount of experience with the above, I'd suggest taking some time to look through the CHDK code and some firmware dumps to get an idea of how things work. Speculation without a reasonably firm grasp of what is actually there is not productive. Some background reading about digital imaging hardware would also probably be helpful to understand what is theoretically possible.
FWIW, it seems to me that most of your idea could be implemented by shooting fast exposures in raw and summing them later into a higher bit depth format. The frame rate would be very low, of course.
I'm going to start experimenting with my camera and see if I can make a multi-exposure mode that doesn't save a new image with every frame. This would get me most of the functionality I need, with the main downside being shutter wear.
I'm going to start experimenting with my camera and see if I can make a multi-exposure mode that doesn't save a new image with every frame.
This would get me most of the functionality I need, with the main downside being shutter wear.
Waterwingz suggestion that you could steal alternate raw buffers might be worth looking into, but I suspect it won't work. The same address space may be used for other things outside the shooting process (the first "raw buffer" often occupies the same address spaces as the live view), and in any won't be large enough if your summed image has a greater bit depth than the native raw.
Quote from: reyalp on 27 / March / 2013, 16:18:35Waterwingz suggestion that you could steal alternate raw buffers might be worth looking into, but I suspect it won't work. The same address space may be used for other things outside the shooting process (the first "raw buffer" often occupies the same address spaces as the live view), and in any won't be large enough if your summed image has a greater bit depth than the native raw.That actually isn't quite what I was trying to say. I was more thinking that he could create a new 16 bit RAM buffer and sum up to sixteen 12 bit RAW buffers into that while filtering so as to not over expose any area. The RAM buffer would take a lot of space so feasibility would depend on the Canon free space of the camera chosen, the amount of CHDK code you can build out (small in these days of module) and careful juggling of the different available memory regions.
I don't think there are any existing cameras you could do this on for the full RAW image size. A 10MP camera with a 12bit sensor has a 15MB raw buffer. To create a 16bit raw image would require 20MB of memory.The largest free heap memory I've seen is only 2.5MB.I was able to get an 8MB EXMEM buffer on the G12 - anything beyond that caused problems (slow shooting, video issues etc).
Then there's the processing speed issue. Using the badpixel file creation as an example it takes a long time (10+ seconds) to process the entire raw buffer due to the way the pixels are packed into memory. And that's just reading and testing the values - merging and updating another buffer would take even longer.
Having said that, some recent cameras do in camera HDR from 3 full size images; but whether the Digic processor is used for this is unknown. It may be possible to hook into this HDR code on a supported camera; but this will require a lot of reverse engineering.
Started by PhyrePhoX
Started by RaduP
Started by llo599
« 1 2 »
General Discussion and Assistance
Started by dave100
Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes)
Started by yndesai