gpt4 book ai didi

c++ - knnMatchImpl 中的断言失败 (queryDescriptors.type() == trainDescCollection[0].type()),

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:16:15 24 4
gpt4 key购买 nike

当使用 BOWImgDescriptorExtractorDescriptorExtractor 作为 SIFTDescriptorMatcher 作为 ButeForce 我我收到错误信息

OpenCV Error: Assertion failed (queryDescriptors.type() == trainDescCollection[0].type()) in knnMatchImpl,

我有什么错误。

当我尝试计算时例如。

bowide->compute(img, keypoints, response_hist);

最佳答案

我在使用带有 BFMatcher 的 Surf 特征检测器和提取器时遇到了同样的错误。

发生错误是因为查询描述符 mat 和列车描述符 mat 的类型不同 - 正如您的错误消息中所述。仅当特征检测器无法计算火车或查询图像的关键点时,这才会发生在我身上。在进行匹配之前检查关键点 vector 的大小是否不为零。

关于c++ - knnMatchImpl 中的断言失败 (queryDescriptors.type() == trainDescCollection[0].type()),,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22337841/

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