Is there a way to count the number of different cells

    Nov 05 2009 | 5:32 pm
    Say I have two jitter matrices (or two planes within the same matrix), and I want to identify which cells are different between the two.
    Does it make sense to do an absdiff operation between the two, and then look for the non-zero cells?
    Is there a good way to get a total count of the number of different cells?
    Basically I'm updating an external device that is rather slow. There is a bulk update mode that is faster than writing each cell individually, but slower than the time it takes to write 2/3 of the cells individually.
    So I want to count the number of cells that have changed: if they are over a certain threshould, then I do a bulk update. If the changes are below a certain threshold, then I individually write the changed cells.

    • Nov 05 2009 | 6:02 pm
      jit.absdiff | jit.op @op == @val 0 | jit.3m | The mean multiplied by the number of cells gives you want you want I guess.