Ask Your Question
0

Template Matching for android is rather slow. Need suggestions for faster and more user friendly interface.

asked 2013-04-09 04:39:48 -0500

NightLife gravatar image

updated 2013-04-09 04:53:47 -0500

I have developed the application for android to find the overlap by means of "template matching" method. But the problemis that it is really slow.

Can anybody help me to make it more faster and User-friendly?

Thanks

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
2

answered 2013-04-09 06:11:05 -0500

You can also try "Fast template matching with image pyramid" (the template matching result on each layer will be used to define region of interest for the next layer)

Fast template matching with image pyramid

edit flag offensive delete link more

Comments

Thats Great :) Thanks!

NightLife gravatar imageNightLife ( 2013-04-09 06:41:16 -0500 )edit
3

answered 2013-04-09 04:59:27 -0500

Basically template matching is the matching of a single descriptor versus a huge database of descriptors, called a codebook, which is rather computational expensive. Considering that your android application is probably running on a mobile device, also consider that mobile devices do not have the computational power of a desktop PC. Hardware is not as strong, processing power is lower, interfaces require more time, ... it is the downside of mobile devices.

If you want to speed up your template matching then several approaches can be applied, but don't expect to large improvements. Template matching will take long.

  • Try to create a codebook with just enough samples to get good matches for your case. This means that you do not want to get a codebook as large as possible, since more matching will need to be done, increasing your time.
  • Reduce the size of your input windows --> will lead to more compact descriptors of the images and patches, which will reduce computational time.
edit flag offensive delete link more

Comments

Thanks Man :) Do you know other method to find the overlap? I mean instead of "template matching". because I can not reduce the size of template!!!!

NightLife gravatar imageNightLife ( 2013-04-09 05:31:53 -0500 )edit
1

If you want template matching, there is no other way. You could try feature point matching, altough I do not know how fast this is in compairment to template matching. Link : http://docs.opencv.org/doc/tutorials/features2d/table_of_content_features2d/table_of_content_features2d.html#table-of-content-feature2d

StevenPuttemans gravatar imageStevenPuttemans ( 2013-04-09 05:34:45 -0500 )edit
2

Actually this would have been my approach, using e.g. BRISK-Detector with FREAK-Descriptor will give you nice matches in basically no-time.

Guanta gravatar imageGuanta ( 2013-04-09 13:52:53 -0500 )edit
2

answered 2013-04-09 04:55:29 -0500

Guanta gravatar image

Probably you can't accelerate matchTemplate() since it is already optimized. However maybe you are calling it too often? So please elaborate about your problem you want to solve! Which overlap you want to detect? Maybe there exist an alternative approach?!

edit flag offensive delete link more

Comments

It is called for every frame and I think it makes it slow!!! I have the template image that its size is 40% of current frame(big template) . What do you propose? Do you think that skipping frame will help me to make it more faster?

NightLife gravatar imageNightLife ( 2013-04-09 05:01:32 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-04-09 04:39:48 -0500

Seen: 1,886 times

Last updated: Apr 09 '13