proposal - script shooting hooks - page 16 - General Discussion and Assistance - CHDK Forum

proposal - script shooting hooks

  • 290 Replies
  • 95950 Views
*

Offline reyalp

  • ******
  • 14003
Re: proposal - script shooting hooks
« Reply #150 on: 17 / May / 2015, 21:28:52 »
Advertisements
This is one issue where I still thinking about. I can’t agree this for S110 and G1X.
My comment was only based on testing of cameras I have. It's quite likely that other cameras behave differently.

Updated scripts are attached. Changes
* rawopint now supports continuous mode. You must enable continuous mode in the Canon settings, and make sure "Use cont. mode if set" is checked (on by default). This may improve the review display, and may shoot faster. There may be other side effects.
* over / under protection can now be specified in parts per 10,000, and is measured in parts per 100k. It's logged as % (to 3 decimal places).
* Some shutter values are changed from 1/100ths to 1/1000ths.
* Meter low limits extended
* "simulation" mode is probably broken.

I have not yet updated to the code to deal with the changing black point on G1x, however from Lapser's comments it's possible that running in continuous mode will avoid the issue.

I haven't tested this a whole lot.

I had one run with the D10 which had two shutter failures and then crashed without are romlog after ~630 shots. This was with the "disable script yield" set, not using continuous mode.

I subsequently did a run of ~2700 in continuous mode with yield enabled and raw hook sleep set to 10 without any shutter failures or crashes.
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1242
Re: proposal - script shooting hooks
« Reply #151 on: 18 / May / 2015, 01:52:05 »
That sounds really good :) . I am looking forward to work with the script. I’ll be out for a couple of days may be without any internet connection. So the response can be a little bit delayed….
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

  • ******
  • 14003
Re: proposal - script shooting hooks
« Reply #152 on: 19 / May / 2015, 23:08:36 »
Here's a boring test with the current script on D10 in continuous mode. Shooting rate was similar to the old method, ~160ms to spare with a 1.2 second interval.

No shutter errors or crash in ~6100 shots. I had script yield enabled and a raw hook sleep set to 10ms.

I think the flickering is due to overexposure thresh being set to 2 (0.02%). Histogram step was 11, so over protection would reach full strength a bit over 20 pixels. At low percentages there isn't much room for the change to ramp in. From the frames I looked at, it appears variations in the clouds and highlights on the grass were the brightest parts, although they weren't actually ever maxed out in the jpeg. Overexp Ev range was set to 1/2 stop.

I don't think the flickering is a camera issue, since the bv is nice and smooth. ND was in the whole time, and shutter speeds weren't excessive.

Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1242
Re: proposal - script shooting hooks
« Reply #153 on: 22 / May / 2015, 15:15:20 »
Unfortunately I have not had much time to do something. Make only a small test with S110, to see how continuous mode works. I made 4 runs with each 20 pictures.
1) Single Mode with Interval of 4s.
2) Continuous mode with Interval of 4s.
3) Continuous mode with Interval of 0s.
4) Single Mode with Interval of 0s.
As you can see on the log file, continuous mode on S110 is around 2 times faster.

I hope I have more time next week to make a longer test with G1X.

Quote
I think the flickering is due to overexposure thresh being set to 2 (0.02%).

I would think it also. May be it is a hard condition with a histogram step of 11.
In this case, probably step must be much smaller. What was the step size in the previous version?

Would be really interested, how this will be work with the moon.

But I still think about the flicker in my last video. Do you think, the whole control can be going in oscillation? In my simple script, I have a hysteresis when I change direction of control. I also don’t change any control, when changes are less than 1/3EV. On some conditions, I stay a long time with the same ISO and Tv values. Also on your last run (on the second half), you could stay probably a long time without changing values.
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

  • ******
  • 14003
Re: proposal - script shooting hooks
« Reply #154 on: 22 / May / 2015, 16:57:33 »
As you can see on the log file, continuous mode on S110 is around 2 times faster.
Good to know. Did you check how the images are displayed when the screen is on? On D10, continuous mode shows the last image until the next one is shot, while non-continuous goes black in between.

Quote
I would think it also. May be it is a hard condition with a histogram step of 11.
In this case, probably step must be much smaller. What was the step size in the previous version?
The old shot_histogram code has a hard coded step size of 31.

Small step sizes may have a significant impact on shooting time.

Quote
Would be really interested, how this will be work with the moon.
Me too, but weather and celestial mechanics have not cooperated ;)

Quote
But I still think about the flicker in my last video. Do you think, the whole control can be going in oscillation?
In my simple script, I have a hysteresis when I change direction of control. I also don’t change any control, when changes are less than 1/3EV. On some conditions, I stay a long time with the same ISO and Tv values. Also on your last run (on the second half), you could stay probably a long time without changing values.
Oscillations are definitely possible, although I try to limit them.

In my script, the exposure change for shot N is normally made by averaging the change needed for "correct" exposure with the change used in shot N-1. This is modified in a couple ways:
1) If it would cause the next exposure to overshoot (e.g. the current frame is correct, but the previous frame has a large exposure change, or the change for correct exposure has the opposite sign and smaller magnitude than the previous change), the change is set to 0. This generates a "smooth overshoot" message in the log desc column
2) If the sign of the requested change has switched between frames, the total change is reduced by 1/2. This generates a "smooth sign switch" message.

I find this works very well for normal metering, but over and under exposure protection have a different problem: You can't know how much the exposure should change. If 1% of pixels are over exposed on a highlight, you might only need 1/16th of a stop to correct it, but if it's the sun, you might need 10 stops.

The amount of requested change is currently only controlled by what fraction of the threshold value is overexposed. This means that the same amount of exposure change (controlled by the max ev change setting) is used when the over exposure equals the threshold, regardless of whether the threshold is 0.1% or 10%.

It might make more sense to use smaller changes when the threshold is smaller, but because the change actually starts before the threshold is reached, you can get a similar effect just by using a higher threshold. In other words, if you set the threshold to 2%, the code will start reducing exposure some when only 1% is overexposed. The threshold actually only defines when it reaches the "max ev change" value.
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1242
Re: proposal - script shooting hooks
« Reply #155 on: 22 / May / 2015, 18:24:15 »
Quote
On D10, continuous mode shows the last image until the next one is shot

As I remember, it was the same, but I can check next time again.

Quote
but weather and celestial mechanics have not cooperated

I know, also days are really long right now.
The best condition for the moon are always at winter time….

Quote
I find this works very well for normal metering

Yes as I said before, I’m really happy with the script.

Quote
but over and under exposure protection have a different problem

Yes, I understand the problem.

So, I’m looking forward to get better weather und run the G1X until Tv=4s and ISO=1600.

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

  • *****
  • 1242
Re: proposal - script shooting hooks
« Reply #156 on: 23 / May / 2015, 06:53:35 »
Made just a small test with G1X, to see how continuous mode works.
I made 3 runs with each 20 pictures.
1) Single Mode with Interval of 0s.
2) Continuous mode with Interval of 0s.
3) Continuous mode with Interval of 4s.
Continuous mode on G1X is around 2 times faster (simular to S110).
 
Quote
On D10, continuous mode shows the last image until the next one is shot

It's the same on G1X...
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

  • ******
  • 14003
Re: proposal - script shooting hooks
« Reply #157 on: 23 / May / 2015, 21:05:00 »
Good to know you get a faster shooting rate in continuous mode on G1x. It would be interesting to know if you still still see the black point jump.

I took a closer look at the log from post 145

I think this flickering is caused by over exposure protection flapping. The jumps in "over_weight" (and hence final contribution to exposure) are relatively large, because the low precision of the histogram only gives 10 steps to the threshold and over_weight goes by x^2.

In the attached chart, you can see that over_weight starts to oscillate around shot 800 and gets bad by 900. Bv stays quite smooth, which suggests the exposure controls are working correctly.

You can see the low precision of over_weight earlier, but with the sun in the scene, the over exposed fraction doesn't change nearly as much for a given amount of exposure change, so it's less prone to flapping. At the end, a large part of the sky is nearly uniform, so a small change in exposure changes the over fraction by a much larger amount.

I think the current code should handle this better, since the histogram has much higher precision, but I'm not sure if it will fix it completely. I could make more of the over/under protection factors configurable, but the script already has too many options.

The first part of this run is a good illustration of how the weight system works. At the start, having the sun in the frame maxes out over_weight. This reduces exposure until the meter limits increase meter_weight enough to balance it out. The weights stay in balance until the meter area is above the meter low threshold.

Don't forget what the H stands for.


*

Offline c_joerg

  • *****
  • 1242
Re: proposal - script shooting hooks
« Reply #158 on: 24 / May / 2015, 09:30:06 »
I made a run with G1X. There is still a jump around sv96=603 (In the video around second 22). The rest of the run looks very good. This is the first run, where I see correct ISO values in the EXIF data. The run was made with r4153. Should this change still have an effect in continues mode?

http://youtu.be/LM67ACxPQbM

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

  • *****
  • 1242
Re: proposal - script shooting hooks
« Reply #159 on: 24 / May / 2015, 09:43:44 »
Quote
because the low precision of the histogram only gives 10 steps to the threshold and over_weight goes by x^2

Yes, I understand the problematic…

Quote
I think the current code should handle this better, since the histogram has much higher precision

Yes I think the same. I tried to write a script, with the old histogram. This script should hold overexposure at 1%. But with 1% resolution, it was not working good...


I analyzed the jpg picture by calculating an average of every picture. I don’t understand, why after sv96=603 the level on the pictures a still very high. There is not just a peak, which I analyzed from your log file data. Can this have something to do with the black point?

« Last Edit: 24 / May / 2015, 09:47:40 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

 

Related Topics