Project

General

Profile

Bug #475

Gamma Correction

Added by Anonymous over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Start date:
12/24/2021
Due date:
% Done:

100%

Estimated time:
Spent time:

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
#1

Updated by Anonymous over 3 years ago

  • Status changed from New to Resolved
  • Start date changed from 01/05/2022 to 12/24/2021

Also available in: Atom PDF