I just found out your video and even as a senior python and opencv developer I enjoyed watching all of it. Learning image processing through games is an excellent idea. Your presentation is clear and precise, I disagree with comments which states it is a bit boring. Your explanation level is just right for the beginners, not overexplaining things and exploding beginner's minds :D I wanted to take my time and display my support with a comment because you clearly dedicate your time and enthusiasm to create a helpful content for the community. You just earned a subscriber, keep up the good work my friend. p.s. About the not so perfect matching score, it is probably due to using jpeg format's lossy compression. After you saved those images as jpeg, they will have very small differences invisible to eye but clearly visible to code as in this example. You might prefer using PNG for lossless image saving or even BMP to get faster image write/read times (high fps).
I went through this tutorial but deviated by using png files instead. ultimately this makes the tutorial not work as written because the data was no longer in the expected format of CV_8U or CV_32F for the matchTemplate function. Just a warning for those that like to experiment lol. My understanding is that you can easily convert to the proper structure, but me, being a noob, did not find success with this. I saved my files to .jpg and moved on with the tutorial instead of getting hung up and everything worked.
I was JUST looking up info on this. Who knew it would be from the guy I subbed to from a few days ago. Keep up the good work your putting out unique and great content
Honestly, the quality of your videos and tutorials is simply astounding. I'm constantly amazed that you don't have hundreds of thousands of subscribers....yet!
This was something I was wondering about, Thank you. I don't think there are much interactive content like this out there. Glad to have found this channel. Thank you once again.
Here I was wondering how i was going to pull of object detection, then my man presents the answer to me just like that! Always appreciate you, never fail to expedite my thought process!
I'm on part #3 of your series so far but wanted to revisit this to say - you've been helping me get out of tutorial hell. Thank you so much Ben! You have an amazing teaching style; The documentation and comments along the way in both video & blog posts provides more clarity than other tutorials. Your channel is one of the best out there, please don't stop. Peace.
Thanks for the video, I'm from Brazil and here we don't have many good videos about OpenCv and Python , the simple and objective way you speak is perfect for me who doesn't is a native and thanks for not using so many slangs
hey i JUST found this channel today, MapleStory is my childhood favorite game so this has motivated me to learn to code and use maplestory as my game, my younger self is screaming right now lol love your content
Hi there Ben! I stumbled upon your channel because I wanna learn how to code. I watched this video to see if it interests me though I don't have any knowledge yet. But boy! You explain things so well that I get the idea of what you are doing. I am glad I've found your channel. +1 sub!
Hi there, this is the best channel about this content. I have watched your Videos about Python at least 20 times each! I am a beginner and was able to follow your explanation and even to costumize the code for my needs! Really amazing!
I've just started getting into object detection in opencv along with tensorflow, yolov4 etc. Whilst I'm not using it for gaming, these tutorials have been great for real dynamic and practical applications and for that i want to say thank you :)
Your OpenCV videos inspired me so much, been learning constantly new things and doing some low profile botting too. Best channel I've stumbled upon in a long time :).
Open CV is great no denying but the library is just huge , it's full of functions to do all sorts of thing , this is a great advantage(keeps ur code short and neat) and disadvantage ( I really find it difficult to remember these lol) like think about it for a sec, there is function for like literally everything and parameters which makes no sense for newbies (like me myself), but nevertheless great video mate , really liked how u walked through the documentation (encouraging viewers to explore) and explained as much as possible while writing the code and made the video as short as it possibly could have been u certainly deserve more subs and recognition mate :)
Yooooo Ben i hope you are still Alive and coding! I honestly cant thank you enough for all your content! It has finally gotten me started with programming and coding, im studying to become a python developer and ive truly found my passion and calling in life now. The way you teach and explain things is amazing, wish i would have gotten help like this sooner in life! Much love for you
I love your videos. they make it more fun to learn to code. thank you very much for taking the time to make these, especially into easily digestible chunks in a playlist. youre awesome!
Thanks for the tutorials, I like all of them, it's much more fun to learn coding/new libraries if the examples are interesting topics too in this case, games! keep up the good work, looking forward to future tutorials, OpenCV looks awesome.
It has been two years already, where is the continuation? Why did you abandon your channel? You explain better than all my teachers! You're the best! It has been 2 years already, perhaps you have improved object detection, bot performance, and their movement between points, or maybe there's something else interesting to see!
(Español) Muy buen video, conciso pero detallado. Atiende a problemas pequeños de forma que permite aprender poco a poco y construir el código lentamente y de una forma muy natural. Mis felicitaciones sinceras, espero continúes con este trabajo de divulgación tan pulido. Solo me queda felicitarte de nuevo y seguir tu canal y aportes. Mucha suerte para el futuro. (English by google translate) Very good video, concise but detailed. It attends to small problems in a way that allows you to learn little by little and build the code slowly and in a very natural way. My sincere congratulations, I hope you continue with this polished disclosure work. I can only congratulate you again and follow your channel and contributions. Good luck for the future.
It would be great if you make a video about how to detect multiple objects and use the ai to recognise them while playing the game and it would be great to make it recognize the distances and range between objects
I guess the "not perfect match" that you encountered is because of the jpg format which is a lossy compression format tha therefore some pixel colors are changed as the result of the compression. You could use PNG file for better results
hi i need some help! i got some errors trying to compile this here 7:51 and what else i need/program or anything that needs for this to work?? y got python with alot pip installed i got visual code and studio 2022, i got the img's in the same folder and everything but i got error everytime i cant get that black and white img
Sup bro does Albion have any protection against emulated clicks? In other words do your have to use something like Arduino Leonardo to emulate a mouse or it works just as it is?
LOVED IT! Please, please, please! I would love more tutorials like this! Can we also make basic games like tower defense, basic shooter, or something similar?
excellent video. I am a newbie and hence my apologies in advance: I did not see you use the "deep learning of the cabbage image" to detect the cabbage in the pic. It was just what u did copy an image and look for it. The use the max probability value to detect or ignore. How would this improve with a deep learning of the cabbage done first?
One question: It's possible extract data from finded object with opencv? I want find images in the screen and then convert to json, like: [{img: 1, title: 'test'}, {img: 2, title: "nice"}] Thanks for you videos, awesome!
Do you have a video for object detection for outside environment. For example person or any object the same way training the object ? If not do you consider recording one? Thank you very much for your videos
Definitely going to be doing TensorFlow at some point. Once I get through the more basic topics I want to do all kinds of machine learning stuff. Thanks for watching!
After going through the video, I have this doubt as to why is it only detecting one item, when the other ones on the original image is almost as similar to the cut out cabbage. Can this method detect multiple items which is the same and mark them as such? Instead of just pin pointing at only one?
Yes, good catch. The very next video is going to be how to detect multiple items. It's only getting one item here because we're using minMaxLoc(), and you need to approach the result differently to pull out multiple matches.
It is using the needle screenshot as a reference and then drawing a rectangle around the object with the best match. While the other cabbages look almost exactly the same, that specific one is the best match.
I got the whole Code just like u but i get this error. Please help me! error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'rectangle' > Overload resolution failed: > - Can't parse 'pt2'. Sequence item with index 0 has a wrong type > - Can't parse 'pt2'. Sequence item with index 0 has a wrong type > - argument for rectangle() given by name ('color') and position (3) > - argument for rectangle() given by name ('color') and position (3)
I got this error. But it was an error in this line: wrong => bottom_right = (top_left[0], needle_w, top_left[1] + needle_h) correct => bottom_right = (top_left[0] + needle_w, top_left[1] + needle_h) i'm also on OpenCV(4.6.0)
Does OpenCV and PyAutoGUI have the ability to fuzzy match images in a recording instead of real-time game play? My use-case is looking for one of several character faces in a game and capturing a few seconds before and after if was found.
THanks for the great content. How did you get few lines of code without typing? Is this a snippet function available in Visual Studio only? Much appreciated for reply. :D
I tried all this out before filming, so I copy pasted some code from that. I also edited out some of my typing. I figure since this tutorial is more advanced you guys probably don't need to see me type everything out and would rather have a more concise video.
@@LearnCodeByGaming oh thanks Ben. I have used Visual Studio for C and C# before, I had used some of the snippets, which led to my confusion.Thanks for your explanation. They are very clear for more experienced programmers and beginners.
Awesome tutorial! I have an issue. I have tried with other immages and when I run the script I get this error: (-215:Assertion failed) (depth == CV_8U || depth == CV_32F) && type == _templ.type() && _img.dims()
Thanks! That error usually means the image you are passing into matchTemplate() isn't a valid OpenCV image. Check the file path you're passing into imread() and make sure it's correct.
I have installed opencv -python 4.5.1.48 , I copied your code and just change the picture names, the files are in same projects folder, and I got the same error he got , -215 assertion failed
@@ericsein I solved it. You just have to change im.READ.UNCHANGED to 1 for unchanged or 0 for grayscale. There is a list on the cV side wich number what represents
I just found out your video and even as a senior python and opencv developer I enjoyed watching all of it. Learning image processing through games is an excellent idea. Your presentation is clear and precise, I disagree with comments which states it is a bit boring. Your explanation level is just right for the beginners, not overexplaining things and exploding beginner's minds :D
I wanted to take my time and display my support with a comment because you clearly dedicate your time and enthusiasm to create a helpful content for the community. You just earned a subscriber, keep up the good work my friend.
p.s. About the not so perfect matching score, it is probably due to using jpeg format's lossy compression. After you saved those images as jpeg, they will have very small differences invisible to eye but clearly visible to code as in this example. You might prefer using PNG for lossless image saving or even BMP to get faster image write/read times (high fps).
second this by far the best explanation i have came across, zoomed in code, well explained step by step
I went through this tutorial but deviated by using png files instead. ultimately this makes the tutorial not work as written because the data was no longer in the expected format of CV_8U or CV_32F for the matchTemplate function. Just a warning for those that like to experiment lol. My understanding is that you can easily convert to the proper structure, but me, being a noob, did not find success with this. I saved my files to .jpg and moved on with the tutorial instead of getting hung up and everything worked.
I was JUST looking up info on this. Who knew it would be from the guy I subbed to from a few days ago. Keep up the good work your putting out unique and great content
Thanks means a lot!
Thanks alot for this video! Do you think you can cover how to find an object and also detect when it is gone in a video game?
Trueeee
@Carroll Horsely stop scamming people
Exact same here! What an underrated channel
Honestly, the quality of your videos and tutorials is simply astounding. I'm constantly amazed that you don't have hundreds of thousands of subscribers....yet!
This was something I was wondering about,
Thank you. I don't think there are much interactive content like this out there. Glad to have found this channel.
Thank you once again.
Glad you like it!
Here I was wondering how i was going to pull of object detection, then my man presents the answer to me just like that! Always appreciate you, never fail to expedite my thought process!
I'm on part #3 of your series so far but wanted to revisit this to say - you've been helping me get out of tutorial hell. Thank you so much Ben! You have an amazing teaching style; The documentation and comments along the way in both video & blog posts provides more clarity than other tutorials. Your channel is one of the best out there, please don't stop. Peace.
Thanks man!
I'm from Latin America, and I understand your tutorials better than the ones in my language. You're great, thanks
This channel is God sent. Keep going and you'll grow very fast
Whoever disliked this needs their head checking, this was one of the best programming tutorials I have seen yet.
why this guy don't have above 100k subs.. he explained it so good. +1
Nice to see you taking it to the next level
Thanks for the video, I'm from Brazil and here we don't have many good videos about OpenCv and Python
, the simple and objective way you speak is perfect for me who doesn't is a native and thanks for not using so many slangs
this channel is so much underrated.Very good content bro,keep it up
hey i JUST found this channel today, MapleStory is my childhood favorite game so this has motivated me to learn to code and use maplestory as my game, my younger self is screaming right now lol love your content
this guy should get more subscribers!
thank you for the great contents
Thanks!
Hi there Ben!
I stumbled upon your channel because I wanna learn how to code.
I watched this video to see if it interests me though I don't have any knowledge yet. But boy! You explain things so well that I get the idea of what you are doing.
I am glad I've found your channel.
+1 sub!
Awesome, always happy to see new people giving code a try! Thanks for subscribing.
It took two years but I am very happy that I managed to find your channel! Thank you for the great tutorials and videos
GOLD CONTENT
thanks , i just needed something like this to complete my project
you earned a new subscriber :D
Glad you like it! Good luck on your project.
Hi there, this is the best channel about this content. I have watched your Videos about Python at least 20 times each! I am a beginner and was able to follow your explanation and even to costumize the code for my needs! Really amazing!
I've just started getting into object detection in opencv along with tensorflow, yolov4 etc. Whilst I'm not using it for gaming, these tutorials have been great for real dynamic and practical applications and for that i want to say thank you :)
I have started learning computer vision not long ago and basically you are the best. Thank you very much for your tutorials
Your OpenCV videos inspired me so much, been learning constantly new things and doing some low profile botting too. Best channel I've stumbled upon in a long time :).
God I love you and this series, the quality content we all need but do not deserve
print("Hello from Brazil")
Thx bro
Underrated UA-camr. Great content!
Open CV is great no denying but the library is just huge , it's full of functions to do all
sorts of thing , this is a great advantage(keeps ur code short and neat) and disadvantage
( I really find it difficult to remember these lol)
like think about it for a sec, there is function for like literally everything and parameters which makes no sense
for newbies (like me myself), but nevertheless great video mate , really liked how u walked through
the documentation (encouraging viewers to explore) and explained as much as possible while writing
the code and made the video as short as it possibly could have been u certainly deserve more subs
and recognition mate :)
Bruh ty so much! You save so much time for as !
You're welcome!
Wow dude been watching a lot of videos on open cv and yours is far the best I have seen. Just the way you teach is awesome.
Yooooo Ben i hope you are still Alive and coding! I honestly cant thank you enough for all your content! It has finally gotten me started with programming and coding, im studying to become a python developer and ive truly found my passion and calling in life now. The way you teach and explain things is amazing, wish i would have gotten help like this sooner in life! Much love for you
Thx, People like you make the world a better place
Hey man just want to let you know that I'm so happy right now as a gamer and python programmer :) You just earned a new subscriber!
Glad other people like this stuff too!
You are great bruh I'd literally crown u as king.
I love your videos. they make it more fun to learn to code. thank you very much for taking the time to make these, especially into easily digestible chunks in a playlist. youre awesome!
I just did the sentdex opencv tutorial so this is perfect
Awesome hope it's helpful for you
@@LearnCodeByGaming Stardew valley is about to get more interesting.
Wicked video! thank you for the tutorial. After fumbling around with a few other guides, it was yours that really got me into it.
Awesome!
Thank you, I love how you guide us through the documentation! This will help me start creating AI's to play games and automate tasks.
Thanks for the tutorials, I like all of them, it's much more fun to learn coding/new libraries if the examples are interesting topics too in this case, games! keep up the good work, looking forward to future tutorials, OpenCV looks awesome.
Yes, that's the idea of my channel! Thanks!
Thank you for sharing your knowledge. Greetings from Brazil.
You did a great job at making this easy to understand, I followed it all the way through and it worked, Thank you
Brilliant channel. Enjoyed every bit of it. Love the short length. Subbed!
You're an EXCELLENT teacher. Thank you!
Thank you for your efforts to make this video. What a clear explanation !!!
It has been two years already, where is the continuation? Why did you abandon your channel? You explain better than all my teachers! You're the best! It has been 2 years already, perhaps you have improved object detection, bot performance, and their movement between points, or maybe there's something else interesting to see!
Just stumbled upon your channel! Love the style and format! Can't wait to check out more videos!
YOUR TUTORIALS ARE THE BEST IVE SEEN, THENK YOU SO MUUUCH!!!!!!!
Thank u very much for this video. It was Informative and engaging. Makes me want to learn more about OpenCV!
great stuff. no idea why the views are not in millions. kudos
Great video. How did you manage that u get to see a complete documentation for every opencv function? Thx alot!
Thanks dude, I want to make a very simple bot to automate a PIA element for a really old game and this is a good excuse to learn Python a bit more
Can't wait to see where this goes
Same! I need to slow down on coding and catch up with making the videos.
Thank you so much. Your explanations are so clear. I learn a lot from you. You are the best!
Thanks a lot man , This Video really helped me start using openCV
hey, thanks for the tutorial. will this work for 3d games with some modification or will 3d games be a totally different issue?
This is my new favorite channel, thanks for good content ^_^
love you so much, I love this course, you just got a Chinese Subscriber!!!
(Español)
Muy buen video, conciso pero detallado. Atiende a problemas pequeños de forma que permite aprender poco a poco y construir el código lentamente y de una forma muy natural. Mis felicitaciones sinceras, espero continúes con este trabajo de divulgación tan pulido. Solo me queda felicitarte de nuevo y seguir tu canal y aportes. Mucha suerte para el futuro.
(English by google translate)
Very good video, concise but detailed. It attends to small problems in a way that allows you to learn little by little and build the code slowly and in a very natural way. My sincere congratulations, I hope you continue with this polished disclosure work. I can only congratulate you again and follow your channel and contributions. Good luck for the future.
absolutely amazing content !
It would be great if you make a video about how to detect multiple objects and use the ai to recognise them while playing the game and it would be great to make it recognize the distances and range between objects
Yes I'll be doing that in the coming videos. I've got at least 4 more planned for this series.
Thanks Ben :). I really like your teaching style.
Please do more if you’re available!
thank you so much Ben ! I viewed your video, red your web site, and i have done my new project in few minutes !
Great content as always!
Thanks Shane!
Thank you for your tutorials!Really appreciate it :)
You're welcome, glad you like them!
you are such a great teacher
I guess the "not perfect match" that you encountered is because of the jpg format which is a lossy compression format tha therefore some pixel colors are changed as the result of the compression. You could use PNG file for better results
hi i need some help! i got some errors trying to compile this here 7:51 and what else i need/program or anything that needs for this to work?? y got python with alot pip installed i got visual code and studio 2022, i got the img's in the same folder and everything but i got error everytime i cant get that black and white img
YES !! This is going to be very interesting ! =D
Sup bro does Albion have any protection against emulated clicks? In other words do your have to use something like Arduino Leonardo to emulate a mouse or it works just as it is?
LOVED IT!
Please, please, please! I would love more tutorials like this!
Can we also make basic games like tower defense, basic shooter, or something similar?
thanks i will watch ur vids and learn this library with u
keep up the good work
Amazing videos!thankyou so much sir!! Much praise for your work
Thanks for the video my man, very useful and well explained.
thanks for these 9 masterpiece videos
Nice video!
Good for starting programming a mmorpg bot!
excellent video. I am a newbie and hence my apologies in advance: I did not see you use the "deep learning of the cabbage image" to detect the cabbage in the pic. It was just what u did copy an image and look for it. The use the max probability value to detect or ignore. How would this improve with a deep learning of the cabbage done first?
Thank you for the video :)
That s very interesting
One question:
It's possible extract data from finded object with opencv?
I want find images in the screen and then convert to json, like:
[{img: 1, title: 'test'}, {img: 2, title: "nice"}]
Thanks for you videos, awesome!
I no joke just started researching this and already trained a model with yolov3 to recognize iron ore on Runescape in real-time with openCV.
That's awesome Chris!
Oh wow I'm trying to do the same exact thing haha.
@@Ehxx If you need any tips feel free to shoot me a message
@@chrisj1947 Mind adding me on discord? Executioner#4102
Thank you for this. Keep em coming :)
Do you have a video for object detection for outside environment. For example person or any object the same way training the object ? If not do you consider recording one?
Thank you very much for your videos
Love the videos dude! Looking forward to the next one! I was getting an error with this code, Had to convert both variables to greyscale?
That's interesting. Maybe something to do with the format of the image files you used? Glad you like the videos!
I had the same error. I was using PNGs but it worked well when I switched to JPGs
Thank you so much for these videos, this is gold
Your videos are super clear. Thankyou :)
Nice this verry useful for me 👍
Going to do any tensorflow tutorials? Seems necessary for any game im playing currently, cv doesn't like to match at different angles
Definitely going to be doing TensorFlow at some point. Once I get through the more basic topics I want to do all kinds of machine learning stuff. Thanks for watching!
Thanks for the video, I now learned what I needed. Cheers!
Thank you very much, i'm a french student and your work is outstanding
Thank you Ben , very interesting content !
bro what vscode theme u using it's clean af
good video and a writeup! You are doing a great job!
Amazing explanation!
After going through the video, I have this doubt as to why is it only detecting one item, when the other ones on the original image is almost as similar to the cut out cabbage. Can this method detect multiple items which is the same and mark them as such? Instead of just pin pointing at only one?
Yes, good catch. The very next video is going to be how to detect multiple items. It's only getting one item here because we're using minMaxLoc(), and you need to approach the result differently to pull out multiple matches.
Aha, like widening the scope a bit and allowing in more options to come through! Great. Thank you again. ^^
It is using the needle screenshot as a reference and then drawing a rectangle around the object with the best match. While the other cabbages look almost exactly the same, that specific one is the best match.
Thank you for your videos, you are very good, I have received a lot of inspiration
Thank you for the great tutorial!
I got the whole Code just like u but i get this error.
Please help me!
error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'rectangle'
> Overload resolution failed:
> - Can't parse 'pt2'. Sequence item with index 0 has a wrong type
> - Can't parse 'pt2'. Sequence item with index 0 has a wrong type
> - argument for rectangle() given by name ('color') and position (3)
> - argument for rectangle() given by name ('color') and position (3)
I got this error. But it was an error in this line:
wrong => bottom_right = (top_left[0], needle_w, top_left[1] + needle_h)
correct => bottom_right = (top_left[0] + needle_w, top_left[1] + needle_h)
i'm also on OpenCV(4.6.0)
Hey man nice video. I was hoping if a make video on playing gta 5 using hand recognition and open cv. Thanks 👍
Does OpenCV and PyAutoGUI have the ability to fuzzy match images in a recording instead of real-time game play? My use-case is looking for one of several character faces in a game and capturing a few seconds before and after if was found.
nvm I saw your other video on templatematch and I'm coding with that plus face detection. thanks for providing these videos!
ความรู้ทั้งนั้นขอบคุณมากครับ
THanks for the great content. How did you get few lines of code without typing? Is this a snippet function available in Visual Studio only? Much appreciated for reply. :D
I tried all this out before filming, so I copy pasted some code from that. I also edited out some of my typing. I figure since this tutorial is more advanced you guys probably don't need to see me type everything out and would rather have a more concise video.
@@LearnCodeByGaming oh thanks Ben. I have used Visual Studio for C and C# before, I had used some of the snippets, which led to my confusion.Thanks for your explanation. They are very clear for more experienced programmers and beginners.
Awesome tutorial!
I have an issue. I have tried with other immages and when I run the script I get this error: (-215:Assertion failed) (depth == CV_8U || depth == CV_32F) && type == _templ.type() && _img.dims()
Thanks! That error usually means the image you are passing into matchTemplate() isn't a valid OpenCV image. Check the file path you're passing into imread() and make sure it's correct.
@@LearnCodeByGaming Thanks, I will check! 🙂
I have installed opencv -python 4.5.1.48 , I copied your code and just change the picture names, the files are in same projects folder, and I got the same error he got , -215 assertion failed
Also got this error, the path to the image was wrong.
@@ericsein I solved it. You just have to change im.READ.UNCHANGED to 1 for unchanged or 0 for grayscale. There is a list on the cV side wich number what represents
thanks for the clear explanation!