Trying to derive a 2D transformation matrix using only the images -


I do not know whether it should go to Math Forum or Programming Forums, but I will post it in both of them and see where I will get.

I have two computer images ... one of these is the "original" image (big TIF file). The second basic is a converted version of the original image ... it has been rotated, mirrored and translated into a software program. I need to do some work on the transformed image, but I need the xy coordinates of each pixel in the original image to end my calculation.

I know that the image was rotated and a 3x3 change matrix was matrix, so I could get the second image for the first time (or vice versa) I do not know how much it was rotated , Pigeon or translate, so I can not just get the matrix from a set of known changes. In each picture I have a set of related points (corners, et al), and their respective (x, y) coordinates, then this is my dilemma:

Related transgated points (X, Y) -> (using a set of X, Y ', three or more of them), can I get the conversion matrix to convert one image to another? If I can get the matrix, then I can solve the basic coordinates of all pixels (all 18 million 'm') and can calculate what I need to do to calculate.

Can anyone help? I am familiar with linear algebra ... not only that it is extracted for scratches without a whole lotata head.

not sure

  • if you Manual or automatic ...

    manual

    The coordinates of the four corners, you can get the conversion equation:

    (from Pierre Wellner and more details)

    Must have to solve for coefficients.

    With four point pairs, two sets of four simultaneous linear equations can be solved quickly with gauge elimination so that C1 -8.

    Finally, you can convert those equations to 3x3 matrix. The above equations are powerful enough to do non-linear changes and you can make it simple in 3x3 ampin shear matrix.

    But I would like to be with nonlinear equations (above) because they can control perspective deformation .

    Automatically

    is the only way, but to find a set of 4-inch lines of a rectangle You can use the edge-detector with a line detection algorithm.

    If your image rectangle literally (white images on the dark background) are standing, then you can access the corner address libraries available ( cvCornerHarris See).

    You can find the four corners and use the change equation to intersect those lines.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -