Block Category: Operations

Input Image Format

Input Image Requirements: RGB

Description: The Contrast block controls the contrast and brightness of an RGB image by entering specific values.

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.

Contrast / Brightness: Together, these values control the contrast and brightness value of every pixel in the image. Specify the values as integers between 0 and 100. If Use input connector values is activated, these values come from the contrast and brightness input connectors.

Use input connector values to specify the contrast and brightness: Adds two input connectors to the block to control the contrast and brightness. Acceptable values are integers between 0 and 100.  


In this example, the image’s contrast and brightness are controlled by two sine waves that oscillate the image from a lighter and brighter to darker and duller.