/** * Returns the most frequent angle that occurs within the accumulator * space by calculating a horizontal projection over the accumulator * space and returning the angle with the most votes. The prevailing * angle is given in degrees. If it is less than zero, then no angle * could be extracted (there was no local maxima in the accumulator). * * @return The prevailing angle (degrees) in the accumulator space; or * Double.MIN_VALUE if the value cannot be calculated */ public double calculatePrevailingAngle() { return calculatePrevailingAngle( accum, 0, 360 ); }
/** * Returns the most frequent angle that occurs within the accumulator * space by calculating a horizontal projection over the accumulator * space and returning the angle with the most votes. The prevailing * angle is given in degrees. If it is less than zero, then no angle * could be extracted (there was no local maxima in the accumulator). * * @return The prevailing angle (degrees) in the accumulator space; or * Double.MIN_VALUE if the value cannot be calculated */ public double calculatePrevailingAngle() { return calculatePrevailingAngle( accum, 0, 360 ); }
double rotationAngle = hl.calculatePrevailingAngle(); double shearAngle = hl.calculatePrevailingAngle(-shearAngleRange, shearAngleRange);
double rotationAngle = hl.calculatePrevailingAngle(); double shearAngle = hl.calculatePrevailingAngle(-shearAngleRange, shearAngleRange);
int xt = (int)(maxTheta / (360d/getNumberOfSegments())); FImage f = accum.extractROI( mt, 0, xt-mt, accum.getHeight() ); return calculatePrevailingAngle( f, mt, (xt-mt)*(360d/getNumberOfSegments()) ); int xt = (int)(maxTheta / (360d/getNumberOfSegments())); FImage a = accum.shiftRight( -mt ).extractROI(0,0,(xt-mt),accum.getHeight()); return calculatePrevailingAngle( a, mt, (xt-mt)*(360d/getNumberOfSegments()) );
int xt = (int)(maxTheta / (360d/getNumberOfSegments())); FImage f = accum.extractROI( mt, 0, xt-mt, accum.getHeight() ); return calculatePrevailingAngle( f, mt, (xt-mt)*(360d/getNumberOfSegments()) ); int xt = (int)(maxTheta / (360d/getNumberOfSegments())); FImage a = accum.shiftRight( -mt ).extractROI(0,0,(xt-mt),accum.getHeight()); return calculatePrevailingAngle( a, mt, (xt-mt)*(360d/getNumberOfSegments()) );