aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/reference/HarrisCornerDetector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validation/reference/HarrisCornerDetector.cpp')
-rw-r--r--tests/validation/reference/HarrisCornerDetector.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/validation/reference/HarrisCornerDetector.cpp b/tests/validation/reference/HarrisCornerDetector.cpp
index 12afd95efa..442f6a18b5 100644
--- a/tests/validation/reference/HarrisCornerDetector.cpp
+++ b/tests/validation/reference/HarrisCornerDetector.cpp
@@ -99,9 +99,9 @@ std::vector<KeyPoint> harris_corner_detector_impl(const SimpleTensor<U> &src, fl
float Gxy = 0.f;
// Calculate Gx^2, Gy^2 and Gxy within the given window
- for(int y = src_coord.y() - block_size / 2; y <= src_coord.y() + block_size / 2; ++y)
+ for(int y = block_top_left.y(); y <= block_bottom_right.y(); ++y)
{
- for(int x = src_coord.x() - block_size / 2; x <= src_coord.x() + block_size / 2; ++x)
+ for(int x = block_top_left.x(); x <= block_bottom_right.x(); ++x)
{
Coordinates block_coord(x, y);
@@ -139,7 +139,7 @@ std::vector<KeyPoint> harris_corner_detector_impl(const SimpleTensor<U> &src, fl
{
Coordinates coord = index2coord(suppressed_scores.shape(), i);
- if(is_in_valid_region(suppressed_scores_region, coord) && suppressed_scores[i] > 0.f)
+ if(is_in_valid_region(suppressed_scores_region, coord) && suppressed_scores[i] != 0.f)
{
KeyPoint corner;
corner.x = coord.x();