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:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user