Chapter Contents

Previous

Next
Image Data Model: _quantize

Image Data Model: _quantize



Reduces the number of colors used for an image


Syntax
Details
Example

Syntax

CALL SEND (object-id, '_quantize', colors);

Argument Type Description
colors
N the number of colors to be used for the image. colors is a value from 2 to 256, inclusive.


Details

_quantize generates a color-mapped image for which the method assigns the values in the color map. _quantize results in a very good approximation of the image, with the possible negative effect that two or more images reduced to the same number of colors may still use different colors for each image. The algorithm is an adaptation of the Xiaolin Wu algorithm, as described in Graphics Gems II. (Arvo, J., ed. (1991), Boston: Academic Press.)


Example

This example reduces the number of colors in an image to a maximum of 16 colors.

call send(imgdat_id,'_quantize',16);


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.