I am trying to 'enlarge' pixels - i.e. apply resize() to increase the dimensions of an image with nearest neighbour interpolation. However I am not getting expected results.
Input image (2 x 2 pixels):
Code:
resize(_inputImage, outImage, Size(256,256),INTER_NEAREST);
imshow(_windowName, outImage);
Expected result (256 x 256 pixels):
Actual result (256 x 256 pixels):
What am I doing wrong?