public override LearningImage Project(LearningImage image) { int step = FrameIn.Height; int height = image.Height / step; int width = image.Width / step; LearningImage projected = new LearningImage(height, width, image.Plane); for (int h = 0; h < image.Height; h += step) { for(int w = 0; w < image.Width; w += step) { var list = image.GetPlanes(new Rectangle(w, h, step, step)); var best = list.OrderByDescending(x => x.SpecialEuclidean()).First(); projected.SetPlane(h / step, w / step, best); } } return projected; }