pulsatrix
Loading...
Searching...
No Matches
pulsatrix::CenterCropTransform Class Reference

Crops the centered (crop_height, crop_width) region of the image. More...

#include <image_transforms.hpp>

Inheritance diagram for pulsatrix::CenterCropTransform:
Collaboration diagram for pulsatrix::CenterCropTransform:

Public Member Functions

 CenterCropTransform (int64_t crop_height, int64_t crop_width, DeviceBackend *backend)
 
Sample apply (Sample sample) const override
 Applies this transform to a sample.
 
- Public Member Functions inherited from pulsatrix::Transform
virtual ~Transform ()=default
 

Detailed Description

Crops the centered (crop_height, crop_width) region of the image.

Exceptions
std::invalid_argumentif the crop size exceeds the image's actual size – external boundary: crop dimensions are caller-supplied configuration.

Constructor & Destructor Documentation

◆ CenterCropTransform()

pulsatrix::CenterCropTransform::CenterCropTransform ( int64_t  crop_height,
int64_t  crop_width,
DeviceBackend *  backend 
)
inline

Member Function Documentation

◆ apply()

Sample pulsatrix::CenterCropTransform::apply ( Sample  sample) const
overridevirtual

Applies this transform to a sample.

Parameters
sampleInput sample.
Returns
The transformed sample.

Implements pulsatrix::Transform.


The documentation for this class was generated from the following file: