Turi Create  4.0
turi::neural_net::Image Class Referenceabstract

Abstract interface for images that a training pipeline can consume. More...

#include <ml/neural_net/Image.hpp>

Public Member Functions

virtual size_t Height () const =0
 The number of rows of pixels.
 
virtual size_t Width () const =0
 The number of columns of pixels.
 
size_t Size () const
 
virtual void WriteCHW (Span< float > buffer) const =0
 
virtual void WriteHWC (Span< float > buffer) const =0
 

Detailed Description

Abstract interface for images that a training pipeline can consume.

Definition at line 19 of file Image.hpp.

Member Function Documentation

◆ Size()

size_t turi::neural_net::Image::Size ( ) const
inline

The size (in elements) of a float buffer large enough to contain this image. At present, all images are assumed RGB.

Definition at line 33 of file Image.hpp.

◆ WriteCHW()

virtual void turi::neural_net::Image::WriteCHW ( Span< float >  buffer) const
pure virtual

Writes the image in CHW order to the provided span or throws if the span does not have the expected size.

Implemented in turi::neural_net::CoreImageImage, and turi::neural_net::PortableImage.

◆ WriteHWC()

virtual void turi::neural_net::Image::WriteHWC ( Span< float >  buffer) const
pure virtual

Writes the image in HWC order to the provided span or throws if the span does not have the expected size.

Implemented in turi::neural_net::CoreImageImage, and turi::neural_net::PortableImage.


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