Professional Documents
Culture Documents
3 Lecture DIP - DIP in MATLAB - DrTahirNawaz
3 Lecture DIP - DIP in MATLAB - DrTahirNawaz
Dr Tahir Nawaz
Website: https://www.tahirnawaz.com
Email: tahir.nawaz@ceme.nust.edu.pk
MATLAB environment
MATLAB Help and Documentation
MATLAB Help and Documentation
Writing script in m-file
Image skeleton
• Grayscale image
Image skeleton
• Color image
Image coordinate system used in MATLAB!
Reading and showing an image
• We can read an image in MATLAB using the imread
function
img = imread('face.jpg');
imshow(img);
Some image formats supported by imread()
Accessing image data
• Grayscale image
– We can access each pixel by using it’s respective row number (r)
and column number (c) as follows:
imwrite(img, ‘out_image.png’);