Code:
clc
clear all
close all
warning off
bw=imread('C:\Users\USER\Desktop\tespad.png');
imshow(bw);
title('Input Image');
raw_hole_filling=imfill(bw,'holes');
figure;
imshow(raw_hole_filling);
title('Hole Filling on Raw Image');
tl_t=padarray(bw,[1 1],1,'pre');
figure;
imshow(tl_t);
title('Padded 1 in left and top part');
tl_t=imfill(tl_t,'holes');
tl_t=tl_t(2:end,2:end);
figure;
imshow(tl_t);
title('Hole filling in top-left and upper part');
upper_right=imfill(padarray(padarray(tl_t,[1 0],1,'pre'),[1 1],1,'post'),'holes');
figure;
imshow(upper_right);
title('Padding a new row at the top,bottom & new column at the right side');
processed_image=upper_right(2:end-1,1:end-1);
figure;
imshow(processed_image);
title('Processed Image');
Image used in this discussion is available here:
https://github.com/SatadruMukherjee/D...
Learn Complete Machine Learning & Data Science using MATLAB:
• Data Science & Machine Learning using...
Learn Digital Signal Processing using MATLAB:
• Digital Signal Processing Matlab
Learn Complete Image Processing & Computer Vision using MATLAB:
• Digital Image Processing using MATLAB
🙏🙏🙏🙏🙏🙏🙏🙏
YOU JUST NEED TO DO
3 THINGS to support my channel
LIKE
SHARE
&
SUBSCRIBE
TO MY YOUTUBE CHANNEL
#DigitalImageProcessing #matlab #ComputerVision