Script inside script for HDR - page 3 - Script Writing - CHDK Forum

Script inside script for HDR

  • 28 Replies
  • 10720 Views
Re: Script inside script for HDR
« Reply #20 on: 16 / May / 2014, 18:47:03 »
Advertisements
In my opinion location sh script inside photos directory is better, You will just move all content to PC , and no checking other place.
This can get a bit tricky if the camera decides the current subdirectory is full and starts using a new subdirectory midway through the shots.   But it's not a big deal - if you want to do that then simply edit lines 92 & 97 of the script.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Script inside script for HDR
« Reply #21 on: 16 / May / 2014, 20:58:07 »
For that issue it is not a big deal, I just skip the last image. Overall, both scripts are awesome. More robust than what comes with any stock camera :)
It's probably time I merged them, rolled in some of the newer changes I put in all my scripts (e.g. no more apex96 values in the parameters), and added the logging function for use in post processing.

Quote
I recorded a video of the issue if needed (currently being processed by youtube)
https://www.youtube.com/watch?v=Ghr30hxWcZY&feature=youtu.be
Doesn't work - shows up with only a message that says : 

This video is private.
Sorry about that.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Script inside script for HDR
« Reply #22 on: 17 / May / 2014, 04:30:05 »
sorry about that, not sure why it was set to private, I usually select unlisted

https://www.youtube.com/watch?v=Ghr30hxWcZY&feature=youtu.be

should be working fine now
« Last Edit: 17 / May / 2014, 04:34:20 by Razor512 »

Re: Script inside script for HDR
« Reply #23 on: 17 / May / 2014, 07:22:48 »
Only feature I miss from the fast HDR script was when you set an exposure, it always considered that to be the center exposure where the exposure steps will be equally divided on tither side of that center exposure, thus you always get a good balance of over exposed and under exposed images.
I'm not sure I understand what you mean here.  Both script take an automatic exposure reading, start shooting at an exposure set at a lower value, and then increase the exposure in steps to the highest value - all balanced around the initial exposure reading.  What are you seeing?
Bump - still looking for an answer to this one.  Maybe another video?

should be working fine now
That's better - thanks.

I took a look at the code and it does not look like it tries to take two images at the same exposure at any point.  Squinting at the video,  it looks like it's the first and second image with identical information?  Would you mind uploading two of the "identical" images (e.g. CRW_0103.DNG & CRW_0104.DNG) to a file sharing site and dropping the links here so that I can take a look at the EXIF info?

By the way, you can turn off that annoying pop-up window that shows up at 00:55 in the video using CHDK settings -> Menu Settings -> Show <ALT> Help Screen [ ] .

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Script inside script for HDR
« Reply #24 on: 17 / May / 2014, 11:18:35 »
thanks for the tip, disabled that popup :)

Those are the 2 images

https://www.dropbox.com/s/ocq95gop0vgsetl/fasthdr%20issue.zip 29MB

And the entire set can be had here https://www.dropbox.com/s/0pg76qjainc1rjj/hdrissueset.zip  112MB

Edit: here are the corresponding jpegs that the camera saved while saving the raw files https://www.dropbox.com/s/zhgdp3h6747am63/corresponding%20jpegs.zip (just for the 2 problem images 3.05MB )
« Last Edit: 17 / May / 2014, 11:21:12 by Razor512 »

Re: Script inside script for HDR
« Reply #25 on: 17 / May / 2014, 13:01:18 »
Those are the 2 images
Very interesting. 

The jgp exif data shows the exposure time for the first image as 5 seconds while the dng information for the same image shows it as 2.5 seconds.  The second image jpg & dng file both show a shutter time of 2.45 seconds.  The first image is clearly brighter than the second so I tend to believe its jpg data.

So it seems likely that in this part of the code :

Code: [Select]
    for i=1, steps, 1 do                        -- take the shots as fast as possible
        print("  step=", i, "tv96=", print_tv(tv96val))
        ecnt=get_exp_count()
        set_prop(pTV,tv96val)
        if( propset > 3) then set_prop(pTV2,tv96val) end
        press("shoot_full_only")
        repeat sleep(20) until(get_exp_count()~=ecnt)
        release("shoot_full_only")
        tv96val = tv96val+tvStep
    end
the set_prop(pTV,tv96val) for the second image happens before the first image dng file finishes saving.  After that,  things slow down and work properly.  Not really sure what to do about that - this script is actaully a bit of a hack done to make it shoot faster.  Works okay with jpg images but appears to have timing image saving DNG files.  Oh bother ...

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Script inside script for HDR
« Reply #26 on: 17 / May / 2014, 14:02:33 »
Then it is no problem, when there is ample light, this script works very quickly so it is no issue to either drop one, or simply have it take one extra. (not worried about storage since i am using a 64GB card :) )

(e.g., doing an outdoor HDR shot, or doing one with with a bright light shining at the subject, pretty much does burst shooting with the only real delay coming from writing the large raw files to SD card in the case in the video, the files were saved at pretty much half speed because when a SDXC card is formatted as fat 32 with a large cluster size, the write speeds pretty much get cut in half.

On my 8GB card, I can do a 16 shot exposure bracket outdoors (17 shots to I can skip one) in about 20-25 seconds
« Last Edit: 17 / May / 2014, 14:16:25 by Razor512 »

*

Offline reyalp

  • ******
  • 14125
Re: Script inside script for HDR
« Reply #27 on: 17 / May / 2014, 15:04:51 »
Not really sure what to do about that - this script is actaully a bit of a hack done to make it shoot faster.  Works okay with jpg images but appears to have timing image saving DNG files.  Oh bother ...
I was going to say this would be an application for the "shoot hooks" (http://chdk.setepontos.com/index.php?topic=11081.msg108530#msg108530) I added in 1.3, but as things are I think it would have the same problem because the raw hook runs before raw save. So if you change propcases there, they will end up in the DNG exif.

Looks like a good reason to add a post raw save hook.


edit:
Never mind, it looks like I was smarter than that. The raw hook runs after libdng->capture_data_for_exif(); so setting exposure for the next shot should do exactly what you need.
« Last Edit: 17 / May / 2014, 15:10:34 by reyalp »
Don't forget what the H stands for.

Re: Script inside script for HDR
« Reply #28 on: 19 / May / 2014, 07:00:28 »
edit:
Never mind, it looks like I was smarter than that. The raw hook runs after libdng->capture_data_for_exif(); so setting exposure for the next shot should do exactly what you need.
link to reyalp's new version of this script > Fasthdr script using continuous mode + shooting speed observations
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal