This code can be found for Auto Canny Edge!
Image<Gray, byte> Img_Source_Gray = Img_Org_Gray.Copy(); Image<Gray, byte> Img_Egde_Gray = Img_Source_Gray.CopyBlank(); Image<Gray, byte> Img_SourceSmoothed_Gray = Img_Source_Gray.CopyBlank(); Image<Gray, byte> Img_Otsu_Gray = Img_Org_Gray.CopyBlank(); Img_SourceSmoothed_Gray = Img_Source_Gray.SmoothGaussian(3); double CannyAccThresh = CvInvoke.cvThreshold(Img_EgdeNR_Gray.Ptr, Img_Otsu_Gray.Ptr, 0, 255, Emgu.CV.CvEnum.THRESH.CV_THRESH_OTSU | Emgu.CV.CvEnum.THRESH.CV_THRESH_BINARY); double CannyThresh = 0.1 * CannyAccThresh; Img_Otsu_Gray.Dispose(); Img_Egde_Gray = Img_SourceSmoothed_Gray.Canny(CannyThresh, CannyAccThresh); imageBox2.Image = Img_Egde_Gray;
source share