nareshmlx/opencv-pr huggingface dataset:
**File:** modules/imgproc/src/hal_replacement.hpp
**Change Type:** modified
**Context:** PR #25970: pyrDown: offset HAL added, IPP removed
**Review Line:** 1070

**Code Changes:**
```diff
+   @param margin_top Top margins for source image
+   @param margin_right Right margins for source image
+   @param margin_bottom Bottom margins for source image
+   @param border_type Border type
+*/
+inline int hal_ni_pyrdown_offset(const uchar* src_data, size_t src_step, int src_width, int src_height,
+                                 uchar* dst_data, size_t dst_step, int dst_width, int dst_height,
+                                 int depth, int cn, int margin_left, int margin_top, int margin_right, int margin_bottom, int border_type)
+{ return CV_HAL_ERROR_NOT_IMPLEMENTED; }
+
+//! @cond IGNORED
```

Review comment:
What is our plan to enable such feature in all filters. Starting with the name - shall we use _roi in the name? And pass the whole image size and roi inside? How to make it python-compatible? (Numpy does not have a notion of roi)
**File:** modules/imgproc/src/hal_replacement.hpp
**Change Type:** modified
**Context:** PR #25970: pyrDown: offset HAL added, IPP removed
**Review Line:** 1070

**Code Changes:**
```diff
+   @param margin_top Top margins for source image
+   @param margin_right Right margins for source image
+   @param margin_bottom Bottom margins for source image
+   @param border_type Border type
+*/
+inline int hal_ni_pyrdown_offset(const uchar* src_data, size_t src_step, int src_width, int src_height,
+                                 uchar* dst_data, size_t dst_step, int dst_width, int dst_height,
+                                 int depth, int cn, int margin_left, int margin_top, int margin_right, int margin_bottom, int border_type)
+{ return CV_HAL_ERROR_NOT_IMPLEMENTED; }
+
+//! @cond IGNORED
```

Review comment:
1. It's already done in current HAL API for filters. 2. Python and Numpy is not related here. Unfortunately we do not have solution for it.
**File:** modules/imgproc/src/hal_replacement.hpp
**Change Type:** modified
**Context:** PR #25970: pyrDown: offset HAL added, IPP removed
**Review Line:** 1070

**Code Changes:**
```diff
+   @param margin_top Top margins for source image
+   @param margin_right Right margins for source image
+   @param margin_bottom Bottom margins for source image
+   @param border_type Border type
+*/
+inline int hal_ni_pyrdown_offset(const uchar* src_data, size_t src_step, int src_width, int src_height,
+                                 uchar* dst_data, size_t dst_step, int dst_width, int dst_height,
+                                 int depth, int cn, int margin_left, int margin_top, int margin_right, int margin_bottom, int border_type)
+{ return CV_HAL_ERROR_NOT_IMPLEMENTED; }
+
+//! @cond IGNORED
```

Review comment:
* Numpy supports array slicing (though I am not sure if the slices can be passed outside of the Python) * Taking the ROI from source image then applying filter should produce the same result as doing it vice versa (i.e. applying filter then taking the ROI of the result). We can recommend Python users to stick to the second option at cost of performance.
**File:** samples/dnn/classification.cpp
**Change Type:** modified
**Context:** PR #25519: Improved classification sample

**Code Changes:**
```diff
@@ -8,206 +8,256 @@
 
 #include "common.hpp"
 
-std::string param_keys =
-    "{ help  h          | | Print help message. }"
-    "{ @alias           | | An alias name of model to extract preprocessing parameters from models.yml file. }"
-    "{ zoo              | models.yml | An optional path to file with preprocessing parameters }"
-    "{ input i          | | Path to input image or video file. Skip this argument to capture frames from a camera.}"
-    "{ initial_width    | 0 | Preprocess input image by initial resizing to a specific width.}"
```

Review comment:
some compilers complain about `while (true) {...}`. Use `for (;;) {...}` instead
**File:** samples/dnn/classification.cpp
**Change Type:** modified
**Context:** PR #25519: Improved classification sample

**Code Changes:**
```diff
@@ -8,206 +8,256 @@
 
 #include "common.hpp"
 
-std::string param_keys =
-    "{ help  h          | | Print help message. }"
-    "{ @alias           | | An alias name of model to extract preprocessing parameters from models.yml file. }"
-    "{ zoo              | models.yml | An optional path to file with preprocessing parameters }"
-    "{ input i          | | Path to input image or video file. Skip this argument to capture frames from a camera.}"
-    "{ initial_width    | 0 | Preprocess input image by initial resizing to a specific width.}"
```

Review comment:
why use `cv::` if we already put `using namespace cv;` in the beginning of the sample. Normally, in OpenCV samples we don't use `cv::` to make the code cleaner.
**File:** samples/dnn/classification.cpp
**Change Type:** modified
**Context:** PR #25519: Improved classification sample

**Code Changes:**
```diff
@@ -8,206 +8,256 @@
 
 #include "common.hpp"
 
-std::string param_keys =
-    "{ help  h          | | Print help message. }"
-    "{ @alias           | | An alias name of model to extract preprocessing parameters from models.yml file. }"
-    "{ zoo              | models.yml | An optional path to file with preprocessing parameters }"
-    "{ input i          | | Path to input image or video file. Skip this argument to capture frames from a camera.}"
-    "{ initial_width    | 0 | Preprocess input image by initial resizing to a specific width.}"
```

Review comment:
can you modify the sample to use text names for backend and target instead of numbers? e.g. ``` classification -backend openvino -target opencl_fp16 -input lena.jpg ``` I would put the functions that convert names to id's into common.h
**File:** samples/dnn/models.yml
**Change Type:** modified
**Context:** PR #25519: Improved classification sample

**Code Changes:**
```diff
@@ -207,34 +207,46 @@ faster_rcnn_tf:
 # Image classification models.
 ################################################################################
 
-# SqueezeNet v1.1 from https://github.com/DeepScale/SqueezeNet
 squeezenet:
   load_info:
-    url: "https://raw.githubusercontent.com/DeepScale/SqueezeNet/b5c3f1a23713c8b3fd7b801d229f6b04c64374a5/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel"
-    sha1: "3397f026368a45ae236403ccc81cfcbe8ebe1bd0"
-  model: "squeezenet_v1.1.caffemodel"
```

Review comment:
why don't we use the model with the latest opset? https://github.com/onnx/models/raw/69c5d3751dda5349fd3fc53f525395d180420c07/vision/classification/inception_and_googlenet/googlenet/model/googlenet-8.onnx
**File:** samples/dnn/classification.cpp
**Change Type:** modified
**Context:** PR #25519: Improved classification sample

**Code Changes:**
```diff
@@ -8,206 +8,256 @@
 
 #include "common.hpp"
 
-std::string param_keys =
-    "{ help  h          | | Print help message. }"
-    "{ @alias           | | An alias name of model to extract preprocessing parameters from models.yml file. }"
-    "{ zoo              | models.yml | An optional path to file with preprocessing parameters }"
-    "{ input i          | | Path to input image or video file. Skip this argument to capture frames from a camera.}"
-    "{ initial_width    | 0 | Preprocess input image by initial resizing to a specific width.}"
```

Review comment:
It's wrong line.
**File:** samples/dnn/classification.cpp
**Change Type:** modified
**Context:** PR #25519: Improved classification sample

**Code Changes:**
```diff
@@ -8,206 +8,256 @@
 
 #include "common.hpp"
 
-std::string param_keys =
-    "{ help  h          | | Print help message. }"
-    "{ @alias           | | An alias name of model to extract preprocessing parameters from models.yml file. }"
-    "{ zoo              | models.yml | An optional path to file with preprocessing parameters }"
-    "{ input i          | | Path to input image or video file. Skip this argument to capture frames from a camera.}"
-    "{ initial_width    | 0 | Preprocess input image by initial resizing to a specific width.}"
```

Review comment:
It may be network stream. I propose always use VideoCapture. It supports sequence of images too.
**File:** samples/dnn/common.hpp
**Change Type:** modified
**Context:** PR #25519: Improved classification sample

**Code Changes:**
```diff
@@ -1,5 +1,5 @@
 #include <opencv2/core/utils/filesystem.hpp>
-
+#include<iostream>
 using namespace cv;
 
 std::string genArgument(const std::string& argName, const std::string& help,
@@ -10,6 +10,41 @@ std::string genPreprocArguments(const std::string& modelName, const std::string&
 
 std::string findFile(const std::string& filename);
```

Review comment:
Why not OpenCV constants?
**File:** samples/dnn/classification.cpp
**Change Type:** modified
**Context:** PR #25519: Improved classification sample

**Code Changes:**
```diff
@@ -8,206 +8,256 @@
 
 #include "common.hpp"
 
-std::string param_keys =
-    "{ help  h          | | Print help message. }"
-    "{ @alias           | | An alias name of model to extract preprocessing parameters from models.yml file. }"
-    "{ zoo              | models.yml | An optional path to file with preprocessing parameters }"
-    "{ input i          | | Path to input image or video file. Skip this argument to capture frames from a camera.}"
-    "{ initial_width    | 0 | Preprocess input image by initial resizing to a specific width.}"
```

Review comment:
We have imagelist approach is some samples. I propose to use it here too. See https://github.com/opencv/opencv/blob/d1b643a05a70a21355f4a9d3761de58f4d690b7b/samples/cpp/calibration.cpp#L301 for example. File format is described in the sample header.
**File:** modules/calib3d/src/calibinit.cpp
**Change Type:** modified
**Context:** PR #25991: Improve corners matching in ChessBoardDetector::NeighborsFinder::findCornerNeighbor

**Code Changes:**
```diff
@@ -222,7 +222,7 @@ class ChessBoardDetector
     int all_quads_count;
 
     struct NeighborsFinder {
-        const float thresh_scale = 1.f;
+        const float thresh_scale = sqrt(2.f);
         ChessBoardDetector& detector;
         std::vector<int> neighbors_indices;
         std::vector<float> neighbors_dists;
@@ -232,8 +232,9 @@ class ChessBoardDetector
```

Review comment:
`i` is bad name here. Please use something meaningful.
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #25943: Added fisheye::distortPoints with non-identity projection matrix
**Review Line:** 3841

**Code Changes:**
```diff
     Note that the function assumes the camera intrinsic matrix of the undistorted points to be identity.
-    This means if you want to distort image points you have to multiply them with \f$K^{-1}\f$.
+    This means if you want to distort image points you have to multiply them with \f$K^{-1}\f$ or
+    use another function overload.
      */
     CV_EXPORTS_W void distortPoints(InputArray undistorted, OutputArray distorted, InputArray K, InputArray D, double alpha = 0);
 
+    /** @overload
+    Overload of distortPoints function to handle cases when undistorted points are got with non-identity
+    camera matrix, e.g. output of #estimateNewCameraMatrixForUndistortRectify.
+    @param undistorted Array of object points, 1xN/Nx1 2-channel (or vector\<Point2f\> ), where N is
```

Review comment:
here K is Knew, but it's called just "K". In the overloaded function below "K" is old K, and there is separate "Knew". I think, it's a bit confusing.
**File:** modules/calib3d/src/fisheye.cpp
**Change Type:** modified
**Context:** PR #25943: Added fisheye::distortPoints with non-identity projection matrix
**Review Line:** 331

**Code Changes:**
```diff
+    cv::Mat normalized(undistorted.size(), CV_64FC2);
+
+    Mat Knew = Kundistorted.getMat();
+
+    double cx, cy, fx, fy;
+    if (Knew.depth() == CV_32F)
+    {
+        fx = (double)Knew.at<float>(0, 0);
+        fy = (double)Knew.at<float>(1, 1);
+        cx = (double)Knew.at<float>(0, 2);
+        cy = (double)Knew.at<float>(1, 2);
```

Review comment:
we have special function that helps to process vector of points in different formats, called checkVector(). I don't see it here.
**File:** modules/calib3d/src/fisheye.cpp
**Change Type:** modified
**Context:** PR #25943: Added fisheye::distortPoints with non-identity projection matrix

**Code Changes:**
```diff
@@ -315,6 +315,48 @@ void cv::fisheye::distortPoints(InputArray undistorted, OutputArray distorted, I
     }
 }
 
+void cv::fisheye::distortPoints(InputArray _undistorted, OutputArray distorted, InputArray Kundistorted, InputArray K, InputArray D, double alpha)
+{
+    CV_INSTRUMENT_REGION();
+
+    CV_Assert(_undistorted.type() == CV_32FC2 || _undistorted.type() == CV_64FC2);
+    CV_Assert(Kundistorted.size() == Size(3,3) && (Kundistorted.type() == CV_32F || Kundistorted.type() == CV_64F));
```

Review comment:
why use Matx33f, especially after .getMat()? Why not use Mat and `.at<float>(i,j)` below?
**File:** modules/calib3d/src/fisheye.cpp
**Change Type:** modified
**Context:** PR #25943: Added fisheye::distortPoints with non-identity projection matrix
**Review Line:** 349

**Code Changes:**
```diff
+    }
+
+    size_t n = undistorted.total();
+    const Vec2f* Xf = undistorted.ptr<Vec2f>();
+    const Vec2d* Xd = undistorted.ptr<Vec2d>();
+    Vec2d* normXd = normalized.ptr<Vec2d>();
+    for (size_t i = 0; i < n; i++)
+    {
+        Vec2d p = undistorted.depth() == CV_32F ? (Vec2d)Xf[i] : Xd[i];
+        normXd[i][0] = (p[0] - cx) / fx;
+        normXd[i][1] = (p[1] - cy) / fy;
```

Review comment:
isn't double precision too heavy here? Shall we use the same data type as input points? Maybe we could add a helper function to do this `{(x-cx)/fx, (y-cy)/fy}` normalization?
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #25943: Added fisheye::distortPoints with non-identity projection matrix
**Review Line:** 3841

**Code Changes:**
```diff
     Note that the function assumes the camera intrinsic matrix of the undistorted points to be identity.
-    This means if you want to distort image points you have to multiply them with \f$K^{-1}\f$.
+    This means if you want to distort image points you have to multiply them with \f$K^{-1}\f$ or
+    use another function overload.
      */
     CV_EXPORTS_W void distortPoints(InputArray undistorted, OutputArray distorted, InputArray K, InputArray D, double alpha = 0);
 
+    /** @overload
+    Overload of distortPoints function to handle cases when undistorted points are got with non-identity
+    camera matrix, e.g. output of #estimateNewCameraMatrixForUndistortRectify.
+    @param undistorted Array of object points, 1xN/Nx1 2-channel (or vector\<Point2f\> ), where N is
```

Review comment:
Renamed the parameter and added reference.
**File:** modules/calib3d/src/fisheye.cpp
**Change Type:** modified
**Context:** PR #25943: Added fisheye::distortPoints with non-identity projection matrix
**Review Line:** 331

**Code Changes:**
```diff
+    cv::Mat normalized(undistorted.size(), CV_64FC2);
+
+    Mat Knew = Kundistorted.getMat();
+
+    double cx, cy, fx, fy;
+    if (Knew.depth() == CV_32F)
+    {
+        fx = (double)Knew.at<float>(0, 0);
+        fy = (double)Knew.at<float>(1, 1);
+        cx = (double)Knew.at<float>(0, 2);
+        cy = (double)Knew.at<float>(1, 2);
```

Review comment:
It's camera matrix 3x3, not vector. Reworked code a bit.
**File:** 3rdparty/ndsrvp/src/integral.cpp
**Change Type:** modified
**Context:** PR #25786: 3rdparty: NDSRVP - Part 1.5: New Interfaces

**Code Changes:**
```diff
@@ -3,6 +3,8 @@
 // of this distribution and at http://opencv.org/license.html.	
 
 #include "ndsrvp_hal.hpp"
+#include "opencv2/imgproc/hal/interface.h"
+#include "cvutils.hpp"
 
 namespace cv {
 
```

Review comment:
What is `opencv2/core.hpp` for? By design HAL should not use anything from the main library except for `*/hal/interface.h` headers.
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #25786: 3rdparty: NDSRVP - Part 1.5: New Interfaces

**Code Changes:**
```diff
@@ -2268,16 +2268,7 @@ class WarpAffineInvoker :
         short *XY = __XY.data(), *A = __A.data();
         const int AB_BITS = MAX(10, (int)INTER_BITS);
         const int AB_SCALE = 1 << AB_BITS;
-        int round_delta = interpolation == INTER_NEAREST ? AB_SCALE/2 : AB_SCALE/INTER_TAB_SIZE/2, x, y, x1, y1;
-    #if CV_TRY_AVX2
-        bool useAVX2 = CV_CPU_HAS_SUPPORT_AVX2;
-    #endif
-    #if CV_TRY_SSE4_1
-        bool useSSE4_1 = CV_CPU_HAS_SUPPORT_SSE4_1;
```

Review comment:
Please extract the whole block to some `cv::hal::` function. Define it here: https://github.com/opencv/opencv/blob/4.x/modules/imgproc/include/opencv2/imgproc/hal/hal.hpp Implementation can reside somewhere in this file (imgwarp.cpp). This new function should first try external HAL function (using [CALL_HAL](https://github.com/opencv/opencv/blob/8d935e21843c1085000ecaf1ec46337c7891f651/modules/core/src/hal_replacement.hpp#L971-L990) macro), then try AVX, SSE, LASX, universal intrinsics, then fallback implementation. Then `cv::warpAffine` should call this new `cv::hal::` function for CPU processing. ----------- There are some functions implemented this way, e.g. `cv::hal::normHamming` (https://github.com/opencv/opencv/blob/8d935e21843c1085000ecaf1ec46337c7891f651/modules/core/src/norm.cpp#L53-L100), but it only have HAL, universal intrinsics and fallback parts.
**File:** 3rdparty/ndsrvp/src/integral.cpp
**Change Type:** modified
**Context:** PR #25786: 3rdparty: NDSRVP - Part 1.5: New Interfaces

**Code Changes:**
```diff
@@ -3,6 +3,8 @@
 // of this distribution and at http://opencv.org/license.html.	
 
 #include "ndsrvp_hal.hpp"
+#include "opencv2/imgproc/hal/interface.h"
+#include "cvutils.hpp"
 
 namespace cv {
 
```

Review comment:
Inclusion of `opencv2/core.hpp` has been removed. Related functions are moved to `cvutils.hpp` and `cvutils.cpp`.
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #25786: 3rdparty: NDSRVP - Part 1.5: New Interfaces

**Code Changes:**
```diff
@@ -2268,16 +2268,7 @@ class WarpAffineInvoker :
         short *XY = __XY.data(), *A = __A.data();
         const int AB_BITS = MAX(10, (int)INTER_BITS);
         const int AB_SCALE = 1 << AB_BITS;
-        int round_delta = interpolation == INTER_NEAREST ? AB_SCALE/2 : AB_SCALE/INTER_TAB_SIZE/2, x, y, x1, y1;
-    #if CV_TRY_AVX2
-        bool useAVX2 = CV_CPU_HAS_SUPPORT_AVX2;
-    #endif
-    #if CV_TRY_SSE4_1
-        bool useSSE4_1 = CV_CPU_HAS_SUPPORT_SSE4_1;
```

Review comment:
4 new functions have been extracted. Further accuracy checks might be needed for other related platforms(AVX2, LASX, etc.).
**File:** 3rdparty/ndsrvp/include/imgproc.hpp
**Change Type:** modified
**Context:** PR #25786: 3rdparty: NDSRVP - Part 1.5: New Interfaces

**Code Changes:**
```diff
@@ -1,18 +1,12 @@
 // This file is part of OpenCV project.
 // It is subject to the license terms in the LICENSE file found in the top-level directory
-// of this distribution and at http://opencv.org/license.html.	
+// of this distribution and at http://opencv.org/license.html.
 
 #ifndef OPENCV_NDSRVP_IMGPROC_HPP
 #define OPENCV_NDSRVP_IMGPROC_HPP
 
 namespace cv {
```

Review comment:
It would be better to add missing constants to the `imgproc/hal/interface.h` and use them in HAL.
**File:** 3rdparty/ndsrvp/src/remap.cpp
**Change Type:** added
**Context:** PR #25786: 3rdparty: NDSRVP - Part 1.5: New Interfaces

**Code Changes:**
```diff
@@ -0,0 +1,188 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "ndsrvp_hal.hpp"
+#include "opencv2/imgproc/hal/interface.h"
+#include "cvutils.hpp"
+
+namespace cv {
```

Review comment:
Why not just std::vector or even std::array? It's safe in terms of memory leaks.
**File:** modules/imgproc/include/opencv2/imgproc/hal/hal.hpp
**Change Type:** modified
**Context:** PR #25786: 3rdparty: NDSRVP - Part 1.5: New Interfaces
**Review Line:** 123

**Code Changes:**
```diff
                                const double M[9], int interpolation, int borderType, const double borderValue[4]);
 
+CV_EXPORTS void warpPerspectiveBlocklineNN(const double *M, short* xy, double X0, double Y0, double W0, int bw);
+
+CV_EXPORTS void warpPerspectiveBlockline(const double *M, short* xy, short* alpha, double X0, double Y0, double W0, int bw);
+
 CV_EXPORTS void cvtBGRtoBGR(const uchar * src_data, size_t src_step,
                             uchar * dst_data, size_t dst_step,
                             int width, int height,
```

Review comment:
Do we really need public functions for it?
**File:** modules/imgproc/include/opencv2/imgproc/hal/hal.hpp
**Change Type:** modified
**Context:** PR #25786: 3rdparty: NDSRVP - Part 1.5: New Interfaces
**Review Line:** 123

**Code Changes:**
```diff
                                const double M[9], int interpolation, int borderType, const double borderValue[4]);
 
+CV_EXPORTS void warpPerspectiveBlocklineNN(const double *M, short* xy, double X0, double Y0, double W0, int bw);
+
+CV_EXPORTS void warpPerspectiveBlockline(const double *M, short* xy, short* alpha, double X0, double Y0, double W0, int bw);
+
 CV_EXPORTS void cvtBGRtoBGR(const uchar * src_data, size_t src_step,
                             uchar * dst_data, size_t dst_step,
                             int width, int height,
```

Review comment:
We might want to test them separately or use in other modules (contrib or custom). I think we can leave them public for consistency with other`cv::hal::` functions.
**File:** 3rdparty/ndsrvp/src/remap.cpp
**Change Type:** added
**Context:** PR #25786: 3rdparty: NDSRVP - Part 1.5: New Interfaces

**Code Changes:**
```diff
@@ -0,0 +1,188 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "ndsrvp_hal.hpp"
+#include "opencv2/imgproc/hal/interface.h"
+#include "cvutils.hpp"
+
+namespace cv {
```

Review comment:
Sure. `fastMalloc` has been changed to `std::array` now.
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #25630: dnn: parallelize nary elementwise forward implementation & enable related conformance tests

**Code Changes:**
```diff
@@ -44,13 +44,11 @@ class NaryEltwiseHelper CV_FINAL
     std::vector<int> all_ndims;
     std::vector<std::vector<int>> orig_shapes;
     std::vector<std::vector<size_t>> orig_steps;
-    std::vector<char*> ptrs;
     std::vector<std::vector<int>> shapes;
     std::vector<std::vector<size_t>> steps;
     std::vector<size_t> elemsize;
 
-    NaryEltwiseHelper() {
```

Review comment:
> `nstripes = getNumThreads();` This should not be used. Already discussed several months ago - e.g. #23047
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #25630: dnn: parallelize nary elementwise forward implementation & enable related conformance tests

**Code Changes:**
```diff
@@ -44,13 +44,11 @@ class NaryEltwiseHelper CV_FINAL
     std::vector<int> all_ndims;
     std::vector<std::vector<int>> orig_shapes;
     std::vector<std::vector<size_t>> orig_steps;
-    std::vector<char*> ptrs;
     std::vector<std::vector<int>> shapes;
     std::vector<std::vector<size_t>> steps;
     std::vector<size_t> elemsize;
 
-    NaryEltwiseHelper() {
```

Review comment:
Changed. Performance results are also updated.
**File:** modules/core/test/test_allocator.cpp
**Change Type:** added
**Context:** PR #25979: Set and check allocator pointer for all cv::Mat instances
**Review Line:** 141

**Code Changes:**
```diff
+    size_t expect_allocated = 16*16*sizeof(uchar) + 32*32*sizeof(uchar);
+    EXPECT_EQ(expect_allocated, DummyAllocator::allocatedBytes);
+
+    // ROI should not trigger extra allocations
+    EXPECT_EQ(2, DummyAllocator::allocations);
+    EXPECT_EQ(2, DummyAllocator::deallocations);
+}
+
+}} // namespace
```

Review comment:
Test fails in case of using of `--gtest_repeat` flag.