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