Lets Learn together... Happy Reading

" Two roads diverged in a wood, and I,
I took the one less traveled by,
And that has made all the difference "-Robert Frost

Boundary Extraction in MATLAB


Boundary Extraction in MATLAB
Let A be an Image matrix and B be a structuring element.


Formula for Boundary Extraction:



Steps to be followed:
·         Convert the image into binary image.
·         Perform Erosion:
                Erode binary image A by structuring element B. (i.e)
                     
               
·         Subtraction:
              Subtract the binary image A from the Eroded image.(i.e)

             



A=imread('banana.jpg'); 


C=rgb2gray(A);
C(C<225)=0;
s=strel('disk',4,0);%Structuring element
D=~im2bw(C);%binary Image
F=imerode(D,s);%Erode the image by structuring element
figure,imshow(A);title('Original Image');
figure,imshow(D);title('Binary Image');


%Difference between binary image and Eroded image
figure,imshow(D-F);title('Boundary extracted Image');



Example 2:









A=imread('nutsbolts.tif');
s=strel('disk',2,0);
F=imerode(A,s);
figure,
subplot(2,1,1);
imshow(A);title('Binary Image');
subplot(2,1,2);
imshow(A-F);title('Boundary extracted Image');







like button Like "IMAGE PROCESSING" page

9 comments:

radha said... Reply to comment

I like the extraction of objects using bwlabel. Really I am searching for this for the past 4 months and got this. It is very useful and great.
Thanks a lot

Srinivasa Reddy Konda said... Reply to comment

how to write Matlab code to separate to perform texture segmentation based on morphology.

Lady Lion said... Reply to comment

hai is there any code for radial undistortion in matlab or pls give a procedure for doing radial undistortion in matlab

Student said... Reply to comment

If any body having the matlab code for extraction of roads using any algoritm or methpd please mail to me! mailid:sndp0472@gmail.com

Unknown said... Reply to comment

can we apply boundary extraction on videos.

Unknown said... Reply to comment

Hi..this is Anitha..can anyone please tell me the matlab code for extraction of lower boundary in an image

Unknown said... Reply to comment

Hi this is Anitha... Can anyone please tell me the matlab code for extraction of lower boundaries in an image

Unknown said... Reply to comment

color image enhancement by histogram processing

Unknown said... Reply to comment

How can i get boundary points from boundary extracted image

Enjoyed Reading? Share Your Views

Previous Post Next Post Home
Google ping Hypersmash.com