Have a look at this image.
This is the edge of perspective projection result of a rectangle region on a cylindrical surface (like a bottle). The rectangle's vertical median line is parallel with the axis of the cylindrical surface.
I know how to do perspective tranformation of quadrangle on a plane (http://alumni.media.mit.edu/~cwren/interpolator/ and Perspective Transform in Matlab), but how to do it on a cylindrical surface?
what I want is to transform the region to the original rectangle.
My problem is almost like this: Unwarp curved surface
thanks for help!
here is a simple explaination in two images. I rolled image 1 and pasted it on a bottle, then I took a picture from some distance with a specific angle and orientation. Then how can I restore Image 1 from Image 2?
Image 1
Image 2
It's difficult to know what the OP really wants from the question that was posed.
If s/he wants to draw a polyline on the label of the bottle, a bottle of radius
r
, and then draw the same polyline in a generical perspective view, the idea is to first unfold the label to a plane, you can do it as a cylindrical surface is developable, thenx*-z'
withy'=y0=r
fold back the label over the bottle surface
map the polyline on a cylinder with axis
x'=0, y'=0
go back to global coordinates
given your point of view, etc
Note that horizontal lines on the label are curved lines in Cartesian coordinates, so a straight line has to be subdivided in a number of segments to be rendered with sufficient accuracy.