Image Stitching for NVIDIA Jetson - User Guide - Homography estimation

From RidgeRun Developer Connection
Jump to: navigation, search



  Index Next: Getting Started/Building Image Stitching for NVIDIA Jetson



Nvidia-preferred-partner-badge-rgb-for-screen.png



The following page will introduce a way to estimate an initial homography matrix that can be used in the cudastitcher element. This method consists of a Python script that estimates the homography between two images.

Dependencies

  • Python 3.6
  • OpenCV 4.0 or later.
  • Numpy

Script estimation flow

The steps performed by the script are the following:

  1. Load the images.
  2. Remove the distortion of the images.
  3. Perform a preprocessing to the images removing the noise using a Gaussian filter.
  4. Extract the keypoint and the corresponding descriptors with the SIFT algorithm.
  5. Find the correspondences among the key points of the two images.
  6. With the resulting keypoints, estimate the homography.

Script usage

The script has two modes:

  • left_fixed: where the left image is fixed and the right image will be transformed by the homography.
  • right_fixed: where the right image is fixed and the left image will be transformed by the homograpy.

For both modes can be adjusted the sigma value of the Gaussian filter and the width size of the overlap between the two images. The following are the complete options of the script:

python homography_estimation.py --help
usage: homography_estimation.py [-h] {left_fixed,right_fixed} ...

Tool for use the prediction capabilities of the models in the Adversarial
Anomaly Detector.

positional arguments:
  {left_fixed,right_fixed}
    left_fixed          Estimation of homography between two images
    right_fixed         Estimation of homographies two images

optional arguments:
  -h, --help            show this help message and exit

Type "homography_estimation.py <command> -h" for more information.


  Index Next: Getting Started/Building Image Stitching for NVIDIA Jetson