LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   taking a picture from the command line (no window or viewing) (https://www.linuxquestions.org/questions/linux-software-2/taking-a-picture-from-the-command-line-no-window-or-viewing-4175536245/)

KansaiRobot 03-10-2015 12:16 AM

taking a picture from the command line (no window or viewing)
 
Hello and thanks always.

I would like to ask if there is an application with which I can take pictures from a camera attached to my system.

The thing is, I am well aware of cheese, guvcview and luvcview. These applications (for some reason freeze on my system) open a window and let you take snapshots. That is not what I would like

I want just to take a picture which is going to be stored as a file without even attempting to show it to me.
This because I want to do this in a system with no windowing system running on a microprocessor.

and why dont you write it yourself? you can ask. Well I did, and yes it takes pics but it has some errors that I can't find the reason or how to solve them. :(

any help would be greatly appreciated

evo2 03-10-2015 12:22 AM

Hi,

your profile says you are using Debian and Ubuntu...
Code:

apt-cache search webcam
I tried fswebcam - it seems to do what you want.

Evo2.

veerain 03-10-2015 01:14 AM

For cameras other than webcam there is gphoto2-cli.

rtmistler 03-10-2015 07:27 AM

Are you running this on a Raspberry Pi? I only ask because this exact thing came up where we were asked to make an environmental analysis system that took periodic still photos and concatenated them into a movie at the end of the day. And although we could boot into X we did not, we left it at the command line and then pulled the files off periodically.

Either case, the camera application had a "no preview" option in it's command line which meant that instead of taking a photo and then showing it, it would just take and store the photo.

Whatever application you find, I'd look for a similar option so that it will do this same behavior which sounds like exactly what you want.

KansaiRobot 03-11-2015 07:21 PM

Quote:

Originally Posted by evo2 (Post 5329669)
Hi,

your profile says you are using Debian and Ubuntu...
Code:

apt-cache search webcam
I tried fswebcam - it seems to do what you want.

Evo2.

Thank you. I install it and it seems quite a nice program.
Unfortunately it doesnt work well with my camera :(

In the end, what I did was to modify my own code (I finally got some pointers on what changes were needed from the maker) and use it to take my snapshots.

KansaiRobot 03-11-2015 07:23 PM

Quote:

Originally Posted by rtmistler (Post 5329810)
Are you running this on a Raspberry Pi? I only ask because this exact thing came up where we were asked to make an environmental analysis system that took periodic still photos and concatenated them into a movie at the end of the day. And although we could boot into X we did not, we left it at the command line and then pulled the files off periodically.

Either case, the camera application had a "no preview" option in it's command line which meant that instead of taking a photo and then showing it, it would just take and store the photo.

Whatever application you find, I'd look for a similar option so that it will do this same behavior which sounds like exactly what you want.

No, I am not using a Raspberry although I am quite interested in doing that on my spare time (which I got none at the moment :( )
So, I understand that you build a program to do this? quite interesting

and thanks for the "no preview" pointer. I hadnt thought of that. :)


All times are GMT -5. The time now is 02:30 PM.