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

Home » Public Forums » archive » clever way to subregion an image?
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: clever way to subregion an image? [message #70464 is a reply to message #70388] Mon, 12 April 2010 04:16 Go to previous message
philipelson is currently offline  philipelson
Messages: 9
Registered: March 2009
Junior Member
On 9 Apr, 17:05, "R.G. Stockwell" <noem...@please.com> wrote:
> I need to cut an image into 4 equal-size parts, which
> obviously is very easy to do in a few lines.
> image1 = im[0:nx/2-1, 0:ny/2-1]  
> image2 = im[0:nx/2-1, ny/2:*]  
> image3 = im[nx/2:*, 0:ny/2-1]  
> image4 = im[nx/2:*, ny/2:*]  
>
> i came across a way to do this with reform, but
> it required 4 steps ( several reforms, a couple transposes)
> to do it properly.
>
> I'd be interested (just for fun) in a vectorized general way to do this
> if any of you 'dimension jugglers' have any clever ideas,
> for how to take an image and cut it into 4, or 16, or 64,
> or 256  equal pieces  (that would probably be about the maximum)
>
> cheers,
> bob

Use the JPEG2000 object and get this cleverness for free :-)
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: find max in 3D array -- slow
Next Topic: Printing in one line

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

Current Time: Wed Oct 08 13:51:32 PDT 2025

Total time taken to generate the page: 0.00435 seconds