i tried to test the case with the code below
#include <iostream>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
using namespace cv;
using namespace std;
int main()
{
String InterpolationFlags[] = {"INTER_NEAREST","INTER_LINEAR","INTER_CUBIC","INTER_AREA","INTER_LANCZOS4"};
for( int i=0; i < 5; i++)
{
Mat img = imread("fruits.jpg");
Mat roi1 =img(Rect( 0, 0, img.cols/2, img.rows/2)).clone();
Mat roi2 =img(Rect( img.cols/2, 0, img.cols/2, img.rows/2)).clone();
Mat roi3 =img(Rect( 0, img.rows/2, img.cols/2, img.rows/2)).clone();
Mat roi4 =img(Rect( img.cols/2, img.rows/2, img.cols/2, img.rows/2)).clone();
resize( img, img, Size( img.cols/2, img.rows/2 ),0,0, i);
resize( roi1, roi1, Size( roi1.cols/2, roi1.rows/2 ),0,0, i);
resize( roi2, roi2, Size( roi2.cols/2, roi2.rows/2 ),0,0, i);
resize( roi3, roi3, Size( roi3.cols/2, roi3.rows/2 ),0,0, i);
resize( roi4, roi4, Size( roi4.cols/2, roi4.rows/2 ),0,0, i);
Mat rroi1 =img(Rect( 0, 0, img.cols/2, img.rows/2));
Mat rroi2 =img(Rect( img.cols/2, 0, img.cols/2, img.rows/2));
Mat rroi3 =img(Rect( 0, img.rows/2, img.cols/2, img.rows/2));
Mat rroi4 =img(Rect( img.cols/2, img.rows/2, img.cols/2, img.rows/2));
absdiff(rroi1,roi1,rroi1);
absdiff(rroi2,roi2,rroi2);
absdiff(rroi3,roi3,rroi3);
absdiff(rroi4,roi4,rroi4);
img = img > 0;
imshow(InterpolationFlags[i],img);
waitKey(0);
}
return 0;
}
results
![image description](/upfiles/1440000138139361.png)
as seen on the result images the answer depends on InterpolationFlags.