3
$\begingroup$

I have chain contours representation: - classic Freeman chain - angle chain with distance (first: angle between neighbor points, second: distance between them)

What are the best techniques to match them, and If it is possible figure out rotation of element?

For now I tested approach with FFT(isn't it overuse for short chains?), shifting and comparing For Freeman chains Pairwise Geometrical Histogram, but it figures out rotation only with 45 degree resolution.

Any sugestions, codes, references will be appreciated.

$\endgroup$
  • 1
    $\begingroup$ I have worked only with 8-values chain codes and in my experience it's no likely to get more than ~22 degree precision form them. Also I has not very difficult case of identifying polygons, your situation could be more hard, but if you know your shape is similar to polygon segmenting contour can help. Anyway smoothing contour before analysis could help too. About FFT - FFT gives meaningful information down to 32 elements, below it could be overkill. $\endgroup$ – mirror2image Feb 6 '12 at 16:16
  • $\begingroup$ First of all there is a problem of decide if two contours are corresponding. I did contour smoothing before. Could you expand a little segmenting contour? How was your idea to identify polygons? I've tried only angle chains with 360 degree resolution with FFT and also get poor results. $\endgroup$ – krzych Feb 6 '12 at 21:45
  • 1
    $\begingroup$ I have segmented contours into straight line segment, algorithm was quite nontrivial - essentially I was locally integrating chain, got angle function and was looking for locally-constant angle. You should google for it if interested - there are several papers on this subject, I can't find references now... That is strange that you get poor result for fft - how many points in contour you have? Did you resample contours to the same size? Another method of identefication is calculate moments - sum(x-x_c)^2, sum(x-x_c)*(y-yc) etc. Also google for characters recognitions - they use countors too $\endgroup$ – mirror2image Feb 7 '12 at 4:53
  • 1
    $\begingroup$ Could be the case of strong distortion. Have you checked your phase correlation - no distinct peak at all? May be multiple peaks? $\endgroup$ – mirror2image Feb 8 '12 at 18:23
  • 1
    $\begingroup$ Could be also situation here contour have too much rotational symmetry - circle or rectangle, or ellips etc. Phase correlation can't work in that case - can't make distinction between different rotation phases and will produce multiple peaks, which correspond to those phases. With exception of circle where it will produce pure noise. But no other method would work on circle too... $\endgroup$ – mirror2image Feb 12 '12 at 5:05
3
$\begingroup$

I tried http://www.codeproject.com/Articles/196168/Contour-Analysis-for-Image-Recognition-in-C once. It did not work well for me, but that guy seem to have better results.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.