view scripts/image/gray2ind.m @ 595:a0cc17145462

[project @ 1994-08-09 18:42:23 by jwe]
author jwe
date Tue, 09 Aug 1994 18:42:23 +0000
parents 4e826edfbc56
children 56520a75b5b3
line wrap: on
line source

function [X, map] = gray2ind(I,n)

  if(nargin == 1)
    n = 64;
  endif

  map = gray(n);

  X = round(I*(n-1)) + 1;

endfunction