@Namespace(value="cv") @NoOffset @Properties(inherit=opencv_features2d.class) public class BOWImgDescriptorExtractor extends Pointer
Such a computation consists of the following steps:
1. Compute descriptors for a given image and its keypoints set. 2. Find the nearest visual words from the vocabulary for each keypoint descriptor. 3. Compute the bag-of-words image descriptor as is a normalized histogram of vocabulary words encountered in the image. The i-th bin of the histogram is a frequency of i-th word of the vocabulary in the given image.
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
BOWImgDescriptorExtractor(DescriptorMatcher dmatcher)
\overload
|
BOWImgDescriptorExtractor(Feature2D dextractor,
DescriptorMatcher dmatcher)
\brief The constructor.
|
BOWImgDescriptorExtractor(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
compute(GpuMat keypointDescriptors,
GpuMat imgDescriptor) |
void |
compute(GpuMat keypointDescriptors,
GpuMat imgDescriptor,
IntVectorVector pointIdxsOfClusters) |
void |
compute(GpuMat image,
KeyPointVector keypoints,
GpuMat imgDescriptor) |
void |
compute(GpuMat image,
KeyPointVector keypoints,
GpuMat imgDescriptor,
IntVectorVector pointIdxsOfClusters,
Mat descriptors) |
void |
compute(Mat image,
KeyPointVector keypoints,
Mat imgDescriptor) |
void |
compute(Mat image,
KeyPointVector keypoints,
Mat imgDescriptor,
IntVectorVector pointIdxsOfClusters,
Mat descriptors)
\brief Computes an image descriptor using the set visual vocabulary.
|
void |
compute(Mat keypointDescriptors,
Mat imgDescriptor) |
void |
compute(Mat keypointDescriptors,
Mat imgDescriptor,
IntVectorVector pointIdxsOfClusters)
\overload
|
void |
compute(UMat image,
KeyPointVector keypoints,
UMat imgDescriptor) |
void |
compute(UMat image,
KeyPointVector keypoints,
UMat imgDescriptor,
IntVectorVector pointIdxsOfClusters,
Mat descriptors) |
void |
compute(UMat keypointDescriptors,
UMat imgDescriptor) |
void |
compute(UMat keypointDescriptors,
UMat imgDescriptor,
IntVectorVector pointIdxsOfClusters) |
int |
descriptorSize()
\brief Returns an image descriptor size if the vocabulary is set.
|
int |
descriptorType()
\brief Returns an image descriptor type.
|
Mat |
getVocabulary()
\brief Returns the set vocabulary.
|
void |
setVocabulary(Mat vocabulary)
\brief Sets a visual vocabulary.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
public BOWImgDescriptorExtractor(Pointer p)
Pointer.Pointer(Pointer)
.public BOWImgDescriptorExtractor(@Cast(value="cv::DescriptorExtractor*") @opencv_core.Ptr Feature2D dextractor, @opencv_core.Ptr DescriptorMatcher dmatcher)
dextractor
- Descriptor extractor that is used to compute descriptors for an input image and
its keypoints.dmatcher
- Descriptor matcher that is used to find the nearest word of the trained vocabulary
for each keypoint descriptor of the image.public BOWImgDescriptorExtractor(@opencv_core.Ptr DescriptorMatcher dmatcher)
public void setVocabulary(@Const @ByRef Mat vocabulary)
vocabulary
- Vocabulary (can be trained using the inheritor of BOWTrainer ). Each row of the
vocabulary is a visual word (cluster center).public void compute(@ByVal Mat image, @ByRef KeyPointVector keypoints, @ByVal Mat imgDescriptor, IntVectorVector pointIdxsOfClusters, Mat descriptors)
image
- Image, for which the descriptor is computed.keypoints
- Keypoints detected in the input image.imgDescriptor
- Computed output image descriptor.pointIdxsOfClusters
- Indices of keypoints that belong to the cluster. This means that
pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary)
returned if it is non-zero.descriptors
- Descriptors of the image keypoints that are returned if they are non-zero.public void compute(@ByVal Mat image, @ByRef KeyPointVector keypoints, @ByVal Mat imgDescriptor)
public void compute(@ByVal UMat image, @ByRef KeyPointVector keypoints, @ByVal UMat imgDescriptor, IntVectorVector pointIdxsOfClusters, Mat descriptors)
public void compute(@ByVal UMat image, @ByRef KeyPointVector keypoints, @ByVal UMat imgDescriptor)
public void compute(@ByVal GpuMat image, @ByRef KeyPointVector keypoints, @ByVal GpuMat imgDescriptor, IntVectorVector pointIdxsOfClusters, Mat descriptors)
public void compute(@ByVal GpuMat image, @ByRef KeyPointVector keypoints, @ByVal GpuMat imgDescriptor)
public void compute(@ByVal Mat keypointDescriptors, @ByVal Mat imgDescriptor, IntVectorVector pointIdxsOfClusters)
keypointDescriptors
- Computed descriptors to match with vocabulary.imgDescriptor
- Computed output image descriptor.pointIdxsOfClusters
- Indices of keypoints that belong to the cluster. This means that
pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary)
returned if it is non-zero.public void compute(@ByVal UMat keypointDescriptors, @ByVal UMat imgDescriptor, IntVectorVector pointIdxsOfClusters)
public void compute(@ByVal GpuMat keypointDescriptors, @ByVal GpuMat imgDescriptor, IntVectorVector pointIdxsOfClusters)
public int descriptorSize()
public int descriptorType()
Copyright © 2020. All rights reserved.