Render RGB text over RGB or Grayscale Image

버전 1.2.0.0 (3.83 KB) 작성자: Davide Di Gloria
Utility which renders text over RGB o grayscale image matrices. (no line feed support)
다운로드 수: 1.2K
업데이트 날짜: 2010/5/5

라이선스 보기

by Davide Di Gloria
with the great contribution of Franz-Gerold Url

Render RGB text over RGB or grayscale images of ANY RESOLUTION!

usage:
out=rendertext(target, text, color, pos, mode1, mode2)

target ... MxNx3 or MxN matrix
text ... string (NO LINE FEED SUPPORT)
color ... vector in the form [r g b] 0-255
pos ... position (r,c)

optional arguments: (default is 'ovr','left')
mode1 ... 'ovr' to overwrite, 'bnd' to blend text over image
mode2 ... text aligment 'left', 'mid' or 'right'.

out ... has same size of target

example (generates the sceenshot above):

in=imread('football.jpg');
out=rendertext(in,'OVERWRITE mode',[0 255 0], [1, 1]);
out=rendertext(out,'BLEND mode',[255 0 255], [30, 1], 'bnd', 'left');
out=rendertext(out,'left',[0 0 255], [101, 150], 'ovr', 'left');
out=rendertext(out,'mid',[0 0 255], [130, 150], 'ovr', 'mid');
out=rendertext(out,'right',[0 0 255], [160, 150], 'ovr', 'right');
imshow(out

have fun (and give credit)!

인용 양식

Davide Di Gloria (2024). Render RGB text over RGB or Grayscale Image (https://www.mathworks.com/matlabcentral/fileexchange/26940-render-rgb-text-over-rgb-or-grayscale-image), MATLAB Central File Exchange. 검색됨 .

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

Community Treasure Hunt

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

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

slight modification to description

1.1.0.0

added missing chars.bmp file, sorry!

1.0.0.0