I'm trying to resolve problem related to image processing, but it seems that I have stucked in choosing of proper algorithm. Maybe someone of you can help me and say where is the problem in my reasoning of the problem.
Let's assume that we have two images 16x16 pixels. As the user, I'm choosing two points on this images. As the user I know that i.e. point x1(8,8) and y1(10,10) are the same point as in the second images, let's say x2(5,5) and y2(8,8).
So this two pair of points are some kind of vectors for me. So let's say that I can count length of this vectors.
What I want to achieve? I want to move points on the first image, related to points on the second one.
My "new" point X should be between point x1 and x2 (in the middle between), and my "new" Y point should be between point y1 and y2.
Of course, it's easy to move value of (x1,y1) pixel to (px1,px2) pixel, but what should I do with the rest? I mean I need to make morphing/warping or whatever with all image.
And I stucked. I was looking into morphing algorithms, warping algorithms, nearest neighbour algorithm, but they are useless for me, or I don't understand properly how to use them.
I belive you won't minus my question. I really need clues to move forward. I don't need implementation in code, I just need to understand where is my lack of understanding of the problem and how I can think about it in different way. Thanks in advance
[EDIT]
I'm trying to understand Image Morphing Algorithm from here. Can you help me to understand what is exactly
u = [ (X-P)(Q-P) ]/ ||Q-P||
v = [ (X-P) * Perpendicular(Q-P) ] / ||Q-P||
If I correctly understand, ||Q-P|| should be the length between points Q and P. So what is the (X-P) or (Q-P)? How I can count Perpendicular(Q-P)? It should be the equation of line, or lenght too?