How remove camera preview to raspberry pi

爷,独闯天下 提交于 2019-12-20 05:47:24

问题


I installed the SimpleCv on my raspberryPi and the driver to use the camera board with it (uv4l driver) and now I'd like to play with it. When I type on simpleCV shell "Camera(0).getImage().save("foo.jpg") " , on the screen appears the camera preview and I am not able to type other command because this preview covers the shell What Have I to do to remove the camera preview ? Thanks a lot ! Filippo


回答1:


Try the nopreview option

pkill uv4l
uv4l --driver raspicam --auto-video_nr --encoding yuv420 --width 320 --height 240 --nopreview
export LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so

Hope that helps




回答2:


The RasPi camera is more integrated than a standard plug-play webcamera, and as a result, I haven't had much sucess using simpleCV's camera functions. Instead I use a simple python script that I call prior to running my simpleCV analysis that grabs an image and saves it to the disk

import subprocess

imgName = '/home/pi/blahblah.jpg'

def takePicture(imgName):
    subprocess.call('raspistill -n -t 1 -o %s' &imgName, shell = True)


来源:https://stackoverflow.com/questions/20891900/how-remove-camera-preview-to-raspberry-pi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!