Реферат: Программная система обработки и анализа изображений
xEnd := StrToInt(X2Edit.Text);
yStart := StrToInt(Y1Edit.Text);
yEnd := StrToInt(Y2Edit.Text);
end; { with }
finally
OptionForm.Free;
end; { try }
if Result = mrOK then SetRect;
end;
{ Определение градиентов Gx и Gy в точке [x,y] }
procedure TMainForm.DefGradient(var Gx, Gy: real; x,y: word);
var
a, b, c, d, e, g, h, i: byte;
begin
with Image.Canvas do begin
if Pixels[x-1,y-1] = clBlack then a := 0
else a := 1;
if Pixels[x,y-1] = clBlack then b := 0
else b := 1;
if Pixels[x+1,y-1] = clBlack then c := 0
else c := 1;
if Pixels[x-1,y] = clBlack then d := 0
else d := 1;
if Pixels[x+1,y] = clBlack then e := 0
else e := 1;
if Pixels[x-1,y+1] = clBlack then g := 0
else g := 1;
if Pixels[x,y+1] = clBlack then h := 0
else h := 1;