rindarith / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

ChamferMatching #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, 

I'd like to do chamfer matching in javacv, and there is c++ source 
(OpenCV-2.3.1/modules/contrib/src/chamfermatching.cpp) included in the latest 
openCV, however it doesn't seem to be accessible from javaCV. So far JavaCV is 
great and I'm using it extensively for my research, but if I could work out how 
to use chamfer matching that would be great!

At the moment I have started trying to write a Java translation of the c++ 
includes as is done for the other classes, but I think I'm a long way off:

 public static class ChamferMatcher extends Pointer {
        static { load(); }
        public ChamferMatcher() { }

        public ChamferMatcher(Pointer p) { super(p); }

        public native void chamerMatching( IplImage img, IplImage templ,
                    Vector<Vector<Point>> results, Vector<Float> costs,
                    double templScale, int maxMatches, double minMatchDistance, int padX,
                    int padY, int scales, double minScale, double maxScale,
                    double orientationWeight, double truncate );

    }

Thanks!

Adam

Original issue reported on code.google.com by mynameis...@hotmail.com on 4 Nov 2011 at 2:01

GoogleCodeExporter commented 9 years ago
That class is not exported as part of the include files of OpenCV. How do 
people use it in C++?

Original comment by samuel.a...@gmail.com on 4 Nov 2011 at 2:45

GoogleCodeExporter commented 9 years ago
In the OpenCV 2.3.1 distribution (in OpenCV-2.3.1/samples/cpp) there is a c++ 
class called chamfer.cpp (attached), which calls the method chamerMatching, 
that's the one I want to implement..

Original comment by mynameis...@hotmail.com on 4 Nov 2011 at 3:26

Attachments:

GoogleCodeExporter commented 9 years ago
They use the function named "chamerMatching", which JavaCV maps here:
http://www.google.com/codesearch#8TJuDx-2Qiw/trunk/javacv/src/com/googlecode/jav
acv/cpp/opencv_contrib.java&q=chamerMatching%20package:http://javacv\.googlecode
\.com&l=550

Original comment by samuel.a...@gmail.com on 4 Nov 2011 at 4:01