[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Zoom-like procedure




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
--------------------------------------------------------------------------