diff --git a/vision/L1/include/imgproc/xf_ispstats.hpp b/vision/L1/include/imgproc/xf_ispstats.hpp index a82d17a27..b18788ec8 100644 --- a/vision/L1/include/imgproc/xf_ispstats.hpp +++ b/vision/L1/include/imgproc/xf_ispstats.hpp @@ -125,8 +125,8 @@ void xfSTATSKernel_bgr(xf::cv::Mat& _src_m // Check if part of zone if ((col >= roi_tlx) && (col <= (roi_brx)) && (row >= roi_tly) && (row <= (roi_bry))) { - int zone_col = int((col - roi_tlx) / zone_width); - int zone_row = int((row - roi_tly) / zone_height); + int zone_col = int((col - roi_tly) / zone_width); + int zone_row = int((row - roi_tlx) / zone_height); zone_idx = (zone_row * zone_col_num) + zone_col; EXTRACT_UPDATE: @@ -292,8 +292,8 @@ void xfSTATSKernel_bayer(xf::cv::Mat& src, // Check if part of zone if ((col >= roi_tlx) && (col <= (roi_brx)) && (row >= roi_tly) && (row <= (roi_bry))) { - int zone_col = int((col - roi_tlx) / zone_width); - int zone_row = int((row - roi_tly) / zone_height); + int zone_col = int((col - roi_tly) / zone_width); + int zone_row = int((row - roi_tlx) / zone_height); zone_idx = (zone_row * zone_col_num) + zone_col; col_idx = col * NPC + 0 + col_incr; @@ -428,8 +428,8 @@ void xfSTATSKernel_gray(xf::cv::Mat& _src_ // Check if part of zone if ((col >= roi_tlx) && (col <= (roi_brx)) && (row >= roi_tly) && (row <= (roi_bry))) { - int zone_col = int((col - roi_tlx) / zone_width); - int zone_row = int((row - roi_tly) / zone_height); + int zone_col = int((col - roi_tly) / zone_width); + int zone_row = int((row - roi_tlx) / zone_height); zone_idx = (zone_row * zone_col_num) + zone_col; EXTRACT_UPDATE: