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

Home » Public Forums » archive » Re: Scale many regions in one image without using xroi
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Scale many regions in one image without using xroi [message #81676 is a reply to message #81666] Tue, 09 October 2012 08:20 Go to previous messageGo to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
Without knowing all the gritty details, I suggest that given a scaling factor (xscale, yscale),

s2 = size(array2)
scale_array2 = Congrid(array2, s2[1]*xscale, s2[2]*yscale)

Optionally, you can crop your carray2 back to the original size.

new_s2 = size(scale_array2) ; new dimensions
tmp = Shift(carray,-1.0*(new_s2[1]-s2[1])/2.0,-1.0*(new_s2[2]-s2[2 ])/2.0) ; shifts to new 0,0 location
crop_scale_array2 = scale_array[0,s2[1]-1,0,s2[2]-1] ; crop

-Brian

On Monday, October 8, 2012 9:12:52 AM UTC-4, (unknown) wrote:
> Hi,
>
>
>
> I've been searching all morning and can't find an answer to a problem
>
> I'm having:
>
>
>
> I have two 2-D arrays which have clusters of 1s in an array of 0s.
>
> I'm interested these clusters (shapes). Some of the shapes are
>
> present in both arrays, some are missing from one or the other and in
>
> array 2 the shapes are too small. I want to scale up the shapes in
>
> array 2 so that the coincident shapes are the same size in both
>
> arrays. I can use label_region to find the shapes and calculate a
>
> correction factor. I just need a way to scale the shapes, presumeably
>
> by growing them from a central point.
>
>
>
> Any ideas? I want to include this in a program which loops round
>
> hundreds of images so using XROI is not really an option...
>
>
>
> Thanks in advance.
>
>
>
> AA
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: contour plots on map with Coyote Graphics System in postscript
Next Topic: Re: Help with WV_CWT

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

Current Time: Wed Oct 08 19:58:44 PDT 2025

Total time taken to generate the page: 0.00485 seconds