Tuesday, May 15, 2012

Function Image Negative Pada pengolahan citra digital


function ImageNegative(MInput:Matriks):Matriks;
var
  i,j : integer;
  MOutput : Matriks;
begin
  SetLength(MOutput,Length(MInput),Length(MInput[0]));
  for i:=0 to Length(MOutput)-1 do
  begin
    for j:=0 to Length(MOutput[0])-1 do
    begin
      MOutput[i,j]:=255-MInput[i,j];
    end;
  end;
  ImageNegative:=MOutput;
end;

No comments:

Post a Comment