Skip to content

Line segment detector crashes when no keylines found! #647

@dialectics

Description

@dialectics

This bug report follows This question at OpenCV Answers. In short, the line detector (both of them) crash when no keylines are found. Either a graceful error (throw etc.) or a normal behavior (e.g. set the keylines detector to a special value that will produce a descriptor of all-zeroes), would be fine.

The code fails at line 2475 of binary_descriptor.cpp, with an Access violation writing location 0x0000000000000000 message.

The image, a minimal reproducing example, and possibly some more info can be found at the above mentioned Opencv Answers question.
UPDATE: Since answers.opencv.org seems to be down, i will repost all necessary info here:

The image i refer to is
06-scale_1_im_1_col
The code that crashes is cv::Mat Image= cv::imread("pathToImage", CV_LOAD_IMAGE_COLOR); Ptr<cv::line_descriptor::BinaryDescriptor> LINES = cv::line_descriptor::BinaryDescriptor::createBinaryDescriptor(); std::vector<cv::line_descriptor::KeyLine> keylines; LINES->detect(Image, keylines);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions