我发布了我的代码的一小部分,因为我不断得到一个我似乎无法摆脱的奇怪错误.问题可以在这一行找到:Imgproc.GaussianBlur(mGray,mGray,new Size(5,5),2.2,2);
@H_301_2@public Mat onCameraFrame(Mat inputFrame) {
mGray = new Mat();
Imgproc.cvtColor(mRgba,Imgproc.COLOR_RGBA2GRAY);
// doing a gaussian blur prevents getting a lot of false hits
Imgproc.GaussianBlur(mGray,new Size (5,2);
// Values 3 and 4are the LowerThreshold and UpperThreshold.
Imgproc.Canny(inputFrame,mIntermediateMat,80,100);
Imgproc.cvtColor(mIntermediateMat,mRgba,Imgproc.COLOR_GRAY2BGRA,4);
return mIntermediateMat;
}
我从Eclipse得到的错误是:
@H_301_2@The method GaussianBlur(Mat,Mat,Size,double,double) in the type imgproc is not applicable for the arguments (Mat,CameraSize,int,int)我正在使用tutorial3 Camera-control(OpenCV for Android版本2.4.4)的编辑版本,其输出显示为Canny的边缘检测.我需要GaussianBlur来摆脱一些较小的细节.有谁知道这行代码究竟出了什么问题?