I am using an IP Camera for Human Detection using OpenCV dnn and C++, I need to implement zoom functionality to detect humans from a distance over 10 meters, but I found, performing zoom in a live video using c++ doesn't exist(please correct me, if I am wrong)
我尝试了以下代码来缩放视频
cv::Mat src, dst, tmp;
tmp = src;
dst = tmp;
pyrUp(tmp, dst, cv::Size(tmp.cols * 2, tmp.rows * 2));
frame.image = dst;
But, Image Pyramids did not zoom my video.
Can you please help me with a zoom function to achieve my objective.
cv::Rect roi(x, y, w, h);
cv::Mat dst = src(roi);
resize(src, dst, Size(), 0.5, 0.5, interpolation);