mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-25 23:37:16 +00:00
fix: [qrcode extractor] filter invalid image
This commit is contained in:
parent
09260f68ae
commit
ee02a72288
1 changed files with 2 additions and 2 deletions
|
@ -54,8 +54,8 @@ class QrCodeReader(AbstractModule):
|
|||
try:
|
||||
image = cv2.cvtColor(cv2.imread(path), cv2.COLOR_BGR2RGB)
|
||||
except cv2.error:
|
||||
print(self.obj.get_global_id())
|
||||
image = cv2.imread(path)
|
||||
self.logger.warning(f'Invalid image: {self.obj.get_global_id()}')
|
||||
return []
|
||||
|
||||
try:
|
||||
decodeds = decode(image)
|
||||
|
|
Loading…
Reference in a new issue