GUI - Windows App using OpenCV in C++

Hey,

At first I’d like to say that I’m a beginner when it comes to OpenCV. I’d would like to make an app on Windows in C++ using OpenCV library. Many tutorials online shows how to do a OpenCV project in Visual Studio but not as a GUI. All I could find are lots of amazing projects that after runining these apps it only displays a window and image / camera and thats all.

Why am I making my life difficult? I’m builing a mini-robot with vision system. That’s why I’d like to collect data in real time from camera installed on my robot and use my laptop to process it. It’s a robot so I have to add a bunch of buttons in order to be able to drive it / to change OpenCV functions (e.g. from detecting shapes to colors etc.). So my idea is an app with a camera view in the middle surrounded by buttons / sliders etc.

I’ve made a few small apps with GUI in the past in VS2019 but in C# using Windows Forms or WPF. I’ve seen tutorials similar to what i wanna do but it was wiritten in Python. I don’t know anything about Python so I’d rather to stick with C++. I’ve also seen that such things are possible by using QT Creator (Not a fan of it because its GUI creator is very basic when it comes to the appearance (or I don’t know how to properly use it) and code itself is very “Q-tish”, I mean I’m not a fan of it.

So as I shortly explained what I want to do, is it possible to make such app with GUI in Visual Studio in C++ using OpenCV? If so, how do I do it? Can you give me any tips on that? Or maby GUI in VS using c++ is not the way to go (maybe way to complex) and I should get along with QT Creator or Python? As I said, I’m a beginner, I’m mainly engaged in hardware design projects not software. This time I’d like to do both.

Thank you for your time,

Kamil

take a look at cvui: A GUI lib built on top of OpenCV drawing primitives | LearnOpenCV #

1 Like

I heard somewhere that you can do the GUI as WinForms or WPF in C#, and then use something called “C++/CLI” to call native C++ functions (OpenCV).

alternative: there are at least two different C# wrappers around OpenCV.

1 Like