measure_sharpness
Assess image sharpness by computing the mean Sobel gradient energy of luminance in a custom region or the central half, returning a numeric score.
Instructions
Measure sharpness as the mean Sobel gradient energy (gx² + gy²) of luminance over every 4th pixel of a region. The region is roi_x/roi_y/roi_w/roi_h when all four are given (it must lie inside the image), else the central half of the image in each dimension. Returns JSON: sharpness, samples, roi {x, y, w, h}. luminance is 0.2126R + 0.7152G + 0.0722B.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| roi_h | No | Region height in pixels | |
| roi_w | No | Region width in pixels | |
| roi_x | No | Region left edge in pixels (all four ROI values together, or none: the central half) | |
| roi_y | No | Region top edge in pixels | |
| view_id | Yes | View to measure |