Luminance

Article Info

Pseudocode

PROCEDURE luminance(image, x, y)
    c <- pixel(image, x, y)
    c' <- avg(c)
    return c'
END PROCEDURE

Description

Calculate the average (mean) value for that pixel then return this value.

Average Value

This is effectively_averaging_ the value of the pixel over its components.

\[v = \frac{\sum_iP_i}{N}\]

Where:

v

final (new) pixel value

p

vector containing N channels

N

number of channels

Acknowledgements

Adapted from Pseudocode produced for COMP120 by Dr. Micheal Scott.

Graduation Cap Book Open book GitHub Info chevron-right Sticky Note chevron-left Puzzle Piece Square Lightbulb Video Exclamation Triangle Globe