mirror of
https://github.com/opencv/opencv.git
synced 2025-08-01 10:26:53 +08:00
Update seamless_cloning.cpp
This commit is contained in:
parent
955b20230c
commit
eff514f8bb
@ -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())
|
||||||
|
Loading…
Reference in New Issue
Block a user