Difference between revisions of "Function:CountInRange"
From CUVI Wiki
| Line 71: | Line 71: | ||
CuviImage* gimg = new CuviImage(size, depth, nChannels); | CuviImage* gimg = new CuviImage(size, depth, nChannels); | ||
Cuvi32u count = | Cuvi32u* count = new Cuvi32u[nChannels]; | ||
Cuvi32f lowerBound = 25; | Cuvi32f lowerBound = 25; | ||
Cuvi32f upperBound = 100; | Cuvi32f upperBound = 100; | ||
Revision as of 07:34, 8 May 2012
Counts the number of pixels within the given intensity range
Function
|
Parameters
| Name | Type | Description |
|---|---|---|
| image | CuviImage* | Input Image |
| count | Cuvi32u* | Computed number of pixels within the given intensity range. Returns an array of 3 values in case of 3-channel image |
| rangeMin | Cuvi64f* | Lower limit of the intensity range |
| rangeMax | Cuvi64f* | Upper limit of the intensity range |
| stream | CuviStream* | GPU stream ID for execution |
Image Type Support
| Input | Output |
|---|---|
| 8uC1 | Cuvi32u single value |
| 8uC3 | Cuvi32u three values |
Sample
Example
|