class
CenterCrop
extends
_NoParamsGeometricTransform[Empty]CenterCrop(height: int, width: int, p: float = 1.0)Crop a centred height x width window (Albumentations CenterCrop).
Computes a deterministic crop centred on the input — top-left at
((H - height) // 2, (W - width) // 2) — and applies the same
offsets to mask / boxes / keypoints so every target stays aligned.
Parameters
heightintTarget crop height in pixels.
widthintTarget crop width in pixels.
pfloat= 1.0Probability of applying the transform.