Thursday, October 11, 2012

Perspective Transform for projection

Perspective Transform is a transform that maps one arbitrary 2D quadrilateral into another. I used this method last semester for Plinko Poetry project because the screen I need to track is in trapezoid shape. With this method, I managed to map it back to rectangle rather than moving camera from top to front which may block users.
In projection, the problem is similar, what we have on screen is different from the projected surface as long as the projector is not perpendicular to projected surface. So I tried to implement that algorithm in Processing to make projection easier without MadMapper or something like that.
The algorithm I used is exactingly the same to the one on The transform method is not a simple multiply of a matrix. so I write my own line function to do transform before line is actually executed. Maybe it can be implemented in a deeper level to make it easier to use.
So. I have this on my screen. And it looks not so good on ducts.

But I can drag the corners to remap it.

Also on side of duct.

No comments:

Post a Comment