cv::seamlessClone is getting error (matrix.cpp:2236: error: (-215) CV_MAT_TYPE(mtype) == m.type() in function create) in ios
UIImageToMat([UIImage imageNamed:@"lisa_opencv_poisson.png"], src);
UIImageToMat([UIImage imageNamed:@"mona_opencv_poisson.png"], tar);
UIImageToMat([UIImage imageNamed:@"vinci_mask.png"], msk);
cv::Mat out1;
cv::seamlessClone(src, tar, msk, cv::Point(tar.cols/2,tar.rows/2), out1, cv::NORMAL_CLONE); // crash in this line
UIImageWriteToSavedPhotosAlbum(MatToUIImage(out1), nil, nil, nil);
NB: src and msk have same size