How can I use Mat's pointer to create the GPUMat entity?
The following of my implementation is wrong.
#include<opencv2/opencv.hpp>
#include "opencv2/gpu/gpu.hpp"
//using namespace cv;
int main()
{
//Mat img = imread();
cv::Mat mSource = cv::imread("C:\\New Folder\\1.jpg");
cv::gpu::GpuMat gpuInput(mSource.rows, mSource.cols, CV_32FC1, mSource.data, cv::Mat::AUTO_STEP);
cv::gpu::GpuMat mGTarget;
cv::gpu::resize(gpuInput, mGTarget, cv::Size(0, 0), 0.5, 0.5);
cv::Mat mTarget;
mGTarget.download(mTarget);
cv::imwrite("C:\\New Folder\\5.jpg", mTarget);
}