The heap error on cv::CalkOpticalFlowPyrLK function (Bug #2087)
Description
On Visual Studio 2010 Professional, the heap error occurs in cv::CalkOpticalFlowPyrLK function. It checked operating normally when correcting the code of the cv::CalkOpticalFlowPyrLK function.
I hope that this patch is applied.
History
Updated by Alexander Shishkov 11 months ago
- Assignee deleted (
Vadim Pisarevsky)
Updated by Andrey Pavlenko 11 months ago
Thanks for contribution, but this patch just hides the problem, not fixes.
We can't accept it.
Could you provide a test case that reproduces a bug?
- Tracker changed from Patch to Bug
Updated by Takamichi Tashiro 11 months ago
I am sorry to have hung trouble.
I attached the test program. It referred to "http://opencv.jp/cookbook/opencv_img.html?highlight=optical#id55".
In addition, in my environment, it built with TBB and Eigen and performed the static link of CRT (with /MT or /MTd option).
Please verify it well.
- File blocks2.png added
- File blocks1.png added
- File test_optflowpyrlk.cpp added
Updated by Vadim Pisarevsky 11 months ago
I think, if you build OpenCV DLLs and build your application with dynamic runtime as well (release with /MD and debug with /MDd) and link debug version of OpenCV to debug version of your app and release version of OpenCV to release version of your app, the bug will disappear. It's actually not a bug, it's famous feature of MSVC runtime.
If you want to link OpenCV statically, still, you have to make sure that your app still uses absolutely the same runtime as OpenCV (say, /MT in release, /MTd in debug); also, link release version of your app with release version of OpenCV and debug version of your app with debug version of OpenCV
If the bug still persists, please, reopen the ticket
- Assignee set to Vadim Pisarevsky
- Status changed from Open to Cancelled
- Target version set to 2.4.3