How do you add a border to an image?
How do you add a border to an image?
(OP)
I am trying to analyse an image in Matlab and need to be able to see the left edge of the image. At the moment I add a 1 pixel border to the image (or just to the left side) in a photo program like Gimp. This is time consuming so I'm looking for a way to get Matlab to add the border for me.
At the moment I use
dispIm = imread(file,'tif');
imshow(dispIm);
Which then opens the image ready for analysis. What code can I add to add the black border?
At the moment I use
dispIm = imread(file,'tif');
imshow(dispIm);
Which then opens the image ready for analysis. What code can I add to add the black border?
RE: How do you add a border to an image?
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
Chinese prisoner wins Nobel Peace Prize
RE: How do you add a border to an image?
RE: How do you add a border to an image?
Fe
RE: How do you add a border to an image?
CODE
A = [0.866-0.5*i, 0.866+0.5*i, 0.000+1,0*i]'
h = figure(1);
compass(A)
W = 4; H = 3;
set(h,'PaperUnits','inches')
set(h,'PaperOrientation','portrait');
set(h,'PaperSize',[H,W])
set(h,'PaperPosition',[0,0,W,H])
FN = findall(h,'-property','FontName');
set(FN,'FontName','/usr/share/fonts/dejavu/DejaVuSerifCondensed.ttf');
FS = findall(h,'-property','FontSize');
set(FS,'FontSize',6);
print(h,'-dpng','bordertest.png');
system('convert bordertest.png -bordercolor green -border 10x10 bordertest.png')
http://s
//signed//
Christopher K. Hubley
Mechanical Engineer
Sunpower Incorporated
Athens, Ohio
RE: How do you add a border to an image?
CODE
//signed//
Christopher K. Hubley
Mechanical Engineer
Sunpower Incorporated
Athens, Ohio