annotate_table_layout — ANNOTATE paper op

• Data kinds: text → table

• Call: import fullseye as fs; fs.ledger.annotate_table_layout(text, xy, anchor='lt', font_size=13, font_path=None, pad=6, col_gap=None, row_gap=0, align='auto', header=False, bold=False, italic=False, line_spacing=1.15) (implementation को सीधे call करना हो तो import annotate; annotate.annotate_table_layout(text, xy, anchor='lt', font_size=13, font_path=None, pad=6, col_gap=None, row_gap=0, align='auto', header=False, bold=False, italic=False, line_spacing=1.15), registry से लेना हो तो opsannotate.get("annotate_table_layout"))

उपयोग

table (dict) लौटाता है: tab से अलग की गई string को table के रूप में रखने के लिए column और row की position।

rows \n पर और columns \t पर बाँटे जाते हैं। column width दिए गए size के असली font से 1 cell एक बार में मापी गई चौड़ाइयों का अधिकतम होती है -- अक्षरों की गिनती से जापानी और alphanumeric के बीच हमेशा अंतर आता है, इसलिए मापने के अलावा सही करने का कोई तरीका नहीं है।

Parameters

text : str

tab से अलग किया गया। सभी rows में columns की संख्या समान होनी चाहिए (अलग हो तो ValueError)।

xy : (x, y)

anchor जिस स्थिति को दर्शाता है (x=col, y=row)।

anchor : str

'lt','ct','rt','lm','cm','rm','lb','cb','rb' में से 9 विकल्प।

pad : int

table के अंदर का margin [px]।

col_gap : int or None

columns के बीच की दूरी [px]। None (default) होने पर row height ×0.6 को round किया जाता है, इसलिए

font size बदलने पर दूरी भी साथ बदलती है।

row_gap : int

rows के बीच जोड़ी जाने वाली दूरी [px] (0 हो तो सामान्य line pitch ही)।

align : str or sequence

TABLE_ALIGNS में से कोई, या हर column का क्रम। "auto"

(default) किसी column को तभी right-align करता है जब उसके सभी मान संख्या जैसे दिखें।

header=True हो तो header row इस जाँच से बाहर रहती है।

header : bool

true हो तो row 1 को header के रूप में bold करता है और उसके नीचे 1 line खींचता है।

bold, italic : bool or int

synthetic font style (_bold_px / _italic_tile)। header का

bold इससे अलग है और केवल header row पर लगता है।

Returns

dict

{"rect": (x,y,w,h), "ncols", "nrows", "col_w": [...], "col_x": [...], "row_y": [...], "row_h", "col_gap", "align": [...], "header", "rule_y": header line का y (header false हो तो None), "cells": [{"text","row","col","xy","width","bold"}]}।

col_x / row_y / cells[i]["xy"] सभी image coordinates में हैं।

Raises

ValueError

rows में columns की संख्या अलग / ख़ाली / अज्ञात align anchor /

align की लंबाई columns की संख्या से अलग।

Examples

>>> import annotate

>>> lay = annotate.annotate_table_layout("Name\tValue\nA\t1.5\nB\t22.25", (10, 10))

>>> lay["ncols"], lay["nrows"], lay["align"]

(2, 3, ['left', 'left'])

>>> lay2 = annotate.annotate_table_layout("Name\tValue\nA\t1.5\nB\t22.25", (10, 10),

... header=True)

>>> lay2["align"] # header हटाने पर column 2 में केवल संख्याएँ

['left', 'right']

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

• figure_annotation family guide

पृष्ठभूमि guides (इस op के पीछे की physics और conventions)

• dataset_conventions — Training dataset के conventions — COCO / YOLO / VOC और visual inspection में सावधानियाँ

संदर्भ (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 करते हैं)

• annotate_paper_tour — py -3.11 examples/annotate_paper_tour.py

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

—

इसी category के (paper)

annotate_leader_layout · annotate_leader · annotate_markers · annotate_legend · annotate_dimension_layout · annotate_dimension · annotate_angle_layout · annotate_angle


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

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