xg_eccentricity — 2D xldgeom op

• Data kinds: contour → feature

• Call: fullseye.apply(img, "xg_eccentricity", a=0.5, b=0.5) (the 2-D model is one image plus two scalar knobs a,b∈[0,1])

• HALCON equivalent: eccentricity_points_xld (the HALCON reference is a useful guide to its meaning and parameters)

xg_eccentricity: input → output

*The figure is the actual output on a synthetic 128×128 input. Left: input, right: output. Point clouds are drawn as a top-down scatter (brightness = z), 1-D series as a line plot, volumes as the maximum-intensity projection along z, videos as the middle frame, complex images as magnitude; return values that are not pictures are shown as the values themselves.*

*Knob a does not change the output (measured: identical at 0.1 / 0.5 / 0.9).*

*Knob b does not change the output (measured: identical at 0.1 / 0.5 / 0.9).*

Stages (the ops that come before → this op, left to right):

▸ xg_eccentricity: stages (docs site)

Usage

Eccentricity sqrt(1 - lambda_min/lambda_max) from the point covariance.

Merges the points of all contours in the contour dict {"shape", "cs"} into 1 point set and, from the eigenvalues λ_min <= λ_max of the population covariance matrix of their (row, col) coordinates, returns the eccentricity e = sqrt(1 - λ_min/λ_max). The duplicated end point of a closed contour (same as the first point) is not counted. a, b are unused.

Returns a numpy.float64 in [0, 1]. 0 for isotropic point layouts such as a perfect circle or square, 1 for points on a straight line (λ_min = 0). If there are fewer than 2 points, or λ_max <= 1e-12 (all points identical), 0.0. With several contours it is the eccentricity of their combined distribution, so the spread of their arrangement is mixed in, not just the shape of each contour (to evaluate per contour, first narrow down to 1 contour with select_contours_xld or similar). It differs from area-based measures in that it depends on the density of contour points (densely sampled parts weigh more). The axis ratio itself is xg_elliptic_axis; the orientation of the principal axis is xg_orientation.

Detailed usage guide

• gallery2d_geometry family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Try it in Studio

The program below has been verified to run (same input as the figure). In Studio's help this block becomes buttons that load and run it on the spot.

threshold 0.50 0.50
sk_find_contours 0.50 0.50
xg_eccentricity 0.50 0.50

▸ Load this pipeline  ·  Load & run

Runnable examples (verified samples that actually call this op)

• gallery2d_geometry — py -3.11 examples/gallery2d_geometry.py

Ops the type connects to (they accept feature as input)

identity · feature_to_img

Same category (xldgeom)

xg_moments · xg_area_center · xg_orientation · xg_elliptic_axis · xg_height_width_ratio · xg_regress_contours · xg_clip_contours · xg_gen_polygons


*Provenance: ops.py — 2D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.