如何用Opencv在Android中实现Retinex理论

时间:2016-10-30 07:47:26

标签: java android opencv

我想实现Retinx理论以改善照明,在这个问题中,我找到了实施的步骤:

  

Retinex algorithm implementation

我为Android编写代码,但在该部分中,我标有“?”编译器给我一个错误,当我通过“Mat retinex”PLZ帮助我,伙计。

    Mat mRgba,imgGray,imgCanny,imgYuv;
    Mat gaussianFtr;
    Mat retinx;
    Mat retinxTotal;

    mRgba=new Mat(height,width, CvType.CV_8UC4);
    imgGray=new Mat(height,width, CvType.CV_8UC1);
    imgCanny=new Mat(height,width, CvType.CV_8UC1);
    imgYuv=new Mat(height,width, CvType.CV_8UC3);
    gaussianFtr=new Mat();
    retinx=new Mat();
    retinxTotal=new Mat();

 public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame)      {
      mRgba=inputFrame.rgba();
     Imgproc.cvtColor(mRgba,imgYuv,Imgproc.COLOR_RGB2YUV);
     Imgproc.GaussianBlur(imgYuv, gaussianFtr,new Size(45,45),0);
     retinxTotal=255*(Math.log10(?))+127.5;

       return gaussianFtr;
       }
  }

0 个答案:

没有答案