Reputation: 400
I am working on object detection application using OpenCV 3.0 with C++. For a presentation, I need simple GUI to choose relevant files, send them to functions, and print out results. In other words, same thing I do in a terminal. I can't find proper way to create this kind of GUI in neither c++ nor OpenCV documentation.
Upvotes: 2
Views: 1203
Reputation: 208003
If you want something really simple, you could use Zenity, or one of its alternatives. Try it from the command line like this:
zenity --title="Select an image" --file-selection --multiple
If it fits the bill for your needs, you can integrate it into your C++ program using popen()
to execute it and then read the filename(s) it outputs.
Note that you can also use it to get arbitrary text or allow section from a list box.
In case anyone else wants to do similar things, but on Apple OSX, you could look at Cocoa Dialog.
Upvotes: 3