sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: remap for 64-bit images is performed with 32-bit precision
Labels: auto-transferred,feature,category: imgproc,category: video,priority: low

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

```
|| Mark Desnoyer on 2011-06-24 18:22
|| Priority: Low
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty: 
|| PR: 
|| Platform: None / None
```
## remap for 64-bit images is performed with 32-bit precision

```
Hi,

I could be wrong here, but I believe that the remap function (used by all the warping functions) can only be run with 32-bit precision. Let me know if I'm misinterpreting the code.

Change r5351 allows the user to use 64-bit images now, however, remap does an optimization to switch the image to fixed-point format and then does a lookup. Unfortunately, the lookup table is only 16-bit, which works fine if you're in a 32-bit image, but you lose precision in the 64-bit case.

I know this will be a pain in the butt to fix, so for now, I think it's most important to include a warning about the precision loss in the documentation. Maybe even a compiler/runtime warning if the user is trying to remap 64-bit images. 

For some context, I'm running into this because I'm trying to do some very precise affine warps to images. It works fine in Matlab, but I get a slightly different answer with the OpenCV warpAffine consistent with losing precision somewhere.
```
## History
##### Alexander Shishkov on 2012-02-12 20:59

```
-   Description changed from Hi, I could be wrong here, but I believe
    that the remap function (used by al... to Hi, I could be wrong here,
    but I believe that the remap function (used by al... More
```
##### Alexander Shishkov on 2012-03-21 20:37

```
-   Target version deleted ()
```
##### Alexander Shishkov on 2012-03-25 20:32

```
-   Priority changed from Normal to Low
```
##### Alexander Shishkov on 2012-03-25 20:46

```
-   Assignee deleted (Vadim Pisarevsky)
```
##### Alexander Shishkov on 2012-04-05 12:44

```
-   Target version deleted ()
```
##### Andrey Kamaev on 2012-04-10 11:18

```
-   Description changed from Hi, I could be wrong here, but I believe
    that the remap function (used by al... to Hi, I could be wrong here,
    but I believe that the remap function (used by al... More
```
##### Vadim Pisarevsky on 2015-05-25 21:35

```
ok, converting it to a feature request
-   Tracker changed from Bug to Feature
```
Repository: opencv
Issue: CascadeClassifier::detectMultiScale() const?
Labels: auto-transferred,priority: normal,feature,category: objdetect

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

```
|| Josh Klontz on 2011-07-12 13:47
|| Priority: Normal
|| Affected: None
|| Category: objdetect
|| Tracker: Feature
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## CascadeClassifier::detectMultiScale() const?

```
It would be great to a have a const version of detectMultiScale for multi-threaded use, or alternatively, some way to copy/clone cascades. Currently it appears that the only way to run multiple cascades simultaneously is to construct them repeatedly from disk. This becomes cumbersome when trying to thread at a per image basis which necessitates the construction of a new cascade for each image.

On a related note, it appears that the default copy constructor for CascadeClassifier ought to be disabled as it does not appear to make a deep copy and thus does not provide a solution for thread safety.
```
## History
##### Alexander Shishkov on 2012-02-12 20:56

```
-   Description changed from It would be great to a have a const version
    of detectMultiScale for multi-thr... to It would be great to a have
    a const version of detectMultiScale for multi-thr... More
```
##### Matthew Newman on 2012-03-04 23:42

```
It is possible (with the new format cascades at least) to use cv::FileStorage to avoid reading from disk repeatedly (see http://stackoverflow.com/questions/7285480/opencv-cascadeclassifier-c-interface-in-multiple-threads), but I agree that this is not a great solution.

Given a bit of input from a developer regarding their preferred solution I'd be willing to work on this issue, as thread safety is something my company requires.
```
##### Jose Gómez on 2013-11-29 20:50

```
There is a ticket requesting a clone() for the CascadeClassifier: http://code.opencv.org/issues/2600

Nevertheless, thread safety would probably be a more elegant solution.
```
Repository: opencv
Issue: add scrollbars to highgui windows
Labels: auto-transferred,feature,priority: low,category: highgui-gui

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

```
|| Vadim Pisarevsky on 2011-07-17 10:23
|| Priority: Low
|| Affected: None
|| Category: highgui-gui
|| Tracker: Feature
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## add scrollbars to highgui windows

```
in the case of large-resolution images the highui windows displaying them are getting big and do not fit the screen. adding scrollbars to solve the problem would be a useful addition.

the original request is here: #1225
```
## History
##### Alexander Shishkov on 2012-03-21 20:25

```
-   Priority changed from Normal to Low
```
##### Andrey Kamaev on 2012-04-10 11:17

```
-   Description changed from in the case of large-resolution images the
    highui windows displaying them are... to in the case of
    large-resolution images the highui windows displaying them are...
    More
```
##### Xing Chen on 2012-07-06 00:40

```
I've been suffering from the problem for a long time. A scrollbar is really very very important for inspecting large images.

Currently, when I'm looking at a large image, I have to re-scale the image, which means that some details will be changed. If I don't resize the image, I can't even see some part of the image.

I really believe this should be a basic feature for an image viewer for scientific purposes. If somebody would raise it's priority and work on it, I will be very grateful. Thanks.
```
##### Xing Chen on 2012-07-06 03:59

```
Alternatively, if introducing a scrollbar is too hard, maybe we can add an option to show the status bar on the top-left of the window, so that one can at least know the basic information (position and RGB value) of the visible pixels.
```
##### Andrey Kamaev on 2012-08-16 15:36

```
-   Category changed from highgui-images to highgui-gui
```
Repository: opencv
Issue: Cannot change video size in a thread
Labels: bug,auto-transferred,priority: normal,affected: 2.4,category: videoio(camera)

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

```
|| Pavel Gurevich on 2011-07-20 16:23
|| Priority: Normal
|| Affected: branch '2.4' (2.4-dev)
|| Category: highgui-camera
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / Any
```
## Cannot change video size in a thread

```
Changing resolution using 

videoCapture -> set( CV_CAP_PROP_FRAME_WIDTH, width )

works fine in the main thread but has no effect inside a thread.
```
## History
##### Vadim Pisarevsky on 2011-10-05 01:26

```
which OS do you use and what does CMake report in the summary section about video capturing?
```
##### Alexander Shishkov on 2012-03-21 20:23

```
-   Target version deleted ()
-   Priority changed from High to Normal
```
##### Andrey Kamaev on 2012-03-24 17:36

```
-   Category changed from imgproc, video to highgui-images
```
##### Alexander Shishkov on 2012-03-25 20:31

```
-   Priority changed from Normal to Low
```
##### Alexander Shishkov on 2012-03-25 20:46

```
-   Assignee deleted (Vadim Pisarevsky)
```
##### Pavel Gurevich on 2012-03-25 23:05

```
I managed to made this work. The problem is that by default (as of 2.3.1) in the file cap_dshow.cpp which has a copy of videoinput library, the following define is commented out:

//if you need VI to use multi threaded com
#define VI_COM_MULTI_THREADED

Setting it will fix the issue. This is obviously a compile-time decision, and there is no build-time option for this. So, the question is if the current default is a good one.
```
##### Alexander Shishkov on 2012-03-25 23:08

```
-   Priority changed from Low to Normal
-   Tracker changed from Bug to Patch
```
##### Alexander Reshetnikov on 2012-03-30 09:58

```
-   Assignee set to Vadim Pisarevsky
```
##### Alexander Shishkov on 2012-04-05 12:44

```
-   Target version deleted ()
```
##### Pavel Gurevich on 2012-07-24 16:38

```
As of 2.4.2, even the previous work-around stopped working. I saw much changes in the file cap_dshow.cpp, but meanwhile I cannot isolate the cause problem. 

Meanwhile, I've noticed that the whole code section that initialized/deinitialized COM is commented out.

However, when I play with the values of tryWidth and tryHeight I do get the desired capture resolutions.

Currently seems like a degradation from the previous version (and the previous version of the file cannot be just dropped in because of the compilation problems).
```
##### Andrey Kamaev on 2012-08-16 15:39

```
-   Category changed from highgui-images to highgui-camera
```
##### Kirill Kornyakov on 2013-02-15 11:40

```
Pavel, could you please attach a repro code sample?
-   Affected version set to 2.4.2
-   Assignee changed from Vadim Pisarevsky to Pavel Gurevich
```
##### Maksim Shabunin on 2015-07-21 09:10

```
-   Affected version changed from 2.4.2 to branch '2.4' (2.4-dev)
-   Operating System set to Any
-   HW Platform set to Any
```
##### Maksim Shabunin on 2015-07-21 09:10

```
-   Tracker changed from Patch to Bug
```
Repository: opencv
Issue: negative cursor position overflow in python mouse callbacks
Labels: bug,auto-transferred,category: python bindings,priority: low

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

```
|| Alexander Mordvintsev on 2011-08-13 09:04
|| Priority: Low
|| Affected: None
|| Category: python bindings
|| Tracker: Bug
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## negative cursor position overflow in python mouse callbacks

```
Mouse callback x, y params are unsigned 16-bit, while they may become negative when used holds a mouse button and drugs it behind upped left window corner.
See python2/camshift.py 'onmouse' function work workaround (marked with 'BUG' comment)
```
## History
##### Alexander Shishkov on 2012-03-21 14:08

```
-   Target version deleted ()
-   Subproject of set to #1437
```
##### Alexander Shishkov on 2012-03-25 20:30

```
-   Priority changed from Normal to Low
```
##### Alexander Shishkov on 2012-03-25 20:47

```
-   Assignee deleted (Vadim Pisarevsky)
```
##### Alexander Shishkov on 2012-04-05 12:45

```
-   Target version deleted ()
```
##### Vadim Pisarevsky on 2012-10-04 14:35

```
-   Target version deleted ()
```
##### Kirill Kornyakov on 2012-10-24 08:39

```
-   Target version set to Next Hackathon
```
Repository: opencv
Issue: copyTo function support to slices of higher-dimensional matrixes.
Labels: auto-transferred,feature,priority: low,category: core

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

```
|| Denis Aleshin on 2011-09-30 16:14
|| Priority: High
|| Affected: None
|| Category: core
|| Tracker: Feature
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## copyTo function support to slices of higher-dimensional matrixes.

```
Currently, copyTo does not recognize when two matrix headers have the same (actual) size and total number of elements, and will allocate a new matrix for the destination.

A clear example is trying to copy an MxN matrix into a 1xMxN matrix.

This is an important case to address, since it often comes up when dealing with video volumes. If I have a [[TxMxN]] frame buffer, I want to construct a 1xMxN time slice header, and then copy my MxN frame into that location.

For instance, this does not work:

// depth_buf is TxMxN
// depth_border is MxN
Range rangesupdate[] = {Range(0,1), Range::all(), Range::all()};
Mat depth_to = depth_buf(rangesupdate);
depth_border.copyTo(depth_to);
// depth_to no longer points inside depth_buf.
```
## History
##### Alexander Shishkov on 2012-02-12 20:26

```
-   Description changed from Currently, copyTo does not recognize when
    two matrix headers have the same (a... to Currently, copyTo does not
    recognize when two matrix headers have the same (a... More
```
Repository: opencv
Issue: weighted Hough
Labels: auto-transferred,priority: normal,feature,category: imgproc,category: video

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

```
|| ivansorokin - on 2011-10-07 15:17
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## weighted Hough

```
Currently Hough transform take every point with the same weight: if the point is non zero then it increase every pixel value by one.

<pre><code class="cpp">
if( image[i * step + j] != 0 )
    for( n = 0; n < numangle; n++ )
    {
        r = cvRound( j * tabCos[n] + i * tabSin[n] );
        r += (numrho - 1) / 2;
        accum[(n+1) * (numrho+2) + r+1]++;
    }
</code></pre>

It would be great if it is possible to assign every point in image specific weight. For example, something like this:

<pre><code class="cpp">
if( image[i * step + j] != 0 )
    for( n = 0; n < numangle; n++ )
    {
        r = cvRound( j * tabCos[n] + i * tabSin[n] );
        r += (numrho - 1) / 2;
        accum[(n+1) * (numrho+2) + r+1] += image[i * step + j];
    }
</code></pre>
```
## History
##### Alexander Shishkov on 2012-03-21 12:43

```
-   Description changed from Currently Hough transform take every point
    with the same weight: if the point... to Currently Hough transform
    take every point with the same weight: if the point... More
```
Repository: opencv
Issue: Can't use BRIEF descriptor in BOW unless....
Labels: auto-transferred,priority: normal,feature,category: features2d

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

```
|| Bruno Nascimento on 2011-10-27 14:13
|| Priority: Normal
|| Affected: None
|| Category: features2d
|| Tracker: Feature
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## Can't use BRIEF descriptor in BOW unless....

```
commenting the line 2455 in features2d.hpp CV_Assert( DataType<ValueType>::type == matcher.trainDescCollection[iIdx].type() ||  matcher.trainDescCollection[iIdx].empty() );

and line 351 in matchers.cpp CV_Assert( queryDescriptors.type() == CV_32FC1 ||  queryDescriptors.empty() );

This happens because the brief descriptor results in integers, and BOW is expecting to use floats.
```
## History
##### Alexander Shishkov on 2012-02-12 20:19

```
-   Description changed from commenting the line 2455 in features2d.hpp
    CV_Assert( [[DataType]]<ValueTy... to commenting the line 2455 in
    features2d.hpp CV_Assert( DataType<ValueType&g... More
```
##### Alexander Shishkov on 2012-03-21 11:34

```
-   Target version deleted ()
```
##### Alexander Shishkov on 2012-03-22 14:33

```
-   Target version deleted ()
```
Repository: opencv
Issue: header files for python module
Labels: auto-transferred,priority: normal,feature,category: python bindings

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

```
|| demonstrate - on 2011-11-14 05:59
|| Priority: Normal
|| Affected: None
|| Category: python bindings
|| Tracker: Feature
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## header files for python module

```
Hi guys,

I am trying to write some functionality for opencv, which is mainly done with C++. But I am also thinking about providing a python module interface so as to carry out some easy experiments in python's code.

The critical thing is that I need interactions between my module and opencv's python module. E.g. I might open an image by calling cv.LoadImageM or cv2.imread and pass then PyObject to my module's function. Most of the functions (maybe some types too?) in the python module are marked as static functions, which forbids linking. And there is no header files provided by the module. Guys like me cannot simply include in my source and link to the module. I tried to copy some parts of the header in the python module but it doesn't work as expected.

Is there any specific development plan for this? I think it encourages people to contribute code in C++ and wrap it for python's friendly usages.
```
## History
##### Alexander Shishkov on 2012-02-12 20:17

```
-   Description changed from Hi guys, I am trying to write some
    functionality for opencv, which is mainly... to Hi guys, I am trying
    to write some functionality for opencv, which is mainly... More
```
Repository: opencv
Issue: CreateVideoWriter does not report error
Labels: bug,auto-transferred,priority: normal,category: python bindings

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

```
|| ken_seehart - on 2011-11-17 21:46
|| Priority: Normal
|| Affected: None
|| Category: python bindings
|| Tracker: Bug
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## CreateVideoWriter does not report error

```
CreateVideoWriter should raise an exception when it fails, but does not.


<pre>
>>> import cv
>>> w = cv.CreateVideoWriter('nonexistentdir/foobar/myvid.mpg', cv.CV_FOURCC('Z','Y','X','W'), 5, (354,332), 1)
>>> w
<VideoWriter 02E5EC10>
>>> 
>>> im = cv.LoadImage('logo_largel.png')
>>> cv.WriteFrame(w, im)
0
</pre>

Clearly, it should fail to open the output file for writing, and also fail due to the bogus ZYXW codec. Either of these conditions should raise an exception, or at least return something other than a healthy looking VideoWriter instance.

This is an important defect because without any error detection I am unable to troubleshoot my code.

As a side comment, the documentation does not state the meaning of the return value of cv.WriteFrame().
```
## History
##### ken_seehart - on 2011-12-01 00:18

```
Perhaps this should be expanded to a more general defect: The python bindings appear to have essentially no error handling whatsoever. A good start would be to forward cv::Exception into a python exception. Perhaps the C++ code needs more comprehensive error handling as well.
```
##### Alexander Shishkov on 2012-02-12 20:14

```
-   Description changed from [[CreateVideoWriter]] should raise an
    exception when it fails, but does not. ... to CreateVideoWriter
    should raise an exception when it fails, but does not. &l... More
```
Repository: opencv
Issue: In python 'cv2.SURF.detect' is unusable with user-provided keypoints
Labels: bug,auto-transferred,priority: normal,category: python bindings

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

```
|| alexism - on 2011-11-30 09:51
|| Priority: Normal
|| Affected: None
|| Category: python bindings
|| Tracker: Bug
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## In python 'cv2.SURF.detect' is unusable with user-provided keypoints

```
In the cv2 python module, there is no way to provide user keypoints.
```
## History
##### Alexander Shishkov on 2012-03-21 10:56

```
-   Target version deleted ()
-   Priority changed from High to Normal
```
##### Alexander Shishkov on 2012-03-25 20:43

```
-   Assignee deleted (Vadim Pisarevsky)
```
##### Alexander Shishkov on 2012-04-05 12:46

```
-   Target version deleted ()
```
##### Mr. Luk on 2012-08-30 14:01

```
+1
```
##### Mr. Luk on 2012-08-31 13:11

```
Please find the patch attached. I added CV_IN_OUT to keypoints argument. The  keypoints argument is now mandatory, even if useProvidedKeypoints is set to false. In this case, an None can be passed.
-   File bug-1495-surf.diff added
```
Repository: opencv
Issue: Feature request: add codec parameters in videoWriter
Labels: auto-transferred,priority: normal,feature,category: videoio

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

```
|| sebastien wybo on 2011-12-06 14:30
|| Priority: Normal
|| Affected: None
|| Category: highgui-video
|| Tracker: Feature
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## Feature request: add codec parameters in videoWriter

```
It would be interesting to be able to control compression, key frames, bit-rate... in encoded videos the same way JPEG and PNG files compression can be controled.
```
## History
##### Andrey Kamaev on 2012-08-16 14:55

```
-   Category changed from highgui-images to highgui-video
```
Repository: opencv
Issue: Please Implement WarpBilinear
Labels: auto-transferred,priority: normal,feature,category: imgproc,category: video

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

```
|| moellney - on 2011-12-18 11:28
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## Please Implement WarpBilinear

```
You have warpAffine and warpPerspective but both seem not to transform the input image to a bilinear transformation.

Please see the difference between bilinear color interpolation and bilinear position interpolation.

Reasonable links might be:
http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/ippxe/ipp_manual_win_mac/IPPI/ippi_ch12/functn_WarpBilinear.htm

and

http://developer.qt.nokia.com/forums/viewthread/2007/#11944
```
## History
##### Andrey Kamaev on 2012-04-07 08:18

```
-   Category changed from core to imgproc, video
```
Repository: opencv
Issue: Flv file writer in Opencv 2.3.1 not working...
Labels: auto-transferred,priority: normal,feature,category: videoio

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

```
|| wazzy123 - on 2012-02-01 13:00
|| Priority: Normal
|| Affected: None
|| Category: highgui-video
|| Tracker: Feature
|| Difficulty: None
|| PR: None
|| Platform: None / None
```
## Flv file writer in Opencv 2.3.1 not working...

```
I want to write .flv file from Opencv and spent so much time on it...
OpenCV 2.3 Documentation says we can create flv file with this codec

CV_FOURCC('F','L','V','1')  
but I am always getting this error.

[flv @ 0x9bf5000] Tag FLV1/0x31564c46 incompatible with output codec id '22' 
Please help.... Currently I am using OpenCV  2.3 on Ubuntu 10.10

Try Pastebin code ( http://pastebin.com/HQEvbDCh ) ....Keep one test.avi file in same folder...Please check whether your OpenCV  create new.flv

I tried this to write avi file - THIS WORKS
<pre><code class="c">
    CvVideoWriter *vdowriter = cvCreateVideoWriter(
    "/path/converted.avi",
    CV_FOURCC('M', 'J', 'P', 'G'),
    20.0,
    cvSize(640,480) );
</code></pre>
Similarly I tried this to write flv file - THIS DOESNT WORKS
<pre><code class="c">
    CvVideoWriter *vdowriter = cvCreateVideoWriter(
    "/path/converted.flv",
    CV_FOURCC('F', 'L', 'V', '1'),
    25.0,
    cvSize(640,480) );
</code></pre>
```
## History
##### Alexander Shishkov on 2012-02-12 19:54

```
-   Description changed from I want to write .flv file from Opencv and
    spent so much time on it... [[OpenC... to I want to write .flv file
    from Opencv and spent so much time on it... OpenCV ... More
```
##### Andrey Kamaev on 2012-02-17 19:59

```
-   Category changed from imgproc, video to highgui-images
```
##### Alexander Shishkov on 2012-03-20 14:52

```
-   Target version deleted ()
-   Priority changed from High to Normal
-   Description changed from I want to write .flv file from Opencv and
    spent so much time on it... OpenCV ... to I want to write .flv file
    from Opencv and spent so much time on it... OpenCV ... More
```
##### Alexander Shishkov on 2012-03-25 20:44

```
-   Assignee deleted (Vadim Pisarevsky)
```
##### Alexander Shishkov on 2012-04-05 12:46

```
-   Target version deleted ()
```
##### Andrey Kamaev on 2012-08-16 15:09

```
-   Category changed from highgui-images to highgui-video
```
##### Vadim Pisarevsky on 2012-10-05 10:41

```
I do not see where FLV is mentioned in the documentation. I would consider support for FLV as a feature request, not as a bug
-   Tracker changed from Bug to Feature
```
##### Alexander Smorkalov on 2012-11-29 11:26

```
It looks like some flv container writer problem. AVI container with flv1 codec works ok. 
I add new reproducer with web camera.
<pre>
flv_reproducer test_video.avi #ok
flv_reporducer test_video.flv #invalid file
</pre>
-   File flv_reproducer.cpp added
-   File flv_mplayer.log added
-   File avi_mplayer.log added
```