Ejemplo n.º 1
0
        public ScanningWindow CreateScanningWindow()
        {
            Point location = Point.Round(new PointF(_center.X - _size.Width / 2.0f + 0.5f, _center.Y - _size.Height / 2.0f + 0.5f));
            Size  size     = System.Drawing.Size.Round(_size);

            ScanningWindow window = new ScanningWindow(location, size);

            return(window);
        }
Ejemplo n.º 2
0
        public static double GetPatchMean_SquaredIntegral(IBoundingBox boundingBox)
        {
            ScanningWindow window = boundingBox.ScanningWindow;

            double sum = _squaredIntegralData[window.AY, window.AX, 0] +
                         _squaredIntegralData[window.DY, window.DX, 0] -
                         _squaredIntegralData[window.BY, window.BX, 0] -
                         _squaredIntegralData[window.CY, window.CX, 0];
            double mean = sum / window.Area;

            return(mean);
        }