3D SCANNER with multiple Cameras - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

3D SCANNER with multiple Cameras

  • 42 Replies
  • 27139 Views
Re: 3D SCANNER with multiple Cameras
« Reply #10 on: 09 / May / 2014, 06:36:06 »
Advertisements
I really don't know what he means!
But the way that is explained  above is very simple.
This in my first attempt to reconstruct a shoe model fron nrĀ°4 Canon a1400 Powershot...

Re: 3D SCANNER with multiple Cameras
« Reply #11 on: 09 / May / 2014, 06:40:01 »
Looks good !

How long did it take to do that ?

Re: 3D SCANNER with multiple Cameras
« Reply #12 on: 09 / May / 2014, 08:07:54 »
To take the photos about 30 seconds (send commands, etc..).
To elaborate the 3d model about 40 minutes (but i have and old computer with little RAM).

Re: 3D SCANNER with multiple Cameras
« Reply #13 on: 10 / May / 2014, 10:19:44 »
There are two things that i don't understand:
1) how to give a shutdown command for all 4 cameras;
2) when i start:

Code: [Select]
function download_and_delete()
  for i,lcon in ipairs(mc.cams) do
    con=lcon
    cli:print_status(cli:execute('mdl A/DCIM C:/1 -fmatch=%.JPG$'))
    cli:print_status(cli:execute('rm A/DCIM '))
  end
end

with

 !require'DownDel'

 !download_and_delete()

in C:/1 there are two directories (see file attached), every directory have 2 photos


*

Offline reyalp

  • ******
  • 14117
Re: 3D SCANNER with multiple Cameras
« Reply #14 on: 10 / May / 2014, 16:33:14 »
in C:/1 there are two directories (see file attached), every directory have 2 photos
The download command you are using will download every folder in the DCIM folder. It seems that two of your cameras have different folder names.

To avoid collisions (where the file number and folder happens to be the same on more than one camera), you should probably download a unique directory for each camera. Something like

Code: [Select]
function download_and_delete()
  for i,lcon in ipairs(mc.cams) do
    con=lcon
    cli:print_status(cli:execute('mdl A/DCIM C:/'..i..'/ -fmatch=%.JPG$'))
    cli:print_status(cli:execute('rm A/DCIM '))
  end
end
should do it download each one into a numbered folder for the camera. Note the numbers are just the order the cameras happened to be listed, so will not necessarily stay the same for each session. If you want to uniquely identify them, you could use the serial numbers.

If you don't want to get the camera folder names (100___05 etc) you will have to do a little more coding. I have plans to make this simpler in chdkptp, but I have a lot more plans than time ...

The code I've posted here is meant as a simple example to get you started, not a complete solution.
Don't forget what the H stands for.

Re: 3D SCANNER with multiple Cameras
« Reply #15 on: 12 / May / 2014, 06:46:33 »
Thank you reyalp,

Quote
If you don't want to get the camera folder names (100___05 etc) you will have to do a little more coding. I have plans to make this simpler in chdkptp, but I have a lot more plans than time ...

I'll be waiting..


Do you have some informations about how to give a shutdown command for all 4 cameras?

*

Offline reyalp

  • ******
  • 14117
Re: 3D SCANNER with multiple Cameras
« Reply #16 on: 12 / May / 2014, 13:10:39 »
I'll be waiting..
Don't hold your breath  :P
Quote
Do you have some informations about how to give a shutdown command for all 4 cameras?
In multicam, you can execute lua code on all cameras using the call command. So
Code: [Select]
mc:cmd('call shut_down()')
should shut them all down.
Don't forget what the H stands for.

Re: 3D SCANNER with multiple Cameras
« Reply #17 on: 29 / May / 2014, 06:02:04 »
Hello everyone,
i was amazed from this post:

http://chdk.setepontos.com/index.php?topic=11263.msg110534#msg110534

and

http://chdk.setepontos.com/index.php?topic=11261.msg110475#msg110475

I am a teacher of technical drawing and I would like to build with my students the same machine.
I've also read this post:
http://chdk.setepontos.com/index.php?topic=10045.0
so now I have some doubts about the feasibility of the project.

I have four A1400 Canon Powershot.
At the moment i am able (using multicam.lua) to shoot via chdkptp four photos at the same time (synchronization is not important).
The big problem for us is to modify multicam.lua to download the photos to pc.

Can anyone give us an help?

Thank you

Francesco

how to use multicam.lua with chdk ptp? I really need information. I tried to use multicam.lua and I always failed to shoot at the same time, help me please


*

Offline reyalp

  • ******
  • 14117
Re: 3D SCANNER with multiple Cameras
« Reply #18 on: 30 / May / 2014, 02:10:49 »
how to use multicam.lua with chdk ptp? I really need information. I tried to use multicam.lua and I always failed to shoot at the same time, help me please
These posts might help:
http://chdk.setepontos.com/index.php?topic=11490.msg112688#msg112688
http://chdk.setepontos.com/index.php?topic=8120.msg86429#msg86429
Specifically the parts about init_sync.

Depending on what you mean by "at the same" multicam may not be able to do what you want, you aren't likely to get much better than 40-50 ms sync with multicam (though this could probably be improved a bit using chdk 1.3 shoot hooks)

If you need higher precision, you need to use the "usb remote" approach.
Don't forget what the H stands for.

Re: 3D SCANNER with multiple Cameras
« Reply #19 on: 22 / June / 2014, 10:09:42 »
If you want to the CLI mdownload command instead of figuring out the API parameters, you could do it like this
Code: [Select]
!for i,lcon in ipairs(mc.cams) do con=lcon cli:print_status(cli:execute('mdl A/DCIM /some/path -fmatch=%.JPG$')) end

Hi, I modified your code to load script in camera from chdkptp like this:

Code: [Select]
!for i,lcon in ipairs(mc.cams) do con=lcon cli:print_status(cli:execute('lua loadfile('A:/CHDK/SCRIPTS/test.lua')()')) end

But it did not work:

Code: [Select]
ERROR: compile failed:[string "for i,lcon in ipairs(mc.cams) do con=lcon cli..."]:1: ')' expected near 'A'
Can you help me to resolve this problem?

UPDATE:

I can pass that error by change:
 
Code: [Select]
... lua loadfile('A:/CHDK/SCRIPTS/test.lua')() ...TO:
Code: [Select]
... lua loadfile("A:/CHDK/SCRIPTS/test.lua")() ...
But now, i faced with another problem that is all of my cameras shut down when i send loadfile command, even when cameras is in rec mode.

How to resolve this now?
« Last Edit: 22 / June / 2014, 22:13:37 by user972611 »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal