measure_subject_detail
Measure subject brightness, detail, and contrast in an image by analyzing luminance blocks, returning metrics like subject_brightness, detail_score, contrast_ratio, and background_median.
Instructions
Measure subject brightness, detail and contrast. The image is split into 32 px blocks; a block is subject when its luminance median is above median + 8 x 1.4826 x MAD. subject_brightness = median of subject block medians; background_median = median of the other block medians; contrast_ratio = subject_brightness / background_median (0 when that is at most 0.001); detail_score = mean Sobel energy of luminance over every 4th pixel of up to 50 subject blocks; subject_count = subject blocks; subject_threshold = median + 3 x 1.4826 x MAD. Returns JSON: subject_brightness, detail_score, contrast_ratio, subject_count, background_median, subject_threshold. luminance is 0.2126R + 0.7152G + 0.0722B.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view_id | Yes | View to measure |