Fawkes API  Fawkes Development Version
firevision::ImageDisplay Class Reference

Simple image display. More...

#include <>>

Public Member Functions

 ImageDisplay (unsigned int width, unsigned int height, const char *title=0)
 Constructor. More...
 
 ~ImageDisplay ()
 Destructor. More...
 
void show (colorspace_t colorspace, unsigned char *buffer)
 Show image from given colorspace. More...
 
void show (unsigned char *yuv422_planar_buffer)
 Show image from YUV422_PLANAR colorspace. More...
 
void process_events (unsigned int max_num_events=10)
 Process a few SDL events. More...
 
void loop_until_quit ()
 Process SDL events until quit. More...
 

Detailed Description

Simple image display.

This is a simple thin wrapper around the SDL to display images in a standalone window. Use this for instance for easy verification of vision results.

Author
Tim Niemueller

Definition at line 38 of file image_display.h.

Constructor & Destructor Documentation

◆ ImageDisplay()

firevision::ImageDisplay::ImageDisplay ( unsigned int  width,
unsigned int  height,
const char *  title = 0 
)

Constructor.

Parameters
widthwidth of image
heightheight of image
titlewindow title

Definition at line 52 of file image_display.cpp.

◆ ~ImageDisplay()

firevision::ImageDisplay::~ImageDisplay ( )

Destructor.

Definition at line 83 of file image_display.cpp.

Member Function Documentation

◆ loop_until_quit()

void firevision::ImageDisplay::loop_until_quit ( )

Process SDL events until quit.

Process SDL events and keeps the window responsive until either the key "q" or "Esc" are pressed.

Definition at line 142 of file image_display.cpp.

◆ process_events()

void firevision::ImageDisplay::process_events ( unsigned int  max_num_events = 10)

Process a few SDL events.

Parameters
max_num_eventsmaximum number of events to process.

Definition at line 127 of file image_display.cpp.

◆ show() [1/2]

void firevision::ImageDisplay::show ( colorspace_t  colorspace,
unsigned char *  buffer 
)

Show image from given colorspace.

Parameters
colorspacecolorspace of the supplied buffer
bufferimage buffer

Definition at line 99 of file image_display.cpp.

Referenced by YUVSpaceDemo::get_brightness().

◆ show() [2/2]

void firevision::ImageDisplay::show ( unsigned char *  yuv422_planar_buffer)

Show image from YUV422_PLANAR colorspace.

Parameters
yuv422_planar_bufferYUV422_PLANAR encoded image.

Definition at line 112 of file image_display.cpp.


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