A couple of Multicam doubts and general help - page 12 - General Help and Assistance on using CHDK stable releases - CHDK Forum

A couple of Multicam doubts and general help

  • 159 Replies
  • 78983 Views
Re: A couple of Multicam doubts and general help
« Reply #110 on: 23 / February / 2020, 17:06:26 »
Advertisements
That's great Reyalp, thanks!! I will be testing it tomorrow :)

Re: A couple of Multicam doubts and general help
« Reply #111 on: 27 / February / 2020, 10:30:19 »
Should I do this,
If you wanted to start from the cameras current focus distance from auto focus, you could use something like
Code: [Select]
my_focus_table={}
mc:cmwait('preshoot')
local status,result=mc:cmdwait("call return get_focus()")
for id, res in pairs(result) do
 my_focus_table[id]={sd=res.status.status[1]}
end
And then,

Code: [Select]
fsutil.writefile_e(util.serialize(my_focus_table,{compact_arrays=false}),'my_focus_table.txt')
To create a file with the focus distances where the current AF is? Correct?
Regarding the focusing/exposure table, is this the correct format?

Code: [Select]
my_focus_table={
[1]={sd=2100,tv96=0.06,svm=100,av=4,nd=2},
[2]={sd=1980,tv96=0.04,svm=100,av=4,nd=2},
...
A few more things...
- Reboot option makes one of the cameras lens crackle and then crashes while retracting the lens (just one of the A2500, the rest are fine) whereas if I Shutdown, it works fine. Odd...
- Zooming is still very unstable. Most cameras do zoom in/out nicely, but there's four cameras (in the same power source) that always crash. Interestingly, I get a timeout error on about fifteen of them, but excepting these four i can reconnect to the rest. Looks like the error in those four has a cascade effect in the rest?? I'll try to see what happens if a couple of them are battery powered
- I suppose that check_connections and the current workflow doesn't allow for any remote reboot command, right? It's quite incovenient to reboot them manually, given the fact that I installed clamps in the on/off buttons so they power up automatically. (I should install individual switches on all the power lines?)  :(
- Oddly enough, the one single IXUS 165 I (still) have... Always crashes starting the download stage if there's been a shoot before. If I just connect and download, everything works fine.
- A minor thing. Looks like the G10s have a different zooming ratio than the SX150 and A2xxx. If I enter 40 as zoom value, they go way beyond what the others do. Would it be possible to add zoom values to the camopts table? Just a quick idea...
- And finally, while doing the 3D reconstruction JPGs (oddly enough) are giving me better results than DNGs. I didn't expect this, unfortunately the colour balance (even if set to WB_MODE,1) is all over the place. Any ideas on how to get a consistent white balance across the JPGs in the whole rig? I've tried correcting it in Photoshop and Lightroom, but it's very cumbersome and inconsistent :(


I'm still working out many bits and pieces. The goods news is, I've managed to hook 6 Nikon DSLRs to the rig, and shoot them remotely in quite good sync with the CHDKs. Quality improvement is massive! :D

Re: A couple of Multicam doubts and general help
« Reply #112 on: 27 / February / 2020, 14:13:47 »
Ok, so I managed to get the focus table to work. But I'm quite puzzled with the results, numbers are all over the place... I've downloaded the pics and they all seem to be in good focus, but look at the results....

Code: [Select]
{
 [1]={
  sd=666
 },
 [2]={
  sd=479
 },
 [3]={
  sd=-1
 },
 [4]={
  sd=731
 },
 [5]={
  sd=505
 },
 [6]={
  sd=1536
 },
 [7]={
  sd=1558
 },
 [8]={
  sd=1244
 },
 [9]={
  sd=1635
 },
 [11]={
  sd=482
 },
 [13]={
  sd=-1
 },
 [14]={
  sd=526
 },
 [15]={
  sd=798
 },
 [16]={
  sd=-1
 },
 [17]={
  sd=2576
 },
 [18]={
  sd=1153
 },
 [19]={
  sd=581
 },
 [20]={
  sd=2201
 },
 [21]={
  sd=842
 },
 [22]={
  sd=559
 },
 [23]={
  sd=-1
 },
 [24]={
  sd=479
 },
 [25]={
  sd=-1
 }
}
Number 3, is a G10, I can see it nailed the focus and can see every detail, but it says (-1) which I guess means it didn't lock focus. How much should I trust these numbers? Are they in different scales/proportions? They differ from around 500 to 2500 and all cameras are placed around 200cm from the subject with the central focus point aimed at it.

*

Offline reyalp

  • ******
  • 14128
Re: A couple of Multicam doubts and general help
« Reply #113 on: 27 / February / 2020, 15:02:12 »
Number 3, is a G10, I can see it nailed the focus and can see every detail, but it says (-1) which I guess means it didn't lock focus. How much should I trust these numbers? Are they in different scales/proportions? They differ from around 500 to 2500 and all cameras are placed around 200cm from the subject with the central focus point aimed at it.
-1 means "infinity". Aside from that, the values are always in mm, so your cameras are nominally focusing between 0.5 and 2.5 meters, or infinity. These values are not particularly precise. At wide angle, the depth of field is large, and it's normal for "infinity" to start fairly close.

If it looks OK, you could just not worry about it. Or you could just set them all to 2 meters.

If you want to compare focus in an objective way, one simple method is to compare jpeg file sizes with exposure parameters and lighting held constant. Files with more detail will be larger. If the subject you want to focus on doesn't fill the frame, you should crop to the subject area and save that before comparing, otherwise the background being in focus could throw things off. You can batch crop the center of the frame with programs like imagemagick or gmic.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14128
Re: A couple of Multicam doubts and general help
« Reply #114 on: 27 / February / 2020, 17:04:38 »
Code: [Select]
my_focus_table={
[1]={sd=2100,tv96=0.06,svm=100,av=4,nd=2},
[2]={sd=1980,tv96=0.04,svm=100,av=4,nd=2},
...
FWIW, you should only need to set the values that are different from what is set in the command. Setting them all like you have here is fine too.
Also, as I've mentioned before, many of your cameras do not have an adjustable aperture, so the AV value will be ignored.

Quote
- Reboot option makes one of the cameras lens crackle and then crashes while retracting the lens (just one of the A2500, the rest are fine) whereas if I Shutdown, it works fine. Odd...
I'd suggest switching to playback and letting the lens retract (or using an eventproc to retract it https://chdk.setepontos.com/index.php?topic=6857.msg73227#msg73227) before using reboot.

However, the fact that only one of the a2500 is affected suggests there's a hardware or power supply factor involved too. You could try getting a romlog from that camera.

Quote
- Zooming is still very unstable. Most cameras do zoom in/out nicely, but there's four cameras (in the same power source) that always crash. Interestingly, I get a timeout error on about fifteen of them, but excepting these four i can reconnect to the rest. Looks like the error in those four has a cascade effect in the rest?? I'll try to see what happens if a couple of them are battery powered
This seems very likely to be a power issue.

Quote
- I suppose that check_connections and the current workflow doesn't allow for any remote reboot command, right? It's quite incovenient to reboot them manually, given the fact that I installed clamps in the on/off buttons so they power up automatically. (I should install individual switches on all the power lines?)  :(
As I said before, if the camera is crashed, then there is not going to be any software way to reboot it. To have software controls, you would need to implement the hardware and software to actually control the power supplies (using GPIO and relays for example)

Quote
- Oddly enough, the one single IXUS 165 I (still) have... Always crashes starting the download stage if there's been a shoot before. If I just connect and download, everything works fine.
A romlog and the specific code or sequence of actions involved might be helpful. Also, do you mean ixus 160? There isn't (AFAIK) an ixus165 port.
Quote
- A minor thing. Looks like the G10s have a different zooming ratio than the SX150 and A2xxx. If I enter 40 as zoom value, they go way beyond what the others do. Would it be possible to add zoom values to the camopts table? Just a quick idea...
The zoom value is in "steps" so it will vary a lot between cameras. It would make sense to allow in camopts, I'll look into adding that. An option to set zoom by 35mm equivalent focal length would also be a good idea.

Quote
- And finally, while doing the 3D reconstruction JPGs (oddly enough) are giving me better results than DNGs. I didn't expect this, unfortunately the colour balance (even if set to WB_MODE,1) is all over the place. Any ideas on how to get a consistent white balance across the JPGs in the whole rig? I've tried correcting it in Photoshop and Lightroom, but it's very cumbersome and inconsistent :(
This doesn't surprise me, Canon jpeg processing is very good, and you usually have to work to get better results from raw.
If shots are taken in similar lighting with the same WB setting, you could potentially come up with processing profiles you can re-use between sessions. Raw Therapee lets you do command line processing with saved profiles (https://rawpedia.rawtherapee.com/Command-Line_Options),  I expect similar things are possible with other programs.

Aside from color balance, you may also need to correct lens distortion in CHDK raw. This could vary a lot between camera models.
Don't forget what the H stands for.

Re: A couple of Multicam doubts and general help
« Reply #115 on: 28 / February / 2020, 05:25:23 »
I'd suggest switching to playback and letting the lens retract (or using an eventproc to retract it https://chdk.setepontos.com/index.php?topic=6857.msg73227#msg73227) before using reboot.

However, the fact that only one of the a2500 is affected suggests there's a hardware or power supply factor involved too. You could try getting a romlog from that camera.
The reboot and shutdown options are basically the same, cameras go into play mode and then the reboot/shutdown command is sent. I'm puzzled because shutdown works perfectly 100% of the times, but reboot doesn't. I doubt it's power related, since shutdown is OK and this camera is in a safe power source (not the one in conflict with the zoom option). Here's the code.... In any case it's a minor thing, I only mentioned because I find it odd.
Code: [Select]
elseif option == '7' then        ---------SHUTDOWN
  mc:cmdwait('play')
  mc:cmd('call sleep(2000) shut_down()')
  mc:disconnect()
  break
 
 elseif option == '8' then        ---------REBOOT
  mc:cmdwait('play')
  mc:cmd('call sleep(2000) reboot()')
  mc:disconnect()
  break
 end
Quote
This seems very likely to be a power issue.
I couldn't test it yesterday, I will today... That group of cameras (in the same power source) is my main headache, I will test with batteries and split into two power sources if needed. If nothing works, I'll have to install mini switches for each camera and make use of check_connections (which BTW is such a great addition, congrats!)
Quote
A romlog and the specific code or sequence of actions involved might be helpful. Also, do you mean ixus 160? There isn't (AFAIK) an ixus165 port.
Yeah IXUS 160, sorry. The code is basically the same as in #88, the sequence is just Init&Sync, Shoot a couple of pics and then Download... Crashes. If I reboot the whole system and Init&sync and go directly to download, it works fine...
Quote
The zoom value is in "steps" so it will vary a lot between cameras. It would make sense to allow in camopts, I'll look into adding that. An option to set zoom by 35mm equivalent focal length would also be a good idea.
That would be awesome! The camopts table is something else I'll be testing today. AV values will be eliminated and I'll compensate exposure with shutter speed. Just wanted to check if the format is the right one. I'll build the whole table like that, so changes in the future are easier to insert instead of setting individual exceptions (makes more sense in MY head)
Quote
This doesn't surprise me, Canon jpeg processing is very good, and you usually have to work to get better results from raw.
If shots are taken in similar lighting with the same WB setting, you could potentially come up with processing profiles you can re-use between sessions. Raw Therapee lets you do command line processing with saved profiles (https://rawpedia.rawtherapee.com/Command-Line_Options),  I expect similar things are possible with other programs.


Aside from color balance, you may also need to correct lens distortion in CHDK raw. This could vary a lot between camera models.
Canon processing is a bit too harsh with noise reduction and sharpening, but does a great job with distortion correction (which I think is what benefits the 3D reconstruction) That's the reason I was hoping for an in-camera solution. The shooting conditions are always going to be the same, so I'll need to test the best values for each camera (but I believe that's external and not possible to implement in camopts, right?) Edit:I was referring to White Balance here
« Last Edit: 28 / February / 2020, 11:33:16 by ikercito »

*

Offline reyalp

  • ******
  • 14128
Re: A couple of Multicam doubts and general help
« Reply #116 on: 29 / February / 2020, 21:43:48 »
In revision 930, I added support for setting zoom in mc:shoot. This can be set in camopts like the other values. There is also a zoomwait option which adds a delay after setting the zoom. This may be needed to avoid crashes, especially if you are also setting focus.

Example
Code: [Select]
!mc:shoot({zoom=10,sd=2000,zoomwait=200,camopts={{zoom=50},{zoom=100}}})
This sets the default zoom position to 10, subject distance to 2 meters, wait to 200ms. Camera 1 has zoom set to 50, camera 2 is set to 100.

The zoom number is in the camera zoom steps, which varies widely between models. Some older cameras only have 5 steps, while newer ones can have hundreds. If you want the same effective focal length, you'll need to figure out which zoom step corresponds to the desired focal length on each model.

I looked at setting zoom by EFL, but it would require support in CHDK code.

The reboot and shutdown options are basically the same, cameras go into play mode and then the reboot/shutdown command is sent. I'm puzzled because shutdown works perfectly 100% of the times, but reboot doesn't.
They do different things in CHDK code. A "soft" shutdown in CHDK should take care of retracting the lens just like if you had pressed the power button. A reboot is much less clean.

Quote
I doubt it's power related, since shutdown is OK and this camera is in a safe power source (not the one in conflict with the zoom option).
If you have many cameras of the same model (and firmware, since only 100A exists for A2500), and only one is affected, it suggests a hardware difference somewhere. Whether it's in the camera itself or external hardware is hard to guess.

The different groups of cameras could be affected by different electrical problems. For example, some might be caused by EMI, while others were supply voltage.
Quote
AV values will be eliminated and I'll compensate exposure with shutter speed.
Note G10 and SX150 do have adjustable apertures, so you may need to control those.

Quote
Canon processing is a bit too harsh with noise reduction and sharpening, but does a great job with distortion correction (which I think is what benefits the 3D reconstruction)
FWIW, you can control the sharpening of Canon jpeg a bit using the "my colors" custom setting, which can be controlled using propcases from script.

Quote
That's the reason I was hoping for an in-camera solution. The shooting conditions are always going to be the same, so I'll need to test the best values for each camera (but I believe that's external and not possible to implement in camopts, right?) Edit:I was referring to White Balance here
I think I didn't read your previous post carefully enough, I thought your WB problem was in raw processing. For jpeg, you can only set WB mode from script, and in modes other than custom, the cameras will still adjust the WB for each shot. To use custom WB, you'd need to set it individually on each camera.
There has been some work on finding ways around this:
https://chdk.setepontos.com/index.php?topic=12208.0
It's possible this could be finished into a usable feature.

If you are using raw, you almost certainly need to come up with settings for each camera model externally. White balance can be set completely after the fact, so you wouldn't need to change the camera setting (as long as you can tell your raw software not to use camera WB). Using CHDK raw, you'd almost certainly need to do distortion correction. Some lens profiles and information in this thread https://chdk.setepontos.com/index.php?topic=9268.0
Don't forget what the H stands for.

Re: A couple of Multicam doubts and general help
« Reply #117 on: 03 / March / 2020, 07:53:08 »

Damm... I'm having a very frustrating morning. I've been finding random connection issues, so I've been toggling ids and checking camera displays all morning. Would it be possible to turn the front LED on when cameras are connected? It'd make things so much easier. I tried it in the past as a command in the header (using set_led) but it never worked. :( I suppose it should be something like...??
Code: [Select]
mc:connect
if connect=true then set_led 9 1
But you know my syntax is not enough to get it working :(
Additionally, my two cents regarding mc:connect({list='cams.txt'}) It's great in order to have a tidy list of cameras. But in the process, since I'm quite often adding/changing/having problems with some of the cameras, newly added cameras are ignored at connect. I think it would be ideal if it would (as and option maybe?) connect to all available cameras, and id known ones according to the table, and new ones randomly... Does this makes sense?
Also, I haven't had time to test the camopts table. I still have zooming issues to resolve. But I will as soon as I can. And I just shot a batch of pcitures with a color calibration table in order to have proper color correction applied to the images. There's still a lot to do...  :'(
EDIT: Something odd is going on with focusing distances. Setting it to 2000, brings it way beyond where it should be. Way past 4 meters, subject is at 2 meters and out of focus. For more precision I gave it a try with cameras zoomed in (shorter DOF) Values do not correspond with real life measurements. I'm puzzled. Here's a gallery with my beautiful test subject and attached is myfocustable.txt too.
https://drive.google.com/open?id=1Np90dhbUvtOv60SBCl80T-Xs8yghUhvK
Edit: Not sure if the link is working, here goes another one....
https://drive.google.com/drive/folders/1Np90dhbUvtOv60SBCl80T-Xs8yghUhvK?usp=sharing
« Last Edit: 03 / March / 2020, 14:20:03 by ikercito »

Re: A couple of Multicam doubts and general help
« Reply #118 on: 03 / March / 2020, 12:52:38 »
Also, some more stuff... A few cameras are permanently throwing errors when zooming. Got a romlog and they all share the same error: ASSERT!! FocusLensController Is this too bad? Anything to fix it? See attached file A2500. I also attached a romlog for an A2400 which afterwards seems to be working fine, says Hardware Defect, but don't know related to what.
« Last Edit: 03 / March / 2020, 12:55:48 by ikercito »

*

Offline reyalp

  • ******
  • 14128
Re: A couple of Multicam doubts and general help
« Reply #119 on: 03 / March / 2020, 21:56:42 »
Also, some more stuff... A few cameras are permanently throwing errors when zooming. Got a romlog and they all share the same error: ASSERT!! FocusLensController Is this too bad?
What is the specific sequence of events that's triggering the error? Are you using the new zoom option on mc:shoot, or setting zoom as a standalone call to set_zoom()?
Are all of the cameras that are affected A2500? If so, are *all* of your A2500 affected, or just some?
What version of CHDK are you using? To check, you can use
Code: [Select]
!mc:cmdwait('call bi=get_buildinfo() return bi.build_number,bi.build_revision')
The assert by itself may be be one we've seen before related to focus.

Quote
I also attached a romlog for an A2400 which afterwards seems to be working fine, says Hardware Defect, but don't know related to what.
romlog is recorded when there is a problem, and stays there until the next one is recorded. So, if it's working fine, don't worry about it. The romlog is from a lens error, which could happen if the lens was jammed.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal