Problems with Matlab Projects? You may face many Problems, but do not worry we are ready to solve your Problems. All you need to do is just leave your Comments. We will assure you that you will find a solution to your project along with future tips. On Request we will Mail you Matlab Codes for Registered Members of this site only, at free service...Follow Me.

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');



0 comments:

Post a Comment

Recent Comments

Popular Matlab Topics

Share your knowledge - help others

Crazy over Matlab Projects ? - Join Now - Follow Me

Sites U Missed to Visit ?

Related Posts Plugin for WordPress, Blogger...

Latest Articles

Special Search For Matlab Projects

MATLAB PROJECTS

counter

Bharadwaj. Powered by Blogger.