## Average value of a matrix?

Apr 10, 2007 at 4:06pm

# Average value of a matrix?

I’m looking to take the average RGB value of a matrix, presumably by taking the sum of all cells divided by the number of cells. The problem is that, as you know, each cell is (presumably) a list of four (ARGB) chars. I presume therefore I need to sum the four plane values together, then peform the aforementioned operation.

Any clues as to how to go about this? Realising algorithms in dataflow languages does my head in. I’m just looking for a scalar, color average of an entire matrix.

#31284
Apr 10, 2007 at 4:39pm

Try jit.3m on for size.

Andreas

Serge skrev:
> I’m looking to take the average RGB value of a matrix, presumably by taking the sum of all cells divided by the number of cells. The problem is that, as you know, each cell is (presumably) a list of four (ARGB) chars. I presume therefore I need to sum the four plane values together, then peform the aforementioned operation.
>
> Any clues as to how to go about this? Realising algorithms in dataflow languages does my head in. I’m just looking for a scalar, color average of an entire matrix.
>
> .
>
>

#101473

You must be logged in to reply to this topic.