SDK UI Pipeline

For a basic usage guide, refer to Pipeline.

class Metavision::FrameDisplayStage : public Metavision::BaseStage

Stage that displays the input frame in a window.

The window is refreshed every time a new frame is received.

Public Functions

FrameDisplayStage(const std::string &title, int width, int height, Window::RenderMode mode = Window::RenderMode::BGR, bool auto_exit = true)

Constructs a new frame display stage.

Parameters
  • title: Window’s title

  • width: Window’s initial width

  • height: Window’s initial height

  • mode: Window’s rendering mode (i.e. either BGR or GRAY). Cannot be changed afterwards

  • auto_exit: Flag indicating if the application automatically closes if the user presses ‘Q’ or ‘ESCAPE’

FrameDisplayStage(BaseStage &prev_stage, const std::string &title, int width, int height, Window::RenderMode mode = Window::RenderMode::BGR, bool auto_exit = true)

Constructs a new frame display stage given an explicit previous stage.

Parameters
  • prev_stage: Stage producing the input image for this display stage

  • title: Window’s title

  • width: Window’s initial width

  • height: Window’s initial height

  • mode: Window’s rendering mode (i.e. either BGR or GRAY). Cannot be changed afterwards

  • auto_exit: Flag indicating if the application automatically closes if the user presses ‘Q’ or ‘ESCAPE’

void set_key_callback(const Window::KeyCallback &cb)

Sets a callback that is called when the user presses a key.

Note

The callback is only called when the window has the focus

Parameters
  • cb: The callback to call