Photo Booth

  • 8 Replies
  • 1796 Views
Photo Booth
« on: 20 / June / 2016, 09:42:54 »
Advertisements
I am a CHDK newbie.
I have it running successfully on a Canon Powershot A590
I want to use it and other low price cams for a photo booth I am building

What I want to do is trigger the camera via USB (which sounds pretty easy) and then access the new picture file via the USB cable.
I can easily write some software to monitor the camera drive and grab new files that appear, but the problem is (and I assume a common issue) is with not being able to access the camera drive while in picture taking mode.

So I am asking for help on this.
What I think needs to be done is write a script as follows, but please correct me if there is a better way and hopefully some scripts already written for that purpose:

- My software triggers the camera to take a pic (via USB)
- The script that is running senses the new pic and switches the camera to preview mode
- My software is monitoring the drive and sees the new pic and moves it to a different folder on the computer for processing
- The script switches back to picture taking mode ready for another remote triggering

I also have no problem with hacking the camera guts or building electronics or Arduino stuff if required.
« Last Edit: 20 / June / 2016, 09:57:18 by billymac »

Photo Booth
« Reply #1 on: 20 / June / 2016, 10:07:36 »
You might want to check out this forum thread..  https://chdk.setepontos.com/index.php?topic=12742.0 I put a bunch of details into the fifth post.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Photo Booth
« Reply #2 on: 20 / June / 2016, 11:57:12 »
I just learned of chdkptp
Interesting.
If I can figure out how to control the cam directly using Visual Studio and C# I will be happy...

Re: Photo Booth
« Reply #3 on: 20 / June / 2016, 12:25:15 »
There is simple hack written in C attached to my post. Converting to C# should be trivial if you want to go that route.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 11496
Re: Photo Booth
« Reply #4 on: 20 / June / 2016, 17:06:04 »
I just learned of chdkptp
Interesting.
If I can figure out how to control the cam directly using Visual Studio and C# I will be happy...
FWIW, the chdkptp UI and most of the logic is written in Lua, so if you are willing to dip your toes in a different language, you can customize or extend it without needing to rebuild anything. See https://app.assembla.com/spaces/chdkptp/wiki/Scripting_Guide for a brief intro.

You can also execute from an external program, either once per command, or by feeding the CLI stdin. In the simplest case, shooting and downloading can be done with something like
chdkptp -c -e"remoteshoot"

This requires the CHDK Jpeg remote shoot feature, which is not supported on every camera. It is supported on A590

You will need to switch the camera to shooting mode first with the "rec" command once after boot.
Don't forget what the H stands for.

Re: Photo Booth
« Reply #5 on: 20 / June / 2016, 17:16:48 »
You can also execute from an external program, either once per command, or by feeding the CLI stdin. In the simplest case, shooting and downloading can be done with something like
chdkptp -c -e"remoteshoot".
FWIW, that's  exactly what I did in the script I posted.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Photo Booth
« Reply #6 on: 21 / June / 2016, 10:19:51 »
I am not worried about LUA- I already use it with programming ESC8266 modules.

I guess my only concern now is some way to allow a live view on cameras that don't support it.
My cam doesn't have live view but can I still gram an image via USB and some stream programming?

I could use a second web cam for that purpose but may be a pain to ensure they are both aligned the same.

I already have a Logitech C920 1080p webcam but assume the Canon A590 would produce a better image.

Maybe I should start looking for used Canon cams with live view.

Photo Booth
« Reply #7 on: 21 / June / 2016, 10:24:14 »
Nothing that I posted with my photobooth really needed Liveview.  You can shoot and download images without it.  Streaming images fast enough to simulate real time would be tough though.
« Last Edit: 21 / June / 2016, 10:26:27 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 11496
Re: Photo Booth
« Reply #8 on: 21 / June / 2016, 13:36:48 »
I am not worried about LUA- I already use it with programming ESC8266 modules.

I guess my only concern now is some way to allow a live view on cameras that don't support it.
My cam doesn't have live view but can I still gram an image via USB and some stream programming?
CHDK has it's own live view protocol, which chdkptp supports on almost all cameras. So if you use the chdkptp GUI, you can use that. The GUI is written in Lua using IUP http://webserver2.tecgraf.puc-rio.br/iup/

You can also grab frames from the live view using the CLI, but using that for a live stream while still support remote shoot would be tricky.

Alternatively, you could probably use the cameras TV out, either with a separate monitor or with a USB video capture device.
Don't forget what the H stands for.

 

Related Topics