Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top