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

multicam: synch problems when using scripts

  • 41 Replies
  • 19243 Views
Re: multicam: synch problems when using scripts
« Reply #10 on: 13 / July / 2012, 19:26:46 »
Advertisements
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
So far, so good.

Quote
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
I think that I remember now ... you're using a gentles device ?  How are you connecting it to all 60 cameras ?  If I recall the code you posted weeks ago,  you are pulse counting or pulse width measuring to set menu items ?  And there is a specific sequence that says "done .. go on to the shooting step" ?

Quote
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
So far so good still.

Quote
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
To be really clear,  this is what happens now or this is what you would like to happen ?

Quote
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).
If you are using the script posted here,  that's what I would expect to see.

Quote
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.
Good - confirms this will work acceptably.


So if I understand the above,  once you have finished the menu setup and clicked the "magic sequence" to indicate "get ready to shoot",  you would be okay with pressing the remote one last time to start the shooting process and releasing the remote to indicate a "precision shoot" should happen at exactly that point
Ported :   A1200    SD940   G10    Powershot N    G16

Re: multicam: synch problems when using scripts
« Reply #11 on: 13 / July / 2012, 19:37:07 »
Quote
... you're using a gentles device ?  How are you connecting it to all 60 cameras ?
a bit complicate:
i have 2 gentStereos, each controls 30 cams
a cable is connected from gentStereo to a usb splitter that serves 6/8 cams, from that
splitter another cable connects to another usb splitter that server other 6/8 cams, etc.. till 30 cams
Then the 2 remote button are triggered insantanously buy a third button that activates the 2 gentStereos buttons

 
Quote
  If I recall the code you posted weeks ago,  you are pulse counting or pulse width measuring to set menu items ?  And there is a specific sequence that says "done .. go on to the shooting step" ?
yes, a short click means "next", a long click means "select/enter", in this way I can browse a menu and select items.

Quote
To be really clear,  this is what happens now or this is what you would like to happen ?
it is what really happens now, I'm testing since about 2 weeks

Quote
If you are using the script posted here,  that's what I would expect to see.
Yes that is the actual part of the script I really use


Quote
Good - confirms this will work acceptably.
Yes but , as now, only outside a script


Quote
So if I understand the above,  once you have finished the menu setup and clicked the "magic sequence" to indicate "get ready to shoot",  you would be okay with pressing the remote one last time to start the shooting process and releasing the remote to indicate a "precision shoot" should happen at exactly that point

Actually this is the current behaviour of my script, exactly what is doing. The problem is that shoot is not precise...

Re: multicam: synch problems when using scripts
« Reply #12 on: 13 / July / 2012, 20:06:28 »
Actually this is the current behaviour of my script, exactly what is doing. The problem is that shoot is not precise...
Good & thanks.  That was somewhat painful but at least I think we are 100% aligned about what is happening.

Try this :

Code: [Select]
press "shoot_half"
sleep 2000
set_aflock 1
do
    sleep 100
    p = get_usb_power 1
until p>0
press "shoot_full"
do
    sleep 100
    p = get_usb_power 1
until p<1
sleep 2000
release "shoot_full"
release "shoot_half"
set_aflock 0

If that doesn't work,  would you please set the sync delay on one of the cameras to several seconds,  repeat your normal process and report on whether that camera fires several seconds later than the others ?

Thanks

Update :  after testing on my single cameras setup, I can't convince myself this makes any difference.  Sorry - trying to understand why. 
« Last Edit: 13 / July / 2012, 22:46:26 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: multicam: synch problems when using scripts
« Reply #13 on: 14 / July / 2012, 12:30:36 »

i have 2 gentStereos, each controls 30 cams
a cable is connected from gentStereo to a usb splitter that serves 6/8 cams, from that
splitter another cable connects to another usb splitter that server other 6/8 cams, etc.. till 30 cams
Then the 2 remote button are triggered insantanously buy a third button that activates the 2 gentStereos buttons


I am the co-designer of those items and the feature was included for applications like yours.
It will be interesting to see the result.

Even if CHDK solves your problem, please see my reply to your query in SDM Group.

I would like to test a few ideas and you are the ideal person.


David


Re: multicam: synch problems when using scripts
« Reply #14 on: 14 / July / 2012, 12:45:18 »
I am the co-designer of those items and the feature was included for applications like yours.

@Microfunguy :  this is a really strange problem - it syncs well the built-in USB remote code but not when the shoot is originated from a script.  The description of the problem leads me to believe that in both modes it correctly waits for the USB 5v signal to go away at wait_until_remote_button_is_released in kbd.c.    And from there on,  script or no script, the timing should be exactly the same.

So I'm grasping at straws.   Does the gentStereo device function as a simple switch (press button for 5V,  release for 0v)  or does it do a pulse sequence thing like the Ricoh CA-1 ? From their web page,  it seems to have several modes.


Ported :   A1200    SD940   G10    Powershot N    G16

Re: multicam: synch problems when using scripts
« Reply #15 on: 14 / July / 2012, 13:15:15 »
I use the gentStereo as a simple switch, no pulse sequences.

The built'in USB sync is good but even that is not perfect comparing to what
I read SDM should be able to do (sync at 1/1000th with flash)

I got good results but even with the built-in USB sync sometimes there are darker or brighter images...

I read in a post that sync is not assured on cams  after S95... could it be that?

I replied you for sdm.

bye and thanks

Re: multicam: synch problems when using scripts
« Reply #16 on: 14 / July / 2012, 13:16:45 »
Does the gentStereo device function as a simple switch (press button for 5V,  release for 0v)

Yes, that is all.

Quote
does it do a pulse sequence thing like the Ricoh CA-1 ?

No.

Quote
From their web page,  it seems to have several modes.

that is just a time-lapse mode and a SPORTS mode intended for synchronised fast action.

As I say, I am busy with some domestic tasks right now and after that have to port a camera for someone.

(well, I don't HAVE to  ..).

I will look at the CHDK code to see if there is anything 'untoward'.


David

Re: multicam: synch problems when using scripts
« Reply #17 on: 14 / July / 2012, 13:25:42 »
I read in a post that sync is not assured on cams  after S95... could it be that?

Both cameras were released the same day !

Of course, that does not guarantee good synch.

I have just thought of something  ....

Because the capture task can be randomly interrupted by other tasks, it will never have 100% perfect synch (sub-msec).

In fact, you can only expect about 80% with S95 (based on tests).
Assume the SX130is is the same.

Now, I am not a statistician but I would expect perfect synch between 4 cameras to be 80% x 80% = 64%.

Between 12 cameras, I would expect  64% x 64% x 64%, etc

I cannot be bothered working out 60 cameras but the chances of them all being in synch must be near zero !

Someone better at statistics can comment.


David


Re: multicam: synch problems when using scripts
« Reply #18 on: 14 / July / 2012, 13:41:44 »
The built'in USB sync is good but even that is not perfect comparing to what
I read SDM should be able to do (sync at 1/1000th with flash)
The code SDM uses to do the actual sync is pretty much identical to the CHDK code  (wait_until_remote_button_is_released in kbd.c).  So results should be comparable.


Because the capture task can be randomly interrupted by other tasks, it will never have 100% perfect synch (sub-msec).

In fact, you can only expect about 80% with S95 (based on tests).
What does 80% mean ? They are exactly in sync 80% of the time and the other 20% of the time they are not ?   What decides exact sync - what resolution I guess.  Is a 0.0001 mSec difference enough to be in the 20% rather than the 80% ?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: multicam: synch problems when using scripts
« Reply #19 on: 14 / July / 2012, 14:03:07 »
What does 80% mean ? [/quote]

Less than one msec.

this is simply a value that stereo photographers find adequate for action shots, fast moving water, etc.


 

Related Topics