How to get smoothed edges afeter background removal ?
2 ビュー (過去 30 日間)
古いコメントを表示
How to get smoothed edges afeter background removal ? from below file exchange ?
My resutlts :
![resultimage.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/257711/resultimage.png)
1 件のコメント
KALYAN ACHARJYA
2019 年 12 月 31 日
編集済み: KALYAN ACHARJYA
2019 年 12 月 31 日
There complete background is not yet remove. After only you should proceed for make smooth boundary.
回答 (1 件)
Image Analyst
2019 年 12 月 31 日
Take your binary image and smooth it then threshold at 0.5 and apply it.
windowSize = 9; % An odd number. Bigger = more smoothing.
kernel = ones(windowSize)/windowSize^2;
blurryMask = conv2(mask, kernel, 'same') > 0.5;
% Mask the image using bsxfun() function to multiply the mask by each channel individually.
maskedRgbImage = bsxfun(@times, rgbImage, cast(blurryMask, 'like', rgbImage));
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!