Feature descriptor extraction of public interface _OPENCV

Source: Internet
Author: User

OpenCV encapsulates some feature descriptor extraction algorithms, which enable users to solve the problem easily using a variety of algorithms. This chapter is used to compute the expression of the vector vectors expressed as a high-dimensional space. All the parts that implement the Vector feature description sub-extract inherit the Descriptorextractor interface. Descriptorextractor class Descriptorextractor

Abstract base class for calculating feature descriptors for image-critical points.

Class Cv_exports Descriptorextractor
{public
:
    virtual ~descriptorextractor ();

    void Compute (const mat& image, vector<keypoint>& keypoints,
                  mat& descriptors) const;
    void Compute (const vector<mat>& images, vector<vector<keypoint> >& keypoints,
                  vector <Mat>& descriptors) const;

    virtual void read (const filenode&);
    virtual void Write (filestorage&) const;

    virtual int descriptorsize () const = 0;
    virtual int Descriptortype () const = 0;

    Static ptr<descriptorextractor> Create (const string& descriptorextractortype);

Protected:
    ...
};

In this interface, a feature descriptor of a key point can be expressed as a dense (dense) vector of fixed dimensions. Most of the feature descriptors are calculated at each pixel in this pattern. The set of feature descriptors is expressed as Mat, where each row is a key feature descriptor. Descriptorextractor::compute

Computes the descriptor based on the detected image (the first case) or the key point (the detector) in the image set (the second case). C + +: void Descriptorextractor:: Compute (const mat& image, vector<keypoint>& keypoints, mat& DESCRI ptors) Const C + +: void Descriptorextractor:: Compute (const vector<mat>& images, Vector<vector<keypoi nt>>& keypoints, vector<mat>& descriptors) const parameters:image– image. images– image set.

:p Aram Keypoints: The characteristic key point of the input. The key point that cannot be computed by a feature descriptor is skipped. In addition some new feature key points are added, such as: SIFT adds several key points in the main direction of the feature. parameters:descriptors– the computational feature descriptor. In the second variant of the "method Descriptors[i] are descriptors computed for a keypoints[i] '. Row ' J is the keypoints (or keypoints[i]) are the descriptor for KeyPoint j-th KeyPoint. Descriptorextractor::read

Reads the object extracted from the feature description child from the file point. C + +: void Descriptorextractor:: Read (const filenode& fn) parameters:fn– read file point. Descriptorextractor::write

Writes the extracted object of the feature descriptor to the file. C + +: void Descriptorextractor:: Write (filestorage& FS) const parameters:fs– a file written by. Descriptorextractor::create

Creates a feature descriptor extraction based on the name. C + +: ptr<descriptorextractor> descriptorextractor:: Create (const string& descriptorextractortype) Paramete Rs:descriptorextractortype–descriptor Extractor type.

Existing implementations support the following types of feature descriptor extraction methods: "SIFT" –siftdescriptorextractor "SURF" –surfdescriptorextractor "ORB" – Orbdescriptorextractor "BRIEF" –briefdescriptorextractor

A combined format is also supported:descriptor Extractor adapter name ("opponent" –opponentcolordescriptorextractor) + Descriptor Extractor Name (click above) for example: "Opponentsift".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.