Author Topic: Motion detection to capture birds  (Read 1344 times)

Offline CanonBlue

  • Full Member
  • ***
  • Posts: 145
    • My Flickr Page
Motion detection to capture birds
« on: 28 / May / 2009, 00:36:54 »
  • Publish
  • I have a Powershot SD1100, and I'm using the Motion Detection script found here: http://chdk.setepontos.com/index.php/topic,471.msg21328.html#msg21328

    I'm trying this for the first time. I put some bread out on the outside of the windowsill and I've got the camera aimed at it. A crow keeps coming back to get bread, but each time the photo is taken while he's just barely in the air (and its all fuzzy)-- I can't get any shots of him actually sitting there eating bread. I'm not sure what to do about this-- is there a way to make it take the photos in quicker succession? I also tried changing the trigger delay time in the script settings but I can't tell if its doing anything. I turned off the photo review, and I have it set on Kids and Pets mode with no flash.

    Any advice? Thanks!
    My Flickr Page
    I use the chdk on my SX230 and SD1100 cameras, and I installed them using a Macbook, currently running 10.6.8.

    Offline CanonBlue

    • Full Member
    • ***
    • Posts: 145
      • My Flickr Page
    Re: Motion detection to capture birds
    « Reply #1 on: 28 / May / 2009, 22:58:15 »
  • Publish
  • I've figured out a solution-- I put it in the custom timer mode and set it to take five photos every time the motion detector goes off. It worked pretty well -- you can see some photos I got of a crow here if you want.

    Question-- is there a way to make the motion detector set it off recording video instead of taking photos?
    My Flickr Page
    I use the chdk on my SX230 and SD1100 cameras, and I installed them using a Macbook, currently running 10.6.8.

    Offline fudgey

    • Global Moderator
    • Guru Member
    • *****
    • Posts: 1695
    • a570is
    Re: Motion detection to capture birds
    « Reply #2 on: 29 / May / 2009, 02:28:18 »
  • Publish
  • Question-- is there a way to make the motion detector set it off recording video instead of taking photos?

    Yes. Read the documentation (*.txt) that came with the script.

    Offline CanonBlue

    • Full Member
    • ***
    • Posts: 145
      • My Flickr Page
    Re: Motion detection to capture birds
    « Reply #3 on: 29 / May / 2009, 16:34:49 »
  • Publish
  • Thanks-- somehow I missed that. I just read through it and tried to use the motion detection in video mode, and it didn't work. I set the video/burst/review time to 10 seconds, and it worked for review and for continuous shooting burst, but when I put the camera in video mode and tried to run the script nothing happened.

    I'm not sure if I'm doing something wrong, but I also noticed that the documentation says there is a slightly different script for different cameras depending on whether or not they have a video button. How do I tell if I have the right version? My camera is an SD 1100IS, and it has a slider to go into video mode, so I guess that means no video button.
    My Flickr Page
    I use the chdk on my SX230 and SD1100 cameras, and I installed them using a Macbook, currently running 10.6.8.

    Offline fudgey

    • Global Moderator
    • Guru Member
    • *****
    • Posts: 1695
    • a570is
    Re: Motion detection to capture birds
    « Reply #4 on: 29 / May / 2009, 21:21:08 »
  • Publish
  • I'm not sure if I'm doing something wrong, but I also noticed that the documentation says there is a slightly different script for different cameras depending on whether or not they have a video button. How do I tell if I have the right version? My camera is an SD 1100IS, and it has a slider to go into video mode, so I guess that means no video button.

    Your camera is one without a video button. If you try the other one the script starts out by warning that you've made the wrong choice.

    When you start the script while your camera is in video mode, the script should print either "Fast react video MD" or "Slow react video MD". If it doesn't, something is wrong -- possibly with CHDK port of your camera not reporting correct modes.

    If it draws the MD matrix but fails to trigger, this maybe related to my problem one the a570 with only some cells being active in video mode MD, only more severe... maybe video mode could use the display buffers differently somehow?

    If it doesn't draw a matrix, this is probably something completely different that's wrong and I don't have a clue what it could be.

    Anyway, try changing the "Shoot fast/slow/test" parameter (all values 0,1,2).

    Offline CanonBlue

    • Full Member
    • ***
    • Posts: 145
      • My Flickr Page
    Re: Motion detection to capture birds
    « Reply #5 on: 29 / May / 2009, 21:38:44 »
  • Publish
  • Thanks, yeah I guess I chose the right script for my camera back when I downloaded it. I tried changing the fast/slow/test parameter and it didn't help.

    I watched more closely this time and what happens is if I put the camera in video mode and press the shutter button, it starts to say something like "script started" and then it says some sort of error, but it goes by so quickly that I can't read it. I just did it about 5 times and all I could catch was the word "error". I do not get a matrix on the screen or anything.

    Is there a way I can make that text slow down so I can read the error?
    My Flickr Page
    I use the chdk on my SX230 and SD1100 cameras, and I installed them using a Macbook, currently running 10.6.8.

    Offline fudgey

    • Global Moderator
    • Guru Member
    • *****
    • Posts: 1695
    • a570is
    Re: Motion detection to capture birds
    « Reply #6 on: 29 / May / 2009, 21:42:50 »
  • Publish
  • I watched more closely this time and what happens is if I put the camera in video mode and press the shutter button, it starts to say something like "script started" and then it says some sort of error, but it goes by so quickly that I can't read it. I just did it about 5 times and all I could catch was the word "error". I do not get a matrix on the screen or anything.

    Is there a way I can make that text slow down so I can read the error?

    Which CHDK version are you using? Try the latest autobuild you aren't using that one.

    Offline CanonBlue

    • Full Member
    • ***
    • Posts: 145
      • My Flickr Page
    Re: Motion detection to capture birds
    « Reply #7 on: 29 / May / 2009, 21:43:36 »
  • Publish
  • I only downloaded it a couple weeks ago, so I think its the latest version.
    My Flickr Page
    I use the chdk on my SX230 and SD1100 cameras, and I installed them using a Macbook, currently running 10.6.8.

    Offline CanonBlue

    • Full Member
    • ***
    • Posts: 145
      • My Flickr Page
    Re: Motion detection to capture birds
    « Reply #8 on: 30 / May / 2009, 15:13:55 »
  • Publish
  • This one came out especially well: IMG_7449

    By the way, maybe this help question belongs at flickr, but I'm not sure if its an issue with flickr or with bulletin board code. I just tried to post that photo here using flickr's linking code, and it didn't work-- it kept changing the url to page not found. I'm not sure why-- its a public photo. Does anyone know how to post a flickr photo here (that links back to flickr, as per their rules)?

    Still can't get video to work or read the video error message. Where's the best place to post about problems with that script?

    Edit: i've been trying to read the video error message. I can't catch the word luminence, which I think it always starts with, and then ERROR and I think the word mode? Its really impossible to read most of it. I've tried changing around various settings like the slow/fast/test parameter, and putting the camera in different video modes first, but no changes. I'd really like to get it working... Any ideas on what else I can try?
    « Last Edit: 30 / May / 2009, 16:42:56 by CanonBlue »
    My Flickr Page
    I use the chdk on my SX230 and SD1100 cameras, and I installed them using a Macbook, currently running 10.6.8.

    CHDK Forum

    Re: Motion detection to capture birds
    « Reply #8 on: 30 / May / 2009, 15:13:55 »

    Offline fudgey

    • Global Moderator
    • Guru Member
    • *****
    • Posts: 1695
    • a570is
    Re: Motion detection to capture birds
    « Reply #9 on: 31 / May / 2009, 12:41:55 »
  • Publish
  • Still can't get video to work or read the video error message. Where's the best place to post about problems with that script?

    Edit: i've been trying to read the video error message. I can't catch the word luminence, which I think it always starts with, and then ERROR and I think the word mode? Its really impossible to read most of it. I've tried changing around various settings like the slow/fast/test parameter, and putting the camera in different video modes first, but no changes. I'd really like to get it working... Any ideas on what else I can try?

    That would be in the scripting section in the thread where you got the script. So the error comes to the bottom console, not on top of the LCD? In that case the error is one of the few ones coded in the script.

    It first tells you that you are monitoring "Channel: Luminance" for motion. This is not an error, it always does that. Then it checks for rec mode and outputs
    "MDFB script ERROR:"
    "Not in REC mode, exiting."
    if you are in play mode or if the get_mode command on your camera doesn't work correctly.

    Then it checks for video button and if you have a camera that has a video button (or if CHDK is configured incorrectly for your camera, but it isn't), it says
    "MDFB script ERROR:"
    "Incompatible camera! Try"
    "MDFB VideoButtonModels"
    "version."

    Try this script (put it in a text file cammed modetest.bas) in each operating mode (play, rec, video) and see what it prints out:

    Code: [Select]
    @title modetest
    V=get_video_button
    if V=0 then print "No video button."
    if V=1 then print "Cam has video button."
    M=get_mode
    if M=0 then print "Rec mode."
    if M=1 then print "Play mode."
    if M=2 then print "Video mode."
    sleep 5000

    Offline CanonBlue

    • Full Member
    • ***
    • Posts: 145
      • My Flickr Page
    Re: Motion detection to capture birds
    « Reply #10 on: 31 / May / 2009, 12:53:26 »
  • Publish
  • Thanks for taking the time to help!

    Ok, I put that script on my camera and here are the results:

    First of all, I noticed that in all modes I get a red message in the top left corner of the camera screen that says "uBASIC:9 Parse err". I don't think I've ever noticed that before. Did I do something wrong in copying the script?

    When in taking pictures mode it produces readable results that stay still:
    "No video button.
    Rec mode."

    When in viewing pictures mode:
    The text in the bottom left goes by too fast to really read, but i think it says no video button and then something like mode.

    When in video mode:
    Text also goes by too fast to read. I think it says no video button and then I think I can catch the words play and mode, but I'm not sure.
    Quote
    "MDFB script ERROR:"
    "Not in REC mode, exiting."
    if you are in play mode or if the get_mode command on your camera doesn't work correctly.

    I think this matches the error I've been getting from the motion detector script when in video mode. Its difficult to read but I think I have noticed the word exiting. Does that mean that it thinks I'm in play mode when I'm in video mode? Is there some setting that I should change to make it realize its in video mode? I've looked for something like that but couldn't find anything...
    « Last Edit: 31 / May / 2009, 12:56:42 by CanonBlue »
    My Flickr Page
    I use the chdk on my SX230 and SD1100 cameras, and I installed them using a Macbook, currently running 10.6.8.

    Offline CanonBlue

    • Full Member
    • ***
    • Posts: 145
      • My Flickr Page
    Re: Motion detection to capture birds
    « Reply #11 on: 31 / May / 2009, 17:46:04 »
  • Publish
  • I also tried this script: http://chdk.wikia.com/wiki/UBASIC/Scripts:_Multipurpose_Motion_Detection
    And still no luck. I'm not sure if ANY scripts are working when I'm in video mode. Even the one you gave me to test the mode doesn't seem to work the same there as it does in normal shooting mode.

    (Btw is there a reason that the motion detector script I am using, the first one, doesn't seem to be on the main scripts page? I went there to check and I found a different one instead, but I think the one I've been using works better.)
    My Flickr Page
    I use the chdk on my SX230 and SD1100 cameras, and I installed them using a Macbook, currently running 10.6.8.

    Offline CanonBlue

    • Full Member
    • ***
    • Posts: 145
      • My Flickr Page
    Re: Motion detection to capture birds
    « Reply #12 on: 01 / June / 2009, 14:08:21 »
  • Publish
  • (In case anyone else was following this, this problem was solved in the original thread for the MD script. I was able to use an earlier version of the script where you explicitly tell it that you're in video mode.)
    My Flickr Page
    I use the chdk on my SX230 and SD1100 cameras, and I installed them using a Macbook, currently running 10.6.8.

    Offline Tchernobill

    • Newbie
    • *
    • Posts: 3
    Canon Powershot A590

    Offline CanonBlue

    • Full Member
    • ***
    • Posts: 145
      • My Flickr Page
    Re: Motion detection to capture birds
    « Reply #14 on: 04 / June / 2009, 11:57:12 »
  • Publish
  • Nice! I want to try to photograph hummingbirds this summer, but there aren't any around here right now. So far we have a crow that comes and eats food from our railing, but there have been a few other birds peeking around and trying to get up the courage to come eat too, so maybe I'll be able to get some more interesting photos.

    I also had a bit of trouble with the focus sometimes. The ones taken with the other building as a background came out pretty well, but when I aimed the camera with a far away vista as the background, the camera wanted to focus far away and when the bird came and set off the camera, the bird was out of focus. I'm not sure exactly what to do about that kind of thing.
    My Flickr Page
    I use the chdk on my SX230 and SD1100 cameras, and I installed them using a Macbook, currently running 10.6.8.

     


    SimplePortal 2.3.3 © 2008-2010, SimplePortal