measure_clipped_blocks
Count image blocks with pixels above a specified level. Tiles the image into blocks, samples pixels, and returns over-threshold block counts and locations to identify clipped regions.
Instructions
Count image blocks with pixels above a level. Tiles the image in block_size px blocks and samples every 3rd pixel; a sample counts when its luminance or any channel is above level, and a block counts when more than block_fraction of its samples do. Returns JSON: blocks_over, total_blocks, locations (up to 10 counted blocks in descending fraction order: x, y, fraction). luminance is 0.2126R + 0.7152G + 0.0722B.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"view_id": "<view_id>",
"level": "<level>",
"block_fraction": "<block_fraction>"
},
"name": "measure_clipped_blocks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | Yes | Pixel level; a sample whose luminance or any channel is above it counts | |
| view_id | Yes | View to measure | |
| block_size | No | Block edge in pixels (default 50) | |
| block_fraction | Yes | Fraction of a block's samples (0-1) that must be above level for the block to count |