When using a threshold, how can I tell which of the pixels are collected?

Hey there, :slight_smile:

Upon displaying a threshold result, it shows which pixels are being picked up by the algorithm, like it should be, but I was wondering if I can get the amount of pixels into an int variable?

What I mean is like this:

  • Threshold shows about 1200 pixels in the output
  • Store the amount value in a variable

I can’t just print it out, since threshold holds a matrix as it’s output, so I would really appreciate some kind minds to aid me with this problem, thank you for reading through. :smiley:

you can simply count them

1 Like