How to resize an image to a specific size in OpenCV?
c++, image-resizing, opencv
Solution
You can use `cvResize`. Or better use c++ interface (eg `cv::Mat` instead of `IplImage` and `cv::imread` instead of `cvLoadImage`) and then use `cv::resize` which handles memory allocation and deallocation itself.
Problem
``` IplImage* img = cvLoadImage("something.jpg"); IplImage* src = cvLoadImage("src.jpg"); cvSub(src, img, img); ``` But the size of the source image is different from `img`. Is there any opencv function to resize it to the `img` size?