How to sum rows and columns of binary image? #4214
Closed
citroboy
started this conversation in
Help wanted
Replies: 2 comments 6 replies
-
Hello @citroboy, you need https://www.libvips.org/API/current/libvips-arithmetic.html#vips-project It scans the image once and makes two histograms, one of the row sums and one of the column sums.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the quick response. project seems to be oring rather than adding. The output images are black and white, so if there is 1 or 100 white pixels in a row I get white. Since there is some noise in the background that throws me off. I'm looking for a count of white pixels. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a small black and white image.
I want to find the coords of the white area in the middle so I can crop it. I thought I would find the edges by adding up the values of the pixels in each row and column, but I see no obvious way to do that. I'm using pyvips.
Beta Was this translation helpful? Give feedback.
All reactions