Multi-camera setup project. - page 26 - Creative Uses of CHDK - CHDK Forum  

Multi-camera setup project.

  • 462 Replies
  • 207471 Views
*

Offline reyalp

  • ******
  • 14117
Re: Multi-camera setup project.
« Reply #250 on: 25 / October / 2014, 18:16:48 »
Advertisements
mphx / reyalp, Can you confirm it solved the issue ? (second, Will it work on my FW version 1.3.0-3492)?
Using key clicks should be exactly equivalent to using the actual controls on the camera, so it should work if doing it manually on the camera gives correct results.

However, as I noted in the earlier posts, you will need to make sure all the cameras end up on the same zoom step. On elph130 at a least, this requires additional logic, because the number of steps it moves per click does not appear to be completely deterministic. It's possible that using levent functions would be more predictable.
Don't forget what the H stands for.

Re: Multi-camera setup project.
« Reply #251 on: 25 / October / 2014, 18:21:32 »
However, as I noted in the earlier posts, you will need to make sure all the cameras end up on the same zoom step. On elph130 at a least, this requires additional logic, because the number of steps it moves per click does not appear to be completely deterministic. It's possible that using levent functions would be more predictable.
By "additional logic" I assume you mean a small script that handles the clicks and checks the zoom position and corrects where necessary?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14117
Re: Multi-camera setup project.
« Reply #252 on: 25 / October / 2014, 18:34:58 »
By "additional logic" I assume you mean a small script that handles the clicks and checks the zoom position and corrects where necessary?
Right, instead of
Code: [Select]
repeat click'zoom_in' until get_zoom() >= 50
something like
Code: [Select]
repeat
if get_zoom() < 50
click'zoom_in'
elseif get_zoom() > 50
click'zoom_out'
end
until get_zoom() == 50
(edit: the above code would try indefinitely, which may not be what you want...)

You might also want a sleep in there somewhere, I noticed that get_zoom() may change after the click completes, you end up with something like
Code: [Select]
con 28> =repeat click'zoom_out' until get_zoom() <= 20 return get_zoom()
29:return:20
con 29> =return get_zoom()
30:return:19
It's possible that having a sleep would also avoid the overshoot issue.

I suspect that the cameras that only have 5-10 zoom steps are less likely suffer from these issues.
« Last Edit: 25 / October / 2014, 18:38:41 by reyalp »
Don't forget what the H stands for.

Re: Multi-camera setup project.
« Reply #253 on: 25 / October / 2014, 18:56:59 »
Code: [Select]
repeat
if get_zoom() < 50
click'zoom_in'
elseif get_zoom() > 50
click'zoom_out'
end
until get_zoom() == 50
Is it worth doing :

Code: [Select]
press("zoom_in")
sleep(delay)
release("zoom_in")

where delay is a small value ?

edit : fixed typo pointed out by reyalp (below)
« Last Edit: 25 / October / 2014, 20:32:59 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 14117
Re: Multi-camera setup project.
« Reply #254 on: 25 / October / 2014, 20:31:46 »
Is it worth doing :

Code: [Select]
press("zoom_in")
sleep(delay)
release("zoom_out")

where delay is a small value ?
There is already some delay built into the press/release functions. I tried using just press'zoom_in' release'zoom_in' and it didn't seem to move less than click.

There is some variation in click delay between ports, so it might make a difference on some cams.

(probably a typo, but your zoom_in/zoom_out are mismatched above).
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14117
Re: Multi-camera setup project.
« Reply #255 on: 25 / October / 2014, 21:05:17 »
I did some more testing with elph130. The zoom definitely keeps moving for a while after a click, and sending clicks to rapidly means that some are effectively ignored.

My test code was variants of
Code: [Select]
> =i=0 repeat click'zoom_in' i=i+1 z0=get_zoom() sleep(100) z1=get_zoom() until z1 >= 50 sleep(500) return i,z0,z1,get_zoom()
15:return:22
15:return:50
15:return:53
15:return:53

> =i=0 repeat click'zoom_in' i=i+1 z0=get_zoom() sleep(1000) z1=get_zoom() until z1 >= 50 sleep(500) return i,z0,z1,get_zoom()
24:return:11
24:return:49
24:return:52
24:return:52
Note the number of iterations drops by half with the longer sleep between clicks.

I also tried using post_levent_to_ui, which wasn't obviously more consistent.
Code: [Select]
=i=0 repeat post_levent_to_ui('PressTeleButton') sleep(50) post_levent_to_ui('UnpressTeleButton') i=i+1 z0=get_zoom() sleep(250) z1=get_zoom() until z1 >= 50 sleep(500) return i,z0,z1,get_zoom()
43:return:12
43:return:52
43:return:54
43:return:54
Don't forget what the H stands for.


*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #257 on: 13 / November / 2014, 10:25:50 »
Clients are starting to come...mostly because we went live on air yesterday :)

A magazine did an article about us , and since then we get TV offers from various tv channels :)

One live yesterday , one tomorrow , one at Saturday and one next week...and we don't know what else will follow :)

We are evolving into TV personas :)

PS: i can link you the footage from yesterday's live if you like people , but its a greek tv show and i don't know if you will understand anything :)


Re: Multi-camera setup project.
« Reply #258 on: 13 / November / 2014, 14:25:51 »
Great stuff mphx - this  :xmas will be better than last !

Edit:
PS: i can link you the footage from yesterday's live if you like people , but its a greek tv show and i don't know if you will understand anything :)
Please do (i'd love to see it at least: "Leonidas (the return, value)"  :D - maybe reyalp, WW (if they started to charge) & you could buy the Hellenic Republic shortly, or Santorini https://www.youtube.com/watch?v=hVkA7G33EGk at least (that'd do)!!).

Other

Until today I had been thinking that programmatic ptp synch is now the way to go (and maybe it is based on mphx's latest post) - especially if tight synch is not an absolute requirement because of shooting in a black room using flash. However, it just struck me that multicam.lua (or the logic of parts of it) has been developed to a state which means the following quote may no longer be such a big deal - with respect to loss of ptp comms at a point in a usbremote enabled process which I describe, or perhaps re-describe, in more detail below:

If you want to use CHDK's USB remote "sync" feature,  you need to be able to disconnect the 5V "red" wire to all 80 cameras at exactly the same time.  If you don't want to lose USB communications, then you can't simply turn off the power to all the hubs (even supposing that causes the individual cameras to all see the power go off at exactly the same time).

If you can make reyalp's calibrated sync shooting mode in multicam.lua work acceptably then you are spared the pain of trying to switch the hubs.   Note that your earlier tests on two cameras don't tell you what will happen with 80 cameras - the sync error is not 80x(two camera sync error).   It might actually be okay for your application.
 

...i.e. maybe it no longer necessarily matters to workflow if ptp comms is lost at a point in the following sequence of steps:

USBREMOTE process

i.e with

  • Remote Enabled / OnePush / Synch Enabled
  • the kbd.c hack in place incorrect, the kbd.c hack is not needed as continuous ptp comms is unimportant the kbd.c hack in place
  • a full usb powered hub network in place (between workstation and cameras)

then:

in the morning, when power is first applied via a single (mains power) switch to the hubs (&all Camera 5V USB line), wait for the 10 (or 20 seconds?) Remote Onepush timeout to occur - no shot.

then:

START:

for cameras with full "M"anual control (SX150IS - Mode Dial set to "M"), run some multicam type code to:
(i) capmode change to AUTO Mode (ii) set zoom & (iii) autofcus & then (iv) capmode change to Manual Mode and  Manual Focus (v) & finally stop any long running chdkptp initiated camera script

then:
if necessary, physically tweak focus on cameras.

then:
run some multicam type code to:
set Canon (i) shutter period (ii) aperture for correct upcoming blackroom/flash shoot exposure (iii) & finally stop any long running chdkptp initiated camera script

then:
physically disconnect the usb network connection between workstation & first powered hub --> PTP comms lost here – but no script running on camera anyway
turn off single mains switch power to hub network -->  (but no impact to camera settings – correct? since cameras in Manual mode & MF & the prior One Push remote timed out)

then:
turn on single mains switch power to hub network (shoot-half) --> but cameras have zero focus/exposure work to do(or, at least, very little work to do?)

then:
within 10 (or 20 secs?) - but preferably near instantly so not to annoy subject pose -  turn off single mains switch power to hub network (shoot-full)...also interface from the usb mains power switch the switch to turn-off room lighting / setup flash at this point (can tweek USB remote delay to fit in with this)

then:
physically connect the final usb network connection between workstation & first powered hub, turn on single mains switch power to hub network, wait 10 (or 20 seconds?) for OnePush timeout period to expire

then:
run multicam type script in order to download last image / cleanup

then goto
START

Apologies for the slightly long winded description - does the flow seem, 5V decay voltage uncertainties aside, like a possible way round "last leg" 5V switch building / programmatic ptp uncertainties ?

If this approach is feasible, perhaps "Hardware-Hackers" hacked hubs could ease the voltage decay issue? 

Or perhaps it is just a lot more hassle than switching out the last leg of the 5V with relays or  programmatic ptp shooting  ::)

All that aside,

I just downloaded a 1.3 chdk from http://mighty-hoernsche.de/trunk/ (sx150is-100a-1.3.0-3721-full) and used the multicam code in this present thread to upgrade my old, locally built, chdk i.e no kbd.c hack (SD card reader in laptop died  :( ).

Problem is, with Remote Enabled / OnePush / Synch Enabled the camera acts exactly like this:


There is one thing I don't get:
"If the Enable Sync option is set in CHDK then each camera will wait for the final transition of the USB signal ( 5V to 0V )."
It seems just to be the opposite, with Sync enabled my camera takes a shot immediately when it gets 5V on the usb port and as reslult the camera's are not in sync. (elph300hs, one push, normal control mode)

With sync disabled** it works as I would like it takes the shot as soon as the 5v is switched off, just like the inverted remote script.

**Tested  in M/ AUTO /P - even when 5V turned off after 60 secs

Any chance a kind guru could comment on or, even better, fix the "capt_seq.c", e.g. http://chdk.setepontos.com/index.php?topic=8810.msg92334#msg92334, if that is the problem ?

PS: if everything was sitting waiting for the shot, as described, in M mode (having got there through capmode) and in MF should the OnePush period (after reaching 5V) to attain "lock" be practically zero (since, in my mind, the camera doesn't need do much of anything) ?
« Last Edit: 15 / November / 2014, 05:43:24 by andrew.stephens.754365 »

Re: Multi-camera setup project.
« Reply #259 on: 13 / November / 2014, 17:23:21 »
Any chance a kind guru could comment on or, even better, fix the "capt_seq.c"
Whatever you are seeing, it is unrelated to the thread you linked.  The necessary code is in capt_seq.c for the SX150HS.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal