sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: Many type-conversions missing in the Matlab module
Labels: bug,auto-transferred,priority: normal,affected: 3.4,category: matlab bindings

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

```
|| Hilton Bristow on 2013-12-29 14:20
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: matlab bindings
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / Any
```
## Many type-conversions missing in the Matlab module

```
This issue is for my own records so I can put an issue # next to my pull request when I fix it.
---------------------------------------
Many type conversions in the Matlab module are still just stubs, and cause runtime exceptions in OpenCV functions that require them. Implement these, and add newly-introduced types for 3.0
```
## History
##### Anna Kogan on 2014-01-13 09:24

```
-   Status changed from New to Open
```
Repository: opencv
Issue: The orientation  of camera preview is different on IOS6 with IOS7
Labels: bug,auto-transferred,priority: normal,affected: 2.4,platform: ios/osx

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

```
|| Gang Tong on 2014-01-03 02:57
|| Priority: Normal
|| Affected: 2.4.0 - 2.4.7
|| Category: ios
|| Tracker: Bug
|| Difficulty: Easy
|| PR: 
|| Platform: ARM / iOS
```
## The orientation  of camera preview is different on IOS6 with IOS7

```
The default orientation of camera preview on IOS6 is portrait, but is landscape on IOS7.
```
## History
##### Gang Tong on 2014-01-07 04:38

```
-   Assignee set to Vadim Pisarevsky
```
##### Alexander Smorkalov on 2014-01-19 12:13

```
-   Target version set to 2.4.9
-   Category set to ios
```
##### Andrew Senin on 2014-01-20 14:29

```
Hello Gang,

Unfortunately our resources are limited at the moment. Do you think you could work on a solution on your own? Your contribution to the OpenCV repo (see http://www.code.opencv.org/projects/opencv/wiki/How_to_contribute) would be very appreciated!
-   Difficulty changed from Medium to Easy
-   Assignee changed from Vadim Pisarevsky to Gang Tong
-   Status changed from New to Open
```
##### Alexander Smorkalov on 2014-04-30 19:05

```
-   Target version changed from 2.4.9 to 2.4.10
```
Repository: opencv
Issue: highgui.CV_CAP_PROP_FOURCC returns 0 with certain VideoFiles
Labels: bug,auto-transferred,priority: normal,affected: 3.4,category: java bindings

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

```
|| Peter Meier on 2014-01-15 16:14
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: java bindings
|| Tracker: Bug
|| Difficulty: Easy
|| PR: 
|| Platform: x64 / Windows
```
## highgui.CV_CAP_PROP_FOURCC returns 0 with certain VideoFiles

```
Hi,

I'm using OpenCV-java(3.00) (selfcompiled version see issue #3460)
and the CV_CAP_PROP_FOURCC property gives me back 0 with certain Video formats.
I've tested Mpg-2,flash(.flv) and mp4 until now.

It opens every one of them, but only the .mp4 gave another value than 0-(avc1).

So I do not no if it is normal, or (OpenCV-)java specific..
```
## History
##### Andrew Senin on 2014-01-24 08:59

```
Peter, 

Thanks for posting the issue. As you mentioned in the #3460 not all HighGUI functionality is covered by the Java wrappers. 

Unfortunately currently there are no people supporting the Java wrappers on regular basis. So you can help the project by contributing your fix. Please read more details on how to contribute here: http://code.opencv.org/projects/opencv/wiki/How_to_contribute

Thanks
-   Target version changed from 3.0-beta to Next Hackathon
-   Difficulty changed from Medium to Easy
-   Status changed from New to Open
```
Repository: opencv
Issue: Streaming over RTSP
Labels: bug,auto-transferred,priority: normal,affected: 2.4,category: videoio(camera)

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

```
|| Matheus Castro Rocha on 2014-01-21 22:49
|| Priority: Normal
|| Affected: 2.4.0 - 2.4.7
|| Category: highgui-camera
|| Tracker: Bug
|| Difficulty: Easy
|| PR: 
|| Platform: x64 / Windows
```
## Streaming over RTSP

```
Hello guys !

I have been trying to access an IP Camera through RTSP in Visual Studio 2012. Here is my code:

VideoCapture cap("rtsp://IP_ADRRESS/play1.sdp/?tcp");

if (!cap.isOpened()) 
{
    cout << "Cannot open the video file" << endl;
    return -1;
}
double dWidth = cap.get(CV_CAP_PROP_FRAME_WIDTH); double dHeight = cap.get(CV_CAP_PROP_FRAME_HEIGHT); cout << "Frame size : " << dWidth << " x " << dHeight << endl;

namedWindow("MyVideo",CV_WINDOW_AUTOSIZE); 

while (1)
{
    Mat frame;

    bool bSuccess = cap.read(frame); 

     if (!bSuccess) 
    {
         cout << "Cannot read a frame from video file" << endl;
         break;
    }

    imshow("MyVideo", frame); 

    if (waitKey(30) == 27)
   {
        cout << "esc key is pressed by user" << endl;
        break; 
   }
}

When I run it in debug mode, it works just fine, but when I run it in realese , it doesn't work. Any ideas ?
I was able to access the camera using only ffmpeg.

if i didn't post any useful informantion, let me know !

Thanks a lot !
```
## History
##### Andrew Senin on 2014-01-23 13:52

```
Matheus, thank you for posting this issue!

Could you please let us know what version of OpenCV you use? If it is not the latest - please try with the latest. Also, please describe how it does not work (crash or no image etc.). 

Since our resources now are limited it would be greatly appreciated if you could try to debug this issue locally and send as a fixing push request. You can find all details here: http://code.opencv.org/projects/opencv/wiki/How_to_contribute

Thank you
-   Difficulty changed from Hard to Easy
-   Target version set to Next Hackathon
-   Priority changed from High to Normal
-   Assignee set to Matheus Castro Rocha
-   Status changed from New to Incomplete
-   Category set to highgui-camera
```
Repository: opencv
Issue: iOS install instructions fail if there are + or - characters in the build path
Labels: bug,auto-transferred,priority: normal,category: build/install,affected: 2.4

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

```
|| David Dancy on 2014-01-22 04:23
|| Priority: Normal
|| Affected: 2.4.8 (latest release)
|| Category: build/install
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Mac OSX
```
## iOS install instructions fail if there are + or - characters in the build path

```
My original build path was ~/Documents/Projects/C++/OpenCV-2.4.8/opencv/build

ccmake failed with regex errors when invoked from this path.

The python build script also failed.

Initially I just renamed the path to ~/Documents/Projects/C++/OpenCV020408/opencv/build but this still failed with regex and build errors.

I had to rename the path to ~/Documents/Projects/Cplusplus/OpenCV020408/opencv/build before either tool would work properly.

HTH
```
## History
##### Roman Donchenko on 2014-01-22 08:01

```
Details, please. What errors?
```
##### Andrew Senin on 2014-01-23 13:43

```
David, please provide extended description of the errors 
-   Assignee changed from Roman Donchenko to David Dancy
-   Status changed from New to Incomplete
```
Repository: opencv
Issue: VideoCapture capture.read( image ) is not blocking off main thread on Android
Labels: bug,auto-transferred,priority: normal,affected: 2.4,category: videoio(camera)

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

```
|| Arvind Pereira on 2014-01-24 22:46
|| Priority: Normal
|| Affected: 2.4.0 - 2.4.7
|| Category: highgui-camera
|| Tracker: Bug
|| Difficulty: Medium
|| PR: 
|| Platform: ARM / Android
```
## VideoCapture capture.read( image ) is not blocking off main thread on Android

```
I am running OpenCV4Android natively to perform image processing on an Android device running Android OS v 4.2.2.  This is a Tegra device. I am reading images in a separate frame grabber thread, which loops around grabbing images and then processing them. I have noticed that when the device is grabbing images, both my process as well as mediaserver consume approximately 20% CPU each. This appears to me to be an issue where OpenCV's video capture device is busy-waiting for the calls to Android's camera driver to return instead of blocking on the I/O call. This in turn is causing the process to waste massive amounts of CPU simply grabbing frames. I confirmed this by commenting out all processing (I was building image pyramids and performing background MOG processing), and found that they were contributing to only an additional 5% CPU over and above grabbing frames.

Ideally, what I would expect is that OpenCV's video capture should simply block on each frame read, thus imposing negligible load on the system beyond what it has already been consuming. i.e. on my device we should have been seeing 20% CPU load on the media-server with single-digit CPU load due to copying those frames and decoding them in videocapture.

It appears that this is an issue on OS-X when the capture device is started off in a non main thread. I suspect this is a similar bug when compiled for Android. Please fix asap - it is stealing too much CPU waiting for frames to become available!
```
## History
##### Alexander Smorkalov on 2014-01-25 18:18

```
-   Priority changed from Blocker to Normal
-   Assignee set to Alexander Smorkalov
```
##### Andrew Senin on 2014-01-26 15:59

```
-   Status changed from New to Open
```
##### Alexander Smorkalov on 2014-04-30 19:05

```
-   Target version changed from 2.4.9 to 2.4.10
```
Repository: opencv
Issue: CommandLineParser and negative values
Labels: bug,auto-transferred,priority: normal,category: core,affected: 3.4

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

```
|| Philippe FOUBERT on 2014-01-29 13:47
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: core
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / Any
```
## CommandLineParser and negative values

```
The parsing done in the function @CommandLineParser::CommandLineParser(int argc, const char* const argv[], const String& keys)@ seems buggy:
* @appli.exe -j=1.2@ is treated correctly
* @appli.exe -1.2@ is not treated correctly since it removes the argument because there is not possible argument named "1.2": the "-" character is considered to be only a way to specify an argument name.
```
## History
##### Vladislav Vinogradov on 2014-01-30 07:53

```
Hello Philippe,

Thank you for reporting the issue!
Unfortunately our resources are limited at the moment. 
Do you think you could work on a solution on your own? 
Your contribution to the OpenCV repo (see http://www.code.opencv.org/projects/opencv/wiki/How_to_contribute for help) would be very appreciated!
-   Operating System changed from Windows to Any
-   HW Platform changed from x64 to Any
-   Assignee changed from Vadim Pisarevsky to Philippe FOUBERT
-   Status changed from New to Open
```
Repository: opencv
Issue: Remap does not support images longer than 32k pixel
Labels: auto-transferred,priority: normal,feature,category: imgproc,category: video

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

```
|| Mustafa Teke on 2014-02-05 12:08
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty: Medium
|| PR: 
|| Platform: None / None
```
## Remap does not support images longer than 32k pixel

```
Due to use of short data type with remap, images larger than 32k are not remapped with Remap function.
```
## History
##### Dmitry Retinskiy on 2014-02-06 12:06

```
Hi Mustafa,

could you add more details to the description?
Which exactly use of short data type you are referring to?
```
##### Dmitry Retinskiy on 2014-02-07 06:56

```
-   Category set to imgproc, video
```
##### Kirill Kornyakov on 2014-02-17 08:00

```
-   Status changed from New to Open
-   Tracker changed from Bug to Feature
```
##### Mustafa Teke on 2014-05-01 11:28

```
I deal with large satellite images often in size of a few gigabytes.
When I needed to load a long image strip I could not remap images which are vert long (4096 x 81920)

Dmitry Retinskiy wrote:
> Hi Mustafa,
> 
> could you add more details to the description?
> Which exactly use of short data type you are referring to?
```
##### Andrew Senin on 2014-05-06 14:17

```
Hi Mustafa, 

It would be nice to investigate this issue and make the function work with very large images. Please consider investigating this and creating a fixing pull request (http://code.opencv.org/projects/opencv/wiki/How_to_contribute). Your help is highly appreciated!
-   Target version set to Next Hackathon
-   Difficulty set to Medium
-   Assignee set to Mustafa Teke
```
Repository: opencv
Issue: FileStorage Append + Memory
Labels: auto-transferred,priority: normal,feature,category: core

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

```
|| Paul Triantafyllou on 2014-02-07 16:07
|| Priority: Normal
|| Affected: None
|| Category: core
|| Tracker: Feature
|| Difficulty: 
|| PR: 
|| Platform: None / None
```
## FileStorage Append + Memory

```
I would like to see FileStorage be able to append data to a memory buffer.
```
## History
##### Kirill Kornyakov on 2014-02-10 11:15

```
Could you please describe a scenarion when you need such functionality? May be you should implement it and submit as a pull-request?
-   Assignee set to Paul Triantafyllou
-   Status changed from New to Incomplete
-   Category set to core
```
Repository: opencv
Issue: compilation of objective-c code on MacOSx when using gcc compiler
Labels: bug,auto-transferred,priority: normal,category: build/install,affected: 3.4

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

```
|| nicolas martin on 2014-02-15 04:01
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: build/install
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Mac OSX
```
## compilation of objective-c code on MacOSx when using gcc compiler

```
Hi,

On MacOsX platforms, the only check that's done for some files (e.g cap_qt.mm or window_cocoa.mm) is if APPLE is defined in CMakeLists.txt.
However, if the compiler is not clang, these files will fail to compile.
The compiler should also be checked.
```
## History
##### Kirill Kornyakov on 2014-02-17 07:14

```
Nicolas, is it possible to get a pull request from you?

Roman, do you think you're the right person to review it (or work on it)?
-   Priority changed from High to Normal
-   Assignee set to nicolas martin
-   Category set to build/install
```
##### Kirill Kornyakov on 2014-02-17 07:54

```
-   Status changed from New to Open
```
##### nicolas martin on 2014-02-21 21:01

```
Hi,

I pulled a request for this.

Thanks
```
Repository: opencv
Issue: (Java) Conversion between Mat to IplImage or BufferedImage
Labels: auto-transferred,priority: normal,feature,category: java bindings

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

```
|| Ernesto Moyano on 2014-02-15 14:58
|| Priority: Normal
|| Affected: None
|| Category: java bindings
|| Tracker: Feature
|| Difficulty: Medium
|| PR: 
|| Platform: None / None
```
## (Java) Conversion between Mat to IplImage or BufferedImage

```
There's no function to convert the Mat type to swing compatible type. I already been working on a project that needs capture an 1920x1080 image from a webcam an display it into a swing container like a label or jpanel, but Mat type isn't compatible. So i try many ways to to this tasks but take to much time, but with this method i reduced the conversion time:

<pre>
    public static BufferedImage matToBufferedImage(Mat mat) {

        if (mat.height() > 0 && mat.width() > 0) {
            BufferedImage image = new BufferedImage(mat.width(), mat.height(), BufferedImage.TYPE_3BYTE_BGR);
            WritableRaster raster = image.getRaster();
            DataBufferByte dataBuffer = (DataBufferByte) raster.getDataBuffer();
            byte[] data = dataBuffer.getData();
            mat.get(0, 0, data);
            return image;
        }

        return null;
    }
</pre>

would be cool a native code for doing this task.
```
## History
##### Kirill Kornyakov on 2014-02-17 07:58

```
Alexander, let's look at it.
-   Assignee changed from Andrey Pavlenko to Alexander Smorkalov
-   Status changed from New to Open
```
##### Alexander Smorkalov on 2014-03-16 15:47

```
-   Description changed from There's no function to convert the Mat type
    to swing compatible type. I alrea... to There's no function to
    convert the Mat type to swing compatible type. I alrea... More
```
##### Alexander Smorkalov on 2014-04-02 01:28

```
-   Target version changed from 2.4.9 to 3.0
```
##### Andrey Pavlenko on 2014-04-02 07:09

```
-   Assignee changed from Alexander Smorkalov to Andrey Pavlenko
```
Repository: opencv
Issue: Java: important BackgroundSubtractionMOG2 parameters cannot be set
Labels: bug,auto-transferred,priority: normal,affected: 2.4,category: java bindings

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

```
|| Will Stewart on 2014-02-25 16:07
|| Priority: Normal
|| Affected: 2.4.8 (latest release)
|| Category: java bindings
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x86 / Linux
```
## Java: important BackgroundSubtractionMOG2 parameters cannot be set

```
After instantiating a BackgroundSubtractionMOG2, via parent class Algorithm we are able to getDouble() the parameters fTau and nShadowDetection, but setting does nothing for the fTau and creates the following error for nShadowDetection;

OpenCV Error: Bad argument (Argument error: the setter method was called for the parameter 'nShadowDetection' of the algorithm 'BackgroundSubtractor.MOG2', the parameter has unsigned char type, so it should be set by integer, unsigned integer, uint64, unsigned char, boolean, float or double value, but the setter was called with double value) in set, file /home/will/opencv-2.4.8/modules/core/src/algorithm.cpp, line 654

For example, the following code;

<pre>
BSMOG2 = new BackgroundSubtractorMOG2(2, 16, true);

  double x = BSMOG2.getDouble("fTau");

  System.out.println("BSMOG2.getDouble(fTau) = " + x);

  double yy = BSMOG2.getDouble("nShadowDetection");

  System.out.println("BSMOG2.getDouble(nShadowDetection) = " + yy);
</pre>

and the output is;

_BSMOG2.getDouble(fTau) = 0.5

BSMOG2.getDouble(nShadowDetection) = 127.0_

to set the values, I did;

<pre>
BSMOG2.setDouble("fTau", 0.7);

</pre>
EDIT: This executes without warning or complaint, but never really sets fTau, the value continues to be 0.5

And setDouble for nShadowDetection crashes with the following very odd statement;

OpenCV Error: Bad argument (Argument error: the setter method was called for the parameter 'nShadowDetection' of the algorithm 'BackgroundSubtractor.MOG2', the parameter has unsigned char type, so it should be set by integer, unsigned integer, uint64, unsigned char, boolean, float or double value, but the setter was called with double value) in set, file /home/will/opencv-2.4.8/modules/core/src/algorithm.cpp, line 654

On top of that, I tried other operations (paramType) to see what they resulted in;
_
Paramtype for fTau is 7 
Paramtype for nShadowDetection is 11_

I can't figure out what these mean.

I also tried String paramhelpfTau = BSMOG2.paramHelp("fTau");

But that was _null_.

The BackgroundSubtractionMOG2 is virtually unusable if one cannot change the parameters.
```
## History
##### Will Stewart on 2014-02-27 15:28

```
This was my first bug report - did I do this right, or is there some other reason why it has been passed over for now?
```
##### Dinar Ahmatnurov on 2014-03-05 17:15

```
Alexander, please have a look
-   Assignee set to Alexander Smorkalov
-   Status changed from New to Open
-   Category set to java bindings
```
Repository: opencv
Issue: BestOf2NearestMatcher gives different result on second run
Labels: bug,auto-transferred,priority: normal,affected: 2.4,category: stitching

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

```
|| Christopher Herbon on 2014-02-27 01:59
|| Priority: Normal
|| Affected: 2.4.8 (latest release)
|| Category: stitching
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Mac OSX
```
## BestOf2NearestMatcher gives different result on second run

```
When I excecute the folloing code twice with the exact same inputs, I get two different but similar results.

BestOf2NearestMatcher matcher(false, 0.3);
vector<MatchesInfo> temp_pairwise_matches = [...];
vector<ImageFeatures> temp_features = [...];
matcher(temp_features, pairwise_matches);
matcher.collectGarbage();

A little more info: I have spend a lot of time isolating the problem to this code. I create two different copies of BestOf2NearestMatcher and all input data is being cloned, so there is definitively no change in the input. The result on the first run is always the same and so is the result on the second and third run, and so on. But none of the results equals one of the previous results.
```
## History
##### Dinar Ahmatnurov on 2014-03-05 17:30

```
-   Status changed from New to Open
```
##### Alexander Smorkalov on 2014-04-30 19:06

```
-   Target version changed from 2.4.9 to 2.4.10
```
Repository: opencv
Issue: OpenCV 2.4.8: Possible code bug in frame blending in gpu/NPP_staging.cu
Labels: bug,auto-transferred,priority: normal,affected: 2.4,category: gpu/cuda (contrib)

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

```
|| Linchao Bao on 2014-02-27 03:03
|| Priority: Normal
|| Affected: 2.4.8 (latest release)
|| Category: gpu (cuda)
|| Tracker: Bug
|| Difficulty: Easy
|| PR: 
|| Platform: x86 / Windows
```
## OpenCV 2.4.8: Possible code bug in frame blending in gpu/NPP_staging.cu

```
I was trying to figure out how is OpenCV doing the frame interpolation given forward and backward optical flow. I found the code in *modules/gpu/src/nvidia/NPP_staging/NPP_staging.cu* is very weird. Specifically, in function @nppiStInterpolateFrames@ (Line 2006~2097) it is first to warp the flow fields (to offset the reference pixel position for doing inverse warping, in my opinion). However, in the 4th call of function @nppiStVectorWarp_PSF2x2_32f_C1@, it is using @bwdU@ as the output buffer (Line 2079), where *I guess it should be @bwdV@ instead*. Checking the previous 3 call of the same function would easily discover that this should be a typo.

Another bug is inside function @BlendFramesKernel@, I believe Line 1936~1941, which is

@if (b0 && b1)
{
    // pixel is visible on both frames
    out[pos] = tex2D(tex_src0, x - _u * theta, y - _v * theta) * (1.0f - theta) +
        tex2D(tex_src1, x + _u * (1.0f - theta), y + _v * (1.0f - theta)) * theta;
}@

*should be as follows instead* (because it is supposed to use bi-directional optical flow),

@if (b0 && b1)
{
    // pixel is visible on both frames
    out[pos] = tex2D(tex_src0, x - _u * theta, y - _v * theta) * (1.0f - theta) +
        tex2D(tex_src1, x - _ur * (1.0f - theta), y - _vr * (1.0f - theta)) * theta;
}@

In practice, the two bugs are usually unnoticeable. But fixing the bugs does reduce artifacts in some cases. I suggest the authors check the code carefully and fix the obvious typo/logical errors. Thanks.
```
## History
##### Dinar Ahmatnurov on 2014-03-04 10:56

```
Vlad, please have a look
-   Status changed from New to Open
```