kaikeraut
Posts: 30
Joined: Tue Apr 29, 2014 8:18 am

Raspstill sample code only for preview

Mon May 19, 2014 11:21 am

Hello,

I just want a simple raspstill code which do just preview.
Where should i look.? or any one have code for just preview can post it.

Thanks in advance. :) :)

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

Re: Raspstill sample code only for preview

Mon May 19, 2014 11:43 am

this displays the preview until you press a key:

Code: Select all

raspistill -k
or discard the image:

Code: Select all

raspistill -o - >/dev/null
or from python with picamera:

Code: Select all

import time
import picamera

with picamera.PiCamera() as camera:
    camera.start_preview()
[code]
Android app - Raspi Card Imager - download and image SD cards - No PC required !

kaikeraut
Posts: 30
Joined: Tue Apr 29, 2014 8:18 am

Re: Raspstill sample code only for preview

Tue May 27, 2014 6:03 am

Can anyone post the bare code just for camera preview using mmal or omx.?

thanks

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23365
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspstill sample code only for preview

Wed May 28, 2014 9:34 am

kaikeraut wrote:Can anyone post the bare code just for camera preview using mmal or omx.?

thanks
I doubt it. I cannot see why anyone would have written such a piece of code since Raspistill already does it so I suggest looking at that source code.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Return to “Advanced users”