Loading [MathJax]/jax/output/CommonHTML/jax.js
ImageDev

MomentsOfInertia3d

Computes the elements of the covariance matrix of a three-dimensional grayscale image.

Access to parameter description

For an introduction: This algorithm computes the variance-covariance matrix of the input image. It outputs an object containing the M2x, M2y, M2z, Mxy, Mxz and Myz elements of this matrix. This object also contains the orientations of the largest and smallest eigenvector of the covariance matrix.

See also

Function Syntax

This function returns the outputMeasurement output parameter.
// Function prototype.
MomentsOfInertia3dMsr::Ptr
momentsOfInertia3d( std::shared_ptr< iolink::ImageView > inputImage, MomentsOfInertia3dMsr::Ptr outputMeasurement = NULL );

Class Syntax

Parameters

Class Name MomentsOfInertia3d

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input grayscale image. Image Binary, Label or Grayscale nullptr
output
outputMeasurement
The output measurement result. MomentsOfInertia3dMsr nullptr

Object Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

MomentsOfInertia3d momentsOfInertia3dAlgo;
momentsOfInertia3dAlgo.setInputImage( foam );
momentsOfInertia3dAlgo.execute();

std::cout << "momentXX: " << momentsOfInertia3dAlgo.outputMeasurement()->momentXX( ) ;

Function Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

auto result = momentsOfInertia3d( foam );

std::cout << "momentXX: " << result->momentXX( ) ;