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

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

  • 207 Replies
  • 73978 Views
*

Offline c_joerg

  • *****
  • 1248
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #180 on: 09 / August / 2021, 02:14:07 »
Advertisements
What kind of exposure range do you get from that video?

I can't say exactly because my tests are always limited by the set parameters.

In this example with the M3, ISO goes from 100 to 1600 (4 steps) and the exposure time from 0.13s to 3s (4.5 steps).
In this video I also change the values linearly from 255 to 0. This means that the dark times are less represented.

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 Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #181 on: 09 / August / 2021, 12:35:04 »
The file is only closed when the script ends, so if the camera is powered off, anything in the OS buffer is lost.
Where to place "log:flush()" without disturbing intervall?  :-[
Code: [Select]
function restore()
...
        log:flush()
log:close()
end
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14082
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #182 on: 09 / August / 2021, 18:44:09 »
Where to place "log:flush()" without disturbing intervall?  :-[
Why should such a place exist?

The csv log module used in rawpoint accepts 3 buffer_mode values
'os' - output is buffered by the OS, written to the card when the OS thinks it needs to, or when log:close() or log:flush() is called. This is the default.
'table' - output is kept in a Lua table until log:flush() or log:close() is called. May use all available RAM unless the script takes steps to avoid this.
'sync' - output file is opened, written and closed each time log:write() is called. log:flush() is ignored.

The assumption is that 'os' will generally minimize disturbance, since the OS will probably try to write optimally sized chunks. Scripts that do the equivalent of 'sync' have been reported to have much less consistent intervals, which isn't surprising since it would likely involve a lot of writes smaller than an allocation unit on the SD card.
If you have enough memory and don't care about losing everything in a crash, then 'table' would have the minimum impact.
Don't forget what the H stands for.

Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #183 on: 16 / January / 2023, 12:34:57 »
On perhaps a slightly different topic:
I was thinking of using rawoptint to photograph a sunset/moonrise on a nice white mountain. It would just be important here that the interval is kept close to 15s, the ISO at 200. With that I could take well exposed single shot with the shutter speed going from about 1/1000 s in daylight to 15 s in moonlight, if my calculations are correct.
What parameters would I have to set to what values for this to work?

Best


*

Offline reyalp

  • ******
  • 14082
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #184 on: 16 / January / 2023, 13:32:44 »
On perhaps a slightly different topic:
I was thinking of using rawoptint to photograph a sunset/moonrise on a nice white mountain. It would just be important here that the interval is kept close to 15s, the ISO at 200. With that I could take well exposed single shot with the shutter speed going from about 1/1000 s in daylight to 15 s in moonlight, if my calculations are correct.
What parameters would I have to set to what values for this to work?
Max Tv Sec/1000 = 15000 (or less to allow for image saving while keeping 15s exactly, perhaps 14000 for jpeg, or 11000 for raw, depending on cam)
Min Tv Sec/100K = 100 for 1/1000th
Target ISO = minimum your camera supports in the Canon UI (usually 80 or 100)
ISO adj TV Sec/1000 = the value you used for Max Tv Sec/1000 (if you want ISO to only adjust once the longest shutter speed is reach) or less (if you want ISO and shutter to adjust together)
Max ISO = 200

Of course, if the moon will be in the scene, you won't be able to expose it and the mountain correctly, so you need to decide which to prioritize.

Some relevant settings
"Overexp thresh x/100k"
Controls how much of the scene is allowed to be over exposed. If it's larger than the fraction of pixels the moon takes up, then the moon will be over-exposed, and the scene will be more correctly exposed. The fraction depends on zoom. You can calculate from the FOV and knowing the moon is ~1/2 degree, but if you aren't using a lot of zoom, a few percent (values of a few thousand) should be plenty to ignore it. If you do want to properly expose the moon, I suggest calculating the actual fraction. If the fraction is very small, you may need to reduce "Histogram step"

"Underexp thresh x/100k"
Controls how much of the scene is allowed to be under-exposed. This will resist the effect of the overexposure protection. Generally it should be a larger fraction for over-exposure. Higher values allow over-exposure protection to have more effect. If you want to allow the moon to over expose, the default of 10% should be OK, but if you want to minimize how much of the scene gets blown out, you can use a higher value.

"Underexp -Ev"
How many stops below correct exposure the scene can be before it counts as under exposed. Larger values will allow the scene to get darker when there's over exposure in the scene.

"Meter low thresh -Ev" and "Meter low limit Ev"
Work similarly to the previous items, but for the average value of the scene, rather than a fraction of pixels. The "thresh" value controls what exposure value it starts to take effect (resisting further exposure change from bright objects) and "limit" sets where it reaches full effect. Again, if you want bright objects to allow the scent to get dark, use larger values. If you want to keep the scene well exposed at the expense of having bright areas over-exposed, use lower.

FWIW, I've been meaning to put out a new release of this script for a while, but for various reasons haven't quite got around to it. The in development version is at https://github.com/reyalpchdk/chdkscripts (use "download" next to "development build" for the latest)
Some bugs that caused flickering in certain situations are fixed. New bugs are also undoubtedly introduced, but identifying them is left as an exercise ;)
Don't forget what the H stands for.

Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #185 on: 16 / January / 2023, 14:29:50 »
Thanks for the info. Just for clarification, I will have the moon rising to the left of the scene and going behind the camera, setting to the right. In case that doesn't make sense, the mountain is Titiroa in New Zealand, and my shooting position is to the north of the mountain looking south. It is a lovely white mountain, so I am trying to get the foreground illuminated, with stars in the background sky. Unfortunately I can't carry enough lighting up the mountain with me, so I am getting the moon to do the job for me.
I'll see what the new version does in a close simulation in a couple of weeks.
Cheers, Lee

*

Offline c_joerg

  • *****
  • 1248
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #186 on: 17 / January / 2023, 06:49:32 »
I was thinking of using rawoptint to photograph a sunset/moonrise on a nice white mountain. It would just be important here that the interval is kept close to 15s, the ISO at 200.

I find a sunset with 15s interval too fast (with 30fps)
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 #187 on: 17 / January / 2023, 10:39:31 »
I find a sunset with 15s interval too fast (with 30fps)
Ah, but it's not just the sunset/moonrise, I want to get the mountain illuminated by the moon with the stars behind. Without too much noise. That's what the 15 s are for. But thanks anyway.


Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #188 on: 05 / February / 2023, 05:02:15 »
Experiment done and it was much better than I hoped for. Wow! Video is at I was using the old version of rawopint (perhaps I will get a clear night on Monday or Tuesday of this week and can repeat with the new version).
Camera was an SX 520 powered by a 20Ah powerbank - 14 hours of shooting used up about half of the power.
The only fly in the ointment was that I had raw shooting turned on and that slowed down the shooting rate, but that was my mistake.

*

Offline reyalp

  • ******
  • 14082
Re: rawopint.lua: Fast, accurate intervalometer with raw exposure metering
« Reply #189 on: 05 / February / 2023, 14:31:07 »
Experiment done and it was much better than I hoped for. Wow! Video is at
Nice. There's a fair amount of overexposure near the start and end. Throwing it in the notebook (https://github.com/reyalpchdk/chdkscripts/blob/main/tools/rawopint-analysis.ipynb) we can see (frac-weight-20230205.png) it hit about 4.2%. Over thresh is 3%, with the additional amount driven by under-exposure, which has thresh 10%. Since under exposure was more than 20% for must of the run, it dominated exposure control as seen in the weights. So this was working as designed, but would probably look better with more over exposure control.

For a scene like this, you probably prefer to allow the landscape to get dark to favor of more correctly exposing the sky, so I'd suggest a lower over thresh, maybe 1%, and higher under thresh, maybe 30% or more, or even turn it off, and rely on average scene brightness (meter) to handle it. Meter low limit set to 1 1/4 stops, which is quite strict. I'd probably increase that to 3 or 4.

Beware that the old version is probably more prone to oscillation with tight overexposure limits.

(note I had to trim the log to the final run to get it to load, there were other runs in the log, one of which had a corrupted row, likely to due to a crash.)
Quote
Camera was an SX 520 powered by a 20Ah powerbank - 14 hours of shooting used up about half of the power.
Nice. I guess this is a custom hardware setup?
Don't forget what the H stands for.

 

Related Topics