Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Digital Image Processing: showing graylevel images in

  • To: mathgroup at
  • Subject: [mg64208] Digital Image Processing: showing graylevel images in
  • From: "Maarten van der Burgt" <maarten.vanderburgt at>
  • Date: Mon, 6 Feb 2006 02:49:07 -0500 (EST)
  • Sender: owner-wri-mathgroup at

After loading the Digital Image Processing package (<<imageprocessing`)
The following command generates a 100 x 100 pixel  graylevel image with
gray values (GV) in the range of 50 ot 180.

img =ToGrayLevel[Table[Random[Integer, {50, 180}], {100},{100}]]

The default way to show this image on screen is:


But, assuming the complete GV range I am working with is 0-255, I want to
display the image with  0 as black and 255 as white.

I know this can be done using:


But, compared to the firste Show[...] expression,  this is a rather
cumbersome way of doing this.

Is there a shorter way to display a graylevel images properly scaled
(0-255). I did not find anything in the Digital Image Processing

Thanks for your help.


  • Prev by Date: Re: Re: 2D FT of f(r): Fast Hankel Transforms
  • Next by Date: Re: Problem plotting high-order Laguerre polynomials
  • Previous by thread: MeijerG evaluates an imaginary part, which does not exist
  • Next by thread: Re: Digital Image Processing: showing graylevel images in