Sync Multiple Cameras - Creative Uses of CHDK - CHDK Forum

Sync Multiple Cameras

  • 12 Replies
  • 18679 Views
Sync Multiple Cameras
« on: 01 / March / 2012, 01:43:35 »
Advertisements
Good day.

Is it possible to sync multiple cameras with CHDK or is this software only meant for the firmware on the camera. I'm busy with a project to generate 3D data from multiple photos, but I need to have the cameras take photos at the exact same time or the 3D data gets very fuzzy.

Thanks for the reply.
Regards.

*

Offline zeno

  • *****
  • 891
Re: Sync Multiple Cameras
« Reply #1 on: 01 / March / 2012, 07:40:04 »
You can sync multiple cameras with CHDK, but such syncing is exactly what SDM is for - simpler, better and more accurate to use that. See http://stereo.jpn.org/eng/sdm/index.htm

There are commercial connecting/triggering devices to make it easy - see http://stereo.jpn.org/eng/sdm/suppliers.htm
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: Sync Multiple Cameras
« Reply #2 on: 01 / March / 2012, 07:44:18 »
I need to have the cameras take photos at the exact same time or the 3D data gets very fuzzy.

Tests with SDM (an early breakaway from the original CHDK code) typically synch to within a fraction of a msec :-

http://stereo.jpn.org/eng/sdm/index.htm

Testing procedure here :-

http://stereo.jpn.org/eng/sdm/crt_synch.htm

A640 results here :-

http://stereo.jpn.org/eng/sdm/crt_synch.htm#synctest

Other test results are in the Files section of the Yahoo SDM Group :-

http://tech.groups.yahoo.com/group/StereoDataMaker

You can also get advice there from others using multiple-camera rigs.

Recently, the USB-remote code for the original CHDK has been rewritten and may also work though I am not aware of any synch tests.


Be very careful, there is reason to believe precision synch may not be possible with cameras later than the S95.


David

Re: Sync Multiple Cameras
« Reply #3 on: 01 / March / 2012, 20:49:30 »
Recently, the USB-remote code for the original CHDK has been rewritten and may also work though I am not aware of any synch tests.
FWIW,  the place where the sync code is patched into the Canon firmware has not changed with the new USB remote code.  And the code that releases the "sync" when the USB power is removed is the same too.  So I would be very surprised to find out that sync accuracy has changed. 

And as its pretty much the same code as what's in SDM,  I would expect that to be the same too.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Sync Multiple Cameras
« Reply #4 on: 01 / March / 2012, 20:55:19 »
Recently, the USB-remote code for the original CHDK has been rewritten and may also work though I am not aware of any synch tests.
FWIW,  the place where the sync code is patched into the Canon firmware has not changed with the new USB remote code.  And the code that releases the "sync" when the USB power is removed is the same too.  So I would be very surprised to find out that sync accuracy has changed. 

And as its pretty much the same code as what's in SDM,  I would expect that to be the same too.


What David is referring to is the time taken between the release of the USB remote and the image being taken.

On the G12 and SX30 this time is very consistent, on the newer IXUS310 and SX40 it can vary by up to 50 msec.

So far we haven't found out why this is the case or any way to overcome this.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Sync Multiple Cameras
« Reply #5 on: 01 / March / 2012, 21:54:44 »
What David is referring to is the time taken between the release of the USB remote and the image being taken.
Yes, I see that. And all I was pointing out is that the old USB remote code,  new USB remote code and AFAIK the SDM code is pretty much exactly the same over that path through the code so the timing on all three versions will be pretty much the same - good, bad or random. 
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Sync Multiple Cameras
« Reply #6 on: 13 / March / 2012, 02:40:47 »
Hi there.

Thanks for all the replies. I've been doing some research on how everything is set together.

From what I understand you can put a CHDK script on the cameras to wait for a USB signal.
=============================================
@title Remote button
while 1
  wait_click 1
  if is_key "remote" then shoot
wend
end
====================
AND/OR
===================
do
  p = get_usb_power
until p>0

===============================================================

Can one then link multiple cameras with their USB cables into a powered USB hub then into a single USB port?

I've read that you can send different signals to the camera to do different stuff but I just need all the cameras to shoot at the same time. So the below is just for FYI

while 1
   do
      a = get_usb_power
   until a>0
   if a < 5 then gosub "ch1up"
   if a > 4 and a < 8 then gosub "ch1mid"
   if a > 7 and a < 11 then gosub "ch1down"
   if a > 10 and a < 14 then gosub "ch2up"
   if a > 13 and a < 17 then gosub "ch2mid"
   if a > 16 and a < 20 then gosub "ch2down"
   if a > 19 then print "error"
wend
end

(Full script  -->  http://www.zenoshrdlu.com/kapstuff/SimpleZoomNShoot.bas)

 ;)
Now what I can not figure out is how do you send a signal from the pc to the camera. There must be some small script or something to trigger the "get_usb_power" that you need to run from the PC's end?
;)

Thanks again for all your assistance.

*

Offline reyalp

  • ******
  • 14131
Re: Sync Multiple Cameras
« Reply #7 on: 13 / March / 2012, 03:29:04 »
Now what I can not figure out is how do you send a signal from the pc to the camera. There must be some small script or something to trigger the "get_usb_power" that you need to run from the PC's end?
Nope. USB power is exactly what it says: the power provided by the host on the USB cable. Unless you have software control to turn on/off the USB interface on your PC, you can't control it directly from software.

http://chdk.wikia.com/wiki/USB_Shutter_Remote describes how the remote works. To control this with a PC, you need to build this with some electronics controlled by the PC in place of the switch.

If you want software control over USB (rather than USB power), you can use http://chdk.wikia.com/wiki/PTP_Extension but sync will be much worse. It's unlikely you can get much better than ~40ms with this approach. I did some experimentation with this, described here http://chdk.setepontos.com/index.php?topic=6231.msg81330#msg81330
Don't forget what the H stands for.

Re: Sync Multiple Cameras
« Reply #8 on: 13 / March / 2012, 06:37:38 »
It seems linking the cameras to a pc will very time consuming. I've found this link:
http://www.gentles.ltd.uk/gentstereo/sdm.htm

I'm thinking of going more the hardware way instead of the software way. From what I can see you need the sdk on each camera and then the manual trigger with a repeater for multiple cameras.

This should work, should it not?

Re: Sync Multiple Cameras
« Reply #9 on: 13 / March / 2012, 06:55:06 »

This should work, should it not?

I hope so.

I designed that with Gentles specifically for the application that you have in mind.

Unless using a camera newer than SX30/G12, you should achieve synch of a fraction of a msec.


David

 

Related Topics


SimplePortal © 2008-2014, SimplePortal