Specifications
Image Arithmetic and Logical Operations
5-9
5
Discussion
The function iplMultiply() multiplies corresponding pixels of two input
images to produce the output image.
MultiplyScale
Multiplies pixel values of two
images and scales the products.
void iplMultiplyScale(IplImage*
srcImageA
, IplImage*
srcImageB
, IplImage*
dstImage
);
srcImageA
The first source image.
srcImageB
The second source image.
dstImage
The resultant image.
Discussion
The function iplMultiplyScale() multiplies corresponding pixels of
two input images and scales the products using the following formula:
dst_pixel
=
srcA_pixel
*
srcB_pixel
/
max_val
where
srcA_pixel
and
srcB_pixel
are pixel values of the source
images,
dst_pixel
is the resultant pixel value, and
max_val
is the
maximum presentable pixel value. Both source images and the resultant
image must have the same pixel depth. The function is implemented only
for 8-bit and 16-bit unsigned data types.