No Motion-Detection Help Request (oddity) - Script Writing - CHDK Forum

No Motion-Detection Help Request (oddity)

  • 6 Replies
  • 6336 Views
No Motion-Detection Help Request (oddity)
« on: 11 / February / 2008, 03:02:02 »
Advertisements
Deleted
« Last Edit: 22 / April / 2008, 11:36:21 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

Re: No Motion-Detection Help Request (oddity)
« Reply #1 on: 11 / February / 2008, 03:40:57 »
Deleted
« Last Edit: 22 / April / 2008, 11:36:38 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

Re: No Motion-Detection Help Request (oddity)
« Reply #2 on: 11 / February / 2008, 04:30:13 »
Deleted
« Last Edit: 22 / April / 2008, 11:37: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

Re: No Motion-Detection Help Request (oddity)
« Reply #3 on: 11 / February / 2008, 04:45:14 »
Deleted
« Last Edit: 22 / April / 2008, 11:37:18 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 mx3

  • ****
  • 372
Re: No Motion-Detection Help Request (oddity)
« Reply #4 on: 11 / February / 2008, 04:53:10 »
I would suggest you to keep original comments (accounting the fact that lines count does not affect execution speed).
Code: [Select]
rem              /--/-columns, rows to split picture into
rem              |  |
rem              |  |  measure mode (YUV) - U-0, Y-1, V-2
rem              |  |  |                     
rem              |  |  |    timeout
rem              |  |  |    |    comparison interval (msec)
rem              |  |  |    |    |   threshold ( difference in cell to trigger detection)
rem              |  |  |    |    |   |  draw_grid (0-no, 1-yes)
rem              |  |  |    |    |   |  |  return variable. number of cells with motion detected
rem              |  |  |    |    |   |  |  |
rem              |  |  |    |    |   |  |  |  VVVVVV  OPTIONAL PARAMETERS: VVVV
rem              |  |  |    |    |   |  |  |
rem              |  |  |    |    |   |  |  |  region masking type: 0-no regions, 1-include,  2-exclude
rem              |  |  |    |    |   |  |  |  |  region first column
rem              |  |  |    |    |   |  |  |  |  |  region first row
rem              |  |  |    |    |   |  |  |  |  |  |   region last column
rem              |  |  |    |    |   |  |  |  |  |  |   |    region last row
rem              |  |  |    |    |   |  |  |  |  |  |   |    |   parameters- 1-make immediate shoot, 2-log debug information into file. OR-ed values are accepted
rem              |  |  |    |    |   |  |  |  |  |  |   |    |   |  pixels to skip - for speedup purposes
rem              |  |  |    |    |   |  |  |  |  |  |   |    |   |  |  number of milliseconds to wait before begin triggering - can be useful for calibration with "draw_grid"
rem              |  |  |    |    |   |  |  |  |  |  |   |    |   |  |  |

because  it is hard to understand what is going on.
I hate single-letter variable names...

I have not analyzed your script.

Also I would suggest you not to make universal script (motion/no motion).
tasks are different and can require different parameters.
Why complicate things?
skype: max_dtc. ICQ: 125985663, email: win.drivers(at)gmail, eVB decompiler

Re: No Motion-Detection Help Request (oddity)
« Reply #5 on: 11 / February / 2008, 05:04:00 »
Deleted
« Last Edit: 22 / April / 2008, 11:37:38 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

Re: No Motion-Detection Help Request (oddity)
« Reply #6 on: 11 / February / 2008, 07:14:21 »
To detect `no motion' just use
Code: [Select]
md_detect_motion a, b, h, n, d, c, 1, t, i, j+1, l+1, a-k, b-m, 0, f, e
 if t>0 then click "shoot_full"
 it t=0 then print "No motion detected last";n/1000,"s"
or something along those lines.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal