sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: convexityDefects result is located on the hull but has a large depth
Labels: bug,auto-transferred,priority: normal,category: imgproc,category: video,affected: 3.4

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

```
|| Christoph Pacher on 2015-03-17 16:48
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: imgproc, video
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x86 / Windows
```
## convexityDefects result is located on the hull but has a large depth

```
Hi, 

Over here:
http://answers.opencv.org/question/57454/convexitydefects-computes-wrong-result/

I posted my experience with wrong results from convexityDefects along some sample code.
I get wrong results with the hull ordered cw or ccw, so I am not sure if this is connect to Bugfix #3545. 

Is this a bug? 

Thanks
Christoph
```
## History
##### Vadim Pisarevsky on 2015-04-27 12:41

```
-   Category set to imgproc, video
```
Repository: opencv
Issue: Hot colormap does not match Octave/Matlab
Labels: bug,auto-transferred,category: imgproc,category: video,priority: low,affected: 3.4

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

```
|| Christopher Boyd on 2015-03-26 01:06
|| Priority: Low
|| Affected: branch 'master' (3.0-dev)
|| Category: imgproc, video
|| Tracker: Bug
|| Difficulty: Easy
|| PR: 
|| Platform: Any / Any
```
## Hot colormap does not match Octave/Matlab

```
Octave updated the Hot colormap to match Matlab back in 2013.

I noticed this on Android with OCV 2.4.10, but confirmed that the issue exists in the master branch as well.

Octave moved the transition points from 2/5 and 4/5 to 3/8 and 6/8, respectively.
My Android code to replicate these colormaps with a LinearGradient:
// New octave:
return getDrawable(new int[] {0xFF000000, 0xFFFF0000, 0xFFFFFF00, 0xFFFFFFFF}, new float[] {0f, 3/8f, 6/8f, 1f});
// Current OCV:
return getDrawable(new int[] {0xFF000000, 0xFFFF0000, 0xFFFFFF00, 0xFFFFFFFF}, new float[] {0f, 2/5f, 4/5f, 1f});

Moreover, the current colormaps seem to simply be hard-coded values rather than functions.
Is there a reason for that?
```
## History
##### Christopher Boyd on 2015-03-26 01:12

```
Octave change log:
http://hg.savannah.gnu.org/hgweb/octave/rev/6964e6b92fc1
```
##### Vadim Pisarevsky on 2015-04-27 11:22

```
-   Category set to imgproc, video
```
Repository: opencv
Issue: getTextSize return incorrect value
Labels: bug,auto-transferred,category: imgproc,category: video,priority: low,affected: 2.4

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

```
|| philippe pichard on 2015-04-01 20:21
|| Priority: Low
|| Affected: branch '2.4' (2.4-dev)
|| Category: imgproc, video
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Linux
```
## getTextSize return incorrect value

```
With the code sample of Bug #321.

In this example text goes out of left, top and bottom borders. (tested with v2.4.11)

Text = Some bugs left ! {:[)
FontFace = 6
FontScale = 3
Thickness = 3
Baseline = 28
```
## History
##### philippe pichard on 2015-04-01 20:22

```
Previous bug was #3217
```
##### Vadim Pisarevsky on 2015-04-27 11:20

```
-   Priority changed from Normal to Low
-   Category set to imgproc, video
```
Repository: opencv
Issue: VideoReader_GPU read ending before video complete
Labels: bug,auto-transferred,priority: normal,affected: 2.4,category: gpu/cuda (contrib)

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

```
|| Anthony Trujillo on 2015-04-07 17:50
|| Priority: Normal
|| Affected: 2.4.9 (latest release)
|| Category: gpu (cuda)
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Windows
```
## VideoReader_GPU read ending before video complete

```
Hello,

I am using opencv 2.4.9 in windows x64  and for some odd reason ,the read function in the gpu::VideoReader_GPU class is returning before the video is complete. I verified by a frame count i created on the video. Also, i tested with multiple .avi files with the same result on each. What is interesting is there is no error on the return.  I was wondering if this had been fixed in 2.4.10.  Below is the call stack. 

>   opencv_gpu249d.dll!cv::gpu::VideoReader_GPU::Impl::grab(cv::gpu::GpuMat & frame)  Line 225  C++
    opencv_gpu249d.dll!cv::gpu::VideoReader_GPU::read(cv::gpu::GpuMat & image)  Line 352 + 0x17 bytes   C++
```
## History
##### Vadim Pisarevsky on 2015-04-27 11:18

```
-   Category set to gpu (cuda)
```
Repository: opencv
Issue: add a way to compile opencv_contrib from an installed OpenCV
Labels: auto-transferred,priority: normal,feature,category: build/install,RFC

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

```
|| Vincent Rabaud on 2015-04-15 05:27
|| Priority: Normal
|| Affected: None
|| Category: build/install
|| Tracker: Feature
|| Difficulty: 
|| PR: 
|| Platform: None / None
```
## add a way to compile opencv_contrib from an installed OpenCV

```
opencv_contrib can be built in the same build space as OpenCV but only in that case.
Now, this is not convenient for package maintainers (me :) ): usually, a repository gives birth to one or several packages. Here, we want two repos to give one package.
Do you think there could be a way to install the proper OpenCV macros in the main OpenCV repo so that we can build opencv_contrib independently ? Thx
```
## History
Repository: opencv
Issue: Documentation issue (OpenCV on Eclipse)
Labels: bug,auto-transferred,priority: normal,category: documentation,affected: 2.4

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

```
|| Patrice Gagnon on 2015-04-22 20:13
|| Priority: Normal
|| Affected: branch '2.4' (2.4-dev)
|| Category: documentation
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Mac OSX
```
## Documentation issue (OpenCV on Eclipse)

```
Hi,

I just got source code according to this:

http://docs.opencv.org/doc/tutorials/introduction/desktop_java/java_dev_intro.html

As of this writing, git checkout 2.4 appears to be 2.4.11. It builds fine on OSX, Thank you.

In the following document: 

http://docs.opencv.org/doc/tutorials/introduction/java_eclipse/java_eclipse.html#java-eclipse

I can read:  "Select External Folder... and browse to select the folder C:\OpenCV-2.4.6\build\java\x64. If you have a 32-bit system you need to select the x86 folder instead of x64."

My opencv/build directory doesn't contain a java sub-directory. The native library must be generated somewhere else, at least on Mac.

Please let me know where I can find the native libs!

Thanks.
```
## History
##### Vadim Pisarevsky on 2015-04-27 11:10

```
-   Category set to documentation
```
Repository: opencv
Issue: Does cvtColor handle non-linearities in the sRGB color space?
Labels: auto-transferred,priority: normal,feature,category: imgproc,category: video

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

```
|| Ying Xiong on 2015-04-24 15:45
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty: 
|| PR: 
|| Platform: None / None
```
## Does cvtColor handle non-linearities in the sRGB color space?

```
I am wondering whether OpenCV has functions to handle the non-linearities in the sRGB color space.

Say I want to convert an JPEG image from sRGB color space into XYZ color space. As specified in this [Wiki page](https://en.wikipedia.org/wiki/SRGB#Specification_of_the_transformation), one needs to first undo the nonlinearities to convert to linear RGB space, and then multiply with the 3x3 color transform matrix. However, I couldn't find any such discussions in the [cvtColor](http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html#cvtcolor) documentation. Did I miss something?

Thanks a lot in advance!
```
## History
##### Vadim Pisarevsky on 2015-05-25 11:14

```
-   Category set to imgproc, video
```
Repository: opencv
Issue: Move cvSnakeImage to the 3.0 Release of OpenCV
Labels: auto-transferred,priority: normal,feature,category: imgproc,category: video

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

```
|| Alex Rothberg on 2015-05-07 07:07
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty: 
|| PR: 
|| Platform: None / None
```
## Move cvSnakeImage to the 3.0 Release of OpenCV

```
There was a PR with some sample code: https://github.com/Itseez/opencv/pull/3737
A blog demoing how to use the old cvSnakeImage function: http://eric-yuan.me/active-contour-snakes/
```
## History
##### Vadim Pisarevsky on 2015-05-25 11:15

```
-   Category set to imgproc, video
```
Repository: opencv
Issue: Some Matlab bindings are not built
Labels: bug,auto-transferred,priority: normal,affected: 3.4,category: matlab bindings

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

```
|| Alex Levinshtein on 2015-05-07 19:36
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: matlab bindings
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Windows
```
## Some Matlab bindings are not built

```
I have noticed that after building Matlab bindings for OpenCV, mex files are generated and then compiled from the following directory: opencv\build\modules\matlab\src .
However, there is a subdirectory called "private" in that folder (i.e., opencv\build\modules\matlab\src\private) which contains many useful bindings such as the FAST corner detector. These mex files are not compiled, when I build OpenCV. When I tried to manually move them from opencv\build\modules\matlab\src\private to opencv\build\modules\matlab\src, they started to compile but there are compilation errors. Any idea on how to compile these files, or are they in a "private" folder because they are still buggy and not ready?
```
## History
Repository: opencv
Issue: VideoCapture leaking handles
Labels: bug,auto-transferred,priority: normal,category: videoio(camera),affected: 3.4

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

```
|| Jim Curry on 2015-05-09 17:17
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: highgui-camera
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Windows
```
## VideoCapture leaking handles

```
I am using OpenCV VideoCapture on Win 7-64 with Python 2.7.9 to capture images from several webcams. The code works but leaks handles severely. I have reduced the code to the snippet below and still see the leak. I have tried OpenCV versions 2.4.10 and 3.0.0rc1 and a version from about a year ago. This was originally asked at http://answers.opencv.org/ and I was advised to bring it here. Any ideas on how to correct this would be appreciated. Thanks.

<pre>
import cv2
def webcam():
    n=0
    while n<4:
        cap=cv2.VideoCapture(n)
        cap.release()
        cv2.waitKey(1)
        n=n+1
while True:
    webcam()
</pre>
```
## History
##### Vadim Pisarevsky on 2015-05-14 18:35

```
Since you have the hardware configuration where you can reproduce the problem and we don't, I wonder if the problem exists in C++ version as well. I mean, we need to figure out whether it's highgui or python bindings problem
-   Category set to highgui-camera
```
##### Jim Curry on 2015-05-16 14:38

```
The issue does exist in C++ using both 2.4.10 and 3.0.0rc1.
```
##### Jim Curry on 2015-06-04 23:34

```
This issue is now confirmed in 2.4.11 and 3.0.0.
```
Repository: opencv
Issue: Build error with mingw32 when TBB is enabled: MonitorFromRect not declared
Labels: bug,auto-transferred,priority: low,category: build/install,affected: 3.4

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

```
|| Miguel Munoz on 2015-05-20 22:09
|| Priority: Low
|| Affected: branch 'master' (3.0-dev)
|| Category: build/install
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x86 / Windows
```
## Build error with mingw32 when TBB is enabled: MonitorFromRect not declared

```
Building OpenCV in Windows using mingw32 fails in file modules/highgui/src/window_w32.cpp when TBB is used. A possible fix is provided in a attached file.

The error message is:
error: 'MonitorFromRect' was not declared in this scope

Configuration details:
- OpenCV 3.0 RC1
- Windows 8.1
- TDM-GCC-32 with GCC 4.9.2, also tested with MinGW with GCC 4.8.1 (same problem)
- TBB version 4.3_20150424oss, compiled from sources with same GCC

The problem doesn't appear with TDM-GCC-64.

The problem seems to be caused by the TBB includes indirectly defining _WIN32_WINNT to 0x0400 (maybe by including windows.h?).

The problem seems to be fixed if in the file highgui/src/precomp.hpp the _WIN32_WINNT check and the include of windows.h before the includes from opencv_core (in particular private.hpp, which in turn includes TBB).

See attached file.

Possibly related issues and posts:
http://answers.opencv.org/question/30589/with_win32ui-errors-compiling-opencv-248-with-mingw/
http://answers.opencv.org/question/54152/with_win32ui-with_tbb-errors-compiling-opencv-2410-with-mingw/
http://answers.opencv.org/question/29666/opencv-monitorfromrect-was-not-declared-in-this-scope/
http://stackoverflow.com/questions/21103042/error-while-building-opencv-monitorfromrect-was-not-declared-in-this-scope
```
## History
##### Vadim Pisarevsky on 2015-05-21 19:28

```
thanks for the report! We do not support MinGW anymore, thus I lower the bug priority. You are welcome to submit the patch though as described here:
http://code.opencv.org/projects/opencv/wiki/How_to_contribute
-   Priority changed from Normal to Low
-   Category set to build/install
```
Repository: opencv
Issue: cv2.dft output changes between loop iterations for the same input array in complex output mode
Labels: bug,auto-transferred,priority: normal,category: python bindings,affected: 2.4

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

```
|| Roger Olivé on 2015-05-27 20:48
|| Priority: Normal
|| Affected: 2.4.9 (latest release)
|| Category: python bindings
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / Any
```
## cv2.dft output changes between loop iterations for the same input array in complex output mode

```
I posted a question in OpenCV answers because I've been getting +changing outputs+ for DFT operations in Python over +the same input array+ under very specific conditions:

http://answers.opencv.org/question/62514/strange-output-when-using-cv2dft-inside-loops/

After some research, it seems to be a bug that appears when using cv2.dft under the following conditions:
* Calling cv2.dft to convert at least two different random arrays inside a loop. (haven't tried with more)
* One of the converted arrays is real and the other complex.
* flags=cv2.DFT_COMPLEX_OUTPUT specified at least for the DFT of the real input.
* The array returned by the second DFT is NOT explicitly assigned to a variable name.
* The problem doesn't seem to appear in C++. Looks specific to the Python bindings.

I only tried it on Linux x86_64 but I have a feeling this is not something HW and/or OS specific.

Compact code to reproduce the issue (courtesy of mshabunin from OpenCV answers):

<pre>
import cv2
import numpy as np

A = np.random.rand(16384)
X = np.random.rand(2, 16384)

for i in range (0,5):
    Am = cv2.dft(A, flags=cv2.DFT_COMPLEX_OUTPUT)
    print("DFT min: %f" % np.min(Am))
    cv2.dft(X)
</pre>
```
## History
Repository: opencv
Issue: OpenCV-Java crashes JVM when calling Core.kmeans with NaN element
Labels: bug,auto-transferred,priority: normal,affected: 2.4,category: java bindings

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

```
|| Hendy Irawan on 2015-06-01 09:55
|| Priority: Normal
|| Affected: 2.4.9 (latest release)
|| Category: java bindings
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Linux
```
## OpenCV-Java crashes JVM when calling Core.kmeans with NaN element

```
If any input to kmeans() contains NaN element, the JVM will crash immediately (see attachment).

Although NaN is invalid input, it should throw a Java Exception with appropriate error message, even more helpful if showing the coordinate of the affected element.

Affects both 2.4.8 and 2.4.11.

Adding -Xcheck:jni to JVM arguments doesn't help.
```
## History
Repository: opencv
Issue: opencv_contrib_world build fails
Labels: bug,auto-transferred,priority: normal,category: build/install,affected: 3.4

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

```
|| Dmitry Budnikov on 2015-06-08 16:45
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: None
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Windows
```
## opencv_contrib_world build fails

```
I'm trying to build OpenCV library together with opencv_contrib_world module. Cmake generates opencv_contrib_world project with multiple Object Libraries representing contrib modules source files. Linker generates following errors: 

Error      1             error LNK1181: cannot open input file '...\modules\bgsegm\opencv_bgsegm_object.dir\Release\bgfg_gaussmix.obj'                ...\modules\contrib_world\LINK        opencv_contrib_world

Actually missed objects exist in the following folder:
'...\modules\bgsegm\opencv_bgsegm.dir\Release\bgfg_gaussmix.obj'

I switched off BG segmentation module and obtained similar errors for object files from other contrib modules.
```
## History
Repository: opencv
Issue: Core.multiply crashes JVM
Labels: bug,auto-transferred,category: core,affected: 3.4

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

```
|| razvan chisu on 2015-06-09 15:26
|| Priority: High
|| Affected: branch 'master' (3.0-dev)
|| Category: core
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Mac OSX
```
## Core.multiply crashes JVM

```
Core.multiply(Mat, Scalar, Mat) crashes the Java VM under Mac OS X, using Java 1.8.0_45 under Mac OS 10.10.3
(It does work under Windows 7 x64 with the same JVM version)

Same goes for Core.add(Mat, Scalar, Mat) and Core.divide(Mat, Scalar, Mat), but Core.substract(Mat, Scalar, Mat) works fine.

Core.multiply(Mat, Mat, Mat) works fine, too.
```
## History
Repository: opencv
Issue: “R6025 pure virtual function call” with the pre-built staticlib and demo code bg_sub.cpp
Labels: bug,auto-transferred,category: samples,affected: 3.4

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

```
|| Chen ZHANG on 2015-06-12 16:33
|| Priority: High
|| Affected: branch 'master' (3.0-dev)
|| Category: None
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x86 / Windows
```
## “R6025 pure virtual function call” with the pre-built staticlib and demo code bg_sub.cpp

```
I've asked the question on StackOverflow.com:
http://stackoverflow.com/questions/30807850/opencv3-0-0-backgroundsubtractorapply-leads-to-r6025-pure-virtual-function-ca

I'm running the "BackgroundSubtractor demo":https://github.com/Itseez/opencv/blob/master/samples/cpp/tutorial_code/video/bg_sub.cpp in opencv3.0-gold-release with vs2013, while the following error occurs when exiting the program: 
!http://i.stack.imgur.com/iCHA3.png!

I was using the *staticlib*, and I find the error gone when I change my linking library to the *dynamic* version, so it seems that something is wrong with the *staticlib*, I'm not sure how to track & debug the error, hope someone could point it out and better to fix it ;)
```
## History
Repository: opencv
Issue: OpenCL-related warning when OpenCL is disabled
Labels: bug,auto-transferred,priority: normal,affected: 3.4,category: t-api

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

```
|| Andreas Unterweger on 2015-06-15 09:18
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: None
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Other
```
## OpenCL-related warning when OpenCL is disabled

```
Building a static version of OpenCV 3.0 on Ubuntu 14.04 with OpenCL disabled

<pre>
cmake -D WITH_OPENCL=OFF -D BUILD_SHARED_LIBS=OFF
</pre>

yields the following message when linking against the compiled version of OpenCV (path redacted):

<pre>
[Redacted]/lib/libopencv_core.a(ocl.cpp.o): In function `initOpenCLAndLoad': ocl.cpp:(.text.initOpenCLAndLoad+0x2b): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
</pre>

Why is there OpenCL-invoking code in the compiled library? Is WITH_OPENCL=OFF not enough or is this a bug?
```
## History
##### Alexander Alekhin on 2015-06-15 09:31

```
Hi, I believe this patch should resolve this issue: https://github.com/Itseez/opencv/pull/4102

But main reason of this warning is in linker flags of the final application or OpenCV build used with this app.
More info about this warning can be found here: http://stackoverflow.com/questions/2725255/create-statically-linked-binary-that-uses-getaddrinfo
```
##### Andreas Unterweger on 2015-06-15 09:36

```
Alexander Alekhin wrote:
> Hi, I believe this patch should resolve this issue: https://github.com/Itseez/opencv/pull/4102

Thanks, I'm looking forward to the next release including this patch.
```
Repository: opencv
Issue: Missing symbols for cv::rectangle with two points, works fine when using a rect
Labels: bug,auto-transferred,priority: normal,category: samples,affected: 3.4

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

```
|| Marco Marchesi on 2015-06-16 14:57
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: samples
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Mac OSX
```
## Missing symbols for cv::rectangle with two points, works fine when using a rect

```
Hi, testing "kalman.cpp" sample with Xcode I get the following missing symbols:
Undefined symbols for architecture x86_64:
"cv::_InputArray::getMatVector(std::__1::vector<cv::Mat, std::__1::allocator<cv::Mat> >&) const", referenced from:
vtable for cv::_InputOutputArray in example.cpp.o
"cv::_InputArray::getUMatVector(std::__1::vector<cv::UMat, std::__1::allocator<cv::UMat> >&) const", referenced from:
vtable for cv::_InputOutputArray in example.cpp.o
ld: symbol(s) not found for architecture x86_64

It looks related to the issue closed in the topic: "Missing symbols for cv::rectangle with two points, works fine when using a rect" that claimed that CUDA 7.0 and libc++ solved the problem.
I have built OpenCV 3.0 with CUDA 7.0 and default compiler (Mac OS X 10.10). Why does the issue still appear?
Thanks
Marco
```
## History