Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Target Detection - Algorithm suggestions

I am trying to do image detection in C++. I have two images:

Image Scene: 1024x786 Person: 36x49

And I need to identify this particular person from the scene. I've tried to use Correlation but the image is too noisy and therefore doesn't give correct/accurate results.

I've been thinking/researching methods that would best solve this task and these seem the most logical:

  • Gaussian filters
  • Convolution
  • FFT

Basically, I would like to move the noise around the images, so then I can use Correlation to find the person more effectively.

I understand that an FFT will be hard to implement and/or may be slow especially with the size of the image I'm using.

Could anyone offer any pointers to solving this? What would the best technique/algorithm be?

like image 913
Phorce Avatar asked Sep 07 '26 08:09

Phorce


1 Answers

In Andrew Ng's Machine Learning class we did this exact problem using neural networks and a sliding window:

  1. train a neural network to recognize the particular feature you're looking for using data with tags for what the images are, using a 36x49 window (or whatever other size you want).
  2. for recognizing a new image, take the 36x49 rectangle and slide it across the image, testing at each location. When you move to a new location, move the window right by a certain number of pixels, call it the jump_size (say 5 pixels). When you reach the right-hand side of the image, go back to 0 and increment the y of your window by jump_size.

Neural networks are good for this because the noise isn't a huge issue: you don't need to remove it. It's also good because it can recognize images similar to ones it has seen before, but are slightly different (the face is at a different angle, the lighting is slightly different, etc.).

Of course, the downside is that you need the training data to do it. If you don't have a set of pre-tagged images then you might be out of luck - although if you have a Facebook account you can probably write a script to pull all of yours and your friends' tagged photos and use that.

like image 51
robbrit Avatar answered Sep 09 '26 23:09

robbrit