I'm playing with some image processing, and not sure how to do a rather basic 
thing.

It actually even applicable to 1D arrays. Suppose we have a picture, a 2D array 
of floating point brightness values in the range from 0 to 1. Suppose we want 
to superimpose another array on top of that, with some function for how to 
merge brightness from two sources in the same place. For 1D, an example could 
be "merge i. 5 with 2 * i. 4 where the second array is shifted 3 values from 
the beginning of the first one and merging values are averaged". I.e.

0 1 2 3 4 "merge with shift 3 and averaging" 0 2 4 6
->
0 1 2 1.5 3 4 6

This could be useful for image manipulations, in 2D case.

What would be a good way to do that? For example, merge i. 5 5 with 3 * i. 3 4 
shifting the second array 4 _1 from the first and, say, averaging values on the 
same places?

Am I missing some known J patterns?

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

Reply via email to