Dominating an Online Game with Object Detection Using OpenCV - Template Matching.

  Рет қаралды 656,919

ClarityCoders

ClarityCoders

Күн бұрын

Detect objects with No GPU, No Neural Network, and No training. Template matching has some unique advantages including being really easy to set up. You only need a few lines of code to get started. You can also do it without any high-end computing resources.
In this video, I walk you through a simple example of how to use template matching and then show you how I used it to dominate an online game.
github.com/ClarityCoders/Comp...
Want to chat with me and other programmers join our discord!
/ discord
Want to help support the channel?
www.buymeacoffee.com/clarityc...

Пікірлер: 485
@williamrutherford553
@williamrutherford553 2 жыл бұрын
Great video, love to see more like this. Automating games like this is an amazing way to introduce people to OpenCV, it's simple to explain but teaches you important skills applicable to a much wider range of tasks. I'm glad I randomly stumbled upon your channel, your videos don't get nearly as many views as it deserves for such high quality educational content.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Glad you enjoyed it! I'll have more coming soon!
@yichong777
@yichong777 2 жыл бұрын
I agree, I had my first coding experience from minecraft because I wanted to automate a turtle in the modded game xD
@ClarityCoders
@ClarityCoders 2 жыл бұрын
@@yichong777 Thanks for the comment it means a lot. I was getting beat up a bit today haha...
@bobchelios9961
@bobchelios9961 2 жыл бұрын
i bascily became a programmer by starting to atuomate games. learned many skills from basic programming to ocr to stock market theroies to reinforcement learning while doing that.
@johndorian4078
@johndorian4078 2 жыл бұрын
@@bobchelios9961 So did i....... which is why it's kind of a shame some games are so quick to ban.
@mdellertson
@mdellertson 2 жыл бұрын
Amazing work! Thank you so much for sharing this! I would love to see a video on how to implement convolutional neural networks to do object recognition.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
It's on my list for sure!
@Beatsbasteln
@Beatsbasteln 2 жыл бұрын
3:34 "now my hope is that we detect multiple instances of weed" yes pls!
@NoshNosher
@NoshNosher 2 жыл бұрын
except he clearly says wheat
@Beatsbasteln
@Beatsbasteln 2 жыл бұрын
@@NoshNosher are you sure about that bro?
@ells101
@ells101 2 жыл бұрын
@@NoshNosher Charles Shwab ova here
@emifro
@emifro 2 жыл бұрын
@@Beatsbasteln I am 100% sure he said wheat.
@Beatsbasteln
@Beatsbasteln 2 жыл бұрын
@@emifro but how are you going to smoke wheat?
@DarkNemesis04
@DarkNemesis04 2 жыл бұрын
This is a really well paced and detailed guide! Great work :)
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks I work really hard on trying to figure out the best pace to keep people engaged and still not skip topics. I will continue to try and improve. Thanks for commenting and watching.
@pfever
@pfever 2 жыл бұрын
Your videos are awesome man! I really love them :D
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Mean a lot thanks. I really appreciate the view and comment have a good one.
@ArcaneEther
@ArcaneEther 2 жыл бұрын
To circumvent the missed image detection from a day/night cycle, you can add a desaturation to both your sample and comparison images to grayscale them before comparison. This usually works for pixel-based art styles, as day/night is usually just an added color filter over the original image. The exception being those games that use specular or bloom lighting effects, which can distort the end-result grayscale in the image. The trade off, however, is that the added step of desaturating the sample image on each frame will slow down the script a bit. EDIT: This method also wouldn't work in games that reuse sprites with different color palettes, for obvious reasons.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Yes sir! Very good points this is something I've used in a few projects and probably should have talked about! Great comment.
@mrhitsjr4775
@mrhitsjr4775 2 жыл бұрын
hey could you help make a open cv for shooting the ball in nba 2k
@andrjsjan4231
@andrjsjan4231 4 ай бұрын
I didn’t get it why do they use different color palettes for different reasons?
@ChrisCox-wv7oo
@ChrisCox-wv7oo 26 күн бұрын
Differentiate objects by color is a cost effective way of expanding the object types in game. Red goblins are fire goblins. Blue goblins are ice goblins. If you want to use flame thrower on red goblins, and water gun on blue goblins, you need to be able to determine type you're identifying. That's the issue discussed above.
@cosmicdive
@cosmicdive 4 ай бұрын
Great tutorial, really enjoy and appreciate you explain what each line does in detail. Subscribed and liked!
@djbroake9810
@djbroake9810 2 жыл бұрын
Thank for the examples and how it all works, liked and subbed.
@RogerCh888
@RogerCh888 11 ай бұрын
This is an awesome, very straightforward tutorial. Thank you!
@fenfire3824
@fenfire3824 4 ай бұрын
Ah thank you so much, i was looking for a tutorial like this for a very long time :) I did something similiar in auto it just for fun, but I always wanted do something like that in a "real" programming language with more powerful libraries. Thank you so much =) I only need to learn how to use it in 3d games /video capturing. But it is just fine to learn right from the start :)
@leonhardguss8150
@leonhardguss8150 3 жыл бұрын
Thank you man, this is awesome !!
@ClarityCoders
@ClarityCoders 3 жыл бұрын
Glad you liked it thanks for watching!
@maxfrischdev
@maxfrischdev 2 жыл бұрын
Oh, come on.. I just decided "Ah crap, just get started..(!) Ima start with the basic webstack and see from there. And then I stumbled over this channel and THIS video.. Great video @ClarityCoders!
@joshuaolsen8844
@joshuaolsen8844 2 жыл бұрын
I love to see you doing these videos! I’d like to see one that is based on real pictures, like “is the car pointed left or right” etc and incorporate some training and AI
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Cool idea! I'll put it on my list.
@patrickmueller9658
@patrickmueller9658 2 жыл бұрын
Liked and subscribed - explained and shown structured and clearly! Thanks!
@elonmed
@elonmed Жыл бұрын
thanks man. I love your teaching style
@andersrottschafer5705
@andersrottschafer5705 2 жыл бұрын
You could have also done the grouping by comparing the distances of all rectangle centroids which would essentially create a node graph with every center connected to everyother center and then combining all nodes whose distance is below some threshold distance. Your solution works, I just think it’s good practice to use more general algorithms.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
I would agree very good points. Thanks for watching and commenting.
@Primu
@Primu 3 ай бұрын
15:15 A more efficient solution here would be to just check for rectangles with intersecting regions. Not sure about python but in c# this is very simple with the Rect.IntersectsWith method (you can also just do it manually, the math is easy). Then you can combine them by inflating one rect with the difference from the other. Also for more reliable matching, there are various imaging algorithms you can use, for my OCR projects I do: grayscale > scaling > binarization > inversion > denoise > bordering, this helps a lot for matching foreground objects over varying backgrounds. You can also start with colour averaging which can make scanning for objects significantly faster at higher resolutions because you can scan chunks of the image and skip processing any that aren't similar. I've used these methods for overlaying real-time translation of text in non-english games.
@stevesteverson3345
@stevesteverson3345 3 жыл бұрын
haha this is awesome, i've thought about doing it before and after this i might have to. One of the most relatable/interesting coding videos lmao.
@ClarityCoders
@ClarityCoders 3 жыл бұрын
glad you liked it! I hope you do please share it if you do.
@stevesteverson3345
@stevesteverson3345 3 жыл бұрын
@@ClarityCoders I already did :) although apparently the only way to grow small channels these days is to leave comments on a bunch of related videos so people click on your profile.
@ClarityCoders
@ClarityCoders 3 жыл бұрын
@@stevesteverson3345 Trying to grow your channel?
@stevesteverson3345
@stevesteverson3345 3 жыл бұрын
@@ClarityCoders hahah yeah come watch any of my 0 videos
@franzdizon8659
@franzdizon8659 2 жыл бұрын
this is what I have been looking for... THANK YOUUUU
@wyatt5984
@wyatt5984 3 жыл бұрын
I love the tutorial; keep up the great work! Heads up, I am coming for your high score ;)
@ClarityCoders
@ClarityCoders 3 жыл бұрын
I hope you do! Thanks for watching I appreciate it!
@wyatt5984
@wyatt5984 3 жыл бұрын
Your score has been topped! No template matching was needed since the game uses the exact same pixels in the same locations but still great to know that functionality exists within OpenCV. keep on keepin on.
@ClarityCoders
@ClarityCoders 3 жыл бұрын
@@wyatt5984 Yeah I noticed that as well haha! Gives you some flexibility for more complex games though. Nice score!
@ClarityCoders
@ClarityCoders 3 жыл бұрын
@@wyatt5984 Our discord is you're into that sort of thing. discord.gg/cAWW5qq
@USBEN.
@USBEN. 2 жыл бұрын
Very fun to watch and learned a lot. Thankyou.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks for watching/commenting it means a lot.
@RiddleRations
@RiddleRations Ай бұрын
Awesome video! Learned a lot!
@Aloofang
@Aloofang 2 жыл бұрын
Thank you for making this video, it really helps me a lot.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
I hope so. Let me know if you have any questions.
@chuifrankz2070
@chuifrankz2070 2 жыл бұрын
best tuto about template match i have ever seen!helpful!
@fg87fgd
@fg87fgd 2 жыл бұрын
Couldn't be more clear. Many thanks...
@saidalizade1291
@saidalizade1291 Жыл бұрын
Ty very much, i could not find someone explain this as well as you did ngl saved me
@ruangustavomoretti766
@ruangustavomoretti766 Жыл бұрын
Thanks man, you saved my graduation project!
@impzhu3088
@impzhu3088 2 жыл бұрын
Wow, this is so cool! Thanks for sharing!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks for the comment more to come stay tuned.
@ProBloggerWorld
@ProBloggerWorld 2 жыл бұрын
Dude, this is so genius. Thx!
@Elislavkat
@Elislavkat 3 ай бұрын
amazing. thanks. so much easy class from you
@prevensie
@prevensie 2 жыл бұрын
Teaching archivement unlocked! congrats man! you are helping people from brazil!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
I am from a tiny town in the US never thought people would watch me in Brazil. Thanks for watching and commenting.
@TheBuzz3r
@TheBuzz3r 2 жыл бұрын
@@ClarityCoders 🇧🇷
@gunnerstone120
@gunnerstone120 2 жыл бұрын
Nice; Solid introductory video! I enjoyed watching. Wish there was a fast & efficient template matching method that worked with a high dimensional image space. I imagine the game you tested in the vid was only 800x600 or something lol. When working with large images I usually have to search a small section or it will take too long to compute.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
For sure I almost always cut down the area where I'm taking the screen shots. Especially if it's a real time thing where time matters. Thanks for watching and commenting I really appreciate it.
@SuperMasterDesaster
@SuperMasterDesaster 2 жыл бұрын
You could also try speeding it up by scaling the image down before performing the template matching.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
@@SuperMasterDesaster Yeah I really like this idea as well.
@KiraIsGod
@KiraIsGod 2 жыл бұрын
Pretty nice! Found this on my recommended. Subbed :)
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks for the sub / comment means a lot.
@deplorablesecuritydevices
@deplorablesecuritydevices 2 жыл бұрын
Very useful, thank you for sharing!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks for watching and commenting!
@alonewolf7682
@alonewolf7682 2 жыл бұрын
Thank You for this valuable video
@hellod2831
@hellod2831 2 жыл бұрын
Great video, very helpful
@BusinessWolf1
@BusinessWolf1 2 жыл бұрын
Here's an idea to get around the different shades thing: transform all target images to black and white, and same with the recording output going into the program.
@gnack420
@gnack420 2 жыл бұрын
Different colours will end up as different shades of grey though. The correct approach is what the library already does, which is normalisation.
@BusinessWolf1
@BusinessWolf1 2 жыл бұрын
@@gnack420 Shades imply there's color. What you wanted to say was value (lightdark). Sorry I got into definitions. But yeah, you're right. I wrote that comment before finishing the video, I didn't know you were gonna use an algorithm to find likely matches, I thought that whould require some deep learning or something much more advanced. Shows how much I know about programming. Oh, and btw, thanks for the video, it was really fun!
@4ur3n
@4ur3n 3 жыл бұрын
great job man :D
@ClarityCoders
@ClarityCoders 3 жыл бұрын
Thanks I really appreciate it.
@hafizhnugrahav0113
@hafizhnugrahav0113 2 жыл бұрын
woah you jump from 2k subs to 7k in 5 days, congrats
@jeanregis9030
@jeanregis9030 Жыл бұрын
Great video thank you!
@admin2695
@admin2695 Жыл бұрын
In The setup thank you so much!
@ClarityCoders
@ClarityCoders Жыл бұрын
No problem. Thanks for watching.
@contantino_mm
@contantino_mm 2 жыл бұрын
blessed by youtube algo.. found your video and subscribed!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
It's actually given me some love this past week. Thanks for watching and commenting.
@joulesinwatt
@joulesinwatt 3 жыл бұрын
This is a huge inspiration.
@ClarityCoders
@ClarityCoders 3 жыл бұрын
thanks means a lot!
@eliebordron5599
@eliebordron5599 2 жыл бұрын
this seems really really cool; I want to do that on forge of empires . I'll watch this at some point
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Hope you do! Thanks for the comment.
@rastatugan
@rastatugan 2 жыл бұрын
Pretty clear and very interesting, coming from C and learning Python and opencv for industrial purpose, you helped me a lot , template matching can be used in so many way in my work. you have all my respect and i'll follow you with great joy. Thanks again for your videos.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
This comment really means a lot to me. Thanks for watching and commenting I'll keep making videos.
@mateussantiago3131
@mateussantiago3131 Жыл бұрын
ty cuz ive been having a hard ti getting started.
@ClarityCoders
@ClarityCoders Жыл бұрын
Anytime let me know if you have any questions!
@hiperion_1416
@hiperion_1416 2 жыл бұрын
getting game information from memory: 😴😴🤢🤬🤬 getting game information using opencv: 😎😎🤑🤑🥶🥶
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Both can be crazy frustrating haha...
@alekseys4702
@alekseys4702 Жыл бұрын
Amazing video!
@jordankendall86
@jordankendall86 2 ай бұрын
Dame! Great job!
@nixjavi7220
@nixjavi7220 2 жыл бұрын
Great tuto!
@Conqueror1807
@Conqueror1807 3 жыл бұрын
Here after watching CS Dojo's video :)
@ClarityCoders
@ClarityCoders 3 жыл бұрын
Awesome thanks for stopping by!!
@Gabirell
@Gabirell 3 ай бұрын
👏 Thank for this
@melonman1252
@melonman1252 2 жыл бұрын
Great Video!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks for watching protect that melon.
@andrewyoung9290
@andrewyoung9290 2 жыл бұрын
This is a great tutorial - thanks! Could you also do one explaining the kick ya chop script you have in your git hub? Also I tried to use the kick ya chop script but had to increase the sleep time to around 0.2 otherwise it wouldn't work. This is even after I tried reducing the region to search in. What gives? Do I need a faster computer or something?
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Yeah it might just be a difference in processing speed. I'll try to get some videos out explaining the code more in depth.
@crazyguys7923
@crazyguys7923 2 жыл бұрын
For the multiple boxes issue, could you lower the threshold till at least 2 boxes appear around the wheat, then remove any 1 box items which should be anything that isn't wheat, and continue from there?
@CharlesWeill
@CharlesWeill 2 жыл бұрын
I'm loving your content! As a fellow ML engineer, and fan on mini online games, I love this!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks! I really appreciate the feedback and views!
@eje2790
@eje2790 Жыл бұрын
OMG, thank you!!!!
@johanneszwilling
@johanneszwilling 2 жыл бұрын
Really cool!
@DuyTran-ss4lu
@DuyTran-ss4lu 2 жыл бұрын
This is really cool!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks for watching and commenting.
@ZirbertEruj
@ZirbertEruj 2 жыл бұрын
Amezing tutorial, subscrubed!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thank you! Thanks for watching / commenting.
@XIAOBAIZHANG-ym8pn
@XIAOBAIZHANG-ym8pn 7 күн бұрын
Very good video, can you combine your idea into the online game of chess, and use OPENCV to identify the FEN position code of chess on the web page?
@hpmc7426
@hpmc7426 2 жыл бұрын
Legends say the guy is still punching.
@noahfuchs9226
@noahfuchs9226 2 жыл бұрын
Nice video but one question. Did you purposefully excactly double their highscore at the end or was that coincidence?
@ClarityCoders
@ClarityCoders 2 жыл бұрын
I didn't even know! Good to have eyes like yours on these videos. Thanks for watching Noah.
@BebebnyaHuTao
@BebebnyaHuTao Жыл бұрын
This is awesome thanks for the tutorial! I just wonder how to implement the code with 5 multiple window (open at the same time)
@Gabbosauro
@Gabbosauro 2 жыл бұрын
very interesting, subscribed :)
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thank you sir!
@furkanakcakaya9443
@furkanakcakaya9443 2 жыл бұрын
expected to see dominating that online farming game
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Sorrry! Maybe in the next one 😏
@notunknown8275
@notunknown8275 2 жыл бұрын
thanks learned a lot :)
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks! Hope you stick around more cool things coming.
@actionkey8042
@actionkey8042 2 жыл бұрын
ClarityCoders -very very awesome
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks I really appreciate the comment.
@actionkey8042
@actionkey8042 2 жыл бұрын
@@ClarityCoders DO MORE AWESOME THINGSS)))
@daddyofalltrades
@daddyofalltrades 2 жыл бұрын
Love this
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks the comments and views really mean a lot!
@VGirotto
@VGirotto 2 жыл бұрын
Very good video!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks for watching Vinicius and for the comment. Means a lot!
@youcandoit4502
@youcandoit4502 2 жыл бұрын
Hi brother is it possible for you to make a chess bot with opencv as u make for other games or for knife hit game if yes please make a video on it .It will be really helpful .
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Sure let me see what I can do! Hit that bell so you don't miss it.
@youcandoit4502
@youcandoit4502 2 жыл бұрын
ohh I already done that as I like your content so much and thanks it really means a lot.
@Ali-Britco
@Ali-Britco 2 жыл бұрын
@@grzegorzabedzki2989 awesome work, very readable code, even though I have no interest in chess.
@billowen3285
@billowen3285 2 жыл бұрын
@@ClarityCoders please don't, chess sucks with cheaters. And if you must, at least don't release the code
@user-ox3qw9vs6t
@user-ox3qw9vs6t 3 жыл бұрын
Thank you.
@ClarityCoders
@ClarityCoders 3 жыл бұрын
No problem!
@kikianion1
@kikianion1 2 жыл бұрын
great video man, terima kasih
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thank you sir.
@vinceangeloespada6927
@vinceangeloespada6927 2 жыл бұрын
Thank you Mac Miller.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Hahaha love it.
@Atropin4ik
@Atropin4ik 2 жыл бұрын
@claritycoders Thanks fo the videos! May you guys comment on how do games (their developers) catch such bots? Asking for the ways around obviously)
@jeepjr
@jeepjr 2 жыл бұрын
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.
@tejeshjadhav4172
@tejeshjadhav4172 2 жыл бұрын
that small insect walking across his screen got me
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Dang bugs.
@slippydouglas
@slippydouglas 2 жыл бұрын
You can also find the wheat points without overlaps by running a local maxima filter on the grayscale image- accomplished in OpenCV with a dilate filter followed by a compare filter. You might not need it for this use-case, but you can also additionally filter out plateaus of local maximum value with an erode and a compare (if you want to know what to compare against what, for the sake of brevity here either google it or just try a few combinations; heck, you don’t need Jupyter to figure out the correct operations; you can prototype this kind of stuff with Photoshop/Gimp layers easily). I like image-processing solutions like this because 1. For an end-use you can more easily run the whole thing on a GPU where operations over a whole image are cheap and reducing that an array of numerical results is the expensive part, and 2. You can visually see and tune/debug the dilated image, the dilated-compared image, the dilated-compared-eroded image, and the dilated-compared-eroded-compared image.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Very good points and great feedback. Thanks for watching and commenting.
@farmminer4014
@farmminer4014 2 жыл бұрын
Thank you! Very great guide to OpenCV! But how to optimize it to get it to run 100 times faster? How to use multiple CPU cores and GPU with OpenCV?
@pianochannel100
@pianochannel100 2 жыл бұрын
@TridentflayerThe other thing you can attempt to do is vectorize your code very heavily so that you can do all of your calculations in numpy operations. Speaking from miserable experience, that can be far harder than just biting the bullet and doing it in c++
@Khujandiho
@Khujandiho Жыл бұрын
young Man!! you have my like button! =)) Ridiculous
@ClarityCoders
@ClarityCoders Жыл бұрын
Hey thanks I appreciate it! New one out today on Yolov7 check it out if you get time.
@bartvrhijn
@bartvrhijn 2 жыл бұрын
Jupyter us perfect for a live demonstration 👌
@ClarityCoders
@ClarityCoders 2 жыл бұрын
I agree. I actually caught a lot of heat for using Jupyter haha...
@jjolla6391
@jjolla6391 3 жыл бұрын
great tut. btw, what is the screen capture software used to make the vid?
@ClarityCoders
@ClarityCoders 3 жыл бұрын
OBS
@eliebordron5599
@eliebordron5599 2 жыл бұрын
Man that's awesome
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks! I really appreciate the comment and watching.
@mrwamble
@mrwamble Жыл бұрын
Holy shit I need to do this.
@solybr2271
@solybr2271 2 жыл бұрын
you are wonderful
@amortalbeing
@amortalbeing 4 ай бұрын
thanks🤩
@robertwoodruff8491
@robertwoodruff8491 2 жыл бұрын
This is AWESOME and it has been extremely helpful to me. There is one thing I'm trying to figure out. Let's say I grab an image and I know I want to look for one "needle" in the lower half of the image and a second in the upper half of the image and I want to know the relationship of the matches to each other. Now one way I could do this is grab two different regions two images. Do the matches, and then use some math to figure out their relationship to each other. But, what would be really convenient is if I can just look for the matches I need to in the lower half the image and get, multiple matches and then look for the other needle in the upper half and get multiple matches and already have the x and y coordinates for the overall image without having to translate them. If it can't be done, it's easy enough to add y offset to the coordinates I get out. But I was wondering.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
You mean you want to save time by only looking in the correct regions of the images while searching? You could use slicing to accomplish this task. Google python slicing.
@haroldsu1696
@haroldsu1696 3 жыл бұрын
thank you
@ClarityCoders
@ClarityCoders 3 жыл бұрын
You're welcome!
@sittipun31500
@sittipun31500 2 жыл бұрын
Impressive!!!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks for watching I really appreciate it!
@NadjibBait
@NadjibBait 3 ай бұрын
Normal programmers: Let's calculate the distance between two rectangles origin points, and if the points are close enough, we ignore the second one. Python programmers: Let's duplicate every single rectangle, even if it's already a duplicate, and let OpenCV deal with it.
@drdca8263
@drdca8263 2 жыл бұрын
Oh, this might solve a problem I have. There’s some made up alphabet which looks like it was made with a fixed typeface, and I want to transcribe the text in the images into actual text in order to try to decipher it, and I think I know how to extract the characters, but I still need to find how to detect which character they are. I can’t use standard OCR because these are a made up alphabet in an Easter egg for a game.
@peterkim7577
@peterkim7577 Жыл бұрын
TNice tutorials video is a great introduction to soft soft for beginners. I would Nice tutorialghly recomnd tNice tutorials tutorial to anyone starting out with soft soft.
@ClarityCoders
@ClarityCoders Жыл бұрын
Appreciate it! Thanks for the comment.
@SilverDashie
@SilverDashie 2 жыл бұрын
Maybe I could use some of this knowledge to augment Serpent into playing something like hades or issac again.
@YuikyuWolf
@YuikyuWolf 2 жыл бұрын
serpent?
@SilverDashie
@SilverDashie 2 жыл бұрын
@@YuikyuWolf SerpantAI
@hubcreek6957
@hubcreek6957 2 жыл бұрын
Jesus!!!!! Love it
@wyattb3138
@wyattb3138 3 ай бұрын
I really like Spyder IDE.
@Raid77
@Raid77 2 жыл бұрын
Amazing tutorial although I do have some ideas to improve some of what was presented, Firstly the rectangles grouping section, I'm sure there's a better way than just duplicating the list, maybe manually comparing the x, y of rectangles and if they are similar to another rectangle we don't use it The other point would be about beating the highscore, i would test for a single pixel's color above the player on each side where the background is static and check if it's color changes (a branch is above) and move accordingly
@thewdead3673
@thewdead3673 Жыл бұрын
great video! could you make something like this for a pokemon game walking in a grass and leveling up?
@lucario4399
@lucario4399 3 жыл бұрын
💯 th like
@raoufbensalem3417
@raoufbensalem3417 2 жыл бұрын
💯+💯th Like
@jean-marctrutna4098
@jean-marctrutna4098 2 жыл бұрын
Is it possible to move the mouse to the location of the identified object on the screen instead of a pre-set point?
@UTJK.
@UTJK. 2 жыл бұрын
Could this tecnique work to detect parts of a document (for example a rectangle with a text) in order to read what's inside that section of the document? It would be a scanned document so it could arrive with horizontal lines not perfectly aligned due the subtle movements of the paper durinig the passage under the scanner.
@Hato1992
@Hato1992 2 жыл бұрын
I think you can make it much easier. OpenCV can detect rectangles in image. Next, it can detect text (OCR) within those rectangles. If rectangles are not perfectly aligned you can fix perspective of those rects in openCV too.
Dominating an Online Multiplayer Game using Python and OpenCV.
14:31
ClarityCoders
Рет қаралды 271 М.
Game Automation with YOLOv8: Python Bot Tutorial
21:40
ClarityCoders
Рет қаралды 7 М.
Kick Awesome
00:58
Russo
Рет қаралды 111 МЛН
Nonomen funny video😂😂😂 #magic
00:29
Nonomen ノノメン
Рет қаралды 60 МЛН
Object Tracking with Opencv and Python
30:03
Pysource
Рет қаралды 583 М.
Beating a Pay to Win game with a bot
5:09
Kian Brose
Рет қаралды 1,8 МЛН
I tried to make a Valorant AI using computer vision
19:23
River's Educational Channel
Рет қаралды 1,3 МЛН
Making My Own Programming Language and Coding a Game in It
10:19
AstroSam
Рет қаралды 1,2 МЛН
Should You Still Learn To Code In 2024?
15:12
Tina Huang
Рет қаралды 56 М.
AI Destroys a Mobile Game in Real-Time with OpenCV (Object Detection)
12:18
Using Image Recognition to find Mario
8:47
CodeNoodles
Рет қаралды 1,9 МЛН
How I make bots using python (educational)
17:12
Kian Brose
Рет қаралды 510 М.
Python Automation with PyAutoGUI | Full Course With Projects!
36:11
Code of the Future
Рет қаралды 155 М.
Какой Смартфон Купить в 2024 Году? Выбор бюджетного телефона
14:21
Thebox - о технике и гаджетах
Рет қаралды 244 М.
Я Создал Новый Айфон!
0:59
FLV
Рет қаралды 590 М.
СЛОМАЛСЯ ПК ЗА 2000$🤬
0:59
Корнеич
Рет қаралды 1,2 МЛН
Робот зарядка на 65W🤖
0:36
serg1us
Рет қаралды 1,6 МЛН