Image Stitching for NVIDIA Jetson/User Guide/Gstreamer: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
Line 8: Line 8:
This page provides a basic description of the parameters to build a cudastitcher pipeline.
This page provides a basic description of the parameters to build a cudastitcher pipeline.


= Cuda-Stitcher =
== Cuda-Stitcher ==


To build a cudastitcher pipeline use the following parameters:
To build a cudastitcher pipeline use the following parameters:
Line 40: Line 40:
The sink marks the end of each camera capture pipeline and maps each of the cameras to the respective image index of the homography list.
The sink marks the end of each camera capture pipeline and maps each of the cameras to the respective image index of the homography list.


== Pipeline Basic Example ==
=== Pipeline Basic Example ===


The pipelines construction examples assume that the homographies matrices are stored in the <code> homographies.json</code> file and contains 1 homography for 2 images.
The pipelines construction examples assume that the homographies matrices are stored in the <code> homographies.json</code> file and contains 1 homography for 2 images.


=== Case: 2 Cameras ===
==== Case: 2 Cameras ====


To perform and display image stitching from two camera sources the pipeline should look like:
To perform and display image stitching from two camera sources the pipeline should look like:
Line 56: Line 56:
</syntaxhighlight>
</syntaxhighlight>


=== Case: 2 Video Files ===
==== Case: 2 Video Files ====


To perform and display image stitching from two video sources the pipeline should look like:
To perform and display image stitching from two video sources the pipeline should look like:
Line 68: Line 68:
</syntaxhighlight>
</syntaxhighlight>


== JSON file ==
=== JSON file ===


The homography list is a JSON formatted string that defines the transformations and relationships between the images. Here we will explore (with examples) how to create this file in order to stitch the corresponding images.
The homography list is a JSON formatted string that defines the transformations and relationships between the images. Here we will explore (with examples) how to create this file in order to stitch the corresponding images.


=== Case: 2 Images ===
==== Case: 2 Images ====
[[File:Stitching 2 images example.gif|500px|frameless|none|2 Images Stitching Example]]
[[File:Stitching 2 images example.gif|500px|frameless|none|2 Images Stitching Example]]
------
------
Line 106: Line 106:
With this file, we are describing a pair of images (0 and 1), where the given matrix will transform the image '''1''' based on '''0'''.
With this file, we are describing a pair of images (0 and 1), where the given matrix will transform the image '''1''' based on '''0'''.


=== Case: 3 Images ===
==== Case: 3 Images ====


[[File:3 Images Stitching Example.gif|1000px|frameless|none|3 Images Stitching Example]]
[[File:3 Images Stitching Example.gif|1000px|frameless|none|3 Images Stitching Example]]
Line 145: Line 145:
</pre>
</pre>


=== Your case ===
==== Your case ====
You can create your own homography list, using the other cases as a guide. Just keep in mind these rules:
You can create your own homography list, using the other cases as a guide. Just keep in mind these rules:


Line 153: Line 153:
# '''Image indices from 0 to N-1''': if you have N images, you have to use consecutive numbers from '''0''' to '''N-1''' for the target and reference indices. It means that you cannot declare something like <code>target: 6</code> if you have 6 images; the correct index for your last image is  '''5'''.
# '''Image indices from 0 to N-1''': if you have N images, you have to use consecutive numbers from '''0''' to '''N-1''' for the target and reference indices. It means that you cannot declare something like <code>target: 6</code> if you have 6 images; the correct index for your last image is  '''5'''.


= Controlling the Overlap =
== Controlling the Overlap ==
You can set cropping areas for each stitcher input (sink pad). This will allow you to:
You can set cropping areas for each stitcher input (sink pad). This will allow you to:
# Crop an input image without requiring processing time.
# Crop an input image without requiring processing time.
Line 191: Line 191:
[[File:Stitching blocks top-bottom ROIs.png|800px|frameless|center|Top / Bottom cropping]]
[[File:Stitching blocks top-bottom ROIs.png|800px|frameless|center|Top / Bottom cropping]]


= Projector =
== Projector ==


For more information on how to use the rr-projector please follow the [[RidgeRun Image Projector/User Guide/Rrprojector | Projector User Guide]]
For more information on how to use the rr-projector please follow the [[RidgeRun Image Projector/User Guide/Rrprojector | Projector User Guide]]


= Cuda-Undistort =
== Cuda-Undistort ==


For more information on how to use the cuda-undistort please follow the [[CUDA Accelerated GStreamer Camera Undistort/User Guide/Camera Calibration | Camera Calibration section]]
For more information on how to use the cuda-undistort please follow the [[CUDA Accelerated GStreamer Camera Undistort/User Guide/Camera Calibration | Camera Calibration section]]