ImageDev

CurvatureIntegrals3d

Computes the integral of mean curvature and integral of total curvature of objects in a three-dimensional binary image.

Access to parameter description

For an introduction: section Image Analysis.

Intuitively, "curvature" is the amount by which a geometric object deviates from being "flat".

This algorithm computes a local measure. It is obtained as the sum of measurements in local 2x2x2 neighborhoods (a cube), for 13 planes associated with different normal directions and hitting three or four vertices of the cells (in the cubical lattice).

In the case of very elongated objects (needles or fibers), the integral of mean curvature $M$ can be used to measure the length $L$ of the object: $L=M/\pi$

For a convex object, the integral of mean curvature $M$ is (up to a constant) equivalent to the mean diameter; for instance, $$ M=2\pi d ~~\mbox{, where} ~~ d=\frac{1}{13} \sum_{i=0}^{13} d_i $$ The Euler number and the Integral of total curvature carry the same information about the object. They differ by the constant factor $4\pi$. Considering a set $X$ of the 3-dimensional space and $\chi(X)$ being its Euler number, then the integral total curvature of $X$ is $K(X)=4\pi \chi(X)$.

Reference See also

Function Syntax

This function returns outputMeasurement.
// Function prototype
CurvatureIntegralsMsr::Ptr curvatureIntegrals3d( std::shared_ptr< iolink::ImageView > inputBinaryImage, CurvatureIntegralsMsr::Ptr outputMeasurement = nullptr );
This function returns outputMeasurement.
// Function prototype.
curvature_integrals_3d(input_binary_image: idt.ImageType,
                       output_measurement: Union[Any, None] = None) -> CurvatureIntegralsMsr
This function returns outputMeasurement.
// Function prototype.
public static CurvatureIntegralsMsr
CurvatureIntegrals3d( IOLink.ImageView inputBinaryImage, CurvatureIntegralsMsr outputMeasurement = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputBinaryImage
The 3D binary input image. Image Binary nullptr
output
outputMeasurement
The output measurement result. CurvatureIntegralsMsr nullptr
Parameter Name Description Type Supported Values Default Value
input
input_binary_image
The 3D binary input image. image Binary None
output
output_measurement
The output measurement result. CurvatureIntegralsMsr None
Parameter Name Description Type Supported Values Default Value
input
inputBinaryImage
The 3D binary input image. Image Binary null
output
outputMeasurement
The output measurement result. CurvatureIntegralsMsr null

Object Examples

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

CurvatureIntegrals3d curvatureIntegrals3dAlgo;
curvatureIntegrals3dAlgo.setInputBinaryImage( foam_sep );
curvatureIntegrals3dAlgo.execute();

std::cout << "meanCurvature: " << curvatureIntegrals3dAlgo.outputMeasurement()->meanCurvature( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip"))

curvature_integrals_3d_algo = imagedev.CurvatureIntegrals3d()
curvature_integrals_3d_algo.input_binary_image = foam_sep
curvature_integrals_3d_algo.execute()

print("meanCurvature: ", str(curvature_integrals_3d_algo.output_measurement.mean_curvature()))
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );

CurvatureIntegrals3d curvatureIntegrals3dAlgo = new CurvatureIntegrals3d
{
    inputBinaryImage = foam_sep
};
curvatureIntegrals3dAlgo.Execute();

Console.WriteLine( "meanCurvature: " + curvatureIntegrals3dAlgo.outputMeasurement.meanCurvature( ) );

Function Examples

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

auto result = curvatureIntegrals3d( foam_sep );

std::cout << "meanCurvature: " << result->meanCurvature( ) ;
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip"))

result = imagedev.curvature_integrals_3d(foam_sep)

print("meanCurvature: ", str(result.mean_curvature()))
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );

CurvatureIntegralsMsr result = Processing.CurvatureIntegrals3d( foam_sep );

Console.WriteLine(  "meanCurvature: " + result.meanCurvature( )  );