I am working on a game-project using OpenCV. Now I have to make a simple GUI: a window with one button, using HighGui only.
I'm not sure but I think I'm supposed to use something like this:
cvNamedWindow( "NameWindow" , CV_WINDOW_AUTOSIZE);
Any help is much appreciated.
You can now create buttons and other useful tools on OpenCV windows. The page below shows a couple of useful examples.
https://docs.opencv.org/master/dc/d46/group__highgui__qt.html
The gist of it is:
#include <opencv2/highgui.hpp>
void myButtonName_callback(int state, void*userData) {
// do something
printf("Button pressed\r\n");
}
createButton("myButtonName",myButtonName_callback,NULL,CV_PUSH_BUTTON,1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With