PANDORE Version 6 GREYC-IMAGE

pellipsoidalapproximation



Performs ellipsoidal approximation of closed contour.



Synopsis

pellipsoidalapproximation mode [-m mask] [im_in|-] [im_out|-]

Description

pellipsoidalapproximation approximates a given set of points by an ellipsoid. The points are non null pixels relying on a null background.

The parameter mode specifies whether the approximation is done on all points so the result is only one ellipsoid, or on each contours so the result is as many ellipsoids as there are contours. A contour is a chain of connected non null pixels.

The output image im_out contains a set of points that define one or several ellipsoids.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Approximates each tangram piece by an ellipsoid:

   psobel tangram.pan b.pan
   pbinarization 45 1e30 b.pan c.pan
   pskeletonization c.pan d.pan 
   ppostthinning d.pan e.pan
   pclosedcontourselection 1 50 e.pan f.pan
   pellipsoidalapproximation 1 f.pan out.pan

See also

Contour

C++ prototype

Errc PEllipsoidalApproximation( const Img2duc &im_in, Img2duc &im_out, int mode );

Version française

Approximation ellipsoïdale d'un ensemble de points ou des contours d'une image.


Author: Julien Robiaille