Home »
Public Forums »
archive »
how many array elements with a certain value in a row
how many array elements with a certain value in a row [message #70279] |
Thu, 01 April 2010 05:49 |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
Does anyone have a nice simple efficient solution to this problem (I
have a simple inefficient solution and a vague sketch in my mind of a
convoluted but probably efficient solution):
I have an image in which many pixels are saturated (=65535, they're
short unsigned). I want to treat each set of consecutive saturated
pixels in a row as a single unit and know how many saturated pixels in
a row there are. So I would like to have a list that contains (a) the
rightmost pixel of each set of consecutive saturated pixels, and (b)
how many saturated pixels there were in the set.
Any suggestions?
-Jeremy.
|
|
|
Current Time: Wed Oct 08 13:59:51 PDT 2025
Total time taken to generate the page: 0.00464 seconds