Count the number of pixels that lie between two limits in the
histogram.
Namespace: Stemmer.Cvb.Foundation
Assembly: Stemmer.Cvb.Foundation (in Stemmer.Cvb.Foundation.dll) Version: 14.0.0.0
Syntax
public static int SumBetween( this IList<int> histogram, int lowerLimit, int upperLimit )
Parameters
- histogram
- Type: System.Collections.GenericIListInt32
The histogram to calculate the sum on. - lowerLimit
- Type: SystemInt32
Lower limit to count from. - upperLimit
- Type: SystemInt32
Upper limit to count to (including).
Return Value
Type: Int32Number of pixels with a gray value between lowerLimit and upperLimit.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IListInt32. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | If lowerLimit is smaller than zero or upperLimit is larger or equal to the number of entries in the Histogram. |
See Also