Popular posts

Total Tayangan Laman

Dejavu.corp. Diberdayakan oleh Blogger.

SMS GRATIS

Adsense Indonesia
On Kamis, 10 November 2011


 HISTOGRAM
if not (FormCitra = nil) then
  begin
    Application.CreateForm(TFormHist, FormHist);
    FormHist.Top := FormCitra.Height+1;
    FormHist.Left := FormCitra.Left;
    FormHist.Picture := FormCitra.Image.Picture;
    FormHist.MenghitungHistogram(0);
    FormHist.Repaint
;
    FormCitra.SetFocus;
  end;
  if (FormCitra = nil) then
  begin
    MessageDlg('Image not found, Open image first!', mtInformation,[mbOk], 0);
  end;

PIXEL
var
  FL: string;
  F : TextFile;
  temp : PByteArray;
  i,j : integer;
  Img : TBitmap;
begin
  if not (FormCitra = nil) then
  begin
    GroupBox1.Visible := true;
    Memo1.Visible := true;
    FL := 'IntensitasPixel.txt';
    AssignFile(F,FL);
    Img := TBitmap.Create;
    Img.LoadFromFile(OpenPictureDialog.FileName);
    Rewrite(F);
    Memo1.Clear;

    for j:=0 to   Img.Height-1 do
      begin
        temp := Img.ScanLine[j];
        i:=0;
        repeat
          Write(F,inttostr(temp[i])+' ');
          i:=i+1;
        until i >= 3*Img.Width-1;
      end;

    CloseFile(F);
    Memo1.Lines.LoadFromFile(FL);
    FormCitra.Image.Picture.Bitmap := Img;
  end;
  if (FormCitra = nil) then
  begin
    MessageDlg('Image not found, Open image first!', mtInformation,[mbOk], 0);
  end;

end;

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Search Box

dfggfgf