fix(features2d): Correct pointer arithmetic in BRISK corner traversal

The pointer offset to move from top-right to bottom-right was incorrect. This change corrects the pointer calculation to use the proper row stride, ensuring it lands on the correct pixel.
This commit is contained in:
Haodi Yao
2025-11-27 16:34:26 +08:00
parent 641a7aa2a6
commit 29746ab963

View File

@@ -626,7 +626,7 @@ BRISK_Impl::smoothedIntensity(const cv::Mat& image, const cv::Mat& integral, con
ret_val = A * int(*ptr);
ptr += dx + 1;
ret_val += B * int(*ptr);
ptr += dy * imagecols + 1;
ptr += (dy + 1) * imagecols;
ret_val += C * int(*ptr);
ptr -= dx + 1;
ret_val += D * int(*ptr);