[FIXED] Which OpenCV4Android class does the field/constant CV_FILLED belongs to?

Issue

What OpenCV4Android class does the field CV_FILLED belong to? I couldn't find out from my Google search.

It is used as the value of the 5th argument to the href="http://docs.opencv.org/2.4/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html#drawcontours" rel="nofollow noreferrer">Imgproc.drawContours() method. From the documentation:

thickness – Thickness of lines the contours are drawn with. If it is negative (for example, thickness=CV_FILLED ), the contour interiors are drawn.

I need to use it but in Android/Java, I can't use it just like that, I need to use the name of the class it belongs to with the dot operator, something like theClass.CV_FILLED. If I try to use just CV_FILLED, compiler complains, "CV_FILLED cannot be resolved to a variable".


Solution

drawContour example:

Imgproc.drawContours(drawOn, handContours, idx, new Scalar(180, 10, 100, 255), Core.BORDER_DEFAULT, Core.LINE_8, new Mat(), 25, new Point(0, 0));

So you should use Core.FILLED for example.



Answered By - Daniel Kuta
Answer Checked By - Senaida (sql.easybugfix Volunteer)

Related Posts

Post a Comment