im trying to get the most dominant colors from a video, when starting to play want to draw in real time the colors from the video, for example the 6 most dominant, 3, etc, i searched a lot but all tutorials they all detecting only three colors, red, blue and green, someone may be detecting a bit more because they are setting the values by themselves, using the hsv map to they can set which colors detect, mine problem is that is a video, so i wont know the ranges
while(True):
# Capture the video frame
# by frame
ret, frame = vid.read();
prev = time.time();
capture = cv.VideoCapture(args['file'])
img = cv.imread("./assets/taxi.jpeg");
rgb_color = cv.cvtColor(frame, cv.COLOR_BGR2RGB);
height, width, channel = rgb_color.shape;
histogram = cv.calcHist([frame],[0],None,[256],[0,256]);
plt.plot(histogram);
cv.imshow("histogram", plt);
for now just open the webcam and showing the histogram