Turi Create  4.0
turi::neural_net::PortableImage Class Reference

#include <ml/neural_net/PortableImage.hpp>

Public Member Functions

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

Detailed Description

Concrete implementation of the Image interface that wraps the portable image_type class.

Definition at line 18 of file PortableImage.hpp.

Member Function Documentation

◆ Size()

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

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()

void turi::neural_net::PortableImage::WriteCHW ( Span< float >  buffer) const
overridevirtual

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

Implements turi::neural_net::Image.

◆ WriteHWC()

void turi::neural_net::PortableImage::WriteHWC ( Span< float >  buffer) const
overridevirtual

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

Implements turi::neural_net::Image.


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