bytedeco / javacv-examples

Examples of using JavaCV / OpenCV library on Java Virtual Machine
337 stars 155 forks source link

How to you convert the cvSeq to Mat / Iplimage ? #8

Closed shresthaankit7 closed 8 years ago

shresthaankit7 commented 8 years ago

I need to get the minimum enclosing circle of the largest contour from my binary image. I have found largest contour but unable to get the enclosing circle. C++ function defines as: minEnclosingCirlce( InputArray points, Point2f center, float radius )

I have the contour as cvSeq. OpenCV says:

org.bytedeco.javacpp.opencv_imgproc.minEnclosingCircle(@ByVal Mat arg0, @ByRef Point2f arg1, @ByRef FloatPointer arg2)

Now i need to convert the cvSeq contour to Mat / Iplimage

Please help

saudet commented 8 years ago

Just use cvMinEnclosingCircle() that can accept a CvSeq.