Ask Your Question
0

"core.ellipse" has error

asked 2016-07-28 06:54:49 -0600

dava gravatar image

updated 2018-12-24 16:00:15 -0600

How can I solve error? "core.ellipse" has error like below image description

but core.ellipse have api doc

===>http://docs.opencv.org/java/2.4.2/org/opencv/core/Core.html#ellipse(org.opencv.core.Mat, org.opencv.core.Point, org.opencv.core.Size, double, double, double, org.opencv.core.Scalar)

ellipse

public static void ellipse(Mat img, RotatedRect box, Scalar color, int thickness) Draws a simple or thick elliptic arc or fills an ellipse sector.

The functions ellipse with less parameters draw an ellipse outline, a filled ellipse, an elliptic arc, or a filled ellipse sector. A piecewise-linear curve is used to approximate the elliptic arc boundary. If you need more control of the ellipse rendering, you can retrieve the curve using "ellipse2Poly" and then render it with "polylines" or fill it with "fillPoly". If you use the first variant of the function and want to draw the whole ellipse, not an arc, pass startAngle=0 and endAngle=360. The figure below explains the meaning of the parameters. Figure 1. Parameters of Elliptic Arc

Parameters: img - Image. box - Alternative ellipse representation via "RotatedRect" or CvBox2D. This means that the function draws an ellipse inscribed in the rotated rectangle. color - Ellipse color. thickness - Thickness of the ellipse arc outline, if positive. Otherwise, this indicates that a filled ellipse sector is to be drawn. See Also:

org.opencv.core.Core.ellipse

edit retag flag offensive close merge delete

Comments

are you really using 2.4.2 ? (it was moved to Imgproc.ellipse in later version)

berak gravatar imageberak ( 2016-07-28 08:07:00 -0600 )edit

I am using opencv 3.1 for android. I found "core.ellipse" in old source. How can I make right source that works well like app using "core.ellipse" in opencv old version.

dava gravatar imagedava ( 2016-07-28 13:14:42 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-07-28 16:44:15 -0600

berak gravatar image

with opencv3, all drawing functions (elllipse, clircle,putText, etc) were moved to Imgproc, so you have to use:

Imgproc.ellipse() , not Core.ellipse()

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-07-28 06:54:49 -0600

Seen: 616 times

Last updated: Jul 28 '16