The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Clamps image pixel values between specified thresholds.
Function
CuviStatus threshold(const CuviImage& src,
CuviImage& dst,
const CuviScalar& minThresh,
const CuviScalar& maxThresh,
const CuviStream& stream = CuviStream());
|
Parameters
Name
|
Type
|
Description
|
src
|
const CuviImage&
|
Input Image
|
dst
|
CuviImage&
|
Destination Image
|
minThresh
|
const CuviScalar&
|
Minimum value of threshold
|
maxThresh
|
const CuviScalar&
|
Maximum value of threshold
|
stream
|
const CuviStream&
|
GPU stream ID for execution
|
Image Type Support
Input
|
Output
|
8u
|
8u
|
16u
|
16u
|
Example
//Creating GPU images
CuviImage gimg = cuvi:io::loadImage(path), gout;
CuviScalar minThresh(10,20,20);
CuviScalar maxThresh(100,200,150);
//Apply threshold on image pixel values
cuvi::dataExchange::threshold(gimg,gout,minThresh, maxThresh);
|