The heap error on cv::CalkOpticalFlowPyrLK function (Bug #2087)
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.
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.
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