multicam: synch problems when using scripts - General Discussion and Assistance - CHDK Forum

multicam: synch problems when using scripts

  • 41 Replies
  • 22385 Views
multicam: synch problems when using scripts
« on: 13 / July / 2012, 13:32:20 »
Advertisements
Hi all,
I have 60 cams for bullet time effect, I need them to shoot in perfect synch.
If I use any script, any language, I can't reach perfect synchronism on all cams
while, instead, if I use the built in functionality (no scripts and chdk disabled)
the cams shoot in sync... does this mean that with scripts its quite impossibile
to have all cams in synch? Or am I missing something??

(I'm using build 1950 from dev branch)

Re: multicam: synch problems when using scripts
« Reply #1 on: 13 / July / 2012, 13:36:54 »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: multicam: synch problems when using scripts
« Reply #2 on: 13 / July / 2012, 15:25:48 »
Some time ago we had a discussion about a 50 camera array (SX200)  in German CHDK forum: http://forum.chdk-treff.de/viewtopic.php?f=20&t=2037

All cameras got a autostart script for the initialisation of the phototechnical values. The shooting was realized via synchronized USB remote control.

Here is the project page with samples: http://www.frozen-time-cam.com/array/concept/concept.html

msl
CHDK-DE:  CHDK-DE links

Re: multicam: synch problems when using scripts
« Reply #3 on: 13 / July / 2012, 16:09:48 »
thanks sml,
this is exactly what Im trying to do,
unfortunatly i cant speak german...

Would it be possible for you to keep me in contact with who made that?
Do you know if the shooting was triggered by a script or done with built-in functionality?
Any info about how they reached perfect synchronism?
thanks

Re: multicam: synch problems when using scripts
« Reply #4 on: 13 / July / 2012, 16:19:31 »
I do not speak German either but it will not be doing what you require.

It almost certainly uses an autostart script to set some exposure parameters.

That is only done once, on power-up.

The synch shooting is done manually .. as usual.


Re: multicam: synch problems when using scripts
« Reply #5 on: 13 / July / 2012, 17:24:15 »
With this configuration the actual shoot is taken when I release my external trigger, so I thought the code was not anymore involved in this...  is this correct? shall I use the "yield" feature?

A CHDK developer may offer a description of the process.

I believe this patch from waterwingz made it possible to use sync from script (so the wait for release will be called from a scripted shot):

thanks sml,
this is exactly what Im trying to do,
Do you know if the shooting was triggered by a script or done with built-in functionality?
Any info about how they reached perfect synchronism?

This conversation seems to have spread across three threads and is getting frustrating.  As the "developer" closest to the USB remote code in CHDK at the moment AFAIK,  I can answer your questions but only if I can keep ahead of the chatter.

And yes,  you can get "perfect synchronism" using a USB Remote wired in parallel to 50 cameras under script control.  As I posted earlier,  you just have to write the script correctly.    If you would like some help with that,  I will modify the code snippet you posted as an example.   Its up to you to figure out how to integrate that into your larger script.



Ported :   A1200    SD940   G10    Powershot N    G16

Re: multicam: synch problems when using scripts
« Reply #6 on: 13 / July / 2012, 17:41:27 »
Quote
If you would like some help with that,  I will modify the code snippet you posted as an example.

thanks waterwingz I really would appreciate that as I'im gettin mad to find the solution...
sorry for the cross-posting, I will definitly be more careful in future...   

Re: multicam: synch problems when using scripts
« Reply #7 on: 13 / July / 2012, 18:51:41 »
Okay  - before I futz with scripts,  lets summarize what you are trying to do.

1 ) You have 50 cameras that you want to operate in unison (i.e. take a picture at exactly the same time) or in rapid sequence (some preset millisecond delay between each camera taking a picture)
2 ) You would like each camera setup the same way when its starts up (or at least when the script starts).
3 ) You have a "USB remote" circuit / device that connects the +5v and 0v(gnd) pins of all the USB ports in parrallel and then through a switch to a 5V source.

If I read between the lines on your various posts,  what you would like to do is :

4 ) Turn each camera on in shooting mode by pressing their 50 on/off switches for 2 seconds each.
5 ) For each camera,  press the 50 <ALT> keys and then the 50 shutter keys to start a script on each camera.
6 ) Press the USB remote to indicate to the active script that you want to start a programmed sequence on all cameras.
7 ) Release the USB remote switch to indicate to the active script to make the actual exposure at each camera.
8 ) Repeat steps 6&7 each time you press the USB remote switch.

With me so far ?   

Optimizations you are looking for include :

9 ) Activate the script mentioned in step 5 when you press the USB switch to the "On" position rather than start each camera manually ?

or

10 ) Have steps 4 to 6 happen automatically when you start the cameras via a brief press of the playback button ?


Is this correct ?  If not, what have I missed ?



So the tricky bit here is to make precision sync work.  What we need to do  is to initiate the shooting sequence in step 6 when the USB remote is activated.   You can do a whole lot of programmed things once the remote goes active, but at the end of that sequence we must issue a shoot() command and when we do, the camera will "hang" waiting for the USB remote power to go away ( i.e. you release the switch).   When your release the USB remote switch and remove the 5V power,  every camera connected will fire at the same time, down to the sub-millisecond resolution level.

Does that make sense ?
« Last Edit: 13 / July / 2012, 18:53:36 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: multicam: synch problems when using scripts
« Reply #8 on: 13 / July / 2012, 18:58:21 »
unfortunately i cant speak german...
I do not speak German either but ...

If you are using Google's chrome browser,  it will automatically translate what's posted on the CHDK-DE forum.  Not perfectly of course but pretty darn handy and close enough to understand what's going on.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: multicam: synch problems when using scripts
« Reply #9 on: 13 / July / 2012, 19:09:22 »
Quote
1 ) You have 50 cameras that you want to operate in unison (i.e. take a picture at exactly the same time) or in rapid sequence (some preset millisecond delay between each camera taking a picture)
2 ) You would like each camera setup the same way when its starts up (or at least when the script starts).
3 ) You have a "USB remote" circuit / device that connects the +5v and 0v(gnd) pins of all the USB ports in parrallel and then through a switch to a 5V source.

exactly.

from now on things differ:

1. i currently have a script (ubasic as lua crashes...) that autostarts when i manually turn on each cam
2. the script allows me to configure on the fly all cams, by pressing the remote button in different sequences i can choose all params (av,tv,zoom,etc...) and set them
3. after i set all the params, the script allows me to go in shooting mode, take focus on each cam till focus is really reached and then the scripts waits for remote click to initiate the actual shooting sequence
4. as i press the remote button, the cam initiates the shooting sequence and the screen goes blank and the camera hangs. As soon as i release the remote button the picture is immediatly taken by all the cams
5. the script now allows me the set again the params (av,tv,zoom,etc...) or to take another picture as in step 3

now this is exactly what im currently doing
but the result is that not all the pictures are taken synchronously,
we test with a flash device that is also triggered by the same remote button (gentStereo)
and in the resulting picture i can clearly see that some of them are dark, some correct, some bright.
Same cams give different results in different shots (cams do not have always the same delay).

Today i tried to exit script and alt/mode and perform click with the built-in functionality (controlMode=normal, SwitchMode=onePush) and on the results all shots were correctly lighten, there were very few cams with a very subtle, but acceptable, exposition difference. We made tests from 1/60 to 1/200 with these results.

In my opinion I'm behaving correctly but evidently I'm missing something...

thanks for your help


 

Related Topics


SimplePortal © 2008-2014, SimplePortal