中文说明:应用背景功能[ sfinal,脱粒] = Canny(IMG,mlow,高,SIG)%的Canny边缘检测器 ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%功能 ;[ sfinal,关键技术功能DG = DGAUSS(SIG)X =地板(3×SIG):细胞(3×SIG);G = exp(- 0.5 * X ^ 2 /信号^ 2);克=克/总和(克);DG = x *克/信号^ 2;
English Description:
Application backgroundfunction [sFinal,thresh] = canny(img, mLow, mHigh, sig) % Canny edge detector %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % function [sFinal, thresh] =canny(img, mLow, mHigh, sig) % Applies the canny edge detection algo to the given image % img : the given image (matrix) in color or B/W % mLow : the threshold is set adaptively: low_threshold = mLow* mean_intensity(im_gradient) % mHigh: the threshol is set adaptively: high_threshold= mHigh*low_threshold % sig : the value of sigma for the derivative of gaussian operator % % The default values for (sig, mLow, mHigh) are (1, 0.5, 2.5) % The function displays the image and also returns: % sFinal : the final (B/W) image with edges % thresh : =[lowT