How to design GUI in OpenCV Console Application
I developed video based face recognition in video using OpenCV by Console Application using C++ but now i am not able to design the GUI.
Please anyone suggest me how to design the gui using OpenCV
Please provide more information about your requirements, operating system, compiler ... anyway I could suggest QTLibrary or WxWidget (MFC is quite old tecnology but still valid for C++) finally you have to consider multi threading
Actually, OpenCV is NOT built for GUI purposes. You will need a different foreground like QT or MFC that calls your C++ code when hitting the interface. OpenCV itself will never have decent GUI functionality since it is not the main focus of the library.
@StevenPuttemans, is there any way to use MFC from Microsoft Visual Studio? How to interface it with
.cpp
that contain coding with opencv library? Is it possible?@Aj-611 it is possible, but the problem with .NET languages is that you have managed and mangled code. This means that you will have to push all your code from the cpp file into the managed header file into the containers linking to the actions in your GUI. It is possible, let me say again, but it is a pain in the ass to get it to work. Best way would be to make a C++ class in OpenCV and then call that through header files inside your managed code.
@Aj-611 In Visual Studio you can create a new project as "MFC Application" than add Opencv Libs to your project and use all what you want from MFC and from OpenCV. See here for a function to draw an Mat into MFC static control.
Due to you are working with video at 99% you have to plan a multi tread GUI
It seems you are newbie to MFC so you could take time to consider multiplatform Libs like WxWidget or Qt too.
PS Just to avoid confusion: WPF(Windows Form Application) is C#/NET managed code. MFC(Microsoft Foundation Class) is C++ UNmanaged code and it works fine with ocv (bgslibrary is a good example.