How can i pass row jpg data to OpenCV? i have the code that saves the image and then opens it again but it is to slow for my purpes, does someone know how to do it without saving?
import requests
from PIL import Image
from io import BytesIO
import cv2
while True:
response = requests.get("https://www.cleverfiles.com/howto/wp-content/uploads/2018/03/minion.jpg", stream=True, allow_redirects=True)
image = Image.open(BytesIO(response.content))
image.save(r'C:\Users\marti\Pictures\Desktop\scripts\CAM\IMG.jpg', 'JPEG') #SAVE
frame = cv2.imread(r'C:\Users\marti\Pictures\Desktop\scripts\CAM\IMG.jpg') #OPEN
cv2.imshow("dfsdf",frame)
cv2.destroyAllWindows