How to make a simple window with one button using OpenCV HighGui only?

前端 未结 4 1531
日久生厌
日久生厌 2021-01-12 06:25

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 t

4条回答
  •  Happy的楠姐
    2021-01-12 07:25

    you are aware that openCV is not a GUI library, but an image processing lib?

    it ships with highgui: http://docs.opencv.org/2.4/modules/highgui/doc/highgui.html

    for those cases where you really have no other options, but need to create a window for displaying stuff.

    While OpenCV was designed for use in full-scale applications and can be used within functionally rich UI frameworks (such as Qt*, WinForms*, or Cocoa*) or without any UI at all, sometimes there it is required to try functionality quickly and visualize the results. This is what the HighGUI module has been designed for.

    see OpenCV and creating GUIs

    edit: "this doesn't answer the question": -> more help..

    you can't.

    or that is, if you know your underlying window manager, you can. i.e. if you'r on windows, you could get the window handle, and dynamically add more controls.. if not, you need to know what platform you'r on, and how to do it in that.

    I wouldn't dare to try and put this in a simple answer

提交回复
热议问题