TextureClassificationCreate
Creates a new object model for performing a texture classification.
Access to parameter description
As an introduction:
See also
Access to parameter description
As an introduction:
- section Image Segmentation
- section Supervised Texture Classification
- A computation mode: 2D or 3D
- A list of texture groups
- A number of classes to discriminate
- A set of radii of analysis
See also
Function Syntax
This function returns outputModel.
// Function prototype
TextureClassificationModel::Ptr textureClassificationCreate( TextureClassificationCreate::ComputeMode computeMode, uint32_t numberOfClasses, int32_t featureGroup, iolink::Vector2u32 radiusRange, uint32_t radiusStep, uint32_t coocRadius, TextureClassificationCreate::CoocTextonShape coocTextonShape, uint32_t coocTextonSize, TextureClassificationModel::Ptr outputModel = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
computeMode |
The computation mode: 2D or 3D.
|
Enumeration | MODE_2D | |||||||||||
![]() |
numberOfClasses |
The number of classes to discriminate. | UInt32 | >=2 | 2 | ||||||||||
![]() |
featureGroup |
The groups of textural features to compute. This list defines all the textural attributes proposed for performing the classification.
|
MultipleChoice | DIRECTIONAL_COOCCURRENCE | ROTATION_INVARIANT_COOCCURRENCE | FIRST_ORDER_STATISTICS | HISTOGRAM_STATISTICS | INTENSITY | |||||||||||
![]() |
radiusRange |
The minimum and maximum radius, in pixels, of the circular neighborhoods used for computing textural features. | Vector2u32 | >=1 | {2, 14} | ||||||||||
![]() |
radiusStep |
The step, in pixels, used to define the set of radii between minimum and maximum. The maximum radius is systematically added to the radius list. | UInt32 | >=1 | 4 | ||||||||||
![]() |
coocRadius |
The radius, in pixels, of the circular neighborhood used by the co-occurrence features. This parameter is ignored if none of the co-occurrence feature groups is selected. | UInt32 | >=1 | 10 | ||||||||||
![]() |
coocTextonShape |
The shape of the co-occurrence texton (the pattern defined by the set of co-occurrence vectors). This parameter is ignored if none of the co-occurrence feature groups is selected.
The texton shape represents the distribution of points around the target point for computing the co-occurrence matrices. Associated to the texton size, it defines the set of vectors that are used for computing co-occurrence features. For instance, in 2D, a cube shape of size 3 defines the co-occurrence vectors (-3, -3), (0, -3), (3, -3), (-3, 0), (3, 0), (-3, 3), (0, 3) and (3, 3).
|
Enumeration | SPHERE | |||||||||||
![]() |
coocTextonSize |
The size, in pixels, of the texton shape for co-occurrence features. This parameter is ignored if none of the co-occurrence feature groups is selected.
This size is constrained by the radius parameter. The constraint depends on the texton shape. For instance, with a square texton, the texton size cannot exceed the rounded value of radius×√2. |
UInt32 | >=1 | 4 | ||||||||||
![]() |
outputModel |
The output texture classification model, newly created. | TextureClassificationModel | nullptr |
Object Examples
TextureClassificationCreate textureClassificationCreateAlgo; textureClassificationCreateAlgo.setComputeMode( TextureClassificationCreate::ComputeMode::MODE_2D ); textureClassificationCreateAlgo.setNumberOfClasses( 2 ); textureClassificationCreateAlgo.setFeatureGroup( 4 ); textureClassificationCreateAlgo.setRadiusRange( {15, 15} ); textureClassificationCreateAlgo.setRadiusStep( 1 ); textureClassificationCreateAlgo.setCoocRadius( 15 ); textureClassificationCreateAlgo.setCoocTextonShape( TextureClassificationCreate::CoocTextonShape::SPHERE ); textureClassificationCreateAlgo.setCoocTextonSize( 5 ); textureClassificationCreateAlgo.execute(); std::cout << "computeMode: " << textureClassificationCreateAlgo.outputModel()->computeMode( ) ;
Function Examples
auto result = textureClassificationCreate( TextureClassificationCreate::ComputeMode::MODE_2D, 2, 4, {15, 15}, 1, 15, TextureClassificationCreate::CoocTextonShape::SPHERE, 5 ); std::cout << "computeMode: " << result->computeMode( ) ;