Class NonMaximumSuppression
- java.lang.Object
-
- edu.gsu.cs.dmlab.imageproc.edgedetection.util.NonMaximumSuppression
-
public class NonMaximumSuppression extends Object
OVERVIEW: Edges in images are usually to defined to be 1 pixel thick. Thus, we cannot simply look for pixels at which place the change in intensity is sufficiently large (greater than a threshold). We must also suppress non-maximum pixels. Essentially, we calculate the edge direction (direction in which gradient of pixel intensity is greatest). We round the edge direction to the nearest 45 degrees. (i, j) is suppressed if either of the pixels one unit in the edge direction have greater gradient magnitudes than (i, j).- Author:
- Jason Altschuler, modified by Azim Ahmadzadeh of Data Mining Lab, Georgia State University
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NonMaximumSuppression.EdgeDirection
Direction to check non-maximum suppression
-
Constructor Summary
Constructors Constructor Description NonMaximumSuppression()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int[]
indicesMaxSuppresion(NonMaximumSuppression.EdgeDirection d, int i, int j)
Get coordinates of the two points needed to check for non-maximum suppression.static boolean
nonMaximumSuppression(double[][] mag, NonMaximumSuppression.EdgeDirection angle, int i, int j)
See if pixel at (i, j) is an edge.
-
-
-
Method Detail
-
nonMaximumSuppression
public static boolean nonMaximumSuppression(double[][] mag, NonMaximumSuppression.EdgeDirection angle, int i, int j)
See if pixel at (i, j) is an edge. Requires the following two criteria:1. mag[i][j] > threshold
2. Non-maximum suppression
- Parameters:
mag
-angle
-i
-j
-- Returns:
-
indicesMaxSuppresion
public static int[] indicesMaxSuppresion(NonMaximumSuppression.EdgeDirection d, int i, int j)
Get coordinates of the two points needed to check for non-maximum suppression.- Parameters:
d
-i
-j
-- Returns:
- {i1, j1, i2, j2}
-
-