Why I can not find balanceWhite in opencv 3.0 beta? - c++

I download and installed prebuild OpenCV 3.0 beta (C++) and tried to play with some of its functions. But I could not find a way to use balanceWhite which is documented here:
http://docs.opencv.org/trunk/modules/xphoto/doc/whitebalance.html#balancewhite
How can I use this function?
It is not defined and I can not find any definition for it and no header file to include.

to use the xphoto module, you will need to download and build the opencv_contrib repo

Since the modules are not yet definitive, they haven't been added to the library yet.
However, you can find them here

Related

OpenCV extended image processing - filters

How do I access the OpenCV extended image process module? I need one filter specifically: fastGlobalSmootherFilter.
I have OpenCV 3.2.0 incorporated into my C++ project. I'm looking for this method:
http://docs.opencv.org/master/da/d17/group__ximgproc__filters.html#gaf8673fe9147160ad96ac6053fac3c106
which is in this module:
http://docs.opencv.org/master/df/d2d/group__ximgproc.html.
I found it through the research page here:
https://sites.google.com/site/globalsmoothing/
I've tried searching through the OpenCV header files, but none reference this function. I can't find edge_filter.hpp which is supposed to house some of these filters. How does one actually call the method?
At OpenCV developer site, you will find instructions for building the contrib modules (or extras)
https://github.com/opencv/opencv_contrib/blob/master/README.md
By default, they are not included in your build.

Do I need to install Boost to build odeint?

I am trying to solve ODE by using odeint package. The odeint website provides a download on their package. I downloaded the zip file included it in my project but it doesn't work.
I understand that if I download the whole boost package, it automatically includes odeint. I have succeeded on doing this.
But my question is "can I directly download the odeint files from odeint website and build it from there without installing the whole boost libraries??"
In our situation, we do not have enough time to ask students to download and build boost in class.
i.e. only download the odeint from the following website
http://headmyshoulder.github.io/odeint-v2/downloads.html
or
Github link
https://github.com/headmyshoulder/odeint-v2
No, you need to have the boost libraries. At least they need the headers need to be found. You can use odeint additional to the boost installation.
Nevertheless. If you use the latest version from boost you also get odeint, since it is contain in boost.

Adding third party libraries to an OpenCV project on Xcode

I am new to the XCode environment so apologies if this sounds trivial.
I am trying to use a third party library using for OpenCV that helps me do some blob analysis, CCL etc. Hosted here
I have searched a lot but there doesn't seem to be much documentation on how to go about adding and using these new libraries. I am using XCode 4.5.2, OpenCV 2.4.2.
When I simply add all the header files to the project folder and #include them in the source code, it fails to compile. I have also tried adding the "Header Paths" but it doesn't help. What am I missing?
I have tried to follow the instructions (compiling it using the terminal but it doesn't compile too) I am not clear on how or when exactly to use CMAKE.
Any help will be appreciated. Thank you.
I would suggest you using CvBlob on google code which is different from the one on willowgarage, I have got recently confused with this so take a look at this question for alternative blob analysis libraries.
Moreover, CvBlob has also a good support community here. (Search on "[cvblobslib]" or on "[blob] [opencv]")
Try this: cvBlob: OSX installation
Once you get it compiled, you need to include the library under Link Binary with Libraries in Build Phases. (This screenshot shows the core, imgproc, and highgui libraries. Your cvBlob library would go in the same place.)

Using OpenSSL's CMS implementation in C++

So my project today has been to create a C++ class that consolidates a lot of our commonly used crypto tasks. Got lots of things working but ran into a bit of a snag here. For reference, I'm using XCode 3.2.5 on OS 10.6.5.
I'm attempting to utilize some of OpenSSL's CMS functions. OpenSSL's MAN Page for one of the functions I'm trying to use mentions it was included in version 0.9.8. That's the version XCode let me import without having to do anything out of the ordinary (Target -> General -> Add Linked Library). Yet with that added XCode tells me it can't find openssl/cms.h.
So thinking maybe there's some disparity between the OS X version 0.9.8 and the one on OpenSSLs page, I downloaded the source for 1.0.0c and built it. After it was built, I added libcrypto.a and libssl.a to my project as linked libraries and added "some/dirs/openssl-1.0.0c/include/**" as a header search path. Now it can find openssl/cms.h but I get a linking error on any CMS function I call.
Has anyone done this successfully? Any help would be appreciate.
Thanks!
So what I ended up doing was to create a new SDK and calling,
./Configure darwin64-x86_64-cc --prefix=/path/to/sdk/usr --openssldir=/System/Library/OpenSSL enable-cms shared
To update the version of OpenSSL included in that SDK. That's seemed to work.

How do I zip a directory of files using C++?

I'm working on a project using C++, Boost, and Qt. I understand how to compress single files and bytestreams using, for example, the qCompress() function in Qt.
How do I zip a directory of multiple files, including subdirectories? I am looking for a cross-platform (Mac, Win, Linux) solution; I'd prefer not to fire off a bunch of new processes.
Is there a standard way to combine bytestreams from multiple files into a zipped archive, or maybe there is a convenience function or method that would be available in the Boost iostream library?
Many thanks for the assistance.
Update: The QuaZip library looks really great. There is an example in the download package (in the "tests" dir) that shows very clearly how to zip up a directory of files.
Update 2: After completing this task on my Linux build environment, I discovered that QuaZip doesn't work at all with the Visual Studio compiler. It may be possible to tackle all those compiler errors, but a word of caution to anyone looking down this path.
I have found the following two libraries:
ZipIOS++. Seems to be "pure" C++. They don't list Windows explicitly as a supported platform. So i think you should try your luck yourself.
QuaZIP. Based on Qt4. Actually looks nice. They list Windows explicitly (Using mingw). Apparently, it is a C++ wrapper for [this] library.
Ah, and of course, i have ripped those sites from this Qt Mailinglist question about Zipping/Unzipping of directories :)
Just for the record...
Today, I needed to do something very similar in Visual C++. (Though wanted to maintain the possibility to compile the project on other platforms; however preferred not to adopt Qt just for this purpose.)
Ended up using the Minizip library. It is written in plain C, but devising a simple C++ wrapper around it was a breeze, and the end result works great, at least for my purposes.
I have built a wrapper around minizip adding some features that I needed and making it nicer to use it. Is does use the latest c++11 and is developed using Visual Studio 2013, so it should work out-of-the-box for you.
There's a full description here: https://github.com/sebastiandev/zipper
you can zip entire folders, streams, vectors, etc. Also a nice feature is doing everything entirely in memory.
Poco::Zip is also a choice, it has clearly documentation and some code for demo.
Poco::Zip Document
system("zip myarchive.zip *");
I tried QuaZIP 0.4.3 on Windows with VisualStudio 2010 -- there are still issues but can be resolved easily.
To build with VS:
Use CMake to configure and generate VS solution for QuaZIP.
Open soltion with VS and build -- you'll first notice that it can't find 'zlib.h'.
Open preferences for quazip project and add path to Qt's copy of Zlib to C/C++->General->Additional Include Directories: $(QTDIR)/src/3rdparty/zlib.
Rebuild again and you'll get lots of warnings and one error C2491: dllimport static issue on QuaZipFile::staticMetaObject.
This is because QuaZipFile is declared like "class QUAZIP_EXPORT QuaZipFile" and QUAZIP_EXPORT needs to resolve to Q_DECL_EXPORT for dll and to Q_DECL_IMPORT for application, based on whether QUAZIP_BUILD is defined or not. When building QuaZIP QUAZIP_BUILD should be defined but isn't -- configuration process defines in error completely useless "quazip_EXPORTS" instead.
To fix, just remove "quazip_EXPORTS" from all build configurations and add QUAZIP_BUILD instead -- QuaZIP will now build fine.