background_flatten — 3D surface_fit op

• Data kinds: image2d → image2d

• Call: import fullseye as fs; fs.ledger.background_flatten(image, degree=2) (implementation को सीधे call करना हो तो import match3d; match3d.background_flatten(image, degree=2), registry से लेना हो तो ops3d.get("background_flatten"))

उपयोग

image की low-order surface (असमान illumination) को fit करके घटाता है = shading correction। → flattened।

(H,W) image पर x = column, y = row के साथ fit_poly_surface(degree) (default 2nd order) fit करता है, और image − fit को float64 में लौटाता है। output का mean लगभग 0 होता है और इसमें negative मान होते हैं (display या threshold के लिए min घटाएँ या कोई constant जोड़ें)। foreground बड़ा हो तो fit भी foreground की ओर खिंचता है और foreground कट जाता है (foreground छोड़े गए points पर fit_poly_surface → eval_poly_surface से घटाना अधिक सुरक्षित है)। केवल grayscale 2-D (3-D विफल होता है)। NaN होने पर lstsq विफल होता है।

उपयोग: threshold से पहले preprocessing, polar_unwrap से खोली गई ring image का illumination correction।

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

• blas_threads_and_memory — Matrix decompositions धीमे क्यों हैं — BLAS threads, caches, memory layout

संदर्भ (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 के स्रोत।

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

• geometry_metrology — py -3.11 examples_3d/geometry_metrology.py

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

fuse_to_voxel · fit_poly_surface · eval_poly_surface · surface_form_error · polar_unwrap · fit_zernike · matcap_shade · antialias

इसी category के (surface_fit)

fit_poly_surface · eval_poly_surface · surface_form_error


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

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