sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: Face Detection training image problem
Labels: bug,auto-transferred,priority: low,affected: 2.4,category: java bindings

Transferred from http://code.opencv.org/issues/3300

```
|| Naval Kishore Gandhi on 2013-10-03 11:50
|| Priority: Low
|| Affected: 2.4.0 - 2.4.6
|| Category: java bindings
|| Tracker: Bug
|| Difficulty: Medium
|| PR: 
|| Platform: x64 / Windows
```
## Face Detection training image problem

```
The FaceRecognizer class of java have a function named predict which is used to compare the facial image and a set of training images and then it predicts which face is this.

The bug is that the predict methods throws an exception if the training image's width is not a multiple of 8, I tried to get prediction work with training images of 125X150 resolution.

Predict method works if I use LBPH implementation of Facerecognizer, but if i use Fisherman or Eigenface it gave me this exception:-
<pre>
OpenCV Error: Image step is wrong (The matrix is not continuous, thus its number of rows can not be changed) in unknown function, file ..\..\..\src\opencv\modules\core\src\matrix.cpp, line 802
Exception in thread "pool-1-thread-4" java.lang.RuntimeException: ..\..\..\src\opencv\modules\core\src\matrix.cpp:802: error: (-13) The matrix is not continuous, thus its number of rows can not be changed.
</pre>
However, as a suggestion of [[http://code.google.com/p/javacv/issues/detail?id=368]] when I changed the resolution of training images to 128X150. it worked without any exception.
```
## History
##### Anna Kogan on 2013-10-04 07:34

```
Hello Naval,

Thank you for reporting the problem! If you could work on a solution for the issue, a "contribution":[[How_to_contribute]] would be very appreciated!
-   Priority changed from Blocker to Low
-   Description changed from The FaceRecognizer class of java have a
    function named predict which is used ... to The FaceRecognizer class
    of java have a function named predict which is used ... More
```
##### Anna Kogan on 2013-10-04 07:35

```
-   Status changed from New to Open
```
##### Alexander Smorkalov on 2013-11-27 10:48

```
@Andrey Pavlenko, please have a look.
-   Affected version changed from 2.4.6 (latest release) to 2.4.0 -
    2.4.6
```
##### Alexander Smorkalov on 2013-11-28 06:33

```
-   Target version changed from 2.4.7 to 2.4.8
```
##### Alexander Smorkalov on 2013-12-30 10:38

```
-   Target version changed from 2.4.8 to 2.4.9
```
##### Alexander Smorkalov on 2014-04-30 19:05

```
-   Target version changed from 2.4.9 to 2.4.10
```
Repository: opencv
Issue: getAffineTransform(): No error handling with aligned points
Labels: bug,auto-transferred,priority: normal,category: imgproc,category: video,affected: 2.4

Transferred from http://code.opencv.org/issues/3305

```
|| Arnaud Ramey on 2013-10-07 11:59
|| Priority: Normal
|| Affected: 2.4.6 (latest release)
|| Category: imgproc, video
|| Tracker: Bug
|| Difficulty: Medium
|| PR: 
|| Platform: Any / Any
```
## getAffineTransform(): No error handling with aligned points

```
Let A and B be sets of 3 points.
If the points in A or in B are aligned, 
no affine transformation exists that match A to B in most cases.

However, in such a case, @cv::getAffineTransform()@ returns a matrix with no complain
but containing invalid data.
It would be nice to cast an error, or at least to specify the behavior in the documentation.

Minimal example:
<pre>
cv::Point2f A_sample[3];
A_sample[0] = cv::Point2f(8, 9);
A_sample[1] = cv::Point2f(40, 41);
A_sample[2] = cv::Point2f(47, 48);
cv::Point2f B_sample[3];
B_sample[0] = cv::Point2f(7.37465, 11.8295);
B_sample[1] = cv::Point2f(15.0113, 12.8994);
B_sample[2] = cv::Point2f(38.9943, 9.56297);
cv::Mat trans = cv::getAffineTransform(A_sample, B_sample);
std::cout << "trans:" << trans << std::endl;
___________________

Output:
___________________
trans:[-8245045546463036, 8245045546463037, -8245045546463042;
       1319381983356685, -1319381983356685, 1319381983356699]

</pre>
```
## History
##### Kirill Kornyakov on 2013-10-08 07:52

```
Arnaud Ramey, thank you for the report, but it would be great if you could work on a pull request: http://code.opencv.org/projects/opencv/wiki/How_to_contribute. 
-   Difficulty changed from Easy to Medium
-   Operating System changed from Linux to Any
-   HW Platform changed from x86 to Any
-   Target version set to Next Hackathon
-   Description changed from Let A and B be sets of 3 points. If the
    points in A or in B are aligned, no ... to Let A and B be sets of 3
    points. If the points in A or in B are aligned, no ... More
-   Status changed from New to Open
```
Repository: opencv
Issue: CommandLineParser
Labels: bug,auto-transferred,priority: normal,category: core,affected: 2.4

Transferred from http://code.opencv.org/issues/3330

```
|| Ilya Lavrenov on 2013-10-21 11:42
|| Priority: Normal
|| Affected: branch '2.4' (2.4-dev)
|| Category: core
|| Tracker: Bug
|| Difficulty: Medium
|| PR: 
|| Platform: Any / Any
```
## CommandLineParser

```
cv::CommandLineParser gives segmentation fault when:
- we pass arguments like '-', '--', '---' and so on (see https://github.com/Itseez/opencv/pull/1590)
- we pass arguments as --argument_name, but inside the program try to get value like this: 
@parser.get<int>("argument_name");@
```
## History
##### Ilya Lavrenov on 2013-10-21 12:33

```
also, cmd parser fails in constructor with keys 
@"{ h | help    |  | show available options }"@
```
Repository: opencv
Issue: Regarding imshow (OpenCV with OpenGL support)
Labels: bug,auto-transferred,priority: normal,category: highgui-gui,affected: 2.4

Transferred from http://code.opencv.org/issues/3352

```
|| Philipp Werner on 2013-10-30 13:04
|| Priority: Normal
|| Affected: 2.4.6 (latest release)
|| Category: highgui-gui
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Windows
```
## Regarding imshow (OpenCV with OpenGL support)

```
The following code is giving flickering window without displaying any image.

<pre>
Mat img = imread("image.jpg",CV_LOAD_IMAGE_ANYCOLOR);
namedWindow("window", WINDOW_OPENGL);
imshow("window",img);
waitKey(0);
</pre>

and following code is working fine.

<pre>
Mat img = imread("image.jpg",CV_LOAD_IMAGE_ANYCOLOR);
namedWindow("window", WINDOW_AUTOSIZE);
imshow("window",img);
waitKey(0);
</pre>

Further, imshow() has the mentioned faulty behaviour if namedWindow() is not called explicitly and OpenCV has been compiled with OpenGL support.

I already found that adding a call to waitKey() before imshow() solves the problem, probably because it handles messages that need to be handled in between the creation of the window and the displaying of an image. So, this works:

<pre>
Mat img = imread("image.jpg",CV_LOAD_IMAGE_ANYCOLOR);
namedWindow("window", WINDOW_OPENGL);
waitKey(0);
imshow("window",img);
waitKey(0);
</pre>

However, this solution is neither documented nor consistent with OpenCV versions compiled without OpenGL support.

I am using Windows 7 64 bit, OpenCV 2.4.6.0 built with default settings + OpenGL-support. The same behaviour has been reported for OpenCV 2.4.3 with Windows 7 32 bit:
http://answers.opencv.org/question/7916/regarding-imshow-opencv-compiled-with-opengl/
```
## History
##### Dmitry Retinskiy on 2013-11-01 05:44

```
Hi Philipp,

could you try to compile and run .../samples/gpu/opengl.cpp and reply if you observe the same behavior?
```
##### Dinar Ahmatnurov on 2013-11-08 08:26

```
Hi Philipp,
Any updates?
-   Status changed from New to Open
```
Repository: opencv
Issue: Vec Matx like initializers
Labels: auto-transferred,priority: normal,feature,category: core

Transferred from http://code.opencv.org/issues/3380

```
|| José Franco on 2013-11-12 22:59
|| Priority: Normal
|| Affected: None
|| Category: core
|| Tracker: Feature
|| Difficulty: Easy
|| PR: 
|| Platform: None / None
```
## Vec Matx like initializers

```
Hello,

Despite cv::Vec<_Tp, int> being equivalent to cv::Matx<_Tp, int, 1>, it is currently not possible to initialize them with the Matx<_Tp, int, int> initializers cv::Matx<_Tp, int, int>::zeros(), ones(), etc. It is also not clear how to assign a cv::Matx<_Tp, int, 1> to a cv::Vec<_Tp, int>. These initializers would be very helpful.

Thanks
```
## History
##### Ivan Korolev on 2013-11-13 08:38

```
Hi José, 
thanks for feature request.
Yes, actually these initializers would be helpful. Unfortunately, now we have limited human resources. So if you could implement this functionality and send a pull request on GitHub (http://www.code.opencv.org/projects/opencv/wiki/How_to_contribute), it would be much appreciated!

-   Status changed from New to Open
```
##### Rohit Girdhar on 2014-01-29 13:32

```
Hi Ivan,

I'm a student and just getting started with contributing to openCV (though have a lot of experience in using openCV).
I've already forked, cloned, built and played a bit with the source code.
I want to work on this task, and think it'd be better to run my ideas through you before starting to code.

If I understand the question correctly, we essentially want the ::zeros() kind-of initializers for the Vec.
In my understanding, Vec is implemented using Mat in modules/core/include/opencv2/core/matx.hpp (line 869).
So essentially, I need to add another function there for initialization.

Please let me know if I'm on the right track or not. 
I'm really a noob in working on open source, so please forgive me for mistakes.

Thanks a lot!
```
##### Rohit Girdhar on 2014-02-09 12:51

```
PR for ::zeros() initializer (https://github.com/Itseez/opencv/pull/2307)
```
#2307
Repository: opencv
Issue: ByteBuffer support in Java
Labels: auto-transferred,priority: normal,feature,category: java bindings

Transferred from http://code.opencv.org/issues/3405

```
|| Jose Gómez on 2013-11-28 03:02
|| Priority: Normal
|| Affected: None
|| Category: java bindings
|| Tracker: Feature
|| Difficulty: 
|| PR: 
|| Platform: None / None
```
## ByteBuffer support in Java

```
This is a feature request based on Q&A http://answers.opencv.org/question/23752/modifying-pixels-efficiently-in-java/

While in C/C++ one can directly access and modify the data of a Mat, currently, the only way of modifying the pixels in a Mat from Java is either accessing pixel by pixel using Mat.get and Mat.put, or copying the Mat to a temporary array, and after the change, another copy back to the Mat:

> http://answers.opencv.org/question/5/how-to-get-and-modify-the-pixel-of-mat-in-java/

However, this is very inefficient.

The JavaCV wrapper offers the possibility of creating a ByteBuffer pointing to the actual data, thus avoiding copies of data from and to the Mat (IplImage in case of JavaCV):

> http://stackoverflow.com/questions/9920449/converting-opencv-matrix-looping-to-javacv
> http://stackoverflow.com/questions/14877383/iplimage-pixel-access-javacv

Attached a performance using 4 different implementations of the same multi-step algorithm:

* "JavaCV - Gradient": Normal algorithm using the JavaCV wrapper, and accessing the data in the Mats using ByteBuffers
* "OpenCV - Gradientgetput": The same algorithm in the OpenCV wrapper, using Mat.get and Mat.put per each pixel
* "OpenCV - Gradient1array": The same algorithm in the OpenCV wrapper, copying the data from and to a Mat to an array for the most complex step.
* "OpenCV - Gradient": The same algorithm in the OpenCV wrapper, copying the data from and to a Mat to an array for all the steps that require custom proc# essing.

From those tests, we can observe that the most optimised OpenCV version, using arrays, is about 10%-15% slower than the JavaCV version using ByteBuffer. Furthermore, this version gets messy when it is required to mix OpenCV functions (which operate on Mats) and custom functions (which due to the performance has to operate on arrays).
```
## History
##### Nikita Manovich on 2013-12-11 08:33

```
Hi,

Thank you for the feature request. Could you please help us and prepare a pull request for the functionality? It will help us a lot. Here you can find all necessary information: http://www.code.opencv.org/projects/opencv/wiki/How_to_contribute
-   Assignee changed from Andrey Pavlenko to Jose Gómez
-   Status changed from New to Open
```
Repository: opencv
Issue: gpu::buildWarpPerspectiveMaps is not thread safe
Labels: bug,auto-transferred,priority: normal,affected: 2.4,category: gpu/cuda (contrib)

Transferred from http://code.opencv.org/issues/3419

```
|| Todd Pepper on 2013-12-04 00:38
|| Priority: Normal
|| Affected: 2.4.0 - 2.4.6
|| Category: gpu (cuda)
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / Linux
```
## gpu::buildWarpPerspectiveMaps is not thread safe

```
It looks like gpu::buildWarpPerspectiveMaps is not thread safe due to the use of the float array c_warpMat below.  I first noticed this when debugging an issue in porting my tile warping application from CPU to GPU.  The gpu::warpPerspective and gpu::buildWarpPerspectiveMaps calls require mutex locking in order to work properly in a multithreaded application.  It looks like this locking is only required due to the use of the c_warpMat.  This will also affect the Affine transforms.

<pre>

namespace cv { namespace gpu { namespace device
{
    namespace imgproc
    {
        __constant__ float c_warpMat[3 * 3];

        struct AffineTransform
        {
            static __device__ __forceinline__ float2 calcCoord(int x, int y)
            {
                const float xcoo = c_warpMat[0] * x + c_warpMat[1] * y + c_warpMat[2];
                const float ycoo = c_warpMat[3] * x + c_warpMat[4] * y + c_warpMat[5];

                return make_float2(xcoo, ycoo);
            }
        };

</pre>
```
## History
##### Nikita Manovich on 2013-12-11 07:56

```
-   Status changed from New to Open
```
Repository: opencv
Issue: GoodFeaturesToTrackDetector_GPU is ignoring mask when computing threshold
Labels: bug,auto-transferred,priority: normal,affected: 2.4,category: gpu/cuda (contrib)

Transferred from http://code.opencv.org/issues/3425

```
|| Ronald Mallet on 2013-12-07 02:08
|| Priority: Normal
|| Affected: 2.4.7 (latest release)
|| Category: gpu (cuda)
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / Any
```
## GoodFeaturesToTrackDetector_GPU is ignoring mask when computing threshold

```
In cv::gpu::GoodFeaturesToTrackDetector_GPU::operator(), once the corner's score are computed, it needs to find the max value to set the threshold.
However, the mask given as a parameter is not passed to the minMax function (it sends an empty one).
So if there's a maximum score outside the valid mask, that's much higher than anything within the mask, then no corners are returned.
Simple fix is to pass the mask to the minMax function.
```
## History
##### Nikita Manovich on 2013-12-10 09:24

```
Hi,

Thank you for the bug report. Could you please help us to fix the problem and send us a patch for the bug? Please look at the article: http://www.code.opencv.org/projects/opencv/wiki/How_to_contribute
-   Assignee set to Ronald Mallet
-   Status changed from New to Open
```
##### Nikita Manovich on 2013-12-10 11:21

```
-   Category set to gpu (cuda)
```
Repository: opencv
Issue: 2.4.7 for iOS Not Running on iOS 6
Labels: bug,auto-transferred,priority: normal,affected: 2.4,platform: ios/osx

Transferred from http://code.opencv.org/issues/3435

```
|| Kevin Clark on 2013-12-13 20:50
|| Priority: Normal
|| Affected: branch '2.4' (2.4-dev)
|| Category: ios
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / iOS
```
## 2.4.7 for iOS Not Running on iOS 6

```
We have been using a much older version of OpenCV in our iOS app for quite some time with no problems. This older library has worked on iOS4-7. Recently we started integrating the latest openCV (2.4.7) and have found that it no longer runs on iOS 6. We only support iOS6 and 7 now so I can’t speak for earlier version of the iOS. The project builds just fine, but once it starts actually running on the device we get this error:

<pre>
dyld: lazy symbol binding failed: Symbol not found: ___sincos_stret Referenced from: /var/mobile/Applications/E52CFE77-395C-4653-BF70-0A412A734524/MyProject.app/MyProject Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ___sincos_stret Referenced from: /var/mobile/Applications/E52CFE77-395C-4653-BF70-0A412A734524/MyProject.app/MyProject Expected in: /usr/lib/libSystem.B.dylib
</pre>

Again, this is ONLY seen on iOS 6 devices. We've tested on an iPhone 4 and iPhone 5 with the same problem. OpenCV is the only thing we have changed since we started seeing this error so it is localized to OpenCV.
```
## History
##### Alexander Shishkov on 2013-12-17 06:52

```
-   Assignee set to Alexander Shishkov
-   Category set to ios
```
##### Anna Kogan on 2014-01-13 09:15

```
-   Affected version changed from 2.4.7 (latest release) to branch '2.4'
    (2.4-dev)
-   Description changed from We have been using a much older version of
    OpenCV in our iOS app for quite so... to We have been using a much
    older version of OpenCV in our iOS app for quite so... More
```
##### Andrew Senin on 2014-01-21 10:45

```
-   Status changed from New to Open
```
Repository: opencv
Issue: MouseCallback gives unsigned values when mouse is outside the window
Labels: bug,auto-transferred,priority: normal,category: highgui-gui,affected: 2.4

Transferred from http://code.opencv.org/issues/3446

```
|| Adi Shavit on 2013-12-19 08:06
|| Priority: Normal
|| Affected: 2.4.8 (latest release)
|| Category: highgui-gui
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Windows
```
## MouseCallback gives unsigned values when mouse is outside the window

```
When the mouse goes out of the window, e.g. while the button is still pressed, the MouseCallback event is received with the wrong coordinates.
When the mouse is above or to the left of the window, the values x and/or y (which are int) get are the unsigned short casting of the expected negative values.
Casting x/y to short returns the correct negative position.
On Windows x and y are recieved as the low and high words of a single int.
When separating them into 2 separate ints they should be cast to shorts before the assignment to allow for negative values.
See this row "here":http://code.opencv.org/projects/opencv/repository/revisions/master/entry/modules/highgui/src/window_w32.cpp#L1478 .
```
## History
##### Anna Kogan on 2014-01-13 09:19

```
Hello Adi,

Thank you for reporting the problem. If you could find on a solution for the issue, a contribution (see [[How_to_contribute]]) would be very appreciated!
-   Affected version changed from 2.4.0 - 2.4.6 to 2.4.8 (latest
    release)
-   Assignee set to Adi Shavit
```
##### Andrew Senin on 2014-01-26 16:06

```
-   Status changed from New to Open
```
Repository: opencv
Issue: cv::ocl::OclCascadeClassifierBuf throws an exception for some combinations of flags
Labels: bug,auto-transferred,priority: normal,affected: 2.4,category: ocl

Transferred from http://code.opencv.org/issues/3452

```
|| Evgeniy Badaev on 2013-12-23 07:47
|| Priority: Normal
|| Affected: branch '2.4' (2.4-dev)
|| Category: ocl
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / Any
```
## cv::ocl::OclCascadeClassifierBuf throws an exception for some combinations of flags

```
'detectMultiScale' method fails with an exception whenever 'flags' argument contains both 'CV_HAAR_SCALE_IMAGE' and 'CV_HAAR_FIND_BIGGEST_OBJECT'.

Exception originates from the following statement due to an empty 'gimg1':
<pre>
  resizeroi = gimg1(roi2);
</pre>

The issue is caused by an inconsistent 'flags' handling in 'detectMultiScale' and 'Init' methods: 'Init' method strips 'CV_HAAR_SCALE_IMAGE' flags whenever 'CV_HAAR_FIND_BIGGEST_OBJECT' is present, whereas 'detectMultiScale' method contains no such handling for 'flags'.

IMO this could be fixed by moving the following statements away from 'Init' method into 'detectMultiScale' method (right before the call to 'Init'):
<pre>
  findBiggestObject = (flags & CV_HAAR_FIND_BIGGEST_OBJECT) != 0;
  if( findBiggestObject )
      flags &= ~(CV_HAAR_SCALE_IMAGE | CV_HAAR_DO_CANNY_PRUNING);
</pre>
```
## History
##### Evgeniy Badaev on 2013-12-23 08:16

```
An alternative solution would be to replace 'flags' with 'm_flags' in the following statement of 'detectMultiScale' method:
<pre>  if( (flags & CV_HAAR_SCALE_IMAGE) )</pre>
```
##### Evgeny Talanin on 2013-12-27 09:13

```
Thanks, Evgeniy!
Could нou submit a pull request containing your modifications to our github repo as described in http://code.opencv.org/projects/opencv/wiki/How_to_contribute? This will really help since fix will be automatically tested by our build system.
Of course you can also implement a test to prove your suggestion is correct and add it to your pull request as well.
-   Assignee set to Evgeniy Badaev
```
##### Ilya Lavrenov on 2013-12-28 11:18

```
-   Category set to ocl
```
##### Anna Kogan on 2014-01-13 09:23

```
-   Affected version changed from 2.4.7 (latest release) to branch '2.4'
    (2.4-dev)
-   Status changed from New to Open
```
Repository: opencv
Issue: CMake does not correctly find ilmbase.
Labels: bug,auto-transferred,priority: low,category: build/install,affected: 2.4

Transferred from http://code.opencv.org/issues/3456

```
|| Robert Minsk on 2013-12-24 00:07
|| Priority: Low
|| Affected: 2.4.0 - 2.4.7
|| Category: build/install
|| Tracker: Bug
|| Difficulty: Easy
|| PR: 
|| Platform: x86 / Linux
```
## CMake does not correctly find ilmbase.

```
In our facility ilmbase is installed in a separate diectory from openexr.  The file opencv-2.4.7/cmake/OpenCVFindOpenEXR.cmake assumes ilmbase is in the same directory as openexr.  Attached is a patch to fix the cmake file.
```
## History
##### Anna Kogan on 2014-01-13 09:09

```
Hello Robert,

Thank you for reporting the problem and especially for providing the solution for it! 
OpenCV is developed in "GitHub repo":https://github.com/Itseez/opencv, and all the contributions are merged in the library only by making a pull request. Would you mind making one as described on the wiki page: [[How_to_contribute]]? 
-   Affected version changed from 2.4.7 (latest release) to 2.4.0 -
    2.4.7
```
##### Andrew Senin on 2014-01-23 14:15

```
-   Assignee changed from Roman Donchenko to Robert Minsk
-   Status changed from New to Open
```
Repository: opencv
Issue: Type errors in Matlab module's bridge.hpp when compiling without some optional modules (calib3d, etc.)
Labels: bug,auto-transferred,priority: normal,affected: 3.4,category: matlab bindings

Transferred from http://code.opencv.org/issues/3464

```
|| Hilton Bristow on 2013-12-29 14:17
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: matlab bindings
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / Any
```
## Type errors in Matlab module's bridge.hpp when compiling without some optional modules (calib3d, etc.)

```
This issue is for my own records so I can put an issue # next to my pull request when I fix it.
---------------------------------------
When compiling OpenCV without some optional modules (calib3d, etc.) the Matlab bridge fails to find certain includes required for type conversions. Either guard these includes and their corresponding types/conversions, or hard-code paths to all of the top-level module includes.

<pre>
Failed to compile absdiff: In file included from
/Users/hiltonbristow/Code/projects/opencv/build/modules/matlab/src/absdiff.cpp:14:

/Users/hiltonbristow/Code/projects/opencv/modules/matlab/include/opencv2/matlab/bridge.hpp:51:10:
  fatal error: 'opencv2/calib3d.hpp' file not found

  #include <opencv2/calib3d.hpp>

           ^

  1 error generated.
</pre>
```
## History
##### Anna Kogan on 2014-01-13 09:24

```
-   Status changed from New to Open
```