Пример #1
0
        public void GetSetOption()
        {
            const string fileName = "dummy2.avi";

            try
            {
                using var writer = new VideoWriter(fileName, VideoCaptureAPIs.OPENCV_MJPEG, FourCC.MJPG, 10, new Size(640, 480));
                Assert.True(writer.IsOpened());
                Assert.Equal("CV_MJPEG", writer.GetBackendName());

                Assert.True(writer.Set(VideoWriterProperties.Quality, 50), "VideoWriter.Set failed");
                Assert.Equal(50, writer.Get(VideoWriterProperties.Quality), 3);
            }
            finally
            {
                DeleteFile(fileName);
            }
        }