API

namespace OpenCVGUI

Summary

Classes Descriptions
class OpenCVGUI::OGUI3D  
class OpenCVGUI::OGUI3DCamera  
class OpenCVGUI::OGUIArea  
class OpenCVGUI::OGUIButton  
class OpenCVGUI::OGUICheckBox  
class OpenCVGUI::OGUICVWindow  
class OpenCVGUI::OGUIFile  
class OpenCVGUI::OGUIFileBrowser  
class OpenCVGUI::OGUIFormArea  
class OpenCVGUI::OGUIImage  
class OpenCVGUI::OGUIImageArea  
class OpenCVGUI::OGUILayout  
class OpenCVGUI::OGUIPlotArea  
class OpenCVGUI::OGUIRadioButtons  
class OpenCVGUI::OGUISlider  
class OpenCVGUI::OGUITextInput  
class OpenCVGUI::OGUITitle  
class OpenCVGUI::OGUIWidget  
class OpenCVGUI::OGUIWindow  
Members Descriptions
public OGUICVWindow * namedWindow(const char * title,int width,int height)  
public void app_run(std::function< void()> process_function)  
public int init()  

Members

namedWindow

public OGUICVWindow * namedWindow(const char * title,int width,int height)

Create new Computer Vision Template Window with lateral form and stacked areas

Parameters

Returns

{OGUICVWindow*} OGUICVWindow created

app_run

public void app_run(std::function< void()> process_function)

Start main loop of UI and processing stuff as new thread.

Parameters

init

public int init()

class OpenCVGUI::OGUI3D

class OpenCVGUI::OGUI3D
  : public OpenCVGUI::OGUIArea

Summary

Members Descriptions
public GLuint vao  
public GLuint vbo  
public GLuint ibo  
public GLuint shaderProgram  
public GLuint MatrixID  
public GLuint position_attribute  
public glm::mat4 MVP  
public Mat data  
public int dataLength  
public int dataLengthIBO  
public OGUI3DCamera camera  
public int lastMouseX  
public int lastMouseY  
public bool isBufferCreated  
public virtual void draw(int x,int y,int width,int height)  
public virtual void draw3d(int x,int y,int width,int height)  
public virtual void updateScrollStatus(double xoffset,double yoffset)  
public void replot(void * data)  
public OGUI3D(OGUIWindow * window,std::string title,void * data)  
public void CreateVertexBuffer()  

Members

vao

public GLuint vao

vbo

public GLuint vbo

ibo

public GLuint ibo

shaderProgram

public GLuint shaderProgram

MatrixID

public GLuint MatrixID

position_attribute

public GLuint position_attribute

MVP

public glm::mat4 MVP

data

public Mat data

dataLength

public int dataLength

dataLengthIBO

public int dataLengthIBO

camera

public OGUI3DCamera camera

lastMouseX

public int lastMouseX

lastMouseY

public int lastMouseY

isBufferCreated

public bool isBufferCreated

draw

public virtual void draw(int x,int y,int width,int height)

draw3d

public virtual void draw3d(int x,int y,int width,int height)

updateScrollStatus

public virtual void updateScrollStatus(double xoffset,double yoffset)

replot

public void replot(void * data)

OGUI3D

public OGUI3D(OGUIWindow * window,std::string title,void * data)

CreateVertexBuffer

public void CreateVertexBuffer()

class OpenCVGUI::OGUI3DCamera

Summary

Members Descriptions
public glm::mat4 Projection  
public glm::mat4 View  
public glm::mat4 Model  
public glm::mat4 MVP  
public float x  
public float y  
public float z  
public float phi  
public float theta  
public float radius  
public OGUI3DCamera()  
public glm::mat4 mouseEvent(int dx,int dy)  
public glm::mat4 getMVP()  
public glm::mat4 setRadius(float r)  

Members

Projection

public glm::mat4 Projection

View

public glm::mat4 View

Model

public glm::mat4 Model

MVP

public glm::mat4 MVP

x

public float x

y

public float y

z

public float z

phi

public float phi

theta

public float theta

radius

public float radius

OGUI3DCamera

public OGUI3DCamera()

mouseEvent

public glm::mat4 mouseEvent(int dx,int dy)

getMVP

public glm::mat4 getMVP()

setRadius

public glm::mat4 setRadius(float r)

class OpenCVGUI::OGUIArea

Summary

Members Descriptions
public int x  
public int y  
public int width  
public int height  
public int r  
public int g  
public int b  
public std::string title  
public int type  
public bool isMaximized  
public bool _show_title_bar  
public OGUIWindow * window  
public OGUILayout * layout  
public OGUIArea(OGUIWindow * window)  
public virtual void draw(int x,int y,int width,int height)  
public virtual void draw3d(int x,int y,int width,int height)  
public virtual void updateScrollStatus(double xoffset,double yoffset)  
public void drawTitle()  
public bool isMouseIn()  

Members

x

public int x

y

public int y

width

public int width

height

public int height

r

public int r

g

public int g

b

public int b

title

public std::string title

type

public int type

isMaximized

public bool isMaximized

_show_title_bar

public bool _show_title_bar

window

public OGUIWindow * window

layout

public OGUILayout * layout

-type OGUILayout

OGUIArea

public OGUIArea(OGUIWindow * window)

draw

public virtual void draw(int x,int y,int width,int height)

draw3d

public virtual void draw3d(int x,int y,int width,int height)

updateScrollStatus

public virtual void updateScrollStatus(double xoffset,double yoffset)

drawTitle

public void drawTitle()

isMouseIn

public bool isMouseIn()

class OpenCVGUI::OGUIButton

class OpenCVGUI::OGUIButton
  : public OpenCVGUI::OGUIWidget

Summary

Members Descriptions
public virtual void draw(int x,int y,int width)  
public OGUIButton(const char * title)  
public void setCallBack(std::function< void()> func)  
public void changeTitle(const char * title)  

Members

draw

public virtual void draw(int x,int y,int width)

OGUIButton

public OGUIButton(const char * title)

setCallBack

public void setCallBack(std::function< void()> func)

changeTitle

public void changeTitle(const char * title)

class OpenCVGUI::OGUICheckBox

class OpenCVGUI::OGUICheckBox
  : public OpenCVGUI::OGUIWidget

Summary

Members Descriptions
public virtual void draw()  
public OGUICheckBox()  

Members

draw

public virtual void draw()

OGUICheckBox

public OGUICheckBox()

class OpenCVGUI::OGUICVWindow

class OpenCVGUI::OGUICVWindow
  : public OpenCVGUI::OGUIWindow

Comptuer Vision template window

Summary

Members Descriptions
public std::vector< OGUIArea * > areas_showing  
public std::vector< OGUILayout * > layout  
public OGUIFormArea * formArea  
public OGUICVWindow(int width,int height,const char * title,int layoutOrientation) Create new Computer Vision Template Window with lateral form and stacked areas.
public void imshow(string area_title,void * img)  
public bool setImShowMouseClickCallBack(string area_title,std::function< void(int, int)> func)  
public OGUIArea * findAreaByTitle(string title)  
public void addFormWidget(OGUIWidget * widget)  
public void plot3D(string area_title,void * data)  
public void plot2D(string area_title,void * data,std::vector< string > labels,float xstep,int plot_type)  

Members

areas_showing

public std::vector< OGUIArea * > areas_showing

layout

public std::vector< OGUILayout * > layout

formArea

public OGUIFormArea * formArea

OGUICVWindow

public OGUICVWindow(int width,int height,const char * title,int layoutOrientation)

Create new Computer Vision Template Window with lateral form and stacked areas.

This class allow create easy computer vision purposes windows where each new area created is stacked. There are similar functions than OpenCV to show images (imshow) and more missing areas for plotting and forms.

Parameters

Returns

{OGUICVWindow*} OGUICVWindow created

imshow

public void imshow(string area_title,void * img)

Add new image to window with title

Parameters

setImShowMouseClickCallBack

public bool setImShowMouseClickCallBack(string area_title,std::function< void(int, int)> func)

Add callback for mouse interaction to specific image area

Parameters

Returns

{bool} true if setup correctly

findAreaByTitle

public OGUIArea * findAreaByTitle(string title)

Find an area by a specific title

Parameters

Returns

{OGUIArea*} pointer to area that is found. Null in other case

addFormWidget

public void addFormWidget(OGUIWidget * widget)

plot3D

public void plot3D(string area_title,void * data)

plot2D

public void plot2D(string area_title,void * data,std::vector< string > labels,float xstep,int plot_type)

class OpenCVGUI::OGUIFile

Summary

Members Descriptions
public string _file_name  
public string _path  
public string _ext  
public int _is_dir  
public double _size  
public void * _window  
public OGUIFile(void * window,const char * file_name,const char * path,int isdir,const char * ext,double size)  
public bool draw(void * vvg,int x,int y,int mouse_x,int mouse_y)  
public bool isImage()  
public unsigned char * getPreview()  

Members

_file_name

public string _file_name

_path

public string _path

_ext

public string _ext

_is_dir

public int _is_dir

_size

public double _size

_window

public void * _window

OGUIFile

public OGUIFile(void * window,const char * file_name,const char * path,int isdir,const char * ext,double size)

draw

public bool draw(void * vvg,int x,int y,int mouse_x,int mouse_y)

isImage

public bool isImage()

getPreview

public unsigned char * getPreview()

class OpenCVGUI::OGUIFileBrowser

Summary

Members Descriptions
public OGUIFileBrowser(OGUIWindow * window)  
public string open(string path,std::vector< string > filter)  
public void draw()  

Members

OGUIFileBrowser

public OGUIFileBrowser(OGUIWindow * window)

open

public string open(string path,std::vector< string > filter)

draw

public void draw()

class OpenCVGUI::OGUIFormArea

class OpenCVGUI::OGUIFormArea
  : public OpenCVGUI::OGUIArea

Summary

Members Descriptions
public std::vector< OGUIWidget * > widgets  
public virtual void draw(int x,int y,int width,int height)  
public OGUIFormArea(OGUIWindow * window)  
public void addWidget(OGUIWidget * widget)  

Members

widgets

public std::vector< OGUIWidget * > widgets

-type OGUIWidget

draw

public virtual void draw(int x,int y,int width,int height)

OGUIFormArea

public OGUIFormArea(OGUIWindow * window)

addWidget

public void addWidget(OGUIWidget * widget)

class OpenCVGUI::OGUIImage

class OpenCVGUI::OGUIImage
  : public OpenCVGUI::OGUIWidget

Summary

Members Descriptions
public virtual void draw()  
public OGUIImage()  

Members

draw

public virtual void draw()

OGUIImage

public OGUIImage()

class OpenCVGUI::OGUIImageArea

class OpenCVGUI::OGUIImageArea
  : public OpenCVGUI::OGUIArea

Summary

Members Descriptions
public virtual void draw(int x,int y,int width,int height)  
public virtual void updateScrollStatus(double xoffset,double yoffset)  
public OGUIImageArea(OGUIWindow * window,string title)  
public void setImage(Mat * img)  
public void setMouseClickCallBack(std::function< void(int, int)> func)  
public void calcHistogram()  

Members

draw

public virtual void draw(int x,int y,int width,int height)

updateScrollStatus

public virtual void updateScrollStatus(double xoffset,double yoffset)

OGUIImageArea

public OGUIImageArea(OGUIWindow * window,string title)

setImage

public void setImage(Mat * img)

setMouseClickCallBack

public void setMouseClickCallBack(std::function< void(int, int)> func)

calcHistogram

public void calcHistogram()

class OpenCVGUI::OGUILayout

class OpenCVGUI::OGUILayout
  : public OpenCVGUI::OGUIArea

Summary

Members Descriptions
public std::vector< OGUIArea * > areas  
public virtual void draw(int x,int y,int width,int height)  
public virtual void draw3d(int x,int y,int width,int height)  
public virtual void updateScrollStatus(double xoffset,double yoffset)  
public OGUILayout(OGUIWindow * window,int orientation)  
public void addArea(OGUIArea * area)  
public void setLayoutSizes(std::vector< float > sizes)  

Members

areas

public std::vector< OGUIArea * > areas

-type OGUIArea

draw

public virtual void draw(int x,int y,int width,int height)

draw3d

public virtual void draw3d(int x,int y,int width,int height)

updateScrollStatus

public virtual void updateScrollStatus(double xoffset,double yoffset)

OGUILayout

public OGUILayout(OGUIWindow * window,int orientation)

addArea

public void addArea(OGUIArea * area)

setLayoutSizes

public void setLayoutSizes(std::vector< float > sizes)

class OpenCVGUI::OGUIPlotArea

class OpenCVGUI::OGUIPlotArea
  : public OpenCVGUI::OGUIArea

Summary

Members Descriptions
public std::vector< int > color_scheme  
public virtual void draw(int x,int y,int width,int height)  
public OGUIPlotArea(OGUIWindow * window,std::string title,void * data,std::vector< std::string > labels,float xstep,int plot_type)  
public void replot(void * data,std::vector< std::string > labels,float xstep)  
public void setYScale(bool auto_scale,double min_value,double max_value)  

Members

color_scheme

public std::vector< int > color_scheme

draw

public virtual void draw(int x,int y,int width,int height)

OGUIPlotArea

public OGUIPlotArea(OGUIWindow * window,std::string title,void * data,std::vector< std::string > labels,float xstep,int plot_type)

replot

public void replot(void * data,std::vector< std::string > labels,float xstep)

setYScale

public void setYScale(bool auto_scale,double min_value,double max_value)

class OpenCVGUI::OGUIRadioButtons

class OpenCVGUI::OGUIRadioButtons
  : public OpenCVGUI::OGUIWidget

Summary

Members Descriptions
public virtual void draw(int x,int y,int width)  
public OGUIRadioButtons(const char * title,std::vector< std::string > options,int default_selected)  
public void setCallBack(std::function< void(int)> func)  

Members

draw

public virtual void draw(int x,int y,int width)

OGUIRadioButtons

public OGUIRadioButtons(const char * title,std::vector< std::string > options,int default_selected)

setCallBack

public void setCallBack(std::function< void(int)> func)

class OpenCVGUI::OGUISlider

class OpenCVGUI::OGUISlider
  : public OpenCVGUI::OGUIWidget

Summary

Members Descriptions
public virtual void draw(int x,int y,int width)  
public OGUISlider(const char * title,double min,double max,double value)  
public void setCallBack(std::function< void(double)> func)  
public void setValue(double v)  

Members

draw

public virtual void draw(int x,int y,int width)

OGUISlider

public OGUISlider(const char * title,double min,double max,double value)

setCallBack

public void setCallBack(std::function< void(double)> func)

setValue

public void setValue(double v)

class OpenCVGUI::OGUITextInput

class OpenCVGUI::OGUITextInput
  : public OpenCVGUI::OGUIWidget

Summary

Members Descriptions
public string value  
public bool is_focus_  
public int animation_alpha_  
public const char * label  
public virtual void draw(int x,int y,int w)  
public virtual void characterCallback(unsigned int key)  
public virtual void keyCallback(int key,int scancode,int action,int mods)  
public OGUITextInput(const char * label)  

Members

value

public string value

is_focus_

public bool is_focus_

animation_alpha_

public int animation_alpha_

label

public const char * label

draw

public virtual void draw(int x,int y,int w)

characterCallback

public virtual void characterCallback(unsigned int key)

keyCallback

public virtual void keyCallback(int key,int scancode,int action,int mods)

OGUITextInput

public OGUITextInput(const char * label)

class OpenCVGUI::OGUITitle

class OpenCVGUI::OGUITitle
  : public OpenCVGUI::OGUIWidget

Summary

Members Descriptions
public virtual void draw()  
public OGUITitle()  

Members

draw

public virtual void draw()

OGUITitle

public OGUITitle()

class OpenCVGUI::OGUIWidget

Summary

Members Descriptions
public OGUIFormArea * area  
public int height  
public virtual void draw(int x,int y,int widht)  
public virtual void characterCallback(unsigned int key)  
public virtual void keyCallback(int key,int scancode,int action,int mods)  

Members

area

public OGUIFormArea * area

height

public int height

draw

public virtual void draw(int x,int y,int widht)

characterCallback

public virtual void characterCallback(unsigned int key)

keyCallback

public virtual void keyCallback(int key,int scancode,int action,int mods)

class OpenCVGUI::OGUIWindow

Summary

Members Descriptions
public void * glfw_window  
public void * vg  
public double mouse_x  
public double mouse_y  
public int mouse_state  
public int key_pressed  
public int actual_cursor_type  
public int mouse_left_state  
public std::vector< void * > mouse_cursors_  
public OGUIWindow(int width,int height,const char * title,int layoutOrientation,bool fullScreen)  
public ~OGUIWindow()  
public void draw()  
public bool update()  
public int init(bool fullScreen)  
public void addArea(OGUIArea * area)  
public void setCursor(int cursor_type)  
public void drawCursor()  
public OGUILayout * getMainLayout()  
public void setKeyFocus(OGUIWidget * widget)  
public OGUIWidget * getKeyFocusWidget()  
public int getWindowHeight()  
public int getWindowWidth()  
public void updatePerfGraph()  
public void showPerfGraph(bool show)  
public void setExternal2DDraw(std::function< void(void *context)> func)  
public int popup(string title,string text,int type) Popups.
public string openFileBrowser(string path,std::vector< string > filter) File browser.
public void close()  
public int getStatus()  
public void maximizeArea(OGUIArea * area)  

Members

glfw_window

public void * glfw_window

vg

public void * vg

mouse_x

public double mouse_x

mouse_y

public double mouse_y

mouse_state

public int mouse_state

key_pressed

public int key_pressed

actual_cursor_type

public int actual_cursor_type

mouse_left_state

public int mouse_left_state

mouse_cursors_

public std::vector< void * > mouse_cursors_

OGUIWindow

public OGUIWindow(int width,int height,const char * title,int layoutOrientation,bool fullScreen)

~OGUIWindow

public ~OGUIWindow()

draw

public void draw()

update

public bool update()

init

public int init(bool fullScreen)

addArea

public void addArea(OGUIArea * area)

setCursor

public void setCursor(int cursor_type)

drawCursor

public void drawCursor()

getMainLayout

public OGUILayout * getMainLayout()

setKeyFocus

public void setKeyFocus(OGUIWidget * widget)

getKeyFocusWidget

public OGUIWidget * getKeyFocusWidget()

getWindowHeight

public int getWindowHeight()

getWindowWidth

public int getWindowWidth()

updatePerfGraph

public void updatePerfGraph()

showPerfGraph

public void showPerfGraph(bool show)

setExternal2DDraw

public void setExternal2DDraw(std::function< void(void *context)> func)
public int popup(string title,string text,int type)

Popups.

openFileBrowser

public string openFileBrowser(string path,std::vector< string > filter)

File browser.

close

public void close()

getStatus

public int getStatus()

maximizeArea

public void maximizeArea(OGUIArea * area)

struct GPUtimer

Summary

Members Descriptions
public int supported  
public int cur  
public int ret  
public unsigned int queries  

Members

supported

public int supported

cur

public int cur

ret

public int ret

queries

public unsigned int queries

struct PerfGraph

Summary

Members Descriptions
public int style  
public char name  
public float values  
public int head  

Members

style

public int style

name

public char name

values

public float values
public int head