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

proposal - script shooting hooks

  • 290 Replies
  • 117875 Views
*

Offline reyalp

  • ******
  • 14118
Re: proposal - script shooting hooks
« Reply #280 on: 12 / November / 2015, 16:02:24 »
Advertisements
Which influence has ‘ui_ev_shift_e’ (Ev shift) in case of a scene which is controlled by overexposure?

I understand what happens on a scene without overexposure. When I set Ev shift to -1/2EV, meter96 goes to -48, which I expect.

But when I have an overexposed scene, may be overexposure is set to 1%, than ‘ui_ev_shift_e’ don’t have an influence or?
The ev shift shouldn't change the behavior, it just changes the target meter96 value.

The meter high and meter low thresh/limit values are relative to the shifted value, so if you have those enabled, ev shift will affect at what exposure level the meter and over/under balance.
Quote
After starting of analyzing the Data from my last trip, I’m thinking, I it would be helpful, to have two parameters for ‘ui_max_ev_change_e’. One for up and one for down. So on a overexposed scene, the algorithm could go faster down and slower up.
This would affect both meter and over exposure related changes, but meter would only be affected when scene change is > the max value, so maybe that's not a big deal. It might be better to just set the limits for over, under and meter separately.
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1251
Re: proposal - script shooting hooks
« Reply #281 on: 13 / November / 2015, 04:16:26 »
Hello reyalp,

Thanks for explanation.

There is another interesting stuff on the data on my last trip from G1x.

Most runs with G1x I made with 3s Interval and JPG + Canon RAW. On most runs, this is not a problem along the exposure time is short enough. I never had problems before. As you see on the run with timing OK, I had still more than 1s time.

But I have also two runs, where I had massive problems. Sometimes sleep is greater -4000ms and the Interval go near 8s.  Only a few shoots have 3s Interval. Max exposure time is less than 0.1s.

All runs where made with same SD Card with 64GByte and Class 10.
I don’t have logs off combinations, so where it runs for a while OK and then it made problems. 

Yesterday I tested G1x with this SD Card again.  No problems. Sleep always greater 1s. Write test in the Camera with CHDK says always > 14Mbytes/s.  I checked Card on a PC for 30 Minutes. Writing was always greater > 14Mbytes/s.

I removed the Card after each run and copied data to PC. Can it be a connection problem with the SD on the Cam?

Update:
The following short video shows, how it looks with a non-continuous interval

http://youtu.be/tUShxzAq0tA
« Last Edit: 14 / November / 2015, 07:20:26 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 c_joerg

  • *****
  • 1251
Re: proposal - script shooting hooks
« Reply #282 on: 18 / November / 2015, 03:58:29 »
After more than 20000 shoots from my last trip with rawopint,
here are a few suggestions for the adaptation of the default parameters:


Code: [Select]
#ui_meter_width_pct=90 "Meter width %" [1 100]
#ui_meter_height_pct=90 "Meter height %" [1 100]

I think on most scenes, this will give you a better result as the smaller spot window from 30%, especially if point to the wrong spot.

Code: [Select]
#ui_log_append=true "Append log"

It is always better, to delete parts in the log as to have no log for the run…

Code: [Select]
#ui_do_draw=false "Draw debug info"

Yes, I know, we talked about it before… but especially beginners get nervous with it…
 
Yes, I know, I can save parameter files, but sometime, when I changed too much, I go back to defaults…

Is it possible, to put comments in the parameter set?
Sometimes I copy them on a PC and modify them for different runs.
Like this parameter
Code: [Select]
ui_max_ev_change_e=3 "Max Ev change" {1/16 1/8 1/4 1/3 1/2 1}
It would be helpful, to see what is possible to set as a comment.


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: proposal - script shooting hooks
« Reply #283 on: 22 / November / 2015, 13:50:46 »
Hello reyalp,
it's time to say thank you once  :)
I read from your script at the German CHDK forum in which I am also too rarely :-(
Great. I've done some tests, unfortunately, do not understand even half of the parameters but I'm still impressed :-)
Very cool script. thx  :xmas

https://www.youtube.com/watch?v=dA3WJxi5EO4

h3px


*

Offline c_joerg

  • *****
  • 1251
Re: Help us get CHDK 1.4 ready for release
« Reply #284 on: 24 / November / 2015, 14:06:52 »
Quote
I run rawopint with the SX50. Normally I stop the script by pressing the Menu bottom. On all my other cams this works without any problems. On the SX50 I notice the following:
1) After pressing the Menu bottom, the cam shows no reaction for about 10-15s.
2) The cam makes on more picture.
3) Than another 10-15s without reaction after the script finished.
This only happens in continues mode. On Quick mode it works fine.

This is now also on my SX230 in continues mode with R4293.
I don’t notice that on my last trip with R4203.
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

  • ******
  • 14118
Re: Help us get CHDK 1.4 ready for release
« Reply #285 on: 25 / November / 2015, 15:33:21 »
Moved from release thread
Quote
I run rawopint with the SX50. Normally I stop the script by pressing the Menu bottom. On all my other cams this works without any problems. On the SX50 I notice the following:
1) After pressing the Menu bottom, the cam shows no reaction for about 10-15s.
2) The cam makes on more picture.
3) Than another 10-15s without reaction after the script finished.
This only happens in continues mode. On Quick mode it works fine.

This is now also on my SX230 in continues mode with R4293.
I don’t notice that on my last trip with R4203.
I suspect this is a bug I introduced in the latest version of the script (0.18). I haven't been able to reproduce it on my cameras, but it wouldn't be surprising the there was some variation due to timing and hook placement.

Please try adding

Quote
   hook_shoot.set(0)
   hook_raw.set(0)
just above "if yield_save_count then" around line 1700.

The camera may still take one additional shot after you press menu, but the delay should go away.
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1251
Re: proposal - script shooting hooks
« Reply #286 on: 26 / November / 2015, 12:13:40 »
Code: [Select]
hook_shoot.set(0)
hook_raw.set(0)

Yes, thanks, that’s it. It works as you say…

In the time before, I find out that this part of the end of the script made the delay.
When I delete it, the script works as well.

Code: [Select]
-- allow final shot to end before restore + possible shutdown
repeat sleep(10) until not get_shooting()
sleep(1000)
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

  • ******
  • 14118
Re: proposal - script shooting hooks
« Reply #287 on: 26 / November / 2015, 14:21:46 »
Code: [Select]
-- allow final shot to end before restore + possible shutdown
repeat sleep(10) until not get_shooting()
sleep(1000)
Right. The reason I added this code is because the restore() at the and will reset some settings like raw enable, image size etc to what they were before the script started. In the old version of the script, this reset could happen before the final shot was finished, and so would use the restored settings.

The extra delay was caused by the hooks still being set, so if the shooting process reached a hook after the menu click was detected (probably timing and port specific) get_shooting() wouldn't go false until the hook timed out.
Don't forget what the H stands for.


*

Offline c_joerg

  • *****
  • 1251
Re: proposal - script shooting hooks
« Reply #288 on: 03 / December / 2015, 05:05:42 »
I made more analyzing of the data from my last trip.

I found one more run from G1x with massive timing problems. I checked the SD Card again. I had no problems with the card on an interval from 2s at home (JPG + Canon RAW). On this run now, the interval was set to 3s but sometime it goes close to 6s. This can be really good seen in the not continuous moving of the ship. It might be helpful to have a warning (LED or focus light on or a noise?), when sleep goes to negative values.

Another think of this run is that it has much more flicker as the other runs. I’m really sure that comes from the waves in front of the video. The meter window was set to 90%/90% so the waves are full in. In cases like this, it would be not good to use the full picture for measure.

I’m thinking loud:
I’m not sure if an auto window size could be helpful for most situations.
Instead the meter_width and meter_height only a parameter like:
Spot_Window (30%/30%), Full_Window (90%/9%), Sky, Ground
How does it work to detect the Sky or Ground?
1) Using the pre shoot and dividing the full picture into a number of equal rows (may be 12).
2) Calculating a meter value of each row.
3) Calculating a mean (or median) value from all meter values.
4) Looking, which rows are above or under the mean value.
5) Combining all rows which are above or under the mean value to one widow for the following shoots.

http://youtu.be/RWvEtKy2qY4

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

  • ******
  • 14118
Re: proposal - script shooting hooks
« Reply #289 on: 04 / December / 2015, 16:12:31 »
I found one more run from G1x with massive timing problems. I checked the SD Card again. I had no problems with the card on an interval from 2s at home (JPG + Canon RAW). On this run now, the interval was set to 3s but sometime it goes close to 6s.
Unfortunately, without being able to reliably reproduce this, I'm not sure there's much I can do. It's still good to post, the data may become valuable later.

There are some general scenarios that come to mind:
1) As discussed before SD cards firmware is optimized for specific usage patterns, which is probably quite different from what happens under the script. Even though a card can do 14mb/s sustained writes, it's possible the actual usage pattern triggers some pathological behavior in the SD card.
2) The whole "shooting hook" principle used by the script relies on blocking the normal firmware execution deep in the shooting process, in ways the firmware designers would not expect. It seems to work, but weird side effects would not be a surprise. I suspect the shutter issues I see on D10 are an example of this, but I'm still not certain.

Some ideas of things that might have some impact
1) The interval. Maybe if the interval is short the Canon or SD card firmware sometimes gets "behind" and can never catch up.
2) Continuous mode on / off.
3) CHDK raw vs Canon raw vs jpeg only.
4) Log file writing. This is tricky, because if you disabled the log completely, it would be difficult to measure the real behavior. The log could be done entirely to RAM and written at the end, but this would require a lot of RAM for long runs. It would be possible to come up with more compact log format that just had the timing information.
5) The raw hook sleep / disable script yield settings.

It might also be possible narrow down where the delays occur, but this would probably require adding code to the CHDK core.

Quote
This can be really good seen in the not continuous moving of the ship. It might be helpful to have a warning (LED or focus light on or a noise?), when sleep goes to negative values.
This is a good idea, I'll look into to adding it for the next version.
Quote
Another think of this run is that it has much more flicker as the other runs. I’m really sure that comes from the waves in front of the video. The meter window was set to 90%/90% so the waves are full in. In cases like this, it would be not good to use the full picture for measure.

I’m thinking loud:
I’m not sure if an auto window size could be helpful for most situations.
Instead the meter_width and meter_height only a parameter like:
Spot_Window (30%/30%), Full_Window (90%/9%), Sky, Ground
How does it work to detect the Sky or Ground?
1) Using the pre shoot and dividing the full picture into a number of equal rows (may be 12).
2) Calculating a meter value of each row.
3) Calculating a mean (or median) value from all meter values.
4) Looking, which rows are above or under the mean value.
5) Combining all rows which are above or under the mean value to one widow for the following shoots.
I have intended to make the meter position adjustable, and possible add the ability to have multiple meter areas with different priorities. However, this makes both the configuration and final behavior even more complex. One idea I've toyed with is having a scripted GUI for configuration, but this would be a lot of work.

Now that 1.4 is released, I hope to spend some more time on the script.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal