MathGroup Archive 1999

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

Search the Archive

ListDensityPlot[ ] and DensityGraphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16980] ListDensityPlot[ ] and DensityGraphics
  • From: Maarten.vanderBurgt at icos.be
  • Date: Sat, 10 Apr 1999 02:13:25 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

I forgot one question: see 4. below

Hello,

I am trying to write a few simple image processing routines in Mathematica.
Doing this I came across a few problems using ListDensityPlot and
displaying DensityGraphics.
I will explain these questions with a simple example.

Below, Data is a 50 x 256 array of grey values ranging from 0 to 255.
Using ListDensityPlot, I make DensPl to visualise this.

In[1]:= Data = Table[j,{i,0,49},{j,0,255}];

In[2]:= DensPl =ListDensityPlot[data, Mesh ->False,
Frame->False,ImageSize->{256,50}, PlotRange->{0,255},
AspectRatio->Automatic];


I am using Mathematica 3.01 on a Windows NT4 PC.

I have the following questions:

1.
DensPl is a band going from black on the left to white on the right. But
there are some additional vertical black lines in the centre of the plot.
These lines disappear when I make the plot bigger by selecting it with the
mouse and stretching it to say 1.2 times the original size. I get more
vertical lines when I make the plot smaller in a similar way.
This seems to be an error/artefact in some interpolation routine when the
image is resized. This is rather annoying in real life images since from
the display you can not see what is real and what is a display artefact.
Is there a way to get rid of this artefact?

2.
With the options Mesh ->False, Frame->False,ImageSize->{256,50},
AspectRatio->Automatic I was hoping the actual size of the black/grey/white
"colored" area would exactly 50 x 256 pixels on screen (i.e. one element in
matrix Data would correspond to one pixel in the plot on screen). But
around the "colored" area there is a white band of 3-5 pixels wide. I there
a way to get rid of this white band or to control it?

3.
- using the "True Color" setting on my display DesnPl is going smoothly
from black on the left to white on the right.

- using the "16777216 Colors" DensPl is completely black (this is known but
I do not know the reason: see "[mg15538] Re: ListDensityPlot gives
PostScript error" from January 26 this year.).
Does anyone know the difference between "True Color" and "16777216 Colors"?
I always thought it is the same: true color = 24 bit color = 2^24 =
16777216 colors.
My PC's/graphics card documentation doesn't tell me.

- using the "65536 Colors" (16 bit) setting, DensPl shows approx. 30
vertical bands with a different grey intensity: it does not vary smoothly
any more from black to white. I do have other graphics applications which
have no problem with images showing a smooth grey level variation using the
16 bit color setting. Why has Mathematica problems doing this?


4.
Is it possible to invert the orientation of the vertical axis in
ListDensityPlot?
This would show the image like it is seen in most image processing
applications.

Any help is greatly appreciated

thanks


Maarten

___________________________________________________________________________
____

Maarten van der Burgt

R&D Department

ICOS Vision Systems
Esperantolaan 9
B-3001 Leuven
Belgium
tel.    + 32 16 398220       direct  + 32 16 398316     fax.    + 32 16
400067
e-mail: maarten.vanderburgt at icos.be

___________________________________________________________________________
        ____






  • Prev by Date: Re: Scheduling algorithms
  • Next by Date: RE: Together, Apart, ?
  • Previous by thread: ListDensityPlot[ ] and DensityGraphics
  • Next by thread: Re: ListDensityPlot[ ] and DensityGraphics