"Digital Image Processing" third edition Rafael C. Gonzalez waiting
P51
Create a new graph, traverse the ranks
Take a point, (x, y), calculate the position of the original image after the inverse matrix transformation, if it is a decimal after transformation, then take the average of the surrounding 4 points (or 8 is OK).
https://github.com/penkee/imagecal
。。。
I have a problem with the rotation, the center is at (0,0), then adjust
modify:
I originally used the upper left corner as (0, 0), that's why. If (width/2, heigth/2) is taken as (0, 0), each time (x, y) is taken, it becomes (x- width/2 , y- heigth/2 ). Then add back the new x0, y0 after the matrix operation (x0+ width/2 , y0+ heigth/2 )