Notices


Reply
Thread Tools
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#1
Ladoga asked me for a way to take timed photos with rawcam.

My idea for this was quite different. I imagined an application where you could program exactly the timing, not only of the photos, but of the actions during the photos. For example you could program it to open the shutter, fire the flash 3 times quickly, then focus closer fire the flash again and close the shutter. I experimented a bit with boost.python and managed to make a binary which, while it does control the camera (I can hear the lens) it hangs without much info of what is happening.

So for now I have settled with a much more low-tech solution. I made a simple command line camera which can be controlled with your plain old shell scripts (or timed, or python) to take photos with whatever settings you pass as parameters.

Of course you'll need developer mode to run it. Ignore the origin complaint aegis will spit out during installation and run it in a develsh shell as user.

Available parameters
Code:
--path - path to save pictures. Defaults to /home/user/MyDocs/DCIM
--shutter - exposure time in microseconds (default 50000)
--iso - self explanatory (default 100)
--whitebalance - white balance in K (default 3500)
--flash - sets the flash on
--focus - focus point in meters (default infinity)
--nosound - disables shutter sound
--size - one of S M L XL
There is no automatic exposure/focus (maybe sometime I may do that)

Download here http://maemo.qwazix.com/cmdCam/

Please share your scripts below. I will provide an example template for sharing scripts in the second post so that are easy to use.
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob

Last edited by qwazix; 2013-04-21 at 19:34.
 

The Following 13 Users Say Thank You to qwazix For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#2
Script sharing template
this is not an actual working script

Timelapse script for capturing sunset

Scene
Code:
Location: Outdoors
Weather conditions: cloudy 
Ambient Light: Dim
Main Theme: landscape/sunset
Focus: steady - infinity
Timing: linear (1 every 5 minutes)
Notes: Some notes
Script
Code:
#!/bin/sh
### YOUR SCRIPT HERE ###
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob

Last edited by qwazix; 2013-03-18 at 19:19.
 

The Following 4 Users Say Thank You to qwazix For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#3
I used fixed origin to install it and that allows it to be run as user without having to use develsh.

Thanks for this qwazix!
 

The Following 3 Users Say Thank You to thedead1440 For This Useful Post:
Posts: 191 | Thanked: 415 times | Joined on Jan 2012
#4
That does sound great :-) Could you add one more param for the filename of the pic?
 

The Following 2 Users Say Thank You to caveman For This Useful Post:
Posts: 230 | Thanked: 302 times | Joined on Oct 2009 @ Helsinki, Suomi (Finland)
#5
Scriptable camera, so much better than I could imagine.

Thank you so much.
 

The Following 2 Users Say Thank You to ladoga For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#6
@caveman, there is a --path parameter to choose the directory I just forgot to document it. It does not specify filename though. I can do that but I won't implement a mechanism to auto-increment. You'll have to do that in your script.
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 

The Following User Says Thank You to qwazix For This Useful Post:
Posts: 191 | Thanked: 415 times | Joined on Jan 2012
#7
Originally Posted by qwazix View Post
@caveman, there is a --path parameter to choose the directory I just forgot to document it. It does not specify filename though. I can do that but I won't implement a mechanism to auto-increment. You'll have to do that in your script.
The --path param is fine, it solves the problem.

I just ran my first test:
Code:
for i in $(seq 1 10); do
  time /opt/cmdCam/bin/cmdCam --exposure 30000
done
It just worked :-) Each pic takes about 4-5s. So to take 10 pics 1 min apart from each other, one could just use
Code:
for i in $(seq 1 10); do
  /opt/cmdCam/bin/cmdCam
 sleep 56
done
Cool!
 

The Following 3 Users Say Thank You to caveman For This Useful Post:
Posts: 230 | Thanked: 302 times | Joined on Oct 2009 @ Helsinki, Suomi (Finland)
#8
Just some quick observations on cmdcam 0.0.1

--exposure [microseconds] gets ignored, but --shutter [microseconds] works and does the same.
--focus [meters] doesn't work and is always at closest range.
--whitebalance [Kelvins] works as expected.
--flash works as expected.

Maybe others can corfirm this or tell me if I'm doing something wrong. Basically I just use --focus flag with numerical value in meters, for example:
--focus 15 or --focus 0.5, but the resulting focus is always ca. 15cm from the lens.

Additional questions/requests:
1. Is it possible to take consecutive shots any faster? I know this isn't a DSLR, but 4-5 seconds minimum between shots is somewhat limiting.

2. You might consider creating symlink for /opt/cmdCam/bin/cmdCam to /usr/local/bin or elsewhere in user's $PATH so that it isn't necessary to type the whole path. Also in the same vein you could make the name fully lowercase for usabilitys sake. (though user can easily do these by him/herself too...so it's not a huge issue.)

I already noticed that cmdCam is very good for sharp long exposure shots in the dark. No camera shake. (as long as object is ca. 15cm away from the lens, due to focus issue)

Anyway. Thanks for this. Maybe you can squash the focus bug when you have some spare time.

Last edited by ladoga; 2013-03-31 at 13:15.
 

The Following 2 Users Say Thank You to ladoga For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#9
Thanks for reporting and sorry for being late, 0.0.2 fixes the focus bug and makes the flash stronger, 0.0.3 has a --size argument to control the photo sizes, it takes S M L XL, defaults to L.

for the curious
Code:
    
    if (size == "S"){
        width =  816;
        height = 608;
    } else if (size == "M"){
        width =  1632;
        height = 1232;
    } else if (size == "XL"){
        width = 3264;
        height = 2455;
    }
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 

The Following User Says Thank You to qwazix For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 18:06.