You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
checkBarInputImage - which checks if image is graychannel and if not it converts it to gray channel.(among few others check).
detect - Next, it calls detect method with original input image, and not the graychannel image. Later on, the method detect uses the same checkBarInputImage to reconvert the original input image to graychannel.
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
opencv_contrib/modules/barcode/src/barcode.cpp
Line 258 in e94ec40
needs to be changed from
img
toinarr
.Issue submission checklist
answers.opencv.org, Stack Overflow, etc and have not found solution
The text was updated successfully, but these errors were encountered: