index.py
669 Bytes
import process
import base64
if __name__ == '__main__':
p = process.Process()
# image to base64 encoding
# you have to set 'encoded_image' to frame code
with open("./known_images/obama.jpg", "rb") as img_file:
encoded_obama_image = base64.b64encode(img_file.read())
with open("./test_images/Fire.jpg", "rb") as img_file:
encoded_fire_image = base64.b64encode(img_file.read())
with open("./test_images/unknown.jpg", "rb") as img_file:
encoded_unknown_image = base64.b64encode(img_file.read())
p.ProcessImage(encoded_obama_image)
p.ProcessImage(encoded_fire_image)
p.ProcessImage(encoded_unknown_image)