How to Detect Colors in OpenCV [Python]

preview_player
Показать описание
How to Detect Color in OpenCV [Python]
- a video by CreepyD

In this tutorial video, I'll be showing you how to detect colors in OpenCV. I'll be explaining HSV and how to mask images for color detection using OpenCV. I won't only show you how to detect color in OpenCV Python, but I will also show color tracking OpenCV. Color detection using OpenCV is very useful, and will certainly help with a lot with your Computer Vision projects.

If you have any questions on the topic of Color Detection in Python using OpenCV feel free to ask in the comment section or join my Discord using the link further down below in the description. I would love to help you explain Python OpenCV better, it would also help me improve seeing as I myself don't know everything about the topic.

____________
USEFUL DOCUMENTATIONS:

̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅

____________
OTHER TUTORIALS:

̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅

____________
OTHER MEDIA:

̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅
Рекомендации по теме
Комментарии
Автор

First time watching your videos, it's a 6:50 length video but it contains information that needs hours to obtain by researching.
I really appreciate this, thank you!

abdelrazzaqabuhejleh
Автор

Jesus fucking christ thank you for this video.

Ive been looking for a guide that actually explains the HSV values in opencv for hours now.

FizzyPinepple
Автор

no joke your teaching style is one of the best ive seen in any programming tutorial

balbuzio
Автор

Damn, good explanation and done in a short amount of time. Well done!

OVERkill
Автор

Wow, tu forma de explicar es genial. Vi cerca de 30 videos diferentes donde no dejaban claro estos temas, pero tú los explicaste en 6 minutos y medio! Muchas Gracias!

diegovalentino
Автор

Hey CreepyD, nice to meet you! I just found your channel and subscribed, love what you're doing!

I like how clear and detailed your explanations are as well as the depth of knowledge you have surrounding the topic! Since I run a tech education channel as well, I love to see fellow Content Creators sharing, educating, and inspiring a large global audience. I wish you the best of luck on your YouTube Journey, can't wait to see you succeed! Your content really stands out and you've put so much thought into your videos!

Cheers, happy holidays, and keep up the great work!

empowercode
Автор

I was literally starving for ur video in my feed..

Автор

Micheal reeves just used this same stuff in his new video, good video man : ) Idk why it took him a year to do it and you 6mins

matteoetchart
Автор

Hello, CreepyD, I am intrigued by your video and how effectively you were capable of developing this colour detection algorithm. However, I have a pertinent question: at 5:13 you demonstrate how the "cv2.CHAIN_APPROX_SIMPLE" method outlines the 4 edges of the mask, then at 5:52 you state that the x, y, z... variables return the coordinates of the bounding rectangle (for example, the bottom right corner is the 100th px by 900th px out of a 1600 px by 1200 px camera). Does this mean that these variables specify the pixel position(s) of the outline and if not, then how? Also, is this code compatible with the AI-Thinker ESP-32 CAM?

gllt.
Автор

Explained it perfectly. Thank you very much

useruseruseruseruseruser
Автор

hi, thx for the tutorial, but how do i output the coordinates of the rectangle?

mattska
Автор

What is the range of detect white object ???

aseelalmarafi
Автор

what if i want to print x, y and the other corners on the live video, what should i do

beatrixkiddo
Автор

What algorithm is used in this project?

tfue
Автор

Great video bro . How to change Any colour to specific colour or some sort in a jpg or png format.Thanks have a great day.

samarumugam
Автор

can you do the same thing but instead of rectangle give circle? :)

thinker
Автор

Hello, I'm trying to create a program that detects and counts objects by color, but now I can only count four colors, these are red, blue, green and yellow. I wonder if I can add the whole color scale to the program, how can I do this? I will be very happy if you give back. have a nice day

borallylyl
Автор

Hi CreepyD, if the background color is similar to the object color, is there a way to detect and draw only the outline of the object?

tuminh
Автор

Hi CreepyD,

Perfect Video and I was wondering to use from your method to count the object with same color.
How can we count the number of contour that you detect through webcam?

Thanks for your nice and interesting python code.
Bests,

pezhman
Автор

Hello! How do you get the average colour of a selected area?

kethmieperera