Motion detection for focal animal research - scripts and camera suggestions? - page 2 - General Discussion and Assistance - CHDK Forum  

Motion detection for focal animal research - scripts and camera suggestions?

  • 28 Replies
  • 10866 Views
Advertisements
Wonder if something similar to http://chdk.wikia.com/wiki/Ultimate_Intervalometer is available for motion detection?
Not that I'm aware of, but the code could be a useful starting point.
You can just replace line 568 in that script [where it says  shoot()]  with a call to md_detect_motion( ) if you select the parameters passed to that function correctly.

Let me know if you need any help with that?
Ported :   A1200    SD940   G10    Powershot N    G16

Quote
You can just replace line 568 in that script [where it says  shoot()]  with a call to md_detect_motion( ) if you select the parameters passed to that function correctly.

I think that my question "Wonder if something similar to http://chdk.wikia.com/wiki/Ultimate_Intervalometer is available for motion detection?" was a bit deficient. To be more specific, I just wonder if it is possible to design a motion detection to run for week or months at a time, similar to Ultimate Intervalometer in terms of running the camera on as little power as possible, to provide some visual clue that the script is still running, and to periodically restart the camera as neither CHDK or the Canon firmware was designed to continuously run for long duration.

If replacing shoot()  with a call to md_detect_motion( ) it will only activate md_detect_motion at intervals?

If replacing shoot()  with a call to md_detect_motion( ) it will only activate md_detect_motion at intervals?
True.  But you could make that interval something like 1 second  8).   And after each motion shot, the intervalometer would "detect' that it was behind and immediately activate the next motion detection call.

There are actually a couple of other small tweaks I would add to the script if that worked for you.
Ported :   A1200    SD940   G10    Powershot N    G16

Quote
There are actually a couple of other small tweaks I would add to the script if that worked for you.

I will be happy to try  :) I have G9, A2200 and sx500is which I could test it on.


I will be happy to try  :) I have G9, A2200 and sx500is which I could test it on.
Here you go :  ultraMD.lua

All the same settings as the ultimate intervalometer except for replacing the shot interval with motion detection.

It's had 15 minutes of testing so I'll be interested to hear what you find.   Not willing to invest more time at this point - I've posted too many scripts customized on request and had no feedback.  So further work is on a "quid pro quo" basis.
Ported :   A1200    SD940   G10    Powershot N    G16

Thanks!
Quote
It's had 15 minutes of testing so I'll be interested to hear what you find.
I will indeed test it thoroughly, I will have time by the end of next week. Looking forward to test it.

Regards,
Kes

Hi,

I spent the weekend testing the script. I make it running, but it doesn't start after the reboot or after the defined end/start. Although, I haven't checked if it is the reboot or the end/start that is the problem.

I have set "autostart" to ON, is there other general setting I should be aware of to make this script running w/reboot?

Regards,
Kes

I spent the weekend testing the script. I make it running, but it doesn't start after the reboot or after the defined end/start. Although, I haven't checked if it is the reboot or the end/start that is the problem.
There is a big difference between what happens during a reboot and what happens when switching from day to night mode.  Can you be more specific here about what you are seeing?  Does it shut down for the reboot but then fails to restart?  Or does the camera restart but the script does not start running again? 

It would help if you enabled logging and posted the resulting log file here.

Quote
I have set "autostart" to ON, is there other general setting I should be aware of to make this script running w/reboot?
You don't need to set "autostart" - the script does that automatically for you just before it shuts down.
Ported :   A1200    SD940   G10    Powershot N    G16


Quote
It would help if you enabled logging and posted the resulting log file here.

Have I located the right log file? It doesn't have much information.
E:\CHDK\LOGS ->
*** INTERRUPTED ***
*** FINISHED ***

I set the script to run between 5 to 22 with a reboot at 1 every second day. But it seems to stop at 22, first by stopping shooting and then the lens retract and I think the led light turned off.

When being active it takes pictures as intended.

Have I located the right log file?
I don't think so. 

What you are looking for is called  ultraMD.log  and it should be located in the root directory of your SD card. 

ALso, the last parameter setting in the script menu says simply ""Logging".   By default it is set to "Both", which gives you a rolling log on the CHDK console "on screen" display and a copy of that log stored in the ultraMD.log file.   Make sure yours is set to "Both"?


Quote
I set the script to run between 5 to 22 with a reboot at 1 every second day. But it seems to stop at 22, first by stopping shooting and then the lens retract and I think the led light turned off.  When being active it takes pictures as intended.
That sound like exactly what I would expect it to do.  Put itself in a "low power" mode at night when it is supposed to be dormant.   If you press the MENU button when it is in that mode it should come back to life, halt script operation, and clean up after itself.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics