简体   繁体   中英

type of openCV output SIFT descriptors

What is or what should be the type of the output descriptors Mat in openCV C++ ?

C++: void SIFT::operator()(InputArray img, InputArray mask, vector& keypoints, OutputArray descriptors, bool useProvidedKeypoints=false) Parameters:

    img – Input 8-bit grayscale image
    mask – Optional input mask that marks the regions where we should detect features.
    keypoints – The input/output vector of keypoints
    descriptors – The output matrix of descriptors. Pass cv::noArray() if you do not need them.
    useProvidedKeypoints – Boolean flag. If it is true, the keypoint detector is not run. Instead, the provided vector of keypoints is used and the algorithm just computes their descriptors.

What I mean is "descriptors – The output matrix of descriptors."

Thanks.

as a rule of thumb: whenever you see an OutputArray, you don't have to worry about the size or type.

just supply an uninitialized Mat, the function will fill it.

in this case , the output will be a NxM float Mat where N(rows) will be the number of keypoints, and M(cols) will be 128, the length of a SIFT feature.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM