Alternative ways to trigger taking a photo? - Script Writing - CHDK Forum
supplierdeeply

Alternative ways to trigger taking a photo?

  • 3 Replies
  • 4807 Views
Alternative ways to trigger taking a photo?
« on: 28 / December / 2009, 17:28:17 »
Advertisements
Hello,

I'm new to CHDK but have programming experience in a range of areas (all non-camera related!)

My interest is to find methods to trigger taking a photo without physically pressing the trigger.  I am aware of the USB Remote feature in CHDK but wiring things together isn't my preferred solution.  Ideally I'd like a way to trigger directly from a PC but am also considering other methods.

I've got a Canon Eleph 950 (bought in US; IXIS 960) and had been considering using gPhoto instead but it turns out this can't remote control my camera.  Therefore I wonder if there's some way I could use CHDK with a script to allow it to trigger a photo.

Is there an easy (i.e. software / non-hardware hacking based) approach to trigger a photo from the PC?  Could a script (on the PC) be written that would set the voltage on the USB cable on the required wire, mimicing the USB Remote so that a corresponding script on the camera knew to take a picture?

The other sort of approch I was wondering about was to ignore the PC aspect and concentrate on some physical change that a camera script could detect and then have this trigger taking a photograph.  E.g. if you waved a hand in front of the camera at a certain close range, it would detect this, wait a brief time (so your hand could be removed) and the pic would be taken.

I had a quick look at the properties that the script could read, but I wasn't sure if there was a way to read the range from the IR range-finder (there's a get focus method, I wasn't sure if this would read the current actual range or what the camera was currently set to focus at, which could be different)

Motion detection wouldn't work as I'd be moving various things in the camera's field of view.  However I did wonder about detecting a change in the histogram - e.g. if there's a predominantly red background which switches white then wait X seconds and take the pic.

Do any of these ideas sound feasible?  If so, would anyone have any pointers to similar scripts or things I could investigate to move this forward?

Many thanks,
Neil

*

Offline reyalp

  • ******
  • 14079
Re: Alternative ways to trigger taking a photo?
« Reply #1 on: 29 / December / 2009, 00:03:18 »
Hello,

I'm new to CHDK but have programming experience in a range of areas (all non-camera related!)

My interest is to find methods to trigger taking a photo without physically pressing the trigger.  I am aware of the USB Remote feature in CHDK but wiring things together isn't my preferred solution.  Ideally I'd like a way to trigger directly from a PC but am also considering other methods.
See http://chdk.setepontos.com/index.php/topic,4338.0.html

If you are a programmer, adding the necessary bits for your camera shouldn't be too hard.
Quote
Could a script (on the PC) be written that would set the voltage on the USB cable on the required wire, mimicing the USB Remote so that a corresponding script on the camera knew to take a picture?
I doubt you could do this easily with USB, but it should be possible with a traditional parallel or serial port... but then you are back to wiring thing together.

Quote
Motion detection wouldn't work as I'd be moving various things in the camera's field of view.  However I did wonder about detecting a change in the histogram - e.g. if there's a predominantly red background which switches white then wait X seconds and take the pic.
You might be able to hack MD to look for something very specific, like a laser point flashing in a particular area of the image. i.e. look for 100% red saturation in a very small area for at least 100ms but not more than 500.

This might be difficult or impossible to do in script, but if you know C kludging it into the existing MD code shouldn't be terribly hard.
Don't forget what the H stands for.

*

Offline Aged

  • *
  • 39
Re: Alternative ways to trigger taking a photo?
« Reply #2 on: 29 / December / 2009, 04:17:16 »
As it is the festive season  Clap hands, bang a drum or blow a whistle!


Now type 'sound input' into the search box and see how others have made progress.

HTH

*

Offline kuku

  • *
  • 14
Re: Alternative ways to trigger taking a photo?
« Reply #3 on: 30 / December / 2009, 06:32:00 »

I've got a Canon Eleph 950 (bought in US; IXIS 960) and had been considering using gPhoto instead but it turns out this can't remote control my camera.  Therefore I wonder if there's some way I could use CHDK with a script to allow it to trigger a photo.

don't know about gphoto but I can take a picture with canon-capture (works on linux but should compile on windows too)
capture> help
Interactive commands:
        aperture            Set the aperture
        capture             Capture image and save it to the given file name
        detach              Quit the client but let the server running
        debug               Toggle debug mode
        ecomp               Exposure compensation
        effect              Photo effect
        flash               Set flash mode
        focus               Focus lock/unlock
        focuspoint          Sets the focusing point to center/auto
        help                More help on a commmand: "help COMMAND"
        iso                 ISO speed
        macro               Set the macro mode
        metering            Light metering mode
        quit                Quit both the server and client
        shutter             Set the shutter speed
        start               Initialize the camera
        status              Get the server's status
        test                Debugging tests
        tv/av               TV/Av Setting - sets aperture/shutter priority
        viewfinder          Turn the viewfinder window on/ff
        setvfout            Set the viewfinder output mode
        vfsave              Save viewfinder images into files with a given prefix.
        vfalign             Align the viewfinder window with the specified image.
        vftrans             Set the viewfinder transparency in 'transparent' mode.
        borders             Draw borders around the viewfinder, in % of the height/width.
        white               White balance
        zoom                Set zoom: 0..6 optical zoom, 7..10 digital zoom
        qual                Set image quality
        size                Set image size
        v4l                 Start v4l feeding
capture> start
capture> capture 1.jpg

you can found it on capture.sourceforge.net



 

Related Topics