To get a better idea of the real "specimen", consider the following
noun, ss where you can begin to see a capital J. To recreate a
specimen in order to exercise the earlier posted compressions,
consider using the code which follows ss and converts ss into
specimen.

   ss =: 0 : 0
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
00007FFF8000
00007FFF8000
00007FFF8000
00007FFF8000
00007FFF0000
000003E00000
000003E00000
000003E00000
000003E00000
000003E00000
000003E00000
000003E00000
000003E00000
000001E00000
000001E00000
000001E00000
000001E00000
000001E00000
000001E00000
000001E00000
000001E00000
000003E00000
000003C00000
1F0003C00000
1E0003C00000
1E0003C00000
1E0003C00000
1E0003C00000
1E0003C00000
1F0003C00000
0F0007C00000
0F000F800000
0FC01F800000
07FFFF000000
07FFFF000000
03FFFE000000
00FFF8000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
)

   dfh=: 16 #. 16 | '0123456789ABCDEF0123456789abcdef' i. ]
   specimen=: (#: dfh;._2 ss),"1] 7#0

On Mon, Dec 31, 2012 at 6:07 PM, Brian Schott <[email protected]> wrote:
>         I developed a small image compression script which is applied to a
> "thresholded" image from the G component only of the RGB triplet. (Although
> my example below is of an 8x8 thresholded image, in practice it is 52x52.)
>
>    wind=: 2 2$2
>    sample=: 4 : 'wind (?x)&{@,;._3"2 y'
>    ]specimen=: 8 8?.@$2  NB. the test thresholded image
> 0 1 0 1 1 1 0 0
> 0 1 0 1 0 0 1 0
> 0 0 0 0 1 1 1 0
> 0 0 0 0 1 1 0 1
> 1 0 0 1 0 0 1 0
> 1 0 0 0 0 1 0 1
> 0 0 1 0 0 1 0 0
> 1 0 0 1 0 1 0 0
>    2 (4&sample) specimen NB. a random resulting compression
>
>         Eventually I will have to do this compression in C and I am very
> weak in C, so I am looking for an alternative calculation that gives
> approximately the same result but using something like matrix
> multiplication. I am just beginning to learn the terminology of image
> transformation, but this may be an example of a "convolution" in that
> discipline.
>
>         So, my question is (I think) can a random convolution matrix be
> constructed to accomplish a similar result using matrix multiplication, for
> which I have found a c code example at rosettacode.org?
>
> http://rosettacode.org/wiki/Matrix_multiplication#C
>
> Thanks,
>
> (B=)



-- 
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to