Morphological Transformation, remove border border of a closed image

Technical Source
2 min readFeb 24, 2022

--

Hello

I need to remove the upper border (red highligth) of this binarized image without affecting the bottom section, i haven’t been able to figure out exactly which functions of the Image Processing Toolbox could help me.

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Using morphological operations and connected components algorithm, the problem can be solved with the minor loss of bottom pixels.For example:

a=imread('imag.jpeg');
figure;imshow(a)
se = strel('line',8,90);
eroded = imerode(a,se);
b=logical(eroded);
st=regionprops('Table',b(:,:,1),'Area');
m=maxk(st.Area,2);
biggest = bwareafilt(b(:,:,1),[m(2) m(1)]);
figure;imshow(biggest)
dil=imdilate(biggest,se);
figure;imshow(dil)

The above code results in the below image. You can try with some other parameters of morphological processing and check if it will be more clear.

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet