gpt4 book ai didi

c++ - openCV 输出 SIFT 描述符的类型

转载 作者:塔克拉玛干 更新时间:2023-11-03 07:26:31 25 4
gpt4 key购买 nike

openCV C++ 中输出描述符 Mat 的类型是什么或应该是什么?

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

    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.

我的意思是“描述符——描述符的输出矩阵。”

谢谢。

最佳答案

根据经验:无论何时看到 OutputArray,都不必担心大小或类型。

只要提供一个未初始化的 Mat,函数就会填充它。

在这种情况下,输出将是一个 NxM 浮点矩阵,其中 N(行)将是关键点的数量,M(列)将是 128,即 SIFT 特征的长度。

关于c++ - openCV 输出 SIFT 描述符的类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18613806/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com