I\'m working on an app that to do some facial recognition from a webcam stream. I get base64 encoded data uri\'s of the canvas and want to use it to do something like this:<
This is my solution for python 3.7 and without using PIL
import base64 def readb64(uri): encoded_data = uri.split(',')[1] nparr = np.fromstring(base64.b64decode(encoded_data), np.uint8) img = cv2.imdecode(nparr, cv2.IMREAD_COLOR) return img
i hope that this solutions works for all