Previous topic

ecto_opencv.imgproc

Next topic

ecto_opencv conventions

This Page

ecto_opencv.features2d

Feature detection cells.

ecto_opencv.features2d

MatchRefinementPnP

Brief doc

A feature descriptor match refiner, using PnP.

Parameters

  • inlier_thresh   type: float    not required   default: 30.0

    The thresh hold on number of inliers to consider pose found.

  • min_inliers   type: unsigned int    not required   default: 100

    minimum number of inliers

  • n_iters   type: unsigned int    not required   default: 100

    number of ransac iterations

  • reprojection_error   type: float    not required   default: 8.0

    error threshold

Inputs

  • K   type: cv::Mat   

    Camera model.

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The descriptor matches.

  • test   type: cv::Mat   

    The 3d test points.

  • train   type: cv::Mat   

    The 3d training points.

Outputs

  • R   type: cv::Mat   

  • T   type: cv::Mat   

  • found   type: bool   

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The verified matches.

  • matches_mask   type: cv::Mat   

    The matches mask, same size as the original matches.

MatchRefinementHSvd

Brief doc

A feature descriptor match refiner, using Homography and svd estimation.

Parameters

  • inlier_thresh   type: float    not required   default: 25.0

    The inlier threshold of pose found.

  • min_inliers   type: unsigned int    not required   default: 100

    minimum number of inliers

  • n_iters   type: unsigned int    not required   default: 200

    number of ransac iterations

  • reprojection_error   type: float    not required   default: 43.5

    error threshold

Inputs

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The descriptor matches.

  • test_2d   type: cv::Mat   

    The 2d test points.

  • test_3d   type: cv::Mat   

    The 3d test points.

  • train_2d   type: cv::Mat   

    The 2d training points.

  • train_3d   type: cv::Mat   

    The 3d training points.

Outputs

  • R   type: cv::Mat   

  • T   type: cv::Mat   

  • found   type: bool   

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The verified matches.

  • matches_mask   type: cv::Mat   

    The matches mask, same size as the original matches.

SIFT

Brief doc

An ORB detector. Takes a image and a mask, and computes keypoints and descriptors(32 byte binary).

Parameters

  • edgeThreshold   type: float    not required   no default value

  • nOctaveLayers   type: int    not required   default: 3

  • threshold   type: float    not required   no default value

Inputs

  • image   type: cv::Mat   

    An input image.

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints.

  • mask   type: cv::Mat   

    An mask, same size as image.

  • points   type: cv::Mat   

    2d points.

Outputs

  • descriptors   type: cv::Mat   

    The descriptors per keypoints

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints.

MatchRefinement3d

Brief doc

A feature descriptor match refiner, using an affine 3d to 3d estimator.

Inputs

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The descriptor matches.

  • test   type: cv::Mat   

    The 3d test points.

  • train   type: cv::Mat   

    The 3d training points.

Outputs

  • R   type: cv::Mat   

  • T   type: cv::Mat   

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The verified matches.

  • matches_mask   type: cv::Mat   

    The matches mask, same size as the original matches.

LSHMatcher

Brief doc

Given descriptors, find matches.

Parameters

  • key_size   type: unsigned int    not required   default: 8

  • multi_probe_level   type: unsigned int    not required   default: 1

  • n_tables   type: unsigned int    not required   default: 4

  • radius   type: unsigned int    not required   default: 55

Inputs

  • test   type: cv::Mat   

    Train descriptors.

  • train   type: cv::Mat   

    Test descriptors.

  • update   type: bool   

    If set to true, update the descriptors.

Outputs

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The descriptor matches.

ORBFeature

Brief doc

An ORB feature detector.

Parameters

  • first_level   type: int    not required   default: 0

    The first level of the scales

  • n_features   type: int    not required   default: 1000

    The number of desired features

  • n_levels   type: int    not required   default: 3

    The number of scales

  • scale_factor   type: float    not required   default: 1.20000004768

    The factor between scales

Outputs

  • image   type: cv::Mat   

    An input image.

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints.

  • mask   type: cv::Mat   

    An mask, same size as image.

Matcher

Brief doc

A feature descriptor matcher.

Inputs

  • test   type: cv::Mat   

    Train descriptors.

  • train   type: cv::Mat   

    Test descriptors.

Outputs

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The descriptor matches.

DrawMatches

Brief doc

Draws matches.

Inputs

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The descriptor matches.

  • matches_mask   type: cv::Mat   

    The descriptor matches mask.

  • test   type: cv::Mat   

    Test keypoints.

  • test_image   type: cv::Mat   

    Test image.

  • train   type: cv::Mat   

    Train keypoints

  • train_image   type: cv::Mat   

    Test image.

Outputs

  • output   type: cv::Mat   

    An output image.

SIFTDescriptor

Brief doc

A SIFT feature detector.

Parameters

  • edgeThreshold   type: float    not required   no default value

  • nOctaveLayers   type: int    not required   default: 3

  • threshold   type: float    not required   no default value

Outputs

  • descriptors   type: cv::Mat   

    The descriptors per keypoints

  • image   type: cv::Mat   

    An input image.

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints.

  • mask   type: cv::Mat   

    An mask, same size as image.

  • points   type: cv::Mat   

    2d points.

ORBstats

Brief doc

Prints stats on ORB descriptors.

Inputs

  • descriptors   type: cv::Mat   

    The input descriptors.

Outputs

  • distances   type: cv::Mat   

    A histogram of the distances in this set.

FeatureDescriptor

Brief doc

Parameters

  • json_descriptor_params   type: boost::python::api::object    not required   default: {"type": "ORB", "module": "ecto_opencv.features2d"}

    Parameters for the descriptor as a JSON string. It should have the format: “{“type”:”ORB/SIFT whatever”, “module”:”where_it_is”, “param_1”:val1, ....}

  • json_feature_params   type: boost::python::api::object    not required   default: {"type": "ORB", "module": "ecto_opencv.features2d"}

    Parameters for the feature as a JSON string. It should have the format: “{“type”:”ORB/SIFT whatever”, “module”:”where_it_is”, “param_1”:val1, ....}

Inputs

  • image   type: cv::Mat   

    An input image.

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints.

  • mask   type: cv::Mat   

    An mask, same size as image.

  • points   type: cv::Mat   

    2d points.

Outputs

  • descriptors   type: cv::Mat   

    The descriptors per keypoints

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints.

DrawKeypoints

Brief doc

Draws keypoints.

Inputs

  • image   type: cv::Mat   

    The input image, used as the base to draw on.

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints to draw.

Outputs

  • image   type: cv::Mat   

    The output image.

SIFTFeature

Brief doc

A SIFT feature detector.

Parameters

  • edgeThreshold   type: float    not required   no default value

  • nOctaveLayers   type: int    not required   default: 3

  • threshold   type: float    not required   no default value

Outputs

  • image   type: cv::Mat   

    An input image.

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints.

  • mask   type: cv::Mat   

    An mask, same size as image.

ORBDescriptor

Brief doc

An ORB descriptor extractor.

Outputs

  • descriptors   type: cv::Mat   

    The descriptors per keypoints

  • image   type: cv::Mat   

    An input image.

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints.

  • mask   type: cv::Mat   

    An mask, same size as image.

  • points   type: cv::Mat   

    2d points.

FASTFeature

Brief doc

A FAST feature detector.

Parameters

  • nonmax   type: bool    not required   default: True

    Use the FAST nonmax suppression.

  • thresh   type: int    not required   default: 20

    The FAST threshold. 20 is a decent value.

Outputs

  • image   type: cv::Mat   

    An input image.

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints.

  • mask   type: cv::Mat   

    An mask, same size as image.

KeypointsToMat

Brief doc

Take key points and return an array of the x,y coordinates.

Inputs

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints

Outputs

  • points   type: cv::Mat   

    The array of x,y coordinates

MatchRefinement

Brief doc

A feature descriptor match refiner, using a Homography estimator

Parameters

  • match_distance   type: double    not required   default: 120.0

    The match distance threshhold.

Inputs

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The descriptor matches.

  • test   type: cv::Mat   

    The test points.

  • train   type: cv::Mat   

    The training points.

Outputs

  • H   type: cv::Mat   

    The estimated homography.

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The verified matches.

  • matches_mask   type: cv::Mat   

    The matches mask, same size as the original matches.

DescriptorAccumulator

Brief doc

Accumulates descriptors.

Inputs

  • descriptors   type: cv::Mat   

    The input descriptors.

Outputs

  • descriptors   type: cv::Mat   

    A cumulative view of all descriptors.

ORB

Brief doc

An ORB detector. Takes a image and a mask, and computes keypoints and descriptors(32 byte binary).

Parameters

  • n_features   type: int    not required   default: 1000

    The number of desired features

  • n_levels   type: int    not required   default: 3

    The number of scales

  • scale_factor   type: float    not required   default: 1.20000004768

    The factor between scales

Inputs

  • image   type: cv::Mat   

    An input image.

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints.

  • mask   type: cv::Mat   

    An mask, same size as image.

  • points   type: cv::Mat   

    2d points.

Outputs

  • descriptors   type: cv::Mat   

    The descriptors per keypoints

  • keypoints   type: std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >   

    The keypoints.

MatchesToMat

Brief doc

Takes matches and turns them into a cv mat alias..

Inputs

  • matches   type: std::vector<cv::DMatch, std::allocator<cv::DMatch> >   

    The matches

Outputs

  • matches   type: cv::Mat   

    An nx3 matrix of matched indices with distances in the 3rd column