GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • » Octave core
  • » by package
  • » alphabetical

This view

  • Original page
  • New address

GeezerVison is showing octave.sourceforge.io — Function Reference: ind2gray

Octave-Forge - Extra packages for GNU Octave
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code

Navigation

Operators and Keywords

Function List:

  • » Octave core
  • » by package
  • » alphabetical

C++ API

: I = ind2gray (x, map)

Convert a color indexed image to a grayscale intensity image.

The image x must be an indexed image which will be converted using the colormap cmap. If cmap does not contain enough colors for the image, pixels in x outside the range are mapped to the last color in the map before conversion to grayscale.

The output I is of the same class as the input x and may be one of uint8, uint16, single, or double.

Implementation Note: There are several ways of converting colors to grayscale intensities. This functions uses the luminance value obtained from rgb2ntsc which is I = 0.299*R + 0.587*G + 0.114*B. Other possibilities include the value component from rgb2hsv or using a single color channel from ind2rgb.

See also: gray2ind, ind2rgb.

Package: octave

SourceForge.net Logo
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.