opencv3.0.1 中的SurfFeaturesFinderGpu類的問題.

來源:互聯網
上載者:User

標籤:

最近需要實現一像配準的功能, 參考了一下opencv中的實現,發現幾個問題, SurfFeaturesFinderGpu在找特徵點的過程中會拋出異常,改了一下代碼,可以運行了.

void SurfFeaturesFinderGpu::find(InputArray image, ImageFeatures &features){    CV_Assert(image.depth() == CV_8U);    Mat imageGray;    /*## xie debug*/#if 1    ensureSizeIsEnough(image.size(), image.type(), image_);        image_.upload(image);    cvtColor(image, imageGray, COLOR_BGR2GRAY);    ensureSizeIsEnough(imageGray.size(), imageGray.type(), gray_image_);    gray_image_.upload(imageGray);    #else    ensureSizeIsEnough(image.size(), image.type(), image_);    image_.upload(image);    ensureSizeIsEnough(image.size(), CV_8UC1, gray_image_);    cvtColor(image_, gray_image_, COLOR_BGR2GRAY);#endif

問題是,用這個CUDA的finder .   結果消耗的時間比不用CUDA要多出幾個數量級

下面是不用CUDA的效能資料:

使用了CUDA以後:

尋找特徵點的過程從耗時2.42秒升級到231秒.   希望OPENCV的作者可以將這個演算法的效能進行改進. 

opencv3.0.1 中的SurfFeaturesFinderGpu類的問題.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.