usernan
usernan

Reputation: 592

OpenCV to find close match for images

i want to find closest match of image . for example there is image of car and bike . If given image is of bike .then it should compare given image to stored car and bike and give result according to which ever is closed base on shape .

I wanted to know is it possible to find contour and match with closest one .

I tried doing using haar cascade in open cv .By training car images and bike . but results were not correct may be bez of less no of training data.(i dont want to use this )

Upvotes: 1

Views: 1564

Answers (2)

Lamar Latrell
Lamar Latrell

Reputation: 1670

You're going to have an uphill struggle using standard techniques like contours for this.

Edit >> So, using your bike example, what will happen here:

enter image description here

?

Neural Networks and other machine learning algorithms are your best bet instead:

enter image description here

Specifically of the 'Multiclass Classification' variety. With training (time), they stand a better chance of sorting your cats from your bicycles.

As for code examples have a look here. Not an image based example, but you need to start somewhere :)

Also helpful (and tested working by myself) is the DLIB library:

With only 8 training images of a stop sign, its internal structure formed this representation:

enter image description here

Pretty nifty.

There is no reason you cant use your contours results as inputs to a ML classifier, as long as they increase the signal to noise ratio somehow... (i.e. they're somehow more 'bikey' than not)

Upvotes: 2

Anubhav Rohatgi
Anubhav Rohatgi

Reputation: 458

In my opinion the following methods can be applied and tested ->

  1. GF-HOG
  2. Deformable Parts Model
  3. Neural Networks

A combination would be an awesome idea but will GFHOG will add to overheads.

Study about it its pretty cool tech I think this will answer your query. http://personal.ee.surrey.ac.uk/Personal/R.Hu/ICIP.html

Upvotes: 1

Related Questions