在emgu cv中找到otsu阈值的function是什么?

我不需要阈值图像。 我想要门槛。 我在OpenCV中发现了这个。

cv::threshold( orig_img, thres_img, 0, 255, CV_THRESH_BINARY+CV_THRESH_OTSU ); 

在EmguCv中是否存在等价物。 提前致谢。

PS。 我需要将此阈值用于canny边缘检测器

您可以参考Auto Canny Edge探测器的此代码!

 Image Img_Source_Gray = Img_Org_Gray.Copy(); Image Img_Egde_Gray = Img_Source_Gray.CopyBlank(); Image Img_SourceSmoothed_Gray = Img_Source_Gray.CopyBlank(); Image 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;