When a cluster is empty for KMeans, it's better to give it the point from another cluster j that is the furthest one from center j.
Viz initial backport, compilation fixes, moved viz/viz.hpp header according to 2.4 style
fixed documentation warnings
added guard to prevent linking VTK with Qt5
fix tiled read for reading tiles into partial blocks in image
VTK off by default
rewrote perf tests for SURF
turn on CUDA part of nonfree module on Android for non-dynamic build
turn on CUDA part of stitching module on Android for non-dynamic build
update stitching sample
Merge pull request #2259 from ilya-lavrenov:ocl_surf
Merge pull request #2261 from jet47:stitching-cuda-android
Merge pull request #2178 from Nerei:viz_backport
fix path to CUDA libraries (use targets/armv7-linux-androideabi/lib)
save previous values of LOCAL_* variables and restore them at the end
Tests install path fix for Android SDK.
Merge pull request #2274 from jet47:android-mk-fix
update test CascadeClassifier
Merge pull request #2277 from asmorkalov:android_test_path_fix
project.properties file generation fixed for per-component installation.