FPGA Image Signal Processor - GStreamer Pipelines - Undistort
FPGA Image Signal Processor |
---|
Introduction |
FPGA ISP Accelerators/Modules |
Getting the Code |
Examples |
GStreamer Pipelines |
Tested Platforms |
Contact Us |
GStreamer Pipelines
The following pipelines must be run after loading the camera matrices and the distortion coefficients into the accelerator.
With a videotestsrc
Source
This pipeline generates a video test sequence in GRAY8 and sends it to the Accelerator. This can be applicable when using the ARGB version.
gst-launch-1.0 videotestsrc is-live=true ! "video/x-raw,width=1920,height=1080" ! v4l2sink sync=false device=/dev/video2 -v
Sink
This pipeline receives the undistorted GRAY8 video sequence and shows it on a display. The videoconvert
performs a conversion from GRAY8 to a manageable format for xvimagesink. This also works for the ARGB version thanks to the auto-negotiation.
gst-launch-1.0 v4l2src device=/dev/video1 ! "video/x-raw,width=1920,height=1080" ! videoconvert ! xvimagesink sync=false -v
Please, pay attention to the devices:
/dev/video1: output port device /dev/video2: input port device
With a camera
These pipelines are intended for a camera that already has a demosaicing process provided by the NVIDIA ISP and runs on NVIDIA Xavier.
Source
The nvarguscamerasrc captures the image from a camera connected to the NVIDIA Xavier and performs the demosaicing process. The videoconvert is used to convert the color image to grayscale. Also, the tee allows us to see the original image.
gst-launch-1.0 nvarguscamerasrc wbmode=off awblock=true aelock=true ! "video/x-raw(memory:NVMM),width=1920,height=1080" ! nvvidconv ! videoconvert ! "video/x-raw,format=GRAY8" ! tee name=t t. ! queue ! v4l2sink device=/dev/video2 -v t. ! queue ! videoconvert ! xvimagesink
Sink
To receive the video sequence back from the accelerator, you can use the following pipeline:
gst-launch-1.0 v4l2src device=/dev/video1 ! "video/x-raw,width=1920,height=1080" ! videoconvert ! xvimagesink sync=false -v
This is the same pipeline used for the videotestsrc example.