0
我试图用HoughCircles得到胎记。EmguCV(OpenCV)试图找到胎记(痣)
我的代码:
Mat imgDest = new Mat(imagePath, LoadImageType.Color);
CvtColor(imgDest, imgDest, ColorConversion.Bgr2Gray);
MedianBlur(imgDest, imgDest, 7);
//nice try but not so good... :(
//CvInvoke.Threshold(imgDest, imgDest, 120, 255, ThresholdType.Binary);
//CvInvoke.Canny(imgDest, imgDest, 40, 200);
var circles = CvInvoke.HoughCircles(imgDest, HoughType.Gradient, 1, imgDest.Rows/8, 60, 18);
foreach(var circle in circles)
{
CvInvoke.Circle(imgDest, new Point((int)circle.Center.X, (int)circle.Center.Y), (int)circle.Radius, new MCvScalar(255, 255, 0), 2);
imgDest.Save(imageName);
}
有什么东西在那里,我能为取得更好的成绩?