samples: avoid using of legacy C-like API

- CV_RGB() macro is moved into opencv2/imgproc.hpp from imgproc_c.h
- samples/cpp/filestorage_base64.cpp is dropped
This commit is contained in:
Alexander Alekhin
2018-03-26 13:02:57 +03:00
parent e06d1e8083
commit 7f9253ea0a
17 changed files with 26 additions and 101 deletions
@@ -36,7 +36,7 @@ int main(int argc, char** argv)
if (src.channels() == 3)
{
cvtColor(src, gray, CV_BGR2GRAY);
cvtColor(src, gray, COLOR_BGR2GRAY);
}
else
{
@@ -50,7 +50,7 @@ int main(int argc, char** argv)
//! [bin]
// Apply adaptiveThreshold at the bitwise_not of gray, notice the ~ symbol
Mat bw;
adaptiveThreshold(~gray, bw, 255, CV_ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 15, -2);
adaptiveThreshold(~gray, bw, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 15, -2);
// Show binary image
show_wait_destroy("binary", bw);
@@ -106,7 +106,7 @@ int main(int argc, char** argv)
// Step 1
Mat edges;
adaptiveThreshold(vertical, edges, 255, CV_ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 3, -2);
adaptiveThreshold(vertical, edges, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 3, -2);
show_wait_destroy("edges", edges);
// Step 2