Presentation is loading. Please wait.

Presentation is loading. Please wait.

Matlab tutorial course Exercises 5: Loading and writing images

Similar presentations


Presentation on theme: "Matlab tutorial course Exercises 5: Loading and writing images"— Presentation transcript:

1 Matlab tutorial course Exercises 5: Loading and writing images michael.berks@manchester.ac.uk

2 Exercises 1 – loading images Download the zip file ‘retinograms.zip’ into your data folder and extract the contents. This should generate an images folder with 20 ‘.mat’ files Write a script to load in and display each image in a new figure – use imshow Modify the script to convert each image to a grayscale image (hint: use ‘rgb2gray’) and svae the new image in ‘png’ format

3 Exercises 1 – loading images Now modify your “find_vessels” from last week so that it – Takes as input the filename of an image – Returns as output the black and white mask Using this function, modify the script you have written to generate and save a black and white vessel mask for each retinogram – Did this work? If not why not?

4 Exercises 2 – displaying images Go through the scripts: plotting_data.m, displaying_images.m, plotting_on_images.m and handles.m – Make sure understand the examples (the comments should help) – Try changing the image/plot properties to create new examples Use the script created to load and save the retinograms – Modify the script to invert the colour of each image before displaying/saving – Use rgb2ind to create an indexed version of each image – Try messing around with different colormaps and display properties. Save your favourite looking images

5 Exercises 2 – displaying images Make a new script, pick any of the example plots from any of the plotting/image examples we’ve used in the course so far. Make the best looking image/plot you can – Include titles, axis labels, overlays, legends etc. – Save the output in a PowerPoint slide Email me the script, whoever produces the most interesting display will win a prize next week! Competition!!

6


Download ppt "Matlab tutorial course Exercises 5: Loading and writing images"

Similar presentations


Ads by Google