First off, let me introduce you to my great-grandmother, whose picture will be used for restoration tasks. Of course, you can use your own ancestors' photographs. The following steps will help you restore your old photographs:
Read and show the image in the usual manner, checking also its size:
>> ggm = imread('grandma.bmp'); >> imshow(ggm) >> size(ggm)
Unfortunately, this image has two disadvantages; it is very large (2048 x 1536) and also it is in color (last dimension in size is equal to 3). So, let's try to make our lives a little easier for the time being, by resizing the image and transforming it to grayscale. Both steps can be done in the same command:
>> ggm_gray = rgb2gray(imresize(ggm,0.25));
Now that we have a grayscale image sized 512 x 384, we can save it as
graygrandma.bmp
(just the first two inputs will suffice forimwrite
):>> imwrite(ggm_gray,'graygrandma.bmp');
An obvious flaw of this picture...