comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Congrid problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Congrid problem [message #23858] Thu, 22 February 2001 21:23 Go to next message
Jonathan Joseph is currently offline  Jonathan Joseph
Messages: 69
Registered: September 1998
Member
I'm running IDL 5.3 on HP-UX and seeing the following
problem with congrid. I have a byte image that has large areas
of a particular solid color (a background color).
I rescale the image to be larger using congrid with the
/interp flag set. My nice solid areas of the background color,
which I would still expect to see unspoiled, now have artifacts
in them with value background_color - 1. This looks like a
bug. What's going on?

Here's an example that show's the problem:

IDL> a = bytarr(100,100) + 155b
IDL> b = congrid(a,140,140,/interp)
IDL> print, min(b), max(b)
154 155
IDL> w = where(b eq 154, count)
IDL> print,count
3703
IDL> tvscl, b eq 154 ;shows strange pattern of lines and dots

I would expect b in this example to be filled only with value 155.
Is this a bug or is there some other reason I am seeing this behavior?

BTW: I see the exact same behavior with INT instead of BYTE.

Thanks.

-Jonathan
Re: Congrid problem [message #23877 is a reply to message #23858] Tue, 27 February 2001 02:17 Go to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
>>>> >>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 26/02/01, 18:53:21, "Jeff Kolthammer" <shroom79@hotmail.com> wrote
regarding Re: Congrid problem:


> No apparent bug on Alpha...

> IDL> print, !version
> { alpha OSF unix 5.4 Sep 25 2000 64 64}
> IDL> a = bytarr(100,100) + 155b
> IDL> b = congrid(a,140,140,/interp)
> IDL> print, min(b), max(b)
> 155 155
> IDL> w = where(b eq 154, count)
> IDL> print,count
> 0



The problem also exists in IRIX.

So far it's little-endian 2, big-endian 0. I wonder if that has
anything to do with it. Offhand I can't see why it would.

--
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
Re: Congrid problem [message #23908 is a reply to message #23858] Mon, 26 February 2001 10:53 Go to previous message
Jeff Kolthammer is currently offline  Jeff Kolthammer
Messages: 2
Registered: July 1999
Junior Member
No apparent bug on Alpha...

IDL> print, !version
{ alpha OSF unix 5.4 Sep 25 2000 64 64}
IDL> a = bytarr(100,100) + 155b
IDL> b = congrid(a,140,140,/interp)
IDL> print, min(b), max(b)
155 155
IDL> w = where(b eq 154, count)
IDL> print,count
0




> Here's an example that show's the problem:
>
> IDL> a = bytarr(100,100) + 155b
> IDL> b = congrid(a,140,140,/interp)
> IDL> print, min(b), max(b)
> 154 155
> IDL> w = where(b eq 154, count)
> IDL> print,count
> 3703
> IDL> tvscl, b eq 154 ;shows strange pattern of lines and dots
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: limiting the CPU time allowed
Next Topic: Re: string manipulation

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:22:01 PDT 2025

Total time taken to generate the page: 0.00423 seconds