Merge pull request #2764 from hbadino:Feature_3692
Merge pull request #2752 from jet47:pr-2746
Merge pull request #2744 from jet47:kmeans-fix
Merge pull request #2738 from kevmitch:2.4
Merge pull request #2739 from StevenPuttemans:bug_1523
Merge pull request #2701 from thoinvil:BugfixFilterEngineApplyROI
Merge pull request #2680 from adrians:remove_cv_err
Merge pull request #2673 from BloodAxe:kaze
Merge pull request #2630 from isarandi:concat_corr
Merge pull request #2509 from euphrat:mog2_bgimg_gray
Remove a useless loop that copies an array to itself
Refactored class Fisheye to namespace fisheye
Changed documentation for namespace fisheye
Merge remote-tracking branch 'origin/2.4' into merge-2.4

Conflicts:
	doc/tutorials/introduction/linux_install/linux_install.rst
	modules/core/doc/operations_on_arrays.rst
	modules/core/include/opencv2/core/core.hpp
	modules/core/src/system.cpp
	modules/gpu/src/cuda/resize.cu
	modules/imgproc/doc/miscellaneous_transformations.rst
	modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst
	modules/video/src/bgfg_gaussmix2.cpp
Merge pull request #2768 from SpecLad:useless-loop
Merge pull request #2767 from SpecLad:merge-2.4
Added license to source files
Fixed several problems found by PVS-Studio.

This fixes all problems from the article "Checking OpenCV with PVS-Studio"
<http://www.viva64.com/en/b/0191/> that are not already fixed and are
not in 3rdparty or the legacy module.

The problems fixed are two instances of useless code and one instance
of unspecified behavior (right-shifting a negative number).
Disabled BORDER_CONSTANT for pyramid functions.
Fixed scanning bug identified in comments in pull request #1119.
NFA calculations now generate better line segments.