- Welcome
- Getting Started With the NVIDIA DriveWorks SDK
- Modules
- Samples
- Tools
- Tutorials
- SDK Porting Guide
- DriveWorks API
- More
The Video Rectification sample demonstrates how to remove fisheye distortion from a video captured on a camera with a fisheeye lens.
The sample reads frames from a video input recorded from an 180 fov camera and takes the calibration from the rig.json
file. It then performs rectification and displays both the original and rectified video side-by-side.
./sample_video_rectifier --video=[path/to/video] --rig=[path/to/rig/file] --camera-name=[string] --fovX=[integer] --fovY=[integer] --record-video=[h264|h265|mp4]
where
--video=[path/to/video] Points to a recorded video. Default value: .././data/samples/sfm/triangulation/video_0.h264 --rig=[path/to/rig/file] Points to the rig file that contains calibration information. Default value: .././data/samples/sfm/triangulation/rig.json --camera-name=[string] Is the camera name in the rig configuration file. Default value: SVIEW_FR --fovX=[integer] Defines the field of view of the camera along the X axis. This property is only applicable to pinhole cameras. Default value: 120 --fovY=[integer] Defines the field of view of the camera along the Y axis. This property is only applicable to pinhole cameras. Default value: 90 --record-video=[h264|h265|mp4] Records the rectified output to a specified video type. Default value: N/A
It is possible to apply a basic homography transformation in the form of translations to the input camera. By using LEFT/RIGHT the camera moves left and right, UP/DOWN moves forwards and backwards and U/J moves up and down. The resulting homopgraphy is applied along with the undistortion and is visible in the output image.
./sample_video_rectifier --video=<video file.h264> --rig=<rig.json>
./sample_video_rectifier --fovX=90 --fovY=30
The sample creates a window and displays the original video and the rectified version.
For more details see Rectifier .