Specifications
Image Arithmetic and Logical Operations
5-5
5
dstImage
The resultant image.
value
An integer value by which to multiply the pixel values.
Discussion
The functions change the image intensity by multiplying each pixel by a
constant
value
.
MultiplySScale
Multiplies pixel values
by a constant and scales
the products.
void iplMultiplySScale(IplImage*
srcImage
, IplImage*
dstImage
, int
value
);
srcImage
Thesourceimage.
dstImage
The resultant image.
value
A positive value by which to multiply the pixel values.
Discussion
The function iplMultiplySScale() multiplies the input image pixel
values by
value
and scales the products using the following formula:
dst_pixel
=
src_pixel
*
value
/
max_val
where
src_pixel
is a pixel value of the source images,
dst_pixel
is the
resultant pixel value, and
max_val
is the maximum presentable pixel
value. This function can be used to multiply the image by a number
between 0 and 1.
The source and resultant images must have the same pixel depth. The
function is implemented only for 8-bit and 16-bit unsigned data types.