MathGroup Archive 2009

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

Search the Archive

Re: Image[], Graphics[Raster[]]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100284] Re: Image[], Graphics[Raster[]]
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sun, 31 May 2009 06:33:01 -0400 (EDT)
  • References: <6147782.1243412890107.JavaMail.root@n11> <200905280829.EAA14200@smc.vnet.net> <gvqpu5$ck0$1@smc.vnet.net>

Hi,

> 
> 1. Is Image[] any different than Graphics[Raster[]] that I'm more 
> accustomed to?

No it has a fixed data range, i.e., "Byte" is [0,255], "Real" [0,1]
while Graphics[Raster[]] can handle undestructive every thing.

> 
> 2. If not, what was the point of introducing Image[]? Was it any effort to 
> provide a more streamlined set of commands all revolving around Image[], 
> e.g., ImageRotate[], etc.?

The reason was a faster display of the bitmap. With fixed data range
the FE don't have to do a scaling of every pixel.

> 
> 
> 3. Image[] somehow upsets my unified view of Mathematica. That is, I like 
> to try to "think" like Mathematica, and so I understand that all commands 
> like Plot[], ListPlot[], etc., reduce to a Graphics[] object in 
> FullForm[]. Similarly, I can build my own type of plotting function with 
> Graphics[]. Most importantly, I can combine many different types of 
> objects into a single Graphics[]. Am I correct that Image[] represents 
> then a completely new display object? If so, is there a way, for example, 
> to have an Image[] and then draw across it with an Epilog rule like you 
> can do with Graphics[]? It seems a major setback if Image[] and Graphics[] 
> cannot be readily mixed.
> 

Oh mixing is easy:

img = Import["http://www.stephenwolfram.com/img/home/sw-portrait.jpg";]
Graphics[
  {Image`ToGraphicsRaster[img][[1]],
   Circle[{110.5, 110.5}, 10]}]

draw a circle on the image.

> Anyone out there to make the case that Image[] represents an important new 
> capability? 

No, it make many things more complicated, and a lot of image
processing tasks impossible -- registration for example ..

I see it as a little worse than the usual "new command that
> does same thing old stuff did" because it seems to lose the capability to 
> mix Graphics[] and Image[].
> 
> Please inform me if I'm completely off base. As I said, I'm just digging 
> into Image[] now for the first time, and I'm a bit confused about possible 
> merits---please do inform!

There is no merit, it make many things worse than the original
Graphics[Raster[]]

Regards
  Jens


  • Prev by Date: Re: problem writing debugging utility function
  • Next by Date: Re: Image[], Graphics[Raster[]]
  • Previous by thread: Image[], Graphics[Raster[]]
  • Next by thread: Re: Image[], Graphics[Raster[]]