Тёмный

Detecting colors (Hsv Color Space) - Opencv with Python 

Pysource
Подписаться 61 тыс.
Просмотров 90 тыс.
50% 1

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

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 74   
@dikshabagade5542
@dikshabagade5542 4 года назад
You are such a saviour, thank you so much man. I wanted this so bad
@cybercribe2460
@cybercribe2460 2 года назад
Nice tutorial but a doubt how did you detect the values of lower_red,blue,green and upper_red,blue,green??
@NeilSummersgill
@NeilSummersgill 2 года назад
cv2.createTrackbar for HSV is very useful for getting the ranges correct
@stanleychen6710
@stanleychen6710 2 года назад
Teach me how Neil!!!
@NiVofHiR
@NiVofHiR 4 года назад
Great video tutorial, thanks for sharing!
@coursfiliereeln4592
@coursfiliereeln4592 Год назад
hello thank you for the video it's helpful.. i have a question? if we need to apply this with depth images how i can do this?
@venkatasubramaniamr6982
@venkatasubramaniamr6982 3 года назад
Hi nice video for leaning for color deduction. I want to know what is the logic to find color lower and upper hsv value without any tool. Can you share the easy logic to find that . Example for green how to find low and high
@patrickeidemuller2757
@patrickeidemuller2757 2 года назад
i also would like to know that
@LoperDavis
@LoperDavis 2 года назад
I would also like to know
@lymtics88
@lymtics88 5 лет назад
I wrote the same code as yours but the 'mask' interface is always black. What is the problem? Thanks a lot
@abdelrhmanshokr7546
@abdelrhmanshokr7546 3 года назад
yeah same here no matter what values I pass in high and low I keep getting a black image as a result with rgb values 0, 0, 0 and I don't get it did you find a solution to it ? if so please let me know
@sudiptachatterjee5862
@sudiptachatterjee5862 5 лет назад
You are great brother.................
@halilavc737
@halilavc737 3 года назад
Thanks bro . Amazing . Thank you so much
@stanleychen6710
@stanleychen6710 2 года назад
Hi Sergio! Can you tell us what that cool software for picking colors is called? I really need it. Thanks
@ramadhaniramadhani5592
@ramadhaniramadhani5592 3 года назад
Hello sir, why i can't run cV2.bitwise_and on my PC. Can you explain about it?
@pedrobb7
@pedrobb7 5 лет назад
When you selected low_red and high_red in which format the colors are? RGB, BGR, HSV?
@Jbc1507
@Jbc1507 5 лет назад
hsv, look the first argument passed to cv2.inRange()
@gabeitch9460
@gabeitch9460 5 лет назад
@@Jbc1507 Is it though? Because saturation and value can only have a maximum number of 100 since they are percentage values but the variable 'high_red' has a saturation and value number of 255 and 255. I'm not sure what format the colours are in either. Anyone else know?
@lymtics88
@lymtics88 5 лет назад
@@gabeitch9460 The same question! And also, the RGB color of python is different from that from google...
@ndxs
@ndxs 5 лет назад
stackoverflow.com/questions/10948589/choosing-the-correct-upper-and-lower-hsv-boundaries-for-color-detection-withcv
@abdelrhmanshokr7546
@abdelrhmanshokr7546 3 года назад
great video thanks a lot but I've an issue here no matter what ranges of colours I pass as high and low I keep getting a black image as a result and I don't really get why can anyone help me understand why this is happening (I am trying to block all colours except for black) but again I wrote the same code with the same values to make sure that the problem isn't with my ranges but the same result always pops up a black image with rgb = 0, 0, 0 and as I said I don't get it
@johntran468
@johntran468 4 года назад
Hi, what if I only want to detect only the white color, can you tell me what is the threshold or someway to calculate it? Thank you
@mounahammouda1641
@mounahammouda1641 3 года назад
Thank you for this video, have you an idea how i can detect white cracks in a white surface, but the saturation of the surface and cracks are not similar. thanks
@rajvindermann7655
@rajvindermann7655 3 года назад
Hi, may i know how to detect the object which has similar colour to the background? Thank you.
@mauriziovetere1956
@mauriziovetere1956 5 лет назад
Nice tutorial! Is there a way to detect all chosen colors on one screen sweep instead of repeating the operation for each of them? I'm talking about the inRange() and bitwise_and() parts, I ask for performance purposes
@kevinliem6284
@kevinliem6284 3 года назад
hi bro nice tutorial, i want to ask something, how if we want to add more color on it? lets say we want to add secondary color, like purple, maroon or something else? how is it?
@lipikams2886
@lipikams2886 3 года назад
It shows can't find camera device..could someone help me...
@brunorafaelalmeida2083
@brunorafaelalmeida2083 2 года назад
Thanks for the video concepts, but here for me the jupyter notebook (where I use to develop these types of programs) gives an error after I finish the program, and to get around this it is good practice to destroy the images and data that will not be most used after the end of the program. After doing this, the error in my kernel stopped showing up. This destruction of data that will not be used after the end of the program can be done by the following lines at the end of the program and outside the loop and conditional: cap.release() cv2.destroyAllWindows() PS: Hope this is helpful to someone.
@wisdom_wellness365
@wisdom_wellness365 4 года назад
Brilliant!
@AgeloszInonos
@AgeloszInonos 3 года назад
The color ranges. I have trouble calculating for other colors like yellow, How do you calculate upper and lower bounds for all colors?
@pysource-com
@pysource-com 3 года назад
hi, I have a video where I show how to calculate the ranges: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-SJCu1d4xakQ.html&pp=qAMBugMGCgJpdBAB
@ankor2998
@ankor2998 4 года назад
If Color is detected the it show message like image is detected...How i print that message
@aliihsancukur6866
@aliihsancukur6866 5 лет назад
can you do applications with some more advanced functions ? for example imutils related to thank you
@suphasud
@suphasud Год назад
Bravoooooooooooooooooo
@tuminh9656
@tuminh9656 2 года назад
Hi Pysource, if the background color is similar to the object color, is there a way to detect and draw only the outline of the object?
@pysource-com
@pysource-com 2 года назад
In this case, either you tune the parameters to detect correctly only the color you're focusing on, or probably this method is not good for your specific case. I recommend to watch this free crash course: Computer Vision Blueprint pysource.com/register-to-watch-the-computer-vision-blueprint-workshop/ where I talk about 5 different object detection methods and color detection is only one of them
@tuminh9656
@tuminh9656 2 года назад
@@pysource-com Thank you so much
@priyanshujain5215
@priyanshujain5215 4 года назад
Is there a reason red color in background picture is not visible? because similar thing happens when i try detecting color that are at distance , idk why?
@pysource-com
@pysource-com 4 года назад
It's not about the distance, but about its luminance. you can adjust the low and higher ranges to include also that color. check this video to understand better how to adjust the ranges in real time. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-SJCu1d4xakQ.html
@machain1996
@machain1996 4 года назад
nice video, man.
@lokeshsaha8875
@lokeshsaha8875 4 года назад
Hey, can you please help me how to detect background color of an image?
@raghuld3635
@raghuld3635 5 лет назад
I'm doing a similar project with OpenCV. Could you help me with that, sir????
@vijaybhanushali9696
@vijaybhanushali9696 5 лет назад
thanks ✌✌
@Gabo_1457
@Gabo_1457 5 лет назад
Hello! I want to create a function that for example, that if it detects a color that prints hello or something, how can i do that?
@pysource-com
@pysource-com 5 лет назад
Hello, It's simple. You can check the size of the mask. 1) You calculate the area of each mask, you can simply do that by counting the number of white pixels in the mask (check one of my video about finding dirrerences between two images to see how to do that). 2) Then you can define the if the size is above a certain number of pixel, the color is detected.
@heisenolf13
@heisenolf13 4 года назад
@@pysource-com hey can you elaborate that please, we are not using images here how can we calculate the are of the live cam mask
@trolleyproblem4318
@trolleyproblem4318 4 года назад
Can you try with LAB?
@claudiolossinno1677
@claudiolossinno1677 5 лет назад
great!
@francescopistone4086
@francescopistone4086 4 года назад
Does somebody know how to make that in C++(Visual Studio)?
@SW1NDLER_TR1CKSTER
@SW1NDLER_TR1CKSTER 4 года назад
Is this possible on a raspberry pi?
@GodLikeChannel.
@GodLikeChannel. 4 года назад
Could you make to it with unity and build to android?
@junlizhang876
@junlizhang876 4 года назад
veli good.
@AafthabNt
@AafthabNt 3 года назад
can u make a video on extraction of nail using image segnmentation
@AafthabNt
@AafthabNt 3 года назад
from image
@thephiluong1893
@thephiluong1893 4 года назад
excuse me can you tell me what software you use to determined range of colors
@Benozaur
@Benozaur 3 года назад
they are guessing i belive. It SUCKS!
@cheems6559
@cheems6559 3 года назад
Use trackbars to decide the colour
@hrithiks680
@hrithiks680 3 года назад
Which webcam are you using???
@pysource-com
@pysource-com 3 года назад
logitech c922 pro
@ApplySkills
@ApplySkills 4 года назад
how the hell can i learn how to set the correct range numbers?
@knowcode6374
@knowcode6374 4 года назад
hello sir i want to extract skin color and put it to another person ,how to do it sir?
@chadlee3401
@chadlee3401 4 года назад
Wtf lol
@knowcode6374
@knowcode6374 4 года назад
@@chadlee3401 fuck off 🖕 ,I already did this
@edilgin622
@edilgin622 3 года назад
thats racist
@dimitarvel1441
@dimitarvel1441 5 лет назад
*pulls out yellow box* - a green one
@sterlingarcher3981
@sterlingarcher3981 5 лет назад
It's more of a lime green
@samsepiol5267
@samsepiol5267 3 года назад
hi sergio, can i ask something, if i wanna actuate a servo motor, after the camera detected one particular color, what function should i use ?
@hassanahmed9886
@hassanahmed9886 4 года назад
low_red = np.array([161, 155, 84]) , how you found these values (161,155,84).. How these values has been obtained?
@lolsword7
@lolsword7 3 года назад
The values seem to be a subjective choice It would seem Pysource viewed a series of colours with different HSV parameters in Gimp. From his eyes, anything less than [161, 155, 84] does not resemble red
@rverm1000
@rverm1000 4 года назад
Very good job. Works well
Далее
Object Tracking with Opencv and Python
30:03
Просмотров 612 тыс.
OpenCV Python Tutorial #5 - Colors and Color Detection
14:06
Things Never Seen Before In Trackmania
28:59
Просмотров 41 тыс.
Why Does Diffusion Work Better than Auto-Regression?
20:18