Tethering Photo with Automator

Discussion in 'Digital Photography' started by schouesy, Feb 2, 2011.

  1. schouesy, Feb 2, 2011
    Last edited: Feb 3, 2011

    macrumors newbie

    Joined:
    Feb 2, 2011
    #1
    I am trying to take a series of photos with an external camera (D3000 Nikon) using automator. When i set up the new workflow and try and select take picture function under the "Image Capture" application it wont allow me to put it in the workflow. Has anyone else been able to use the "Take Picture" function in the workflow?

    I have been able to use the "Take Video snapshot" function - but this defaults to the internal imac isight and not the external tethered D3000.

    Any ideas on how to get the Automator to automatically take photos with a tethered D3000? Is this a function of the Nikon D3000 being insufficient or is there another trick in automator?

    Thanks

    Updated -

    I was able to get this action to work - but it only worked once. I started the automator with "Image Capture Plugin" instead of a workflow and was able to get the camera to take a picture and save it to a file. But once i add the same "take picture" function or "take video snapshot" function more than once - it freezes. I cant use the Loop function because I am trying to add folders and naming ID's to each individual file based upon the project. Any thoughts?
     
  2. n.p
    macrumors newbie

    Joined:
    Jul 30, 2011
    #2
    Same problem here.

    I do not know any solution to this issue, but it is easy to reproduce it:

    1. Open Automator.
    2. Create a new App.
    3. Drag and drop a first "Take Picture" into the App => OK.
    4. Drag and drop a second "Take Picture" into the App => error:
      Cannot update for observer <AMWorkflow 0x...> for the key path "parameters.name" from <TakePicture 0x...>, most likely because the value for the key "parameters" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the TakePicture class. ​

    That looks like a bug.
     
  3. macrumors newbie

    Joined:
    Jun 30, 2010
    #3
    can't add it even once

    I'm trying to modify a DIY photo booth workflow, and I want to use an external digital still camera instead of isight or webcam. But it won't let me add the Take a Picture image capture action no matter what type of automator project I try. I have two cameras, both showed up in the Image Capture application and successfully were commanded to take a picture by this application. So the action works, but for some reason cannot be added to any workflow.

    Anyone have any ideas?
     
  4. dougie smooth, Sep 14, 2011
    Last edited: Sep 16, 2011

    macrumors newbie

    Joined:
    Jun 30, 2010
    #4
    What the heck just happened?!

    Starting to think this is a bug.

    I tried the record button in Automator to try to take a picture in Image Capture and see if I could capture the action that way. In order to do this I was prompted to turn on "Enable access for assistive devices" in the Universal Access system setting. I didn't get as far as testing the image capture (no camera was plugged in) -- instead I was playing around and recorded the launching of Photo Booth and snapping of a picture with the iSight. Suddenly all my Automator windows were disappeared, even though they were still listed under "Window" menu in Automator, and on closing Automator I was asked to save changes to them.

    What does this all have to do with the Take a Picture action? Well, all of a sudden on reopening Automator it started working and I could add it to any workflow. Still no camera connected at that time, so the dropdown list was empty. I quickly created a workflow with a single Take a Picture action and saved it. On a subsequent opening of this workflow, the action was disappeared, the workflow was blank, and I could no longer add the Take a Picture action to anything.

    I have since repeated this sequence, and it seems like the recording of the Photo Booth opening and snapshot does something unholy to Automator and then suddenly the Take a Picture action can be used.

    Obviously I'm going to try to reproduce this more definitively and also try to take a picture with a workflow. But this kind blew my mind so I had to share.

    UPDATE: There are certain conditions under which you can add a Take Picture action to a workflow (see n.p.'s workaround steps below). However, I still have not been able to get any Automator application to take a picture when run from Finder (n.p. suggests below that upgrading to Lion may improve things somewhat).
     
  5. macrumors 65816

    teleromeo

    Joined:
    Dec 2, 2006
    Location:
    kidnapped by aliens
    #5
    Have a look at sofortbild. Maybe that application will do what you need.
     
  6. n.p
    macrumors newbie

    Joined:
    Jul 30, 2011
    #6
    Possible workaround

    FWIW, this is what worked for me, for controlling a Canon 5Dmk2:

    1. Upgraded to Lion (no luck with Snow Leopard).
    2. Opened Automator.
    3. Closed all the visible workflows, because as soon as one Take Picture task fail, all the other ones keep failing too.
    4. Closed Automator.
    5. Reopened Automator.
    6. Created a new Application workflow.
    7. Added a single Take Picture task.
    8. Saved the Application, eg. as MyTakePicture.app.
    Now I can use the Launch Application task with MyTakePicture.app to take a picture.
     
  7. macrumors newbie

    Joined:
    Jun 30, 2010
    #7
    All of this goes exactly the same for me, except that I'm still in Snow Leopard and the single-action MyTakePicture.app will only take a picture when run in Automator -- not when run directly from Finder, and not when inserted into another Automator app using Launch Application (even when run in Automator).

    I have been considering whether to upgrade to Lion to try to get past this silly defect. Am I understanding you correctly that in Lion you can launch your MyTakePicture.app directly from Finder or from within another app and it actually takes a picture?
     
  8. n.p
    macrumors newbie

    Joined:
    Jul 30, 2011
    #8
    In step 5 make sure you create something of type "Application".

    On my MacPro, I found that the way the camera connection is started matters too:

    8. Make sure the camera is off and disconnected.
    9. Turn the camera on.
    10. Connect it by USB.
    11. Launch the MyTakePicture.app once (nothing happens).
    12. Press the shutter button on the camera once.
    The last step seems to wake up something somewhere, because from then on, MyTakePicture.app works whenever I launch it (without touching the camera anymore).

    A summary of the issues I faced:
    • On Snow Leopard, the Take Picture task never worked for me.
    • On both systems, adding more than one Take Picture task makes all the Take Picture tasks break with an error message. Hence the trick of saving one of these tasks as an Application, and using Launch Application to take the photo indirectly.
    • In general, the printing options with the Automator workflow are limited.
    • The control of delays and the "synchronization" between tasks in Automator is also rather limited.
    • Take Picture needs to be "primed" by pressing the shutter of the camera once.
    • Image Capture crashes somewhat frequently and cannot be controlled by Automator.
    • The Canon EOS Utility cannot be controlled by Automator.
    So, even though I has the same wish for a DYI photo booth with Automator connected to my DSLR (instead of the 640x480 camera of my MBP), between the bugs and the various limitations in Automator, I eventually started writing my own photo booth application.
     
  9. dougie smooth, Sep 15, 2011
    Last edited: Sep 15, 2011

    macrumors newbie

    Joined:
    Jun 30, 2010
    #9
    Yep, my attempted photo booth and the single-action take picture were both Automator applications. The take-picture sub-app didn't work for me.

    I will try those steps, thanks for the tip.

    It works for me in Snow Leopard, albeit intermittantly, but only when run within Automator.

    You can say that again. I wanted to use "Wait for user action" instead of "Ask for confirmation" so that there wasn't a cancel button that would kill the app. However, taking an idea from the Curbly implementation, I'm starting a screen saver of previous photos at the end of each loop, and Automator cannot figure out that it has to wait for the screen saver to be woken up before continuing the action list. So the confirmation dialog is MIA when you wake from screen saver unless you insert a long enough Pause action -- which of course is a terrible solution since there is no known wait time, but verifies how awful the timing between actions is in Automator. You would think it would know enough to wait for the "output" from each action before continuing the next action. Automator is such a great tool, so it's a shame how limited it is in available actions and performance.

    Hmm, that's discouraging. My next idea was to try to control the Sofortbild app from Automator, so that I could show the Live Video preview from the SLR (I'm using a Nikon D5100) as well as take the pictures. I'm new to Apple script though, so I was already having trouble editing the Watch Me Do results in a way that Automator would actually replicate my interactions.

    You did, eh? How did that turn out? Care to share? :)

    I am running out of options besides using the low-res iSight, or just saying the hell with it and using the OSX Photo Booth application with handwritten instructions saying "Press Command-P to print". :( I might try a higher quality external web cam, but am afraid to invest in one and run into a brand new set of problems...
     
  10. macrumors newbie

    Joined:
    Jun 30, 2010
    #10
    Sofortbild is a nice app, and plays well enough with Automator that it almost does everything I need. And in full screen, no less. The only remaining hiccup is that I would like to toggle the Live View mode on and off so that users can see themselves in the frame before the photo captures begin. Although Sofortbild supports this camera feature, it does so in a way that Automator cannot command Sofortbild to toggle back and forth, and Sofortbild will not toggle Live View off to take a picture like the camera itself does when operated manually.

    Aside from the Live View issue, Sofortbild gets me much much further towards what I'm trying to do than anything else I've tried. I might just use a still picture capture to show the users whether they're in the frame -- not ideal, but a reasonable workaround for a DIY Photo Booth.
     
  11. macrumors newbie

    Joined:
    Dec 14, 2011
    #11
    Has anyone figured this out???

    I can get it to work with just one photo, but whenever I add another "take picture" operation, it errors out. Also, I have a Nikon D3100, so Sofortbild isn't compatible!

    Grrrr...

    Good thing I have 5 months before my wedding to figure this thing out :)
     
  12. macrumors newbie

    Joined:
    Jun 30, 2010
    #12
    The key for me, I'm sorry to say, was using Sofortbild to get me around the annoying "take picture" bugs. So that really sucks if it doesn't support your D3100.

    The one suggestion I have is to try it on the Lion OS if you haven't already. I haven't myself tried the "take picture" function since upgrading my OS from Snow Leopard to Lion, but it's worth a shot. Maybe they fixed some of the issues.

    ----------

    I suppose I should give my update while I'm at it...

    I did finally cobble together an Automator photo booth script. It ended up working really, really well and was hugely popular at the party. It was fully automated, it had a robot voice giving people instructions, and it showed a slide show of previous snapshots in between sessions. We opted not to have a photo printer, though it would have been easy to incorporate. The problem with printing is they print slowly, some are reportedly buggy with Automator, people end up taking way more photos than you would actually want to print out, and most of all we just didn't want to buy a photo printer for a one-time event. Instead, we later made prints of the photo strips and some selected individual shots and included them with the guests' thank you cards.

    If anyone wants my Automator files or has other questions about the script or my photo booth setup and experience, feel free to contact me (my address is my user name at gmail). The big hurdles were the "take picture" function and inserting enough wait time in between certain functions so the script didn't crash. Automator isn't exactly trustworthy, but it can get the job done and by the end of the night I had only two downtime: one was a script crash and I had to restart the program and the other was only because the camera battery died and I needed to swap in the backup battery (you can get 2-3 hours of use out of a standard DSLR camera if you don't use the built-in flash, so either have a backup or a large capacity battery pack).

    Note of attribution: I used ideas from David Cline's (who I donated to to get his scripts) and Curbly's scripts, but in the end my script and implementation looked very different from either of those so I'm comfortable sharing it.

    ----------

    Sorry, I should have read that more carefully. I had a similar problem, and solved it by adding wait times in between the "take picture" operations.

    One caution with using a DSLR is that the auto-focus time depends on where the subjects decide to sit/stand. If they stick their face right in the camera, for instance, it takes longer to focus so you have to add enough wait time for that sort of worst case otherwise the whole thing gets ahead of itself and hangs or crashes. Luckily, the amount of wait time I needed in between shots to prevent that was just about right as far as user experience.
     
  13. macrumors newbie

    Joined:
    Jun 30, 2010
    #13
    OS-X version

    OK, I've packaged up some files for interested parties. I've written a short document explaining the installation, describing my experience, and noting some remaining bugs in Lion. If you do request the files from me, please specify whether you're running Snow Leopard (OS-X 10.6) or Lion (OS-X 10.7). The script is basically the same, but there was a little debugging that had to be done.
     
  14. macrumors newbie

    Joined:
    Mar 15, 2012
    #14
    i would be very interested in seeing your automator files. i'm running 10.6.8. i have been playing around with modifying crumbly and would like to be able to make a higher res shot. can't figure it out....driving me crazy
    thanks
     
  15. macrumors newbie

    Joined:
    Jul 27, 2012
    #15
    I also am interested in the workflow if you don't mind sharing!
     
  16. macrumors newbie

    Joined:
    Jun 30, 2010
    #16
    You'll have to email me for the archive. The address is my user name at gmail.
     
  17. macrumors newbie

    Joined:
    Aug 3, 2012
    #17
    I've sent you an email too - hope that's ok.
     
  18. macrumors newbie

    Joined:
    Aug 18, 2012
    #18
    Automator doesn't include an action for retrieving the contents of an email message. But since Apple's Mail is scriptable and there's an Automator action that triggers AppleScript code, it's doable. After you've dragged the Run AppleScript action into Automator's Workflow pane, replace the default AppleScript code in it.

    picture booths
    rent a photo booth
     
  19. macrumors newbie

    Joined:
    Nov 22, 2012
    #19
    Interested in archive

    Has anyone got their hands on this archive. Does it work for them. I tried to email dougie smooth but I think I may have ended up in junk mail or something.
     

Share This Page