New functions with QT GUI:
- 3 new points mostly done: - OpenGL support enabled (windows are rendered using GPU) - Save current screen (with overlay and so on...) with shortcut CTRL+S - Text rendering (with any system font, and possibility to set the style - normal, italic,... - the weight - normal, bold, ... - the color, the spacing between letters, and so on...)
This commit is contained in:
@@ -64,14 +64,21 @@ CV_EXPORTS void setWindowProperty(const string& winname, int prop_id, double pro
|
||||
CV_EXPORTS double getWindowProperty(const string& winname, int prop_id);//YV
|
||||
|
||||
|
||||
//Only for QT
|
||||
//Only for Qt
|
||||
//------------------------
|
||||
CV_EXPORTS void addText( const Mat& img, const char* text, Point org, CvFont font);
|
||||
|
||||
CV_EXPORTS void displayOverlay(const string& winname, const string& text, int delayms);
|
||||
CV_EXPORTS void displayStatusBar(const string& winname, const string& text, int delayms);
|
||||
|
||||
typedef void (CV_CDECL *OpenGLCallback)(void* userdata);
|
||||
CV_EXPORTS void createOpenGLCallback(const string& winname, CvOpenGLCallback callbackOpenGL, void* userdata CV_DEFAULT(0));
|
||||
|
||||
CV_EXPORTS void saveWindowParameters(const string& windowName);
|
||||
CV_EXPORTS void loadWindowParameters(const string& windowName);
|
||||
CV_EXPORTS int startLoop(int (*pt2Func)(int argc, char *argv[]), int argc, char* argv[]);
|
||||
CV_EXPORTS void stopLoop();
|
||||
|
||||
//-------------------------
|
||||
|
||||
CV_EXPORTS void imshow( const string& winname, const Mat& mat );
|
||||
|
||||
|
@@ -57,9 +57,33 @@ extern "C" {
|
||||
* Basic GUI functions *
|
||||
\****************************************************************************************/
|
||||
//YV
|
||||
//-----------New for QT
|
||||
//-----------New for Qt
|
||||
/* For font */
|
||||
enum { CV_FONT_LIGHT = 25,//QFont::Light,
|
||||
CV_FONT_NORMAL = 50,//QFont::Normal,
|
||||
CV_FONT_DEMIBOLD = 63,//QFont::DemiBold,
|
||||
CV_FONT_BOLD = 75,//QFont::Bold,
|
||||
CV_FONT_BLACK = 87 //QFont::Black
|
||||
};
|
||||
|
||||
enum { CV_STYLE_NORMAL = 0,//QFont::StyleNormal,
|
||||
CV_STYLE_ITALIC = 1,//QFont::StyleItalic,
|
||||
CV_STYLE_OBLIQUE = 2 //QFont::StyleOblique
|
||||
};
|
||||
/* ---------*/
|
||||
|
||||
//for color cvScalar(blue_component, green_component, red\_component[, alpha_component])
|
||||
//and alpha= 0 <-> 0xFF (not transparent <-> transparent)
|
||||
CVAPI(CvFont) cvFont_Qt(const char* nameFont, int pointSize CV_DEFAULT(-1), CvScalar color = cvScalarAll(0), int weight CV_DEFAULT(CV_FONT_NORMAL), int style CV_DEFAULT(CV_STYLE_NORMAL), int spacing CV_DEFAULT(0));
|
||||
|
||||
CVAPI(void) cvAddText( CvArr* img, const char* text, CvPoint org, CvFont *arg2);
|
||||
|
||||
CVAPI(void) cvDisplayOverlay(const char* name, const char* text, int delayms);
|
||||
CVAPI(void) cvDisplayStatusBar(const char* name, const char* text, int delayms);
|
||||
|
||||
typedef void (CV_CDECL *CvOpenGLCallback)(void* userdata);
|
||||
CVAPI(void) cvCreateOpenGLCallback( const char* window_name, CvOpenGLCallback callbackOpenGL, void* userdata CV_DEFAULT(NULL));
|
||||
|
||||
CVAPI(void) cvSaveWindowParameters(const char* name);
|
||||
CVAPI(void) cvLoadWindowParameters(const char* name);
|
||||
CVAPI(int) cvStartLoop(int (*pt2Func)(int argc, char *argv[]), int argc, char* argv[]);
|
||||
|
Reference in New Issue
Block a user