PDL::ImageRGB (3)
Leading comments
Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAME
PDL::ImageRGB -- some utility functions for RGB image data handlingDESCRIPTION
Collection of a few commonly used routines involved in handling ofOther stuff that should/could go here:
- *
- color space conversion
- *
- common image filters
- *
- image rebinning
SYNOPSIS
use PDL::ImageRGB;
FUNCTIONS
cquant
quantize and reduce colours in 8-bit images
($out, $lut) = cquant($image [,$ncols]);
This function does color reduction for <=8bit displays and accepts 8bit
Returns a list containing the new palette image (type PDL_Byte) and the
interlrgb
Make an
$rgb = $palette_im->interlrgb($lut)
Input should be of an integer type and the lookup table (3,x,...). Will perform the lookup for any N-dimensional input pdl (i.e. 0D, 1D, 2D, ...). Uses the index command but will not dataflow by default. If you want it to dataflow the dataflow_forward flag must be set in the $lut piddle (you can do that by saying $lut->set_dataflow_f(1)).
rgbtogr
Converts an
$gr = $rgb->rgbtogr
Performs a conversion of an
Grey = 0.301 R + 0.586 G + 0.113 B
bytescl
Scales a pdl into a specified data range (default 0-255)
$scale = $im->bytescl([$top])
By default $top=255, otherwise you have to give the desired top value as an argument to "bytescl". Normally "bytescl" doesn't rescale data that fits already in the bounds 0..$top (it only does the type conversion if required). If you want to force it to rescale so that the max of the output is at $top and the min at 0 you give a negative $top value to indicate this.