Buchen Sie Ihren Aufenthalt Unsere Preise

Buchen Sie Ihren Aufenthalt

Video_13@09-08-2021_17-18-48.mp4 Link

def extract_feature(video_path): # Initialize video capture cap = cv2.VideoCapture(video_path) if not cap.isOpened(): print("Cannot open camera") return

# Convert frame to a different color space if needed; here we use RGB # But OpenCV reads in BGR by default, so we don't convert here blue, green, red = cv2.split(frame) video_13@09-08-2021_17-18-48.mp4

import cv2 import numpy as np

total_red += cv2.mean(red)[0] total_green += cv2.mean(green)[0] total_blue += cv2.mean(blue)[0] so we don't convert here blue

while cap.isOpened(): ret, frame = cap.read() if not ret: break video_13@09-08-2021_17-18-48.mp4

frame_count = 0 total_red = 0 total_green = 0 total_blue = 0

cap.release()