I have successfully written a tool that converts the image color space from linear to sRGB, so opencv works. Then I wanted to resize the image using the cv :: resize function to create thumbnails. However, this did not work, here is a reproducible piece of code.
#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> using namespace std; int main( int argc, char** argv ) { // Load images in the C++ format cv::Mat img = cv::imread("something.jpg"); cv::Mat src = cv::imread("src.jpg"); // Resize src so that is has the same size as img **cv::resize**(src, src, img.size()); return 0; }
I am using OpenCV 2.4.8. What am I doing wrong?
source share