11.7: Computer Vision: Blob Detection - Processing Tutorial

  Рет қаралды 129,937

The Coding Train

The Coding Train

Күн бұрын

In this computer vision tutorial, I build on top of the color tracking example and demonstrate a technique known as "blob detection" to track multiple objects of the same color.
Support this channel on Patreon: / codingtrain
Send me your questions and coding challenges!
Contact: / shiffman
Links discussed in this video:
Computer Vision for Artists and Designers by Golan Levin: www.flong.com/t...
Image Processing in Computer Vision: openframeworks....
Source Code for the Video Lessons: github.com/Cod...
p5.js: p5js.org/
Processing: processing.org
For More Computer Vision videos: • Computer Vision
For More Coding Challenges: • Coding Challenges
Help us caption & translate this video!
amara.org/v/QbrM/
📄 Code of Conduct: github.com/Cod...

Пікірлер: 74
@boiimcfacto2364
@boiimcfacto2364 3 жыл бұрын
I know I say this a lot in the comments, but holy hell was this video incredible! I'm watching it 5 years later, and it just helped me develop a large scale project. These videos are a treasure trove of information Dan, love you for these!
@finalfantasy7820
@finalfantasy7820 5 жыл бұрын
I can't believe you just made me watch a 21-min video about something I already know.
@furrane
@furrane 8 жыл бұрын
The blobs attack at the end was epic haha :) Great stuff as always :)
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
Heh, thanks!
@dhananjaysonawane1996
@dhananjaysonawane1996 3 жыл бұрын
A perfect teacher! There is algorithm + code + corner cases + customization + dance + most important fun !! Liked, subscribed and I am going to explore your channel!! Thanks for the content :)
@UltraGameCoder
@UltraGameCoder 6 жыл бұрын
you can also return a condition instead of if/else statement: return (d < distSqrt(x,y,px,py)); instead of if (d < distSqrt(x,y,px,py)) { return true; } else { return false; } same goes with simple values. let's assume we want to return 5 or 10. return ((d < distSqrt(x,y,px,py))? 5 : 10); this is how it works:if (condition)? if true : if false; condition = your check. ? = which side do I need to execute. left side of : symbol = if true is the result of the condition. right side of : symbol = if false is the result of the condition. hope you've all learned something by this message.
@carlosaugustopinheirodesousa
@carlosaugustopinheirodesousa 7 жыл бұрын
Fantastic teaching skills man! Great work!
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
So nice to hear, thank you!
@NerdMusician
@NerdMusician 5 жыл бұрын
Why bother paying Netflix when we have The Coding Train. Your tutorials have been so useful (and entertaining)!
@FlavourlessLife
@FlavourlessLife 7 жыл бұрын
Lol great tutorial, Blob Man. Not only am I learning lots, but you're also cheering me up in the process!
@birendrayasas6764
@birendrayasas6764 7 жыл бұрын
i wish he is our lecturer...so i wont skip classes.awesome teaching skills...
@mikouh
@mikouh 6 жыл бұрын
You should do a video on emotion detection with openCV, I currently have a project to do, and I wanted to do a smile detector and some typography animations, but I can't seem to find very many good stuff on this subject. Love your work btw
@DogwafflDan
@DogwafflDan 8 жыл бұрын
I love that you're covering some fairly complex subjects. There are a few areas in computer graphics that continue to baffle me: Working in gradient domain and converting back to RGB color model. FFT for 2D images fluid simulation
@benjaminrigsby1606
@benjaminrigsby1606 4 жыл бұрын
I learned two things from this video. DIY blob detection and DIY v-neck. Thank you.
@quakquak6141
@quakquak6141 8 жыл бұрын
I think you could obtain a better result with a much lower treshold and a different way to calculate the distance between a pixel and a blob, you need to calculate the shortest distance between any pixel of the blob and the given pixel, this way if the red area is big you won't get a lot of small blobs next to one another even if you don't exclude small blobs
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
oh this is a great point! I'll try to make these improvements in a future session.
@quakquak6141
@quakquak6141 8 жыл бұрын
I'm glad that I was helpful, I noticed that if you had a treshold of 20 (let's say 20 pixel of distance using the dist function and not the distSq one) if a blob becomes bigger than 40x40 pixel even if a red pixel sit right next to it's border it will be excluded from the blob
@RameenFallschirmjager
@RameenFallschirmjager 5 жыл бұрын
damn! this channel is a virtual university! you handle such deep concept like nanny sings a lullaby! I name you the Aaron of the computer programmer! now I just need to find the Moses!
@ahmadsebaq2244
@ahmadsebaq2244 7 жыл бұрын
Man, you're awesome. I've learned and known away more about programming from your videos. Thanks a million ^^.
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
Thank you so much!
@pulkitgupta2434
@pulkitgupta2434 4 жыл бұрын
Dude, you are the coolest guy on the internet
@kangachiken4374
@kangachiken4374 8 жыл бұрын
Was this in a stream!?!?! Did i miss it!?!?! Thanks for these awesome videos Dan, I'm 16 and learning to code in general, but your videos are so energetic and motivating! Inspiring stuff keep it up!
@andrewlozano88
@andrewlozano88 8 жыл бұрын
haha , he makes me crack up up sometimes . fun to learn with Dan!
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
Thanks for watching!
@georgexu9591
@georgexu9591 7 жыл бұрын
Great work! I've read all your books and now finally see your face~ XD
@thankyouthankyou1172
@thankyouthankyou1172 4 жыл бұрын
omg , I kept laughing and laughing. so interesting playing with the blobs
@yoyomemory6825
@yoyomemory6825 4 жыл бұрын
OMG, I never knew that your code training course also covered the image processing part.!!! That' s greaaat! Thank you.,
@geoffwagner4935
@geoffwagner4935 Жыл бұрын
I just had nearly one of the scariest moments of my life, the Coding Train channel glitched and said Zero Playlists! "NooooooooooooooooooooooooooooooooOOOO!"
@chrisgavin
@chrisgavin 4 жыл бұрын
Loving these classes, thanks!
@absolutedogy346
@absolutedogy346 6 жыл бұрын
I feel like I want you to be my best friend, most genuine and good teacher I have ever seen on youtube, reminds me of classic thenewboston when I first got into programming, you really have a special talent and I wish I could just sit and absorb your knowledge forever
@andrewlozano88
@andrewlozano88 8 жыл бұрын
YESSS!!! AWESOME!! GOES PERFECT WITH MY PROJECT!!
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
so glad to hear!
@hamzahassan8024
@hamzahassan8024 4 жыл бұрын
i loveddd it
@saeidyazdani
@saeidyazdani 4 жыл бұрын
best teacher ever
@SachinBhangale
@SachinBhangale 4 жыл бұрын
Thank you, very useful fun learning video.
@esmeraldaazucena3438
@esmeraldaazucena3438 7 жыл бұрын
very nice tutorial..I have a question sir, is it possible that I can get the Object's height and width if I pixilate the object in an image
@kamanyuhuhu9985
@kamanyuhuhu9985 4 жыл бұрын
Can i get shape detection without using coloring filter ?
@hamzahassan8024
@hamzahassan8024 4 жыл бұрын
thank you so much for sharing really inspired me to code more
@sarahkatecre8
@sarahkatecre8 6 жыл бұрын
Would be interesting to experiment with the smaller threshold (as code is in 14.44 of video), when you 'comment out' the line of code that clears the blobs, you are able to track more than one colour when the mouse is clicked because it retains the previous colour as well as the new one.... Would it be possible to also remove blobs of colour being tracked with a right mouse button click or key pressed? Would also be interesting to find the average /center location of that specific colour - on the entire screen or within the larger blobs which you develop at the end of the video (and in the next couple videos in this series of course XD)
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
I like all these ideas! You could definitely keep an array of colors you are seeking and add / remove from it!
@hcemreyilmaz
@hcemreyilmaz 7 жыл бұрын
How can we decide that, our blob is circle or not? Do you have a tricky idea for this purpose?
@yuyinghan6317
@yuyinghan6317 4 жыл бұрын
How can I set the colors that need to be tracked without clicking with the mouse?
@selvapriya4115
@selvapriya4115 5 жыл бұрын
i try to track white pixel in a image, when the pixel moves,it merge with non moving white pixels.. how can i separate moving and non moving pixel in a image using opencv c++
@grillodesignstudio7334
@grillodesignstudio7334 4 жыл бұрын
Hi, it s possible to have a tutorial about tracking and draw on capture video? Help!
@atrashdingdong8870
@atrashdingdong8870 3 жыл бұрын
You're awesome! Thank you for making these videos, it brings so much joy into my life!
@kalvinkrishna6879
@kalvinkrishna6879 7 жыл бұрын
nice tutorial sir, but i still not get any idea, how could you create blob object?? how could you detect Red color into blob object?
@funwithariyan7347
@funwithariyan7347 3 жыл бұрын
THANK YOUUUUUU (is it weird that im learning this in middle school without my teacher telling me to)
@ChicagoBob123
@ChicagoBob123 7 жыл бұрын
Thanks so much. Love this.
@nicolassaganias5155
@nicolassaganias5155 5 жыл бұрын
Hi! How can I track blobs of a video file, instead from the camera?
@chamarakv98madushanka41
@chamarakv98madushanka41 6 жыл бұрын
Awsome broh...
@JaviepalFordring1
@JaviepalFordring1 8 жыл бұрын
O MY GUD!!! YOU'RE THE BEST!!!! and, what's kind of ide is that?!?!!
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
It's processing.org!
@darylbantillo2810
@darylbantillo2810 7 жыл бұрын
Is it applicable on android studio and opencv? sorry im a newbie...
@ferdinandmarquita9259
@ferdinandmarquita9259 5 жыл бұрын
can you make a video of circle shaped blob?
@micmicmw
@micmicmw 3 жыл бұрын
Wonderful video thank you =)
@thearajr7583
@thearajr7583 7 жыл бұрын
could you show me how to track color possition? thank you :)
@AfifatulMukaroh
@AfifatulMukaroh 5 жыл бұрын
Amazing tutorial!!!!! :)
@kumareshr5975
@kumareshr5975 7 жыл бұрын
Give some tutorials on webVR and openCV
@sarlupe
@sarlupe 5 жыл бұрын
I'd love to see how to generate a high res heatmap such as codeflow.org/entries/2013/feb/04/high-performance-js-heatmaps/ from a lower res data input.
@alvarobyrne
@alvarobyrne 8 жыл бұрын
how about using some search algorithm: h t t p s : / / en.wikipedia.org / wiki / Category:Search_algorithms. would this help p5js being more performant? the thing is i don't know which search algorithm to use.
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
Thanks for the suggestion!
@Demirci91
@Demirci91 7 жыл бұрын
thanks bro
@dazzid
@dazzid 8 жыл бұрын
novel price for Daniel!
@011azr
@011azr 6 жыл бұрын
Dude, why are you always seems so bubbly and happy? Is it drugs or something? xD
@preadatordetector
@preadatordetector 7 жыл бұрын
You need a refactor tool there buddy?
@BentleyGadget
@BentleyGadget 4 жыл бұрын
You're a goof! But this was good!
@SiddharthMaurya7
@SiddharthMaurya7 5 жыл бұрын
Awesome!! :D
@MrSerrakos
@MrSerrakos 7 жыл бұрын
You are amazing !!!!!! I learned too many things on Java and Processing W I T H O U T book in just O N E week through your videos !!!!! Thank you thank you thank you P.S. I would like some help if you have some time. 1. How do I change your code to detect objects that appear only in an area 250X250 pixels around the center of the screen? ( I did it through a change here : for (int x = 0; x < video.width; x++ ) { for (int y = 0; y < video.height; y++ ) but there is an error about the size of this : color currentColor = video.pixels[loc]; 2. How do I change your code to track only the biggest object that is appearing in the screen ???? Thank you
@DamianReloaded
@DamianReloaded 8 жыл бұрын
11:44 BUG!!!!!!!!!!!!!!!!!!!!!
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
ZOINKS
@DamianReloaded
@DamianReloaded 8 жыл бұрын
XD
@jashum8554
@jashum8554 Жыл бұрын
Watching you mimic with no sound is rather intertaining
11.8: Computer Vision: Improved Blob Detection - Processing Tutorial
20:15
11.6: Computer Vision: Motion Detection - Processing Tutorial
17:35
The Coding Train
Рет қаралды 102 М.
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 16 МЛН
An Unknown Ending💪
00:49
ISSEI / いっせい
Рет қаралды 48 МЛН
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 34 МЛН
Magic or …? 😱 reveal video on profile 🫢
00:14
Andrey Grechka
Рет қаралды 86 МЛН
10.5: Image Processing with Pixels - Processing Tutorial
16:09
The Coding Train
Рет қаралды 250 М.
10.7: Painting with Pixels - Processing Tutorial
13:48
The Coding Train
Рет қаралды 121 М.
Coding Challenge 180: Falling Sand
23:00
The Coding Train
Рет қаралды 917 М.
12.4: Average Point Hand Tracking - Kinect and Processing Tutorial
10:22
The Coding Train
Рет қаралды 72 М.
Coding Challenge 181: Weighted Voronoi Stippling
28:59
The Coding Train
Рет қаралды 166 М.
10.4: Pixels! (The Pixels Array) - Processing Tutorial
21:25
The Coding Train
Рет қаралды 121 М.
11.3: Slit-Scan Video - Processing Tutorial
12:37
The Coding Train
Рет қаралды 42 М.
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 16 МЛН