Closed
Description
System information (version)
4.x - Current Master Branch
Detailed description
In barcode module, detectAndDecode
method calls:-
checkBarInputImage
- which checks if image is graychannel and if not it converts it to gray channel.(among few others check).detect
- Next, it callsdetect
method with original input image, and not the graychannel image. Later on, the methoddetect
uses the samecheckBarInputImage
to reconvert the original input image to graychannel.
Relevant Lines of detectAndDecode
:-
opencv_contrib/modules/barcode/src/barcode.cpp
Lines 252 to 258 in e94ec40
Relevant Lines of detect
:-
opencv_contrib/modules/barcode/src/barcode.cpp
Lines 178 to 186 in e94ec40
Steps to reproduce
Not a logic bug, just a little unnecessary computation overhead.
I will add PR once I have green light from one of contributors.
The line
needs to be changed from img
to inarr
.
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc