Ask Your Question

unixer's profile - activity

2017-04-07 02:41:52 -0600 received badge  Popular Question (source)
2014-09-02 02:24:04 -0600 answered a question Ask help for chamfer matching sample code

Anyone can help me?

2014-08-23 19:52:34 -0600 commented question Ask help for chamfer matching sample code

Actually I have firstly tried ocr here, I found ocr is very unstable, it often performs wrong recognition. So I am trying to find some new tools/algorithms such as chamfer matching, shape context, etc. I read some papers, seems chamfer matching and shape context are very powerful to do text recognition. See http://mi.eng.cam.ac.uk/~bdrs2/papers/thayananthan_cvpr03.pdf So I am wondering if adjusting some parameters in samples of OpenCV chamfer matching algorithms can fit my work.

2014-08-22 21:32:24 -0600 answered a question Ask help for chamfer matching sample code

Can anybody help me?

2014-08-12 20:56:00 -0600 commented question Ask help for chamfer matching sample code

I am using Windows 7 x64 system and VS 2010.

2014-08-12 20:24:53 -0600 received badge  Editor (source)
2014-08-12 20:21:10 -0600 asked a question Ask help for chamfer matching sample code

Hello, I got chamfermatching.cpp and sample code from OpenCV 2.4.9 and I am trying to make the algorithm to match characters. Please see my source files and testing images attached. I got below results:

The program can match e1.png in e2.png, minCost is 0.0626175. It can match e1.png in e1.png(match itself), minCost is 0.0730605. But it can also match e1.png in a.png, minCost is 0.0681643.

You see, this means the match is not good, it cannot distinguish letter a, letter e and bigger letter e. I did a little change to the code. Commenting or uncommenting Canny() lines in opencv_test.cpp has the similar results.

I doubt the problem is in the implementation of chamferMatching2() function. Its declaration is: CV_EXPORTS_W int chamferMatching2( Mat& img, Mat& templ, CV_OUT vector<vector<point> >& results, CV_OUT vector<float>& cost, double templScale=1, int maxMatches = 20, double minMatchDistance = 1.0, int padX = 3, int padY = 3, int scales = 5, double minScale = 0.6, double maxScale = 1.6, double orientationWeight = 0.5, double truncate = 20);

You see, there are a lot of default parameters. I doubt the problem exists here. Maybe I should adjust the default parameters? Can you give me some guide to fix the problem?

Thanks in advance!

a.png

e1.png

e2.png

chamfermatching2.cpp: http://pastebin.com/rKb1gKex

opencv_test.cpp: http://pastebin.com/7Xz0ef6s

2014-07-23 00:59:58 -0600 commented answer chamerMatching giving error "Debug Assertion failed!"

Thanks Guanta. I am in the chat room. My id is unixer. Are you often there?

2014-07-22 02:28:08 -0600 commented answer chamerMatching giving error "Debug Assertion failed!"

Thanks Guanta. I think I should setup an compile environment to try this, even fix it. Are you a developer of opencv? Can I add you as friend on Gtalk or Skype or something else? I am a newbie in computer vision area. I definitely need your help.

2014-07-22 00:00:29 -0600 commented answer chamerMatching giving error "Debug Assertion failed!"

It doesn't work. I am afraid the problem is in "int best = chamerMatching( img, tpl, results, costs )" as it never returns and outputs the error. Please see http://ngoding.co/read/2014/07/debug-assertion-failed-vcincludevector-vector-iterator-offset-out-of-range-in-chamfermatching-opencv/ This is a similar error. Do you think the solution (comment delete templates[i]) works for this error as well? I don't have an environment to debug this error.

2014-07-21 03:06:14 -0600 commented answer debug assertion failed vc\include\vector vector iterator + offset out of range in chamferMatching Opencv

ping... please help me..

2014-07-20 08:28:32 -0600 commented answer debug assertion failed vc\include\vector vector iterator + offset out of range in chamferMatching Opencv

Hi Guanta, Can you look into http://answers.opencv.org/question/34104/chamermatching-giving-error-debug-assertion-failed/ ? I hit this issue with OpenCV 2.4.9 with the sample program: chamfer.cpp. I also used logo_in_clutter.png and logo.png.

2014-07-20 08:13:34 -0600 answered a question chamerMatching giving error "Debug Assertion failed!"

hit this issue with opencv 2.4.9