Skip to content

Commit bcce259

Browse files
committed
read in gray scale mode when writing a gray scale video
1 parent 8570073 commit bcce259

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/videoio/perf/perf_output.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ PERF_TEST_P(VideoWriter_Writing, WriteFrame,
2828
{
2929
const string filename = getDataPath(get<0>(GetParam()));
3030
const bool isColor = get<1>(GetParam());
31-
Mat image = imread(filename, 1);
31+
Mat image = imread(filename, isColor ? IMREAD_COLOR : IMREAD_GRAYSCALE );
3232
#if defined(HAVE_MSMF) && !defined(HAVE_VFW) && !defined(HAVE_FFMPEG) // VFW has greater priority
3333
const string outfile = cv::tempfile(".wmv");
3434
const int fourcc = VideoWriter::fourcc('W', 'M', 'V', '3');

0 commit comments

Comments
 (0)