Adding Stereo settings

This commit is contained in:
SalilVishnuKapur 2019-12-11 16:37:36 -04:00
parent 43f6fc4e54
commit 1e546e6df3
6 changed files with 76 additions and 16 deletions

View File

@ -1,20 +1,20 @@
image_width: 1280
image_height: 720
camera_name: left
image_width: 1920
image_height: 1080
camera_name: stereo/left
camera_matrix:
rows: 3
cols: 3
data: [872.082713, 0, 629.146801, 0, 872.948685, 329.783337, 0, 0, 1]
data: [1304.029146, 0.000000, 990.448476, 0.000000, 1300.360939, 515.968466, 0.000000, 0.000000, 1.000000]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.382749, 0.138828, 0.001323, 0.000611, 0]
data: [-0.386216, 0.140383, 0.004409, -0.002219, 0.000000]
rectification_matrix:
rows: 3
cols: 3
data: [0.999842, -0.007606, 0.016049, 0.007604, 0.9999709999999999, 0.000166, -0.01605, -4.4e-05, 0.999871]
data: [0.998360, -0.045357, 0.034935, 0.045312, 0.998971, 0.002076, -0.034993, -0.000489, 0.999387]
projection_matrix:
rows: 3
cols: 4
data: [858.0889110000001, 0, 599.495079, 0, 0, 858.0889110000001, 344.665634, 0, 0, 0, 1, 0]
data: [1289.951088, 0.000000, 874.958939, 0.000000, 0.000000, 1289.951088, 546.437374, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000]

View File

@ -1,20 +1,20 @@
image_width: 1280
image_height: 720
camera_name: right
image_width: 1920
image_height: 1080
camera_name: stereo/right
camera_matrix:
rows: 3
cols: 3
data: [868.009016, 0, 627.0717110000001, 0, 868.673534, 357.037587, 0, 0, 1]
data: [1308.636060, 0.000000, 915.116840, 0.000000, 1305.769610, 568.569179, 0.000000, 0.000000, 1.000000]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.376131, 0.129475, 0.000191, 0.000201, 0]
data: [-0.381942, 0.145040, 0.000536, 0.002452, 0.000000]
rectification_matrix:
rows: 3
cols: 3
data: [0.999533, 0.00838, 0.029402, -0.008376999999999999, 0.999965, -0.000228, -0.029403, -1.8e-05, 0.9995679999999999]
data: [0.998404, -0.028197, 0.048937, 0.028260, 0.999600, -0.000592, -0.048900, 0.001974, 0.998802]
projection_matrix:
rows: 3
cols: 4
data: [858.0889110000001, 0, 599.495079, -430.072473, 0, 858.0889110000001, 344.665634, 0, 0, 0, 1, 0]
data: [1289.951088, 0.000000, 874.958939, -68.012187, 0.000000, 1289.951088, 546.437374, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000]

11
depth_map.launch Normal file
View File

@ -0,0 +1,11 @@
<launch>
<group ns="stereo">
<node pkg="nodelet" type="nodelet" name="stereo_proc" args="manager" output="screen"/>
<remap from="stereo/disparity" to="disparity" />
<node name="disparity_image_proc" pkg="nodelet" type="nodelet" args="load disparity_image_proc/depth_image stereo_proc" output="screen">
</node>
</group>
</launch>

View File

@ -11,3 +11,12 @@ gst-launch-1.0 nvcamerasrc fpsRange="30 30" intent=3 ! nvvidconv flip-method=2 !
#Reciever
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! avdec_h264! autovideosink -e
#Synchornized run
#Source https://devtalk.nvidia.com/default/topic/1052749/jetson-tx1/how-to-capture-video-simultaneously-with-two-cameras-using-gstreamer-/
gst-launch-1.0 \
multiqueue max-size-buffers=1 name=mqueue \
nvcamerasrc sensor-id=0 fpsRange="30 30" intent=3 wbmode=5 ! nvvidconv flip-method=2 ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! mqueue.sink_1 \
nvcamerasrc sensor-id=1 fpsRange="30 30" intent=3 wbmode=5 ! nvvidconv flip-method=2 ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! mqueue.sink_2 \
mqueue.src_1 ! omxh264enc control-rate=2 bitrate=4000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=192.168.1.92 port=5000 sync=false async=false \
mqueue.src_2 ! omxh264enc control-rate=2 bitrate=4000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=192.168.1.92 port=6000 sync=false async=false

19
stereo_proc_spiri.launch Normal file
View File

@ -0,0 +1,19 @@
<launch>
<group ns="stereo">
<node name="stereo_image_proc" pkg="stereo_image_proc" type="stereo_image_proc" output="screen">
<param name="approximate_sync" value="true" />
<param name="queue_size" value="200" />
<param name="correlation_window_size" value="11" />
<param name="disparity_range" value="48" />
<param name="min_disparity" value="15" />
<param name="prefilter_cap" value="29" />
<param name="prefilter_size" value="125" />
<param name="speckle_range" value="24" />
<param name="speckle_size" value="142" />
<param name="texture_threshold" value="1040" />
</node>
</group>
</launch>

View File

@ -1,5 +1,10 @@
<launch>
<!-- On Spiri run the transmitting command as below-->
<!--gst-launch-1.0 multiqueue name=mqueue nvcamerasrc sensor-id=0 fpsRange="30 30" intent=3 ! nvvidconv flip-method=2 ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! mqueue.sink_1 nvcamerasrc sensor-id=1 fpsRange="30 30" intent=3 ! nvvidconv flip-method=2 ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! mqueue.sink_2 mqueue.src_1 ! omxh264enc control-rate=2 bitrate=4000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=192.168.179.60 port=5000 sync=false async=false mqueue.src_2 ! omxh264enc control-rate=2 bitrate=4000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=192.168.179.60 port=6000 sync=false async=false
-->
<!-- Command Line Arguments -->
<arg name="sync_sink" default="true" /> <!-- Synchronize the app sink -->
<arg name="width" default="1280" /> <!-- Image Width -->
@ -23,11 +28,27 @@
<param name="right/image_height" type="int" value="$(arg height)" />
<param name="right/target_fps" type="int" value="$(arg fps)" />
<param name="camera_info_url" value="package://jetson_csi_cam/calibration-right.yaml" />
<param name="image_encoding_" value="jpeg" />
<!--<param name="image_encoding_" value="jpeg" />-->
<remap from="camera/image_raw" to="right/image_raw" />
<remap from="camera/camera_info" to="right/camera_info" />
<remap from="set_camera_info" to="camera_info" />
</node>
<node name="left" pkg="gscam" type="gscam" output="screen">
<param name="camera_name" value="right" />
<!--<param name="gscam_config" value="nvcamerasrc sensor-id=0 auto-exposure=1 aeLock=1 ! video/x-raw(memory:NVMM), width=(int)$(arg width), height=(int)$(arg height), format=(string)I420,framerate=(fraction)$(arg fps)/1 ! nvvidconv flip-method=2 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR" />-->
<param name="gscam_config" value=" udpsrc port=6000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! video/x-raw, format=(string)RGB"/>
<param name="camera_id" value="1" />
<param name="frame_id" value="left_link" />
<param name="sync_sink" value="true" />
<param name="left/image_width" type="int" value="$(arg width)" />
<param name="left/image_height" type="int" value="$(arg height)" />
<param name="left/target_fps" type="int" value="$(arg fps)" />
<param name="camera_info_url" value="package://jetson_csi_cam/calibration-left.yaml" />
<!--<param name="image_encoding_" value="jpeg" />-->
<remap from="camera/image_raw" to="left/image_raw" />
<remap from="camera/camera_info" to="left/camera_info" />
<remap from="set_camera_info" to="camera_info" />
</node>
</group>