Draw a border around an image

버전 1.2.0.0 (2.16 KB) 작성자: Eric Johnson
Draws a colored border around an image.
다운로드 수: 4.4K
업데이트 날짜: 2009/12/31

라이선스 보기

ADDBORDER draws a border around an image.

NEWIMG = ADDBORDER(IMG, T, C, S) adds a border to the image IMG with thickness T, in pixels. C specifies the color, and should match the color format of the image (e.g., RGB or indexed). STROKE is a string indicating the position of the border:

'inner' - border is added to the inside of the image. The dimensions of OUT will be the same as IMG.

'outer' - the border sits completely outside of the image, and does not obscure any portion of it.

'center' - the border straddles the edges of the image.

Example:

load mandrill
X2 = addborder(X, 20, 62, 'center');
image(X2);
colormap(map);
axis off
axis image

인용 양식

Eric Johnson (2024). Draw a border around an image (https://www.mathworks.com/matlabcentral/fileexchange/21005-draw-a-border-around-an-image), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Display Image에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.0

None

1.0.0.0