I have been reading -- no scanning -- apple developer's docs (because ultimately my code is developed in apple's Xcode) on math|digital signal processing and I am seeing talk of existing procedures that do dot products, FFT, convolutions, and scaling in the same docs.
In particular there is mention at the link below of a function vDSP_vcmprs which has the following desctiption. "Performs the following operation: "Compresses vector A based on the nonzero values of gating vector B. For nonzero elements of B, corresponding elements of A are sequentially copied to output vector C." http://developer.apple.com/library/ios/#documentation/Accelerate/Reference/vDSPRef/Reference/reference.html This looks very promising to me if I can figure out the inputs which include 2 input vectors and 1 output vector and 3 corresponding "strides". I assume input vector A would be my raveled 52x52 image of 0s and 1s; input B would be some permutation of 1, 3#0 or of 1,15# 0. Would the stride of A be 52 and the stride of B be 4 or 16? Does C have a stride? Can anyone help here? 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 > -- (B=) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
