mirror of https://github.com/CIRCL/AIL-framework
fix: [qrcode extractor] filter invalid image
parent
ee02a72288
commit
86af7dd749
|
@ -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 New Issue