[Jprogramming] tacit solution wanted for the mean of quantisation
classes
Jacobs, Jan
jan.wm.jacobs at oce.com
Wed Oct 10 03:42:07 HKT 2007
ls,
I've a small grey-value bitmap (gamma) and a given class assignment (g),
see below. I need to compute the class means, but sorted in normal
order: first class 0, then 1 ...
In the example below I assume 4 classes.
mean=:+/%#
g=:4|>:i.2 3 NB. sample quantisation states
gamma=:?2 3$255 NB. sample grey-value bitmap
mu=:(/:~.,g){(,g)mean/.,gamma
Is there a nice tacit solution for these means (mu)?
Thanks in advance,
Jan.
More information about the Programming
mailing list