rawopint.lua: Fast, accurate intervalometer with raw exposure metering - Completed and Working Scripts - CHDK Forum

rawopint.lua: Fast, accurate intervalometer with raw exposure metering

  • 207 Replies
  • 85033 Views
*

Offline reyalp

  • ******
  • 14125
Advertisements
This is a script I developed while working on the raw shooting hooks.

It is still not really finished, but is usable in many situations.

The basic idea is to shoot rapidly without invoking Canon firmware auto-focus or auto-exposure between shots. The exposure for each subsequent shot is calculated from the previous image data. Shooting is done either using Canon continuous mode with delays inserted to maintain the desired interval, or by simulating holding the shutter button at half press and repeatedly clicking full press. In continuous mode, the script can achieve a frame rate close to the Canon continuous shooting specification.

This script intended for situations where a relatively high frame rate, smooth exposure change and fixed focus are desired. Because exposure is calculated from the raw image data, it performs well in low light but may not perform well in situations where the light changes rapidly. It is well suited for daytime landscapes, clouds, sunsets, sunrises etc.

Wiki page with details and download link:
http://chdk.wikia.com/wiki/Lua/Scripts:_Raw_Meter_Intervalometer (current version is also attached to this post)

Please post bug reports, suggestions and questions in this thread.

If you do something cool with it, posting in creative uses of CHDK section is encouraged.

Changes for v0.25 (May 6, 2018)
* Add workaround to prevent aperture changes on cameras incorrectly defined to have ND even when ND threshold is disabled. Thanks c_joerg for reporting
* Added options to start at a particular clock time
* Added options for zoom and focus distance

Changes for v0.24 (Mar 4, 2018)
* Fixed bug that prevented intervals > ~10 seconds from working. Thanks SkepticaLee for the report.
* Removed "Force initial ND" option. Cameras formerly thought to have a "hidden" ND without detectable state are now known to operate on the aperture. To use ND control on these cameras (not recommended), set the aperture to full open in the Canon firmware. If ND state isn't detected correctly on a camera with manual ND, set it open in the Canon firmware.

Changes for v0.23 (Aug 27, 2017)
* Add support for ND filter control on cameras with both ND and iris.
* Add options "ND value", "Force initial ND" and "ND hysteresis". See option descriptions on the wiki for details and caveats.

Changes for v0.22 (Aug 6, 2017)
* If "ISO Adj Tv" is set longer than "Max Tv", it is now set to "Max Tv", meaning the ISO adjustment will start when shutter adjestment ends. This fixes a bug where the "Max Tv" limit would be ignored. To disable ISO adjustment, set "Target ISO" and "Max ISO" to the same value. Thanks SkepticaLee for the report.
* Add battery temperature to log.

Changes in v0.21 (Apr 2, 2016)
* Fixed a bug that caused exposure to stop increasing when Max ISO was hit, regardless of Max Tv. Thanks udo for the report.

Changes in v0.20 (Jan 8, 2016)
*Add USB remote trigger option, based on suggestion in http://chdk.setepontos.com/index.php?topic=12722.0

Changes in v0.19
* Added interval warning LED and beep options, suggested by  c_joerg in http://chdk.setepontos.com/index.php?topic=11081.msg125794#msg125794
* Changed some defaults. Meter now defaults to 90%, meter step 15.
* Log mode now has options for "none", "replace" and "append", defaults to append.
* Fix delay on script exit reported by c_joerg in http://chdk.setepontos.com/index.php?topic=11081.msg125651#msg125651
« Last Edit: 07 / May / 2018, 02:17:02 by reyalp »
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1251
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #1 on: 14 / December / 2015, 10:11:40 »
It’s a good idea to open a new thread with a more understandable title.     :xmas   :xmas
The description, including the summary is really great.    :xmas  :xmas

What would be the easiest way, to port the existing param files to the newest script version? What would be happened with the missing parameters, when I would be used an older param file?
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline reyalp

  • ******
  • 14125
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #2 on: 14 / December / 2015, 13:00:54 »
What would be the easiest way, to port the existing param files to the newest script version? What would be happened with the missing parameters, when I would be used an older param file?
I haven't looked at the code to see what the exact logic is, but normally, everything is reset when the parameter definitions in the script change.

I guess you could do something like this:
* save your existing file from the previous version to your PC
* load the new the new version of the script, and save a parameter set
* copy that the new file to your PC
* copy over any identically named parameters, except for ones where the meaning or range of valid values has changed.

The script saved parameter function was never really mean to support this kind of thing. It might be easier and safer to just go through the list on screen and write the settings down.
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1251
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #3 on: 16 / December / 2015, 03:18:22 »
I updated rawopint V0.19 on my G1X, SX230 and SX50. I checked the warning LED and Beep. It works very well. Good that you gave the hint with the mute setting on the canon menu, because I set all my cams to mute.

There is one think, which I notice on the SX230. I still have a delay on the end in continuous mode. But only with very small interval values. I notice this, when I tested the warnings with an interval from 0.2s (Interval of 0s gives no warning). The delay is less (around 8s) than as it was without your modifications. This is not happens on G1X and SX50. It is OK from my side, because this isn’t a typical setting. I want only report it.

I converted the last parm file which you post for moon setting to version 0.19. I still think, this is the best setting which we have right now for this. I did it like you descried with a smart merge tool ‘Beyond Compare’. Attached is a snapshot with differences. Feel free to remove the attachment when you can’t agree this setting.     



M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline c_joerg

  • *****
  • 1251
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #4 on: 23 / December / 2015, 03:18:09 »
I did a couple of investigation, to see, which influence has the memory card on the timing for rawopint.
I did it with 5 different SD Card’s in 3 steps:

1) On a PC with different tools and different block sizes
2) With CHDK benchmark test
3) Running rawopint in continuous mode on G1x with an interval of 2s (Canon RAW + JPG)

The table shows the results from the PC and CHDK benchmark.

The plot shows the sleep from the log file. As you can see, there is not much influence from the memory card. The only thing which I notice is the peek from the 64GB SanDisk Ultra Card. This was the card, where I had the massive problems with timing on my last trip. So I will observe this Card.
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline c_joerg

  • *****
  • 1251
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #5 on: 07 / January / 2016, 12:53:37 »
I have now also a IXUS160. I can’t get enough and for that price…

I’m not sure, if this is a point for rawopint or the IXUS160

I started rawopint on a fresh installation and I got the Error Message, that rawopsim.csv was missing. I have not changed any parameter and I have not switched on ‘Run simulation’. But I have not checked it…
After I loaded default parameters everything runs well. But I have not changed any parameter…

I remembered, some time ago, we had problem with some parameter mismatches…


Update:
It is not reproducible. I formatted the SD and installed every think again. No problems…

« Last Edit: 07 / January / 2016, 13:19:37 by c_joerg »
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline reyalp

  • ******
  • 14125
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #6 on: 09 / January / 2016, 01:27:44 »
In 0.20, I added support for USB remote triggering. Yes, there's more important stuff still unfinished, but it seemed easy and fun :haha

When this option is enabled, the script waits for a usb remote pulse instead of shooting on a fixed interval. The "interval" option specifies how long it will wait for the pulse. If no pulse is received within the timeout, it will shoot anyway.

If the pulse arrives before the camera is finished with the previous shot, it should shoot as soon as it can.

I haven't tested this much, only switching a powered usb hub on and off.

There is currently no way for the thing controlling the remote to end the script. This could be done with pulse width or on timeout.

For synchonizing with a slider, I think having the camera signal the slider is probably a better approach, since it would allow the maximum possible shooting rate.

@c_joerg
I don't have any idea what would cause the rawopsim error, this could really only happen if you checked the simulation option.
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1251
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #7 on: 27 / January / 2016, 08:57:21 »
I’m still festinated to make time-lapse from the moon, especially since I have the SX50. Unfortunately the weather was not very good this winter…

I made 2 runs. I don’t know why the first run is overexposed. I used nearly the same parameters as from the second run. But the focal length was different from the first (efl=161mm) and the second run (efl=720mm). This might be a big difference.


http://youtu.be/nTeLvI6ce50

 
In the log file I notice ‘WARN:over_thresh histo_samples’ this might be a problem as well. May be the histo_step was the big.

As well I used a modified version of the script which. I might be that I forgot something.
What's Changed?

I add an additional parameter for max max_ev_change (one for up and one for down) and additional a 0 for both parameters.

Code: [Select]
#ui_max_ev_change_e=4 "Max Ev change" {0 1/16 1/8 1/4 1/3 1/2 1}
#ui_max_2_ev_change_e=4 "Max Ev 2 change" {0 1/16 1/8 1/4 1/3 1/2 1}


and added the following code:

Code: [Select]
-- clamp to ui max
 if ev_change > 0 then
    ev_change = self:clamp(ev_change,self.ev_change_2_max)
 else
    ev_change = self:clamp(ev_change,self.ev_change_max)
 end

Why I did this?

I don’t want that the script goes with the exposure up and down when the Moon goes behind trees and clouds. So I looked one direction with the 0. If ui_max_2_ev_change_e = 0, the script only controls overexposure. Basically this works very well, as long the pre shoot is not to dark. On the second run you see, exposure time goes only shorter.  But I don’t know why this not happens on the first run.

Another reason to do this is why I want to make time-lapse from growing stuff on tungsten light. To avoid flicker I also want only use the overexposure control of the script. Because in this case I know, it can’t go darker.
I know, for this case I could do it in a much easier script, but a really like all the logging stuff in the script…


M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #8 on: 26 / February / 2016, 07:32:48 »
 8) Just a quick thanks, for a terrific script  :)
Here is a testrun, showing how smooth the exposure transition can be with this script. From sunset to starry night is handled very well:
https://www.youtube.com/watch?v=Gl4qGcUynBw
Rendered from small jpeg's, straight out of cam, its impressively smooth (exposure wise).
The camera sadly cant keep up with the interval at the end, caused by the G1X ISO issue  :(
It would be great if that problem could be solved (together with handling the ND filter). The G1X shoots pretty nice files up to 1600-3200 ISO, so that would open up a ton of possibilities.

*

Offline reyalp

  • ******
  • 14125
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #9 on: 26 / February / 2016, 16:58:09 »
From sunset to starry night is handled very well:
Nice, glad it worked for you.

Quote
The camera sadly cant keep up with the interval at the end, caused by the G1X ISO issue  :(
It would be great if that problem could be solved (together with handling the ND filter). The G1X shoots pretty nice files up to 1600-3200 ISO, so that would open up a ton of possibilities.
Unfortunately, I don't hold much hope for resolving the G1X ISO issue any time soon :(

I do want to get back to work on this script in the relatively near future, including finishing ND and aperture support. I'm keen to see what the g7x can do when I get the port far enough along to run it :)
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal