1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

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
+2 -2
View File
@@ -133,7 +133,7 @@ static double rateFrame(Mat & frame)
unsigned long int sum = 0;
unsigned long int size = frame.cols * frame.rows;
Mat edges;
cvtColor(frame, edges, CV_BGR2GRAY);
cvtColor(frame, edges, COLOR_BGR2GRAY);
GaussianBlur(edges, edges, Size(7, 7), 1.5, 1.5);
Canny(edges, edges, 0, 30, 3);
@@ -324,7 +324,7 @@ int main(int argc, char ** argv)
if (!GlobalArgs.output.empty())
{
Size S = Size((int) cap.get(CAP_PROP_FRAME_WIDTH), (int) cap.get(CAP_PROP_FRAME_HEIGHT));
int fourCC = CV_FOURCC('M', 'J', 'P', 'G');
int fourCC = VideoWriter::fourcc('M', 'J', 'P', 'G');
videoWriter.open(GlobalArgs.output, fourCC, GlobalArgs.fps, S, true);
if (!videoWriter.isOpened())
{