MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / _decode_dataurl_to_bgr

Method _decode_dataurl_to_bgr

IntelOSINT.py:10707–10715  ·  view source on GitHub ↗
(self, data_url)

Source from the content-addressed store, hash-verified

10705 return None
10706
10707 def _decode_dataurl_to_bgr(self, data_url):
10708 import numpy as np
10709 import cv2
10710 if not data_url or "," not in data_url:
10711 return None
10712 raw = data_url.split(",", 1)[1]
10713 img_bytes = base64.b64decode(raw)
10714 arr = np.frombuffer(img_bytes, dtype=np.uint8)
10715 return cv2.imdecode(arr, cv2.IMREAD_COLOR)
10716
10717 def _annotate_faces(self, bgr, faces):
10718 import cv2

Callers 1

extract_from_imageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected