Luminance
Synopsis
The luminance macro performs full-colour luminance filtering and produces a 1:1 size scalar result from ARGB colour byte images.
Input Ports
| Name |
Type |
Description |
|
| in |
Image_ARGB |
original image to be analysed |
|
Output Ports
| Name |
Type |
Description |
|
| out_fld |
2D byte field |
luminance values for each pixel |
| out_obj |
GDobject |
directly renderable output object |
|
Description
The luminance module computes a scalar luminance function for each pixel in an image from the red, green and blue channels of that color image. The output field is the same size of the input in each dimension. There are no parameters associated with this module, and hence no user interface.
The transfer function used to calculate the luminance is:
Luminance = (RED*0.299) + (GREEN*0.587) + (BLUE*0.114)
This module is a conversion of the AVS5 "luminance" module. The module implementation is now in C++. The low-level module operates on simple byte arrays rather than fields.
Inputs
in
Full colour 2D image that is to be analysed by the module. The image should be a 2D uniform grid of type Image_ARGB. The read_image module outputs data of this type.
Outputs
out_fld
Uniform scalar byte field containing the calculated luminance values as unsigned bytes. The uniform field has the same dimensions as the input field.
out_obj
The GDobject version of the output, suitable for direct connection
to the viewer. A 2D viewer is recommended.
Utility Macros
The luminance macro makes use of the LuminanceCore low-level module.
Example
The LuminanceEg example application filters an image and shows it in a viewer.
Files
iac_proj/lumi/lumimods.v contains the V definition of the LuminanceCore module.
iac_proj/lumi/lumimacs.v contains the V definitions of the luminance user macro and the LuminanceEg example application.
Other Notes
The low-level LuminanceMods library containing the low-level LuminanceCore module does not specify a process. By default the express process will be used.
Authors
Sabreen Vig, Larry Gelberg, Ian Curington
Advanced Visual Systems, Inc.
Modifications
Andrew Dodd
International AVS Centre
Contact
International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL
See Also
AVS5 luminance module, from which this one is derived.
|