nareshmlx/opencv-pr huggingface dataset:
**File:** modules/bioinspired/include/opencv2/bioinspired/retina.hpp
**Change Type:** renamed
**Context:** PR #984: Retina move to a new module : bioinspired - Creating a new module (following discussion with Vadim). => new module : bioinspired. the aim is ...

**Code Changes:**
```diff
@@ -6,12 +6,12 @@
  ** copy or use the software.
  **
  **
- ** HVStools : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
+ ** bioinspired : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
  ** Use: extract still images & image sequences features, from contours details to motion spatio-temporal features, etc. for high level visual scene analysis. Also contribute to image enhancement/compression such as tone mapping.
  **
  ** Maintainers : Listic lab (code author current affiliation & applications) and Gipsa Lab (original research origins & applications)
  **
```

Review comment:
Actually, i was thinking that not only my code should appear in this module. For example, there are functions in contrib module that are biologically inspired (log polar transformations as far as i remember), then they could be moved in the new module if appropriate. Then, using my own namespace would allow me to use my own methods/objects while being in a more open module. Additionally, my initial licence talked about the namespace hvstools that was removed from code later, then, on this particular point, it was recovering some correlation. But if i change namespace, can i change all licence text in all files ? is it allowed from a licencing point of view ? ==> Tell me what's better from your point of view. I agree that from a user point of view a namespace matching the module name is much better... but what is the impact on the licence, can we adjust it ?
**File:** modules/bioinspired/include/opencv2/bioinspired/retina.hpp
**Change Type:** renamed
**Context:** PR #984: Retina move to a new module : bioinspired - Creating a new module (following discussion with Vadim). => new module : bioinspired. the aim is ...

**Code Changes:**
```diff
@@ -6,12 +6,12 @@
  ** copy or use the software.
  **
  **
- ** HVStools : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
+ ** bioinspired : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
  ** Use: extract still images & image sequences features, from contours details to motion spatio-temporal features, etc. for high level visual scene analysis. Also contribute to image enhancement/compression such as tone mapping.
  **
  ** Maintainers : Listic lab (code author current affiliation & applications) and Gipsa Lab (original research origins & applications)
  **
```

Review comment:
i will test the anonymous way ;o). But, one question, i have constructors that expect these enum as input, then how can i "name" the expected enum parameter ? => example : CV_EXPORTS Ptr<Retina> createRetina(Size inputSize, const bool colorMode, RETINA_COLORSAMPLINGMETHOD colorSamplingMethod=RETINA_COLOR_BAYER, const bool useRetinaLogSampling=false, const double reductionFactor=1.0, const double samplingStrenght=10.0); Should i replace RETINA_COLORSAMPLINGMETHOD by int ?
**File:** modules/bioinspired/include/opencv2/bioinspired/retina.hpp
**Change Type:** renamed
**Context:** PR #984: Retina move to a new module : bioinspired - Creating a new module (following discussion with Vadim). => new module : bioinspired. the aim is ...

**Code Changes:**
```diff
@@ -6,12 +6,12 @@
  ** copy or use the software.
  **
  **
- ** HVStools : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
+ ** bioinspired : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
  ** Use: extract still images & image sequences features, from contours details to motion spatio-temporal features, etc. for high level visual scene analysis. Also contribute to image enhancement/compression such as tone mapping.
  **
  ** Maintainers : Listic lab (code author current affiliation & applications) and Gipsa Lab (original research origins & applications)
  **
```

Review comment:
1. Ok for CV_exports 2-3. yes, actually, it was an internal method some months ago but as i plan to add a new module related to low level saliency areas detection that will use these methods, they have been made public... and i forgot to remove these underscores, that will be corrected.
**File:** modules/bioinspired/include/opencv2/bioinspired/retina.hpp
**Change Type:** renamed
**Context:** PR #984: Retina move to a new module : bioinspired - Creating a new module (following discussion with Vadim). => new module : bioinspired. the aim is ...

**Code Changes:**
```diff
@@ -6,12 +6,12 @@
  ** copy or use the software.
  **
  **
- ** HVStools : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
+ ** bioinspired : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
  ** Use: extract still images & image sequences features, from contours details to motion spatio-temporal features, etc. for high level visual scene analysis. Also contribute to image enhancement/compression such as tone mapping.
  **
  ** Maintainers : Listic lab (code author current affiliation & applications) and Gipsa Lab (original research origins & applications)
  **
```

Review comment:
I think, it's really not changing the license, but updating some details in the license to make it more relevant. It says BSD-compatible and this is the most important (and the only important) thing. Since the module is called bioinspired, I'd choose namespace name similar to it, bioinspired or bio. Now is the perfect time to change it. After 3.0 we can not do that anymore.
**File:** modules/bioinspired/include/opencv2/bioinspired/retina.hpp
**Change Type:** renamed
**Context:** PR #984: Retina move to a new module : bioinspired - Creating a new module (following discussion with Vadim). => new module : bioinspired. the aim is ...

**Code Changes:**
```diff
@@ -6,12 +6,12 @@
  ** copy or use the software.
  **
  **
- ** HVStools : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
+ ** bioinspired : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
  ** Use: extract still images & image sequences features, from contours details to motion spatio-temporal features, etc. for high level visual scene analysis. Also contribute to image enhancement/compression such as tone mapping.
  **
  ** Maintainers : Listic lab (code author current affiliation & applications) and Gipsa Lab (original research origins & applications)
  **
```

Review comment:
Yes, use int. It's probably not as evident, but that's what documentation is used for.
**File:** modules/bioinspired/include/opencv2/bioinspired/retina.hpp
**Change Type:** renamed
**Context:** PR #984: Retina move to a new module : bioinspired - Creating a new module (following discussion with Vadim). => new module : bioinspired. the aim is ...

**Code Changes:**
```diff
@@ -6,12 +6,12 @@
  ** copy or use the software.
  **
  **
- ** HVStools : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
+ ** bioinspired : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
  ** Use: extract still images & image sequences features, from contours details to motion spatio-temporal features, etc. for high level visual scene analysis. Also contribute to image enhancement/compression such as tone mapping.
  **
  ** Maintainers : Listic lab (code author current affiliation & applications) and Gipsa Lab (original research origins & applications)
  **
```

Review comment:
Ok. Actually, for OpenCV 3.0 we still have plans to eliminate STL use in the external headers. So, if possible, I'd still suggest to move the functions to the internal headers and replicate them in the other module if needed. Yes, it's some (little) code duplication, but it will probably make life simpler for us and our users (STL dependency at API level causes some problems on Windows, Android an iOS).
**File:** modules/bioinspired/include/opencv2/bioinspired/retina.hpp
**Change Type:** renamed
**Context:** PR #984: Retina move to a new module : bioinspired - Creating a new module (following discussion with Vadim). => new module : bioinspired. the aim is ...

**Code Changes:**
```diff
@@ -6,12 +6,12 @@
  ** copy or use the software.
  **
  **
- ** HVStools : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
+ ** bioinspired : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
  ** Use: extract still images & image sequences features, from contours details to motion spatio-temporal features, etc. for high level visual scene analysis. Also contribute to image enhancement/compression such as tone mapping.
  **
  ** Maintainers : Listic lab (code author current affiliation & applications) and Gipsa Lab (original research origins & applications)
  **
```

Review comment:
OK, i will change to bioinspired in both licence and namespace. but any people contributing to this module with its own objects can use my code. If the persons needs to encapsulate its own code he will have to create a new namespace i guess ?
**File:** modules/bioinspired/include/opencv2/bioinspired/retina.hpp
**Change Type:** renamed
**Context:** PR #984: Retina move to a new module : bioinspired - Creating a new module (following discussion with Vadim). => new module : bioinspired. the aim is ...

**Code Changes:**
```diff
@@ -6,12 +6,12 @@
  ** copy or use the software.
  **
  **
- ** HVStools : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
+ ** bioinspired : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
  ** Use: extract still images & image sequences features, from contours details to motion spatio-temporal features, etc. for high level visual scene analysis. Also contribute to image enhancement/compression such as tone mapping.
  **
  ** Maintainers : Listic lab (code author current affiliation & applications) and Gipsa Lab (original research origins & applications)
  **
```

Review comment:
That will be done. as you said, documentation is here to help !
**File:** modules/bioinspired/include/opencv2/bioinspired/retina.hpp
**Change Type:** renamed
**Context:** PR #984: Retina move to a new module : bioinspired - Creating a new module (following discussion with Vadim). => new module : bioinspired. the aim is ...

**Code Changes:**
```diff
@@ -6,12 +6,12 @@
  ** copy or use the software.
  **
  **
- ** HVStools : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
+ ** bioinspired : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
  ** Use: extract still images & image sequences features, from contours details to motion spatio-temporal features, etc. for high level visual scene analysis. Also contribute to image enhancement/compression such as tone mapping.
  **
  ** Maintainers : Listic lab (code author current affiliation & applications) and Gipsa Lab (original research origins & applications)
  **
```

Review comment:
I understand, no problem, this will be only small duplicates.
**File:** modules/bioinspired/include/opencv2/bioinspired/retina.hpp
**Change Type:** renamed
**Context:** PR #984: Retina move to a new module : bioinspired - Creating a new module (following discussion with Vadim). => new module : bioinspired. the aim is ...

**Code Changes:**
```diff
@@ -6,12 +6,12 @@
  ** copy or use the software.
  **
  **
- ** HVStools : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
+ ** bioinspired : interfaces allowing OpenCV users to integrate Human Vision System models. Presented models originate from Jeanny Herault's original research and have been reused and adapted by the author&collaborators for computed vision applications since his thesis with Alice Caplier at Gipsa-Lab.
  ** Use: extract still images & image sequences features, from contours details to motion spatio-temporal features, etc. for high level visual scene analysis. Also contribute to image enhancement/compression such as tone mapping.
  **
  ** Maintainers : Listic lab (code author current affiliation & applications) and Gipsa Lab (original research origins & applications)
  **
```

Review comment:
I guess no, if the stuff is contributed to your module, it goes into the same namespace (cv::bioinspired)
**File:** modules/highgui/src/cap.cpp
**Change Type:** modified
**Context:** PR #2397: Implementation of work with Intel PerC camera in new schema of the VideoCapture. - Remove implementation of CvCapture interface for Intel Pe...

**Code Changes:**
```diff
@@ -40,6 +40,7 @@
 //M*/
 
 #include "precomp.hpp"
+#include "cap_intelperc.hpp"
 
 #if defined _M_X64 && defined _MSC_VER && !defined CV_ICC
 #pragma optimize("",off)
@@ -345,14 +346,6 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
                 return capture;
```

Review comment:
Haven't looked at the rest of the PR, but the default `DefaultDeleter` already looks like this, so this definition is not required.
**File:** modules/highgui/include/opencv2/highgui.hpp
**Change Type:** modified
**Context:** PR #2397: Implementation of work with Intel PerC camera in new schema of the VideoCapture. - Remove implementation of CvCapture interface for Intel Pe...

**Code Changes:**
```diff
@@ -530,6 +530,8 @@ enum { CAP_INTELPERC_DEPTH_MAP              = 0, // Each pixel is a 16-bit integ
        CAP_INTELPERC_IMAGE                  = 3
      };
 
+
+class IVideoCapture;
 class CV_EXPORTS_W VideoCapture
 {
 public:
@@ -554,9 +556,11 @@ class CV_EXPORTS_W VideoCapture
```

Review comment:
Do we really need this as a public interface?
**File:** modules/highgui/include/opencv2/highgui.hpp
**Change Type:** modified
**Context:** PR #2397: Implementation of work with Intel PerC camera in new schema of the VideoCapture. - Remove implementation of CvCapture interface for Intel Pe...

**Code Changes:**
```diff
@@ -530,6 +530,8 @@ enum { CAP_INTELPERC_DEPTH_MAP              = 0, // Each pixel is a 16-bit integ
        CAP_INTELPERC_IMAGE                  = 3
      };
 
+
+class IVideoCapture;
 class CV_EXPORTS_W VideoCapture
 {
 public:
@@ -554,9 +556,11 @@ class CV_EXPORTS_W VideoCapture
```

Review comment:
Wouldn't pure virtuals be more appropriate here?
**File:** modules/highgui/include/opencv2/highgui.hpp
**Change Type:** modified
**Context:** PR #2397: Implementation of work with Intel PerC camera in new schema of the VideoCapture. - Remove implementation of CvCapture interface for Intel Pe...

**Code Changes:**
```diff
@@ -530,6 +530,8 @@ enum { CAP_INTELPERC_DEPTH_MAP              = 0, // Each pixel is a 16-bit integ
        CAP_INTELPERC_IMAGE                  = 3
      };
 
+
+class IVideoCapture;
 class CV_EXPORTS_W VideoCapture
 {
 public:
@@ -554,9 +556,11 @@ class CV_EXPORTS_W VideoCapture
```

Review comment:
I think pure virtual will be better. But i create them same as in the CvCapture. May be in some case we don't really need to override some methods?
**File:** modules/highgui/include/opencv2/highgui.hpp
**Change Type:** modified
**Context:** PR #2397: Implementation of work with Intel PerC camera in new schema of the VideoCapture. - Remove implementation of CvCapture interface for Intel Pe...

**Code Changes:**
```diff
@@ -530,6 +530,8 @@ enum { CAP_INTELPERC_DEPTH_MAP              = 0, // Each pixel is a 16-bit integ
        CAP_INTELPERC_IMAGE                  = 3
      };
 
+
+class IVideoCapture;
 class CV_EXPORTS_W VideoCapture
 {
 public:
@@ -554,9 +556,11 @@ class CV_EXPORTS_W VideoCapture
```

Review comment:
For some methods a default implementation might be appropriate, but surely not things like `grabFrame` and `getCaptureDomain`?
**File:** modules/highgui/include/opencv2/highgui.hpp
**Change Type:** modified
**Context:** PR #2397: Implementation of work with Intel PerC camera in new schema of the VideoCapture. - Remove implementation of CvCapture interface for Intel Pe...

**Code Changes:**
```diff
@@ -530,6 +530,8 @@ enum { CAP_INTELPERC_DEPTH_MAP              = 0, // Each pixel is a 16-bit integ
        CAP_INTELPERC_IMAGE                  = 3
      };
 
+
+class IVideoCapture;
 class CV_EXPORTS_W VideoCapture
 {
 public:
@@ -554,9 +556,11 @@ class CV_EXPORTS_W VideoCapture
```

Review comment:
No we don't. Is it good solution to move this declaration into precomp.hpp?
**File:** modules/highgui/include/opencv2/highgui.hpp
**Change Type:** modified
**Context:** PR #2397: Implementation of work with Intel PerC camera in new schema of the VideoCapture. - Remove implementation of CvCapture interface for Intel Pe...

**Code Changes:**
```diff
@@ -530,6 +530,8 @@ enum { CAP_INTELPERC_DEPTH_MAP              = 0, // Each pixel is a 16-bit integ
        CAP_INTELPERC_IMAGE                  = 3
      };
 
+
+class IVideoCapture;
 class CV_EXPORTS_W VideoCapture
 {
 public:
@@ -554,9 +556,11 @@ class CV_EXPORTS_W VideoCapture
```

Review comment:
Sounds good to me.
**File:** modules/core/src/dxt.cpp
**Change Type:** modified
**Context:** PR #2634: IPP: cv::dct - **merge with Itseez/opencv_extra#174** check_regression=_dct_ test_modules=core build_examples=OFF

**Code Changes:**
```diff
@@ -2880,6 +2880,131 @@ static void IDCT_64f(const double* src, int src_step, double* dft_src, double* d
 
 }
 
+namespace cv
+{
+#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
+
+typedef IppStatus (CV_STDCALL * ippiDCTFunc)(const Ipp32f*, int, Ipp32f*, int, const void*, Ipp8u*);
+typedef IppStatus (CV_STDCALL * ippiDCTInitAlloc)(void**, IppiSize, IppHintAlgorithm);
```

Review comment:
can use use cv::AutoBuffer instead of manually allocated buffer? I think, AutoBuffer should be much more efficient
**File:** modules/core/src/dxt.cpp
**Change Type:** modified
**Context:** PR #2634: IPP: cv::dct - **merge with Itseez/opencv_extra#174** check_regression=_dct_ test_modules=core build_examples=OFF

**Code Changes:**
```diff
@@ -2880,6 +2880,131 @@ static void IDCT_64f(const double* src, int src_step, double* dft_src, double* d
 
 }
 
+namespace cv
+{
+#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
+
+typedef IppStatus (CV_STDCALL * ippiDCTFunc)(const Ipp32f*, int, Ipp32f*, int, const void*, Ipp8u*);
+typedef IppStatus (CV_STDCALL * ippiDCTInitAlloc)(void**, IppiSize, IppHintAlgorithm);
```

Review comment:
in the case of 2D DCT this initialization will be repeated for each row and then for each column. Can we move the initialization out of the loop?
**File:** modules/core/src/dxt.cpp
**Change Type:** modified
**Context:** PR #2634: IPP: cv::dct - **merge with Itseez/opencv_extra#174** check_regression=_dct_ test_modules=core build_examples=OFF

**Code Changes:**
```diff
@@ -2880,6 +2880,131 @@ static void IDCT_64f(const double* src, int src_step, double* dft_src, double* d
 
 }
 
+namespace cv
+{
+#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
+
+typedef IppStatus (CV_STDCALL * ippiDCTFunc)(const Ipp32f*, int, Ipp32f*, int, const void*, Ipp8u*);
+typedef IppStatus (CV_STDCALL * ippiDCTInitAlloc)(void**, IppiSize, IppHintAlgorithm);
```

Review comment:
This initialization is out of the loop
**File:** modules/core/src/dxt.cpp
**Change Type:** modified
**Context:** PR #2634: IPP: cv::dct - **merge with Itseez/opencv_extra#174** check_regression=_dct_ test_modules=core build_examples=OFF

**Code Changes:**
```diff
@@ -2880,6 +2880,131 @@ static void IDCT_64f(const double* src, int src_step, double* dft_src, double* d
 
 }
 
+namespace cv
+{
+#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
+
+typedef IppStatus (CV_STDCALL * ippiDCTFunc)(const Ipp32f*, int, Ipp32f*, int, const void*, Ipp8u*);
+typedef IppStatus (CV_STDCALL * ippiDCTInitAlloc)(void**, IppiSize, IppHintAlgorithm);
```

Review comment:
use "return DctIPPLoop(src,dst,IPPDCTFunctor(ippFunc),inv)" instead of the unnecessary if statement.