I wholeheartedly agree, there are a few people I watch their videos like this for, and that's why, you do a great job at explaining things, keep up the good work!
I was interested in coding and chose python as my language to start, and you helped me to clear my basics, and explore many modules like opencv , kivy etc. You explain very well. Thank you for your videos. You are the best youtuber teaching python. Keep it up!!!!!!!
FOR THE LOVE OF GOD, I SPENT MY WHOLE DAY ON THIS T-T Thank you so much. I am crying tears of joy. My professor refuse to help us with anything that have to do with programming, he only talk about the math behind visualization. Thank you so much.
Tim you do an amazing job no need to apologize for the lengthy explanations they are actually extremely useful. I'll usually watch your videos multiple times just so I know I'm getting the information.
Gotta say, this is one of the most well explained Python-related lectures I've ever witnessed. Thank you so much for the video. Really helped me A LOT.
Great tutorial! For future reference, if you want to select a segment of two lines, you can hold Shift + Alt and drag the mouse. This way it won't select all the way to the end of row, but only to the column you move your cursor to.
One thing to note is that we are finding the template in the same image that we got the template from. This means the underlying grayscale should be an exact match. If the images were from a video of a soccer game and you got the template from the first frame in the video the subsequent frames won't have as good of a match. As noted in the video you want the object template to be about the same size as the object in the target image. As the ball gets nearer or farther away you will find you can't detect it using this method.
At the end of the video, you don't need to resize the image at every step. Just resize where you are showing the image at line 23 as cv2.imshow("Match", cv2.resize(img2, (0,0), fx=0.8, fy=0.8))
Your tutors are the best, when you don't show your distracting face or when I cover it with black rectangle. I guess they are best for learning Python syntax.
Actually your long explanation is useful for us, it illuminates us how things work and you should keep doing that, or maybe you can implement some drawings
template mathcing is not convolution it's correlation, which means that you don't flip the kernel before you pass it on the whole image : another defintion of correlation is convolution withour flipping.
Great job with your tutorial videos Tim! I understand that with the methods you shown we can find the exact same pixels pattern in the image. Now, I wonder, for example, how could we find all the shoes on the image from the template image without them being perfectly identical. I suppose it will be necessary to go towards artificial intelligence / deep learning? I'd like to know what you would do and see a tutorial video on it.
Hi! I have two questions. First, would it be possible to do this with a webcam feed instead of an image? And second, supposing I don't want to draw a rectangle but wanted to execute some code if there is a match, what condition would I use for my if statement? Thanks a lot, great video!
He accidentally released it instead of ep. 6 and then set it to private so you've received the notification for that time. At least that's what I understood that happened.
Tim, Id like if you could give me some tips, I'm facing a similar problem to this pattern matching thing: I have patterns, they are very simple in shape and color (triangles, squares and such), but i'm *trying to detect them in video*. And in the live feed, *unlike this one-to-one matching*, the patterns could appear bigger, smaller, maybe slightly off colored. I get that i'll be processing multiple frames as individual images, and I know there are some techniques to help me with "video variables" that may distort patterns, like applying histogram exposure equalization, noise filters, etc. What should i be looking around, in OpenCV? I'd have to classify what symbol it is, but maybe matching for each possible symbol might do it for me. What other more robust, AI-ish techniques could i apply to have more "safety" against such variables?
Hi Tim, great videos about CV2. If I want to create template matching in CV2 but the template and the image are of different sizes. How do I account for that? Once in a while I get a secret message consistent of characters in different alphabets and I want a script where I can select one character and have it look through a bunch of images with all the alphabets I know and make a comparison. It could be something like the Arcadian Alphabet or Antiker code I have to match against. Any help in the right direction would be appreciated.
hey "tech with tim youtube ":) , I just started open cv course and I am really enjoying it :). but should I need to master the math behind openCV functions ???? to be a good programmer .........whatever :) ...........
if you just want to *use* openCV then you dont really need to understand the math. But yes good programmers are also good mathematicians, understanding maths is very important in CS.
Teacher, first congratulations for the channel. I need your help, I have a simple image with a range of 5 placements where the quantity is identified, how do I identify the biggest color type red and say where the X,Y is, and if you can help me, and only for create an alert.
I tried this tutorial on another image which is from another sport involving a ball i.e. cricket, and coincidently, the third model plotted a bounding box on the player's chest. Is this the model's issue or are we misinterpreting the output for that model?
Hey, btw, how can you detect multiple different templates in the image? I'm trying to find an answer to this tricky question, but can't find it anywhere.
In the following command I multiplied by 4 to get a bigger rectange. How can I save only the image of this rectangle ? cv.rectangle(img_rgb, pt, (pt[0] +w*4, pt[1] +h*4), (0,0,255), 2)
lovely quite cool TIM, THE MASTER. can you detect /extract dimensions? can you extract the diameter of the ball roughly? may be you do a tutorial extracting dimensions from images. Thank you Tim
Hey, i'm looking for collaboration into any python projects (my skill is somewhere at intermediate level ), let me know if you need help or if u just want to share your code with someone :)
muchas gracias por compartir, comprendo como funciona pero no me funciona jeje..... [WinError 2] El sistema no puede encontrar el archivo especificado [cmd: ['py', '-u', 'C:\\Users\\Luis\\Desktop\\AGROLUIS =)\\practica lll\\template matching\\OpenCV-Tutorials-main\\tutorial1.py']] [dir: C:\Users\Luis\Desktop\AGROLUIS =)\practica lll\template matching\OpenCV-Tutorials-main] [path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\Luis\miniconda3;C:\Users\Luis\miniconda3\Library\mingw-w64\bin;C:\Users\Luis\miniconda3\Library\usr\bin;C:\Users\Luis\miniconda3\Library\bin;C:\Users\Luis\miniconda3\Scripts;C:\miniconda;C:\miniconda\Library\mingw-w64\bin;C:\miniconda\Library\usr\bin;C:\miniconda\Library\bin;C:\miniconda\Scripts;C:\Users\Luis\AppData\Local\Microsoft\WindowsApps;C:\Users\Luis\AppData\Local\Programs\Microsoft VS Code\bin] [Finished]
Tim you don't need to apologize for the lengthy explanation, that's the whole reason why we are here.
This statement right here!
I wish I could like your comment at least 19 times.
I wholeheartedly agree, there are a few people I watch their videos like this for, and that's why, you do a great job at explaining things, keep up the good work!
Yup!
You're so right. Sometimes im looking to a tutorial and i need to understand this code's logic to learn perfectly. Tim is doing it so good!
i agree, don't need to be sorry for the long explanation, i really thankful you explain it on detail
I was interested in coding and chose python as my language to start, and you helped me to clear my basics, and explore many modules like opencv , kivy etc. You explain very well. Thank you for your videos. You are the best youtuber teaching python. Keep it up!!!!!!!
FOR THE LOVE OF GOD, I SPENT MY WHOLE DAY ON THIS T-T
Thank you so much. I am crying tears of joy.
My professor refuse to help us with anything that have to do with programming, he only talk about the math behind visualization.
Thank you so much.
Tim you do an amazing job no need to apologize for the lengthy explanations they are actually extremely useful. I'll usually watch your videos multiple times just so I know I'm getting the information.
Gotta say, this is one of the most well explained Python-related lectures I've ever witnessed. Thank you so much for the video. Really helped me A LOT.
Great tutorial!
For future reference, if you want to select a segment of two lines, you can hold Shift + Alt and drag the mouse. This way it won't select all the way to the end of row, but only to the column you move your cursor to.
AMAZING VIDEO THANK YOU for the thoroughness. Absolutely covered all areas where confusion or curiosity could come up!
One thing to note is that we are finding the template in the same image that we got the template from. This means the underlying grayscale should be an exact match. If the images were from a video of a soccer game and you got the template from the first frame in the video the subsequent frames won't have as good of a match. As noted in the video you want the object template to be about the same size as the object in the target image. As the ball gets nearer or farther away you will find you can't detect it using this method.
Your "lengthy" explanation was great. Not as long as you might think and comprehensable.
Great example to illustrate the use of the convolution here.
Tim that is pretty straightforward tutorial. Thanks !
Thanks for this series Tim. You have a very nice style of presenting and explaining how the code works.
At the end of the video, you don't need to resize the image at every step. Just resize where you are showing the image at line 23 as
cv2.imshow("Match", cv2.resize(img2, (0,0), fx=0.8, fy=0.8))
You are gifted. Thank you for the content.
He rocks
Your explanation was actually pretty good. Thank you!!
Your tutors are the best, when you don't show your distracting face or when I cover it with black rectangle. I guess they are best for learning Python syntax.
Actually your long explanation is useful for us, it illuminates us how things work and you should keep doing that, or maybe you can implement some drawings
how sad I've never found your channel before. i would be step or two higher than i am right now. your explanation methods are outstanding. great job
template mathcing is not convolution it's correlation, which means that you don't flip the kernel before you pass it on the whole image : another defintion of correlation is convolution withour flipping.
Glitch at 12:20 that he forgot to edit out lol. Great video, am trying to learn object recognition.
Great job with your tutorial videos Tim! I understand that with the methods you shown we can find the exact same pixels pattern in the image. Now, I wonder, for example, how could we find all the shoes on the image from the template image without them being perfectly identical. I suppose it will be necessary to go towards artificial intelligence / deep learning? I'd like to know what you would do and see a tutorial video on it.
Hi! I have two questions. First, would it be possible to do this with a webcam feed instead of an image? And second, supposing I don't want to draw a rectangle but wanted to execute some code if there is a match, what condition would I use for my if statement? Thanks a lot, great video!
Great video - thanks. You might want to use the word 'assign' instead of 'is equal to' (let the math teachers have the latter one).
Grrat explanation bro, thank you so much
How come i was not notified about this video. Damm you YT 🤦♂️
He accidentally released it instead of ep. 6 and then set it to private so you've received the notification for that time. At least that's what I understood that happened.
Tim, Id like if you could give me some tips, I'm facing a similar problem to this pattern matching thing:
I have patterns, they are very simple in shape and color (triangles, squares and such), but i'm *trying to detect them in video*.
And in the live feed, *unlike this one-to-one matching*, the patterns could appear bigger, smaller, maybe slightly off colored.
I get that i'll be processing multiple frames as individual images, and I know there are some techniques to help me with "video variables" that may distort patterns, like applying histogram exposure equalization, noise filters, etc.
What should i be looking around, in OpenCV? I'd have to classify what symbol it is, but maybe matching for each possible symbol might do it for me.
What other more robust, AI-ish techniques could i apply to have more "safety" against such variables?
Does it also work to match similar images too (like I think it was pyautogui, where you can give it a required confidence)?
Hi Tim, great videos about CV2. If I want to create template matching in CV2 but the template and the image are of different sizes. How do I account for that?
Once in a while I get a secret message consistent of characters in different alphabets and I want a script where I can select one character and have it look through a bunch of images with all the alphabets I know and make a comparison. It could be something like the Arcadian Alphabet or Antiker code I have to match against.
Any help in the right direction would be appreciated.
hey "tech with tim youtube ":) , I just started open cv course and I am really enjoying it :).
but should I need to master the math behind openCV functions ???? to be a good programmer .........whatever :) ...........
if you just want to *use* openCV then you dont really need to understand the math. But yes good programmers are also good mathematicians, understanding maths is very important in CS.
@@abdullahahmed7781 thank you so much😭😎
Teacher, first congratulations for the channel. I need your help, I have a simple image with a range of 5 placements where the quantity is identified, how do I identify the biggest color type red and say where the X,Y is, and if you can help me, and only for create an alert.
Tim, what about margin of error? What if there is a different pattern ball?
Great video!
Hi! Can I use multiple templates of soccer balls and add up the results to better detect soccer balls?
My question is so everytime we have to run 6 different windows like that or we just pick one method that work best? Thank u
I tried this tutorial on another image which is from another sport involving a ball i.e. cricket, and coincidently, the third model plotted a bounding box on the player's chest. Is this the model's issue or are we misinterpreting the output for that model?
Perhaps you need a neural network and trained with the desired results
Which chair are you using?
i will run in open cv template matching and my rectangle line shoe multiple line why?
Hey, btw, how can you detect multiple different templates in the image? I'm trying to find an answer to this tricky question, but can't find it anywhere.
Why don’t you run the code several times ?
Or loop it ?
image assertion failed (-215) . Even after image is being loaded properly. Any help?
Is there a way to increase accuracy of matching? I'm trying to detect objects on my screen but it doesnt work.
enjoyable content
Love you tim
In the following command I multiplied by 4 to get a bigger rectange. How can I save only the image of this rectangle ? cv.rectangle(img_rgb, pt, (pt[0] +w*4, pt[1] +h*4), (0,0,255), 2)
lovely quite cool TIM, THE MASTER. can you detect /extract dimensions? can you extract the diameter of the ball roughly? may be you do a tutorial extracting dimensions from images. Thank you Tim
Wouldn't the rough diameter of the ball be the width of the square cv2 draws around it?
hallo Tim i did not get the tutorial 5 i don't know why
is it normal or did i missed something
Sir please upload some video on curve analysis... please sir
Please do series on product recommendation system
Can someone tell me the name of software he's using for this code
I am using PyCharm but it is giving me some difficulties
sublime text editor, but sublime by default does not have a compiler so you can use the command prompt to run the code
@@ther3negade273 thanks man 👍
Great video! You are so cool
Thank you :)
It's not soccer, It's Football!!
Everything is clear other than the explanation of using TM_SQDIFF and TM_SQDIFFNORMED. What is this line doing?
thats the image recognition method that is being used
how can do Template Matching on video?
My opencv doesn't work :((
nice
Weird I didn't see tutorial #7 2 days ago or yesterday
Me too
result = cv2.matchTemplate(img2, template, method)
cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\templmatch.cpp:1175: error: (-215:Assertion failed) _img.size().height
❤️❤️❤️❤️❤️
You were literally fast posting videos lol
You streamed Chess in Discord just now...
Why are there only 470 views on this video or is it that my phone is glitched out
❤️
Hey, i'm looking for collaboration into any python projects (my skill is somewhere at intermediate level ), let me know if you need help or if u just want to share your code with someone :)
DUDE Wut 1:00
no fun playing "where's waldo" afther this
First!!
Ig I will never be able to do big project
First
Second
muchas gracias por compartir, comprendo como funciona pero no me funciona jeje..... [WinError 2] El sistema no puede encontrar el archivo especificado
[cmd: ['py', '-u', 'C:\\Users\\Luis\\Desktop\\AGROLUIS =)\\practica lll\\template matching\\OpenCV-Tutorials-main\\tutorial1.py']]
[dir: C:\Users\Luis\Desktop\AGROLUIS =)\practica lll\template matching\OpenCV-Tutorials-main]
[path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\Luis\miniconda3;C:\Users\Luis\miniconda3\Library\mingw-w64\bin;C:\Users\Luis\miniconda3\Library\usr\bin;C:\Users\Luis\miniconda3\Library\bin;C:\Users\Luis\miniconda3\Scripts;C:\miniconda;C:\miniconda\Library\mingw-w64\bin;C:\miniconda\Library\usr\bin;C:\miniconda\Library\bin;C:\miniconda\Scripts;C:\Users\Luis\AppData\Local\Microsoft\WindowsApps;C:\Users\Luis\AppData\Local\Programs\Microsoft VS Code\bin]
[Finished]
4th
Your really good your soft really bad
How to completely learn one language make a roadmap please
And also smile in videos
Dont be like a robot
True there isn’t much humour in the vids but the quality of the content is amazing
@@ananthramvijayaraj4554 yes i know
I HATE that shirt ....
who cares?
Second