Hi. I'm can't resize the size of images I saved in text file to a particular size. [closed]
for (unsigned int i = 0; i < testImages.size(); i++)
{
Mat img_2;
img_2 = testImages[i];
Size size(50,50);//the dst image size,e.g.100x100
Mat dst;//dst image
resize(img_2,dst,size);//resize image
}
try
cv::resize(img, dst, cv::Size(), 2, 2);
2 is the scale factor in x and y you can choose whatever you want insteadJust tried. but the output is still the same. Same as the original size.
then your problem is somewhere else. Try to go step by step. First load one image, and try to see if it works.
The above code should do the trick, and it should work for you as well.
Got it. Managed to fix it. Thanks man..