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 = nullptr );
This function returns outputModel.
// Function prototype. texture_classification_create(compute_mode: TextureClassificationCreate.ComputeMode = TextureClassificationCreate.ComputeMode.MODE_2D, number_of_classes: int = 2, feature_group: Union[int, str, TextureClassificationCreate.FeatureGroup] = 31, radius_range: Iterable[int] = [2, 14], radius_step: int = 4, cooc_radius: int = 10, cooc_texton_shape: TextureClassificationCreate.CoocTextonShape = TextureClassificationCreate.CoocTextonShape.SPHERE, cooc_texton_size: int = 4, output_model: Union[Any, None] = None) -> TextureClassificationModel
This function returns outputModel.
// Function prototype. public static TextureClassificationModel TextureClassificationCreate( TextureClassificationCreate.ComputeMode computeMode = ImageDev.TextureClassificationCreate.ComputeMode.MODE_2D, UInt32 numberOfClasses = 2, Int32 featureGroup = 31, uint[] radiusRange = null, UInt32 radiusStep = 4, UInt32 coocRadius = 10, TextureClassificationCreate.CoocTextonShape coocTextonShape = ImageDev.TextureClassificationCreate.CoocTextonShape.SPHERE, UInt32 coocTextonSize = 4, TextureClassificationModel 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 \times \sqrt{2}$. |
UInt32 | >=1 | 4 | |||||||||||
outputModel |
The output texture classification model, newly created. | TextureClassificationModel | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
compute_mode |
The computation mode: 2D or 3D.
|
enumeration | MODE_2D | ||||||||||||
number_of_classes |
The number of classes to discriminate. | uint32 | >=2 | 2 | |||||||||||
feature_group |
The groups of textural features to compute. This list defines all the textural attributes proposed for performing the classification.
|
multiple_choice | DIRECTIONAL_COOCCURRENCE | ROTATION_INVARIANT_COOCCURRENCE | FIRST_ORDER_STATISTICS | HISTOGRAM_STATISTICS | INTENSITY | ||||||||||||
radius_range |
The minimum and maximum radius, in pixels, of the circular neighborhoods used for computing textural features. | vector2u32 | >=1 | [2, 14] | |||||||||||
radius_step |
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 | |||||||||||
cooc_radius |
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 | |||||||||||
cooc_texton_shape |
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 | ||||||||||||
cooc_texton_size |
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 \times \sqrt{2}$. |
uint32 | >=1 | 4 | |||||||||||
output_model |
The output texture classification model, newly created. | TextureClassificationModel | None |
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 \times \sqrt{2}$. |
UInt32 | >=1 | 4 | |||||||||||
outputModel |
The output texture classification model, newly created. | TextureClassificationModel | null |
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( ) ;
texture_classification_create_algo = imagedev.TextureClassificationCreate() texture_classification_create_algo.compute_mode = imagedev.TextureClassificationCreate.MODE_2D texture_classification_create_algo.number_of_classes = 2 texture_classification_create_algo.feature_group = 4 texture_classification_create_algo.radius_range = [15, 15] texture_classification_create_algo.radius_step = 1 texture_classification_create_algo.cooc_radius = 15 texture_classification_create_algo.cooc_texton_shape = imagedev.TextureClassificationCreate.SPHERE texture_classification_create_algo.cooc_texton_size = 5 texture_classification_create_algo.execute() print("computeMode: ", str(texture_classification_create_algo.output_model.compute_mode()))
TextureClassificationCreate textureClassificationCreateAlgo = new TextureClassificationCreate { computeMode = TextureClassificationCreate.ComputeMode.MODE_2D, numberOfClasses = 2, featureGroup = 4, radiusRange = new uint[]{15, 15}, radiusStep = 1, coocRadius = 15, coocTextonShape = TextureClassificationCreate.CoocTextonShape.SPHERE, coocTextonSize = 5 }; textureClassificationCreateAlgo.Execute(); Console.WriteLine( "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( ) ;
result = imagedev.texture_classification_create(imagedev.TextureClassificationCreate.MODE_2D, 2, 4, [15, 15], 1, 15, imagedev.TextureClassificationCreate.SPHERE, 5) print("computeMode: ", str(result.compute_mode()))
TextureClassificationModel result = Processing.TextureClassificationCreate( TextureClassificationCreate.ComputeMode.MODE_2D, 2, 4, new uint[]{15, 15}, 1, 15, TextureClassificationCreate.CoocTextonShape.SPHERE, 5 ); Console.WriteLine( "computeMode: " + result.computeMode( ) );