According to me the two images have different sizes and are partly overlapping. In the resulting image, he wants a copy of either image where they don't overlap, and the average where they do.
Like: i1 =: 0 1 2 3 4 _ _ i2 =: _ _ _ 0 2 4 6 I can come up with: avg =: +/ % # min =: <./ ({"0 1~ (_={."1) )(avg ,. min)i1,:i2 0 1 2 1.5 3 4 6 but I'm sure that can be improved. Ben ________________________________________ From: programming-boun...@jsoftware.com [programming-boun...@jsoftware.com] on behalf of Brian Schott [schott.br...@gmail.com] Sent: Wednesday, May 30, 2012 17:46 To: Programming forum Subject: Re: [Jprogramming] how to work with images - or 2D arrays? 0 1 2 3 4 4 6 0 1 2 0 2 4 6 I have deduced that Alexander is averaging the above two rows into one row, where the first row has 4 6 postpended from the first row and the second row has 0 1 2 prepended from the first row. Is that helpful? -- (B=) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm