Convert image captured from online MJPG streamer by CV2, to Pillow format
Advertisements From an image that captured from an online MJPG streamer by CV2, I want to count its colors by Pillow. What I tried: import cv2 from PIL import Image url = "http://link-to-the-online-MJPG-streamer/mjpg/video.mjpg" cap = cv2.VideoCapture(url) ret, original_image = cap.read() img_cv2 = cv2.cvtColor(original_image, cv2.COLOR_BGR2RGB) img_pil = Image.fromarray(img_cv2) im = Image.open(img_cv2).convert(‘RGB’) na = np.array(im) colours, counts… Read More Convert image captured from online MJPG streamer by CV2, to Pillow format