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

Multi-camera setup project.

  • 462 Replies
  • 216445 Views
*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #390 on: 23 / November / 2016, 08:36:31 »
Advertisements
@reyalp


Ah , yes , we had discussed it earlier..tried to solve the same problem as i had back then (it still remains) and i had a crazy idea that "shoot_burst" was command at its own.
But i had the feeling that it was a camera-side command , triggered by the "shoot" command...and the link reminded me that fact.

Anyway , something irrelevant.Is there a way to reload "lua" config files without closing/re-opening the program?
I am testing some things , trying to solve the problem with the "2 shots" , and i have to close/re-open the program after every change i make to the files.
Can it be somehow to reload them on-the-fly?
Its not important , just saying :)




Thanks
« Last Edit: 23 / November / 2016, 08:39:41 by mphx »

*

Online reyalp

  • ******
  • 14128
Re: Multi-camera setup project.
« Reply #391 on: 23 / November / 2016, 21:10:33 »
Ah , yes , we had discussed it earlier..tried to solve the same problem as i had back then (it still remains) and i had a crazy idea that "shoot_burst" was command at its own.
But i had the feeling that it was a camera-side command , triggered by the "shoot" command...and the link reminded me that fact.
I admit I don't recall what exact details of the problem you were having, but burst shooting works for me, so if you want to make any further progress, you'd probably need to do debugging on your end.
Quote
Anyway , something irrelevant.Is there a way to reload "lua" config files without closing/re-opening the program?
Lua files are not config files, they are code that runs in chdkptp. So whether reloading makes sense depends on how the code you are loading interacts with the rest of the code.

When you use !require... to load something, it only loads the source code the first time. If you call require again, it just returns the same thing that was loaded before, without re-loading the source code.

You can force the code to be loaded again by using !forcerequire... instead, but again, whether this makes sense or not depends on what the code does. It often works, but modules that interact with other modules could break in unexpected ways.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #392 on: 23 / November / 2016, 21:52:15 »
@reyalp


Yes , bad choice of words..not configs.I have created a tab in the GUI , and put my buttons , to control the camera rig.
So i was changing things in the lua file i have created for this "new tab" , to play with the shoot command.Thing is that for every change i make to the lua file...i close the program..and re-open it so it will re-read the file and the changes.
After a while is tiring :)
I will play with "!forcerequire".Will make a new button just for it , to avoid the whole fuzz i mentioned above.


The problem is that for our shooting needs , we shoot 2 shots , 5 secs apart.5 secs is something we wish to reduce..at about 2secs max.
Thing is , that the second shot at 2secs or below is out of sync.
At this point i am down to the following command:
Code: [Select]
mc:shoot{shots=2,interval=2000,synctime=100,cont=true}where interval value is something i change for testing.
Testing with 2 ixus 160 at home , things go smoothly...testing with  x number of canon a2500 at the studio , same problem , 2nd shot out of sync.
I'm gonna do some more tests next days , re-check that all cameras have the same settings (mostly review image off , continuous mode on ) and see what'll happen .

*

Online reyalp

  • ******
  • 14128
Re: Multi-camera setup project.
« Reply #393 on: 24 / November / 2016, 16:13:14 »
So i was changing things in the lua file i have created for this "new tab" , to play with the shoot command.Thing is that for every change i make to the lua file...i close the program..and re-open it so it will re-read the file and the changes.
In this case, your file is probably changing global state (IUP controls and so on)  that doesn't get reset when you re-load the file. E.g. if your module creates a tab, it might create a new tab every time you load it instead of changing the behavior.

I wouldn't really expect forcerequire work well in this case, but if what you are actually working on is e.g. functions that are called when certain buttons are pressed, then you could make a lua file that just defines those functions, and load that every time you edit.

Quote
The problem is that for our shooting needs , we shoot 2 shots , 5 secs apart.5 secs is something we wish to reduce..at about 2secs max.
Thing is , that the second shot at 2secs or below is out of sync.
At this point i am down to the following command:
Code: [Select]
mc:shoot{shots=2,interval=2000,synctime=100,cont=true}where interval value is something i change for testing.
Testing with 2 ixus 160 at home , things go smoothly...testing with  x number of canon a2500 at the studio , same problem , 2nd shot out of sync.
I'm gonna do some more tests next days , re-check that all cameras have the same settings (mostly review image off , continuous mode on ) and see what'll happen .
One thing I would suggest is testing what shooting rate you can get with a single a2500, and whether it maintains an accurate interval. If there isn't some configuration error (review mode, raw enabled, etc.) figuring out the real cause will probably require recording timing information in the camera code to figure out where it's getting out of sync.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #394 on: 25 / November / 2016, 09:36:32 »
@reyalp


I did some testings with the cameras at the studio.I came to a conclusion about what causes the problem.
You are more experienced from me , so you can tell me if my conclusion can be right or wrong.


I noticed that cameras that were out of sync , were the ones with the slow sd cards (there is a mixed of class 4 & class 6 sd cards in the cameras).
I noticed that the cameras with the slow sd cards , were "busy" longer than the others during the time period between the first and second shoot.
We switched sd cards among the cameras and the conclusion was served .
Is this something that could be affecting the shooting ? Meaning that some cameras would take longer to save the first image and so to be out-of-sync for the second shoot?


Something else we noticed.If we press the shutter button continuously (without chdk involved) , camera is shooting as supposed...display stays always on and just shoots.
When we are shooting through chdk/chdkptp , after every shot display flashes on/off + probably saves the photo before shoot the next image.
Why this difference in behavior?Something to do with the shoot command or chdk in general?


How can we emulate the "press continuously the shutter button" through commands?


Thanks again

*

Online reyalp

  • ******
  • 14128
Re: Multi-camera setup project.
« Reply #395 on: 25 / November / 2016, 16:33:55 »
@reyalp
Is this something that could be affecting the shooting ? Meaning that some cameras would take longer to save the first image and so to be out-of-sync for the second shoot?
Yes, absolutely. Whether it makes a difference depends on how long saving the image takes relative to other parts of the process, but I'm not surprised card speed has an impact. I'd suggest using class 10 cards everywhere. There's no point going to the higher UHS levels, because the camera hardware doesn't support them.

One thing I have noticed is that the first shot after booting tends to be a lot more variable than later shots. So it might help to have a single "warm up" shot before you try to take a synced burst.

Quote
Something else we noticed.If we press the shutter button continuously (without chdk involved) , camera is shooting as supposed...display stays always on and just shoots.
When we are shooting through chdk/chdkptp , after every shot display flashes on/off + probably saves the photo before shoot the next image.
Why this difference in behavior?Something to do with the shoot command or chdk in general?
Generally, the camera keeps the image on the screen in continuous mode, and blinks black if you use the "hold down half shoot, click full shoot" approach.

Assuming you are using the latest multicam.lua, mc:shoot should use continuous mode if it's enabled in the canon UI, unless you pass cont=false. So the fact it's going black suggests it might not be using continuous mode, but it could also just be a side effect of the hook used to synchronize continuous shooting on this particular camera.

Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #396 on: 25 / November / 2016, 16:59:36 »
@reyalp

Quote
Yes, absolutely. Whether it makes a difference depends on how long saving the image takes relative to other parts of the process, but I'm not surprised card speed has an impact. I'd suggest using class 10 cards everywhere. There's no point going to the higher UHS levels, because the camera hardware doesn't support them.


Well , i counted all the sd cards today on all cameras  27x class 6 , 37x  class4. So there is an issue now.Replacing atleast all 37x class4 is a bit of a cost.
We , either decide to replace them or go on another approach.Thinking of reducing the mpixels of photos being taken.
Less mpixels , less image size , less data to be written on the card.So the card speed would have less impact on this part of the process.
We will think it.Best solution for me is replacing the cards..but its not my call :)


Quote
One thing I have noticed is that the first shot after booting tends to be a lot more variable than later shots. So it might help to have a single "warm up" shot before you try to take a synced burst.


Yes we have noticed that too.We take 3-4 double shots for "warm up" before we start the real testing or shooting or whatever.


Quote
Generally, the camera keeps the image on the screen in continuous mode, and blinks black if you use the "hold down half shoot, click full shoot" approach.
Assuming you are using the latest multicam.lua, mc:shoot should use continuous mode if it's enabled in the canon UI, unless you pass cont=false. So the fact it's going black suggests it might not be using continuous mode, but it could also just be a side effect of the hook used to synchronize continuous shooting on this particular camera.


We enabled continuous mode on all cameras today and turned off "review image after shooting".
Shooting command had "cont=true" , so i suppose , continuous mode was enabled.
During double shooting , it was like "shoot 1st photo--display black--display on again---small busy time for saving photo i presume--shooting the second photo"
All these quickly in a time window of ~2secs.
When i tried "continuous mode" in a single camera , as i said , without chdk involved..it was like....shooting photos at a steady rate...display always on and no obvious signs of saving anything.


I wonder , what is happening in this case...doesnt it save the photos?I dont care about the display going on and off or not...in single-continuous-mode it seemed that it was no delay for saving anything...


Black screen doenst bother me , doesnt delay anything , i noticed at some times , that shooting was happening during the time display was black...i mean display truning on and off doesnt delay the shooting..it happens no matter what the display does.But saving photos obviously delays the procedure.


Bottom line , we achieved a nice 2 sec time during the double shooting.Lower times were out of sync.Probably that was the minimum time we could achieve with these cameras and these cards.
Thats more than satisfied for us (from a previous 5secs time).Now its up to us to decide the replacement of the cards...or the other option i mentioned above.


PS: yes , tests were done with latest multicam.lua.Revision 729 if i am not mistaken.

*

Online reyalp

  • ******
  • 14128
Re: Multi-camera setup project.
« Reply #397 on: 25 / November / 2016, 19:25:50 »
We , either decide to replace them or go on another approach.Thinking of reducing the mpixels of photos being taken.
Less mpixels , less image size , less data to be written on the card.So the card speed would have less impact on this part of the process.
It's worth trying, but beware that on some cameras smaller images require noticeably more processing time, so it can actually be slower. I think this mostly affected older cameras, but you should test to be sure. You could also try lower jpeg quality.

Low light mode shoots at lower resolution (M size) and should be much faster than other modes, but quality will be lower than normal M size. You can use CHDK to use lower ISO values in this mode, but you would have to control the exposure yourself.
Quote
When i tried "continuous mode" in a single camera , as i said , without chdk involved..it was like....shooting photos at a steady rate...display always on and no obvious signs of saving anything.
I don't understand what you mean by "obvious sign of saving anything". As far as I know, the only indication of saving is the LED blinking, which might happen other reasons (especially when using CHDK). The "Busy" message you sometimes see does not specifically indicate saving to SD.

The way the synchronized shooting in continuous mode works is by stopping the firmware deep in the shooting process where the Canon firmware wouldn't normally spend much time. It's hack, so weird behavior and differences between ports are not unexpected. It doesn't intentionally change saving behavior, but again side unforeseen side effects wouldn't be a surprise.

I started writing a script specifically to time this kind of shooting, but it's ended up being a lot more than a quick thing to throw into chdkptp, so I don't know when I'll have something to post. You could use fixedint http://chdk.wikia.com/wiki/Lua/Scripts:_Fixed_Exposure_Intervalometer in cont mode.

edit:
I forgot that I added some timing information to multicam at some point. If you use
!mc.verbose=true
and then run mc:shoot it will will return lines like

 msg="1 w:143 i=0, 2 w:83 i=2000, 3 w:83 i=2000"

Each sequence like "1 w:143 i=0" is a shot, with the fist number being the shot number.

w is the time between the camera being ready to shoot, and the time the shot needs to start to maintain the given interval and sync. i is the actual interval achieved. So in the example above, I had a 2 second interval, and on the second and third shot had 83ms to spare. If w is negative or interval larger than the interval option, the camera isn't able to keep up.
« Last Edit: 25 / November / 2016, 20:13:48 by reyalp »
Don't forget what the H stands for.

*

Online reyalp

  • ******
  • 14128
Re: Multi-camera setup project.
« Reply #398 on: 25 / November / 2016, 23:03:59 »
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #399 on: 26 / November / 2016, 08:29:41 »
@reyalp


There is a chance , my first conclusion might not be exactly the suspect.


First of all , i must say , that by testing with ixus 160 i cant get exactly correct results concerning the A2500s , but i get a rough idea of what is going on.
So i did some testings , with 2x ixus 160 and the use of "mc:verbose=true".Ixus cameras have some low capacity and i presume low speed sd cards (there is no indication of what class they are , but cards of 512mb and 128mb bought many years ago are not expected to be class 10 or something :P )



So i played around with the shoot command , and changing the interval value until i get as low as it can go positive "w" value .
Cameras achieved an interval value of around 1590-1600msecs.Canon A2500 at studio with class6 sd cards , couldnt go lower than 1800msecs.
Specs refer the same image rate per second (continuous mode) for both models.
So if the writing speed of sd cards was the suspect , then ixus 160 should must have achieved larger interval times since they had to write bigger image files (20mp vs 16mp) and the sd cards are not that speedy as class6 cards of A2500s...


So i come down to what you said , that "busy" time between shots is not necessarily meaning "saving to sd card" .Maybe means "i process the image , wait a bit" thing?
And maybe ixus 160 cameras have faster image processor than A2500s and thats why they achieve lower interval times?
I see at google that they have the same processor though , maybe its different hardware somehow?different implementation? I cant really say.


Anyways , i must check the interval times with that "verbose" thing on A2500s to see practically what interval times are achieved.


Thanks again for your infos.


PS : its a bit of big trouble to upload your script to every mounted camera and single-test it on each one of them...i am sure that the results would be enlightening though.

« Last Edit: 26 / November / 2016, 08:34:52 by mphx »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal