Segmentation fault in Canny detector (Bug #3978)


Added by Alexander Cheparukhin over 10 years ago. Updated over 10 years ago.


Status:Done Start date:2014-10-24
Priority:Normal Due date:
Assignee:yao wang % Done:

0%

Category:imgproc, video
Target version:2.4.11
Affected version:2.4.9 (latest release) Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

Canny detector crashes with the attached image:

cv::Mat im = cv::imread("index.jpeg", cv::IMREAD_GRAYSCALE);
cv::Mat edges;
cv::Canny(im, edges, 50, 70, 3, true);

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5d02ff1 in cv::Canny (_src=..., _dst=..., low_thresh=2500, high_thresh=4900, aperture_size=3, L2gradient=true)
at /home/cheparukhin/Downloads/opencv-2.4.9/modules/imgproc/src/canny.cpp:309
309 if (!m[-1]) CANNY_PUSH(m - 1);

I'm building using gcc 4.7.3 on Ubuntu x64.


index.jpeg (74.9 kB) Alexander Cheparukhin, 2014-10-24 09:01 pm


Associated revisions

Revision 184b6e31
Added by Yan Wang over 10 years ago

Fix canny segment fault (Bug #3978)

Avoid stack overflow based on std::vector cause
std::vector::resize() segmentation fault.

History

Updated by Ilya Lavrenov over 10 years ago

  • Assignee changed from Vadim Pisarevsky to yao wang
  • Status changed from New to Done
  • Target version set to 2.4.11

Also available in: Atom PDF