Building a mult-camera rig - page 17 - Hotwire! Hardware Mods, Accessories and Insights - CHDK Forum  

Building a mult-camera rig

  • 244 Replies
  • 35398 Views
Advertisements
Hi

IT IS WORKING !!!!!!

what a good feeling after so many long hours....

I am trying to come up with easy way to calibrate the cameras
From today tests, we found that the best way is to use two soccer / tenis balls on pole plus
use transparent sticker with X & Y crossed  lines on camera screen.

waterwings - could you change the size of the red & blue rectangular on live screen ? (camera No & Picture No.)
it will be easier to calibrate (at the moment of needed to stop the script in order to get full screen in live mode)
 

Thanks for everyone who assist me   :)

hope to upload pic tomorrow



waterwings - could you change the size of the red & blue rectangular on live screen ? (camera No & Picture No.)
it will be easier to calibrate (at the moment of needed to stop the script in order to get full screen in live mode)
It might be better to just change the script so that touching any button ( Menu / DISP / Up/Down/Left/Right/Set ) toggles the display on & off ?
Ported :   A1200    SD940   G10    Powershot N    G16

Yes ,it will better

Only today I understood what HH meant by alignment using 3ping pong /tennis balls .
Yesterday, we used only one ball , so we could get the camera align to the middle of the screen , but still we saw drift in camera angel.

We are planning to use transparency sticker and draw three circle to match the three balls.

Another issue is lighting, what do you recommend to use ? External flash or projector?


Oh... One important, it takes couple of sec (1-2) to download one picture via the USB when picture size is 16M pixel (3.6MB)
So we decreased the resolution to 1600*1200 PX

Update on progress

with better lighting, it will be awesome


Quote
It might be better to just change the script so that touching any button ( Menu / DISP / Up/Down/Left/Right/Set ) toggles the display on & off ?

@waterwings- yes, it may be better


10x


Quote
It might be better to just change the script so that touching any button ( Menu / DISP / Up/Down/Left/Right/Set ) toggles the display on & off ?
@waterwings- yes, it may be better
I was also thinking an additional command to do that from the PC might be even better.  Or both.

It will have to wait until the end of the week either way - I'm away from my build machine until then

Ported :   A1200    SD940   G10    Powershot N    G16

I've updated my bcamHost / bcamRem lua script to sort downloaded images into one subdirectory per shot with the images renamed to the camera number (i.e. Shot_8/Camera_nnn.jpg)

link> bcam.zip

Runs well enough for a "proof of concept".   Ideally I'd like to add a bit of code that lets you know if all the cameras you were expecting to be there are connected and running the bcamRem.lua script.

From the command line there are essentially four useful commands :

Code: [Select]
chdkptp  -e"exec bc=require('bcamHost') bc:reset()"
chdkptp  -e"exec bc=require('bcamHost') bc:shoot()"
chdkptp  -e"exec bc=require('bcamHost') bc:download()"
chdkptp  -e"exec bc=require('bcamHost') bc:shutdown()"
I think the meaning is pretty self explanatory.
Hello,
I added these line to BCamHost to delete all of the images:
Code: [Select]
function bc:del()
  for i,lcon in ipairs(self.cams) do
    con=lcon
    cli:print_status(cli:execute('rm A/DCIM '))
  end
And when I call a batch file with this:
Code: [Select]
chdkptp -e"! bc=require('bcamHost') bc:connect() bc:del()"It does not work? Is there smth wrong with above code?
Thank you so much

Code: [Select]
chdkptp -e"! bc=require('bcamHost') bc:connect() bc:del()"It does not work? Is there smth wrong with above code?
If it doesn't work,  then I think it's safe to say there is something wrong with the code.

I'm travelling this week and away from my computer so can't test this.  However, I'll make a couple of observations and I'm sure reyalp can provide a more definitive answer.

First of all, the design philosophy of bcam is for the host program (bcamHost.lua) to invoke functions on the camera to do its work.  This is not a technical requirement to make it work - it's just how I chose to do it.  So to stick with that,  you'd need a  cmds.remove_dir() in the camera side script (bcamRem.lua). 

Take a look at function bc:reset() in bcamHost.lua and function cmds.reset() in bcamRem.lua for an example of how this can work.

Instead,  you are trying to do it all from the PC side.  If you are going to go in that direction,  you might be better off working with reyalp's multicam.lua script - a much more sophisticated approach than my little "proof" of concept scripts.

http://chdk.setepontos.com/index.php?topic=6231.0
https://www.assembla.com/code/chdkptp/subversion/nodes/652/trunk/lua

If you still want to try what you are doing,  you are going to need to provide more information than "it does not work?".   What did you try ?  What do you see on the PC screen when you do that?  What did you do to fix it that also did not work?

Finally,  I would probably not support adding a command like that to my production code anyway.  Huge memory cards are inexpensive so saving space should not really be an issue.  But the consequences of issuing such a command accidentally would be permanent loss of all image data - not an acceptable trade off.   You are of course free to do whatever you want with your implementation.

Edit : i have no idea what is wrong with your code but this posts suggests that it should work Re: 3D SCANNER with multiple Cameras
« Last Edit: 28 / August / 2014, 11:02:20 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Thank you, waterwingz for your quick reply  :)
Your Bcam works perfectly on every tasks I've tried.
You are right, it's not necessary to have delete function from PC side because of inexpensive memory card and you also have a convenient download_last function.

Actually I did use successfully multicam.lua for downloading and deleting images from cameras by adding  lines below to multicam.lua
for downloading:
Code: [Select]
function mc:down()
  for i,lcon in ipairs(mc.cams) do
    con=lcon
    cli:print_status(cli:execute('mdl A/DCIM E:/test/'..i..'/ -fmatch=%.JPG$'))
  end
end
and for deleting all from memory card:
Code: [Select]
function mc:del()
  for i,lcon in ipairs(mc.cams) do
    con=lcon
    cli:print_status(cli:execute('rm A/DCIM '))
  end
end
And then call those function from a batch file. It works well.

But I really like your concept of using BCamRem.lua on the camera-side. That method helps rename downloaded images and folder perfectly, in my opinion. So I tried to add similar code for deleting to your BcamHost.lua.
By the way, could you help me to change the folder direction of the downloaded images on PC? Image folder is now in the same folder with chdkptp.exe. I have to edit this below line, right?
Code: [Select]
status, msg = cli:execute(string.format('d -nolua %s %s/',v.msg,dirname))
Edit: I've just checked,the multicam.lua I am using is a very old version
« Last Edit: 28 / August / 2014, 11:15:58 by HTAluvBeBeo »

*

Offline reyalp

  • ******
  • 11902
FWIW, it should be fairly easy to port the download and delete functions in the latest version of multicam to bcam. See the discussion starting around http://chdk.setepontos.com/index.php?topic=11667.msg114920#msg114920
Don't forget what the H stands for.

 

Related Topics