IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Super Voxels 3dSee full documentation
imagesuperVoxels3dImg (inImg,inSuperPixelsParamValue,inCompactness,inNbIter)
imagesuperVoxels3dImg (inImg,inSuperPixelsParamValue,inCompactness,inNbIter,inOptSizeRatio,inOptSuperPixelsType)

Detailed Description

function for computing super voxels

The super voxels algorithm is based on the SILC method (Simple Linear Iterative Clustering)

See also
https://darshita1405.medium.com/superpixels-and-slic-6b2d8a6e4f08

This algorithm is used to separate an image into super voxels (group of voxels). Those super voxels are computed to follow the contours of the input image. Each voxel is compared with the center of the closest super voxels, and associated to the most similar one, in term of distance and color.

The following parameters allow to optimise the computation of the super voxels:

For simplest visualization, an example of super pixels computation is illustrated in Super Pixels 2d.

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLAdvancedMorphology as advmorpho

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# Optional parameters
superPixelsNumber = 500
compactness = 0.5
nbIter = 3
sizeRatio = 0.5
superPixelsType = PyIPSDK.eSPT_Number
outImg = advmorpho.superVoxels3dImg(inImg, superPixelsNumber, compactness, nbIter, sizeRatio, superPixelsType)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLAdvancedMorphology/Processor/SuperVoxels3dImg/SuperVoxels3dImg.h>

Code Example

ImagePtr pInImg = loadTiffImageFile(inputImgPath);
ImagePtr pOutBinLabImg = superVoxels3dImg(pInImg, 500, 0.5, 3);