Filter löschen
Filter löschen

How to get smoothed edges afeter background removal ?

3 Ansichten (letzte 30 Tage)
voxey
voxey am 31 Dez. 2019
Beantwortet: Image Analyst am 31 Dez. 2019
How to get smoothed edges afeter background removal ? from below file exchange ?
My resutlts :
resultimage.png
  1 Kommentar
KALYAN ACHARJYA
KALYAN ACHARJYA am 31 Dez. 2019
Bearbeitet: KALYAN ACHARJYA am 31 Dez. 2019
There complete background is not yet remove. After only you should proceed for make smooth boundary.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 31 Dez. 2019
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));

Produkte


Version

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by