adepondra / javacv

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

Can't find binding for OpenCV Partition function #144

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

javaCV 2011-11-01
OpenCV 2.3.1

I am looking for the partition() function in OpenCV.
http://opencv.itseez.com/modules/core/doc/clustering.html

I suspect passing in the equivalence function is going to be a bit of a pain 
from Java.

Original issue reported on code.google.com by jdjobs2...@gmail.com on 5 Jan 2012 at 11:00

GoogleCodeExporter commented 9 years ago
As a work around on this I have found these two libraries:

jpaul.DataStructs.UnionFind;
http://jpaul.sourceforge.net/

http://www.jgrapht.org/
org.jgrapht.alg.util.UnionFind

-JD

Original comment by jdjobs2...@gmail.com on 5 Jan 2012 at 11:43

GoogleCodeExporter commented 9 years ago
Yes, this is quite the template function they have there in the core.hpp 
file... I suppose we could use a generic void* type with a generic predicate 
that works on void*, calling inside Java with Pointer objects, but I am not 
sure how useful that would be. Calling into the JVM is quite expensive, we 
might as well use an implementation written in Java, such as the ones you found 
above. (And Java SE already comes with sorting algorithms, so no need of that 
other template sort() function.)

Original comment by samuel.a...@gmail.com on 6 Jan 2012 at 7:24

GoogleCodeExporter commented 9 years ago
Just to close this issue, I've added an instance of that function:
http://code.google.com/p/javacv/source/detail?r=8142e8212e248a1576dfac301827fd98
33774d24
Let me know that it looks good! thanks

Original comment by samuel.a...@gmail.com on 3 Sep 2012 at 1:20

GoogleCodeExporter commented 9 years ago
Ok, done, it's in JavaCV 0.3, enjoy!

Original comment by samuel.a...@gmail.com on 5 Nov 2012 at 11:28