public class DescriptorExtractor extends Object
Abstract base class for computing descriptors for image keypoints.
class CV_EXPORTS DescriptorExtractor
// C++ code:
public:
virtual ~DescriptorExtractor();
void compute(const Mat& image, vector
Mat& descriptors) const;
void compute(const vector
vector
virtual void read(const FileNode&);
virtual void write(FileStorage&) const;
virtual int descriptorSize() const = 0;
virtual int descriptorType() const = 0;
static Ptr
protected:...
};
In this interface, a keypoint descriptor can be represented as a
dense, fixed-dimension vector of a basic type. Most descriptors follow this pattern as it simplifies computing distances between descriptors. Therefore, a collection of descriptors is represented as "Mat", where each row is a keypoint descriptor.
| Modifier and Type | Field and Description |
|---|---|
static int |
BRIEF |
static int |
BRISK |
static int |
FREAK |
protected long |
nativeObj |
static int |
OPPONENT_BRIEF |
static int |
OPPONENT_BRISK |
static int |
OPPONENT_FREAK |
static int |
OPPONENT_ORB |
static int |
OPPONENT_SIFT |
static int |
OPPONENT_SURF |
static int |
ORB |
static int |
SIFT |
static int |
SURF |
| Modifier | Constructor and Description |
|---|---|
protected |
DescriptorExtractor(long addr) |
| Modifier and Type | Method and Description |
|---|---|
void |
compute(List<Mat> images,
List<MatOfKeyPoint> keypoints,
List<Mat> descriptors)
Computes the descriptors for a set of keypoints detected in an image (first
variant) or image set (second variant).
|
void |
compute(Mat image,
MatOfKeyPoint keypoints,
Mat descriptors)
Computes the descriptors for a set of keypoints detected in an image (first
variant) or image set (second variant).
|
static DescriptorExtractor |
create(int extractorType)
Creates a descriptor extractor by name.
|
int |
descriptorSize() |
int |
descriptorType() |
boolean |
empty() |
protected void |
finalize() |
void |
read(String fileName) |
void |
write(String fileName) |
protected final long nativeObj
public static final int SIFT
public static final int SURF
public static final int ORB
public static final int BRIEF
public static final int BRISK
public static final int FREAK
public static final int OPPONENT_SIFT
public static final int OPPONENT_SURF
public static final int OPPONENT_ORB
public static final int OPPONENT_BRIEF
public static final int OPPONENT_BRISK
public static final int OPPONENT_FREAK
public void compute(Mat image, MatOfKeyPoint keypoints, Mat descriptors)
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).
image - Image.keypoints - Input collection of keypoints. Keypoints for which a
descriptor cannot be computed are removed. Sometimes new keypoints can be
added, for example: SIFT duplicates keypoint with several
dominant orientations (for each orientation).descriptors - Computed descriptors. In the second variant of the method
descriptors[i] are descriptors computed for a keypoints[i].
Row j is the keypoints (or keypoints[i])
is the descriptor for keypoint j-th keypoint.public void compute(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> descriptors)
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).
images - Image set.keypoints - Input collection of keypoints. Keypoints for which a
descriptor cannot be computed are removed. Sometimes new keypoints can be
added, for example: SIFT duplicates keypoint with several
dominant orientations (for each orientation).descriptors - Computed descriptors. In the second variant of the method
descriptors[i] are descriptors computed for a keypoints[i].
Row j is the keypoints (or keypoints[i])
is the descriptor for keypoint j-th keypoint.public static DescriptorExtractor create(int extractorType)
Creates a descriptor extractor by name.
The current implementation supports the following types of a descriptor extractor:
"SIFT" -- "SIFT"
"SURF" -- "SURF"
"BRIEF" -- "BriefDescriptorExtractor"
"BRISK" -- "BRISK"
"ORB" -- "ORB"
"FREAK" -- "FREAK"
A combined format is also supported: descriptor extractor adapter name
("Opponent" -- "OpponentColorDescriptorExtractor") + descriptor
extractor name (see above), for example: "OpponentSIFT".
extractorType - a extractorTypepublic int descriptorSize()
public int descriptorType()
public boolean empty()
public void read(String fileName)
public void write(String fileName)
Copyright © 2014. All rights reserved.