> From: David Vincent-Jones <[EMAIL PROTECTED]>
> 
> Applying some special processing to large images can be very time
> consuming so I would like to reduce the entire image by a factor and not
> just extract a sample segment which would be obtained (as I see it) with
> tessalation "cut". 

"reduce ... by a factor" is also ambiguous: there are different ways
to skin a cat: sampling filters. Tessellation cut is slow but good
for filters that need all values of a tile. If nearest neighbor is
sought, then a faster indexing approach can be used.

   scalendx=: <.@(%~ * [EMAIL PROTECTED])

   2 scalendx 5
0 2
   10 scalendx 5
0 0 1 1 2 2 3 3 4 4

   scalenear=: <@(scalendx&.> $) { ]

   ]ar =: 5 5$a.{~97+i.26
abcde
fghij
klmno
pqrst
uvwxy

   3 4 scalenear ar
abcd
fghi
pqrs
   4 10 scalenear ar
aabbccddee
ffgghhiijj
kkllmmnnoo
ppqqrrsstt


      
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to