OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

imgBrightness

Contents

Menu Information

Brightness

Brief Information

Adjust the brightness of Image

Command Line Usage

1. imgBrightness a:=2;

2. imgBrightness a:=2 img:=mat(1) oimg:=mat(2);

3. imgBrightness a:=2 img:=[Mbook1]Msheet1!Mat(1) oimg:=<new>;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Adjust Intensity a

Input

double

0

Use this variable to specify how to change the brightness. This value should be within [-100, 100]. Specifying a negative value will cause the brightness to be reduced, while a positive value will increases the brightness.

Input Matrix img

Input

Image

<active>

Specifies the image to be manipulated. The default input is the active image.

Output Image oimg

Output

Image

<input>

Specifies the output image. By default, the output image is the same as the input image.

See the syntax here.

Description

This function adjusts the brightness of an image. The brightness adjustment can be either positive or negative, which means that you can either increase or decrease the brightness of the input image.

Examples

In this example, we use the imgBrightness function to increase the brightness of the input image:

  1. When the input image is active, select Image: Adjustments: Brightness. This opens the dialog of the X-Function.
  2. In the X-Function dialog, change the settings as the screenshot below and click OK to close the dialog.
    Image:imgBrightness_help_English_files_image002.jpg
    A new image is created. We can see that it is brighter than the original image.
Image:imgBrightness_help_English_files_image004.jpg
Image:imgBrightness_help_English_files_image006.jpg
The original image
The output image


For more examples, please refer to XF Script Dialog (press F11).

Algorithm

The computation uses L_ChangeBitmapIntensity() function from LEADTOOLS Main API. For this information, please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_ChangeBitmapIntensity topic.

References

LEADTOOLS Main API Help file, Version 14

Related X-Functions

imgContrast, imgHue, imgSaturation, imgGamma, imgHistcontrast