this is what I wondered today:
I'm trying to scale an image into 4x4 pixels by this code:
Mat image4x4;
vector<int> compression_params;
compression_params.push_back(CV_IMWRITE_PNG_COMPRESSION);
compression_params.push_back(9);
resize(imageFromFile, image4x4, Size(4,4), INTER_CUBIC);
imwrite("/Users/macuser/Desktop/4x4/"+names.at(i), image4x4, compression_params);
My result is this:
but with any other tool, as Photoshop, GIMP, the result is kind of this:
using CUBIC
as well with this software.
What is wrong with my implementation? Am not I considering any parameter?
Thank you very much.
Example:
UPDATE: tried with scalers online and the same wrong result is what I got. So... maybe I'm interested to know in what GIMP does.