1

近距離から物体(飛行機のドア)を検出したいと思います。アルゴリズムは非常に堅牢でなければならないので、どのような飛行機(さまざまな絵、ロゴを含む)や気象条件(太陽、雨、昼夜)でも実装できます。オブジェクト検出のための画像処理におけるパターン認識アルゴリズムの特徴抽出方法は?

OpenCVで検索し、SURF、SIFT、ORBなどのアルゴリズムを抽出する機能を実装しましたが、結果はあまり良くありません。ここで私は機能の正しいマッチングに関して、アルゴリズムの堅牢性を向上したいコードを使用ORB機能検出器

#include "opencv2/opencv_modules.hpp" 
#include <stdio.h> 

#ifndef HAVE_OPENCV_NONFREE 

int main(int, char**) 
{ 
    printf("The sample requires nonfree module that is not available in your OpenCV distribution.\n"); 
    return -1; 
} 

#else 

#include "opencv2/core/core.hpp" 
#include "opencv2/features2d/features2d.hpp" 
#include "opencv2/highgui/highgui.hpp" 
#include "opencv2/nonfree/nonfree.hpp" 
#include "opencv2/imgproc/imgproc.hpp" 
#include <iostream> 
#include <stdlib.h> 

using namespace cv; 
using namespace std; 

static void help() 
{ 
    printf("\nThis program demonstrates using features2d detector, descriptor extractor and simple matcher\n" 
      "Using the SURF desriptor:\n" 
      "\n" 
      "Usage:\n matcher_simple <image1> <image2>\n"); 
} 

Mat src;Mat src_gray; 
int thresh = 5; 
int max_thresh = 600; 
RNG rng(12345); 

void thresh_callback(int, void*); 

int main(int argc, char** argv) 
{ 


    Mat img1; 
    Mat img2; 
    img1= imread("a350_1.jpg", CV_LOAD_IMAGE_GRAYSCALE); 
    resize(img1, img1, Size(700,500), 0, 0, INTER_CUBIC); 
    img2= imread("a350_1.jpg", CV_LOAD_IMAGE_GRAYSCALE); 
    resize(img2, img2, Size(680,480), 0, 0, INTER_CUBIC); 

    Mat image; 

    if(! img1.data || ! img1.data) 
    { 
     cout << "Could not open or find the image" << std::endl ; 
     return -1; 
    } 


    // detecting keypoints 
    OrbFeatureDetector detector(1500); 
    vector<KeyPoint> keypoints1, keypoints2; 
    detector.detect(img1, keypoints1); 
    detector.detect(img2, keypoints2); 

    // computing descriptors 
    OrbDescriptorExtractor extractor; 
    Mat descriptors1, descriptors2; 
    extractor.compute(img1, keypoints1, descriptors1); 
    extractor.compute(img2, keypoints2, descriptors2); 

    // matching descriptors 
    BFMatcher matcher(NORM_HAMMING); 
    vector<DMatch> matches; 
    matcher.match(descriptors1, descriptors2, matches); 

    // drawing the results 
    namedWindow("matches", CV_WINDOW_AUTOSIZE); 
    Mat img_matches; 
    drawMatches(img1, keypoints1, img2, keypoints2, matches, img_matches); 
    imshow("matches", img_matches); 
    waitKey(0); 

    return 0; 
    } 

#endif 

。したがって、オブジェクトの認識と検出の目的のためのより信頼性の高いフィーチャマッチングは、より堅牢で信頼性の高いものになります。例えば、窓とドアフレーム(すべての飛行機モデルが固定されている)とドアフレームの厚さなどの間の距離を含めることができます。

私は、アルゴリズムが動作するようにいくつかの通関機能を抽出したいと思います絵画やロゴのある飛行機の場合アルゴリズムは、あらゆるタイプの飛行機によってドアを検出するために堅牢でなければならないことを意味する。いくつかの航空会社や絵のロゴのような特徴は、キーポイント/機能であってはならない。

そのため、私は窓とドアフレームの間の距離のような一般的な特徴を抽出するのが好きです(この機能は、特定の航空機モデルでは常に同じです)。例えば、ドアフレームとエアバスA350の最寄りの窓との間の最小距離は、1mと言います。だから私は自分のアルゴリズムでこの機能を使いたいと思う。どのようにそのような機能を抽出するためのアドバイス?

この場合、パターン認識や機械学習などのディープニューラルネットワークやKNNを使用する必要がありますか?

+0

はい、ここではORB機能検出機能を使用してコードを追加します。 – user3035413

答えて

0

多くのタイプのオブジェクト(ドア)のデータセットを作ることができれば、トレーニングSVMのためのSIFT出力のような機能を使用できます(opencvではいくつかの例があります)。

+0

はい私はデータセットを作ることができますが、私は窓とドアの間の距離のような機能を使いたいです。その機能を検出してSVMに組み込む方法は? – user3035413

関連する問題