OpenCV学習ノート(六)OpenCV 3.3+VS 2013構成CUDA加速
1004 ワード
1、Cmake配置Cudaについては何も言うことはありません.多くのチュートリアルではよく分かりました.VS配置エラーの多くはvsバージョンの問題です.私は以前VS 2015を使ってコンパイルしていましたが、その後、VS 2015に変更して合格しました.
2、主に現在多くの教程はOpenCV 2のルーチンで、OpenCV 3である.3で呼び出しリリースが変更され、以前のインスタンスが使用できなくなりました.
2、主に現在多くの教程はOpenCV 2のルーチンで、OpenCV 3である.3で呼び出しリリースが変更され、以前のインスタンスが使用できなくなりました.
#include // Console I/O
#include // String to number conversion
#include // Basic OpenCV structures
#include
#include // Image processing methods for the CPU
#include // Read images
// CUDA structures and methods
#include
#include
using namespace std;
using namespace cv;
using namespace cuda;
//! [getssimopt]
int main()
{
int i;
try
{
cout << getCudaEnabledDeviceCount();
}
catch (const cv::Exception& ex)
{
cout << "Error:" << ex.what() << endl;
}
system("PAUSE");
return 0;
}
は、gpu加速が正常にインストールされたことを返します.