class dlstreamer::Transform#

Overview#

Abstract interface for transform elements. Transform element has one input and one output. Transform element is responsible for allocating output frame/tensor. More…

#include <transform.h>

class Transform: public dlstreamer::Element {
public:
    // methods

    virtual void set_input_info(const FrameInfo& info) = 0;
    virtual void set_output_info(const FrameInfo& info) = 0;
    virtual FrameInfoVector get_input_info() = 0;
    virtual FrameInfoVector get_output_info() = 0;
    virtual bool process(TensorPtr src, TensorPtr dst) = 0;
    virtual bool process(FramePtr src, FramePtr dst) = 0;
    virtual TensorPtr process(TensorPtr src) = 0;
    virtual FramePtr process(FramePtr src) = 0;
};

// direct descendants

template <class T>
class BaseElement;

Inherited Members#

public:
    // methods

    virtual bool init() = 0;
    virtual ContextPtr get_context(MemoryType memory_type) = 0;

Detailed Documentation#

Abstract interface for transform elements. Transform element has one input and one output. Transform element is responsible for allocating output frame/tensor.

Methods#

virtual void set_input_info(const FrameInfo& info) = 0

The function notifies element about input information. Subsequent call to get_output_info() should take into consideration input information passed via this function.

Parameters:

info

Input frames information

virtual void set_output_info(const FrameInfo& info) = 0

The function notifies element about output information. Subsequent call to get_input_info() should take into consideration output information passed via this function.

Parameters:

info

Output frames information

virtual FrameInfoVector get_input_info() = 0

Returns input information supported by element. It may depend on output information previously set by set_output_info().

virtual FrameInfoVector get_output_info() = 0

Returns output information supported by element. It may depend on input information previously set by set_input_info().

virtual bool process(TensorPtr src, TensorPtr dst) = 0

Run processing on input and output tensors.

Parameters:

src

Input tensor

dst

Output tensor

virtual bool process(FramePtr src, FramePtr dst) = 0

Run processing on input and output frames.

Parameters:

src

Input frame

dst

Output frame

virtual TensorPtr process(TensorPtr src) = 0

Process input tensor and return output tensor.

Parameters:

src

Input frame

dst

Output frame

virtual FramePtr process(FramePtr src) = 0

Process input frame and return output frame.

Parameters:

src

Input frame

dst

Output frame