Image conversion

So, I used gnu-gsl and CImg to implement some fundamental projective space methods for affine and metric rectification.

I have finished calculating affine rectification, but it is difficult for me to determine how to apply the affine rectification matrix to the original (input) image.

My current thought process is to iterate over the input image for each pixel coordinate. Then multiply the original pixel coordinate (converted to a uniform coordinate) by the affine rectification matrix to get the coordinate of the output pixel.

Then, access the output image using the coordinates of the output pixel and perform the mixing (adding) operation at the pixel location of the output image with the pixel color from the original image.

Does this sound right? I get a lot of really strange values ​​after multiplying the original pixel coordinate by an affine rectification matrix.

+2
source share
1 answer

No, your values ​​should not be strange. Why don't you make a simple example, a small scale with a small translation; eg.

x' = 1.01*x + 0.0*y + 5;
y' = 0.0*x + 0.98*y + 10;

Now the pixel in (10,10) should display on (15.1,19.8), right?

, , , . .

; , , . - - , , .

+1

All Articles