opencv - template matching vs feature matching for document image calssification -


to classify large collection of various documents images, 2 methods used. achieve better performance these methods used gpu programming.

first method: based on template

in method, fixed pattern extracted image , other images compared it. if similarity greater threshold value, image correctly classified.

code:

gpuinvoke.matchtemplate(source, template, imageresult, `emgu.cv.cvenum.tm_type.cv_tm_ccoeff_normed, intptr.zero, intptr.zero);` 

problems of first method:

this method not invariant rotate more 10 degrees. selected pattern in image may destroyed. (for example, damage caused punching document.) if pattern many, performance reduced.

the second method: based on image features

in way points of image selected resistant changes. if exist similar points in other image, image classified.

code:

gpubruteforcematcher matcher = new gpubruteforcematcher(gpubruteforcematcher.distancetype.l2);  matcher.knnmatch(gpuobserveddescriptors, gpumodeldescriptors, gpumatchindices, gpumatchdist, 2, null); 

problems of second method:

there similar areas in other images same feature vector. method have large false positive small change in structure of documents makes similar points destroyed.

the first method has high accuracy characterization, has less efficiency. second method has low accuracy finding right spots has high performance algorithm.

questions:

to achieve best accuracy , efficiency focus on method? there better approach classify images of documents?

considerations:

because resolution of document images 100 dots per inch, using methods based on contour matching , ocr not useful. use opencv or emgu_cv library image classification. images may rotated more 10 degrees.

samples:

sample1

sample2


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -