Commit 8128f628 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #15929 from sturkmen72:patch-3

parents 2c0ebf36 eff514f8
...@@ -51,8 +51,8 @@ static Mat checkMask(InputArray _mask, Size size) ...@@ -51,8 +51,8 @@ static Mat checkMask(InputArray _mask, Size size)
{ {
Mat mask = _mask.getMat(); Mat mask = _mask.getMat();
Mat gray; Mat gray;
if (mask.channels() == 3) if (mask.channels() > 1)
cvtColor(mask, gray, COLOR_BGR2GRAY); cvtColor(mask, gray, COLOR_BGRA2GRAY);
else else
{ {
if (mask.empty()) if (mask.empty())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment