CHDK SeeInTheDark? - Script Writing - CHDK Forum

CHDK SeeInTheDark?

  • 3 Replies
  • 2607 Views
*

Offline KenO

  • ***
  • 122
CHDK SeeInTheDark?
« on: 29 / April / 2017, 13:01:38 »
Advertisements
Hi,

Recently read "Google software engineer shows what's possible with smartphone cameras in low light" https://www.dpreview.com/news/9392152415/google-software-engineer-shows-what-s-possible-with-smartphone-cameras-in-low-light  which led to  Marc Levoy's video "SeeInTheDark"  Not a valid youtube URL />and "Extreme imaging using cell phones" http://graphics.stanford.edu/talks/seeinthedark-public-15sep16.key.pdf

Was Very Impressed!  Unfortunately The SeeInTheDark app is not currently available to the public.

Decided to Google to check if anyone else has done something like this.  To date have only found "Experimental Nighttime Photography with Nexus and Pixelresearch.googleblog.com" bymonort which mentions "If you're looking to try out camera scripting on the cheap, Canon high-end P&S / superzoom cameras also support it (through CHDK)." https://hackerrumor.com/item?id=14196322

Then searched CHDK Forum to check if something is being developed.  All my searches got nothing.

Did I miss something?

If not is anyone interested in making a CHDK SeeInTheDark script?

Thanks

Ken

*

Offline reyalp

  • ******
  • 14125
Re: CHDK SeeInTheDark?
« Reply #1 on: 29 / April / 2017, 17:29:48 »
From the linked blog post
Quote
When the shutter button is pressed the app waits a few seconds and then records up to 64 frames with the selected settings. The app saves DNG raw files which can then be downloaded for processing on a PC.
Nothing needs to be added to CHDK to do this. All the smarts are on the PC, which given the wimpy processors on our cameras, would be the right way to do it with CHDK as well.

Quote
On each occasion he shot an additional burst of black frames after covering the camera lens with opaque adhesive tape. Back at the office the frames were combined in Photoshop. Individual images were, as you would expect, very noisy, but computing the mean of all 32 frames cleaned up most of the grain, and subtracting the mean of the 32 black frames removed faint grid-like patterns caused by local variations in the sensor's black level.
Again, nothing special here, dark frames and stacking are well known techniques. The enabling element for phones is raw images and an intervalometer, which CHDK can already do. In fact CHDK has the advantage here, because individual frames can be as long as the scene permits:
Quote
The camera cannot handle exposure times longer than two seconds. If this restriction was removed we could expose individual frames for eight to ten seconds, and the stars still would not show noticeable motion blur. With longer exposures we could lower the ISO setting, which would significantly reduce noise in the individual frames, and we would get a correspondingly cleaner and more detailed final picture.

You could use a script like my fixedint.lua script to take the frames http://chdk.wikia.com/wiki/Lua/Scripts:_Fixed_Exposure_Intervalometer

Dark frame and stacking workflow is up to you to develop, but there are many tools available. Doing scenes like the golden gate or lighthouse with CHDK should be quite easy.

Compensating for movement between frames or aligning both stars and background scenery are require more software trickery, but again, this is much better done after the fact on a PC. The author of the blog post does this with photoshop.

SeeInTheDark would be much more difficult, if not impossible to reproduce with CHDK.
* It shoots long bursts rapidly, which is not possible with raw in CHDK. Raw video ala Magic Lantern could potentially help, but I remain unconvinced this a possible on P&S hardware. In any case, much work would be required to even find out. Not an issue for tripod shooting static scenes.
* Much of the "magic" involves aligning the images, which is done using both advanced image processing and phone sensor data.
* The processing power available on the cameras is far less than modern smart phones, so the software part is likely impractical to do on camera.
* Some comparable sensor data might be available from the IS system, but it would require significant reverse engineering and likely is not extensive as what is available from smartphones. For example, lens based IS can't compensate for rotation around the lens axis, so there's no reason for the IS system to measure it.
Don't forget what the H stands for.

*

Offline KenO

  • ***
  • 122
Re: CHDK SeeInTheDark?
« Reply #2 on: 02 / May / 2017, 12:28:22 »
Hi reyalp,
Thanks for your detailed explanation!

“You could use a script like my fixedint.lua script to take the frames”  Thanks for the info and link!
Disable Canon Dark Frame  From your experience what is  ~ long exposure to use it?
Also will there be any new additions to this project?
Ken

*

Offline reyalp

  • ******
  • 14125
Re: CHDK SeeInTheDark?
« Reply #3 on: 02 / May / 2017, 14:05:58 »
Disable Canon Dark Frame  From your experience what is  ~ long exposure to use it?
I'm not sure what the questions is. With fixedint, the idea is that you disable Canon's automatic dark frames while shooting because you can create and subtract darkframes yourself later. This is mostly done to keep the shooting interval as short as possible.

On most CHDK cameras, the Canon firmware turns on dark frame for exposures longer than something like 1 to 3 seconds, but there are some exceptions.

The quality gain from using darkframes with shorter exposures is probably negligible, and they may actually reduce quality as once non-fixed noise dominates.
Quote
Also will there be any new additions to this project?
You mean fixedint? Right now, it mostly does what I want and no one else has requested changes.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal