swt_map — TEXT stroke op

• Data kinds: image2d → table

• Call: import fullseye as fs; fs.ledger.swt_map(img, dark_on_light: 'bool' = True, sigma: 'float' = 1.0, max_width: 'int' = 64, angle_tol: 'float' = 0.5235987755982988) (implementation को सीधे call करना हो तो import textregion; textregion.swt_map(img, dark_on_light: 'bool' = True, sigma: 'float' = 1.0, max_width: 'int' = 64, angle_tol: 'float' = 0.5235987755982988), registry से लेना हो तो opstext.get("swt_map"))

उपयोग

Stroke Width Transform —— हर pixel पर उस stroke की चौड़ाई लिखता है जिसमें वह pixel है।

अक्षर की ओर के boundary pixel से gradient की दिशा में अक्षर के भीतर ray भेजी जाती है, और सामने वाले boundary pixel (gradient लगभग उलटी दिशा में) से टकराने पर ray के सभी pixel में width (boundary pixel के केंद्रों की दूरी + 1) लिखी जाती है (पहले से छोटा मान हो तो छोटा वाला)। Epshtein 2010 §3 की प्रक्रिया के अनुसार 2nd pass में ray पर median से बड़े मानों को median से बदल दिया जाता है (कोनों पर अधिक मान को दबाने के लिए)। edge की परंपरा _edges_and_gradient में लिखी है (rectangular stroke में width बिल्कुल integer होती है)।

लौटाता है dict: swt (width का array, stroke के बाहर 0) / edges / n_rays / n_hits (सामने वाले edge से टकराई ray की संख्या)।

संदर्भ (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 में दिए गए हैं।

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

• poc_text_region_truth — py -3.11 examples/poc_text_region_truth.py

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

text_lines

इसी category के (stroke)

—


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

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