Image Brightness and Contrast Adjustment
Function: Adjusts the brightness and contrast of the image using different methods. The main principle is dst = src * alpha + beta.
Input Parameters:
Name | Type | Valid Range | Default Value | Meaning |
---|---|---|---|---|
Image |
Image |
None |
None |
Image |
Output Parameters:
Name | Type | Valid Range | Default Value | Meaning |
---|---|---|---|---|
Result image |
Image |
None |
None |
The brightness-adjusted image. |
Parameter Settings:
Name | Type | Valid Range | Default Value | Meaning |
---|---|---|---|---|
Adjustment method |
String |
['alpha_beta', 'Mean Method', 'Histogram Method'] |
alpha_beta |
The main principle of image contrast brightness adjustment is dst = src * alpha + beta, where alpha_beta is directly calculated by the formula. The mean method refers to the formula calculation by calculating the mean, adjusting alpha and beta based on the image mean, and then calculating the histogram. The histogram method is to calculate the grayscale histogram, and then use the histogram scale to segment the histogram to obtain the largest and smallest pixels of the segmented histogram, and then calculate the formula to obtain alpha and beta. |
Contrast coefficient |
Float |
[0, 30] |
0.8 |
Image contrast coefficient. |
Grayscale coefficient |
Float |
[-255, 255] |
0 |
Grayscale coefficient, offset of image correction, used to adjust brightness, the brighter the image, the darker the smaller the image. |
Contrast coefficient |
Float |
[0, 10] |
1 |
Image contrast coefficient coefficients > 0, < 1 reduce contrast, > 1 improve contrast, 0-2 is recommended. |
Grayscale coefficient |
Float |
[-10, 10] |
1 |
Grayscale coefficient, offset of image correction, used to adjust brightness. The brighter the image, the darker the smaller the image. Recommended value is 0 to 2 < 1 for darkening > 1 for brightening. |
Histogram scale |
Float |
[0, 100] |
25 |
Histogram scale, used for. |