Image: Adjustments: Brightness
Adjust image brightness
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>;
Please refer to the page for additional option switches when accessing the x-function from script
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.
Specifies the image to be manipulated. The default input is the active image.
Specifies the output image. By default, the output image is the same as the input image.
See the syntax here.
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.
//Create a new folder in the Project Explorer
pe_mkdir Adjustments path:=aa$;
//Create a matrix and import the sample image into it
window -t m;
fname$ = System.path.program$ +"samples\Image Processing and Analysis\white camellia.jpg";
window -r %h Original;
window -d; //Duplicate the image
window -r %h Modified;
imgBalance c2r:=-7 m2g:=5; //White balance
imgContrast a:=-22; //Decrease contrast
imgBrightness a:=10; //Increase brightness
window -s T; //Tile the windows horizontally
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.
LEADTOOLS Main API Help file, Version 14
imgContrast, imgHue, imgSaturation, imgGamma, imgHistcontrast