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
clever way to subregion an image? [message #70388] Fri, 09 April 2010 09:05 Go to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
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
[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 11:29:25 PDT 2025

Total time taken to generate the page: 0.00488 seconds