bitwisenotcv
Inverts bits of given image, source.
Syntax
R = bitwisenotcv(source)
R = bitwisenotcv(source, mask)
Inputs
- source
- Handle of an image.
- mask
- Optional handle of an 8-bit single channel image or a 2D matrix of natural numbers representing the elements in R that need to be changed.
Outputs
- R
- Handle of the output image.
Examples
Invert bits in input image:
source = imreadcv('image1.jpg');
R = bitwisenotcv(source);
Invert bits in input image with a mask:
source = imreadcv('image1.jpg');
masksize = imsizecv(source);
mask = ones(masksize(1), masksize(2));
R = bitwisenotcv(source, mask);