![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Kernels management. More...
Classes | |
| class | ipsdk::BaseKernel |
| Base class for kernel objects. More... | |
| class | ipsdk::KernelXY |
| Class encapsulating a 2d kernel spanning along x and y axis. More... | |
| class | ipsdk::KernelXYZ |
| Class encapsulating a 3d kernel spanning along x, y and z axis. More... | |
Enumerations | |
| enum | ipsdk::eSobelKernelType { ipsdk::eSKT_ScharrHalfKnlSz1, ipsdk::eSKT_SobelHalfKnlSz1, ipsdk::eSKT_SobelHalfKnlSz2, ipsdk::eSKT_SobelHalfKnlSz3 } |
| Enumerate describing Sobel gradient kernels. More... | |
| enum | ipsdk::eKernelType { ipsdk::eKT_XY, ipsdk::eKT_XYZ } |
| Enumerate describing kernel type. More... | |
Functions | |
| IPSDKBASEDATA_API void | ipsdk::separableGaussianSmoothing (const ipReal32 stdDevX, const ipReal32 stdDevY, const ipReal32 gaussianRatio, const ipUInt32 minHalfKernelSize, KernelXYPtr &pXAxisKernel, KernelXYPtr &pYAxisKernel) |
| function allowing to generate a separable 2d gaussian kernel used for smoothing operation More... | |
| IPSDKBASEDATA_API void | ipsdk::separableGaussianSmoothing (const ipReal32 stdDevX, const ipReal32 stdDevY, const ipReal32 stdDevZ, const ipReal32 gaussianRatio, const ipUInt32 minHalfKernelSize, KernelXYZPtr &pXAxisKernel, KernelXYZPtr &pYAxisKernel, KernelXYZPtr &pZAxisKernel) |
| function allowing to generate a separable 3d gaussian kernel used for smoothing operation More... | |
| IPSDKBASEDATA_API void | ipsdk::separableGaussianGradient (const ipReal32 stdDevX, const ipReal32 stdDevY, const ipReal32 gaussianRatio, const ipUInt32 minHalfKernelSize, KernelXYPtr &pXAxisKernel, KernelXYPtr &pYAxisKernel) |
| function allowing to generate a separable 2d gaussian kernel used for gradient computation operation More... | |
| IPSDKBASEDATA_API void | ipsdk::separableGaussianGradient (const ipReal32 stdDevX, const ipReal32 stdDevY, const ipReal32 stdDevZ, const ipReal32 gaussianRatio, const ipUInt32 minHalfKernelSize, KernelXYZPtr &pXAxisKernel, KernelXYZPtr &pYAxisKernel, KernelXYZPtr &pZAxisKernel) |
| function allowing to generate a separable 3d gaussian kernel used for gradient computation operation More... | |
| IPSDKBASEDATA_API void | ipsdk::separableGaussianHessian (const ipReal32 stdDevX, const ipReal32 stdDevY, const ipReal32 gaussianRatio, const ipUInt32 minHalfKernelSize, KernelXYPtr &pXAxisKernel, KernelXYPtr &pYAxisKernel) |
| function allowing to generate a separable 2d Hessian kernel used for Hessian computation operation More... | |
| IPSDKBASEDATA_API void | ipsdk::separableGaussianHessian (const ipReal32 stdDevX, const ipReal32 stdDevY, const ipReal32 stdDevZ, const ipReal32 gaussianRatio, const ipUInt32 minHalfKernelSize, KernelXYZPtr &pXAxisKernel, KernelXYZPtr &pYAxisKernel, KernelXYZPtr &pZAxisKernel) |
| function allowing to generate a separable 3d Hessian kernel used for Hessian computation operation More... | |
| IPSDKBASEDATA_API KernelXYPtr | ipsdk::rotate2dKernel (const ipReal32 theta, const KernelXYConstPtr pKnl) |
| function allowing to create a rotated version of the input 2d kernel | |
| IPSDKBASEDATA_API void | ipsdk::separableSobelSmoothing (const eSobelKernelType &kernelType, KernelXYPtr &pXAxisKernel, KernelXYPtr &pYAxisKernel) |
| function allowing to generate a separable 2d Sobel kernel used for smoothing operation | |
| IPSDKBASEDATA_API void | ipsdk::separableSobelSmoothing (const eSobelKernelType &kernelType, KernelXYZPtr &pXAxisKernel, KernelXYZPtr &pYAxisKernel, KernelXYZPtr &pZAxisKernel) |
| function allowing to generate a separable 3d Sobel kernel used for smoothing operation | |
| IPSDKBASEDATA_API void | ipsdk::separableSobelGradient (const eSobelKernelType &kernelType, KernelXYPtr &pXAxisKernel, KernelXYPtr &pYAxisKernel) |
| function allowing to generate a separable 2d Sobel kernel used for gradient computation operation | |
| IPSDKBASEDATA_API void | ipsdk::separableSobelGradient (const eSobelKernelType &kernelType, KernelXYZPtr &pXAxisKernel, KernelXYZPtr &pYAxisKernel, KernelXYZPtr &pZAxisKernel) |
| function allowing to generate a separable 3d Sobel kernel used for gradient computation operation | |
| IPSDKBASEDATA_API KernelXYPtr | ipsdk::squareKernelXY (const ipUInt32 halfKernelSize, const Real32Vector &valueColl, const ipBool bKeepNullValue=false) |
| function allowing to generate a square XY kernel More... | |
| IPSDKBASEDATA_API KernelXYPtr | ipsdk::rectangularKernelXY (const ipUInt32 halfKernelSizeX, const ipUInt32 halfKernelSizeY, const Real32Vector &valueColl, const ipBool bKeepNullValue=false) |
| function allowing to generate a rectangular XY kernel More... | |
| IPSDKBASEDATA_API KernelXYPtr | ipsdk::linearKernelXY (const ipReal32 theta, const Real32Vector &valueColl, const ipBool bKeepNullValue=false) |
| function allowing to generate a linear oriented XY kernel with a given number of elements. More... | |
| IPSDKBASEDATA_API KernelXYPtr | ipsdk::linearInterpolatedKernelXY (const ipReal32 theta, const Real32Vector &valueColl, const ipBool bKeepNullValue=false) |
| function allowing to generate a linear oriented XY kernel with interpolated coefficients. More... | |
| IPSDKBASEDATA_API KernelXYZPtr | ipsdk::cubicKernelXYZ (const ipUInt32 halfKernelSize, const Real32Vector &valueColl, const ipBool bKeepNullValue=false) |
| function allowing to generate a cubic XYZ kernel More... | |
| IPSDKBASEDATA_API KernelXYZPtr | ipsdk::rectangularKernelXYZ (const ipUInt32 halfKernelSizeX, const ipUInt32 halfKernelSizeY, const ipUInt32 halfKernelSizeZ, const Real32Vector &valueColl, const ipBool bKeepNullValue=false) |
| function allowing to generate a rectangular parallelepiped XYZ kernel More... | |
| IPSDKBASEDATA_API KernelXYZPtr | ipsdk::linearKernelXYZ (const ipReal32 theta, const ipReal32 phi, const Real32Vector &valueColl, const ipBool bKeepNullValue=false) |
| function allowing to generate a linear oriented XYZ kernel with a given number of elements. More... | |
| IPSDKBASEDATA_API KernelXYZPtr | ipsdk::linearInterpolatedKernelXYZ (const ipReal32 theta, const ipReal32 phi, const Real32Vector &valueColl, const ipBool bKeepNullValue=false) |
| function allowing to generate a linear oriented XYZ kernel with interpolated coefficients. More... | |
| typedef boost::shared_ptr< KernelXY > | ipsdk::KernelXYPtr |
| shared pointer to KernelXY | |
| typedef boost::shared_ptr< const KernelXY > | ipsdk::KernelXYConstPtr |
| shared pointer to KernelXY | |
| typedef boost::shared_ptr< KernelXYZ > | ipsdk::KernelXYZPtr |
| shared pointer to KernelXYZ | |
| typedef boost::shared_ptr< const KernelXYZ > | ipsdk::KernelXYZConstPtr |
| shared pointer to KernelXYZ | |
Kernels management.
A kernel is a matrix (which may be dense or sparse) used in image convolution operations. Content of such a matrix allows image processing operations such as : blurring, sharpening, edge detection, etc.
In 2d case, a kernel is associated to class ipsdk::KernelXY and is represented by a collection of offsets which is associated to class ipsdk::OffsetXY defining its shape, each offset being associated to a value.
In 3d case, a kernel is associated to class ipsdk::KernelXYZ and its collection of offsets is simply replaced by a class ipsdk::OffsetXYZ.
The following examples illustrates the definition of a 2d square user custom kernel given by :
The same kernel creation can be written in Python:
The following C++ example illustrates the definition of two separable gaussian kernels which can be used for smoothing operation :
The translation in Python is:
Associated kernel values will be sampled on a curve looking like :
Combination of these kernels long X and Y axis allows 2d processing.
Enumerate describing Sobel gradient kernels.
| enum ipsdk::eKernelType |
| IPSDKBASEDATA_API void ipsdk::separableGaussianSmoothing | ( | const ipReal32 | stdDevX, |
| const ipReal32 | stdDevY, | ||
| const ipReal32 | gaussianRatio, | ||
| const ipUInt32 | minHalfKernelSize, | ||
| KernelXYPtr & | pXAxisKernel, | ||
| KernelXYPtr & | pYAxisKernel | ||
| ) |
function allowing to generate a separable 2d gaussian kernel used for smoothing operation
| ipsdk::IPSDKBaseDataException | if stdDevX <= 0 |
| ipsdk::IPSDKBaseDataException | if stdDevY <= 0 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio < 0 || gaussianRatio >= 1 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio == 0 || minHalfKernelSize == 0 |
| IPSDKBASEDATA_API void ipsdk::separableGaussianSmoothing | ( | const ipReal32 | stdDevX, |
| const ipReal32 | stdDevY, | ||
| const ipReal32 | stdDevZ, | ||
| const ipReal32 | gaussianRatio, | ||
| const ipUInt32 | minHalfKernelSize, | ||
| KernelXYZPtr & | pXAxisKernel, | ||
| KernelXYZPtr & | pYAxisKernel, | ||
| KernelXYZPtr & | pZAxisKernel | ||
| ) |
function allowing to generate a separable 3d gaussian kernel used for smoothing operation
| ipsdk::IPSDKBaseDataException | if stdDevX <= 0 |
| ipsdk::IPSDKBaseDataException | if stdDevY <= 0 |
| ipsdk::IPSDKBaseDataException | if stdDevZ <= 0 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio < 0 || gaussianRatio >= 1 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio == 0 || minHalfKernelSize == 0 |
| IPSDKBASEDATA_API void ipsdk::separableGaussianGradient | ( | const ipReal32 | stdDevX, |
| const ipReal32 | stdDevY, | ||
| const ipReal32 | gaussianRatio, | ||
| const ipUInt32 | minHalfKernelSize, | ||
| KernelXYPtr & | pXAxisKernel, | ||
| KernelXYPtr & | pYAxisKernel | ||
| ) |
function allowing to generate a separable 2d gaussian kernel used for gradient computation operation
| ipsdk::IPSDKBaseDataException | if stdDev <= 0 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio < 0 || gaussianRatio >= 1 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio == 0 || minHalfKernelSize == 0 |
| IPSDKBASEDATA_API void ipsdk::separableGaussianGradient | ( | const ipReal32 | stdDevX, |
| const ipReal32 | stdDevY, | ||
| const ipReal32 | stdDevZ, | ||
| const ipReal32 | gaussianRatio, | ||
| const ipUInt32 | minHalfKernelSize, | ||
| KernelXYZPtr & | pXAxisKernel, | ||
| KernelXYZPtr & | pYAxisKernel, | ||
| KernelXYZPtr & | pZAxisKernel | ||
| ) |
function allowing to generate a separable 3d gaussian kernel used for gradient computation operation
| ipsdk::IPSDKBaseDataException | if stdDev <= 0 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio < 0 || gaussianRatio >= 1 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio == 0 || minHalfKernelSize == 0 |
| IPSDKBASEDATA_API void ipsdk::separableGaussianHessian | ( | const ipReal32 | stdDevX, |
| const ipReal32 | stdDevY, | ||
| const ipReal32 | gaussianRatio, | ||
| const ipUInt32 | minHalfKernelSize, | ||
| KernelXYPtr & | pXAxisKernel, | ||
| KernelXYPtr & | pYAxisKernel | ||
| ) |
function allowing to generate a separable 2d Hessian kernel used for Hessian computation operation
| ipsdk::IPSDKBaseDataException | if stdDev <= 0 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio < 0 || gaussianRatio >= 1 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio == 0 || minHalfKernelSize == 0 |
| IPSDKBASEDATA_API void ipsdk::separableGaussianHessian | ( | const ipReal32 | stdDevX, |
| const ipReal32 | stdDevY, | ||
| const ipReal32 | stdDevZ, | ||
| const ipReal32 | gaussianRatio, | ||
| const ipUInt32 | minHalfKernelSize, | ||
| KernelXYZPtr & | pXAxisKernel, | ||
| KernelXYZPtr & | pYAxisKernel, | ||
| KernelXYZPtr & | pZAxisKernel | ||
| ) |
function allowing to generate a separable 3d Hessian kernel used for Hessian computation operation
| ipsdk::IPSDKBaseDataException | if stdDev <= 0 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio < 0 || gaussianRatio >= 1 |
| ipsdk::IPSDKBaseDataException | if gaussianRatio == 0 || minHalfKernelSize == 0 |
| IPSDKBASEDATA_API KernelXYPtr ipsdk::squareKernelXY | ( | const ipUInt32 | halfKernelSize, |
| const Real32Vector & | valueColl, | ||
| const ipBool | bKeepNullValue = false |
||
| ) |
function allowing to generate a square XY kernel
| ipsdk::IPSDKBaseDataException | if valueColl.size() != (2*halfKernelSize+1) * (2*halfKernelSize+1) |
| IPSDKBASEDATA_API KernelXYPtr ipsdk::rectangularKernelXY | ( | const ipUInt32 | halfKernelSizeX, |
| const ipUInt32 | halfKernelSizeY, | ||
| const Real32Vector & | valueColl, | ||
| const ipBool | bKeepNullValue = false |
||
| ) |
function allowing to generate a rectangular XY kernel
| ipsdk::IPSDKBaseDataException | if valueColl.size() != (2*halfKernelSizeX+1) * (2*halfKernelSizeY+1) |
| IPSDKBASEDATA_API KernelXYPtr ipsdk::linearKernelXY | ( | const ipReal32 | theta, |
| const Real32Vector & | valueColl, | ||
| const ipBool | bKeepNullValue = false |
||
| ) |
function allowing to generate a linear oriented XY kernel with a given number of elements.
between angles 0 and
) | ipsdk::IPSDKBaseDataException | if valueColl.size() % 2 != 1 |
| IPSDKBASEDATA_API KernelXYPtr ipsdk::linearInterpolatedKernelXY | ( | const ipReal32 | theta, |
| const Real32Vector & | valueColl, | ||
| const ipBool | bKeepNullValue = false |
||
| ) |
function allowing to generate a linear oriented XY kernel with interpolated coefficients.
| ipsdk::IPSDKBaseDataException | if valueColl.size() % 2 != 1 |
| IPSDKBASEDATA_API KernelXYZPtr ipsdk::cubicKernelXYZ | ( | const ipUInt32 | halfKernelSize, |
| const Real32Vector & | valueColl, | ||
| const ipBool | bKeepNullValue = false |
||
| ) |
function allowing to generate a cubic XYZ kernel
| ipsdk::IPSDKBaseDataException | if valueColl.size() != (2*halfKernelSize+1) * (2*halfKernelSize+1) * (2*halfKernelSize+1) |
| IPSDKBASEDATA_API KernelXYZPtr ipsdk::rectangularKernelXYZ | ( | const ipUInt32 | halfKernelSizeX, |
| const ipUInt32 | halfKernelSizeY, | ||
| const ipUInt32 | halfKernelSizeZ, | ||
| const Real32Vector & | valueColl, | ||
| const ipBool | bKeepNullValue = false |
||
| ) |
function allowing to generate a rectangular parallelepiped XYZ kernel
| ipsdk::IPSDKBaseDataException | if valueColl.size() != (2*halfKernelSizeX+1) * (2*halfKernelSizeY+1) * (2*halfKernelSizeZ+1) |
| IPSDKBASEDATA_API KernelXYZPtr ipsdk::linearKernelXYZ | ( | const ipReal32 | theta, |
| const ipReal32 | phi, | ||
| const Real32Vector & | valueColl, | ||
| const ipBool | bKeepNullValue = false |
||
| ) |
function allowing to generate a linear oriented XYZ kernel with a given number of elements.
| ipsdk::IPSDKBaseDataException | if valueColl.size() % 2 != 1 |
| IPSDKBASEDATA_API KernelXYZPtr ipsdk::linearInterpolatedKernelXYZ | ( | const ipReal32 | theta, |
| const ipReal32 | phi, | ||
| const Real32Vector & | valueColl, | ||
| const ipBool | bKeepNullValue = false |
||
| ) |
function allowing to generate a linear oriented XYZ kernel with interpolated coefficients.
| ipsdk::IPSDKBaseDataException | if valueColl.size() % 2 != 1 |
1.8.14