How to get radius ?

Ask questions on using Emgu CV with C++
Post Reply
manguscik
Posts: 4
Joined: Thu Mar 05, 2009 3:41 am

How to get radius ?

Post by manguscik » Tue May 05, 2009 4:26 pm

Hi guys,
How to get the radius of the circle with the following code?

Thank you in advance.

Code: Select all

Gray cannyThreshold = Gray(150);
Gray circleAccumulatorThreshold = Gray(20);

array<CircleF>^ circles = frame_temp->HoughCircles(cannyThreshold, circleAccumulatorThreshold, 3, 400, 1, 100)[0]; //Get the circles from the first channel

//drawing circles in the frame
for each (CircleF circle in circles){
      frame->Draw(circle, Bgr(Color::Yellow), 2);
}

canming
Site Admin
Posts: 1038
Joined: Thu Feb 28, 2008 4:16 pm

Re: How to get radius ?

Post by canming » Tue May 05, 2009 7:35 pm

The CircleF structure has a Radius property.

Just call circle.Radius

manguscik
Posts: 4
Joined: Thu Mar 05, 2009 3:41 am

Re: How to get radius ?

Post by manguscik » Sat May 09, 2009 4:28 pm

Thank canming,

Post Reply