Exemplo n.º 1
0
 public static M33d NormalizedImagePosToPixelEdgeMat(V2d imgSizeInPixel)
 {
     return(M33d.Scale(imgSizeInPixel - 1));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Returns a Matrix to
 /// convert from pixel-center position to normalized image position [0,1][0,1].
 /// (The inverse of toPixelCenter.)
 /// </summary>
 public static M33d PixelCenterToNormalizedImgMat(V2d imgSizeInPixel)
 {
     return(M33d.Scale(V2d.II / imgSizeInPixel) * M33d.Translation(V2dHalf));
 }
Exemplo n.º 3
0
 public static M33d PixelEdgeToNormalizedImgMat(V2d imgSizeInPixel)
 {
     return(M33d.Scale(V2d.II / (imgSizeInPixel - 1)));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Returns a Matrix to
 /// convert from normalized image position [0,1][0,1] to pixel-center position
 /// (The inverse of toNormalizedImgPos.)
 /// </summary>
 public static M33d NormalizedImagePosToPixelCenterMat(V2d imgSizeInPixel)
 {
     return(M33d.Translation(-V2dHalf) * M33d.Scale(imgSizeInPixel));
 }
Exemplo n.º 5
0
 public static Trafo2d Scale(double s)
 {
     return(new Trafo2d(M33d.Scale(s),
                        M33d.Scale(1 / s)));
 }
Exemplo n.º 6
0
 public static Trafo2d Scale(double sx, double sy)
 {
     return(new Trafo2d(M33d.Scale(sx, sy),
                        M33d.Scale(1 / sx, 1 / sy)));
 }
Exemplo n.º 7
0
 public static Trafo2d Scale(V2d sv)
 {
     return(new Trafo2d(M33d.Scale(sv),
                        M33d.Scale(1 / sv)));
 }