AcBx
AcBx

Reputation: 7

How can i get the center of a circleF in Emgu (C#)

After using the HoughCircles method I have some trouble to get the center of the detected circles. The documentation says I should use the public PointF Center { get; set; } method to get the center of the elements of a CircleF. But VS has a problem to convert the CicleF to an PointF. I am not so familiar to C# so that I have no idea how to solve this problem.

Documentation Emgu CircleF[]: http://www.emgu.com/wiki/files/2.0.0.0/html/9de6931a-17bc-4125-8b5e-e9f86e68889e.htm Center of a CircleF: http://www.emgu.com/wiki/files/2.0.0.0/html/b34b6d73-74c6-864e-a33a-1f9c6ce4cee9.htm

The documentation is for me very confusing, so can anybody help me with that problem?

Upvotes: 0

Views: 1070

Answers (1)

Billy Mailman
Billy Mailman

Reputation: 272

Center is a property of type PointF in the CircleF struct, not a method on the PointF struct. Assuming you have a CircleF named circle, use

PointF point = circle.Center;

To get the center of the circle.

Upvotes: 1

Related Questions