Left = 0
Top = 0
Caption = 'Form1'
- ClientHeight = 299
+ ClientHeight = 461
ClientWidth = 635
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
OnDestroy = FormDestroy
DesignSize = (
635
- 299)
+ 461)
PixelsPerInch = 96
TextHeight = 13
object Image1: TImage
Proportional = True
Stretch = True
end
+ object PaintBox1: TPaintBox
+ Left = 88
+ Top = 280
+ Width = 256
+ Height = 150
+ end
object Button1: TButton
Left = 528
Top = 32
TabOrder = 1
OnClick = Button2Click
end
+ object RadioButton1: TRadioButton
+ Left = 424
+ Top = 281
+ Width = 113
+ Height = 17
+ Caption = #20803#30011#20687
+ Checked = True
+ TabOrder = 2
+ TabStop = True
+ end
+ object RadioButton2: TRadioButton
+ Left = 432
+ Top = 304
+ Width = 113
+ Height = 17
+ Caption = #22793#25563#30011#20687
+ TabOrder = 3
+ end
object OpenPictureDialog1: TOpenPictureDialog
Left = 536
Top = 144
Image2: TImage;
OpenPictureDialog1: TOpenPictureDialog;
Button2: TButton;
+ PaintBox1: TPaintBox;
+ RadioButton1: TRadioButton;
+ RadioButton2: TRadioButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
nx, ny, i, j, k, small, big: integer;
kk: Byte;
ss, mean: integer;
- hist: array [0 .. GMAX] of integer;
+ hist, buffer: array [0 .. GMAX] of integer;
nmove, cnt: array [0 .. GMAX, 0 .. GMAX] of integer;
col: TRGBTriple;
p: array of TRGBTriple;
inc(hist[k]);
end;
end;
+ buffer := hist;
for i := 0 to GMAX do
for j := 0 to GMAX do
begin
end;
end;
Image2.Picture.Bitmap.Assign(bmp);
+ PaintBox1.Canvas.Rectangle(0, 0, PaintBox1.Width, PaintBox1.Height);
+ for i := 0 to GMAX do
+ with PaintBox1 do
+ begin
+ Canvas.MoveTo(i, Height);
+ if RadioButton1.Checked = true then
+ Canvas.LineTo(i, buffer[i])
+ else
+ Canvas.LineTo(i, Height - hist[i]);
+ end;
end;
procedure TForm1.FormCreate(Sender: TObject);