Please help me see the deformation formula of this image

Source: Internet
Author: User
Please help me see this picture deformation formula this is an image operation, http://blog.csdn.net/jia_zhengshen/article/details/12008371

Only the formula on page 1 and the Section 4.4.1 need to be viewed.

In addition, this is a Chinese web page, which also references the formula, and some explanations will be easier to understand.
Http://blog.csdn.net/jia_zhengshen/article/details/12008371

Currently, you can replace pixels in an image to deform the image.
However, I cannot quite understand how to calculate the formula. my questions are roughly as follows:

1. the original pixel coordinate (before deformation) of the image is U or X?
2. as far as I understand it, I used the for loop to scan each pixel. each pixel is the coordinate of X in the formula. after finding the U, I began to perform deformation, changing the original X to U is correct?



Reply to discussion (solution)

This blog post says better than what you gave http://www.cnblogs.com/xiaotie/archive/2009/12/08/1619046.html

[/Url]
The shadow ring represents a circle selection with a radius of rmax. Here, point c is the point when the mouse clicks down, that is, the center of the circle selection area. Drag the mouse from C to M, causing point U in the image to change to point X. So the key question is to find the inverse transformation of the above transformation ?? When point X is given, you can find the coordinate U (precise floating point coordinate) before the transformation, and then use the pixels of the image near the U point before the change to calculate the pixel value of U. In this way, the transformed image can be obtained by calculating each pixel in the circle selection area.
This formula is

This blog post says better than what you gave http://www.cnblogs.com/xiaotie/archive/2009/12/08/1619046.html

[/Url]
The shadow ring represents a circle selection with a radius of rmax. Here, point c is the point when the mouse clicks down, that is, the center of the circle selection area. Drag the mouse from C to M, causing point U in the image to change to point X. So the key question is to find the inverse transformation of the above transformation ?? When point X is given, you can find the coordinate U (precise floating point coordinate) before the transformation, and then use the pixels of the image near the U point before the change to calculate the pixel value of U. In this way, the transformed image can be obtained by calculating each pixel in the circle selection area.
This formula is



Thanks for replying. I have also read this article, which is really confusing to me. "The key question is to find the inverse transformation of the above transformation ?? Given the point X, we can find the coordinates U before the transformation. "I just don't understand what this sentence means. Why does U mean the coordinates before the transformation, isn't it a known coordinate (the pixel coordinate of the original image )? So what we want is X? If it is X, the equation will become X = ??? It will become very complicated...

How should we perform this operation?

Feiyou
From the u point to the x point, if it is a linear transformation (translation), then the u point coordinate is known
But what you do is deformation (non-linear transformation), so you only know the transformed point x does not know where the point u is before the transformation, so you need to calculate
Just like someone nowArrivalTaipei, but you don't know whether he came from Tainan or Kaohsiung. you need to determine which city he came from through his journey time.

Wow !! Hello? Harm ,? Know platform? Place name !!??

Can I understand you? The example is very clear,? Method? Are you confused? Don't know? Position X after the shape. I only know the original position U of pixel.
Yes? Xuzuning tools ?? What should I do ?? ?

False? I already? Use? Circle to get? Movie? Shape? Domain? All pixel seats ?,?? Seat? Is it a formula? X? Is it u?

There is no problem in using traditional Chinese characters. I generally know it, but it is not necessarily written.

First,Drag the mouse from C to MM is definite, so every point in the circle with M as the center rmax as the radius is definite.
This should be okay, right?
Secondly, due to non-linear deformation, every point in the circle M does not correspond to the points in the corresponding position in the circle C one by one (if one corresponds to one, it will not be deformed)
This should be okay, right?

Therefore, we need to calculate the coordinates of the point u in the circle C based on the point x in the circle M.
If it is not deformed, it means translation.
Deformation occurs only because of the coefficient.

Very clear explanation. thank you!

Therefore, the single point coordinates in the circle after the X = circle is moved in the formula. Therefore, the coordinates are also known. all values (X, rmax, m, c) are placed in the formula and U is obtained.
Is my understanding correct?
Is X pixel replaced by U pixel the result of deformation?

Right. the obtained u is
However, it should be noted that u is a decimal number (which is unlikely to be an integer) and does not actually exist. it is necessary to calculate (interpolation) the specific pixel value through the number of four peripheral items.

Okay. thank you very much for your understanding. it helped me a lot.

Although I still don't know about interpolation, I should be able to solve it myself.

You will be able to know the subsequent results after implementation or failure.

Thanks again ~

Error 500 message to be sent. try again later.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.