我正试图使用openCV包装器javacv在java中快速运行。我没有任何问题,运行一个快速角检测器,但我被困在如何运行计算函数。当我运行这段代码时:
private int threshold = 30;
private int octaves = 3;
private float scale = 1.0f;
private BRISK brisk = null;
private KeyPoint keyPoints = null;
private CvMat img, descriptors;
descriptors = new CvMat();
keyPoints = new KeyPoint();
img = getFrame();
brisk = new BRISK(threshold, octaves, scale);
brisk.compute(img, null, keyPoints, descriptors, false);我得到以下错误:
错误:未知函数中的坏参数(未知数组类型),文件......\src\opencv\modules\core\src\matrix.cpp,行698
我确信img不是问题,因为我可以对它进行快速的角检测。我认为实际的问题是描述符矩阵,因为我不知道如何初始化它。有什么想法吗?
发布于 2013-06-20 08:13:53
问题的解决方案是需要将描述符初始化为新的CvMat(null)。
https://stackoverflow.com/questions/16732748
复制相似问题