protected void computeHistogramInside ( RectangleRotate_F32 region ) { for ( int i = 0 ; i < samplePts . size ( ) ; i ++ ) { Point2D_F32 p = samplePts . get ( i ) ; squareToImageSample ( p . x , p . y , region ) ; interpolate . get_fast ( imageX , imageY , value ) ; int indexHistogram = computeHistogramBin ( value ) ; sampleHistIndex [ i ] = indexHistogram ; histogram [ indexHistogram ] += weights [ i ] ; } }
Computes the histogram quickly inside the image