"The constructor Mat(Mat, Rect) is undefined " opencv 错误 android 2.4.8

"The constructor Mat(Mat, Rect) is undefined " error in opencv android 2.4.8

我想在 android 中裁剪图像,但出现以下错误..你们知道为什么吗?

    Bitmap oimage=ImgProc_Obj.readImageFromEM();
    //myimageviewer.setImageBitmap(oimage);
    Mat morignal=new Mat();
    Utils.bitmapToMat(oimage, morignal);
    Rect myR=new Rect(20 ,20,300,300);//here is error"The constructor Mat(Mat, Rect) is undefined"
    Mat croped=new Mat(morignal,myR);
    Mat test=new Mat(); 

提前致谢..

检查您的导入。可能您使用的是 android.graphics.Rect 而不是 Mat 构造函数所期望的 org.opencv.core.Rect