Hello Sheri,
you can use the workflow attached to my post to do what you want on a single image. If you have more images, you should add a ChunkLoopStart and ChunkLoopEnd.
However,usually we work with lots of images and then you also want to keep images in the actual image format. May I ask what you want to do with this matrix representation? maybe I can offer you some suggestions how to do it with other nodes + the image format.
Hope this helps,
Christian