Changes

Jump to navigation Jump to search
Line 637: Line 637:     
===== 实时预览 =====
 
===== 实时预览 =====
 +
 +
====== 使用gstreamer预览UYVY格式图像 ======
 
<code>export DISPLAY=:0</code>
 
<code>export DISPLAY=:0</code>
    
UYVY模式支持的最大宽度为2880,使用如下命令可以进行实时预览。
 
UYVY模式支持的最大宽度为2880,使用如下命令可以进行实时预览。
   −
====== MV-MIPI-IMX178M ======
+
* MV-MIPI-IMX178M
 +
 
 
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=2816,height=2064,pixelformat=UYVY</code>
 
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=2816,height=2064,pixelformat=UYVY</code>
    
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)2816, height=(int)2064, framerate=(fraction)22/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false</code>
 
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)2816, height=(int)2064, framerate=(fraction)22/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false</code>
   −
====== MV-MIPI-SC130M, MV-MIPI-IMX296M,  MV-MIPI-IMX265M,MV-MIPI-IMX264M,MV-MIPI-IMX287M ======
+
* MV-MIPI-SC130M, MV-MIPI-IMX296M,  MV-MIPI-IMX265M,MV-MIPI-IMX264M,MV-MIPI-IMX287M
 +
 
 
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=UYVY</code>
 
<code>v4l2-ctl -d /dev/video0 --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=UYVY</code>
   Line 652: Line 656:     
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)$WIDTH, height=(int)$HEIGHT, framerate=(fraction)$FPS/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false</code>
 
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)$WIDTH, height=(int)$HEIGHT, framerate=(fraction)$FPS/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false</code>
 +
 +
====== 使用opencv预览GREY格式图像 ======
 +
<code>sudo apt install python3-opencv</code>
 +
 +
* 我们提供了一个简单的[https://github.com/veyeimaging/nvidia_jetson_veye_bsp/tree/master/samples/opencv/raw_camera sample]实现此功能:
 +
 +
<code>python ./v4l2dev_2_opencv_show_grey.py --roix 0 --roiy 0 --width 640 --height 480 --fps 30</code>
 +
 
==== 触发模式 ====
 
==== 触发模式 ====
 
=====准备工作=====
 
=====准备工作=====

Navigation menu