|
23 | 23 | import boofcv.struct.image.GrayF32; |
24 | 24 | import org.jetbrains.annotations.Nullable; |
25 | 25 |
|
26 | | -/** |
27 | | - * <p> |
28 | | - * Detects local minimums and/or maximums in an intensity image inside square regions. This is known as non-maximum |
29 | | - * suppression. The detector can be configured to ignore pixels along the image border by a user specified distance. |
30 | | - * Some implementations require candidate locations for the features. This allows for a sparse algorithm to be used, |
31 | | - * resulting in a significant speed boost. Pixel values with a value of -Float.MAX_VALUE or Float.MAX_VALUE will |
32 | | - * not be considered for local minimum/maximum, respectively. This is a good way to ignore previously detected |
33 | | - * features. |
34 | | - * </p> |
35 | | - * |
36 | | - * <p> |
37 | | - * Not all implementations will search for both minimums or maximums. Be sure you are using the correct one. If |
38 | | - * you don't intend on detecting a minimum or maximum pass in null for the candidate list and the output found list. |
39 | | - * </p> |
40 | | - * |
41 | | - * <p> |
42 | | - * An extractor which uses candidate features must always be provided them. However, an algorithm which does not |
43 | | - * use candidate features will simply ignore that input and operate as usual. Can check capabilities at runtime |
44 | | - * using the {@link #canDetectMinimums()} and {@link #canDetectMaximums()} functions. |
45 | | - * </p> |
46 | | - * |
47 | | - * <p> |
48 | | - * A border can be specified around the outside of the image in which extremes can't be detected. However, a pixel |
49 | | - * outside this border can influence if a pixel is a maximum inside, if the local search radius extends that far. |
50 | | - * This is specified by the border parameter and the valid region is defined as follows:<br> |
51 | | - * border ≤ x < width-border AND border ≤ y < height-border</p> |
52 | | - * |
53 | | - * @author Peter Abeles |
54 | | - */ |
| 26 | +/// |
| 27 | +/// Detects local minimums and/or maximums in an intensity image inside square regions. This is known as non-maximum |
| 28 | +/// suppression. The detector can be configured to ignore pixels along the image border by a user specified distance. |
| 29 | +/// Some implementations require candidate locations for the features. This allows for a sparse algorithm to be used, |
| 30 | +/// resulting in a significant speed boost. Pixel values with a value of -Float.MAX_VALUE or Float.MAX_VALUE will |
| 31 | +/// not be considered for local minimum/maximum, respectively. This is a good way to ignore previously detected |
| 32 | +/// features. |
| 33 | +/// |
| 34 | +/// |
| 35 | +/// Not all implementations will search for both minimums or maximums. Be sure you are using the correct one. If |
| 36 | +/// you don't intend on detecting a minimum or maximum pass in null for the candidate list and the output found list. |
| 37 | +/// |
| 38 | +/// |
| 39 | +/// An extractor which uses candidate features must always be provided them. However, an algorithm which does not |
| 40 | +/// use candidate features will simply ignore that input and operate as usual. Can check capabilities at runtime |
| 41 | +/// using the [#canDetectMinimums()] and [#canDetectMaximums()] functions. |
| 42 | +/// |
| 43 | +/// |
| 44 | +/// A border can be specified around the outside of the image in which extremes can't be detected. However, a pixel |
| 45 | +/// outside this border can influence if a pixel is a maximum inside, if the local search radius extends that far. |
| 46 | +/// This is specified by the border parameter and the valid region is defined as follows: |
| 47 | +/// border ≤ x < width-border AND border ≤ y < height-border |
55 | 48 | public interface NonMaxSuppression { |
56 | 49 |
|
57 | | - /** |
58 | | - * Process a feature intensity image to extract the point features. If a pixel has an intensity |
59 | | - * value == -Float.MAX_VALUE or Float.MAX_VALUE it will not be considered for a local min or max, respectively. |
60 | | - * If an algorithm only detect local minimums or maximums and null can be passed in for unused lists. This is |
61 | | - * the recommended procedure since it will force an exception to be thrown if a mistake was made. |
62 | | - * |
63 | | - * @param intensity (Input) Feature intensity image. Not modified. |
64 | | - * @param candidateMin (Input) (Optional) List of candidate local minimum features. Can be null if not used. |
65 | | - * @param candidateMax (Input) (Optional) List of candidate local maximum features Can be null if not used. |
66 | | - * @param foundMin (Output) Storage for found minimums. Can be null if not used. |
67 | | - * @param foundMax (Output) Storage for found maximums. Can be null if not used. |
68 | | - */ |
| 50 | + /// Process a feature intensity image to extract the point features. If a pixel has an intensity |
| 51 | + /// value == -Float.MAX_VALUE or Float.MAX_VALUE it will not be considered for a local min or max, respectively. |
| 52 | + /// If an algorithm only detect local minimums or maximums and null can be passed in for unused lists. This is |
| 53 | + /// the recommended procedure since it will force an exception to be thrown if a mistake was made. |
| 54 | + /// |
| 55 | + /// @param intensity (Input) Feature intensity image. Not modified. |
| 56 | + /// @param candidateMin (Input) (Optional) List of candidate local minimum features. Can be null if not used. |
| 57 | + /// @param candidateMax (Input) (Optional) List of candidate local maximum features Can be null if not used. |
| 58 | + /// @param foundMin (Output) Storage for found minimums. Can be null if not used. |
| 59 | + /// @param foundMax (Output) Storage for found maximums. Can be null if not used. |
69 | 60 | void process( GrayF32 intensity, |
70 | 61 | @Nullable ListIntPoint2D candidateMin, @Nullable ListIntPoint2D candidateMax, |
71 | 62 | @Nullable QueueCorner foundMin, @Nullable QueueCorner foundMax ); |
72 | 63 |
|
73 | | - /** |
74 | | - * Returns true if the algorithm requires a candidate list of corners. |
75 | | - * |
76 | | - * @return true if candidates are required. |
77 | | - */ |
| 64 | + /// Returns true if the algorithm requires a candidate list of corners. |
| 65 | + /// |
| 66 | + /// @return true if candidates are required. |
78 | 67 | boolean getUsesCandidates(); |
79 | 68 |
|
80 | | - /** |
81 | | - * Maximum value for detected minimums |
82 | | - * |
83 | | - * @return threshold for feature selection |
84 | | - */ |
| 69 | + /// Maximum value for detected minimums |
| 70 | + /// |
| 71 | + /// @return threshold for feature selection |
85 | 72 | float getThresholdMinimum(); |
86 | 73 |
|
87 | | - /** |
88 | | - * Minimum value for detected maximums |
89 | | - * |
90 | | - * @return threshold for feature selection |
91 | | - */ |
| 74 | + /// Minimum value for detected maximums |
| 75 | + /// |
| 76 | + /// @return threshold for feature selection |
92 | 77 | float getThresholdMaximum(); |
93 | 78 |
|
94 | | - /** |
95 | | - * Change the feature selection threshold for finding local minimums. |
96 | | - * |
97 | | - * @param threshold The new selection threshold. |
98 | | - */ |
| 79 | + /// Change the feature selection threshold for finding local minimums. |
| 80 | + /// |
| 81 | + /// @param threshold The new selection threshold. |
99 | 82 | void setThresholdMinimum( float threshold ); |
100 | 83 |
|
101 | | - /** |
102 | | - * Change the feature selection threshold for finding local maximums. |
103 | | - * |
104 | | - * @param threshold The new selection threshold. |
105 | | - */ |
| 84 | + /// Change the feature selection threshold for finding local maximums. |
| 85 | + /// |
| 86 | + /// @param threshold The new selection threshold. |
106 | 87 | void setThresholdMaximum( float threshold ); |
107 | 88 |
|
108 | | - /** |
109 | | - * Defines the region inside the image in which a pixel can be an extreme. |
110 | | - * valid region is: border ≤ x < width-border AND border ≤ y < height-border |
111 | | - * |
112 | | - * @param border Border size in pixels. |
113 | | - */ |
| 89 | + /// Defines the region inside the image in which a pixel can be an extreme. |
| 90 | + /// valid region is: border ≤ x < width-border AND border ≤ y < height-border |
| 91 | + /// |
| 92 | + /// @param border Border size in pixels. |
114 | 93 | void setIgnoreBorder( int border ); |
115 | 94 |
|
116 | | - /** |
117 | | - * Returns the size of the image border. |
118 | | - * |
119 | | - * @return border size |
120 | | - */ |
| 95 | + /// Returns the size of the image border. |
| 96 | + /// |
| 97 | + /// @return border size |
121 | 98 | int getIgnoreBorder(); |
122 | 99 |
|
123 | | - /** |
124 | | - * Species the search radius for the feature |
125 | | - * |
126 | | - * @param radius Radius in pixels |
127 | | - */ |
| 100 | + /// Species the search radius for the feature |
| 101 | + /// |
| 102 | + /// @param radius Radius in pixels |
128 | 103 | void setSearchRadius( int radius ); |
129 | 104 |
|
130 | | - /** |
131 | | - * Describes how large the region is that is being searched. The radius is the number of |
132 | | - * pixels away from the center. |
133 | | - * |
134 | | - * @return Search radius |
135 | | - */ |
| 105 | + /// Describes how large the region is that is being searched. The radius is the number of |
| 106 | + /// pixels away from the center. |
| 107 | + /// |
| 108 | + /// @return Search radius |
136 | 109 | int getSearchRadius(); |
137 | 110 |
|
138 | | - /** |
139 | | - * True if it can detect local maximums. |
140 | | - */ |
| 111 | + /// True if it can detect local maximums. |
141 | 112 | boolean canDetectMaximums(); |
142 | 113 |
|
143 | | - /** |
144 | | - * True if it can detect local minimums. |
145 | | - */ |
| 114 | + /// True if it can detect local minimums. |
146 | 115 | boolean canDetectMinimums(); |
147 | 116 | } |
0 commit comments