stretch_stars
Stretch a linear star image by subtracting background median and applying repeated midtones adjustments to enhance visibility. Reports pedestal, final median, maximum, and high_fraction.
Instructions
Stretch a linear star image in place with a pedestal subtraction and a repeated midtones transfer function. When the image median is above 1e-5 it is subtracted as a pedestal and the rest rescaled, max(0, (x − median)/(1 − median)); then the midtones transfer function MTF(m, x) = (1 − m)·x / ((1 − 2m)·x + m) is applied iterations times with m = midtone. Results are truncated to [0,1]. The result reports the pedestal, the final median and maximum, and high_fraction: among pixels sampled every 16 pixels whose value (the channel maximum) exceeds 0.005 before the stretch, the fraction above 0.5.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| midtone | Yes | MTF midtones balance m, strictly between 0 and 1 (m < 0.5 brightens) | |
| view_id | Yes | Star image view ID | |
| iterations | Yes | Number of times the MTF is applied (>= 1) |