calibration and nvargus pipeline

This commit is contained in:
AhmedElsafy 2020-04-09 11:57:48 -03:00
parent 7c2ff4f649
commit fcc06a3059
3 changed files with 19 additions and 31 deletions

View File

@ -4,23 +4,17 @@ camera_name: left
camera_matrix:
rows: 3
cols: 3
data: [ 225.48436, 0. , 164.71275,
0. , 299.70005, 118.01326,
0. , 0. , 1. ]
camera_model: plumb_bob
data: [216.587179, 0.000000, 152.272854, 0.000000, 288.814935, 123.514917, 0.000000, 0.000000, 1.000000]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.404573, 0.163958, 0.001334, -0.005042, 0.000000]
data: [-0.400277, 0.190072, -0.003888, 0.002995, 0.000000]
rectification_matrix:
rows: 3
cols: 3
data: [ 0.95911429, -0.04577467, -0.27929279,
0.04325362, 0.9989487 , -0.01518615,
0.27969431, 0.00248483, 0.96008589]
data: [0.990367, 0.059907, -0.124836, -0.059914, 0.998197, 0.003704, 0.124833, 0.003811, 0.992170]
projection_matrix:
rows: 3
cols: 4
data: [ 305.6735 , 0. , 289.60029, 0. ,
0. , 305.6735 , 121.06541, 0. ,
0. , 0. , 1. , 0. ]
data: [296.195350, 0.000000, 215.261782, 0.000000, 0.000000, 296.195350, 120.768448, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000]

View File

@ -4,23 +4,17 @@ camera_name: right
camera_matrix:
rows: 3
cols: 3
data: [ 227.8688 , 0. , 157.95209,
0. , 303.09539, 118.1566 ,
0. , 0. , 1. ]
camera_model: plumb_bob
data: [223.401364, 0.000000, 161.232191, 0.000000, 297.556234, 124.851974, 0.000000, 0.000000, 1.000000]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.399746, 0.164662, -0.001467, 0.001856, 0.000000]
data: [-0.390714, 0.159344, -0.002090, -0.002267, 0.000000]
rectification_matrix:
rows: 3
cols: 3
data: [ 0.97349106, -0.02827958, -0.2269701 ,
0.03031821, 0.99952516, 0.00550008,
0.22670678, -0.01223561, 0.9738862 ]
data: [0.988569, 0.058607, -0.138916, -0.058599, 0.998273, 0.004148, 0.138919, 0.004040, 0.990296]
projection_matrix:
rows: 3
cols: 4
data: [ 305.6735 , 0. , 289.60029, -14.70807,
0. , 305.6735 , 121.06541, 0. ,
0. , 0. , 1. , 0. ]
data: [296.195350, 0.000000, 215.261782, -18.019714, 0.000000, 296.195350, 120.768448, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000]

View File

@ -2,9 +2,9 @@
<!-- Command Line Arguments -->
<arg name="sync_sink" default="true" /> <!-- Synchronize the app sink -->
<arg name="width" default="1280" /> <!-- Image Width -->
<arg name="height" default="720" /> <!-- Image Height -->
<arg name="fps" default="30" /> <!-- Desired framerate -->
<arg name="width" default="320" /> <!-- Image Width -->
<arg name="height" default="240" /> <!-- Image Height -->
<arg name="fps" default="20" /> <!-- Desired framerate -->
<!-- Make arguments available to parameter server -->
<param name="image_width" type="int" value="$(arg width)" />
@ -14,13 +14,13 @@
<group ns="stereo">
<node name="right" pkg="gscam" type="gscam" >
<param name="camera_name" value="right" />
<param name="gscam_config" value="nvcamerasrc sensor-id=1 aeLock=0 wbmode=5 scene-mode=3 intent=3 contrast=0.8 ! 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="nvarguscamerasrc sensor-id=0 aelock=true awblock=true ! video/x-raw(memory:NVMM), width=(int)$(arg width), height=(int)$(arg height), format=(string)NV12,framerate=(fraction)$(arg fps)/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR" />
<param name="frame_id" value="right_link" />
<param name="sync_sink" value="true" />
<param name="right/image_width" type="int" value="$(arg width)" />
<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="camera_info_url" value="package://jetson_csi_cam/right_320x240.yaml" />
<remap from="camera/image_raw" to="right/image_raw" />
<remap from="camera/camera_info" to="right/camera_info" />
<!-- <remap from="/set_camera_info" to="/right/set_camera_info" /> -->
@ -28,19 +28,19 @@
<node name="left" pkg="gscam" type="gscam" >
<param name="camera_name" value="left" />
<param name="gscam_config" value="nvcamerasrc sensor-id=0 aeLock=0 wbmode=5 scene-mode=3 intent=3 contrast=0.8 ! 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="frame_id" value="left_link" />
<param name="gscam_config" value="nvarguscamerasrc sensor-id=1 aelock=true awblock=true ! video/x-raw(memory:NVMM), width=(int)$(arg width), height=(int)$(arg height), format=(string)NV12, framerate=(fraction)$(arg fps)/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR" />
<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="camera_info_url" value="package://jetson_csi_cam/left_320x240.yaml" />
<remap from="camera/image_raw" to="left/image_raw" />
<remap from="camera/camera_info" to="left/camera_info" />
<!-- <remap from="/set_camera_info" to="/left/set_camera_info" /> -->
</node>
<node name="both" pkg="stereo_image_proc" type="stereo_image_proc" />
</group>