Bug #475
Gamma Correction
Status:
Resolved
Priority:
Normal
Assignee:
-
Description
A linearly increasing intensity controller parameter āIā range from 0 to 1 should be used to achieve a smooth gamma correction. It was incorrect to raise every RGB value in each pixel to the power of gamma.
def gammaCorrection(img, direction, gamma):
if direction == 'left':
for rows in range(getImageHeight(img)):
for columns in range(getImageWidth(img)-overlap_pixels-1, getImageWidth(img)):
img[rows][columns][:] *= np.power(intensityController(
columns-(getImageWidth(img)-overlap_pixels-1), monotonicity='increase'), gamma)
return img
elif direction == 'right':
for rows in range(getImageHeight(img)):
for columns in range(overlap_pixels-1):
img[rows][columns][:] *= np.power(
intensityController(columns, monotonicity='decrease'), gamma)
return img
Updated by Anonymous over 3 years ago
- Status changed from New to Resolved
- Start date changed from 01/05/2022 to 12/24/2021