function output_img = stretch_lin(input_img)
    input_img = double(input_img);

    minimum = min(input_img(:));
    maximum = max(input_img(:));
     
    for i1 = 1:size(input_img,1)
        for i2 = 1:size(input_img,2)
          output_img(i1, i2) = uint8(round((255/(maximum - minimum)) * (input_img(i1, i2) - minimum)));
        end
    end    
end