1

I am looking for solutions BoofCV or any pure java computer vision library that doesn't require OpenCV to do template matching of images to detect object within a picture.

For example, finding the position of an image within a bigger picture.

I have had success with cvMatchTemplate() example on OpenCV, but interested in using BoofCV to achieve the same results.

Rui Marques
  • 8,567
  • 3
  • 60
  • 91
KJW
  • 15,035
  • 47
  • 137
  • 243
  • It wouldn't take long to add that functionality to BoofCV. However, template matching is slow and very sensitive to noise... I'll add that functionality to BoofCV is you do the following: 1) Provide an interesting example image and template that you wish to be searched through that I can use in an example on the website. 2) What problem do you hope to solve with this functionality? Either e-mail me those answers or post them to BoofCV's mailing list. Both can be found easily. – lessthanoptimal Aug 23 '12 at 01:20
  • Hi Peter, thank you I will send out an email or post on the mailing list this weekend! – KJW Aug 23 '12 at 04:44

2 Answers2

3

This functionality has recently been added to BoofCV. See example below:

http://boofcv.org/index.php?title=Example_Template_Matching

lessthanoptimal
  • 2,722
  • 2
  • 23
  • 25
  • the code doesn't compile due to missing ImageStatistics class – KJW Dec 02 '12 at 21:26
  • The examples were linking to the latest GIT code and not the stable release. Download the code and go to the examples directory. For tech support type questions please send a private message or post to the message board. – lessthanoptimal Dec 06 '12 at 13:02
  • yes. I've done that and it's working but it's extremely slow! I've used SimpleCV and it was done in a fraction of time while BoofCV took 10+ seconds to complete. – KJW Dec 06 '12 at 19:30
  • If the algorithms are identical and implemented equally well I would expected Java to be about 3 times slow in this case. Array heavy operations take the biggest hit. – lessthanoptimal Dec 10 '12 at 13:14
  • well...it was worth a shot. – KJW Dec 10 '12 at 22:11
  • @PeterAbeles what are `templatePaint` and `templateBrowser` what shall I give as input for these variables? I think only a Source image and template image are enough but I dont understand the other 2 also where shall I specify a value for `expectedMatches` ? – Anarkie Dec 01 '14 at 17:24
  • Those are just templates for paint and browser icons. It does a search for three different templates. Those two plus the "X" – lessthanoptimal Dec 03 '14 at 03:47
2

It seems this functionality is not implemented in BoofCV.

Régis B.
  • 10,092
  • 6
  • 54
  • 90