xg_orientation — 2D xldgeom op

• Data kinds: contour → feature

• Call: fullseye.apply(img, "xg_orientation", a=0.5, b=0.5) (2-D model = एक image + दो scalar knobs a,b∈[0,1])

• HALCON समकक्ष: orientation_points_xld (अर्थ और parameters समझने के लिए HALCON reference उपयोगी है)

• GPU: नहीं (केवल CPU reference implementation)

xg_orientation: input → output

*Figure synthetic 128×128 input पर सच में चलाकर मिला output है। बाईं ओर input, दाईं ओर output। Point clouds ऊपर से देखे गए scatter के रूप में (brightness = z), 1-D series line के रूप में, volumes z दिशा में maximum-intensity projection के रूप में, videos बीच के frame के रूप में, complex images amplitude के रूप में, और जो return values चित्र नहीं बन सकते वे स्वयं values के रूप में दिखाए जाते हैं।*

*Knob a output नहीं बदलता (मापा गया: 0.1 / 0.5 / 0.9 पर एक जैसा)।*

*Knob b output नहीं बदलता (मापा गया: 0.1 / 0.5 / 0.9 पर एक जैसा)।*

Stages (पहले आने वाले ops → यह op, बाएँ से क्रम में):

▸ xg_orientation: stages का figure (docs site)

उपयोग

Principal axis की दिशा degrees में, [0,180) में मोड़ी गई और /180 से scale की गई।

> नीचे का विस्तृत विवरण मूल text में है — सारांश और headings का अनुवाद हो चुका है।

Angle is measured from the +x (column) axis; multiply the result by 180 to recover degrees. Line orientation is defined mod 180, so a line at theta and theta+180 map to the same value.

Direction (2026-11-03, stated explicitly): the angle is atan2(d_row, d_col) in image coordinates with rows pointing DOWN, i.e. it turns clockwise on screen. A line turned theta counter-clockwise on screen returns (180 - theta) / 180 (a line through (0, 0) and (10, 10) — down-right on screen — returns 0.25). This is the opposite sense to HALCON (orientation_points_xld / orientation_xld / orientation_region measure counter-clockwise on screen, "mathematically positive"); orientation_xld and orientation_region here follow HALCON, so xg_orientation = (1 - orientation_xld) mod 1 on the same contour.

Discontinuity (inherent, documented): a line orientation lives on a circle of 180 degrees, and this op unrolls it to [0, 1), so the wrap sits at HORIZONTAL — a line tilted +0.001 deg returns ~0.0 while -0.001 deg returns ~0.9999. Any single-scalar unrolling has a seam somewhere; callers that need continuity across horizontal should compare orientations on the doubled angle (cos 2*theta, sin 2*theta) or take the difference mod 1. The closing point of a closed contour is not double-counted in the PCA.

उपयोग की विस्तृत guide

• gallery2d_geometry family guide

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

Studio में आज़माएँ

नीचे का program सच में चलता है, यह जाँचा गया है (figure वाला ही input)। Studio की help में यह block buttons बन जाता है, जिनसे इसे वहीं load करके चलाया जा सकता है।

threshold 0.50 0.50
sk_find_contours 0.50 0.50
xg_orientation 0.50 0.50

▸ यह pipeline load करें  ·  Load करके चलाएँ

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• gallery2d_geometry — py -3.11 examples/gallery2d_geometry.py

वे अगले ops जिनसे type जुड़ता है (feature को input के रूप में लेते हैं)

identity · feature_to_img

इसी category के (xldgeom)

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


*Provenance: ops.py — 2D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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