Description: procedure ImageDynamTwoValues(Data: TImageData SubSize: Integer)
var
Sub: TImageData
GrayData: TGrayStatData
x, y: Integer
begin
if SubSize <= 0 then
begin
ImageGrayStat(Data, GrayData, True)
ImageTwoValues(Data, GrayData.Average)
Exit
end
y := 0
while y < Data.Height do
begin
x := 0
while x < Data.Width do
begin
Sub := GetSubImageData(Data, x, y, SubSize, SubSize)
ImageGrayStat(Sub, GrayData, True)
ImageTwoValues(Sub, GrayData.Average)
Inc(x, SubSize)
end
Inc(y, SubSize)
end
end
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/maozefa/archive/2007/11/29/1908031.aspx
File list (Check if you may need any files):
二值化\aProject1.cfg
......\aProject1.dpr
......\Project1.res
......\Unit1.ddp
......\aUnit1.dfm
......\aUnit1.pas
......\Unit1.dcu
......\aProject1.exe
......\aCLEAN.BAT
二值化