Pick centers in KMeans++ with a probability proportional to their distance^2, instead of simple distance, to previous centers
Apply to KMeansIndex KMeanspp the same modification as in HierarchicalClusteringIndex
As some processed distances are already ^2, use template to select whether or not we have to ^2 in KMeanspp
Move templates in dist.h in order to share them between KMeansIndex and HierarchicalClusteringIndex classes.
Avoid obtaining several identical dimensions between two LSH sub-vectors by choosing orthogonal sub-vectors.
Fix a heap issue with static on Windows
Merge remote-tracking branch 'upstream/2.4' into LshOrthogonalSubvectors
modified BackgroundSubtractorMOG2::getBackgroundImage so that it can now work with gray-level images.
Fixed typos in "matching"
Merge branch '2.4' into fixtypos
doc fix
Fixed typo in BFMatcher in docs.
Merge pull request #2537 from ilya-lavrenov:doc_fix
Update out.cpp

Fixed a bug with the cv::format(cv::Mat, ...) method for matrices with only one row

see http://answers.opencv.org/question/21201/cvformat-does-not-format-the-way-it-should/?answer=23945#post-id-23945 for details
Bug #3553 JavaCameraView frame format and cvtColor format inconsistency fixed.
Merge pull request #2540 from mjul:fixtypos_2.4
Merge pull request #2539 from mjul:fixtypos
Merge pull request #2542 from asmorkalov:android_javacam_cvtcolor_fix
Revert "Merge pull request #1779 from perping:integral_2.4"

This reverts commit 54ea5bbac77a9dbd10f314ee1ee2b10e3b6c44fa, reversing
changes made to 28e0d3d771d9db9d03ea55f8d0504558e17139b2.
- fix test