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

Per-channel normalization: pixel = (pixel - mean[c]) / std[c]. In-place, no backend needed (same shape in and out). More...

#include <image_transforms.hpp>

Inheritance diagram for pulsatrix::NormalizeTransform:
Collaboration diagram for pulsatrix::NormalizeTransform:

Public Member Functions

 NormalizeTransform (std::vector< float > mean, std::vector< float > std)
 
Sample apply (Sample sample) const override
 Applies this transform to a sample.
 
- Public Member Functions inherited from pulsatrix::Transform
virtual ~Transform ()=default
 

Detailed Description

Per-channel normalization: pixel = (pixel - mean[c]) / std[c]. In-place, no backend needed (same shape in and out).

Exceptions
std::invalid_argumentif mean/std size doesn't match the image's channel count.

Constructor & Destructor Documentation

◆ NormalizeTransform()

pulsatrix::NormalizeTransform::NormalizeTransform ( std::vector< float >  mean,
std::vector< float >  std 
)
inline

Member Function Documentation

◆ apply()

Sample pulsatrix::NormalizeTransform::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: