Re: Zoom-like procedure [message #25931] |
Sat, 28 July 2001 15:55 |
Bob Fugate
Messages: 18 Registered: March 2001
|
Junior Member |
|
|
Craig,
You are right. However, it appears one must also add the keyword SAMPLE or
all but the last row of the enlarged pixels will contain a number of
gradient levels proportional to the dimensions of the array being expanded.
The first time I tried this I had the scale factors wrong -- not integer
multiples of the dimensions of the array and I didn't use the sample
keyword.
Thanks, again for your help. This solves my problem.
Bob
>
> Bob,
>
> Isn't this exactly what REBIN does? It replicates pixels. The value
> of this BLOWUP:
>
> blowup = rebin(img(0:15,0:15), 16*nscale, 16*nscale)
>
> is a new array with NSCALE times as many pixels in each direction as
> the original 16x16 subimage. Then of course you have to TV it onto
> the screen. :-)
>
> Craig
>
> --
> ------------------------------------------------------------ --------------
> Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
> Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
> ------------------------------------------------------------ --------------
|
|
|
Re: Zoom-like procedure [message #25932 is a reply to message #25931] |
Sat, 28 July 2001 13:06  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Bob Fugate <rqfugate@mindspring.com> writes:
> I am displaying small parts (e.g. 16x16 pixels) of images and need to zoom
> regions up to a size large enough to see the relative brightness of the
> pixels. The ZOOM procedure does exactly what I want, but in an interactive
> mode. Does anyone know of a function or procedure or other means that would
> allow me to include this feature in my program to automatically zoom a
> preselected subregion of the image? REBIN, and CONGRID resample and that is
> not what I want, I just want the intensity in each original pixel to be
> reproduced everywhere in a synthesized, larger pixel, ideally whose size I
> can choose.
Bob,
Isn't this exactly what REBIN does? It replicates pixels. The value
of this BLOWUP:
blowup = rebin(img(0:15,0:15), 16*nscale, 16*nscale)
is a new array with NSCALE times as many pixels in each direction as
the original 16x16 subimage. Then of course you have to TV it onto
the screen. :-)
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|