![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
seeded watershed 2d algorithm More...
seeded watershed 2d algorithm
Watershed algorithm allows to partition an input grey image InIntImg, associated to a marker image InLabMarkImg, into area of influence. This is a classical technic used for segmentation purposes.
Input grey image InIntImg (classically a gradient image) pixels intensity are considered has an elevation map (crests and catchment basins) :
Input marker image InLabMarkImg is used to define catchment basins used as seeds for a flooding process.
An iterative flooding process is then started from water sources defined by seeds until entire image flood. Areas of influence are then defined by meet of different water sources.
Algorithm output is controlled by parameter InWatershedOutputMode which can take following values :
Two processing version (controlled by parameter InOptWatershedProcMode) of this algorithm are provided :
Parameter InOptNbMinDataByThread controls minimal number of data for each processing threads during flooding step and should only be use in expert mode.
Here is an example of watershed 2d algorithm applied to an unsigned char gradient input image associated to label image of seeds
Attribute description for algorithm :
| Name | ToolTip | Default Initializer |
|---|---|---|
| ipsdk::imaproc::attr::InIntImg | [Input] image for processing operation (data contained in image buffer are integers) | X |
| ipsdk::imaproc::attr::InLabMarkImg | [Input] label marker image for processing operation | X |
| ipsdk::imaproc::attr::InWatershedOutputMode | [Input] parameter allowing to define watershed output mode | X |
| ipsdk::imaproc::attr::InOptWatershedProcMode | [Input Optional] Watershed processing mode | X |
| ipsdk::imaproc::attr::InOptNbMinDataByThread | [Input Optional] minimum number of data by thread | X |
| ipsdk::imaproc::attr::OutOptWk1Img | [Output Optional] Temporary working image for algorithm | X |
| ipsdk::imaproc::attr::OutBinLabImg | [Output] binary or label image for processing operation | customOutput (_pOutBinLabImg, outputWatershed(_pInLabMarkImg,_pInWatershedOutputMode)) |
Global rule description for algorithm :
(ipsdk::imaproc::matchSize (_pInIntImg,_pInLabMarkImg) &&
ipsdk::imaproc::customImageProperty (_pOutBinLabImg,
allowedBufferType (_pInWatershedOutputMode)) &&
ipsdk::processor::ifIsSet (_pOutOptWk1Img,
ipsdk::imaproc::matchSize (_pInIntImg,_pOutOptWk1Img)) &&
ipsdk::processor::If (
ipsdk::imaproc::bufferType (_pOutBinLabImg,ipsdk::image::eImageBufferType::eIBT_Binary),
ipsdk::imaproc::matchSize (_pOutBinLabImg,_pInLabMarkImg),
ipsdk::imaproc::matchSizeAndType (_pOutBinLabImg,_pInLabMarkImg)))
| IPSDKIPLADVANCEDMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::advmorpho::seededWatershed2dImg | ( | const image::ImageConstPtr & | pInIntImg, |
| const image::ImageConstPtr & | pInLabMarkImg, | ||
| const ipsdk::imaproc::attr::eWatershedOutputMode & | inWatershedOutputMode | ||
| ) |
wrapper function for seeded watershed 2d algorithm
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLADVANCEDMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::advmorpho::seededWatershed2dImg | ( | const image::ImageConstPtr & | pInIntImg, |
| const image::ImageConstPtr & | pInLabMarkImg, | ||
| const ipsdk::imaproc::attr::eWatershedOutputMode & | inWatershedOutputMode, | ||
| const ipsdk::imaproc::attr::eWatershedProcessingMode & | inOptWatershedProcMode | ||
| ) |
wrapper function for seeded watershed 2d algorithm
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLADVANCEDMORPHOLOGY_API void ipsdk::imaproc::advmorpho::seededWatershed2dImg | ( | const image::ImageConstPtr & | pInIntImg, |
| const image::ImageConstPtr & | pInLabMarkImg, | ||
| const ipsdk::imaproc::attr::eWatershedOutputMode & | inWatershedOutputMode, | ||
| const ipsdk::imaproc::attr::eWatershedProcessingMode & | inOptWatershedProcMode, | ||
| const ipUInt32 | inOptNbMinDataByThread, | ||
| const image::ImagePtr & | pOutBinLabImg | ||
| ) |
wrapper function for seeded watershed 2d algorithm
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
1.8.14