I am trying to understand image interpolation algorithms in computer vision. I realize that there are a ton of interpolation techniques like linear, bicubic, nearest neighbor, etc. for image rotation. It seems that nearest neighbor technique is the simplest algorithm in this area.. I understand the basic concepts like when we rotate an image with a rotation matrix, the new image rows and columns go to floating point values because of cosine and sine operations. Thus we have to truncate the floating point values and do interpolations to predict data at missing image coordinates... I am aware of three posts which are very relevant to this question : Post 1; Post 2 and Post 3
In all of these posts, they do not explain how can we rotate an image about a custom pivot point (could be center of image or any other point which is offset from the real image center). Also most of the answers in the above posts just throw some code without much explanation about how the nearest neighbor technique is implemented for an image rotation problem... Can someone explain how to rotate an RGB image (like the image shown below) using nearest neighbor about a custom pivot point (red mark shown in the image below) ?