Which MD scripts are the best for lightning? - page 3 - Script Writing - CHDK Forum supplierdeeply

Which MD scripts are the best for lightning?

  • 26 Replies
  • 9984 Views
Re: Which MD scripts are the best for lightning?
« Reply #20 on: 21 / August / 2008, 14:38:33 »
Advertisements
@Fudgey

I havn't yet tested your changes according your last post, but I repeated my quick and dirty test with grids and masks.

6x4 grid, no mask: 80,200,80,60,120,100,80,220,80,120,80,80,100,80 msec
average 106 msec

6x4 grid mask 2 cells: 140,180,120,240,220,100,80,140,100 msec
average 147 msec

1x1 grid no mask: 100,100,80,80,100,100,260,120,100,80,120,100,80 msec
average 109 msec

All shoots with mode M and MF (Safety-MF disabled); threshold=10 and compare interval=5msec, pixel step=6.
I don't know how exactly my Notebook reproduces the MD_Test2.exe screen.

Again, masking produces the worst result for me (for my SX100IS) - any idea?

What's the range of reaction time with your tests?

What does the PARAMETER value "11" mean (instead of 9)?

Thanks
Dieter


*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Which MD scripts are the best for lightning?
« Reply #21 on: 21 / August / 2008, 15:07:47 »
Again, masking produces the worst result for me (for my SX100IS) - any idea?

What's the range of reaction time with your tests?

The only thing I can think of is that your setup may not be sensitive enough. I.e. when the test program flashes, only some of the cells actually cause a detection. And when you reduce the number of cells, you reduce the probability of an immediate detection. If I'm not mistaken, md_detect_motion return value should be equal to the number of active cells in your test setup if all cells are really active and sensitive enough. If it returns a smaller value, what I said may be the cause. But note that I haven't dug deep enough in the MD code to see if it really evaluates all cells...

I haven't done any reaction time tests with these, just took a quick look at MD debug output (which is still sitting firmly inside the camera). I guess I'll have to try it out with masks later, but I won't be able to do that this week.

What does the PARAMETER value "11" mean (instead of 9)?
It turns on debug output at timeout. See the "PARAMETERS" argument (n) documentation in the Wiki:
UBASIC/TutorialScratchpad - CHDK Wiki

*

Offline Anaglyphic

  • ***
  • 129
  • Anaglyphic lives!
Re: Which MD scripts are the best for lightning?
« Reply #22 on: 22 / August / 2008, 02:01:36 »
Wow, thanks for the late night reading... good stuff as always!

Quote from: fudgey
.... it surprises me is that a pixel step of 4 (no masks) resulted in the optimal 10 ms compare interval.

Right? 4-6 has always been my most responsive when using an "open grid", since this MDFB  stuff started. So when's vitaly gonna pop up with an overclock mod? :P

Another thing I'd love to verify; we know on certain cameras the Live View is a helluva lot faster than others; the SX100 and S5 seem midrange, but that 870 3" screen monster seems lightning fast and realtime in your hand, panning around, I wonder if they got a faster processor or somehow more ticks dedicated to viewfinder updating? (whereas the top-of-the-line of last year's model, the 12MP titanium body 950, seems to lag as bad as the new 450 dSLR... a 1/4s behind is not "Live"!) It would be good to know, as far as viewfinder data collection goes.

I love how random "help me!" threads always end up turning into some serious discussion around here. Lots of work to keep up with the data!

Gonna run a huge grid at pixel step 0 on an SX100, all masked but a single center zone...  and see what that debug file shows. Would be great if we could get something smaller than the Spot Metering space, uber sensitive and ~95ms repeatably responsive... machine vision with pocket cameras! I have access to a web feed press, would be damn impressive to use a camera as a run counter.

Quote from: chiptune
How many second shoots did you got with a single lightning?

Were they worth for shooting, or only the first were the best?

This only matters with fast shutter captures. With ~1s you catch them in a "stack". But sadly the secondary are missed in fast capturing, because the script reset time is long, and it varies. With NR off, RAW off, and everything set to manual, it can still take over a second to be ready to capture again. Same with the repeatability; while it's better than it was, it is far from stable as tolerances go. Sometimes it triggers late, but those end up looking great too, because the little "starter" connection bolt establishes the path, then the BIG bolt hits, just as the camera fires. Like the one in this thread - look closely at the bolt - it's in the process of connecting from the ground up and the sky down, meets in the middle where that ball is, about 400' off the ground. (there's nothing there in the city, if you saw a daytime shot of the same view, it's just air. Pure luck to catch that, regardless of CHDK.)

I thought it was the SDHC card. But as you've probably know / found out, any Class 6 card can outrun the SX100. Transcend has this "200x" SDHC 16G card made for HD camcorders, and it can definitely write well beyond 6M/sec (more like 24M/sec) but it's got no bearing on the SX100's speed, RAW or otherwise. I swapped it out with a $50 AData 16G Class 6 and am using the speed demon as a bootable live linux on a keychain-sized reader. I guess it's just a weak processor or very unoptimized code. I mean, this is hacking. If we had their dev environment... anyone into corporate espionage?

Also chiptune, re: MDFB, I'd be happy to benchmark, this stuff matters to me. Could / Do you want to make a wikia account and manage the "MD speed results" page? Type up a standardized way of testing, explain how to turn on debug mode parameters and submit the results? (you don't have to accumulate the results, that's what wikis are for, just get it formatted so others can pop in data)

Q: Where is the source for the MD speed test app that goes with the CHDK script? Windows binaries under wine for something timing sensitive doesn't seem like a good idea, but I guess I could give it a shot before I assume it won't work correctly...

-=-=-=-=-
off-topic: //rant_on - If someone knows Barney in real life, kick him in the nuts for me. He really trashed this place and is frustrating my research. Dunno why acseven leaves those deleted posts inline. Restore from a backup and DARE him to sue. Nice guy and I know the back story, but none of that matters now, and I'm really angry at him. Not that he cares.  >:(  Hell, for all I know, "fudgey" is BF back and calm... err, calmER. - //rant_off
Since we cannot know all that there is to be known about anything,
 we ought to know a little about everything.
-- Blaise Pascal

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Which MD scripts are the best for lightning?
« Reply #23 on: 22 / August / 2008, 03:20:06 »
Gonna run a huge grid at pixel step 0 on an SX100, all masked but a single center zone...  and see what that debug file shows. Would be great if we could get something smaller than the Spot Metering space, uber sensitive and ~95ms

I did that on a570is, was able to run two cells from a 6x4 grid without skipping a tick but three cells was too much.

This only matters with fast shutter captures. With ~1s you catch them in a "stack". But sadly the secondary are missed in fast capturing, because the script reset time is long, and it varies. With NR off, RAW off, and everything set to manual, it

Use continuous shooting mode for a second or two?

>:(  Hell, for all I know, "fudgey" is BF back and calm... err, calmER. - //rant_off

Lol not quite.


Re: Which MD scripts are the best for lightning?
« Reply #24 on: 23 / August / 2008, 12:28:23 »
@Anaglyphic

Thanks - as I supposed - there is to less time for the second shoot on the same bolt.
Therefore the script hasn't to hurry for the next shoot, so Raw-shooting is no issue.

Btw. your posted shoot is really amazing  :D :D :D

@fudgey

Thanks for the hint for lower threshold.

So I felt adjusting the treshold value is a little uncomfortable for me and I wrote a subroutine like this:

Code: [Select]
:treshold_adj
print "MD Treshold adjustment   "
P=0
N=0
f=0
:treshold_loop
h=0
sleep 1000
md_detect_motion a, b, c, 1000, e, f, 1, h, i, j, k, l, m, 0, o, p
if h>0 then
f=f+1
N=N+1
P=0
print "Treshold/Trigger", f-1, "/", N
endif
if h=0 then
P=P+1
endif
if P>5 then goto "AdjComplete"
goto "treshold_loop"
:AdjComplete
f=f+1
print "Up >   restart adjustment"
print "Down > continue"
:again
wait_click 0
if is_key "up" then goto "treshold_adj"
if is_key "down" then return
goto "again"

The subroutine is called like mode "test" ...
The treshold starts with 0 and will be increased for any motion detection. After 6 timeouts without any detections, the script is waiting for the keyboard. "Down" continues to normal MD (also adding a reserve on the treshold value) - "Up" restarts the treshold adjustment (if there was any    disturbance).

A quick and dirty test is showing much less jitter, as before.

I also made copies of your script, each for fast_MD, slow_MD, fast_video and slow_video, to define particular presets.

My question about PARAMETER 9 / 11 ...
I didn't understand the expression "OR-ed" in the tutorial - but now I think its acting like a binary OR.

Thanks
Dieter

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Which MD scripts are the best for lightning?
« Reply #25 on: 23 / August / 2008, 12:34:52 »
My question about PARAMETER 9 / 11 ...
I didn't understand the expression "OR-ed" in the tutorial - but now I think its acting like a binary OR.

Yes it's a binary OR.

*

Offline GAJoe

  • *
  • 15
Re: Which MD scripts are the best for lightning?
« Reply #26 on: 16 / May / 2010, 16:55:32 »
You guys are just amazing.  :-[
Joe
« Last Edit: 18 / May / 2010, 20:21:33 by GAJoe »

 

Related Topics