Jump to content

Image Stitching for NVIDIA Jetson/Resources/360 data: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 32: Line 32:


Each folder contains three video files named as the folder with a suffix indication of the sensor id from s0 to s2.
Each folder contains three video files named as the folder with a suffix indication of the sensor id from s0 to s2.
== Triple videos results ==
Using the [[RidgeRun_Image_Projector/User_Guide/Calibration | 360 Calibration tool]] the following projection parameters and homography matrix can be obtained.
<syntaxhighlight lang=bash>
</syntaxhighlight>
To watch the stitching result of any of the clip groups, save the above parameters and homography matrix in a JSON file named <code>360-triple.json</code> and run the following commands. This pipeline will save the stitching result in a <code>360_triple_stitched_video.mp4</code> file.
<syntaxhighlight lang=bash>
</syntaxhighlight>
<!--
An example stitched video of the triple_fisheye_vid1_30s clip group can be found in the following Google Drive file.
-->


= Dual Fisheye Videos =
= Dual Fisheye Videos =
Line 57: Line 73:


{{Review|Don't forget the links. We can add them to the table. I will also add the calibration and stitched video |efernandez}}
{{Review|Don't forget the links. We can add them to the table. I will also add the calibration and stitched video |efernandez}}
== Dual videos results ==
Using the [[RidgeRun_Image_Projector/User_Guide/Calibration | 360 Calibration tool]] the following projection parameters and homography matrix can be obtained.
<syntaxhighlight lang=bash>
{
    "projections": [
        {
            "0": {
                "radius": 750.0,
                "lens": 187.0,
                "center_x": 993.0,
                "center_y": 762.0,
                "rot_x": 0.0,
                "rot_y": 0.0,
                "rot_z": -89.6,
                "fisheye": true
            }
        },
        {
            "1": {
                "radius": 750.3,
                "lens": 186.0,
                "center_x": 1044.0,
                "center_y": 776.0,
                "rot_x": 0.0,
                "rot_y": 0.0,
                "rot_z": 88.7,
                "fisheye": true
            }
        }
    ],
    "homographies": [
        {
            "images": {
                "target": 1,
                "reference": 0
            },
            "matrix": {
                "h00": 1,
                "h01": 0,
                "h02": 0.0,
                "h10": 0,
                "h11": 1,
                "h12": 0,
                "h20": 0,
                "h21": 0,
                "h22": 1
            }
        }
    ]
}
</syntaxhighlight>
To watch the stitching result of any of the clip groups, save the above parameters and homography matrix in a JSON file named <code>360-dual.json</code> and run the following commands. This pipeline will save the stitching result in a <code>360_dual_stitched_video.mp4</code> file.
<syntaxhighlight lang=bash>
S0_C_X=993
S0_C_Y=762
S0_rad=750
S0_R_X=0
S0_R_Y=0
S0_R_Z=-89.6
S0_LENS=187
S1_C_X=1044
S1_C_Y=776
S1_rad=750
S1_R_X=0
S1_R_Y=0
S1_R_Z=88.7
S1_LENS=186
CONFIG_FILE="360-dual.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 \
filesrc location=360-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 rot-z=$S0_R_Z lens=$S0_LENS name=proj0 !  queue ! stitcher.sink_0 \
filesrc location=360-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 rot-z=$S1_R_Z lens=$S1_LENS name=proj1 !  queue ! stitcher.sink_1 \
stitcher.  ! queue ! nvvidconv ! nvv4l2h264enc bitrate=30000000 ! h264parse ! queue !  qtmux ! filesink location=360_dual_stitched_video.mp4
</syntaxhighlight>


<noinclude>
<noinclude>
{{Image_Stitching_for_NVIDIA_Jetson/Foot|Data Set/Panoramic data|Examples}}
{{Image_Stitching_for_NVIDIA_Jetson/Foot|Data Set/Panoramic data|Examples}}
</noinclude>
</noinclude>
335

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.