Question: Part (a) Let c be a fixed real number such that 0 < c < 1 and consider the function f (x) = xc on

Part (a)

Let c be a fixed real number such that 0 < c < 1 and consider the function f (x) = xc on the interval [0, 1]. Recall from Calculus that f maps [0, 1] to [0, 1], f is increasing on [0, 1], and f (x) x for x [0, 1]. Assume that a grayscale image is represented in Matlab as an array I of double values in the interval [0, 1] where 0 means black, 1 means white, and any number in [0, 1] means the intensity of white in the given pixel (see class notes). Suppose that c is fixed and apply the mapping f (x) = xc to each entry of I. Call T the array which results from this operation, then T represents another image. Based on the information given in the previous paragraph about the function f , what conclusions can you make about the images represented by I and T ?

Part (b)

Read the greyscale image printedtext.png from Matlabs bank of images, and use im2double to convert the values to double. Display the image. Parts of the printed text are not readable because they are too dark. The objective of part (b) is to rectify this deficiency. Apply the knowledge from part (a) to transform this image such that all text becomes readable in the transformed image. Experiment with various values of c. Find the value of c that produces the best result in your opinion, and display the transformed image.

Part (c)

This part tests your understanding of the representation of colour images as 3-dimensional arrays in Matlab. To answer this part, use only the basic array operations (indexing, assignment). Do not use any graphics function such as plot. A countrys flag is a rectangle with aspect ratio (proportion) 2:3 consisting of three vertical stripes of equal width which are black, green and orange. A sample picture of the flag is:

The green stripe is displayed with the highest intensity of the green colour, and the lowest (zero) intensity of the red and blue colours. The orange stripe is displayed by mixing the highest intensity of the red colour with the 80% intensity of the green colour, and the lowest (zero) intensity of the blue colour. Write a function FL that accepts on input a positive integer n and it returns the Matlab array representing the image of the flag, with height 2n pixels and width 3n pixels. For full marks your function should not contain any loops. Use only the basic array operations (indexing, assignment). Do not use any graphics function such as plot. Remember that the function has to be written at the end of the Matlab script.

Part (d)

Issue the function call FL(100) to create an array containing the flag image, and use imshow to display the image.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!