Filters an image using a max filter and default Anchor Position
Function
CuviStatus maxFilter(CuviImage* srcImage,
CuviImage* dstImage,
CuviROI roi,
CuviSize filterSize,
CuviStream* stream = NULL);
|
Parameters
| Name
|
Type
|
Description
|
| srcImage
|
CuviImage*
|
Input Image
|
| dstImage
|
CuviImage*
|
Output Image
|
| roi
|
CuviROI
|
Region of Interest
|
| filterSize
|
CuviSize
|
Max filter's kernel size
|
| stream
|
CuviStream*
|
GPU stream ID for execution
|
Image Type Support
| Input
|
Output
|
| 8uC1
|
8uC1
|
| 8uC3
|
8uC3
|
| 16uC1
|
16uC1
|
| 16uC3
|
16uC3
|
Sample
Input
|
Max 5x5
|
Example
//Input image
CuviImage* gimg = new CuviImage(cuviSize(img->width,img->height),img->depth,img->nChannels);
gimg->upload(img->imageData,img->widthStep);
//Output Image
CuviImage* gout = new CuviImage(cuviSize(img->width,img->height),img->depth,img->nChannels);
//Choosing ROI
CuviROI roi = cuviROI(0,0,img->width,img->height);
//Filter Size
CuviSize fSize = cuviSize(5,5);
//Applying Max filter of size 5x5 on the image
cuvi::imageFiltering::maxFilter(gimg, gout, roi, fSize);
|