View Single Post
Old 10-09-2009, 06:36 AM
stefs stefs is offline
Join Date: Mar 2008
Posts: 10
linear transform in 2D screen space

I intend to do some linear transform in 2D window (screen) space in order to do on-the-fly h-/v-keystone correction. I have all the code ready to calculate the linear distortion matrix from four registered corner points of the projection image. At the moment I choose this approach:

current_pm = viz.MainWindow.getProjectionMatrix()
Where distortion_matrix is a 4x4 matrix that leaves the z untouched. The distortion in 2D space works fine but I still get some strange clipping artifacts.

My question: Is there a more elegant way in Vizard to implement this final viewport distortion as a 2D transform only rather than as a distortion of the 3D projection matrix?
Reply With Quote