求含有二值化、滤波、增强、锐化等功能的delphi图像处理的原代码,分不够,再加200

解决方案 »

  1.   

    to  forgot2000(忘记2000年),老兄,能提供就提供,不能就算了,这么多罗嗦,摆什么老大的味道?
      

  2.   

    做图像处理,我想问一下怎么弄速度快
    1、getpixsRGB速度奇慢
    2、scanline好些
    3、读dc不会
    不知大家用什么方法
      

  3.   

    二值化、滤波、增强、锐化不用找源代码吧,看一下别人解的思路就好了.我这里有一些c的,你只能得到思路,自己用delphi再遍一次吧,发短消息
      

  4.   

    书店里有很多关于图形图象处理方面的书,只不过好象没有用Delphi做的,
    不过,不管用C,还是用Delphi,原理都是相通的,
    图象处理与具体使用何种语言开发关系不大,主要是利用了一些数学方面的
    知识,还是很简单的
      

  5.   

    这些程序的Delphi代码除了增强我都有,是以前学数字图象处理的时候自己写的,滤波只有中值滤波和均值滤波。 还有Lapace和Robert算子,DPCM编码之类的。不过这些代码都在我实验室的机子里。现在回家过年了,呵呵。如果你不急的话,开学去了学校再给你。
      

  6.   

    滤波:
    FName1为原始数据文件名,FName2为滤波后数据文件名。
    procedure TForm.Smooth(FName1,FName2:string);
    var
      L1 : longint;
      I, Icount, Fp1, Fp2: integer;
      pre:array [1..14] of Byte;
      Last:array [1..3] of Byte;
      X, Y ,Z: buffer;
      F:file of byte;
    begin
      assignfile(F,FName1);
      reset(F);
      datalength:=filesize(F);
      closefile(f);  Fp1:=fileopen(Fname1,0);
      Icount:=fileread(Fp1,X,14);
      L1:=Icount;  assignfile(F,fname2);
      rewrite(F);
      closefile(F);
      Fp2:=fileopen(Fname2,1);  for I:=1 to 14 do
        pre[I]:=X[I];  Y[1]:=X[1];
      Y[2]:=(X[2]+2*X[1])div 3;
      Y[3]:=(x[3]+2*x[2]+3*x[1])div 6;
      Y[4]:=(x[4]+2*x[3]+3*x[2]+4*x[1])div 10;
      Y[5]:=(x[5]+2*x[4]+3*x[3]+4*x[2]+5*x[1])div 15;
      Y[6]:=(x[6]+2*x[5]+3*x[4]+4*x[3]+5*x[2]+6*x[1])div 21;
      Y[7]:=(x[7]+2*x[6]+3*x[5]+4*x[4]+5*x[3]+6*x[2]+7*x[1])div 28;
      Y[8]:=(x[8]+2*x[7]+3*x[6]+4*x[5]+5*x[4]+6*x[3]+7*x[2]+8*x[1])div 36;
      Y[9]:=(x[9]+2*x[8]+3*x[7]+4*x[6]+5*x[5]+6*x[4]+7*x[3]+8*x[2]+7*x[1])div 43;
      Y[10]:=(x[10]+2*x[9]+3*x[8]+4*x[7]+5*x[6]+6*x[5]+7*x[4]+8*x[3]+7*x[2]+6*x[1])div 49;
      Y[11]:=(x[11]+2*x[10]+3*x[9]+4*x[8]+5*x[7]+6*x[6]+7*x[5]+8*x[4]+7*x[3]+6*x[2]+5*x[1])div 54;
      Y[12]:=(x[12]+2*x[11]+3*x[10]+4*x[9]+5*x[8]+6*x[7]+7*x[6]+8*x[5]+7*x[4]+6*x[3]+5*x[2]+4*x[1])div 58;
      Y[13]:=(x[13]+2*x[12]+3*x[11]+4*x[10]+5*x[9]+6*x[8]+7*x[7]+8*x[6]+7*x[5]+6*x[4]+5*x[3]+4*x[2]+3*x[1])div 61;
      Y[14]:=(x[14]+2*x[13]+3*x[12]+4*x[11]+5*x[10]+6*x[9]+7*x[8]+8*x[7]+7*x[6]+6*x[5]+5*x[4]+4*x[3]+3*x[2]+2*x[1])div 63;
      Filewrite(fp2,Y,14);
      last[1]:=Y[12];
      last[2]:=Y[13];
      last[3]:=Y[14];  while L1<dataLength do
        begin
         Icount:=fileread(Fp1,X,N);
         L1:=L1+Icount;
         Y[1]:=(x[1]+2*pre[14]+3*pre[13]+4*pre[12]+5*pre[11]+6*pre[10]+7*pre[9]+8*pre[8]+7*pre[7]+6*pre[6]+5*pre[6]+4*pre[4]+3*pre[3]+2*pre[2]+1*pre[1])div 64;
         Y[2]:=(x[2]+2*X[1]+3*pre[14]+4*pre[13]+5*pre[12]+6*pre[11]+7*pre[10]+8*pre[9]+7*pre[8]+6*pre[7]+5*pre[6]+4*pre[6]+3*pre[4]+2*pre[3]+1*pre[2])div 64;
         Y[3]:=(X[3]+2*x[2]+3*X[1]+4*pre[14]+5*pre[13]+6*pre[12]+7*pre[11]+8*pre[10]+7*pre[9]+6*pre[8]+5*pre[7]+4*pre[6]+3*pre[6]+2*pre[4]+1*pre[3])div 64;
         Y[4]:=(X[4]+2*X[3]+3*x[2]+4*X[1]+5*pre[14]+6*pre[13]+7*pre[12]+8*pre[11]+7*pre[10]+6*pre[9]+5*pre[8]+4*pre[7]+3*pre[6]+2*pre[5]+1*pre[4])div 64;
         Y[5]:=(X[5]+2*X[4]+3*X[3]+4*x[2]+5*X[1]+6*pre[14]+7*pre[13]+8*pre[12]+7*pre[11]+6*pre[10]+5*pre[9]+4*pre[8]+3*pre[7]+2*pre[6]+1*pre[5])div 64;
         Y[6]:=(X[6]+2*X[5]+3*X[4]+4*X[3]+5*x[2]+6*X[1]+7*pre[14]+8*pre[13]+7*pre[12]+6*pre[11]+5*pre[10]+4*pre[9]+3*pre[8]+2*pre[7]+1*pre[6])div 64;
         Y[7]:=(X[7]+2*X[6]+3*X[5]+4*X[4]+5*X[3]+6*x[2]+7*X[1]+8*pre[14]+7*pre[13]+6*pre[12]+5*pre[11]+4*pre[10]+3*pre[9]+2*pre[8]+1*pre[7])div 64;
         Y[8]:=(X[8]+2*X[7]+3*X[6]+4*X[5]+5*X[4]+6*X[3]+7*x[2]+8*X[1]+7*pre[14]+6*pre[13]+5*pre[12]+4*pre[11]+3*pre[10]+2*pre[9]+1*pre[8])div 64;
         Y[9]:=(X[9]+2*X[8]+3*X[7]+4*X[6]+5*X[5]+6*X[4]+7*X[3]+8*x[2]+7*X[1]+6*pre[14]+5*pre[13]+4*pre[12]+3*pre[11]+2*pre[10]+1*pre[9])div 64;
         Y[10]:=(X[10]+2*X[9]+3*X[8]+4*X[7]+5*X[6]+6*X[5]+7*X[4]+8*X[3]+7*x[2]+6*X[1]+5*pre[14]+4*pre[13]+3*pre[12]+2*pre[11]+1*pre[10])div 64;
         Y[11]:=(X[11]+2*X[10]+3*X[9]+4*X[8]+5*X[7]+6*X[6]+7*X[5]+8*X[4]+7*X[3]+6*x[2]+5*X[1]+4*pre[14]+3*pre[13]+2*pre[12]+1*pre[11])div 64;
         Y[12]:=(X[12]+2*X[11]+3*X[10]+4*X[9]+5*X[8]+6*X[7]+7*X[6]+8*X[5]+7*X[4]+6*X[3]+5*x[2]+4*X[1]+3*pre[14]+2*pre[13]+1*pre[12])div 64;
         Y[13]:=(X[13]+2*X[12]+3*X[11]+4*X[10]+5*X[9]+6*X[8]+7*X[7]+8*X[6]+7*X[5]+6*X[4]+5*X[3]+4*x[2]+3*X[1]+2*pre[14]+1*pre[13])div 64;
         Y[14]:=(X[14]+2*X[13]+3*X[12]+4*X[11]+5*X[10]+6*X[9]+7*X[8]+8*X[7]+7*X[6]+6*X[5]+5*X[4]+4*X[3]+3*x[2]+2*X[1]+1*pre[14])div 64;     Z[1]:=(Y[1]+LAST[3]+LAST[2]+LAST[1]) div 4;
         Z[2]:=(Y[2]+Y[1]+LAST[3]+LAST[2]) div 4;
         Z[3]:=(Y[3]+Y[2]+Y[1]+LAST[3]) div 4;
         for I :=15 to ICount do
          Y[I]:=(X[I]+2*X[I-1]+3*X[I-2]+4*X[I-3]+5*X[I-4]+6*X[I-5]+7*X[I-6]+8*X[I-7]+7*X[I-8]+6*X[I-9]+5*X[I-10]+4*X[I-11]+3*x[I-12]+2*X[I-13]+1*X[I-14]) div 64;
         for I:= 4 to Icount do
          Z[I]:=(Y[I]+Y[I-1]+Y[I-2]+Y[I-3]) div 4;
         for I:=1 to 14 do
          pre[I]:=X[Icount-I+1];
          last[1]:=Y[Icount-2];
          Last[2]:=Y[Icount-1];
          Last[3]:=Y[Icount];
          filewrite(fp2,Z,Icount);
        end;
          fileclose(fp2);
          fileclose(fp1);
    end;
      

  7.   

    unit hhx_effectex;
    interfaceuses hhx_Effects;
    var mxEmbossColor:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
            Matrix:
            (( 0, 0, 0, 0, 0, 0, 0),
            ( 0, 0, 0, 0, 0, 0, 0),
            ( 0, 0,-1,-1,-1, 0, 0),
            ( 0, 0, 0, 1, 0, 0, 0),
            ( 0, 0, 1, 1, 1, 0, 0),
            ( 0, 0, 0, 0, 0, 0, 0),
            ( 0, 0, 0, 0, 0, 0, 0));
            Divisor:1;
            Bias:0;
            FilterName:'彩色浮雕';);var mxEmbossLight:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
            Matrix:
          (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0,-1, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 1, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
            Divisor:1;
            Bias:192;
            FilterName:'高亮浮雕';);var mxEmbossMedium:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
            Matrix:
          (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-1,-2,-1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 1, 2, 1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
            Divisor:1;
            Bias:192;
            FilterName:'中值浮雕';);var mxEmbossDark:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
            Matrix:
          (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-1,-2,-1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 1, 2, 1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
            Divisor:1;
            Bias:128;
            FilterName:'黑色浮雕';);var mxEdgeEnhance:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
            Matrix:
          (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-1,-2,-1, 0, 0),
          ( 0, 0,-2,16,-2, 0, 0),
          ( 0, 0,-1,-2,-1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
            Divisor:4;
            Bias:0;
            FilterName:'边缘增强 (线性锐化)';);var mxBlurBartlett:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx7;
            Matrix:
          (( 1, 2, 3, 4, 3, 2, 1),
          ( 2, 4, 6, 8, 6, 4, 2),
          ( 3, 6, 9,12, 9, 6, 3),
          ( 4, 8,12,16,12, 8, 4),
          ( 3, 6, 9,12, 9, 6, 3),
          ( 2, 4, 6, 8, 6, 4, 2),
          ( 1, 2, 3, 4, 3, 2, 1));
            Divisor:256;
            Bias:0;
            FilterName:'Bartlett模糊 (线性模糊)';);var mxBlurGaussian:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx7;
            Matrix:
         (( 1, 4, 8, 10, 8, 4, 1),
          ( 4,12,25,29,25,12, 4),
          ( 8,25,49,58,49,25, 8),
          (10,29,58,67,58,29,10),
          ( 8,25,49,58,49,25, 8),
          ( 4,12,25,29,25,12, 4),
          ( 1, 4, 8, 10, 8, 4, 1));
          Divisor:999;
          Bias:0;
          FilterName:'高斯模糊 (线性模糊)';);var mxNegative:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
          (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0,-1, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:1;
          Bias:255;
          FilterName:'反相 (线性效果)';);var mxAverage:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
          (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 1, 1, 1, 0, 0),
          ( 0, 0, 1, 1, 1, 0, 0),
          ( 0, 0, 1, 1, 1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:9;
          Bias:0;
          FilterName:'平均值滤波 (线性模糊)';);var mxBlur:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
          (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 1, 2, 1, 0, 0),
          ( 0, 0, 2, 4, 2, 0, 0),
          ( 0, 0, 1, 2, 1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:16;
          Bias:0;
          FilterName:'模糊 Blur';);var mxBlurSoftly:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
          (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 1, 3, 1, 0, 0),
          ( 0, 0, 3,16, 3, 0, 0),
          ( 0, 0, 1, 3, 1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:32;
          Bias:0;
          FilterName:'轻度模糊 Blur softly';);var mxBlurMore:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx5;
          Matrix:
          (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 1, 2, 1, 0, 0),
          ( 0, 1, 4, 6, 4, 1, 0),
          ( 0, 2, 6, 8, 6, 2, 0),
          ( 0, 1, 4, 6, 4, 1, 0),
          ( 0, 0, 1, 2, 1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:64;
          Bias:0;
          FilterName:'进一步模糊 Blur more';);var mxPrewitt:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
          (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 1, 1, 1, 0, 0),
          ( 0, 0, 1,-2, 1, 0, 0),
          ( 0, 0,-1,-1,-1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:1;
          Bias:0;
          FilterName:'Prewitt边缘 (线性边缘检测)';);var mxTraceContour:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
          (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-6,-2,-6, 0, 0),
          ( 0, 0,-1,32,-1, 0, 0),
          ( 0, 0,-6,-2,-6, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:1;
          Bias:240;
          FilterName:'轮廓描绘 (线性边缘检测)';);
    //      FilterName:'Trace contour (Edge detect linear)';);var mxSharpen:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
         (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-1,-1,-1, 0, 0),
          ( 0, 0,-1,16,-1, 0, 0),
          ( 0, 0,-1,-1,-1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:8;
          Bias:0;
          FilterName:'锐化 (线性锐化)';);var mxSharpenMore:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
         (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-1,-1,-1, 0, 0),
          ( 0, 0,-1,12,-1, 0, 0),
          ( 0, 0,-1,-1,-1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:4;
          Bias:0;
          FilterName:'进一步锐化 (线性锐化)';);var mxSharpenLess:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
         (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-1,-1,-1, 0, 0),
          ( 0, 0,-1,24,-1, 0, 0),
          ( 0, 0,-1,-1,-1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:16;
          Bias:0;
          FilterName:'轻度锐化 (线性锐化)';);var mxUnSharpMask:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
         (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-1,-2,-1, 0, 0),
          ( 0, 0,-2,16,-2, 0, 0),
          ( 0, 0,-1,-2,-1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:4;
          Bias:0;
          FilterName:'非锐化模板 (线性锐化)';);
    //      FilterName:'非锐化模板Unsharp mask (Sharpen linear)';);
      

  8.   


    var mxEdgesStrong:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
         (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 1, 3, 1, 0, 0),
          ( 0, 0, 3,-16,3, 0, 0),
          ( 0, 0, 1, 3, 1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:1;
          Bias:0;
          FilterName:'强化边缘 (线性边缘检测)';);var mxEdgesWeak:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
         (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 1, 0, 0, 0),
          ( 0, 0, 1,-4, 1, 0, 0),
          ( 0, 0, 0, 1, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:1;
          Bias:0;
          FilterName:'边缘弱化 (线性边缘检测)';);
    var mxEtch:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
         (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-6, 2,-6, 0, 0),
          ( 0, 0,-1,32,-1, 0, 0),
          ( 0, 0,-6,-2,-6, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:1;
          Bias:240;
          FilterName:'腐蚀';);
    //      FilterName:'Etch (Effects linear)';);var mxLaplacianHV:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
         (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0,-1, 0, 0, 0),
          ( 0, 0,-1, 4,-1, 0, 0),
          ( 0, 0, 0,-1, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:1;
          Bias:0;
          FilterName:'Laplacian水平/纵向边缘 (线性边缘检测)';);
    //      FilterName:'Laplacian horz./vert. (Edge detect linear)';);var mxLaplacianOmni:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
         (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-1,-1,-1, 0, 0),
          ( 0, 0,-1, 8,-1, 0, 0),
          ( 0, 0,-1,-1,-1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:1;
          Bias:0;
          FilterName:'Laplacian所有方向边缘?(线性边缘检测)';);
    //      FilterName:'Laplacian omnidir? (Edge detect linear)';);var mxSharpenDirectional:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
         (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-3,-3,-3, 0, 0),
          ( 0, 0, 0,16, 0, 0, 0),
          ( 0, 0, 1, 1, 1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:10;
          Bias:0;
          FilterName:'有方向的锐化';);
    //      FilterName:'Sharpen directional (Sharpen linear)';);var mxSobelPass:TGraphicFilter
          =(FilterType:ftLinear;MatrixSize:mx3;
          Matrix:
         (( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 1, 2, 1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0,-1,-2,-1, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0),
          ( 0, 0, 0, 0, 0, 0, 0));
          Divisor:1;
          Bias:0;
          FilterName:'Sobel边缘 (线性边缘检测)';);
    //      FilterName:'Sobel pass (Edge detect linear)';);//******************************************************************************
    //
    //  Two-Pass filters
    //
    //******************************************************************************var nmxLaplacianInvert:TMultiPassGraphicFilter=
          (FilterType:ftMultiPass;
           Filters:(@mxLaplacianOmni,@mxNegative,@mxZero,@mxZero);
           Functions:(gaNone,gaNone,gaNone);
           FilterName:'Laplacian Negative');implementationend.