小编Sam*_*gga的帖子

如何在OpenCV中将GpuMat转换为CvMat?

我知道如何做相反的事情,即GpuMatCvMat使用上传得到,但我需要一个CvMatGpuMat,有没有任何方法可以用于此?

opencv gpu

6
推荐指数
1
解决办法
2万
查看次数

将IplImage转换为CvMat

这是gpu冲浪代码:

#include <iostream>
#include <iomanip>
#include "opencv2/contrib/contrib.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <opencv2/imgproc/imgproc_c.h>
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"

using namespace std;
using namespace cv;
using namespace cv::gpu;

void help()
{
cout << "\nThis program demonstrates using SURF_GPU features detector, descriptor extractor and BruteForceMatcher_GPU" << endl;
cout << "\nUsage:\n\tmatcher_simple_gpu <image1> <image2>" << endl;
}
int main(int argc, char* argv[])
{

GpuMat img1(imread("C:\\OpenCV2.3\\opencv2.3\\bin\\Debug\\tsucuba_left.png", CV_LOAD_IMAGE_GRAYSCALE));
SURF_GPU surf;
// detecting keypoints & computing descriptors
GpuMat keypoints1GPU, keypoints2GPU;
GpuMat descriptors1GPU, descriptors2GPU;
surf(img1, …
Run Code Online (Sandbox Code Playgroud)

opencv cuda gpu iplimage surf

2
推荐指数
1
解决办法
3万
查看次数

标签 统计

gpu ×2

opencv ×2

cuda ×1

iplimage ×1

surf ×1