荣耀彩票代理

IT技术互动交流平台

树莓派:你是我的眼

作者:Vamei  来源:IT165收集  发布日期:2016-12-26 20:23:11

荣耀彩票代理ZUOZHE:Vamei CHUCHU:http://www.cnblogs.com/vamei YANJINRENHEXINGSHIZHUANZAI。

SHUMEIPAIGUANFANGCHUPINYOUXIAOXINGSHEXIANGTOU,YONGYULUZHISHIPINHUOPAISHETUPIAN。JIAOXIAODESHUMEIPAIHEXIAOXINGSHEXIANGTOU,KEYIZHIZUOYIGEHENHAOYONGDEYIDONGSHEYINGZHUANGZHI。DANGQIANDESHEXIANGTOUBANBENSHIV2,PEIYOU8MXIANGSUDESony IMX219GANGUANGBAN。V2SHEXIANGTOUYOUKEYIFENWEILIANGKUAN,YIKUANYONGYUZHENGCHANGDEKEJIANGUANGPAISHE,LINGYIKUANDAIYOUHONGWAIYESHIGONGNENG。ZUIJINWORUSHOULEYOUHONGWAIYESHIGONGNENGDEV2SHEXIANGTOU。ZHEIKUANSHEXIANGTOUMINGZISHIPi NoIR Camera(The infrared Camera Module v2)。CHULEYESHIGONGNENGZHIWAI,LIANGKUANSHEXIANGTOUQUBIEBUDA,DIAOYONGCHENGXUYEKEYITONGYONG。SUOYIZHEILIJIUYINoIR CameraWEIJICHU,JIESHAOSHUMEIPAISHEXIANGTOUDEJIBENSHEZHIHEYONGFA。

NoIR Camera V2

摄像头的安装与设置

SHOUXIANZHUNBEIHAOSHUMEIPAI,SHANGMIANYIJINGANZHUANGLEGUANFANGDERaspbianXITONG。BASHEXIANGTOUDEPAIXIANCHARUSHUMEIPAISHANGDE'camera'CHAKOU。ZHUYIZAICHARUZHIQIAN,YAOYONGLIANGZHINIEQICHAKOUDEGAIZI。PAIXIANFANGRUHOU,GAIZIYAOZHONGXINANHUIQU:

 

SHEXIANGTOUANZHUANG

荣耀彩票代理SHUMEIPAIKAIJIHOU,SHOUXIANGENGXINRaspbianXITONGDERUANJIANYUANBINGSHENGJI:

sudo apt-get update &&  sudo apt-get upgrade

QICI,WOMENYAOZAISHUMEIPAISHEZHIZHONG,QIDONGSHEXIANGTOUMOKUAI。YONGMINGLINGJINRUDAOSHEZHIYEMIAN:

sudo raspi-config

ZAISHEZHIYEMIANZHONGQIDONGSHEXIANGTOU:

摄像头的基本使用

荣耀彩票代理SHEZHIWANCHENGHOU,SHEXIANGTOUJIUKEYIGONGZUOLE。RaspbianTIGONGLEraspistillHEraspividLIANGGEMINGLINGXINGGONGJU,FENBIEYONGYUHUODETUPIANHESHIPIN。SHOUXIAN,YONGraspistillHUODETUPIAN:

raspistill -o image.jpg

荣耀彩票代理TUPIANCUNRUDAOimage.jpgZHEIGEWENJIANZHONG。

荣耀彩票代理SHUMEIPAISHEXIANGTOUPAISHEDEZHAOPIAN

YONGraspividHUODESHIPIN:

raspivid -o video.h464 -t 10000

荣耀彩票代理HUODE10MIAOH.264YASUOGESHIDESHIPIN,CUNRUDAOWENJIANvideo.h464。

荣耀彩票代理BAH.264WENJIANZHUANHUANWEIMP4WENJIAN,KEYISHIYONGgpacZHONGDEMP4Box。ANZHUANGgpac: 

sudo apt-get install gpac

荣耀彩票代理 ZHUANHUANWENJIANWEIvideo.mp4: 

MP4Box -fps 30 -add video.h464 video.mp4

 树莓派拍摄的视频

ZAIRaspbianZHONGBOFANGvideo.mp4:

omxplayer video.mp4

用VLC做网络摄像头

CHULEZHIJIELUZHISHIPINWENJIAN,SHUMEIPAIDESHEXIANGTOUHAINENGPAISHELIUMEITI,YONGYUWANGLUOBOFANG。RaspbianXIAYOUHENDUOGONGJUKEYISHIXIANZHEIYIGONGNENG。ZHEILIJIESHAOVLCDEYONGFA。 

荣耀彩票代理VLCSHIDAMINGDINGDINGDESHIPINBOFANGRUANJIAN,ZHICHIBAOKUORaspbianZAINEIDEDUOGEPINGTAI。ZAIRaspbianXIAANZHUANGVLC,ZUOWEILIUMEITIDEFUWUQI:

sudo apt-get install vlc

LIYONGLinuxXIADEGUANDAOJIZHI,BAraspividPAISHEDENEIRONGDAORUDAOVLC:

raspivid -o - -t 0 -n -w 480 -h 480 | cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8160}' :demux=h464

GUANJIANZI-nSHUOMINGLEBUXIANSHIYULANCHUANGKOU。SUIHOUvlcZUOWEIFUWUQI,JIANGLIUMEITISONGDAOSHUMEIPAIDE8160DUANKOU。TONGYIWANGLUOXIADERENYIQITAZHUANGYOUVLCDESHEBEI,JIUKEYITONGGUOFANGWENSHUMEIPAIDEIPDIZHIHE8160DUANKOULAIBOFANGSHEXIANGTOUPAISHEDENEIRONG。BIRUSHUMEIPAIZAIWODEJUYUWANGZHONGDEIPDIZHISHI192.168.1.27,NEIMEZAISHOUJIBANVLCDEWANGLUOMEITIYUANZHONGSHURUXIAMIANWANGLUOYUAN:

http://192.168.1.27:8160

可以查看同一局域网下的视频:

这样,我们就用树莓派制作了一个方便移动的网络摄像头。更进一步,我们可以通过隧道的方式把视频内容绑定到某个互联网服务器,从而可以在互联网荣耀彩票代理的范围内订阅该网络摄像头。实现隧道的具体方式不在这里赘述。

用Motion做动作捕捉

MotionSHILinuxXIAYIKUANQINGLIANGJIDEJIANKONGRUANJIAN。ZAIRICHANGGONGZUOMOSHIXIA,MotionKEYITIGONGWANGLUOSHEXIANGTOUDEGONGNENG。DANGPAISHEGUOCHENGZHONGHUAMIANFASHENGBIANDONGSHI,MotionKEYIBAOCUNDONGZUOFASHENGSHIDETUPIANHESHIPIN。ZHEIDUIYUANBAOJIANKONGYOUHENDABANGZHU。MotionDESHIYONGHENJIANDAN。SHOUXIAN,XIAZAIANZHUANGMotion:

sudo apt-get install motion

荣耀彩票代理XIUGAIMotionDEPEIZHIWENJIAN/etc/motion/motion.conf,GENGGAIXIAMIANJIGEZHIWEI:

daemon on
stream_localhost off

stream_maxrate 30
framerate 30

ZHIDEZHUYIDESHItarget_dirXUANXIANG,MORENZHIWEI/var/lib/motion。ZHEISHIMotionCUNCHUWENJIANDEMUBIAOWENJIANJIA。SUOCUNCHUWENJIANBAOKUOLEYUNDONGBUZHUOCHANSHENGDETUPIANHUOSHIPIN。YONGHUmotionBIXUDUIGAIMUBIAOWENJIANJIAYOUXIERUQUANXIAN。TONGSHILIUYI,LIUMEITIDEMORENDUANKOUSHI8081,WOMENDENGXIAHUIYONGDAO。

CIWAI,ZAISHEZHIWENJIANZHONG,MORENDESHIPINSHEBEI(videodeviceXIANG)SHI/dev/video0。RUGUONILIANJIEHAOLESHEXIANGTOU,QUEWUFAZAI/devXIAZHAODAOvideo0,NEIMEKEYICHANGSHIJIAZAIV4L2QUDONG:

sudo rpi-update
sudo modprobe bcm2835-v4l2

XIUGAI/etc/default/motion,GENGGAISHOUHUJINCHENGDESHEZHI:

start_motion_daemon=yes

荣耀彩票代理RANHOU,QIDONGMotion:

sudo service motion start

在同一局域网下的其他电脑上,用浏览器打开192.168.8.113:8081,可以直接看到即时拍摄的流媒体:

DONGZUOBUZHUODETUPIANHESHIPINJIANGCUNCHUZAIMULU/var/lib/motionXIA。RUGUOXIANGGAIBIANDONGZUOBUZHUODEXIANGGUANCANSHU,LIRUDONGZUOBUZHUODEMINGANDUDENG,KEYIZAI/etc/motion/motion.confZHONGXIUGAI。

荣耀彩票代理ZHEIPIANWENZHANGZHUYAOJIESHAOLEYIXIEBIJIAOGAOCENGDEYINGYONGRUANJIAN。GENGDICENGYIDIAN,SHUMEIPAISHEXIANGTOUHAIKEYITONGGUOPythonJINXINGBIANCHENG。BIANCHENGSHIJINGYOUPiCameraZHEIYIMOKUAISHIXIANDE。WOJIANGZAILINGWAIYIPIANWENZHANGZHONGZHUANMENJIESHAOPiCamera。

Tag标签:   
  • 专题推荐

About IT165 - 广告服务 - 隐私声明 - 版权申明 - 免责条款 - 网站地图 - 网友投稿 - 联系方式
本站内容来自于互联网,仅供用于网络技术学习,学习中请遵循相关法律法规