How to draw a white border around an image(or a group of images in a folder)
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have an image :-

Now i want to draw a white border around the image,such that i get this:-

How can i do this.Please help.
0 Kommentare
Antworten (1)
Image Analyst
am 1 Apr. 2017
Use padarray():
padsize = 1;
padvalue = 255; % or 1 if image is single, double, or logical.
paddedImage = padarray(originalImage, padsize, padval);
3 Kommentare
Image Analyst
am 1 Apr. 2017
Then just write it in yourself
grayImage(:, 1) = 255; % Make left column white.
grayImage(:, end) = 255; % Make right column white.
grayImage(1, :) = 255; % Make top row white.
grayImage(end, :) = 255; % Make bottom row white.
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!