Exemplo n.º 1
0
        public Mat ApplyBilateralFilter(Mat imageSource, BilateralFilter bilateralFilter)
        {
            if (imageSource == null)
            {
                return(null);
            }

            if ((bilateralFilter.sigmaColor == 1) && (bilateralFilter.sigmaSpace == 1))
            {
                return(imageSource);
            }

            return(imageSource.BilateralFilter(-1, bilateralFilter.sigmaColor, bilateralFilter.sigmaSpace));
        }
Exemplo n.º 2
0
 private void Initialize()
 {
     _brightness        = 0;
     _contrast          = 0;
     _meanBlur          = 1;
     _gaussianBlur      = new GaussianBlur(1, 1.0);
     _sharpening        = 0;
     _medianFilterSize  = 1;
     _bilateralFilter   = new BilateralFilter(1, 1);
     _isSketchFilterOn  = false;
     _isCartoonFilterOn = false;
     _translationFactor = new TranslationFactor(0, 0);
     _shearFactor       = new ShearFactor(0, 0);
     _resizeFactor      = new ResizeFactor(1, 1);
 }