Matlab functions discussed here.
Similarly, we must also be aware of negative pixel values resulting from subtraction and deal
with these accordingly; commonly they are set to zero. For three-channel RGB images (or
other images with vectors as pixel elements) the arithmetic operation is generally performed
separately for each colour channel.