Commit Graph

8 Commits

Author SHA1 Message Date
Vincent Rabaud
95844c51cb Remove std using-declarations and directives from public headers.
Re-exporting standard math and algorithm symbols from
modules/core/include/opencv2/core/cvstd.hpp into `namespace cv`
caused overload ambiguity between `cv::` array operations and
`std::` scalar templates, and `using namespace std` in `datasets`
and `hdf` public headers leaked `std` into downstream translation
units. Those conflicts previously required extra `const Mat&` and
`const UMat&` overloads of `cv::min` and `cv::max` in
modules/core/include/opencv2/core.hpp.

Drop `using std::min`, `std::max`, `std::swap`, `std::sqrt`,
`std::exp`, `std::pow`, and `std::log` from `cvstd.hpp` (keeping
`using std::abs`), `using std::nullptr_t` from
`cvstd_wrapper.hpp`, and `using namespace std` from
`track_vot.hpp`, `track_alov.hpp`, and `hdf5.hpp`. Remove the
obsolete `Mat` and `UMat` `min`/`max` overloads, qualify affected
calls across OpenCV modules with `std::`, and drop unused
`using std::*` declarations from module sources. Simplify
`std::pow(x, 0.5)` calls to `std::sqrt(x)`, collapse nested
`std::min`/`std::max` chains to initializer-list calls, and
replace constant-bound `min`/`max` pairs with `std::clamp`.
Existing runtime behavior is unchanged.
2026-11-29 00:00:25 +01:00
berak
182b52d23d fix some samples colliding with std::beta
also add comments explaining the change
2018-03-15 12:40:49 +01:00
luz.paz
dbb57cd0ae Misc. ./samples typos
Found via `codespell -q 3 --skip="./3rdparty" -I ../opencv-whitelist.txt`
2018-02-08 05:52:08 -05:00
StevenPuttemans
6d34d6b47e update samples: waitKey() usage
Original commit is a5f19f7dd6
2016-12-15 15:39:47 +03:00
berak
602bd60c3a Update cloning_gui.cpp 2015-09-04 17:13:58 +02:00
Adrien BAK
82a5ff8540 fix warnings in samples 2014-10-15 11:09:33 +09:00
Adil Ibragimov
8a4a1bb018 Several type of formal refactoring:
1. someMatrix.data -> someMatrix.prt()
2. someMatrix.data + someMatrix.step * lineIndex -> someMatrix.ptr( lineIndex )
3. (SomeType*) someMatrix.data -> someMatrix.ptr<SomeType>()
4. someMatrix.data -> !someMatrix.empty() ( or !someMatrix.data -> someMatrix.empty() ) in logical expressions
2014-08-13 15:21:35 +04:00
siddharth
14d0b763ec changed demo tutorial path 2014-07-29 00:15:11 +05:30