testing sync among more cameras - page 6 - General Discussion and Assistance - CHDK Forum

testing sync among more cameras

  • 121 Replies
  • 67716 Views
*

Offline vnd

  • *
  • 36
Re: testing sync among more cameras
« Reply #50 on: 03 / November / 2012, 13:02:58 »
Advertisements
It seems to work. The attached patch reads the counter at the moment of synch pulse, then it inserts one longer period. The length of the period is computed so it ends a constant time after the synch pulse. At the end of the longer period the camera shoots immediately.

It seems to give 100% synch under 1 ms.

It might work also for video, but somebody has to find a point at the beginning of video recording where to call it. I can't do it because I don't understand the ARM assembler that well.




Re: testing sync among more cameras
« Reply #51 on: 03 / November / 2012, 13:26:34 »
It seems to work. The attached patch reads the counter at the moment of synch pulse, then it inserts one longer period. The length of the period is computed so it ends a constant time after the synch pulse. At the end of the longer period the camera shoots immediately.
Exciting stuff !

I count three "hard coded" addressess in the patch that I guess would have to be found for every camera (and possibly every firmware version) ?

Also, are you deleting the sync delay code on the assumption it will no longer be needed ?  Or might you still need it as a "coarse" adjustment if trying stereo with two different camera models ?

Quote
It seems to give 100% synch under 1 ms.
At the risk of sounding like microfunguy,  how many trials were you able to run ?


Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline vnd

  • *
  • 36
Re: testing sync among more cameras
« Reply #52 on: 03 / November / 2012, 13:56:31 »
It seems to work. The attached patch reads the counter at the moment of synch pulse, then it inserts one longer period. The length of the period is computed so it ends a constant time after the synch pulse. At the end of the longer period the camera shoots immediately.
Exciting stuff !

I count three "hard coded" addressess in the patch that I guess would have to be found for every camera (and possibly every firmware version) ?

Two of the addresses are from here  http://chdk.setepontos.com/index.php?topic=7938.0 where it works with different camera, the other one (0xC0F07008) I found. As I understand it, these are Digic IV registers and should be the same at least on all Digic IV cameras.

Quote

Also, are you deleting the sync delay code on the assumption it will no longer be needed ?  Or might you still need it as a "coarse" adjustment if trying stereo with two different camera models ?
The implementation with delay loop is incompatible with this method.

Shorter delays can be just added to sync_time, longer can be implemented by counting the cycles.

A problem might be with translating msec to the units used by this counter, because different cameras have different base clock.

Quote
Quote
It seems to give 100% synch under 1 ms.
At the risk of sounding like microfunguy,  how many trials were you able to run ?

Around 30, then I got bored. I hoped that this will provoke someone else to test it :)

*

Offline vnd

  • *
  • 36
Re: testing sync among more cameras
« Reply #53 on: 03 / November / 2012, 17:40:29 »
I looked at the video mode. There is no fps change at the start of recording. That means that syncing it might be as simple as calling the new _wait_until_remote_button_is_released() function before kbd_key_press(USB_VIDEO_BUTTON).


Re: testing sync among more cameras
« Reply #54 on: 03 / November / 2012, 17:54:27 »
I cannot test synch this evening but should be able to tomorrow.

Are you able to provide a DISKBOOT.BIN for S95 100k ?

*

Offline vnd

  • *
  • 36
Re: testing sync among more cameras
« Reply #55 on: 03 / November / 2012, 19:10:36 »
Sure. It's here.

Re: testing sync among more cameras
« Reply #56 on: 03 / November / 2012, 19:42:43 »
Thanks, got it.

As I understand it, the sensors can operate in Video mode or Snapshot mode (to quote a sensor Data sheet).
LiveView is obviously video mode and the mechanical shutter is not used.
In Snapshot mode, the mechanical shutter closes at the end of exposure while the sensor is read.

On the same Data sheet I see the timing generator  ....  TGTask !
Maybe Ssg is shooting synch generator.

Anyway, we have this clock with a 30ms period, how do you suppose the 29.97 and slower frame rates are created from that ?
« Last Edit: 03 / November / 2012, 22:55:05 by Microfunguy »

Re: testing sync among more cameras
« Reply #57 on: 03 / November / 2012, 21:50:06 »
If you can also upload the 100H  DISKBOOT.BIN I know a very good tester for that.


*

Offline vnd

  • *
  • 36
Re: testing sync among more cameras
« Reply #58 on: 04 / November / 2012, 05:05:56 »
100H is attached.

As I understand it, the sensors can operate in Video mode or Snapshot mode (to quote a sensor Data sheet).
LiveView is obviously video mode and the mechanical shutter is not used.
In Snapshot mode, the mechanical shutter closes at the end of exposure while the sensor is read.

Yes, I understand it the same.
Quote
On the same Data sheet I see the timing generator  ....  TGTask !
Maybe Ssg is shooting synch generator.

I don't know. It seems that these tasks do more things.
SsgPeriodTask runs at the end of each period, but also at certain point inside the period. I guess that it controls data transfer from the sensor.

Quote
Anyway, we have this clock with a 30ms period, how do you suppose the 29.97 and slower frame rates are created from that ?
This is not fixed 30ms. The FPS timer is programmable. The math behind it is described here http://chdk.setepontos.com/index.php?topic=7938.0

Re: testing sync among more cameras
« Reply #59 on: 04 / November / 2012, 09:00:27 »
Let us see if I understand this.
In non-movie mode, the standard period is 0x110.
(in Movie mode it is 0x16B).

What value are you reading from 0x0040600C ?

At the instant the switch is released we know how far we are from the end of the standard period.
Taking that into account, we calculate a synch period that ends a fixed time after switch release.
It makes no difference that the two cameras are at different points in the standard period.
If we are within ten counts of the end of the standard period, the new settings will not take effect until after  the next period so the synch period is reduced by one standard period.

The synch period is therefore either less than three standard periods or less than two standard periods.
By delaying 40 msec we ensure we are in the lower half of either synch period.

At that point, the shot is taken immediately.

Is that explanation correct, any other detail ?
« Last Edit: 04 / November / 2012, 10:39:48 by Microfunguy »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal