Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

MatrixTransform under the hood

$
0
0

Hello,

actually I write a WPF application in which I need to transform an image pixel per pixel.

The transformation matrix is computet by a LU-decomposition that takes 3 point correspondences that can be choosen by mouse clicks. The transformation is applied by a piece of unsafe code working with pointers to avoid using GetPixel and SetPixel. For comparision purposes I transformed the image by using a MatrixTransform and my transformation matrix as parameter. I have determined that using MatrixTransform the transfromation is just in time unlike using unsafe code in which you can see the lag caused by the computations.

My question is: how MatrixTransform works exactly? There must be similar code that transforms each pixel to its new coordinates. But what is the trick that makes MatrixTransform that efficient?

Thank you in advance and best regards

Ooorndt


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>