function Shrink (MInput:Matriks;Mengecil:integer):Matriks;
var
i,j:integer;
MOutput:matriks;
begin
setlength(MOutput,length(MInput) div mengecil,length(MInput[0]) div mengecil);
for i:=0 to length(Moutput)-1 do
begin
for j:=0 to length(MOutput[0])-1 do
begin
MOutput[i,j]:=MInput[i*mengecil,j*mengecil];
end;
end;
Shrink:=MOutput;
end;
No comments:
Post a Comment