Highest Speed Motion-Detection (Lightning) Scripts - Completed and Working Scripts - CHDK Forum  

Highest Speed Motion-Detection (Lightning) Scripts

  • 17 Replies
  • 38720 Views
Highest Speed Motion-Detection (Lightning) Scripts
« on: 04 / February / 2008, 11:10:04 »
Advertisements
Deleted
« Last Edit: 22 / April / 2008, 10:37:49 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

*

Offline Pauls9

  • **
  • 60
  • S3 IS
Re: Highest Speed Motion-Detection Scripts
« Reply #1 on: 04 / February / 2008, 11:53:11 »
Thanks to all who've got us to this point. I've been thoroughly impressed by the ability to trigger on motion, but I've been scratching my head for months over how to speed it up.

*Raises a glass to the guys involved*

Re: Highest Speed Motion-Detection (Lightning) Scripts
« Reply #2 on: 05 / February / 2008, 10:24:19 »
Deleted
« Last Edit: 22 / April / 2008, 10:38:17 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Highest Speed Motion-Detection (Lightning) Scripts
« Reply #3 on: 05 / February / 2008, 12:52:03 »
(Does anyone see a simpler way to test for both variables in this loop without adding that extra if j then wend line? As that would add an extra 10ms lag when not using the "Fast Shoot" option.)

I believe quite an obvious way to get rid of the 10 ms lag would be to make the script longer, not simpler... by first testing for j and then choosing which one of two loops with md_detect_motion in them to run. One loop uses "fast shoot" and one shoot_full.


Re: Highest Speed Motion-Detection (Lightning) Scripts
« Reply #4 on: 05 / February / 2008, 13:12:52 »
Deleted
« Last Edit: 22 / April / 2008, 10:38:37 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Highest Speed Motion-Detection (Lightning) Scripts
« Reply #5 on: 05 / February / 2008, 15:18:02 »
Hmm... good plan. But why do I suspect that the longer a script is, the longer it will take to run? In the "old days", all BASIC programs had to be parsed from the beginning up to the loop or function needed each time it had to test for a new condition. So while even though the loop in use at the time might be smaller and run faster for that particular function, it takes longer for the software to run through the whole thing to find that loop each time. Granted, this isn't hitting the 10ms per line speed-limit, but the uBASIC speed itself, yes? No?

But then, come to think of it, once (or if) the internal shoot command becomes faster, then this will be done away with and whatever fastest method found will have a script just for that purpose.

Isn't it quite easy to test this? Take your MD Lightning script, make it a mile long by adding stuff that never gets run and compare the speed. I would guess that only goto statements get slowed down if stuff gets added before the line the goto points at, and even then not noticeably. Why would the interpreter need to scan through the entire program just to jump to next line?

And even then, the MD reaction time wouldn't slow down, just trigger delay.

Also, I would think that scanning for the goto target is done during the same keyboard interval and that it really shouldn't take a significant amount of time from a processor running at ...umm.. can't remember how fast it was :D, sub-1us instruction cycle anyway, quite a bit of code needed to reach 1 ms execution time.

But if you know it slows down, I'm obviously wrong :blink:

Re: Highest Speed Motion-Detection (Lightning) Scripts
« Reply #6 on: 05 / February / 2008, 16:55:12 »
Deleted
« Last Edit: 22 / April / 2008, 10:39:00 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

*

Offline rjoe

  • *
  • 9
  • Canon S3-IS
    • Archaeology Jobs and Archaeology Field Schools
Re: Highest Speed Motion-Detection (Lightning) Scripts
« Reply #7 on: 05 / February / 2008, 23:23:06 »

My mind is still thinking from the old 6502 1mHz processor days, where every line mattered.

:o What?  Why that is soo slow!  My TS1000 (ZX81) 3.24mHz screamed and it made me realize that bloatware was the way of the future!

Err... maybe it actually made me really respect how much one could cram in so few lines!  :-) 

Kind of funny how we have come so far to actually be back at the beginning again in many ways with these "computers with lenses" which are pretty slow computers in some ways!

On a more productive note:

While searching for settings for the Motion Detection Scripts I found that there are good suggestions, but widely scattered.  In an attempt to streamline some of the excellent results people are getting I set up a single Wiki page at

http://chdk.wikia.com/wiki/Motion_detection_settings#Motion_Detection_Settings

It is my hope that this page will serve as a repository for finalized help on settings.

Best,

R. Joe

My hat is off to the developers of CHDK and the community of script writers!  Thank you for making the tool I have wanted for my Canon from the start, but did not have the resources to create.


*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Highest Speed Motion-Detection (Lightning) Scripts
« Reply #8 on: 06 / February / 2008, 02:46:11 »
Regatding "goto" command: yes, the interpreter scans the entire program for a label. But it does this action in a single kbd interval. So, no extra delay here.

But do not forget that the shooting delay combines two delays:
1) md reaction time (30ms at the best case)
2) camera reaction time on shutter pressing (nobody knows this time, but it's non-zero and significant (there were discussions about the shutter lag in compact cameras).
So, the current 120ms total lag is not so bad.
CHDK Developer.

Re: Highest Speed Motion-Detection (Lightning) Scripts
« Reply #9 on: 06 / February / 2008, 03:24:32 »
Deleted
« Last Edit: 22 / April / 2008, 10:39:23 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal