proj_match_points_ransac T_proj_match_points_ransac ProjMatchPointsRansac ProjMatchPointsRansac  (Operator) 
Name 
proj_match_points_ransac T_proj_match_points_ransac ProjMatchPointsRansac ProjMatchPointsRansac 
Signature 
proj_match_points_ransac (Image1 Image2 Rows1 Cols1 Rows2 Cols2 GrayMatchMethod MaskSize RowMove ColMove RowTolerance ColTolerance Rotation MatchThreshold EstimationMethod DistanceThreshold RandSeed HomMat2D Points1 Points2 
 
Herror T_proj_match_points_ransac (const Hobject Image1 Image2 Rows1 Cols1 Rows2 Cols2 GrayMatchMethod MaskSize RowMove ColMove RowTolerance ColTolerance Rotation MatchThreshold EstimationMethod DistanceThreshold RandSeed HomMat2D Points1 Points2 
 
void ProjMatchPointsRansac (const HObject& Image1 Image2 Rows1 Cols1 Rows2 Cols2 GrayMatchMethod MaskSize RowMove ColMove RowTolerance ColTolerance Rotation MatchThreshold EstimationMethod DistanceThreshold RandSeed HomMat2D Points1 Points2 
HHomMat2D  HImage ::ProjMatchPointsRansac (const HImage& Image2 Rows1 Cols1 Rows2 Cols2 GrayMatchMethod MaskSize RowMove ColMove RowTolerance ColTolerance Rotation MatchThreshold EstimationMethod DistanceThreshold RandSeed Points1 Points2 
HHomMat2D  HImage ::ProjMatchPointsRansac (const HImage& Image2 Rows1 Cols1 Rows2 Cols2 GrayMatchMethod MaskSize RowMove ColMove RowTolerance ColTolerance Rotation MatchThreshold EstimationMethod DistanceThreshold RandSeed Points1 Points2 
HHomMat2D  HImage ::ProjMatchPointsRansac (const HImage& Image2 Rows1 Cols1 Rows2 Cols2 GrayMatchMethod MaskSize RowMove ColMove RowTolerance ColTolerance Rotation MatchThreshold EstimationMethod DistanceThreshold RandSeed Points1 Points2 
HHomMat2D  HImage ::ProjMatchPointsRansac (const HImage& Image2 Rows1 Cols1 Rows2 Cols2 GrayMatchMethod MaskSize RowMove ColMove RowTolerance ColTolerance Rotation MatchThreshold EstimationMethod DistanceThreshold RandSeed Points1 Points2 
            (Windows only)
           
HTuple  HHomMat2D ::ProjMatchPointsRansac (const HImage& Image1 Image2 Rows1 Cols1 Rows2 Cols2 GrayMatchMethod MaskSize RowMove ColMove RowTolerance ColTolerance Rotation MatchThreshold EstimationMethod DistanceThreshold RandSeed Points2 
HTuple  HHomMat2D ::ProjMatchPointsRansac (const HImage& Image1 Image2 Rows1 Cols1 Rows2 Cols2 GrayMatchMethod MaskSize RowMove ColMove RowTolerance ColTolerance Rotation MatchThreshold EstimationMethod DistanceThreshold RandSeed Points2 
HTuple  HHomMat2D ::ProjMatchPointsRansac (const HImage& Image1 Image2 Rows1 Cols1 Rows2 Cols2 GrayMatchMethod MaskSize RowMove ColMove RowTolerance ColTolerance Rotation MatchThreshold EstimationMethod DistanceThreshold RandSeed Points2 
HTuple  HHomMat2D ::ProjMatchPointsRansac (const HImage& Image1 Image2 Rows1 Cols1 Rows2 Cols2 GrayMatchMethod MaskSize RowMove ColMove RowTolerance ColTolerance Rotation MatchThreshold EstimationMethod DistanceThreshold RandSeed Points2 
            (Windows only)
           
 
static void HOperatorSet .ProjMatchPointsRansac (HObject  image1 HObject  image2 HTuple  rows1 HTuple  cols1 HTuple  rows2 HTuple  cols2 HTuple  grayMatchMethod HTuple  maskSize HTuple  rowMove HTuple  colMove HTuple  rowTolerance HTuple  colTolerance HTuple  rotation HTuple  matchThreshold HTuple  estimationMethod HTuple  distanceThreshold HTuple  randSeed HTuple  homMat2D HTuple  points1 HTuple  points2 
HHomMat2D  HImage .ProjMatchPointsRansac (HImage  image2 HTuple  rows1 HTuple  cols1 HTuple  rows2 HTuple  cols2 grayMatchMethod maskSize rowMove colMove rowTolerance colTolerance HTuple  rotation HTuple  matchThreshold estimationMethod distanceThreshold randSeed HTuple  points1 HTuple  points2 
HHomMat2D  HImage .ProjMatchPointsRansac (HImage  image2 HTuple  rows1 HTuple  cols1 HTuple  rows2 HTuple  cols2 grayMatchMethod maskSize rowMove colMove rowTolerance colTolerance rotation matchThreshold estimationMethod distanceThreshold randSeed HTuple  points1 HTuple  points2 
HTuple  HHomMat2D .ProjMatchPointsRansac (HImage  image1 HImage  image2 HTuple  rows1 HTuple  cols1 HTuple  rows2 HTuple  cols2 grayMatchMethod maskSize rowMove colMove rowTolerance colTolerance HTuple  rotation HTuple  matchThreshold estimationMethod distanceThreshold randSeed HTuple  points2 
HTuple  HHomMat2D .ProjMatchPointsRansac (HImage  image1 HImage  image2 HTuple  rows1 HTuple  cols1 HTuple  rows2 HTuple  cols2 grayMatchMethod maskSize rowMove colMove rowTolerance colTolerance rotation matchThreshold estimationMethod distanceThreshold randSeed HTuple  points2 
 
Description 
Given a set of coordinates of characteristic points
(Cols1 Cols1 Cols1 Cols1 cols1 Rows1 Rows1 Rows1 Rows1 rows1 Cols2 Cols2 Cols2 Cols2 cols2 Rows2 Rows2 Rows2 Rows2 rows2 Image1 Image1 Image1 Image1 image1 Image2 Image2 Image2 Image2 image2 proj_match_points_ransac proj_match_points_ransac ProjMatchPointsRansac ProjMatchPointsRansac ProjMatchPointsRansac HomMat2D HomMat2D HomMat2D HomMat2D homMat2D points_foerstner points_foerstner PointsFoerstner PointsFoerstner PointsFoerstner points_harris points_harris PointsHarris PointsHarris PointsHarris 
The transformation is determined in two steps: First, gray value
correlations of mask windows around the input points in the first
and the second image are determined and an initial matching between
them is generated using the similarity of the windows in both
images.
The size of the mask windows is MaskSize MaskSize MaskSize MaskSize maskSize MaskSize MaskSize MaskSize MaskSize maskSize GrayMatchMethod GrayMatchMethod GrayMatchMethod GrayMatchMethod grayMatchMethod 'ssd' "ssd" "ssd" "ssd" "ssd" 'sad' "sad" "sad" "sad" "sad" 'ncc' "ncc" "ncc" "ncc" "ncc" binocular_disparity binocular_disparity BinocularDisparity BinocularDisparity BinocularDisparity 'ssd' "ssd" "ssd" "ssd" "ssd" 'sad' "sad" "sad" "sad" "sad" 'ncc' "ncc" "ncc" "ncc" "ncc" MatchThreshold MatchThreshold MatchThreshold MatchThreshold matchThreshold 'ssd' "ssd" "ssd" "ssd" "ssd" 'sad' "sad" "sad" "sad" "sad" 'ncc' "ncc" "ncc" "ncc" "ncc" 
To increase the algorithm's performance, the search area for the
matchings can be limited. Only points within a window of 
  
    
       
    
       
    
       
    
       
    
       
    
       
    
       
    
       
    
       
    
       
    
       
    
       
    
       
    
       
   
  
     
  
     
  
     
  
     
  
     
  
     
  
     
 RowMove RowMove RowMove RowMove rowMove ColMove ColMove ColMove ColMove colMove 
If the transformation contains a rotation, i.e., if the first image
is rotated with respect to the second image, the parameter
Rotation Rotation Rotation Rotation rotation 
Once the initial matching is complete, a randomized search algorithm
(RANSAC) is used to determine the transformation matrix
HomMat2D HomMat2D HomMat2D HomMat2D homMat2D DistanceThreshold DistanceThreshold DistanceThreshold DistanceThreshold distanceThreshold 
Once a choice has been made, the matrix is further optimized using
all consistent points. For this optimization, the
EstimationMethod EstimationMethod EstimationMethod EstimationMethod estimationMethod 'gold_standard' "gold_standard" "gold_standard" "gold_standard" "gold_standard" 'normalized_dlt' "normalized_dlt" "normalized_dlt" "normalized_dlt" "normalized_dlt" vector_to_proj_hom_mat2d vector_to_proj_hom_mat2d VectorToProjHomMat2d VectorToProjHomMat2d VectorToProjHomMat2d 
Point pairs that still violate the consistency condition for the
final transformation are dropped, the matched points are returned as
control values.  Points1 Points1 Points1 Points1 points1 Points2 Points2 Points2 Points2 points2 
The parameter RandSeed RandSeed RandSeed RandSeed randSeed RandSeed RandSeed RandSeed RandSeed randSeed RandSeed RandSeed RandSeed RandSeed randSeed 0 , the random number generator is initialized with the
current time.  Hence, the results may not be reproducible in this
case.
Execution Information 
  Multithreading type: reentrant (runs in parallel with non-exclusive operators). 
Multithreading scope: global (may be called from any thread). 
  Processed without parallelization. 
 
Parameters 
  
Image1 Image1 Image1 Image1 image1 singlechannelimage → object HImage HImage Hobject  (byte / uint2) 
 
Input image 1.
 
  
Image2 Image2 Image2 Image2 image2 singlechannelimage → object HImage HImage Hobject  (byte / uint2) 
 
Input image 2.
 
  
Rows1 Rows1 Rows1 Rows1 rows1 point.x-array → HTuple HTuple Htuple  (real /  integer)  (double  /  int /  long)  (double  /  Hlong)  (double  /  Hlong)  
 
Row coordinates of characteristic points
in image 1.
 
  
Cols1 Cols1 Cols1 Cols1 cols1 point.y-array → HTuple HTuple Htuple  (real /  integer)  (double  /  int /  long)  (double  /  Hlong)  (double  /  Hlong)  
 
Column coordinates of characteristic points
in image 1.
 
  
Rows2 Rows2 Rows2 Rows2 rows2 point.x-array → HTuple HTuple Htuple  (real /  integer)  (double  /  int /  long)  (double  /  Hlong)  (double  /  Hlong)  
 
Row coordinates of characteristic points
in image 2.
 
  
Cols2 Cols2 Cols2 Cols2 cols2 point.y-array → HTuple HTuple Htuple  (real /  integer)  (double  /  int /  long)  (double  /  Hlong)  (double  /  Hlong)  
 
Column coordinates of characteristic points
in image 2.
 
  
GrayMatchMethod GrayMatchMethod GrayMatchMethod GrayMatchMethod grayMatchMethod string → HTuple HTuple Htuple  (string)  (string )  (HString )  (char* )  
 
Gray value comparison metric.
Default value:  
    'ssd' 
    "ssd" 
    "ssd" 
    "ssd" 
    "ssd" 
List of values:  'ncc' "ncc" "ncc" "ncc" "ncc" , 'sad' "sad" "sad" "sad" "sad" , 'ssd' "ssd" "ssd" "ssd" "ssd" 
 
  
MaskSize MaskSize MaskSize MaskSize maskSize integer → HTuple HTuple Htuple  (integer)  (int  /  long)  (Hlong )  (Hlong )  
 
Size of gray value masks.
Default value:  10
Typical range of values:  
    MaskSize 
    MaskSize 
    MaskSize 
    MaskSize 
    maskSize 
    
          ≤
          90
 
  
RowMove RowMove RowMove RowMove rowMove integer → HTuple HTuple Htuple  (integer)  (int  /  long)  (Hlong )  (Hlong )  
 
Average row coordinate shift.
Default value:  0
 
  
ColMove ColMove ColMove ColMove colMove integer → HTuple HTuple Htuple  (integer)  (int  /  long)  (Hlong )  (Hlong )  
 
Average column coordinate shift.
Default value:  0
 
  
RowTolerance RowTolerance RowTolerance RowTolerance rowTolerance integer → HTuple HTuple Htuple  (integer)  (int  /  long)  (Hlong )  (Hlong )  
 
Half height of matching search window.
Default value:  256
 
  
ColTolerance ColTolerance ColTolerance ColTolerance colTolerance integer → HTuple HTuple Htuple  (integer)  (int  /  long)  (Hlong )  (Hlong )  
 
Half width of matching search window.
Default value:  256
 
  
Rotation Rotation Rotation Rotation rotation real(-array) → HTuple HTuple Htuple  (real)  (double )  (double )  (double )  
 
Range of rotation angles.
Default value:  0.0
Suggested values:  0.0, 0.7854, 1.571, 3.142
 
  
MatchThreshold MatchThreshold MatchThreshold MatchThreshold matchThreshold number → HTuple HTuple Htuple  (integer /  real)  (int  /  long /  double)  (Hlong  /  double)  (Hlong  /  double)  
 
Threshold for gray value matching.
Default value:  10
Suggested values:  10, 20, 50, 100, 0.9, 0.7
 
  
EstimationMethod EstimationMethod EstimationMethod EstimationMethod estimationMethod string → HTuple HTuple Htuple  (string)  (string )  (HString )  (char* )  
 
Transformation matrix estimation algorithm.
Default value:  
    'normalized_dlt' 
    "normalized_dlt" 
    "normalized_dlt" 
    "normalized_dlt" 
    "normalized_dlt" 
List of values:  'gold_standard' "gold_standard" "gold_standard" "gold_standard" "gold_standard" , 'normalized_dlt' "normalized_dlt" "normalized_dlt" "normalized_dlt" "normalized_dlt" 
 
  
DistanceThreshold DistanceThreshold DistanceThreshold DistanceThreshold distanceThreshold real → HTuple HTuple Htuple  (real)  (double )  (double )  (double )  
 
Threshold for transformation consistency check.
Default value:  0.2
 
  
RandSeed RandSeed RandSeed RandSeed randSeed integer → HTuple HTuple Htuple  (integer)  (int  /  long)  (Hlong )  (Hlong )  
 
Seed for the random number generator.
Default value:  0
 
  
HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat2d → HHomMat2D , HTuple HTuple Htuple  (real)  (double )  (double )  (double )  
 
Homogeneous projective transformation matrix.
 
  
Points1 Points1 Points1 Points1 points1 integer-array → HTuple HTuple Htuple  (integer)  (int  /  long)  (Hlong )  (Hlong )  
 
Indices of matched input points in image 1.
 
  
Points2 Points2 Points2 Points2 points2 integer-array → HTuple HTuple Htuple  (integer)  (int  /  long)  (Hlong )  (Hlong )  
 
Indices of matched input points in image 2.
 
Possible Predecessors 
points_foerstner points_foerstner PointsFoerstner PointsFoerstner PointsFoerstner points_harris points_harris PointsHarris PointsHarris PointsHarris 
Possible Successors 
projective_trans_image projective_trans_image ProjectiveTransImage ProjectiveTransImage ProjectiveTransImage projective_trans_image_size projective_trans_image_size ProjectiveTransImageSize ProjectiveTransImageSize ProjectiveTransImageSize projective_trans_region projective_trans_region ProjectiveTransRegion ProjectiveTransRegion ProjectiveTransRegion projective_trans_contour_xld projective_trans_contour_xld ProjectiveTransContourXld ProjectiveTransContourXld ProjectiveTransContourXld projective_trans_point_2d projective_trans_point_2d ProjectiveTransPoint2d ProjectiveTransPoint2d ProjectiveTransPoint2d projective_trans_pixel projective_trans_pixel ProjectiveTransPixel ProjectiveTransPixel ProjectiveTransPixel 
Alternatives 
hom_vector_to_proj_hom_mat2d hom_vector_to_proj_hom_mat2d HomVectorToProjHomMat2d HomVectorToProjHomMat2d HomVectorToProjHomMat2d vector_to_proj_hom_mat2d vector_to_proj_hom_mat2d VectorToProjHomMat2d VectorToProjHomMat2d VectorToProjHomMat2d 
See also 
proj_match_points_ransac_guided proj_match_points_ransac_guided ProjMatchPointsRansacGuided ProjMatchPointsRansacGuided ProjMatchPointsRansacGuided 
References 
Richard Hartley, Andrew Zisserman: “Multiple View Geometry in
Computer Vision”; Cambridge University Press, Cambridge; 2000.
Module 
Matching