protected int computeFernValue(float c_x, float c_y, float rectWidth , float rectHeight , TldFernDescription fern ) {

		rectWidth -= 1;
		rectHeight -= 1;

		int desc = 0;
		for( int i = 0; i < fern.pairs.length; i++ ) {
			Point2D_F32 p_a = fern.pairs[i].a;
			Point2D_F32 p_b = fern.pairs[i].b;

			float valA = interpolate.get_fast(c_x + p_a.x * rectWidth, c_y + p_a.y * rectHeight);
			float valB = interpolate.get_fast(c_x + p_b.x * rectWidth, c_y + p_b.y * rectHeight);

			desc *= 2;

			if( valA < valB ) {
				desc += 1;
			}
		}

		return desc;
	}
protected int computeFernValue ( float c_x , float c_y , float rectWidth , float rectHeight , TldFernDescription fern ) { rectWidth -= 1 ; rectHeight -= 1 ; int desc = 0 ; for ( int i = 0 ; i < fern . pairs . length ; i ++ ) { Point2D_F32 p_a = fern . pairs [ i ] . a ; Point2D_F32 p_b = fern . pairs [ i ] . b ; float valA = interpolate . get_fast ( c_x + p_a . x * rectWidth , c_y + p_a . y * rectHeight ) ; float valB = interpolate . get_fast ( c_x + p_b . x * rectWidth , c_y + p_b . y * rectHeight ) ; desc *= 2 ; if ( valA < valB ) { desc += 1 ; } } return desc ; }
Computes the value of the specified fern at the specified location in the image.