c# - what is the function to find otsu threshold in emgu cv? -
i don't need thresholded image. want threshold. found in opencv.
cv::threshold( orig_img, thres_img, 0, 255, cv_thresh_binary+cv_thresh_otsu );
is there equivalent in emgucv. in advance.
ps. need use threshold canny edge detector
you can refer code auto canny edge detector!
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;
Comments
Post a Comment