MCPcopy Create free account
hub / github.com/devilsen/CZXing / extract

Method extract

python/QR_Extractor.py:13–25  ·  view source on GitHub ↗
(self, img_path)

Source from the content-addressed store, hash-verified

11 self.detector = pb.FactoryFiducial(np.uint8).qrcode()
12
13 def extract(self, img_path):
14 if not os.path.isfile(img_path):
15 print('File not found:', img_path)
16 return None
17 image = pb.load_single_band(img_path, np.uint8)
18 self.detector.detect(image)
19 qr_codes = []
20 for qr in self.detector.detections:
21 qr_codes.append({
22 'text': qr.message,
23 'points': qr.bounds.convert_tuple()
24 })
25 return qr_codes

Callers 2

decode_qr_odeFunction · 0.95
decode_qr_codeMethod · 0.80

Calls 2

printFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected