1

Is it possible to compare two intensity histograms (derived from gray-scale images) and obtain a likeness factor? In other words, I'm trying to detect the presence or absence of an soccer ball in an image. I've tried feature detection algorithms (such as SIFT/SURF) but they are not reliable enough for my application. I need something very reliable and robust.

Many thanks for your thoughts everyone.

Adam
  • 610
  • 1
  • 7
  • 21
  • 1
    In my opinion, intensity histograms are not the right approach for detecting a ball. I would try blob detection or circle detection, depends on the size of the ball in the image. – GilLevi Oct 07 '13 at 15:58
  • Histograms can help you identify if there is a soccer ball or not, but they can't be your main/only tool. – rold2007 Oct 07 '13 at 20:28

2 Answers2

0

This answer (Comparing two histograms) might help you. Generally, intensity comparisons are quite sensitive as e.g. white during day time is different from white during night time.

I think you should be able to derive something from compareHist() in openCV (http://docs.opencv.org/doc/tutorials/imgproc/histograms/histogram_comparison/histogram_comparison.html) to suit your needs if compareHist() does fit your purpose.

If not, this paper http://www.researchgate.net/publication/222417618_Tracking_the_soccer_ball_using_multiple_fixed_cameras/file/32bfe512f7e5c13133.pdf tracks the ball from multiple cameras and you might get some more ideas from that even though you might not be using multiple cameras.

Community
  • 1
  • 1
kkuilla
  • 2,226
  • 3
  • 34
  • 37
0

As kkuilla have mentioned, there is an available method to compare histogram, such as compareHist() in opencv

But I am not certain if it's really applicable for your program. I think you will like to use HoughTransfrom to detect circles.

More details can be seen in this paper: https://files.nyu.edu/jb4457/public/files/research/bristol/hough-report.pdf

Look for the part with coins for the circle detection in the paper. I did recall reading up somewhere before of how to do ball detection using Hough Transform too. Can't find it now. But it should be similar to your soccer ball.

This method should work. Hope this helps. Good luck(:

rockinfresh
  • 2,068
  • 4
  • 28
  • 46
  • Many thanks for your suggestion, you are correct. I have actually used the CHT for part of my algorithm. However, sometimes it generates false positives at peak values in the accumulator. I now require an extra check to determine if the circle with the highest number of votes really does contain the ball. – Adam Oct 08 '13 at 10:14
  • Hmm. In that case try using methods like mean shift segementation or watershed segmentation. So if the background colour diverse hugely from the colour of the ball, the shape of the ball should will be more clearly defined. This is just off the top of my head. Not really sure if it will work, but u can give it a shot. Hope that will help. (: – rockinfresh Oct 08 '13 at 10:33
  • Again, thanks for your suggestion. Unfortunately, these methods depend on the use of colour cameras and images. I'm using a grayscale high speed camera. – Adam Oct 08 '13 at 10:56