gorilla

How to send OpenCV Image using python requests to Go Endpoint

How to send OpenCV Image using python requests to Go Endpoint Question: Here is the code for my camera script import cv2 import requests from datetime import datetime from time import sleep def sendImage(frame): imencoded = cv2.imencode(".jpg", frame)[1] now = datetime.now() seq = now.strftime("%Y%m%d%H%M%S") file = {‘file’: (seq+’.jpg’, imencoded.tobytes(), ‘image/jpeg’)} response = requests.post("http://localhost:3004/", files=file, timeout=5) …

Total answers: 1