Ask Your Question

objdetect module qrcode cant decode QR Code version 6

asked 2019-09-20 02:31:01 -0500

Hi, I'm running the example /opencv-4.0.0/sample/cpp/qrcode.cpp to detect and decode QR code. It can work with QR Code version 1~5, it seems like run QR code version 6 will cause memory corruption:

The qr code example from below link (Example of a QR code)

I traced the code it seem like the following line will stop the decoding processing and cause the memory corruption /opencv-4.0.0/modules/objdetect/src/qrcode.cpp straight = Mat(Size(version_size, version_size), CV_8UC1, Scalar(0));

Can someone explain me how to solve it ? Thanks

======= Backtrace: ========= /lib/x86_64-linux-gnu/[0x7ff3ee8737e5] /lib/x86_64-linux-gnu/[0x7ff3ee87e13e] /lib/x86_64-linux-gnu/[0x7ff3ee87ec0a] /lib/x86_64-linux-gnu/[0x7ff3ee88371d] /usr/local/opencv4/lib/[0x7ff3ef21572a] /usr/local/opencv4/lib/[0x7ff3ef3c653e] /usr/local/opencv4/lib/[0x7ff3ef3c75b6] /usr/local/opencv4/lib/[0x7ff3f089efa4] /usr/local/opencv4/lib/[0x7ff3f08f3b38] /usr/local/opencv4/lib/[0x7ff3f08fc6be] /usr/local/opencv4/lib/[0x7ff3f08fcb46] /usr/local/opencv4/lib/[0x7ff3f08fd0d5] ./qrcode_example[0x40864f] ./qrcode_example(main+0x35c)[0x407457] /lib/x86_64-linux-gnu/[0x7ff3ee81c830] ./qrcode_example(_start+0x29)[0x406fc9]

edit retag flag offensive close merge delete



@LBerger. I couldn't find link for OpenCV 4.1.2.

supra56 gravatar imagesupra56 ( 2019-09-20 09:35:09 -0500 )edit

Ah yes it is General configuration for OpenCV 4.1.2-pre. i built everything opencv_contrib for c++, python and andr'oid

LBerger gravatar imageLBerger ( 2019-09-20 10:46:48 -0500 )edit

I update opencv 4.1.1. It cannot reproduce and memory corruption wont happen. It can detect ,but no decode information for this QR code. Any suggestion for helping decode information? Thanks.

nickhsu gravatar imagenickhsu ( 2019-09-22 20:42:13 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2019-09-20 02:39:10 -0500

LBerger gravatar image

I cannot reproduce your issue using opencv 4.1.2. Please update opencv and try again

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-09-20 02:31:01 -0500

Seen: 195 times

Last updated: Sep 20 '19