Ask Your Question
0

objdetect module qrcode cant decode QR Code version 6

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

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) https://whatis.techtarget.com/definit...

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/libc.so.6(+0x777e5)[0x7ff3ee8737e5] /lib/x86_64-linux-gnu/libc.so.6(+0x8213e)[0x7ff3ee87e13e] /lib/x86_64-linux-gnu/libc.so.6(+0x82c0a)[0x7ff3ee87ec0a] /lib/x86_64-linux-gnu/libc.so.6(posix_memalign+0x11d)[0x7ff3ee88371d] /usr/local/opencv4/lib/libopencv_core.so.4.0(_ZN2cv10fastMallocEm+0x39)[0x7ff3ef21572a] /usr/local/opencv4/lib/libopencv_core.so.4.0(+0x26853e)[0x7ff3ef3c653e] /usr/local/opencv4/lib/libopencv_core.so.4.0(_ZN2cv3Mat6createEiPKii+0x388)[0x7ff3ef3c75b6] /usr/local/opencv4/lib/libopencv_objdetect.so.4.0(_ZN2cv3Mat6createEiii+0xb2)[0x7ff3f089efa4] /usr/local/opencv4/lib/libopencv_objdetect.so.4.0(_ZN2cv3MatC2ENS_5Size_IiEEiRKNS_7Scalar_IdEE+0xe6)[0x7ff3f08f3b38] /usr/local/opencv4/lib/libopencv_objdetect.so.4.0(+0x8c6be)[0x7ff3f08fc6be] /usr/local/opencv4/lib/libopencv_objdetect.so.4.0(+0x8cb46)[0x7ff3f08fcb46] /usr/local/opencv4/lib/libopencv_objdetect.so.4.0(_ZN2cv14QRCodeDetector6decodeB5cxx11ERKNS_11_InputArrayES3_RKNS_12_OutputArrayE+0x411)[0x7ff3f08fd0d5] ./qrcode_example[0x40864f] ./qrcode_example(main+0x35c)[0x407457] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7ff3ee81c830] ./qrcode_example(_start+0x29)[0x406fc9]

edit retag flag offensive close merge delete

Comments

1

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

supra56 gravatar imagesupra56 ( 2019-09-20 09:35:09 -0600 )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 -0600 )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 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

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

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

Stats

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

Seen: 351 times

Last updated: Sep 20 '19