Jump to content

CUDA Accelerated GStreamer Camera Undistort/Performance/Xavier: Difference between revisions

Add latency measurements
m (Add brown-conrady fps measurements)
(Add latency measurements)
Line 25: Line 25:
[[File:Undistort Xavier Performance FPS Multiple Resolutions.svg|none|frame|left|Undistort FPS on multiple resolution images using Fisheye model with and without jetson_clocks.sh ]]
[[File:Undistort Xavier Performance FPS Multiple Resolutions.svg|none|frame|left|Undistort FPS on multiple resolution images using Fisheye model with and without jetson_clocks.sh ]]
[[File:Undistort Xavier Performance FPS Multiple Resolutions Brown Conrady.svg|none|frame|left|Undistort FPS on multiple resolution images using Fisheye model with and without jetson_clocks.sh ]]
[[File:Undistort Xavier Performance FPS Multiple Resolutions Brown Conrady.svg|none|frame|left|Undistort FPS on multiple resolution images using Fisheye model with and without jetson_clocks.sh ]]
===Pipeline structure===
The general structure of the pipeline used for the framerate measurements is shown below, for the Fisheye model.
<source lang=bash>
CAMERA_MATRIX="{\"fx\":9.5211633874478218e+02, \"fy\":9.4946222068253201e+02, \"cx\":6.8041416457132573e+02, \"cy\":3.1446117133659988e+02}"
DISTORTION_PARAMETERS="{\"k1\":3.8939572818197948e-01, \"k2\":-5.5685725182648649e-01, \"k3\":2.3785352925072494e+00, \"k4\":-1.2037220289124213e+00}"
INPUT=image_1.jpg
gst-launch-1.0 \filesrc location=$INPUT \
! nvjpegdec !  imagefreeze ! nvvidconv\
! cudaundistort distortion-model=fisheye \
camera-matrix="$CAMERA_MATRIX" distortion-parameters="$DISTORTION_PARAMETERS" \
! perf print-cpu-load=true ! fakesink
</source>
== Latency ==
== Latency ==
For the purpose of this performance evaluation, Latency is measured as the time difference between the src of the element before the undistort and the undistort src, effectively measuring the time between input and output pads.
The pictures below show the latency of the cuda-undistort element, for both models and multiple resolutions, as well as using and not using the jetson_clocks script.
[[File:Undistort Xavier Performance Latency Multiple Resolutions.svg|none|frame|left|Latency on multiple resolution images using Fisheye model with and without jetson_clocks.sh]]
[[File:Undistort Xavier Performance Latency Multiple Resolutions Brown Conrady.svg|none|frame|left|Latency on multiple resolution images using Brown-Conrady model with and without jetson_clocks.sh]]
===Pipeline structure===
The general structure of the pipeline used for the latency measurements is shown below, for the Fisheye model.
<source lang=bash>
CAMERA_MATRIX="{\"fx\":9.5211633874478218e+02, \"fy\":9.4946222068253201e+02, \"cx\":6.8041416457132573e+02, \"cy\":3.1446117133659988e+02}"
DISTORTION_PARAMETERS="{\"k1\":3.8939572818197948e-01, \"k2\":-5.5685725182648649e-01, \"k3\":2.3785352925072494e+00, \"k4\":-1.2037220289124213e+00}"
INPUT=image_1.jpg
GST_DEBUG="3,GST_TRACER:7" GST_TRACERS="interlatency" GST_SHARK_CTF_DISABLE=1 \
gst-launch-1.0 filesrc location=$INPUT \
! nvjpegdec ! imagefreeze ! nvvidconv \
! cudaundistort distortion-model=fisheye \
camera-matrix="$CAMERA_MATRIX" distortion-parameters="$DISTORTION_PARAMETERS" \
! perf print-cpu-load=true ! fakesink


</source>


<noinclude>
<noinclude>
{{CUDA Accelerated GStreamer Camera Undistort/Foot|Performance|Contact Us}}
{{CUDA Accelerated GStreamer Camera Undistort/Foot|Performance|Contact Us}}
</noinclude>
</noinclude>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.