J = imcomplement(I)
| Parameter | Description |
|---|---|
| I | Input image. |
| Parameter | Description |
|---|---|
| J | Complemented image with class matching I. |
Complement image values. Logical values are inverted. Unsigned integer images are complemented around their full class range. Signed integer images preserve their class and are complemented around the signed class range.
I=repmat(linspace(0,1,96),64,1);
J=imcomplement(I);
figure; subplot(1,2,1); imagesc(I); g=linspace(0,1,64)'; colormap([g g g]); title('Input');
subplot(1,2,2); imagesc(J); g=linspace(0,1,64)'; colormap([g g g]); title('Complement');
J = imcomplement(int16([-32768 0 32767]))
| Version | Description |
|---|---|
| 2.0.0 | initial version |