Timelapse with variable shutter speed - page 9 - Completed and Working Scripts - CHDK Forum

Timelapse with variable shutter speed

  • 151 Replies
  • 89766 Views
*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: Timelapse with variable shutter speed
« Reply #80 on: 20 / May / 2008, 17:37:15 »
Advertisements
fpfalangie, maybe I have found a workaorund to your bug...

In the script you used, insert a "SLEEP 100" between set_sv96 and set_tv96_direct, i.e change
Code: [Select]
sleep 100
set_sv96 Y
set_tv96_direct X
sleep 100

into
Code: [Select]
sleep 100
set_sv96 Y
sleep 100
set_tv96_direct X
sleep 100
« Last Edit: 20 / May / 2008, 17:41:12 by fbonomi »

*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
Re: Timelapse with variable shutter speed
« Reply #81 on: 21 / May / 2008, 11:43:20 »
I'll add this to my build, if you have nothing against it. I'd like to do a couple of changes, though: change the command name to get_exp_info (or get_histo_info or get_histo_range) and use the [x=]get_... syntax

*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: Timelapse with variable shutter speed
« Reply #82 on: 21 / May / 2008, 11:58:34 »
Jucifer, I DON'T KNOW!

It's not yet ready for a "delivery" build, but most of all it is quite obtrusive to the standard working of the camera:
1) building the histogram takes quite some time, and slows the camera after shooting
2) saving the histogram data files clutters the folder

Even myself, I am using two cards: a standard one with this feature (just for night-time lapses) and a normal one for all the rest.

So at least you should add an option in the menus to enable/disable this feature. You are probably better than me at this, I have never studied the menu and configuration system.

I would also like to activate the "spot metering feature", but that's really secondary (minor feature that can be added later)

*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: Timelapse with variable shutter speed
« Reply #83 on: 21 / May / 2008, 12:00:07 »
and you are absolutely right about the function name, it should be something like get_histo_range().
The other names were a leftover from test I was doing..


*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: Timelapse with variable shutter speed
« Reply #84 on: 21 / May / 2008, 14:16:39 »
Thinking about it, what I said:
Quote
So at least you should add an option in the menus to enable/disable this feature. You are probably better than me at this, I have never studied the menu and configuration system.

is silly. It's much better to have an uBasic command that enables/disalbes this feature.

I will implement it and pass it to you.

Otherwise, where are the sources to your build?

I can integrate it there and pass you the diff

*

Offline Aged

  • *
  • 39
Re: Timelapse with variable shutter speed
« Reply #85 on: 21 / May / 2008, 15:47:34 »
This suggestion for smoothing is a modification of the BoxCar average (moving average) technique.

Boxcar (American locomotive ?)- Idea, obtain total weight of N carriages then add the weight of the N+1 and subtract the weight of the first. -> add N+2 subtract 2, etc This average smooths both increasing and decreasing carriage weights.

Suggested modification
Subtract the average instead of the first one. This saves remembering each value

Application (larger N gives more smoothing. Say N=4)
 initialize    Let sum of 4 get_tv values = T
Use
  Ave = T/4 (strictly T1/4 and ignore remainder)
 T2 = T1 + get_tv - Ave, where T1 is the existing T value and T2 will be its replacement.

*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: Timelapse with variable shutter speed
« Reply #86 on: 22 / May / 2008, 01:45:42 »
Aged, I didn't know this tweak, it might be interesting because of the smoothing it introduces and of its simplicity (coding a FIFO buffer without arrays is .... yuk!)

*

Offline Aged

  • *
  • 39
Re: Timelapse with variable shutter speed
« Reply #87 on: 22 / May / 2008, 02:56:45 »
fbonomi
 SMA - Simple Moving Average
Ref: [url]http://en.wikipedia.org/wiki/Moving_average[/url]
Often used for smoothing stock market trends.



*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: Timelapse with variable shutter speed
« Reply #88 on: 22 / May / 2008, 03:55:00 »
Yes, that I know :-)

All those are implementatinos that require a FIFO buffer, and in effects what I implemented is a almost-exponential movign average.

The tweak I have not experimented is subtracting the average instead of subtracting the "exiting" element.

There are some problems, anyway:
1) I think it introduces a "drifting" effect
2) It makes weighing impossible


*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
Re: Timelapse with variable shutter speed
« Reply #89 on: 22 / May / 2008, 09:29:42 »
It's much better to have an uBasic command that enables/disalbes this feature.
How about this:

core/raw.c, raw_savefile():
if (state_kbd_script_run && shot_histogram_enabled) build_shot_histogram;
(or something similar)

core/kbd.c, script_start():
shot_histogram_enabled = 0;

and of course a uBASIC command to set shot_histogram_enabled.

(Already working on these...)

Quote
Otherwise, where are the sources to your build?
Now I've been asked this twice in two days. :]
Only patches, "official" ones attached to the first post on my thread.

 

Related Topics