public void AffineTransPoint() { TransLocationCross.Clear(); ShapeMatchResult matchResult = Shape.OutputResult; for (int i = 0; i < matchResult.Count; i++) { HHomMat2D mat2d = new HHomMat2D(); mat2d.VectorAngleToRigid(Shape.ModelImgRow, Shape.ModelImgCol, Shape.ModelimgAng, matchResult.Row[i].D, matchResult.Col[i].D, matchResult.Angle[i].D); PointF[] fs = Array.ConvertAll <Cross, PointF>(locationCross.GetAllPointFs(), e => e.Pixel); HTuple tx, ty; HOperatorSet.AffineTransPoint2d(mat2d, Array.ConvertAll <PointF, double>(fs, e => e.Y).ToArray(), Array.ConvertAll <PointF, double>(fs, e => e.X).ToArray(), out ty, out tx); for (int m = 0; m < locationCross.Count; m++) { Cross cross = new Cross(); cross.Pixel = new PointF(tx[m].F, ty[m].F); cross.Angle = matchResult.Angle[m].D; cross.Color = "green"; TransLocationCross.Add(cross); } } }
public void Add(Cross cross) { crossList.Add(cross); }