MDFB2013 - updating the fastest CHDK motion detection script - page 8 - LUA Scripting - CHDK Forum  

MDFB2013 - updating the fastest CHDK motion detection script

  • 112 Replies
  • 33938 Views
Re: MDFB2013 - updating the fastest CHDK motion detection script
« Reply #70 on: 16 / March / 2015, 19:18:01 »
Advertisements
Thanks very much waterwingz!  :)
Script updated - use the link from the first post in this thread.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: MDFB2013 - updating the fastest CHDK motion detection script
« Reply #71 on: 03 / May / 2015, 00:28:05 »
 I'm haveing the same issue as  drillthrall did .   what did you  do turn that off?

Re: MDFB2013 - updating the fastest CHDK motion detection script
« Reply #72 on: 03 / May / 2015, 08:06:59 »
I'm haveing the same issue as  drillthrall did .   what did you  do turn that off?
I assume you mean this post :  http://chdk.setepontos.com/index.php?topic=10864.msg109910#msg109910 ?

If so, did you read the response to that post?  The next post in the thread?  I think you will find your answer there.

Hint :  If you are going to make reference to another post, it's helpful if you "quote"  that other post so that people who might be able to help know what you are referring to (and don't have to do looking for it).
Ported :   A1200    SD940   G10    Powershot N    G16

Re: MDFB2013 - updating the fastest CHDK motion detection script
« Reply #73 on: 10 / May / 2015, 04:53:49 »
I tried the naive implementation, adding shoot() to the inner until() loop in fast_md(). This works, but the total cycle time of that shot is about 4s. If I'm aiming for a 15s timelapse, that means there's only about a 70% chance of catching a motion event. Is there a different strategy that will reduce the cycle time of the shot?
The problem you are having is related using the shoot() command, which causes the camera to focus and set exposure.  However, in  the inner loop that has already been done by the press("shoot_half") statement so there is no need to do it twice.

Try this :

Code: [Select]
function fast_md()
    splash("Fast Reaction Photo MD")
    repeat 
            press("shoot_half")
            repeat sleep(10) until (get_shooting()==true)
            motion = detect_motion(e,f,1,9)
            if ( motion == 0 ) then
                 click("shoot_full_only")
            else                 
                 if (post_shot_delay> 0) then sleep(post_shot_delay) end
                 release("shoot_full")
            end
            release("shoot_half")
            repeat sleep(10) until (get_shooting()==false)
            wait_click(50)                         
    until not( is_key("no_key"))
end
Sorry - have not had time to test this myself. If it doesn't work, I'll take a look later this week when I have my development machine and cameras back.

Note : there was also a one second delay related to the need to turn the backlight off after every shot.  If we use the new set_lcd_display() command that is no longer needed.  We can look at that after we get the loop time down.


How would we go about saving that in file form? Thanks


Re: MDFB2013 - updating the fastest CHDK motion detection script
« Reply #74 on: 10 / May / 2015, 10:21:51 »
How would we go about saving that in file form? Thanks
Where it says   Code :  [Select] , just left click on the word Select.  Then cut the selected area (using a mouse right click).  Open the MDFB2013.lua script,  find the fast_md( ) function and pasting the stuff you just copied over it.

On the assumption you are going to struggle a bit with the instructions I just posted,  I have attached a copy of the script modified as per my earlier post.   I even tested it this time and found that it was not turning off the display, so I fixed that.

Note that you need to set  Reaction Mode [ Fast ] and if you want the display to stay off completely,  select Display Power Saving [ LCD ] ( and be sure the Canon shot review mode is set to OFF ).
« Last Edit: 10 / May / 2015, 10:30:57 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: MDFB2013 - updating the fastest CHDK motion detection script
« Reply #75 on: 13 / May / 2015, 23:48:48 »

Where it says   Code :  [Select] , just left click on the word Select.  Then cut the selected area (using a mouse right click).  Open the MDFB2013.lua script,  find the fast_md( ) function and pasting the stuff you just copied over it.

On the assumption you are going to struggle a bit with the instructions I just posted,  I have attached a copy of the script modified as per my earlier post.   I even tested it this time and found that it was not turning off the display, so I fixed that.

Note that you need to set  Reaction Mode [ Fast ] and if you want the display to stay off completely,  select Display Power Saving [ LCD ] ( and be sure the Canon shot review mode is set to OFF ).


Thanks.

Re: MDFB2013 - updating the fastest CHDK motion detection script
« Reply #76 on: 04 / June / 2015, 01:22:04 »

Where it says   Code :  [Select] , just left click on the word Select.  Then cut the selected area (using a mouse right click).  Open the MDFB2013.lua script,  find the fast_md( ) function and pasting the stuff you just copied over it.

On the assumption you are going to struggle a bit with the instructions I just posted,  I have attached a copy of the script modified as per my earlier post.   I even tested it this time and found that it was not turning off the display, so I fixed that.

Note that you need to set  Reaction Mode [ Fast ] and if you want the display to stay off completely,  select Display Power Saving [ LCD ] ( and be sure the Canon shot review mode is set to OFF ).


Thanks.
Guess I'm just stupied but no matter what I do I can't get it to work. I've even tried flashing a flashlight in front of it and nothing is working


Re: MDFB2013 - updating the fastest CHDK motion detection script
« Reply #77 on: 04 / June / 2015, 02:55:44 »

Where it says   Code :  [Select] , just left click on the word Select.  Then cut the selected area (using a mouse right click).  Open the MDFB2013.lua script,  find the fast_md( ) function and pasting the stuff you just copied over it.

On the assumption you are going to struggle a bit with the instructions I just posted,  I have attached a copy of the script modified as per my earlier post.   I even tested it this time and found that it was not turning off the display, so I fixed that.

Note that you need to set  Reaction Mode [ Fast ] and if you want the display to stay off completely,  select Display Power Saving [ LCD ] ( and be sure the Canon shot review mode is set to OFF ).


Thanks.
Guess I'm just stupied but no matter what I do I can't get it to work. I've even tried flashing a flashlight in front of it and nothing is working




Ok this is what I keep getting when I try and use that script.




 e preload  drawings  oono  file  A\CHDK\SCRIPTS\dra wing.lua'oono file  A\CH\DK\LUALIB/ drawings.luna'
**Terminated**


Re: MDFB2013 - updating the fastest CHDK motion detection script
« Reply #78 on: 04 / June / 2015, 04:52:41 »
ok so I got it to work   now so no worries.

*

Geezer

Re: MDFB2013 - updating the fastest CHDK motion detection script
« Reply #79 on: 02 / December / 2015, 12:50:00 »
Hey waterwingz,


I'm new here (just joined today) but I've been using your updated script for a few days now, and it is great!

There is one thing that I've experienced with it that I'm wondering if you (or anyone else) could confirm.

I'm using the script on an A590 and an SX110 and both exhibit the same results.

Under the "Masking" heading, It appears that the "mask columns right" and "mask rows top"  variables may be transposed.  In order to mask columns right, I have to change the "mask rows top" value and vise versa.

I'm sure I could fix it myself, if I knew what I was doing (but I don't)  :blink:

Thanks again for the great update to a fast script!

I know this this issue is kinda old but I had the same transpose issue with my A590.  At first I thought I forgot how to use the mask function even though I have been using it for five or more years.  Then I edited the script and fixed it.  I never tried to advise Walter because I was afraid I was doing something wrong.  I need a dose of self-confidence or something.

Thanks to Walter and everyone,
Terry

 

Related Topics