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);
}
有什麼東西在那裏,我能爲取得更好的成績?