Skip to content

Percentile Clip Sync Task

The Percentile Clip sync task clamps a 3D float tensor on the GPU to the value range defined by two percentiles estimated inside an elliptical region of interest (ROI). Every element of the input tensor is clipped to the closed interval [p_min, p_max], where p_min and p_max are the selected percentile values`.

Note

The ROI is an ellipse expressed in normalized image coordinates: cx/cy give the center in [0, 1], rx/ry the radii in [0, 1], and angle the rotation in degrees.

Warning

If the ROI does not cover any pixels, execution fails with No pixels in ROI. Ensure your ROI parameters select at least one sample.

Inputs

This task expects a single input tensor of shape (B, H, W):

  • B: number of frames
  • H: height
  • W: width

The dtype must be float32 and the tensor must reside in device memory.

Outputs

This task emits one output tensor with the same shape (B, H, W), dtype float32, and device memory location as the input. Values are the clipped version of the input tensor.

Inplace

This task does not support inplace operation.

Ownership

This task does not own any inputs or outputs.


Settings

Example:

{
    "min_pct": 0.5,
    "max_pct": 99.5,
    "roi": {
        "cx": 0.5,
        "cy": 0.5,
        "rx": 0.45,
        "ry": 0.45,
        "angle": 0.0
    }
}
Property Pattern Type Deprecated Definition Title/Description
+ min_pct No number No - Lower percentile (0-100) used to clip values. Must satisfy:
- min_pct >= 0
- min_pct < max_pct
+ max_pct No number No - Upper percentile (0-100) used to clip values. Must satisfy:
- max_pct <= 100
- max_pct > min_pct
+ roi No object No - Elliptical region of interest expressed in normalized coordinates. Must satisfy:
- 0 <= cx <= 1
- 0 <= cy <= 1
- 0 < rx <= 1
- 0 < ry <= 1