图像平移变换函数[算法说明] 图像平移就是使图像沿水平方向和垂直方向移动。 如果把坐标原点(0,0)平移到点(x0,y0)处,则变换公式为: 
(x,y)为原始图像坐标,(x', y')为变换后的图像坐标。而图像中的各个像素点移动了sqrt(x*x + y*y)距离。用矩阵表示为2-(22): 
[函数代码] /// /// Translation process. /// /// Source image. /// Translate value of x. /// Translate value of y. /// public static WriteableBitmap TranslationProcess(WriteableBitmap src,int x,int y)////18 平移变换 { if(src!=null ) { int w = src.PixelWidth; int h = src.PixelHeight; WriteableBitmap translateImage = new WriteableBitmap(w, h); byte[] temp = src.PixelBuffer.ToArray(); byte[] tempMask =
联系我们
- QQ:3243218172
- 邮箱:3243218172@qq.com
- QQ交流群:567648913
|