2,599
edits
Efernandez (talk | contribs) |
Efernandez (talk | contribs) |
||
Line 109: | Line 109: | ||
[[File:Stitcher-calibrator-save-menu.png|720px|center|Save menu]] | [[File:Stitcher-calibrator-save-menu.png|720px|center|Save menu]] | ||
{{Review|We should show how the JSON file looks like and how this can be passed to the stitcher and projector. Here is an example I use: | |||
<syntaxhighlight lang=json> | |||
{ | |||
"projections": [ | |||
{ | |||
"0": { | |||
"radius": 640.0, | |||
"fov": 195.0, | |||
"x_offset": 637.0, | |||
"y_offset": 640.0, | |||
"x_angle": 0.0, | |||
"y_angle": 0, | |||
"z_angle": 180, | |||
"fisheye": true | |||
} | |||
}, | |||
{ | |||
"1": { | |||
"radius": 639.0, | |||
"fov": 195.0, | |||
"x_offset": 641.0, | |||
"y_offset": 638.0, | |||
"x_angle": 0.0, | |||
"y_angle": -0.8, | |||
"z_angle": 180, | |||
"fisheye": true | |||
} | |||
} | |||
], | |||
"homographies": [ | |||
{ | |||
"images": { | |||
"target": 1, | |||
"reference": 0 | |||
}, | |||
"matrix": { | |||
"h00": 1, | |||
"h01": 0, | |||
"h02": 1309.612371682265, | |||
"h10": 0, | |||
"h11": 1, | |||
"h12": 0, | |||
"h20": 0, | |||
"h21": 0, | |||
"h22": 1 | |||
} | |||
} | |||
] | |||
} | |||
</syntaxhighlight> | |||
<syntaxhighlight lang=bash> | |||
#!/bin/bash | |||
S0_C_X=637 | |||
S0_C_Y=640 | |||
S0_rad=640 | |||
S0_R_X=0 | |||
S0_R_Y=0 | |||
S0_LENS=195 | |||
S1_C_X=641 | |||
S1_C_Y=638 | |||
S1_rad=639 | |||
S1_R_X=0 | |||
S1_R_Y=-0.8 | |||
S1_LENS=195 | |||
CONFIG_FILE="result.json" | |||
HOMOGRAPHIES="`cat $CONFIG_FILE | tr -d "\n" | tr -d " "`" | |||
GST_DEBUG=WARNING gst-launch-1.0 -e -v \ | |||
cudastitcher name=stitcher homography-list=$HOMOGRAPHIES sink_0::right=1200 sink_1::right=1227 \ | |||
filesrc location= ~/videos/video0-s0.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! queue ! nvvidconv ! rreqrprojector center_x=$S0_C_X center_y=$S0_C_Y radius=$S0_rad rot-y=$S0_R_Y lens=$S0_LENS name=proj0 ! queue ! stitcher.sink_0 \ | |||
filesrc location= ~/videos/video0-s1.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! queue ! nvvidconv ! rreqrprojector center_x=$S1_C_X center_y=$S1_C_Y radius=$S1_rad rot-y=$S1_R_Y rot-x=$S1_R_Y lens=$S1_LENS name=proj1 ! queue ! stitcher.sink_1 \ | |||
stitcher. ! queue ! nvvidconv ! nvv4l2h264enc bitrate=30000000 ! h264parse ! queue ! qtmux ! filesink location=360_stitched_video.mp4 | |||
</syntaxhighlight> | |||
}} | |||
<noinclude> | <noinclude> | ||
{{Image_Stitching_for_NVIDIA_Jetson/Foot|Spherical_Video/Stitcher|Performance}} | {{Image_Stitching_for_NVIDIA_Jetson/Foot|Spherical_Video/Stitcher|Performance}} | ||
</noinclude> | </noinclude> |