public System.Drawing.Bitmap ProcessImage(Bitmap srcBitmap)
 {
     ConvolutionMatrix m = new ConvolutionMatrix();
     m.SetAll(-1);
     m.Pixel = _weight;
     m.Factor = _weight - 8;
     ConvolutionMatrix.Conv3x3(_srcBitmap, m);
     return _srcBitmap;
 }
        public System.Drawing.Bitmap ProcessImage(Bitmap srcBitmap)
        {
            if (_srcBitmap == null)
            {
                throw new ILException("Input bitmap can not be null");
            }

            ConvolutionMatrix m = new ConvolutionMatrix();
            m.SetAll(-1);
            m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = 0;
            m.Pixel = 4;
            m.Offset = 127;

            ConvolutionMatrix.Conv3x3(_srcBitmap, m);
            return _srcBitmap;
        }
        public System.Drawing.Bitmap ProcessImage(Bitmap srcBitmap)
        {
            if (_srcBitmap == null)
            {
                throw new ArgumentException("Input bitmap can not be null");
            }

            ConvolutionMatrix m = new ConvolutionMatrix();
            m.SetAll(1);
            m.Pixel = _weight;
            m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = 2;
            m.Factor = _weight + 12;

            ConvolutionMatrix.Conv3x3(_srcBitmap, m);
            return _srcBitmap;
        }
Exemplo n.º 4
0
        public System.Drawing.Bitmap ProcessImage(Bitmap srcBitmap)
        {
            if (_srcBitmap == null)
            {
                throw new ILException("Input bitmap can not be null");
            }

            ConvolutionMatrix m = new ConvolutionMatrix();
            m.SetAll(1);
            m.Pixel = _weight;
            m.Factor = _weight + 8;

            ConvolutionMatrix.Conv3x3(_srcBitmap, m);

            return _srcBitmap;
        }