Bag of Visual words を構築するために、さまざまなポイント記述子 (SIFT、SURF、ORB、BRIEF など) を抽出しようとしています。問題は、12x60px という非常に小さな画像を使用していることにあるようです。高密度エクストラクタを使用すると、いくつかのキーポイントを取得できますが、記述子を抽出するときにデータが抽出されません。
コードは次のとおりです。
vector<KeyPoint> points;
Mat descriptor; // descriptor of the current image
Ptr<DescriptorExtractor> extractor = DescriptorExtractor::create("BRIEF");
Ptr<FeatureDetector> detector(new DenseFeatureDetector(1.f,1,0.1f,6,0,true,false));
image = imread(filename, 0);
roi = Mat(image,Rect(0,0,12,60));
detector->detect(roi,points);
extractor->compute(roi,points,descriptor);
cout << descriptor << endl;
結果は [] (BRIEF と ORB を使用) および SegFault (SURF と SIFT を使用) です。OpenCV の小さな画像からポイント記述子を密に抽出する方法についての手がかりを持っている人はいますか? ご協力いただきありがとうございます。