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


Added by Takamichi Tashiro over 12 years ago. Updated over 12 years 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: Operating System:
Difficulty: HW Platform:
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


Associated revisions

Revision 4ce684e6
Added by Roman Donchenko about 11 years ago

Merge pull request #2087 from ilya-lavrenov:remap_sse2_cond

History

Updated by Alexander Shishkov over 12 years ago

  • Assignee deleted (Vadim Pisarevsky)

Updated by Andrey Pavlenko over 12 years 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 over 12 years 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 test_optflowpyrlk.cpp added
  • File blocks1.png added
  • File blocks2.png added

Updated by Vadim Pisarevsky over 12 years 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

  • Target version set to 2.4.3
  • Status changed from Open to Cancelled
  • Assignee set to Vadim Pisarevsky

Also available in: Atom PDF