File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/extract Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,8 @@ public Max() {}
7878 int peakX = 0 ;
7979 int peakY = 0 ;
8080
81- float peakVal = -Float .MAX_VALUE ;
81+ // Only consider candidates which are acceptable
82+ float peakVal = Math .nextDown (thresholdMax );
8283
8384 for (int y = y0 ; y < y1 ; y ++) {
8485 int index = img .startIndex + y *img .stride + x0 ;
@@ -123,7 +124,8 @@ public Min() {}
123124 int peakX = 0 ;
124125 int peakY = 0 ;
125126
126- float peakVal = Float .MAX_VALUE ;
127+ // Only consider candidates which are acceptable
128+ float peakVal = Math .nextUp (thresholdMin );
127129
128130 for (int y = y0 ; y < y1 ; y ++) {
129131 int index = img .startIndex + y *img .stride + x0 ;
@@ -164,8 +166,9 @@ public MinMax() {}
164166 int minX = 0 ;
165167 int minY = 0 ;
166168
167- float maxVal = -Float .MAX_VALUE ;
168- float minVal = Float .MAX_VALUE ;
169+ // Only consider candidates which are acceptable
170+ float maxVal = Math .nextDown (thresholdMax );
171+ float minVal = Math .nextUp (thresholdMin );
169172
170173 for (int y = y0 ; y < y1 ; y ++) {
171174 int index = img .startIndex + y *img .stride + x0 ;
You can’t perform that action at this time.
0 commit comments