Тёмный

OpenCV Python Tutorial #5 - Colors and Color Detection 

Tech With Tim
Подписаться 1,6 млн
Просмотров 111 тыс.
50% 1

Welcome to this video in the OpenCV tutorial series! In this one, I'll be talking about colors and how to detect them. We can even detect specific colors from our video feed and only display those colors. We'll also go over color display methods like RGB, BGR, and HSV.
💻 AlgoExpert is the coding interview prep platform that I used to ace my Microsoft and Shopify interviews. Check it out and get a discount on the platform using the code "techwithtim" algoexpert.io/techwithtim
📄 Relevant Documentation: opencv-python-tutroals.readth...
📝 Code For This Series: github.com/techwithtim/OpenCV...
🔍 Playlist: • OpenCV Python Tutorials
⭐️ Timestamps ⭐️
00:00 | Introduction
00:45 | HSV Color
06:40 | Masks
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
💰 Courses & Merch 💰
💻 The Fundamentals of Programming w/ Python: tech-with-tim.teachable.com/p...
👕 Merchandise: teespring.com/stores/tech-wit...
🔗 Social Medias 🔗
📸 Instagram: / tech_with_tim
📱 Twitter: / techwithtimm
⭐ Discord: / discord
📝 LinkedIn: / tim-ruscica-82631b179
🌎 Website: techwithtim.net
📂 GitHub: github.com/techwithtim
🔊 Podcast: anchor.fm/tech-with-tim
🎬 My RU-vid Gear 🎬
🎥 Main Camera (EOS Canon 90D): amzn.to/3cY23y9
🎥 Secondary Camera (Panasonic Lumix G7): amzn.to/3fl2iEV
📹 Main Lens (EFS 24mm f/2.8): amzn.to/2Yuol5r
🕹 Tripod: amzn.to/3hpSprv
🎤 Main Microphone (Rode NT1): amzn.to/2HrZxXc
🎤 Secondary Microphone (Synco Wireless Lapel System): amzn.to/3e07Swl
🎤 Third Microphone (Rode NTG4+): amzn.to/3oi0v8Z
☀️ Lights: amzn.to/2ApeiXr
⌨ Keyboard (Daskeyboard 4Q): amzn.to/2YpN5vm
🖱 Mouse (Logitech MX Master): amzn.to/2HsmRDN
📸 Webcam (Logitech 1080p Pro): amzn.to/2B2IXcQ
📢 Speaker (Beats Pill): amzn.to/2XYc5ef
🎧 Headphones (Bose Quiet Comfort 35): amzn.to/2MWbl3e
🌞 Lamp (BenQ E-reading Lamp): amzn.to/3e0UCr8
🌞 Secondary Lamp (BenQ Screenbar Plus): amzn.to/30Dtafi
💻 Monitor (BenQ EX2780Q): amzn.to/2HsmUPZ
💻 Monitor (LG Ultrawide 34WN750): amzn.to/3dSD7tS
🎙 Mic Boom Arm (Rode PSA 1): amzn.to/30EZw9m
🎚 Audio Interface (Focusrite Scarlet 4i4): amzn.to/2TjXsih
💸 Donations 💸
💵 One-Time Donations: www.paypal.com/donate?hosted_...
💰 Patreon: / techwithtim
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
⭐️ Tags ⭐️
- Color detection in OpenCV
- Colors OpenCV
- HSV OpenCV
- Python
- Computer vision
- Cameras and video capture
⭐️ Hashtags ⭐️
#OpenCV #Python #CameraCapture

Опубликовано:

 

5 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 89   
@SadSack963
@SadSack963 2 года назад
For others like me who struggled to create the numpy array: I kept getting > Unsupported depth of input image: > 'VDepth::contains(depth)' > where > 'depth' is 4 (CV_32S) This indicates that the numpy array consists of 32 bit signed integers which are not supported by cvtColor. You should create your array like this, specifying datatype uint8: bgr_color = np.array([[[blue, green, red]]], dtype=np.uint8)
@kshiprajadav179
@kshiprajadav179 2 года назад
THANKS A LOT! I struggled with this for half hour.
@alessandrodilorenzo2363
@alessandrodilorenzo2363 Год назад
HAHAAHAH same
@TheDtkxiang
@TheDtkxiang 3 года назад
I was looking into machine vision and this video's content on mask and hsv inspired me on the direction i should move in. If this had appeared earlier, i would not have wasted time figuring out canny and harris corner detection. Not that they are bad, just that I prefer simple solutions that I have full understanding of. Keep up the great work.
@labscience8271
@labscience8271 Год назад
1:11 HSV = Hue, Saturation, Value HSL = Hue, Saturation, Lightness Both are a bit different from each other.
@CubixCreations
@CubixCreations 3 года назад
Another amazing video Tim, thank you!
@JuANdELAMANaNA695
@JuANdELAMANaNA695 2 года назад
the HSV colors do not match what all the color pickers say, and i cant find one that goes from 0-255, all use degrees and %. i dont know how to get any correct HSV colors
@alexanderwang2484
@alexanderwang2484 3 года назад
This is such a well made tutorial series.
@ntechplayz6155
@ntechplayz6155 Год назад
Love the way you explain things, well done!!!
@smoothrain
@smoothrain 3 года назад
Hello Tim you’re such an amazing youtuber keep it up👏👏👏👏. From Kenya love you❤️💖
@Doraredora
@Doraredora 3 года назад
You deserve this 🙏 Tim proud to be your subscriber
@timsosnora2151
@timsosnora2151 3 года назад
Thank you so much for your tutorials !!!!
@acm1812
@acm1812 3 года назад
Great video Tim!👍
@index-zero
@index-zero 3 года назад
Awesome as always 👍
@fionanathanson6580
@fionanathanson6580 3 года назад
Awesome video Tim 👍
@LifOfJohn
@LifOfJohn 3 года назад
Very Interesting video series
@SAMETELMACI
@SAMETELMACI 3 года назад
youre awesome dude, please keep going
@learnwithnawf246
@learnwithnawf246 3 года назад
Cheers Tim :)
@arjunsahlot
@arjunsahlot 3 года назад
HSV stands for hue, saturation, value. 1:10
@ryuzu438
@ryuzu438 3 года назад
lmao i was gonna comment that ahahaha
@parthkabra4968
@parthkabra4968 3 года назад
i am watching this in a flow!!
@Life-zx5wp
@Life-zx5wp 2 года назад
thank you my big fan 😃
@tuminh9656
@tuminh9656 2 года назад
Hi Tech With Tim, if the background color is similar to the object color, is there a way to detect and draw only the outline of the object?pyD
@MrHellmeowmix
@MrHellmeowmix 2 года назад
If i wanted to use colors other than blue, am I trying to identify the color spectrum as they appear in my HSV image? like my red shirt turned green, so do I aim for the green values, or the original red values but with their HSV values?
@theebookkeeper
@theebookkeeper 3 года назад
this is educative. great work.
@chuchumuruplayz6866
@chuchumuruplayz6866 3 года назад
Just Wanted To Say I Love Your Videos! Can You Do A Tutorial On The Game Show Countdown Conundrum, It Would Be Very Much Appreciated. Keep Up The Good Work!
@naokimc
@naokimc 2 года назад
now i finally know how green screen works, yay!
@drydenstewartenterprises
@drydenstewartenterprises 3 года назад
Hey Tim, I have an idea for a tutorial I would love it if you would consider it. How to get open cv and a pyttsx3 python chat bot working together. I'm trying on my own as a beginner programmer to build a personal assistant robot that can function offline, I want to be able to ask it to identify an object, not having to display it on a screen but to verbally respond to what the object is. also, I want to incorporate s.l.a.m. into it ( I already bought 2 identical webcams for stereo vision), so it can map its environment and remember that map and update that map each time it passes through that location. It might be a bit of a challenge I'm sure, but you really have simplified so much for me so far, I really hope you will accept this!
@edwardedward7765
@edwardedward7765 3 года назад
Hello Tim, how are you ? Last time you talked about MS VSC and it was very helpful. Many thanks ^_^
@noah77
@noah77 3 года назад
:p
@johngroebe9373
@johngroebe9373 Год назад
Great set of tutorials!! I guess that before displaying the images regular on the screen the color scheme should be converted back from HSV to BGR?
@toapyandfriends
@toapyandfriends Год назад
I do visual effects work and I'm trying to write an openCV that will detect diffuse maps out of a group of normal maps and bump maps and diffuse maps and occlusion maps and roughness maps and metal maps I can't place examples of these images here you could Google and find them but can you show me how to write an open CV that will do that?
@jaimehernandezprado6356
@jaimehernandezprado6356 2 года назад
Great tutorials. Is there one for shadow detection and substraction?
@nadraibrahim6400
@nadraibrahim6400 2 года назад
Hey Tim! thank you for this wonderful tutorial. but how to get the range of colors like you did for blue. Actually I am doing a project in which colors are detected and then i want to replace that color object with a different color. like, changing the color of a t shirt.
@rkade159
@rkade159 3 года назад
Episode 5: Hello everyone, today we are going to be detecting colors. Episode 15: HACKING INTO A DRONE AND SPYING ON THE GOVERNMENT...
@omeralperensari7067
@omeralperensari7067 2 года назад
What can be done so that it does not detect another blue color. I am building an autonomous vehicle and performing color tracking. What can be done to prevent the vehicle from heading towards another object of the same color?
@vjx1163
@vjx1163 2 года назад
Help? if i set the VideoCapture value (webcam number) to anything other then 0 the cote doesnt work. i am trying to use the obs virtual camara but it will only accept 0 which is my main webcam.
@ramandeepsingh8896
@ramandeepsingh8896 3 года назад
how you get the minimum and maximum pixel value for blue color....pls help.
@hobbitthegobbit
@hobbitthegobbit 2 года назад
Hey man, amazing video. Can I ask how to put rectangle on the image after that. I mean yes mask find blue, then i want to put a rectangle to show it on screen. Thank you
@sercanalnca1962
@sercanalnca1962 Год назад
Hi everyone. Is it possible to fill the area with any number that contains the same color?
@princemajestal8100
@princemajestal8100 2 года назад
Supposing I would want to send a signal or print something on the screen when a certain color is detected, how would I proceed?
@MichielVanzeir
@MichielVanzeir 2 года назад
If statement + cv2.puttext
@lukajeliciclux3074
@lukajeliciclux3074 3 года назад
@TechWithTim V in HSV mean value for value of brightness
@_shivi_7425
@_shivi_7425 Год назад
please help i am getting the following error "module 'cv2' has no attribute 'bitswise_not'"
@malek3764
@malek3764 3 года назад
Can you add this video to the OpenCV playlist?
@lifesgood5065
@lifesgood5065 3 года назад
next video tutorial series How to solve the rubics cube?
@rwtNitin
@rwtNitin 3 года назад
How can u convert a black and white image to colored image
@Malkawi_FTP
@Malkawi_FTP 2 года назад
V in HSV stands for vibrance
@muhammadanique2256
@muhammadanique2256 3 года назад
What changes are required if we want to detect green instead of blue? Tim explained it but i couldn't get it. Anyone?
@balarohank4416
@balarohank4416 2 года назад
same question
@ItsMe28755
@ItsMe28755 Год назад
Change the HSV values in the upper_blue and lower_blue variables
@dreamwork69
@dreamwork69 Год назад
V is stand for Value in Graphic Field it means Brightness
@DGHere12
@DGHere12 3 года назад
Hello, TechWithTim
@oskarkottom8365
@oskarkottom8365 2 года назад
hsv means hue saturation and value
@teacheronat
@teacheronat Год назад
BGR of Color: [[[255 0 0]]] HSV of Color: [[[120 255 255]]] Lower Limit: (110, 100, 100) Upper Limit: (130, 255, 255)
@KrishuBrawlStars
@KrishuBrawlStars 3 года назад
Sir full tutorial of flask!!!! Plzz..... 🥺🥺🙏🏼🙏🏼🙏🏼
@yuvaraj_i
@yuvaraj_i 3 года назад
Check the playlist
@sakethgupta2885
@sakethgupta2885 3 года назад
I'm pretty sure 1 and 0 = 1 and those stuff are called Truth Tables. They are pretty much like multiplication in maths. Consider the 1 as + and 0 as - and the "and" as * , then 0 and 1(- * +) = -(0). Its something likes that anyway you can go ahead and search in google about it.
@sauvikmondal4828
@sauvikmondal4828 2 года назад
so you're saying (0 and 0) is 1 cause (- * -) = +
@13bimbou
@13bimbou 10 месяцев назад
1 and 0 is 0
@TechnicalRNP
@TechnicalRNP 3 года назад
Create Chroma Key using OPENCV
@dan-cj1rr
@dan-cj1rr 3 года назад
It's all fun and games when you have a clear image, but when you have an image with unclear colors and poor quality, it becomes hard
@hissy_dev
@hissy_dev Год назад
why do i get white image instead blue
@hissy_dev
@hissy_dev Год назад
omg i was using blue filter screen
@JohnSmith952
@JohnSmith952 15 дней назад
HSV stands for Hue, Saturation and Value...
@davidcarlson2481
@davidcarlson2481 3 года назад
HSV = Hue, Saturation, Value
@meFawadIqbal
@meFawadIqbal 3 года назад
Cuther = Color
@addledanorak8297
@addledanorak8297 3 года назад
Second
@lucasanss3294
@lucasanss3294 3 года назад
#6 and #7 just got private
@ArunKumar-ls4bl
@ArunKumar-ls4bl 3 года назад
am i the only one who asks every time myself when i watch tim .... why doesn't TIM grow his HAIR? .... i want to see that look.
@yrath5034
@yrath5034 3 года назад
Can I ask why you pronounce "Color" as "Cother"?
@swastiksarkar9856
@swastiksarkar9856 2 года назад
Exactly. I noticed it too!
@manewry66tw
@manewry66tw 3 года назад
Tim finally showed his evil nature.
@lavia5206
@lavia5206 3 года назад
First
@ammartaj4205
@ammartaj4205 5 месяцев назад
cothers
@adrien123_
@adrien123_ 3 года назад
hey
@hey9530
@hey9530 2 года назад
hsv tutorial leftg me confused
@Boltier
@Boltier 14 дней назад
Tim looks so cursed.
@parthkabra4968
@parthkabra4968 3 года назад
12:07 u really look weird after coming back to the original world!
@sakethgupta2885
@sakethgupta2885 3 года назад
I see. I see where this is going FACIAL RECOGNITION AWEEESOMMEEEEEEE.
@Rishikesh-24
@Rishikesh-24 3 года назад
Use face cascades
@sakethgupta2885
@sakethgupta2885 3 года назад
Wot
@ananthramvijayaraj4554
@ananthramvijayaraj4554 3 года назад
First
@kikku4304
@kikku4304 3 года назад
Second
Далее
OpenCV Python Tutorial #6 - Corner Detection
21:43
Просмотров 70 тыс.
How to Detect Colors in OpenCV [Python]
6:51
Просмотров 39 тыс.
На фейсконтроле 💂
09:41
Просмотров 457 тыс.
Я НЕ ОЖИДАЛ ЭТОГО!!! #Shorts #Глент
00:19
Why The Windows Phone Failed
24:08
Просмотров 225 тыс.
Adam Savage's Latest Flea Market Haul!
11:05
Просмотров 235 тыс.
Please Master These 10 Python Functions…
22:17
Просмотров 112 тыс.
Extracting Dominant Colors From Images in Python
8:18
OpenCV Python Tutorial #8 - Face and Eye Detection
16:08
Learn Python With This ONE Project!
55:04
Просмотров 1,7 млн