Contrast

Contrast

    Contrast

Library

ComputerVision/Images/Operations

Description

To better understand the contrast and brightness, it is important to remember that two commonly used point processes are multiplication and addition with a constant:

g(x) = αf(x) + β

The parameters α > 0 and β are often called the gain and bias parameters and they control an image's contrast and brightness, respectively. The source image pixels are represented as f(x) and the output image pixels are represented as g(x). You can write the expression as:

g(i,j) = αf (i,j) + β

where i and j indicate that the pixel is located in the i-th row and j-th column.

Parameters

Contrast_0

NameLabelDescriptionData TypeValid Values

useInput

Use inputs

Use inputs to define the contrast and the brightness

Number

0
1

contrast

Contrast

Specify the values to control the contrast value of every pixel in the image.

Specify the values as integers between 0 and 100.

Scalar

brightness

Brightness

Specify the values to control the brightness value of every pixel in the image.

Specify the values as integers between 0 and 100.

Scalar

externalActivation

External activation

This parameter defines if the block receives or inherits an external activation. When External Activation is used, an additional activation port is added to the block. Default is OFF.

Number

0
1

Ports

NameTypeDescriptionIO TypeNumber

src

explicit

input

1

image

explicit

output

1

Port 3

explicit

input

2*useInput

Port 4

activation

input

externalActivation