Function:InRange

From CUVI Wiki
Revision as of 16:46, 31 October 2022 by Jawad (talk | contribs) (Created page with "__NOTOC__ Checks if image values lie between the range defined by two values and returns a boolean image output. The output image is always 8-bit with either 0 or 255 as an pixel value. ====Function==== {| |style="font-size:100%;"| <syntaxhighlight lang="cpp"> CuviStatus inRange(const CuviImage& src, const Cuvi32f rangeMin, const Cuvi32f rangeMax, const CuviStream& stream = CuviStream()); </syn...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Checks if image values lie between the range defined by two values and returns a boolean image output. The output image is always 8-bit with either 0 or 255 as an pixel value.

Function

CuviStatus inRange(const CuviImage& src,
                         const Cuvi32f rangeMin,
                         const Cuvi32f rangeMax,
                         const CuviStream& stream = CuviStream());

Parameters

Name Type Description
src CuviImage& Input Image
rangeMin Cuvi32f Starting value of range
rangeMax Cuvi32f Ending value of range
dst CuviImage& Resultant Image
stream CuviStream& GPU stream ID for execution

Image Type Support

Type
8uC1
8uC3
16uC1
16uC3
32FC1
32FC3

Example

CuviImage input = cuvi::io::loadImage(path), output;


CuviStatus status = cuvi::arithmeticLogical::inRange(input,
                                                     67,
                                                     128,
                                                     output);