I am trying to calculate the area of a certain region of an image using the concept of SURF (Speeded-Up Robust Features). But when I try to use a function such as contourArea, I get an exception. What are the possible steps that I should follow to install the specific blob libraries to calculate the area? (I am using OpenCV in Visual Studio). Any other method to caclculate the area using blobs?
Related
I need to train my own Haar Cascade classifier using OpenCV 3.X writing my own code without using OpenCV application (opencv_createsamples, opencv_haartraining), but I'm not able to find any reference neither in the OpenCV documentation or in some tutorial.
Everything say "use opencv applications", even in the official documentation.
Where I can find at least some base classes reference?
I am using Qt & OpenCV on a new project am about to compile OpenCV to work with MinGW.
A thought has arose that I can compile the OpenCV libs with Qt support but I don't really understand why I would want to do that. If I don't compile the libs with Qt support I can still route cv::mat to a QImage using a method like this.
So what am I missing? What value is provided in compiling Qt with OpenCV?
I have searched online and pages like this, this & this (from searching "why compile OpenCV with Qt") only show me how to compile with Qt and not why.
LE: misunderstood the question
WITH_QT option is used by highgui module to create windows using qt, so the QImage to cv::Mat conversion and vice-versa will work no matter how WITH_QT option is set.
First some clarifications: you are not compiling OpenCV with Qt, Qt is not a compiler so you can't compile anything with it.
Qt is a C++ library (it's called a framework because it imposes some design some rules to your application source code, but basically it's a C++ library, just like OpenCV).
Now, in C++ world* to use some libraries together you need to build those libraries with the same compiler (and in some cases even the same compiler settings), so must decide which C++ compiler you want to use and get both Qt and OpenCV built with the same compiler not necessarily build by you, binaries can be obtained from their websites.
If you want to use MinGW you will need to build OpenCV with MinGW compiler, because OpenCV (at least, version 2410) comes build only with Visual C++ version 10, 11, 12 - that means Visual Studio 2010, 2012 and 2013.
So if you decide to use some Visual Studio version, depending on version you choose, you might be able to use Qt with OpenCV without having to build neither yourself, but if you want MinGW compiler you need to build OpenCV with MinGW.
*you can get away with it if your libraries only export a C interface, but that is not the case with neither Qt nor latest OpenCV versions.
//if you want more details about this use your favorite internet search engine to search for: c++ binary compatibility and or c++ abi
You'd like to compile OpenCV with Qt for at least two reasons:
it gives you the zoom (mouse wheel) in imshow
it gives you the pixel RGB value when hovering over this pixel
Without WITH_QT, you just have a bare window, with none of these features (and you'll miss extra buttons too, like Save the picture), which make the image processing debugging more tedious.
I have a C++ app that uses OpenCV. Currently i am statically linking the OpenCV libs into my app. This is adding an extra overhead of 6+ MB.
Ideally i would like to remove some of the features that i am not using in OpenCV. The features am using are,
Capture frames from Webcam.
Face detection.
Image formats (JPEG, PNG).
Image rotation & resizing.
Is it possible to remove other features and trim down the libs?
My C++ app is developed in Visual Studio 2012.
Thanks in advance.
If you have the OpenCV source code set up in your PC, create your own dll from the opencv source code with exporting only the required features
I am trying to create an application to capture a snapshot using a webcam.
I have been able to accomplish this using WIA, but this solution becomes unstable when ran on Windows 7 with a camera that has a resolution of more than 1.3 megapixels. We are coding for a tablet computer that has a built in webcam with 2.0 megapixels.
I am not opposed to using direct show, but I would like to stay away from .net.
I have searched high and low for a solution and I can not get the directshow examples from the windows platform sdk or directx 9.0 to even compile on Visual Studio 6.0. I have also had no luck OpenCV.
Is there anyone that could point me in the direction of a tutorial that might get me started down the right path?
Thanks
The simplest way is videoinput lib that wraps directshow, it's the same lib used by openCV.
If that isn't good enough then the AMCAP sample in the multimedia/directshow dir of the Microsoft SDK shows how to run a camera in directshow
ps. as Hans said you should update the compiler,VC++6 is little old. There is a free version of their latest vs2010.
I found this tutorial excellent and it is so simple. I found it worked on XP and win7 with an old webcam and a new one.
I used the second example which is a semi-directshow one, but bypasses most of directshow.
You do need to add error handling though.
http://www.codeproject.com/KB/audio-video/VideoImageGrabber.aspx
I obtained three dimensional data from my optical system in Visual C++.And I want to show this profiler on windows form application.Is there any special library you could advise to me?And How can I customize this library in Visual C++.
Could you help me please?
Yours Sincerely....
Assuming that you're refering to a way to display that 3D data:
You can use QT library. It has both UI support and OpenGL support, so you can display 3D data. It is cross platform, and there is a plug-in for Visual Studio that can ease your development under Windows.