Active Topics

 


Reply
Thread Tools
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#11
Just a slightly off-topic post about KAPing with the N900.

I was very impressed by this system:

A 2.5 gram camera (plus battery, bringing it to 5 grams) mounted on a light foam remote control airplane. Extremely cool!

video, camera sales page
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Posts: 125 | Thanked: 108 times | Joined on Feb 2010
#12
I have added an additional variable "jetztstr" which helps avoid name clashes in the destination directory.
I.e. when you call the script more than once, you can distinguish between the picture series by file name, which begins with timestamp of the first taken shot of each series.

Code:
#!/usr/bin/perl -w

# A simple intervalometer for the Nokia N900.
# Author: Ricardo Mendonca Ferreira - ric@mpcnet.com.br
# http://talk.maemo.org/showthread.php?t=38275

# This script requires gstreamer installed on your N900.
# See the link above for more info.
# Run this script on an X Terminal in your device with:
#   perl intervalometer.pl

# 2009.12.17  First version.
# 2009.12.24  Better gstreamer pipeline; more options, with better descriptions.
# ############ rm changes rudolf.mittelmann@artm-friends.at
# 2010-02-22 Try to use better file naming to avoid name clashes - new var jetztstr

use strict;
use POSIX qw(strftime);

#---- CONFIG SECTION ---- [BEGIN] ----

 my ($x,$y) = (1600, 1200);              # image resolution - try (2592, 1968)
 my $cam    = 0;                        # camera: 0 = back, 1 = front
 my $dir    = '/home/user/MyDocs/interval'; # folder where images will be saved
 my $max    = 10;  # total number of images to take
 my $delay  =  5;  # interval between pictures

#---- CONFIG SECTION ----  [END]  ----

die "$dir not found!\n" if !-d $dir;

my $jetztstr = strftime ("%Y-%m-%d_%H-%M-%S_", localtime());

my $gst = "/usr/bin/gst-launch v4l2camsrc device=/dev/video$cam num-buffers=1 ! ffmpegcolorspace ! video/x-raw-yuv,width=$x,height=$y ! jpegenc ! filesink location=";

my $num=0;

print "Intervalometer started - will take $max pictures at $x x $y\n";

while ($num < $max) {
	$num=sprintf'%05d',$num;
	`$gst$dir/$jetztstr$num.jpg`;
	printf "saved %d of %d", $num+1, $max;
	$num++;
	if ($num < $max) { print " - sleeping $delay sec."; sleep $delay; }
        print "\n";
}
it is only a small, trivial change, but somebody on Twitter requested to post it, so here it is.

Last edited by rm53; 2010-02-26 at 21:00.
 

The Following User Says Thank You to rm53 For This Useful Post:
Posts: 89 | Thanked: 6 times | Joined on Feb 2010
#13
Hello,

I'm developing an application that will require to take a picture from the front camera. I'm testing it using the gstreamer on video1, but the picture is completely black. I test my front camera using that Mirror application and it's working great.

How to take a legible picture from front camera using gstreamer?
 
Posts: 59 | Thanked: 71 times | Joined on Sep 2009 @ Brazil
#14
@rm53: Nice, but don't forget to add a ";" at the end of "my ($x,$y) = (1600, 1200)"

I noticed a lot of people are using this script (with many changes and additions), so I plan to make a Qt version of it. Please feel free to give other suggestions you would like to see in this program.

@jozeph: Did you try to change the line "my $cam = 0;" to "my $cam = 1;" and change the resolution to "(640, 480)"?
 

The Following 4 Users Say Thank You to Ricardo For This Useful Post:
Posts: 550 | Thanked: 110 times | Joined on Aug 2006
#15
Very neat! People are only just beginning to take advantage of the N900 as a programmable camera platform. I would love to see a more advanced GUI camera application than the default Nokia one with more granular controls, stuff like HDR image creation, panoramic stitching, time lapse video, etc. This sort of thing would be a really great demo to the public at large of the power of an open phone platform.
 

The Following User Says Thank You to Rocketman For This Useful Post:
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#16
this is cool, instructions arent noob friendly at all



NOOB HELP

1. copy text into notepad, save as photo.pl and put the file into the directory you want photos saved in
2. open xterm, as root go to above directory and type:

perl photo.pl
 
Posts: 101 | Thanked: 11 times | Joined on Jan 2010
#17
I want to second that. A much better GUI to take advantage of the N900 capabilities would be fantastic.

Originally Posted by Rocketman View Post
Very neat! People are only just beginning to take advantage of the N900 as a programmable camera platform. I would love to see a more advanced GUI camera application than the default Nokia one with more granular controls, stuff like HDR image creation, panoramic stitching, time lapse video, etc. This sort of thing would be a really great demo to the public at large of the power of an open phone platform.
 
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#18
 
Posts: 356 | Thanked: 172 times | Joined on Jan 2010 @ Canada
#19
Originally Posted by Ricardo View Post
I noticed a lot of people are using this script (with many changes and additions), so I plan to make a Qt version of it. Please feel free to give other suggestions you would like to see in this program.

Oh, a QT version would be SO very appreciated

As a suggestion, you might consider rolling in the HDR/exposure bracketing functions from the script the insanely clever folks worked out in this thread:

http://talk.maemo.org/showthread.php?t=33007

Not only would that make shooting HDRs much more straightforward, but I could see having some programmable exposure control being quite useful for a time-lapse project that spans a significant period of time..
 
Posts: 47 | Thanked: 1 time | Joined on Feb 2010
#20
Is there a parameter to control the exposure?

I tested your script by leaving my camera pointing at the horizon but it looks like a nuclear explosion is happening in the background
 
Reply

Tags
camera, photo


 
Forum Jump


All times are GMT. The time now is 16:58.