Compute X and Y gradients of an input image convolving it with 2d Sobel kernels.
More...
| IPSDKIPLFILTERING_API GradientXYImg | ipsdk::imaproc::filter::sobelGradient2dImg (const image::ImageConstPtr &pInImg) |
| | wrapper function for Sobel filter used to compute gradient on a 2d image More...
|
| |
| IPSDKIPLFILTERING_API GradientXYImg | ipsdk::imaproc::filter::sobelGradient2dImg (const image::ImageConstPtr &pInImg, const ipsdk::eSobelKernelType &kernelType, const bool bNormalize) |
| | wrapper function for Sobel filter used to compute gradient on a 2d image More...
|
| |
| IPSDKIPLFILTERING_API void | ipsdk::imaproc::filter::sobelGradient2dImg (const image::ImageConstPtr &pInImg, const ipsdk::eSobelKernelType &kernelType, const bool bNormalize, const image::ImagePtr &pOutOptGradXImg, const image::ImagePtr &pOutOptGradYImg) |
| | wrapper function for Sobel filter used to compute gradient on a 2d image More...
|
| |
| IPSDKIPLFILTERING_API image::ImagePtr | ipsdk::imaproc::filter::sobelXGradient2dImg (const image::ImageConstPtr &pInImg) |
| | wrapper function for Sobel filter used to compute gradient on a 2d image More...
|
| |
| IPSDKIPLFILTERING_API image::ImagePtr | ipsdk::imaproc::filter::sobelXGradient2dImg (const image::ImageConstPtr &pInImg, const ipsdk::eSobelKernelType &kernelType, const bool bNormalize) |
| | wrapper function for Sobel filter used to compute gradient on a 2d image More...
|
| |
| IPSDKIPLFILTERING_API void | ipsdk::imaproc::filter::sobelXGradient2dImg (const image::ImageConstPtr &pInImg, const ipsdk::eSobelKernelType &kernelType, const bool bNormalize, const image::ImagePtr &pOutXGradImg) |
| | wrapper function for Sobel filter used to compute gradient on a 2d image More...
|
| |
| IPSDKIPLFILTERING_API image::ImagePtr | ipsdk::imaproc::filter::sobelYGradient2dImg (const image::ImageConstPtr &pInImg) |
| | wrapper function for Sobel filter used to compute gradient on a 2d image More...
|
| |
| IPSDKIPLFILTERING_API image::ImagePtr | ipsdk::imaproc::filter::sobelYGradient2dImg (const image::ImageConstPtr &pInImg, const ipsdk::eSobelKernelType &kernelType, const bool bNormalize) |
| | wrapper function for Sobel filter used to compute gradient on a 2d image More...
|
| |
| IPSDKIPLFILTERING_API void | ipsdk::imaproc::filter::sobelYGradient2dImg (const image::ImageConstPtr &pInImg, const ipsdk::eSobelKernelType &kernelType, const bool bNormalize, const image::ImagePtr &pOutYGradImg) |
| | wrapper function for Sobel filter used to compute gradient on a 2d image More...
|
| |
Compute X and Y gradients of an input image convolving it with 2d Sobel kernels.
2d Sobel kernels are separable, they can be decomposed as the product of a row vector and a column vector. X gradient kernel equals to the product of the smoothing (column) vector with the derivative (row) vector, while Y gradient kernel equals to the product of the derivative (column) vector with the smoothing (row) vector. Depending on the value of parameter
(default value: eSKT_SobelHalfKnlSz1), smoothing and derivative vectors equal to:
To handle image borders, a mirror extrapolation is used (see Border policy for more details).
Here is an example of a Sobel gradient applied to an 8-bits grey levels input image with default parameters used:
- See also
- https://en.wikipedia.org/wiki/Sobel_operator
Attributes description
Attribute description for algorithm :
Global Rule description
Global rule description for algorithm :
((ipsdk::processor::isSet (_pOutOptGradXImg) ||
ipsdk::processor::isSet (_pOutOptGradYImg)) &&
(ipsdk::processor::ifIsSet (_pOutOptGradXImg,
ipsdk::imaproc::matchSize (_pInImg,_pOutOptGradXImg))) &&
(ipsdk::processor::ifIsSet (_pOutOptGradYImg,
ipsdk::imaproc::matchSize (_pInImg,_pOutOptGradYImg))))
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
outGxImg, outGyImg = filter.sobelGradient2dImg(inImg)
Example of C++ code :
Example informations
Associated library
IPSDKIPLFiltering
Header file
Code Example
- See also
- SobelGradient2dImgLvl1
◆ sobelGradient2dImg() [1/3]
wrapper function for Sobel filter used to compute gradient on a 2d image
- Exceptions
-
◆ sobelGradient2dImg() [2/3]
wrapper function for Sobel filter used to compute gradient on a 2d image
- Exceptions
-
◆ sobelGradient2dImg() [3/3]
wrapper function for Sobel filter used to compute gradient on a 2d image
- Exceptions
-
◆ sobelXGradient2dImg() [1/3]
wrapper function for Sobel filter used to compute gradient on a 2d image
- Exceptions
-
◆ sobelXGradient2dImg() [2/3]
wrapper function for Sobel filter used to compute gradient on a 2d image
- Exceptions
-
◆ sobelXGradient2dImg() [3/3]
wrapper function for Sobel filter used to compute gradient on a 2d image
- Exceptions
-
◆ sobelYGradient2dImg() [1/3]
wrapper function for Sobel filter used to compute gradient on a 2d image
- Exceptions
-
◆ sobelYGradient2dImg() [2/3]
wrapper function for Sobel filter used to compute gradient on a 2d image
- Exceptions
-
◆ sobelYGradient2dImg() [3/3]
wrapper function for Sobel filter used to compute gradient on a 2d image
- Exceptions
-