I am new to C and testing the waters this is a language I'm really interested in for a lot of reasons... I am attempting to play around with openCV and want to put it in my C project in Netbeans, Can someone please explain how to put openCV in my project folder so it will function. Thanks
Glad to. OpenCV build and installation are rather OS dependent. If it's Linux or Windows, I can help. What OS are you on and what have you tried so far?
posted 4 years ago
Thanks for the reply. I have actually solved the issue after a few hours of searching. I found the tutorial on openCv community on Youtube which demonstrated how to install it on mac osx This seems to functioning fine now, although if you don't mind i'd like to ask something in direct relation to openCV /C ... I found the documentation is mostly in C++ the OpenCV syntax on these demo pages it states C/ C++ Does this mean the syntax and structure are the same for C and C++ thanks, this is essentially what is holding me back at the moment, just searching for correct documentation thats all.
Some of the modules that have been around a while still support the C API and they work fine. These C functions and types are usually prefixed with a "cv...".
For example, the C equivalent of C++ imread() is cvLoadImage().
If the C++ module documentation - such as the imgcodecs module for image file reading and writing - has a C API URL at top, use that as the documentation. Otherwise, you're out of luck.
Not all features available in C++ API may be available for C programs, which is why you're better off using C++ for OpenCV.
If you want to stick to C constructs, just don't use any C++ features in your own code.
Mat objects can be directly assigned to C IplImage or CvMat structs; so using the C++ API should not be much of a problem.
posted 4 years ago
Ive switched to C ++ a bit more organized with the OOP ;) just getting familiar with the opencv library etc. But i do find myself slow and going in circles in context of GUI... I realize the highgui is suppose to create a functioning gui but am having problems with simply creating these? I am using Xcode and am getting errors. Is there any clear documentation on constructing GUI I should note that I'm new to C++ so if I'm asking questions that seem simplistic its due to my lack of familiarity with C ++
Unfortunately, I have not come across any one single comprehensive tutorial that covers all of highgui. But since highgui API is small and quite limited in what it can do, it's not that hard to pick it up from here and there.
See if these tutorials and links help:
- Basic tutorial that shows creating window and trackbar controls.
Highgui can be built to use either the GTK framework or QT framework. This tutorial will work regardless of which framework was used at build time.
API documentation's here
While highgui is fine for quick prototyping, eventually you'd want to build full fledged GUIs for production apps. For that, you should learn the QT GUI framework and then display OpenCV outputs in QT controls like QLabel. See what QT is capable of here and have a look at this beginner's tutorial.
What errors are you seeing with highgui?
posted 4 years ago
Hello thanks for your effort I have cleared this up essentially following some of your advice and researching and have saved myself some headaches although I am met with more questions which are confusing considering I'm using a new IDE for C++ and newish to the language, again thanks for your help.
When things are getting increasingly confusing, I try to reduce the number of unfamiliar things by using something I know, and solve just 1 unknown at a time before taking up the next.
Here, it looks to me like C++, IDE, opencv, and QT are all relative unfamiliar to you.
I don't know anything about xcode, but googling says it's capable of building C++ projects. So if you're familiar with Xcode, I suggest building a simple procedural C++ hello world level highgui application using Xcode itself.
You don't need to switch to a new IDE like QT creator to use highgui or QT; QT can be used like any other library in any project and IDE.
In fact you don't even need to know anything about QT at this point, since highgui only uses it internally. Highgui APIs are enough to start off a simple GUI application that shows images and videos.
Bring out your dead! Or a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!