-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathimagewrap.cpp
30 lines (23 loc) · 1.2 KB
/
imagewrap.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//#####################################################################################//
//#####################################################################################//
//#####################################################################################//
//# Please include the Github Repositories web URL if you are using this material. #//
//#####################################################################################//
//#####################################################################################//
//#####################################################################################//
#include "opencv2/opencv.hpp"
#include <iostream>
#include "opencv2/cudaarithm.hpp"
#include "opencv2/cudafilters.hpp"
#include "opencv2/cudaimgproc.hpp"
#include "opencv2/cudawarping.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "imagewrap.h"
using namespace std;
using namespace cv;
void wrapframe::wrap_frame(cuda::GpuMat& src, cuda::GpuMat& dst, Point2f* src_points, Point2f* dst_points)
{
Mat trans_points = getPerspectiveTransform(src_points, dst_points);
cuda::warpPerspective(src, dst, trans_points, src.size(), cv::INTER_LINEAR);
}