function f=random_image(n,m,s,file_name)
% this function generates a random image
% m,n - image size
% s = 1 is for the case if image contrast must be distributed from 0 to
% 255; s = 0 will give a random range of contrast distributions;
% file_name - name of the created image;

randim = randn(n,m);
if s==1
    image_new=uint8(((randim-min(randim(:)))./((max(randim(:)))-min(randim(:)))).*255);
else image_new=randim;
end
imshow(image_new);
imwrite(image_new, file_name);