MathGroup Archive 2013

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

Search the Archive

Re: What happend to Image?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130751] Re: What happend to Image?
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Thu, 9 May 2013 02:44:46 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20130508080952.52D386837@smc.vnet.net>

lena = Import["ExampleData/lena.tif"];


lena2 = ImageResize[lena, 300];


ImageDimensions /@
 {lena, lena2}


{{150, 116}, {300, 232}}


ImageMeasurements[#, "Dimensions"] & /@
 {lena, lena2}


{{116, 150, 3}, {232, 300, 3}}


ImageMeasurements[lena, "Properties"]


{"AspectRatio", "Channels", "ColorSpace", "DataRange", "DataType", \
"Dimensions", "Energy", "Entropy", "IntensityCentroid", "Interleaving", \
"Max", "MaxIntensity", "Mean", "MeanIntensity", "Median",
"MedianIntensity", \
"Min", "MinIntensity", "SampleDepth", "Skew", "StandardDeviation", \
"StandardDeviationIntensity", "Total", "TotalIntensity", "Transparency"}



Bob Hanlon




On Wed, May 8, 2013 at 4:09 AM, Alexei Boulbitch <Alexei.Boulbitch at iee.lu>wrote:

>
> Dear Community,
>
> I just noticed that the function Image[ ] has unexpectedly  changed since
> 9.0.0.
>
> Some time ago I have written a handy program working with the image. I
> have once published it here. Among others this program applied the operation
>
> ReplacePart[image,{4,2}?size]
>
> Where image was the image in use and size has been a parameter equal to a
> desired ImageSize option. This worked previously. Now it does not.
>
> I checked that the Image indeed has changed somehow.
>
> Let us load any image. For example, this:
>
> lena = Import["ExampleData/lena.tif"]
>
> One may check that this is indeed an image:
>
> Head[lena]
>
> Image
>
> Let us do like this:
>
> lena2= Image[lena, ImageSize -> 300]
>
> then the {{4,2}} part should memorize its size.
>
> One may look at its TreeForm (evaluate this and make sure that it has
> levels 0, 1, and 2), and {{4,2}} is indeed 300
>
> TreeForm[lena2]
>
> However, if one would evaluate this
>
> Lena2[[4,2]]
>
> he get the message
> Part::partd: Part specification... is longer than depth of object\""
>
> Not only {{4,2}}, but also other leaves of the tree are not acceccible.
>
> What happened to the Image?
>
> Alexei
>
>
> Alexei BOULBITCH, Dr., habil.
> IEE S.A.
> ZAE Weiergewan,
> 11, rue Edmond Reuter,
> L-5326 Contern, LUXEMBOURG
>
> Office phone :  +352-2454-2566
> Office fax:       +352-2454-3566
> mobile phone:  +49 151 52 40 66 44
>
> e-mail: alexei.boulbitch at iee.lu
>



  • Prev by Date: Re: Simple program leaking memory - why?
  • Next by Date: Parity of EllipticTheta
  • Previous by thread: What happend to Image?
  • Next by thread: Re: What happend to Image?