Jump to content

Best/simplest way to get object recognition

Go to solution Solved by Sauron,
8 minutes ago, YouDontHaveToKnow said:

I need just is this = that - return true false. Do you maybe know of a guide for how to implement it in OpenCV or keywords to search, because all I have seen is going straight into complex stuff with neural networks and object tracking. Thanks a lot!

there's this very good summary and example on SO, note that OpenCV works more or less the same in python as it does in C++

I am trying to make simple computer vision/object recognition. My objects are cartoon like aka. simple and they don't move. I am just trying to make it if an object exists say it exits and if it doesn't say it doesn't. They are coming from an application so the object recognition would be running until I stop it. I would like to do it in C++ and my OS is Linux. I already know how to get the window info, geometry and how to pump it into C++ using Xlib.

 

Link to comment
Share on other sites

Link to post
Share on other sites

You haven't been too specific but if you're using C++ the obvious choice is the OpenCV library.

 

Now, if you're looking for exact matches, i.e. finding a specific image you know in advance within another image, OpenCV has you covered in spades and it's really not hard to implement. If you want something that can tell you if the image contains a cat, then things get complicated. If you're looking for a real cat there are pre-trained neural network weights you can use in OpenCV through the dnn functionality, which isn't too hard but the documentation is a bit sparse. If you're looking for highly stylized cats, i.e. cartoon cats, you'll probably need to train your own network which is a whole can of worms on its own.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

38 minutes ago, Sauron said:

You haven't been too specific but if you're using C++ the obvious choice is the OpenCV library.

 

Now, if you're looking for exact matches, i.e. finding a specific image you know in advance within another image, OpenCV has you covered in spades and it's really not hard to implement. If you want something that can tell you if the image contains a cat, then things get complicated. If you're looking for a real cat there are pre-trained neural network weights you can use in OpenCV through the dnn functionality, which isn't too hard but the documentation is a bit sparse. If you're looking for highly stylized cats, i.e. cartoon cats, you'll probably need to train your own network which is a whole can of worms on its own.

I need just is this = that - return true false. Do you maybe know of a guide for how to implement it in OpenCV or keywords to search, because all I have seen is going straight into complex stuff with neural networks and object tracking. Thanks a lot!

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, YouDontHaveToKnow said:

I need just is this = that - return true false. Do you maybe know of a guide for how to implement it in OpenCV or keywords to search, because all I have seen is going straight into complex stuff with neural networks and object tracking. Thanks a lot!

there's this very good summary and example on SO, note that OpenCV works more or less the same in python as it does in C++

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, Sauron said:

there's this very good summary and example on SO, note that OpenCV works more or less the same in python as it does in C++

Thank you so much. This is definitely what I needed

Link to comment
Share on other sites

Link to post
Share on other sites

I agree that opencv is a great option, especially if you're wanting cpp as your language of choice. If you ever need anything more complex and don't want to do everything yourself, I would recommend looking into existing research. When I first got into trying to understand object detection and neural networks for the purpose of using them in applications, I found that the literature does get very heavy. Fortunately, there are a lot of very smart people that have solved a lot of the problems in object detection. Even more fortunately, they often open source their models on Github. I've been able to implement many of these models in applications without fully understanding the math behind how they were trained and have been able to get some good results doing so. Long story short, don't let the buz words and math scare you, just skip to the part where they tell you how to plug in inputs and use the outputs.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×