The heap error on cv::CalkOpticalFlowPyrLK function (Bug #2087)


Added by Takamichi Tashiro 11 months ago. Updated 11 months ago.


Status:Cancelled Start date:2012-06-25
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:imgproc, video
Target version:2.4.3
Affected version: Pull request:

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.


lkpyramid.cpp.patch (468 Bytes) Takamichi Tashiro, 2012-06-25 05:36 pm

test_optflowpyrlk.cpp - The source file of the test program (1.5 kB) Takamichi Tashiro, 2012-06-29 06:38 am

blocks1.png - The resource file for the test program (189.7 kB) Takamichi Tashiro, 2012-06-29 06:38 am

blocks2.png - The resource file for the test program (196.3 kB) Takamichi Tashiro, 2012-06-29 06:38 am


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.

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

Also available in: Atom PDF