Hawk
Hawk

Reputation: 21

Using Emgu.CV to find circles in a target face?

I am trying to detect the circles in an image of a target face using Emgu.Cv but having issues with finding the 'correct' circles. I want to find the borders between circles.

I am using C# (DotNet8, in a blazor web app) :

        Image<Bgr, byte> original = new Image<Bgr, byte>("wwwroot/FileArea/TestImg.jpg").Convert<Bgr, byte>();
        Image<Gray, byte> grayframe = original.Convert<Gray, byte>();

        var HoughCircles = CvInvoke.HoughCircles(grayframe, HoughModes.Gradient, 40, 10);

        foreach (var circle in HoughCircles)
        {
            original.Draw(circle, new Bgr(Color.Red), 2);
        }

        original.Save("wwwroot/FileArea/Target.jpg");

I have played around with the resolution variable, but only been able to produce some kind of random circles (se result image). Anyone has a better clue of how to use emgu.cv in a more correct way to find the border circles?

Original image:

enter image description here

Image now produced: enter image description here

Upvotes: 0

Views: 58

Answers (0)

Related Questions