is there a DWT (discrete wavelet transform ) function in opencv ?? else if anyone have link of its implementation in c++
No, I don't believe OpenCV has that functionality.
This page might be useful.
It appears that openCV does not have an implementation of the DWT algorithm, but a quick google search turns up two results which may be relevant.
First is a result from Koders code search, which is an implementation designed to process MPEG4 frames for an image decoding program.
There is also a google code project, wavelet1d which is a version designed to process a 1d array of data.
You may be able to use those two implementations to build your own suitable for your uses?
Related
I am trying to extract the LBPFeatures of an image using OpenCV and C++, but there seems to be no in-built function to extract the features.
Can anyone help me?
I need to find the feature points and not the histogram.
The LBP authors give an optimized C code in one of their papers: here is the link.
you can find an old implementation of OpenCV in https://github.com/bytefish/opencv/tree/master/lbp
That libraries are included in newer versions of OpenCV, but the link have an example implementation
I'd have thought that google could answer this question, but I've not had much luck.
Does anyone know of any open source C++ implementations of any face detection algorithms other than the Viola-Jones (boosted cascades of Haar-like features) method?
Also, does there exist an open source C++ implementation of Fisherfaces anywhere?
Thanks.
This post gets some attention, so I'd like to update it. I've contributed the face recognition library I wrote to OpenCV, which includes Eigenfaces, Fisherfaces and Local Binary Patterns Histograms at time of writing this. So OpenCV 2.4.2 now comes with everything to get started, see the very detailed documentation:
http://docs.opencv.org/trunk/modules/contrib/doc/facerec/
Now the original answer.
I am the author of the article linked in Kevin's post. Please note that you need to find the eigenvalues of the non-symmetric matrix S_{W}^{-1} S_{B} for the Fisherfaces, I didn't explicitly mention it in my blog. OpenCV only has a solver for symmetric matrices in its current version; since eigenvalues and singular values aren't equivalent for non-symmetric matrices you can't use a SVD either. For my project I have adapted the JAMA solver to C++ for solving the eigenvalue problem for non-symmetric matrices, so there's no need to use an external library for it. The CMakeLists.txt is configured, so Eigen can be used as well, so you have the choice.
Now I've finally found some minutes to implement the Fisherfaces method with the OpenCV2 C++ API and pushed the code into my github account at:
https://github.com/bytefish/opencv/blob/master/lda
The main.cpp shows you how to use the Fisherfaces class and how to use the Linear Discriminant Analysis with the same example as on: http://www.bytefish.de/wiki/pca_lda_with_gnu_octave. It comes as a CMake project, so compiling is as easy as typing:
philipp#mango:~/some/dir$ mkdir build; cd build
philipp#mango:~/some/dir/build$ cmake ..
philipp#mango:~/some/dir/build$ make
philipp#mango:~/some/dir/build$ ./lda
I don't know if it's the preferred Stackoverflow way to post code in the answer, but I think it's a bit too long to post.
Please note two things. (1) I read the images from a CSV file (just like this one), you don't have to care about the order of the labels. (2) I store the eigenvectors by column, while the PCA in OpenCV stores them by row. It's just a matter of personal taste to do so, but I've never seen that for any other solver and so I decided to store them by column.
I have a huge amount of points data set. so i want to find min and max values from these points set. now i am using normal for loop for this purpose nice it is working but i want to know posibility to use opencv library since i wish to use this library. so plese any one help me. thanks
There are several options. Using OpenCV for this may give you an easy way to use SSE or other partially par
http://docs.opencv.org/search.html?q=minMax&check_keywords=yes&area=default
Some of those can use the GPU to help. Of course, the GPU will only be faster if your data was already in the GPU. Pushing data across the bus onto your video card just for this kind of search would be a net loss.
Use std::max_element() with a single channel cv::Mat like this:
img = img / *max_element(img.begin<float>(), img.end<float>());
No need for OpenCV in this case: it's already in the standard library (std::min_element and std::max_element).
I am working on the system that compares images. MPEG-7 standard provides some descriptors which can be used for that e.g: Dominant Color, Color Layout, Edge Histogramm, Color Coherence Vectors.
Do you know where i can get a source code for some of these methods?
Thx!
You can also use the Windows and Linux executables, or easy-to-use API based on OpenCV library, developed for BilVideo-7 video indexing and retrieval system: http://www.cs.bilkent.edu.tr/~bilmdg/bilvideo-7/Software.html.
The ISO distributes reference software as part of the MPEG-7 standard, and among other things it includes feature extraction code for the visual descriptors. The zip file contains another zip file called XMWin.zip, which contains the source. (Despite the "Win" name, it contains instructions for compiling on both windows and unix.)
Hope this helps to other programmers:
Here you can find one implementation on C#
Here another implementation in Java.
For Future readers, there's a CPP library that claims to be easy to use here.
https://github.com/mubastan/mpeg7fex
This has been tested on OpenCV 3, so this is at par the latest.
I need to use the connected component labeling algorithm on an image in a C++ application. I can implement that myself, but I was trying to use Boost's union-find/disjoint sets implementation since it was mentioned in the union-find wiki article.
I can't figure out how to create the disjoint_sets object so that it'll work with the image data I have (unsigned shorts). What am I missing? The examples in the Boost documentation aren't making any sense to me. Do I need all the extra Graph mumbo-jumbo in those examples when I have an image? OR, is there already an OpenCV connected component labeling implementation. Currently we're using OpenCV 1.1pre1 and Boost 1.37.
Surprisingly, there is no CCL in OpenCV. However, there is a workaround that is described in the reference manual. See the example for cvDrawContours. When I tried to use it, I had some strange behaviour on first and last rows and columns of an image, but I probably did something wrong.
An alternative way is to use cvBlobs library.
We ended up writing the algorithms for CCL and Union-Find ourselves using the descriptions found on Wikipedia and elsewhere. It seemed easier and faster than adding another library to our application just for this purpose.
Another possibility is to use the source codes provided provided by Ali Rahimi, and you can have a look at this.
I was able to use disjoint_sets of the boost library for the connected component labeling.
But to test, I was trying to create an image with pixel intensities having the value same as its label.
This led to the problem which I haven't been able to handle yet. Have a look at the thread.