function output_img = stretch_log(input_img, c)
    input_img = double(input_img);
    
    for i1 = 1:size(input_img,1)
        for i2 = 1:size(input_img,2)
          output_img(i1, i2) = c * log10(input_img(i1, i2) + 1);
        end
    end
    
    output_img = double(output_img);
    minimum = min(output_img(:));
    maximum = max(output_img(:));
    
    for i1 = 1:size(input_img,1)
        for i2 = 1:size(input_img,2)
          output_img(i1, i2) = (255/(maximum - minimum)) * (output_img(i1, i2) - minimum);
        end
    end
    
    output_img = uint8(output_img);
   
end