Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

GaussianBlur error with tutorial Camera-control

I posted a little part of my code, cause i keep getting a strange error that I can't seem to get rid of. The problem can be found on this line: Imgproc.GaussianBlur(mGray, mGray, new Size (5,5), 2.2, 2);

public Mat onCameraFrame(Mat inputFrame) {

    mGray = new Mat();
    Imgproc.cvtColor(mRgba, mGray, Imgproc.COLOR_RGBA2GRAY);    
    // doing a gaussian blur prevents getting a lot of false hits
    Imgproc.GaussianBlur(mGray, mGray, new Size (5,5), 2.2, 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;


}

The error i get from Eclipse is: The method GaussianBlur(Mat,Mat,Size,double,double) in the type imgproc is not applicable for the arguments (Mat,Mat,CameraSize,int,int)

I am using an edited version of tutorial3 Camera-control where the output is shown as Canny's edge detection (all works fine) but I need the GaussianBlur to get rid of some of the smaller details. Does anyone know what exactly is wrong in this line of the code? Or an alternative which is better would also be appreciated.