Giving Border to a Image

Giving border to a image using image processing techniques. I used this way to give border to an image like this.

Have you notified the border? If not try this code in your mat-labhttps://github.com/nifrasismail/ImagePading.m/blob/master/ImagePadding.m

 1
2
3
4
5
6
7
8
9
10
11
12
I=imread('lenna.JPG');

if length(size(I)) == 3
I=rgb2gray(I);
end

[row,col]=size(I);
J=zeros(row+4,col+4);
J(3:row+2,3:col+2) = I;
J=uint8(J);
subplot(1,2,1);imshow(I);
subplot(1,2,2);imshow(J);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s