Hello all,
i have problem with function texture2DToMat. My simple code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using OpenCVForUnity;
public class opcv: MonoBehaviour
{
public Mat fun (Texture2D texture){
Mat imgMat = new Mat(texture.width, texture.height, CvType.CV_8UC4);
Utils.texture2DToMat(texture, imgMat);
return imgMat;
}
}
And i have error:
The output Mat object has to be of the same size
This error is in everyone project from Opencv for Unity and i don’t know why.
Please help