I have successfully built opencv with WITH_CUDA=on
. but I'm still facing this error error: namespace "cv::cuda" has no member "resize"
. it is weird that the IDE suggests me that there is a resize function in that namespace but it fails on compile. Does anyone know how to tackle this matter?
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/video/background_segm.hpp"
#include "opencv2/video/tracking.hpp"
#include "opencv2/cudev/ptr2d/gpumat.hpp"
#include "opencv2/cudev/ptr2d/resize.hpp"
#include "newfile.h"
using namespace cv;
using namespace std;
int test() {
cv::Mat LoadedImage;
cv::cuda::GpuMat Im;
LoadedImage = imread("in.jpg", IMREAD_COLOR);
Im.upload(LoadedImage);
cv::cuda::resize(LoadedImage, LoadedImage, cv::Size(), 0.5, 0.5, cv::INTER_NEAREST);
imwrite("Step4a.JPG", LoadedImage);
return 0;
}
as @john has pointed out. I should #include <opencv2/cudawarping.hpp>
to solve the problem.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.