Script for taking a picture and downloading it to the computer - Script Writing - CHDK Forum

Script for taking a picture and downloading it to the computer

  • 9 Replies
  • 5335 Views
Advertisements
Hello

We have 8 PowerShot A2600 here and want to have a script which can be executed from a Computer/Laptop and does the following 2 things:

1.) Take a picture with all cameras at the same time
2.) Download the pictures back to the computer

An image will be taken every about 2 minutes so the speed after the picture has been taken doesn't really matter...
What matters more is that all the cameras are released at the same time.

Is there a script like this? If not, how can I get this to run?

Re: Script for taking a picture and downloading it to the computer
« Reply #1 on: 06 / August / 2015, 08:40:54 »
You probably want to start here :  CHDK Links : Multiple Camera Rigs.   Pay particular attention to anything about chdktptp and the various forum thread links down at the bottom.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Script for taking a picture and downloading it to the computer
« Reply #2 on: 06 / August / 2015, 10:03:46 »
Ok thanks alot!

*

Offline cdg

  • **
  • 53
Re: Script for taking a picture and downloading it to the computer
« Reply #3 on: 27 / August / 2015, 21:11:20 »
Hi Waterwingz:
     How could i just download last 5 pictures instead of all the pictures in my camera,i am now using CHDKPTP.

Re: Script for taking a picture and downloading it to the computer
« Reply #4 on: 27 / August / 2015, 21:50:07 »
Hi Waterwingz:
     How could i just download last 5 pictures instead of all the pictures in my camera,i am now using CHDKPTP.
reyalp is the chdkptp author and expert.  I suspect his answer might be that it's possible to do if you can write a Lua script that runs on the PC side and scrubs the camera directory file names looking for the highest numbers in the IMG_nnnn.JPG files.  Not simple unfortunately but technically possible.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14128
Re: Script for taking a picture and downloading it to the computer
« Reply #5 on: 27 / August / 2015, 22:08:18 »
If you are using multicam.lua, use the mc:download_images function with lastimg=5

Note this will fail if the image counter has reset within the last 5 images.

The imdl CLI command also supports this, with -last=5
Don't forget what the H stands for.

*

Offline cdg

  • **
  • 53
Re: Script for taking a picture and downloading it to the computer
« Reply #6 on: 28 / August / 2015, 00:24:00 »
Waterwingz:
    Thank you!!
Reyalp:
    Gald to see you again!!
    i find those two functions in the multicam.lua,  mc:download_images(opts) and  cmds.getlastimg(),but i did not find something like lastimg=5 that i could set the number.

*

Offline reyalp

  • ******
  • 14128
Re: Script for taking a picture and downloading it to the computer
« Reply #7 on: 28 / August / 2015, 01:09:01 »
    i find those two functions in the multicam.lua,  mc:download_images(opts) and  cmds.getlastimg(),but i did not find something like lastimg=5 that i could set the number.
!mc:download_images({lastimg=5})
Don't forget what the H stands for.

*

Offline cdg

  • **
  • 53
Re: Script for taking a picture and downloading it to the computer
« Reply #8 on: 31 / August / 2015, 03:00:21 »
Thank you!!!!! :lol :lol
And sorry i have question again
Is there a way to tell how many cameras have been connected to CHDKPTP ?

*

Offline reyalp

  • ******
  • 14128
Re: Script for taking a picture and downloading it to the computer
« Reply #9 on: 31 / August / 2015, 16:33:19 »
Is there a way to tell how many cameras have been connected to CHDKPTP ?
You can use mc:list_all() to see all the cameras multicam thinks it's connected to.

If you just want to know the number you could use something like !print(#mc.cams)

Neither of these check the actual connection status, so if a camera crashed it would still be included.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal