Image transformation where a curve becomes a straight line Suppose that I have the green curve (image attached for visualization), values stored in a vector and I want to transform the image such that the curve becomes a straight horizontal line. So if the curve becomes a straight line all normals of the curve has to be parallel to the vertical axis.

How can I achieve such a transformation?
I would recommend a grid transform. Each point of the grid has a $(dx,dy)$ offset, and a point in the middle of a square is interpolated according to the control points. Specifically in your case, you can keep most of the points in place, except those which are near the curve you want to straighten.