Bojan
Posts: 17
Joined: Sun Nov 08, 2015 6:55 am
Location: Slovenia
Contact: Website

raspistill vs fswebcam image quality

Sun Mar 20, 2016 10:21 am

Hi, I have this script found somewhere here some time ago for webcam and works fine. On cron, I made script running every minute.
I already put bcm2835-v4l2 in modules (sudo nano modules, bcm2835-v4l2)
Script is this:

Code: Select all

  GNU nano 2.2.6                File: SnapShot.sh                                      

#!/bin/bash

#change these parameters to fit your need

IN_LOCAL=Cerje.jpeg
OUT_REMOTE=Cerje.jpeg

USER=******
PASSWD=********
SERVERIP=**.***.***.***

#do fswebcam twice, the first is to get webcam in stable condition
fswebcam -r 1000x800 --no-banner /dev/null -F 3
sleep 2
fswebcam -r 1000x800 --no-banner  $IN_LOCAL

#ok now we will transfer via ftp

/usr/bin/ftp -v -n $SERVERIP <<END_OF_SESSION
user $USER $PASSWD
cd /public_html/Webcam/
promt off
binary
put $SIN_LOCAL $OUT_REMOTE
bye
END_OF_SESSION
but the image is really out of what it should be. On left is fswebcam and on right is raspistill (raspistill -o cam.jpg):
http://i.imgur.com/U0MzeIz.png
Now even the raspistill is not perfect ( idon't know why or what is the problem? sky is blue), but is still better image.
How can I make beter image on fswebcam or upload images with some script like this with raspistill?
Maybe some other solution? ...

mikerr
Posts: 2827
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: raspistill vs fswebcam image quality

Sun Mar 20, 2016 10:33 am

Less down to fswebcam than your actual camera - my logitech pro 9000 matches or beats raspicam,
but you can tweak your camera by fswebcam:

http://manpages.ubuntu.com/manpages/luc ... cam.1.html

some webcams need a few frames to auto set exposure etc, try:

fswebcam -S 3
fswebcam -D 1

different webcams have varying settings - see what's available with

fswebcam --list-controls

[edit] re-read and you are using raspicam for both - the above tweaks still apply though
Last edited by mikerr on Sun Mar 20, 2016 10:35 am, edited 1 time in total.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

gordon77
Posts: 5077
Joined: Sun Aug 05, 2012 3:12 pm

Re: raspistill vs fswebcam image quality

Sun Mar 20, 2016 10:34 am

Have you tried setting brightness in fswebcam using -set ...?

Try using -F -frames to wait for the camera to settle.

http://manpages.ubuntu.com/manpages/luc ... cam.1.html

Is it the standard pi camera lens ? Try -st in raspistill.

Return to “Beginners”