Calculate the sum of pixel in a BW image per row and col

hello, I am working on a project and I need to calculate the number of pixels per row and col in an image.
What’s the algorithm to access the pixel per row and col?

you can use reduce() for this

1 Like