Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

the largest circle in palm contour

$
0
0
Hi. I implemented the algorithm and the result is very good . for example ![image description](/upfiles/1450963457932749.jpg) code: public Point centerHand(final List points,final MatOfPoint contour) { ExecutorService executor = Executors.newFixedThreadPool(10); final double[] distance = new double[points.size()]; for(int j=0; j maxDistance) { maxDistance = distance[index]; maxIndex = index; } } Core.circle(image, points.get(maxIndex), (int)maxDistance, new Scalar(0,0,255)); return points.get(maxIndex); } private double findMinDistance(List contourPoints, Point candidate) { double result = Double.MAX_VALUE; for(Point p : contourPoints) { result = Math.min(lenght(p, candidate), result); } return result; } Unfortunately this algorithm is brutal and it works very slowly. How can I do the same thing but faster?

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>