Demo Application for use of buttons and other controls inside HighGUI Module (Patch #2178) (Patch #2303)


Added by Harald Schmidt over 12 years ago. Updated over 9 years ago.


Status:Cancelled Start date:2012-08-24
Priority:Normal Due date:
Assignee:Harald Schmidt % Done:

0%

Category:highgui-gui
Target version:-
Affected version:branch 'master' (3.0-dev) Operating System:Any
Difficulty: HW Platform:Any
Pull request:

Description

It demonstrates, how several controls can be configured in a *.cfg file.
The (modified) HighGUI Library reads in a *.cfg file and displays
all configured controls inside a button bar.
The former QAction icons for panning and zoom now consist out of
two grops now (4 elems each). Aditional e.g QLineEdit can be part of a button bar now.

buttonsqt.cpp can be compiled with Linux/Windows inside /samples/cpp.
But you see a buttonbar only in the case of an activated compile switch WITH_QT.
If WITH_QT was not set you can use 'p' or 'n' to change displayed image.
Random select for CV_WINDOW_NORMAL or CV_WINDOW_AUTOSIZE on startup of buttonsqt.
Names of buttons can be modified by a translation table.

An example for output + configuration is given by the attached file buttonqtdemo.jpg

Important:

buttonsqt.cpp is based on a new HighGUI – Library (Patch #2178)
It works with a button bar only in Qt Mode in the moment.

Used new functions from HighGUI:

cv::adjustWindowPos( const string& winname, int xp, int xwp, int yp, int yhp );
cv::getButtonBarContent(const string& winname, int idx, char * txt );
cv::setButtonBarContent(const string& winname, int etype, int idx, char * );
cv::getCommandVec( const string& winname, vector<string> & stringVec, char* cmd = NULL );
cv::dispInfoBox( const string& winname, char* caption, const string& text );

attached:

buttonsqt.cpp
buttonsqt.cfg
kmeans.cfg (will display a modified buttonbar comming from HighGUI )
buttonqtdemo.jpg ( one example for usage)

needed images (in executable directory):
baboon.jpg
board.jpg
building.jpg
fruits.jpg
lena.jpg
(all well known I think)

additional needed for runtime environment:
installed Qt / QtCore4.dll, QtGui4.dll …..

@Andrew, hope it helps to describe the interaction with the highgui Lib
hope no bugs inside....
Harald


buttonsqt.cfg (1.5 kB) Harald Schmidt, 2012-08-24 06:33 pm

buttonsqt.cpp (9 kB) Harald Schmidt, 2012-08-24 06:33 pm

kmeans.cfg (1.5 kB) Harald Schmidt, 2012-08-24 06:33 pm

ButtonQtDemo.jpg (350.3 kB) Harald Schmidt, 2012-08-24 06:33 pm


Associated revisions

Revision 1d68a899
Added by Roman Donchenko about 11 years ago

Merge pull request #2303 from jet47:gpu-canny-fix

History

Updated by Andrey Kamaev over 12 years ago

  • Assignee deleted (Andrey Kamaev)

Updated by Kirill Kornyakov about 12 years ago

  • Affected version set to branch 'master' (2.4.9)
  • Assignee set to Harald Schmidt

Updated by Maksim Shabunin over 9 years ago

  • HW Platform set to Any
  • Operating System set to Any
  • Affected version changed from branch 'master' (2.4.9) to branch 'master' (3.0-dev)
  • Status changed from Open to Cancelled

Also available in: Atom PDF