Difference between revisions of "Function:CountInRange"
From CUVI Wiki
| (9 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
Counts the number of pixels within the given intensity range | Counts the number of pixels within the given intensity range | ||
===Function=== | ====Function==== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus countInRange(const CuviImage& src, | CuviStatus countInRange(const CuviImage& src, | ||
CuviScalar& count, | |||
const | const CuviScalar& rangeMin, | ||
const | const CuviScalar& rangeMax, | ||
const CuviStream& stream = NULL); | const CuviStream& stream = NULL); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
====Parameters==== | |||
{| | |||
|style="font-size:75%;"| | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
| Line 25: | Line 27: | ||
|- | |- | ||
| count | | count | ||
| | | CuviScalar& | ||
| Computed number of pixels within the given intensity range. | | Computed number of pixels within the given intensity range. | ||
|- | |- | ||
| rangeMin | | rangeMin | ||
| const | | const CuviScalar& | ||
| Lower limit of the intensity range | | Lower limit of the intensity range | ||
|- | |- | ||
| rangeMax | | rangeMax | ||
| const | | const CuviScalar& | ||
| Upper limit of the intensity range | | Upper limit of the intensity range | ||
|- | |- | ||
| Line 39: | Line 41: | ||
| const CuviStream& | | const CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
|} | |||
|} | |} | ||
===Image Type Support=== | ====Image Type Support==== | ||
{| | |||
|style="font-size:75%;"| | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 50: | Line 53: | ||
|- | |- | ||
| 8uC1 | | 8uC1 | ||
| | | CuviScalar | ||
|- | |- | ||
| 8uC3 | | 8uC3 | ||
| | | CuviScalar | ||
|- | |||
| 32fC1 | |||
| CuviScalar | |||
|- | |||
| 32fC3 | |||
| CuviScalar | |||
|} | |||
|} | |} | ||
===Sample=== | ====Sample==== | ||
{| | {| | ||
|- | |- | ||
| Line 63: | Line 73: | ||
===Example=== | ====Example==== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviImage | CuviImage gimg = cuvi::io::loadImage(path); | ||
CuviScalar count; | |||
const | const CuviScalar lowerBound(25.0, 10.0, 10.0); | ||
const | const CuviScalar upperBound(100.0, 200.0, 150.0); | ||
Latest revision as of 10:29, 19 October 2022
Counts the number of pixels within the given intensity range
Function
|
Parameters
|
Image Type Support
|
Sample
Example
|