instruction stringclasses 9
values | input stringlengths 279 5.47k | output stringlengths 6 9.58k |
|---|---|---|
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/sincos.hpp
**Change Type:** added
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 1
**Code Changes:**
```diff
@@ -0,0 +1,72 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found... | Better to move the content of this file to `common.hpp` or `common_utils.hpp` when we have such files. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/src/mathfuncs_core.simd.hpp
**Change Type:** modified
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 14
**Code Changes:**
```diff
@@ -11,6 +11,8 @@ CV_CPU_OPTIMIZATION_NAMESPACE_BEGIN
// forward declarations
void cartToPolar32f(const float *X, c... | Why is `isInPlace` dropped? |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/src/mathfuncs_core.simd.hpp
**Change Type:** modified
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 185
**Code Changes:**
```diff
}
}
+namespace {
+
+static inline void SinCos_32f(const float* mag, const float* angle, float* cosval, float... | It would be nice if you can refactor this function with v_sincos from https://github.com/opencv/opencv/pull/25892. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/sincos.hpp
**Change Type:** added
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 1
**Code Changes:**
```diff
@@ -0,0 +1,72 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found... | In fact, this function is currently only used by `polar_to_cart` in `core`, so it’s not really "common." I split it into a separate file because it represents a standalone, reusable functionality. If I just put it in `polar_to_cart.hpp`, it may also be confusing why the seemingly standalone function `sin_cos` is there. |
You are an expert OpenCV code reviewer specializing in API design and compatibility. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/src/mathfuncs_core.simd.hpp
**Change Type:** modified
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 14
**Code Changes:**
```diff
@@ -11,6 +11,8 @@ CV_CPU_OPTIMIZATION_NAMESPACE_BEGIN
// forward declarations
void cartToPolar32f(const float *X, c... | Because it looks quite different from cartToPolar and is inconsistent with the current HAL interface. And it is no longer necessary in the current approach. You can see the detail in this part of the first comment: > ### Effect of Point 4 |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/src/mathfuncs_core.simd.hpp
**Change Type:** modified
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 185
**Code Changes:**
```diff
}
}
+namespace {
+
+static inline void SinCos_32f(const float* mag, const float* angle, float* cosval, float... | I will give it a try. However, `SinCos_32f` has specific optimizations for AVX2. Where should I place it? Should I leave it here or put it in `intrin_avx.hpp`? I'm not familiar with the UI conventions. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/src/mathfuncs_core.simd.hpp
**Change Type:** modified
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 185
**Code Changes:**
```diff
}
}
+namespace {
+
+static inline void SinCos_32f(const float* mag, const float* angle, float* cosval, float... | If you implement UI version and find out that it is much faster, then just drop it. Otherwise, preserve it somehow. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/sincos.hpp
**Change Type:** added
**Context:** PR #26999: [HAL RVV] unify and impl polar_to_cart | add perf test
**Review Line:** 1
**Code Changes:**
```diff
@@ -0,0 +1,72 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found... | We can leave it as-is. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/perf/perf_flip.cpp
**Change Type:** added
**Context:** PR #26943: Impl RISC-V HAL for cv::flip | Add perf test for flip
**Review Line:** 5
**Code Changes:**
```diff
@@ -0,0 +1,45 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the t... | License header is missing. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/types.hpp
**Change Type:** added
**Context:** PR #26977: [Refactor](HAL RVV): Consolidate Helpers for Code Reusability
**Code Changes:**
```diff
@@ -0,0 +1,485 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-... | Maybe split names for better readability? `RVV_##TYPE_NAME##M1`? |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/types.hpp
**Change Type:** added
**Context:** PR #26977: [Refactor](HAL RVV): Consolidate Helpers for Code Reusability
**Code Changes:**
```diff
@@ -0,0 +1,485 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-... | I meant adding an underscore between `RVV` and type, e.g. `RVV_U8M1` |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/types.hpp
**Change Type:** added
**Context:** PR #26977: [Refactor](HAL RVV): Consolidate Helpers for Code Reusability
**Code Changes:**
```diff
@@ -0,0 +1,485 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-... | I'm really sorry for misunderstanding you again. I thought you were saying that the macro concatenation was too ugly and asked me to split the type name definition. Of course, I also think the macro is ugly, so I’ve now changed the name and also expanded the macro. |
You are an expert OpenCV code reviewer specializing in documentation and code clarity. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/test/test_arucodetection.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 658
**Code Changes:**
```diff
+TEST(CV_ArucoMultiDict, setGetDictionaries)
+{
+ vector<aruco::Dictionary> dictionaries... | Please add comment to the detector constructor that it uses one of predefined dictionaries by default. Value `2` is not obvious here. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -285,6 +285,16 @@ class CV_EXPORTS_W ArucoDetector : public Algorithm
... | size_t does not work well with Java and Python bindings. let's use just int. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/test/test_arucodetection.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -6,6 +6,18 @@
#include "opencv2/objdetect/aruco_detector.hpp"
#include "opencv2/calib3d.hpp"
+namespace c... | ``` Point2f firstCorner(markerSidePixels / 2.f + x * (1.5f * markerSidePixels), markerSidePixels / 2.f + y * (1.5f * markerSidePixels)); Mat aux = img((int)firstCorner.x, (int)firstCorner.y, markerSidePixels. markerSidePixels); ``` |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/test/test_arucodetection.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -6,6 +6,18 @@
#include "opencv2/objdetect/aruco_detector.hpp"
#include "opencv2/calib3d.hpp"
+namespace c... | I propose to add assertion to `removeDictionary()` call and not allow the case without dictionaries, because we get detector with invalid state and it's definitely a bug. |
You are an expert OpenCV code reviewer specializing in API design and compatibility. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/misc/python/test/test_objdetect_aruco.py
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -458,5 +458,30 @@ def test_draw_detected_diamonds(self):
with self.assertRaises(Exceptio... | It breaks compatibility. M.b. rename the method to detectMarkersMultiDict? |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -10,6 +10,7 @@
#include "apriltag/apriltag_quad_thresh.hpp"
#include "aruco_utils.hpp"
#include <cmath>
+#... | Add `index>= 0` to assert. |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -10,6 +10,7 @@
#include "apriltag/apriltag_quad_thresh.hpp"
#include "aruco_utils.hpp"
#include <cmath>
+#... | Add `index>= 0` to assert. |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -10,6 +10,7 @@
#include "apriltag/apriltag_quad_thresh.hpp"
#include "aruco_utils.hpp"
#include <cmath>
+#... | Add index>= 0 to assert. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 1117
**Code Changes:**
```diff
@@ -10,6 +10,7 @@
#include "apriltag/apriltag_quad_thresh.hpp"
#include "aruco_utils.hpp... | I propose to add `refineDetectedMarkersMultiDict` overload with dictionaries id like in detect. May be useful for multi-scale markers. |
You are an expert OpenCV code reviewer specializing in test coverage and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/misc/python/test/test_objdetect_aruco.py
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -458,5 +458,30 @@ def test_draw_detected_diamonds(self):
with self.assertRaises(Exceptio... | Unfortunate, but I managed to do create a detectMarkersMultiDict function with relative little redundant code. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 1117
**Code Changes:**
```diff
@@ -10,6 +10,7 @@
#include "apriltag/apriltag_quad_thresh.hpp"
#include "aruco_utils.hpp... | Made sure refine is now looping over the markers and checked the output. Looks like this can be done safely without having to have two functions. |
You are an expert OpenCV code reviewer specializing in documentation and code clarity. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -285,6 +285,16 @@ class CV_EXPORTS_W ArucoDetector : public Algorithm
... | 1. In my opinion, methods `get(set)Dictionary`, `add(remove)Dictionary` are redundant. It is enough to have `get(set)Dictionaries`. Perhaps it would be better to preserve old `get(set)Dictionary`, so that they would return the first one. 2. Is it safe to return reference to internal vector in method `getDictionaries`? ... |
You are an expert OpenCV code reviewer specializing in API design and compatibility. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 373
**Code Changes:**
```diff
+ * Note that this function does not perform pose estimation.
+ * @... | Wouldn't it be more convenient to modify Dictionary class, so that it would be able to combine several dictionaries underneath. It could also handle duplicate markers and provide convenient indexing. Detector interface would stay the same and users would require minimal changes in their code. |
You are an expert OpenCV code reviewer specializing in API design and compatibility. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 373
**Code Changes:**
```diff
+ * Note that this function does not perform pose estimation.
+ * @... | Not a bad idea, but the Dictionary class is also used for these calibration boards and the Charuco stuff as well. Its public members (`errorCorrection`, `markerSize`, `bytesList`) would all need to change because they would be ambiguous. Just from a quick check I think such a change would be more disruptive than the in... |
You are an expert OpenCV code reviewer specializing in API design and compatibility. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 373
**Code Changes:**
```diff
+ * Note that this function does not perform pose estimation.
+ * @... | > I think such a change would be more disruptive than the interface change suggested in this PR. Agree and support |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 373
**Code Changes:**
```diff
+ * Note that this function does not perform pose estimation.
+ * @... | We already have function `extendDictionary` which adds randomized markers to the existing dictionary, so I believe creating similar function to combine several dictionaries with the same marker size would be quite easy. Or do we need to have dictionaries with different marker sizes? |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -285,6 +285,16 @@ class CV_EXPORTS_W ArucoDetector : public Algorithm
... | 1. Old get/setDictionary API would work, yes. But ABI compatibility would be broken. Can we avoid it? 2. No I meant safety in terms of exposing internal structure. For example it allows user to create iterator which might become invalid suddenly. Also we won't be able to change internal data structure. 3. Each access f... |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 1386
**Code Changes:**
```diff
}
-void ArucoDetector::write(FileStorage &fs) const
-{
- arucoDetectorImpl->dictiona... | I believe (de)serialization is not tested. Is old format supported? I.e. if we have just one dictionary, would older versions of OpenCV be able to read it? |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 1386
**Code Changes:**
```diff
}
-void ArucoDetector::write(FileStorage &fs) const
-{
- arucoDetectorImpl->dictiona... | True, I couldn't find a unit test for it, but I tested it locally. I can clean the code up and add it as a test. I made sure it could read the old format, but it wouldn't produce the old format if there's only one dictionary. I'll add that, so both read and write support the old format if there is only on dict. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 373
**Code Changes:**
```diff
+ * Note that this function does not perform pose estimation.
+ * @... | At least for the use case we have in mind you would want to scan dictionaries of different marker sizes, yes. |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -285,6 +285,16 @@ class CV_EXPORTS_W ArucoDetector : public Algorithm
... | 1. Alright, I've updated the PR to keep the behavior of the set/get functions and the ABI the same. 2. Yeah, good point with the iterators. I make it return a copy now. 3. I think I had tests already, but since you asked about it earlier, the most current version now has no add/remove functions and thus it's a lot easi... |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -10,6 +10,7 @@
#include "apriltag/apriltag_quad_thresh.hpp"
#include "aruco_utils.hpp"
#include <cmath>
+#... | Why not regular `std::set`? |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/test/test_arucodetection.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -6,6 +6,18 @@
#include "opencv2/objdetect/aruco_detector.hpp"
#include "opencv2/calib3d.hpp"
+namespace c... | Please use `cv::tempfile` for file name and make sure file is removed using `remove` at the end (no `ASSERT_` can be used). Alternatively you can try to use in-memory storage: https://github.com/opencv/opencv/blob/dbd3ef9a6f838d3ac42f8cf4d9d1dd5c709cb807/modules/features2d/test/test_matchers_algorithmic.cpp#L591-L595 |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/test/test_arucodetection.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -6,6 +6,18 @@
#include "opencv2/objdetect/aruco_detector.hpp"
#include "opencv2/calib3d.hpp"
+namespace c... | Failure to open file should become test failure. Here and in other places. |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 365
**Code Changes:**
```diff
+ * @param rejectedImgPoints contains the imgPoints of those squares wh... | Perhaps it would be useful to define and test behavior in case when several dictionaries contain same markers. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -10,6 +10,7 @@
#include "apriltag/apriltag_quad_thresh.hpp"
#include "aruco_utils.hpp"
#include <cmath>
+#... | If I understand correctly, this function filters candidates using marker size as a hint to estimate distances or something. Could dictionaries with different marker sizes affect detections of each other? |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -10,6 +10,7 @@
#include "apriltag/apriltag_quad_thresh.hpp"
#include "aruco_utils.hpp"
#include <cmath>
+#... | Can dictionary have marker size other than 4, 5, 6, 7? I don't see any checks in `Dictionary` constructor or other places. If it can, then we have possible out-of-bounds access. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 785
**Code Changes:**
```diff
+ if (_dictIndices.needed()) {
+ dictIndices.insert(dictI... | Is it possible to extract this large block to separate function to reduce code duplication? |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -10,6 +10,7 @@
#include "apriltag/apriltag_quad_thresh.hpp"
#include "aruco_utils.hpp"
#include <cmath>
+#... | Yeah, I was thinking about the predefined dictionaries only, but custom dictionaries could potentially break this. I made it more flexible that now any size of marker is supported. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -10,6 +10,7 @@
#include "apriltag/apriltag_quad_thresh.hpp"
#include "aruco_utils.hpp"
#include <cmath>
+#... | That was also my worry and when reading into the code of the function it may affect candidates in some corner cases. This is why I'm making copies of the vectors before filtering, so the order of identifying with multiple dictionaries doesn't matter. The copies are an overhead though that I'd like to avoid. |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Review Line:** 365
**Code Changes:**
```diff
+ * @param rejectedImgPoints contains the imgPoints of those squares wh... | Good idea. Added a test that shows off how you can detect three markers for 2 similar dictionaries. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #26934: Extend ArUcoDetector to run multiple dictionaries in an efficient manner.
**Code Changes:**
```diff
@@ -10,6 +10,7 @@
#include "apriltag/apriltag_quad_thresh.hpp"
#include "aruco_utils.hpp"
#include <cmath>
+#... | made it a map now as marker size needs to map to candidate tree. I made this connection now more deliberately and direct so I also don't need to calculate indices for other containers which may cause bounds issues as you correctly pointed out. |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgproc/test/test_thresh.cpp
**Change Type:** modified
**Context:** PR #26842: added optional mask to cv::threshold
**Code Changes:**
```diff
@@ -520,6 +520,98 @@ TEST(Imgproc_Threshold, threshold_dryrun)
}
}
+typedef tuple < bool, int, int, int, int > Imgproc_Threshold_Masked_Params_t;
+
+ty... | I propose to use parameterized google test here. It generates all "loops" by itself and print options combination in case of failure |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgproc/test/test_thresh.cpp
**Change Type:** modified
**Context:** PR #26842: added optional mask to cv::threshold
**Code Changes:**
```diff
@@ -520,6 +520,98 @@ TEST(Imgproc_Threshold, threshold_dryrun)
}
}
+typedef tuple < bool, int, int, int, int > Imgproc_Threshold_Masked_Params_t;
+
+ty... | If-else branches use different pattern and a bit different logic. I propose to split them on 2 test cases with different names. It also allows to get rid of complex logic with `isValidConfig` flag. |
You are an expert OpenCV code reviewer specializing in code quality and best practices. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgproc/src/opencl/threshold_mask.cl
**Change Type:** added
**Context:** PR #26842: added optional mask to cv::threshold
**Code Changes:**
```diff
@@ -0,0 +1,60 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// ... | I propose to use modern copyright header and mention the original OpenCL code author too. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/magnitude.hpp
**Change Type:** added
**Context:** PR #27002: [HAL RVV] impl magnitude | add perf test
**Code Changes:**
```diff
@@ -0,0 +1,42 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+/... | I guess you can try the same as in https://github.com/opencv/opencv/pull/27015. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/src/mathfuncs_core.simd.hpp
**Change Type:** modified
**Context:** PR #27010: [HAL RVV] impl exp and log | add log perf test
**Code Changes:**
```diff
@@ -771,7 +771,7 @@ void log32f( const float *_x, float *y, int n )
int i = 0;
const int* x = (const int*)_x;
-#if CV_SIMD
+#if (CV_S... | It should be `CV_SIMD_SCALABLE_64F`. Double may be not supported by the platform. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/exp.hpp
**Change Type:** added
**Context:** PR #27010: [HAL RVV] impl exp and log | add log perf test
**Review Line:** 1
**Code Changes:**
```diff
@@ -0,0 +1,202 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the to... | Basic math function like exp and log may be used in other HAL implementation as well. Consider to put them in `common.hpp` or `common_utils.hpp` when we have such files. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/test/test_arithm.cpp
**Change Type:** modified
**Context:** PR #27010: [HAL RVV] impl exp and log | add log perf test
**Review Line:** 1102
**Code Changes:**
```diff
@@ -1099,7 +1099,7 @@ struct ExpOp : public BaseElemWiseOp
}
void getValueRange(int depth, double& minval, double& maxva... | Why changing the value here? |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/test/test_arithm.cpp
**Change Type:** modified
**Context:** PR #27010: [HAL RVV] impl exp and log | add log perf test
**Review Line:** 1102
**Code Changes:**
```diff
@@ -1099,7 +1099,7 @@ struct ExpOp : public BaseElemWiseOp
}
void getValueRange(int depth, double& minval, double& maxva... | > And I found a logical error in my implementation of `exp`, which caused the CI to fail. This error only occurs when the input is large enough, and that's why it passes all tests related to `exp` in the core module (Core_HAL/mathfuncs._:Core_Exp/ElemWiseTest_). This is discussed above. And the new value is approaching... |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/exp.hpp
**Change Type:** added
**Context:** PR #27010: [HAL RVV] impl exp and log | add log perf test
**Review Line:** 1
**Code Changes:**
```diff
@@ -0,0 +1,202 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the to... | Same discussion [here](https://github.com/opencv/opencv/pull/27000#discussion_r1986729939) |
You are an expert OpenCV code reviewer specializing in code quality and best practices. Review the provided code changes and provide specific, actionable feedback. | **File:** doc/tutorials/imgproc/table_of_content_imgproc.markdown
**Change Type:** modified
**Context:** PR #26441: Update tutorials
**Code Changes:**
```diff
@@ -1,8 +1,15 @@
Image Processing (imgproc module) {#tutorial_table_of_content_imgproc}
=================================
-Basic
------
+@tableofcontents
+
... | The imgproc module in OpenCV is a collection of per-pixel image operations (color conversions, filters) drawing (contours, objects, text), and geometry transformations (warping, resize) useful for computer vision. Here's an overview of the content in the imgproc module, categorized for easier navigation. |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/perf/perf_lut.cpp
**Change Type:** modified
**Context:** PR #26941: Impl hal_rvv LUT | Add more LUT test
**Code Changes:**
```diff
@@ -24,4 +24,23 @@ PERF_TEST_P( SizePrm, LUT,
SANITY_CHECK(dst, 0.1);
}
+PERF_TEST_P( SizePrm, LUT_multi,
+ testing::Values(szQVGA, szVGA, sz1080... | My thoughts on dropping this test: 1. This patch does not bring speedup in case of multiple channels lut. 2. It does not check sanity. 3. You have added a regression test to test the accuracy of multi-channel lut. |
You are an expert OpenCV code reviewer specializing in code quality and best practices. Review the provided code changes and provide specific, actionable feedback. | **File:** cmake/OpenCVDetectCUDA.cmake
**Change Type:** modified
**Context:** PR #27112: cuda: Force C++17 Standard for CUDA targets when CUDA Toolkit >=12.8
**Code Changes:**
```diff
@@ -151,12 +151,14 @@ macro(ocv_cuda_compile VAR)
ocv_check_windows_crt_linkage()
ocv_nvcc_flags()
- if(UNIX OR APPLE)
- if... | Why `--std=c++11` and `--std=c++14` are set for UNIX or APPLE, but -`-std=c++17` - for all platforms. Most probably it's a mistake. |
You are an expert OpenCV code reviewer specializing in code quality and best practices. Review the provided code changes and provide specific, actionable feedback. | **File:** cmake/OpenCVDetectCUDA.cmake
**Change Type:** modified
**Context:** PR #27112: cuda: Force C++17 Standard for CUDA targets when CUDA Toolkit >=12.8
**Code Changes:**
```diff
@@ -151,12 +151,14 @@ macro(ocv_cuda_compile VAR)
ocv_check_windows_crt_linkage()
ocv_nvcc_flags()
- if(UNIX OR APPLE)
- if... | Please presume the empty line. |
You are an expert OpenCV code reviewer specializing in code quality and best practices. Review the provided code changes and provide specific, actionable feedback. | **File:** cmake/OpenCVDetectCUDA.cmake
**Change Type:** modified
**Context:** PR #27112: cuda: Force C++17 Standard for CUDA targets when CUDA Toolkit >=12.8
**Code Changes:**
```diff
@@ -151,12 +151,14 @@ macro(ocv_cuda_compile VAR)
ocv_check_windows_crt_linkage()
ocv_nvcc_flags()
- if(UNIX OR APPLE)
- if... | Perhaps Windows requires other flags (of there is similar problem - need Windows configuration to check that first). BTW, We use `CMAKE_CXX_STANDARD` variable for general C++ code: https://github.com/opencv/opencv/blob/4.11.0/cmake/OpenCVDetectCXXCompiler.cmake#L211 May be we should have proper `try_compile()` check fo... |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/sqrt.hpp
**Change Type:** added
**Context:** PR #27015: [HAL RVV] impl sqrt and invSqrt
**Code Changes:**
```diff
@@ -0,0 +1,122 @@
+// 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 dis... | nit: Use something like below https://github.com/opencv/opencv/blob/12d182bf9e2fa518aafad75dd5b77835c75674b4/3rdparty/hal_rvv/hal_rvv_1p0/merge.hpp#L4-L5 |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/sqrt.hpp
**Change Type:** added
**Context:** PR #27015: [HAL RVV] impl sqrt and invSqrt
**Review Line:** 49
**Code Changes:**
```diff
+ t = __riscv_vfmul(t, x2, vl);
+ t = __riscv_vfrsub(t, 1.5, vl);
+ y = __riscv_vfmul(t, y, vl);
+ }
+ // just to preve... | How does this happen? |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/sqrt.hpp
**Change Type:** added
**Context:** PR #27015: [HAL RVV] impl sqrt and invSqrt
**Code Changes:**
```diff
@@ -0,0 +1,122 @@
+// 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 dis... | Considering that RISC-V is relatively new, it's unlikely any compiler that doesn't support `#pragma once`. So I think using `#pragma once` should be acceptable. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/sqrt.hpp
**Change Type:** added
**Context:** PR #27015: [HAL RVV] impl sqrt and invSqrt
**Code Changes:**
```diff
@@ -0,0 +1,122 @@
+// 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 dis... | Just follow the convention to avoid confusion. |
You are an expert OpenCV code reviewer specializing in memory management. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/sqrt.hpp
**Change Type:** added
**Context:** PR #27015: [HAL RVV] impl sqrt and invSqrt
**Review Line:** 49
**Code Changes:**
```diff
+ t = __riscv_vfmul(t, x2, vl);
+ t = __riscv_vfrsub(t, 1.5, vl);
+ y = __riscv_vfmul(t, y, vl);
+ }
+ // just to preve... | In the `for` loop (calculating `invSqrt`), at most four variables, `x`, `x2`, `y`, `t`, need to be stored simultaneously, so it occupies at least 4 LMUL registers. However, after exiting the `for` loop, only `x` and `y` need to be retained. Therefore, when using mask registers, the number of registers used should not e... |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/src/persistence_base64_encoding.cpp
**Change Type:** modified
**Context:** PR #26937: Support bool type for FileStorage Base64
**Code Changes:**
```diff
@@ -202,6 +202,7 @@ int base64::icvCalcStructSize(const char *dt, int initial_size) {
switch ( *type )
{
case 'u... | sizeof(bool) may be different on different platforms. `to_binary()` converts it to uchar. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/src/persistence_base64_encoding.cpp
**Change Type:** modified
**Context:** PR #26937: Support bool type for FileStorage Base64
**Code Changes:**
```diff
@@ -202,6 +202,7 @@ int base64::icvCalcStructSize(const char *dt, int initial_size) {
switch ( *type )
{
case 'u... | sizeof(bool) may be different on different platforms. to_binary() converts it to uchar. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/src/hal_replacement.hpp
**Change Type:** modified
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Code Changes:**
```diff
@@ -756,10 +756,28 @@ inline int hal_ni_dft1D(cvhalDFT *context, const uchar *src, uchar *dst) { retur
*/
inline int hal_ni_dftFree1D(cvhal... | Why do you need Ocv suffix here and on the caller side? It breaks existing code style. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/dxt.hpp
**Change Type:** added
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Code Changes:**
```diff
@@ -0,0 +1,569 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level dire... | Could you add reference to paper or other implementation details. |
You are an expert OpenCV code reviewer specializing in documentation and code clarity. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/dxt.hpp
**Change Type:** added
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Code Changes:**
```diff
@@ -0,0 +1,569 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level dire... | It was copied from core/src/dxt.cpp, I have added some comments on it. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/dxt.hpp
**Change Type:** added
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Code Changes:**
```diff
@@ -0,0 +1,569 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level dire... | Usually we do not indent code inside namespaced: ```.cpp namespace myns { void exampleFunction(); } ``` |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/dxt.hpp
**Change Type:** added
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Code Changes:**
```diff
@@ -0,0 +1,569 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level dire... | Perhaps eventually it would make sense to unify this helper structure with others (minmax) and move it to separate header. |
You are an expert OpenCV code reviewer specializing in API design and compatibility. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/dxt.hpp
**Change Type:** added
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Code Changes:**
```diff
@@ -0,0 +1,569 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level dire... | Technically this macro is not available for HAL implementations - only things from `*/hal/interface.h` should be used. It works because this HAL is header-only and is included after cvdef.h. |
You are an expert OpenCV code reviewer specializing in performance optimization. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/dxt.hpp
**Change Type:** added
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Code Changes:**
```diff
@@ -0,0 +1,569 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level dire... | It would be hard to unify because different algorithms need different EMUL to achieve best performance. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/minmax.hpp
**Change Type:** modified
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Review Line:** 9
**Code Changes:**
```diff
+#define OPENCV_HAL_RVV_MINMAX_HPP_INCLUDED
#include <riscv_vector.h>
-namespace cv { namespace cv_hal_rvv {
+names... | Reasons to add yet another layer of namespace? It breaks all the current code. Revert this and other changes on adding namespaces if possible. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/minmax.hpp
**Change Type:** modified
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Review Line:** 9
**Code Changes:**
```diff
+#define OPENCV_HAL_RVV_MINMAX_HPP_INCLUDED
#include <riscv_vector.h>
-namespace cv { namespace cv_hal_rvv {
+names... | There will be naming conflicts about `template rvv<T>`. If there is no namespace (using anonymous space cannot solve the problem), there will be names such as `rvv_dxt` and `rvv_minmax`. In addition, some HAL implementations have some singleton classes, and I think it is inappropriate to expose these classes in `cv_hal... |
You are an expert OpenCV code reviewer specializing in API design and compatibility. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/minmax.hpp
**Change Type:** modified
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Review Line:** 9
**Code Changes:**
```diff
+#define OPENCV_HAL_RVV_MINMAX_HPP_INCLUDED
#include <riscv_vector.h>
-namespace cv { namespace cv_hal_rvv {
+names... | There are already several interfaces added. Your change is not complete and I propose to do it in a separate PR if you want to. This PR seems to be fine without this namespace change. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/minmax.hpp
**Change Type:** modified
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Review Line:** 9
**Code Changes:**
```diff
+#define OPENCV_HAL_RVV_MINMAX_HPP_INCLUDED
#include <riscv_vector.h>
-namespace cv { namespace cv_hal_rvv {
+names... | Do you think I should use `rvv_dxt` and `rvv_minmax`? Or should I keep the `namespace dxt` in this PR and keep `minmax.hpp` without namespace? |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/minmax.hpp
**Change Type:** modified
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Review Line:** 9
**Code Changes:**
```diff
+#define OPENCV_HAL_RVV_MINMAX_HPP_INCLUDED
#include <riscv_vector.h>
-namespace cv { namespace cv_hal_rvv {
+names... | > There will be naming conflicts about template rvv<T> Could you give me an example to demonstrate the problem? --- > Or should I keep the namespace dxt in this PR and keep minmax.hpp without namespace? I don't see problem with this solution for now. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/minmax.hpp
**Change Type:** modified
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Review Line:** 9
**Code Changes:**
```diff
+#define OPENCV_HAL_RVV_MINMAX_HPP_INCLUDED
#include <riscv_vector.h>
-namespace cv { namespace cv_hal_rvv {
+names... | ```cpp mimmax.hpp: #pragma once namespace cv { namespace cv_hal_rvv { template<typename T> rvv; template<> rvv<int> { ... }; }} dxt.hpp: #pragma once namespace cv { namespace cv_hal_rvv { template<typename T> rvv; template<> rvv<int> { ... }; }} hal_rvv.hpp: #include "hal_rvv_1p0/minmax.hpp" #include "hal_rvv_1p0/dxt.h... |
You are an expert OpenCV code reviewer specializing in API design and compatibility. Review the provided code changes and provide specific, actionable feedback. | **File:** 3rdparty/hal_rvv/hal_rvv_1p0/minmax.hpp
**Change Type:** modified
**Context:** PR #26865: Add RISC-V HAL implementation for cv::dft and cv::dct
**Review Line:** 9
**Code Changes:**
```diff
+#define OPENCV_HAL_RVV_MINMAX_HPP_INCLUDED
#include <riscv_vector.h>
-namespace cv { namespace cv_hal_rvv {
+names... | > There are already several interfaces added. Interfaces that don't have `rvv` structures don't have to make this change. The only thing that really needs to be changed right now is `minmax`. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/include/opencv2/core/hal/intrin_rvv_scalable.hpp
**Change Type:** modified
**Context:** PR #27006: Fix issues in RISC-V Vector (RVV) Universal Intrinsic
**Code Changes:**
```diff
@@ -8,6 +8,7 @@
#ifndef OPENCV_HAL_INTRIN_RVV_SCALABLE_HPP
#define OPENCV_HAL_INTRIN_RVV_SCALABLE_HPP
+#include <... | What about using std::array to store `idx_interleave_quads` so that we can get array length instead of a fixed number here to avoid mistakes. |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/test/test_intrin_utils.hpp
**Change Type:** modified
**Context:** PR #27006: Fix issues in RISC-V Vector (RVV) Universal Intrinsic
**Review Line:** 993
**Code Changes:**
```diff
- dataC *= (LaneType)-1;
+ for (int i = 0; i < VTraits<R>::vlanes(); i++)
+ {
+ auto c... | Why do we need to change that? ~~It is code for testing, all checks are below.~~ Code of input preparation - so it is OK. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/core/test/test_intrin_utils.hpp
**Change Type:** modified
**Context:** PR #27006: Fix issues in RISC-V Vector (RVV) Universal Intrinsic
**Review Line:** 993
**Code Changes:**
```diff
- dataC *= (LaneType)-1;
+ for (int i = 0; i < VTraits<R>::vlanes(); i++)
+ {
+ auto c... | Because we need `dataC` to be all negative numbers, then `v_check_all(c)` will be `true`. ``` R c = dataC; EXPECT_EQ(true, v_check_all(c)); ``` The previous `dataC *= (LaneType)-1;` cannot handle the case where the length of `dataC` greater than `128` for `int_8` |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -814,6 +814,10 @@ PngEncoder::PngEncoder()
next_seq_num = 0;
trnssize = 0;
palsize = 0;
+ m_compression_level = Z_BEST_SPEED;
+ m_compression_stra... | for better readibility, should i replace with ``` if (animation.frames.size() == 1) return write(animation.frames[0], params); ``` |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -814,6 +814,10 @@ PngEncoder::PngEncoder()
next_seq_num = 0;
trnssize = 0;
palsize = 0;
+ m_compression_level = Z_BEST_SPEED;
+ m_compression_stra... | I still think this is an error: a 1-frame APNG is not the same as a PNG. The spec allows for 1 frame APNG: "1 is a valid value for a single-frame APNG.", cf https://wiki.mozilla.org/APNG_Specification |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -814,6 +814,10 @@ PngEncoder::PngEncoder()
next_seq_num = 0;
trnssize = 0;
palsize = 0;
+ m_compression_level = Z_BEST_SPEED;
+ m_compression_stra... | Well, that is a bug in itself. Sure, usually, when you ask for a 1-frame APNG, the user probably wants a PNG but OpenCV should not be the one to decide. |
You are an expert OpenCV code reviewer specializing in performance optimization. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -814,6 +814,10 @@ PngEncoder::PngEncoder()
next_seq_num = 0;
trnssize = 0;
palsize = 0;
+ m_compression_level = Z_BEST_SPEED;
+ m_compression_stra... | It breaks `compression_level = Z_BEST_SPEED;` in constructor. |
You are an expert OpenCV code reviewer specializing in performance optimization. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -814,6 +814,10 @@ PngEncoder::PngEncoder()
next_seq_num = 0;
trnssize = 0;
palsize = 0;
+ m_compression_level = Z_BEST_SPEED;
+ m_compression_stra... | Why not just set Z_BEST_SPEED in constructor and remove the line here? |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/src/grfmt_png.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -814,6 +814,10 @@ PngEncoder::PngEncoder()
next_seq_num = 0;
trnssize = 0;
palsize = 0;
+ m_compression_level = Z_BEST_SPEED;
+ m_compression_stra... | then https://github.com/opencv/opencv/blob/4.x/modules/imgcodecs/src/grfmt_png.cpp#L910-L920 will be meaningless without `compression_level = -1;` let me look later with a fresh mind |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/perf/perf_png.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -11,7 +11,10 @@ namespace opencv_test
using namespace perf;
-typedef perf::TestBaseWithParam<std::string> PNG;
+CV_ENUM(PNGStrategy, IMWRITE_PNG_STRATEGY_DEFAULT,... | Please use CV_ENUM instead of int like here: https://github.com/opencv/opencv/blob/d32d4da9a39ce92bdc5603749ea6f2d90215f4ea/modules/imgproc/test/test_templmatch.cpp#L306 GTest prints enum names instead of magic integer values. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/perf/perf_png.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -11,7 +11,10 @@ namespace opencv_test
using namespace perf;
-typedef perf::TestBaseWithParam<std::string> PNG;
+CV_ENUM(PNGStrategy, IMWRITE_PNG_STRATEGY_DEFAULT,... | Why is it disabled? |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
IMWRITE_PNG_COMPRESSION = 16, //!< For PNG, it can be the compression level from 0 to 9. A higher value mean... | What is difference between IMWRITE_PNG_NO_FILTERS and IMWRITE_PNG_FILTER_NONE? Why do we need both? |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Review Line:** 99
**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
IMWRITE_PNG_COMPRESSION = 16, //!< For PNG, it can be the compression level from 0 to 9.... | Are there any changes against 4.11 (APNG support) and 4.10 (old style PNG)? |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Review Line:** 99
**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
IMWRITE_PNG_COMPRESSION = 16, //!< For PNG, it can be the compression level from 0 to 9.... | It'll be great to add some accuracy test for the new option. You can, for example, compare file sizes or byte array sizes to ensure the compression applied properly. |
You are an expert OpenCV code reviewer specializing in testing and validation. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Review Line:** 99
**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
IMWRITE_PNG_COMPRESSION = 16, //!< For PNG, it can be the compression level from 0 to 9.... | > It'll be great to add some accuracy test for the new option. You can, for example, compare file sizes or byte array sizes to ensure the compression applied properly. as far as i tested file sizes are various according used zlib or zlib-ng ( maybe also used versions creates different sizes) |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Review Line:** 99
**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
IMWRITE_PNG_COMPRESSION = 16, //!< For PNG, it can be the compression level from 0 to 9.... | Let's compare fast/best compression to ensure best is smaller the fast, for example. |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
IMWRITE_PNG_COMPRESSION = 16, //!< For PNG, it can be the compression level from 0 to 9. A higher value mean... | they produces different sized outputs |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Review Line:** 99
**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
IMWRITE_PNG_COMPRESSION = 16, //!< For PNG, it can be the compression level from 0 to 9.... | > Are there any changes against 4.11 (APNG support) and 4.10 (old style PNG)? default values are same as 4.10 |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/perf/perf_png.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -11,7 +11,10 @@ namespace opencv_test
using namespace perf;
-typedef perf::TestBaseWithParam<std::string> PNG;
+CV_ENUM(PNGStrategy, IMWRITE_PNG_STRATEGY_DEFAULT,... | when a common user run it takes so long time ( --perf_force_samples default value is 100 ) |
You are an expert OpenCV code reviewer specializing in header file design and interface. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -96,6 +96,7 @@ enum ImwriteFlags {
IMWRITE_PNG_COMPRESSION = 16, //!< For PNG, it can be the compression level from 0 to 9. A higher value mean... | IMWRITE_PNG_NO_FILTERS removed. with libpng IMWRITE_PNG_NO_FILTERS and IMWRITE_PNG_ALL_FILTERS gives same results. with libspng IMWRITE_PNG_NO_FILTERS and IMWRITE_PNG_FILTER_NONE gives same results. |
You are an expert OpenCV code reviewer specializing in implementation quality. Review the provided code changes and provide specific, actionable feedback. | **File:** modules/imgcodecs/src/grfmt_spng.cpp
**Change Type:** modified
**Context:** PR #26849: APNG encoding optimization
**Code Changes:**
```diff
@@ -535,9 +535,12 @@ bool SPngEncoder::write(const Mat &img, const std::vector<int> ¶ms)
struct spng_ihdr ihdr = {};
ihdr.height = height;
... | those two should not be outside `if (ctx)` below right? I guess they should be kept right after `ihdr.width = width;` no ? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.