1

There is a very cool sounding technique called Shape Context matching, which can be used in an Image Recognition application to match an "unknown image" against a known "image library." There are numerous descriptions of the concept documented on the web (mostly all variations of the same original paper), for example: http://www.eecs.berkeley.edu/Research/Projects/CS/vision/shape/sc_digits.html

I found a JAVA implementation and a MATLAB implementation of the algorithm described in the paper, but I cannot find an objective-c implementation. Anyone know if there is any objective-c code out there, anywhere, implementing these techniques? I sure would like to take advantage of it, rather than trying to write that stuff myself!

1
  • 1
    Could you provide a link to the Java implementation you found? Aug 8, 2014 at 15:20

3 Answers 3

3

Here you can find an interesting c++ implementation (for non-commercial usage, didn't check it yet.. see the downloads): http://www.umiacs.umd.edu/~zhengyf/PointMatching.htm

2
  • emm... the above cpp-code is partly buggy BUT IN GENERAL VERY GOOD SUPPORT TO REIMPLEMENT IT (using e.g. OpenCV)! Found bug is e.g.: log10 in shapecontext.cpp (wrong) used instead of log2 (!! correct for log-polar coordinates, see e.g. en.wikipedia.org/wiki/Log-polar_coordinates).. and I'm not sure if everywhere point p = q is excluded (should be) etc..
    – Rob
    Sep 15, 2012 at 17:44
  • why should log10 be wrong? The OpenCV implementation also uses log10.
    – R D
    Nov 25, 2016 at 7:40
1

I'm currently searching for a Java implementation of the algorithm. Could you please provide a link to the implementation you found?

The original matlab code can be downloaded at: www.eecs.berkeley.edu/Research/Projects/CS/vision/shape/sc_digits.html

I also found a C# implementation: http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=7465&lngWId=10

0

Take a look at OpenCV. It is implemented in C so it can be used in obj-c pretty easily.

5
  • Ah, ok. When I first read the OpenCV main page I saw references to Linux and Windows, but nothing about Mac or objective-c. But upon closer reading I see that "portions" should work under Mac OS X. So I'll try to install it and see if the portion I need is one of those. Right now I am doing my development on the Mac ... but eventually (if it all works) I will want to build the app for iphone. If I use an OpenCV component will that hinder my ability to build for iphone?
    – Adam
    Jul 1, 2010 at 13:49
  • So I have installed OpenCV, and successfully done a simple test. I will now delve a little deeper, and see what I can come up with.
    – Adam
    Jul 5, 2010 at 21:35
  • 1
    opencv does not have implementation of shape context based matching.
    – masad
    Sep 25, 2012 at 23:18
  • opencv 3.0 has a c++ implementation of shape context based matching, but it doesn't have proper bindings for all languages yet. Aug 12, 2014 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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