imadd
두 영상을 더하거나 영상에 상수를 더함
설명
예제
두 개의 uint8형 배열 더하기
이 예제에서는 255를 초과하는 값을 자르면서 두 개의 uint8
형 배열을 더하는 방법을 보여줍니다.
X = uint8([ 255 0 75; 44 225 100]); Y = uint8([ 50 50 50; 50 50 50 ]); Z = imadd(X,Y)
Z = 2x3 uint8 matrix
255 50 125
94 255 150
두 개의 영상을 더하고 출력 클래스 지정하기
두 개의 uint8
형 회색조 영상을 작업 공간으로 읽어 들입니다.
I = imread('rice.png'); J = imread('cameraman.tif');
영상을 더합니다. 결과가 잘리지 않도록 출력값을 uint16
형으로 지정합니다.
K = imadd(I,J,'uint16');
결과를 표시합니다.
imshow(K,[])
영상에 상수 더하기
영상을 작업 공간으로 읽어 들입니다.
I = imread('rice.png');
영상에 상수를 더합니다.
J = imadd(I,50);
원본 영상과 결과를 표시합니다.
imshow(I)
figure imshow(J)
입력 인수
출력 인수
버전 내역
R2006a 이전에 개발됨
참고 항목
imabsdiff
| imcomplement
| imdivide
| imlincomb
| immultiply
| imsubtract
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)