# opentl::cvprocess::SurfFeatures Class Reference

List of all members.

## Public Member Functions
void | copyAllMatches (opentl::core::cvdata::SurfFeatures &surfFeatures)
| Just copy all matches as inliers (no outlier removal).
void | detectKeypoints (const opentl::core::cvdata::Image &img, opentl::core::cvdata::SurfFeatures &surfFeatures, opentl::core::cvdata::Image *mask=NULL)
| SURF keypoints detection from a given image.
void | drawCorrespondences (const opentl::core::cvdata::SurfFeatures &surfFeatures, const opentl::core::cvdata::Image &refImg, const opentl::core::cvdata::Image &currImg, opentl::core::cvdata::Image &outImg, CvScalar lineColor)
| Draw inlier object-image matchings (after RANSAC) - optionally, draw also the estimated homography transform.
void | drawFeatures (const opentl::core::cvdata::SurfFeatures &surfFeatures, opentl::core::cvdata::Image &img, CvScalar color)
| Draw model or image features onto an image.
void | drawInlierCorrespondences (const opentl::core::cvdata::SurfFeatures &surfFeatures, const opentl::core::cvdata::Image &refImg, const opentl::core::cvdata::Image &currImg, opentl::core::cvdata::Image &outImg, CvScalar lineColor, CvRect *rectangleHomography=NULL)
| Draw inlier object-image matchings (after RANSAC) - optionally, draw also the estimated homography transform.
int | matchKeypoints (opentl::core::cvdata::SurfFeatures &objectFeatures, const opentl::core::cvdata::SurfFeatures &imageFeatures)
| Match object-image keypoints (without RANSAC).
int | removeOutliers (opentl::core::cvdata::SurfFeatures &surfFeatures)
| Remove outliers with RANSAC, using a homography model (that also estimates the homography itself).
| SurfFeatures (bool bUseFLANN=false, CvSURFParams *params=NULL)
| Constructor.
| ~SurfFeatures ()

## Constructor & Destructor Documentation

opentl::cvprocess::SurfFeatures::SurfFeatures | ( | bool | bUseFLANN = `false`,
|  | CvSURFParams * | params = `NULL` |
| ) |  |  |

Constructor.

Parameters:

  | bUseFLANN | define whether to use approximate nearest-neighbor search
  | params | OpenCV parameters for SURF

opentl::cvprocess::SurfFeatures::~SurfFeatures | ( |  | ) |

## Member Function Documentation

void opentl::cvprocess::SurfFeatures::copyAllMatches | ( | opentl::core::cvdata::SurfFeatures & | surfFeatures | ) |

Just copy all matches as inliers (no outlier removal).

Parameters:

  | surfFeatures | Input and output matched keypoints

void opentl::cvprocess::SurfFeatures::detectKeypoints | ( | const opentl::core::cvdata::Image & | img,
|  | opentl::core::cvdata::SurfFeatures & | surfFeatures,
|  | opentl::core::cvdata::Image * | mask = `NULL` |
| ) |  |  |

SURF keypoints detection from a given image.

Parameters:

  | img | Input image
  | surfFeatures | Output detected keypoints
  | mask | Binary mask image (for detection only in a ROI)

void opentl::cvprocess::SurfFeatures::drawCorrespondences | ( | const opentl::core::cvdata::SurfFeatures & | surfFeatures,
|  | const opentl::core::cvdata::Image & | refImg,
|  | const opentl::core::cvdata::Image & | currImg,
|  | opentl::core::cvdata::Image & | outImg,
|  | CvScalar | lineColor |
| ) |  |  |

Draw inlier object-image matchings (after RANSAC) - optionally, draw also the estimated homography transform.

Parameters:

  | surfFeatures | Input matched keypoints
  | refImg | Model image
  | currImg | Current image
  | outImg | Output image (with both images)
  | lineColor | Color of matching lines

void opentl::cvprocess::SurfFeatures::drawFeatures | ( | const opentl::core::cvdata::SurfFeatures & | surfFeatures,
|  | opentl::core::cvdata::Image & | img,
|  | CvScalar | color |
| ) |  |  |

Draw model or image features onto an image.

Parameters:

  | surfFeatures | Detected keypoints
  | img | Image for drawing
  | color | Color of keypoints (small circles)

void opentl::cvprocess::SurfFeatures::drawInlierCorrespondences | ( | const opentl::core::cvdata::SurfFeatures & | surfFeatures,
|  | const opentl::core::cvdata::Image & | refImg,
|  | const opentl::core::cvdata::Image & | currImg,
|  | opentl::core::cvdata::Image & | outImg,
|  | CvScalar | lineColor,
|  | CvRect * | rectangleHomography = `NULL` |
| ) |  |  |

Draw inlier object-image matchings (after RANSAC) - optionally, draw also the estimated homography transform.

Parameters:

  | surfFeatures | Input matched keypoints
  | refImg | Model image
  | currImg | Current image
  | outImg | Output image (with both images)
  | lineColor | Color of matching lines
  | rectangleHomography | (optional) pointer to a rectangle in object image, to be transformed with the estimated homography

int opentl::cvprocess::SurfFeatures::matchKeypoints | ( | opentl::core::cvdata::SurfFeatures & | objectFeatures,
|  | const opentl::core::cvdata::SurfFeatures & | imageFeatures |
| ) |  |  |

Match object-image keypoints (without RANSAC).

Parameters:

  | objectFeatures | Input detected keypoints on the reference image
  | imageFeatures | Input detected keypoints on the current image

int opentl::cvprocess::SurfFeatures::removeOutliers | ( | opentl::core::cvdata::SurfFeatures & | surfFeatures | ) |

Remove outliers with RANSAC, using a homography model (that also estimates the homography itself).

Parameters:

  | surfFeatures | Input and output matched keypoints