Download - Digital image processing lab 1
![Page 1: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/1.jpg)
Presented by:Presented by:Dr. Moe Moe Myint
[email protected] Technology Department
Technological University (Kyaukse), Myanmar
![Page 2: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/2.jpg)
Only Original Owner has full rights reserved for copied images.
This PPT is only for fair academic use.
![Page 3: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/3.jpg)
How to read and display image
How to enhance an image
How to write MATLAB code
How to study Image Processing Toolbox with MATLAB
Let’s use MATLAB programming software
M. M. Myint
![Page 4: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/4.jpg)
M. M. Myint
![Page 5: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/5.jpg)
MATLAB
Matrix
Laboratory
MATLAB was originally written to provide easy access to matrix software developed by the LINPACK and EISPACK projects.
What is MATLAB?
M. M. Myint
![Page 6: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/6.jpg)
MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. Typical uses include• Math and computation• Algorithm development• Data acquisition• Modeling, simulation, and prototyping• Data analysis, exploration, and visualization• Scientific and engineering graphics• Application development, including graphical user interface building
Overview of MATLAB
M. M. Myint
![Page 7: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/7.jpg)
Command WindowCommand Window
Command HistoryCommand History
Memu BarMemu Bar
Current DirectoryCurrent Directory
Work SpaceWork Space
M. M. Myint
![Page 8: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/8.jpg)
MATLAB : Long term calls MATrix LABoratory. It is not like that C,C++,FORTRAN Programming language.(that is
MATLAB is BASIC)Everybody can afford to study this MATLAB who have the basic of
programming knowledge. Educated persons and Engineers in every field use MATLAB that it
is also used to write simple program to simulation program.MATLAB is an interactive program for scientific and engineering
calculation.For example, differential equation… If it is difficult to solve it by analytical methods, we use MATLAB
solvers ,Symbolic math toolbox and Simulink in MATLAB.
M. M. Myint
![Page 9: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/9.jpg)
Enter MATLAB functions at the Command Window prompt
The Command History Maintains a record of the MATLAB functionsyou run
Workspace<512x512 uint8>
Current Directory
![Page 10: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/10.jpg)
M. M. Myint
![Page 11: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/11.jpg)
Reading and Writing Images (Lab 1)
- Introduces some basic image processing concepts- starts by reading an image into the MATLAB workspace- performs some contrast adjustment on the image-Writes the adjusted image to a file
Dr. Moe Moe MyintInformation Technology DepartmentTechnological University (Kyaukse)
![Page 12: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/12.jpg)
To clear the MATLAB workspace of any variables and close open figure windows close all, clear all, clc
To read an image, use the imread commandI=imread(‘pout.tif’);
To display the image, use the imshow commandimshow(I);
title(‘Grayscale Image’)imtool(I)
M. M. Myint
![Page 13: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/13.jpg)
To see how the imread function stores the image data in the workspace
Return the image data in the variable I, which is a 291-by-240 element array of uint8 data
To get information about variables in the workspace by calling the whos command
Name Size Bytes Class Attributes I 291x240 69840 uint8
M. M. Myint
![Page 14: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/14.jpg)
To see the distribution of intensities in pout.tif, use the imhist function
figure, imhist(I)Notice how the intensity range is rather narrow.
To improve the contrast in an image, do the histogram equalization
I2 = histeq(I);Display the new equalized image, I2, in a new
figure windowfigure, imshow(I2)figure,imhist(I2)
M. M. Myint
![Page 15: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/15.jpg)
To write the newly adjusted Image I2 to a disk file, use the imwrite function
imwrite(I2, ‘pout2.png’);
M. M. Myint
![Page 16: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/16.jpg)
To see what imwrite wrote to the disk file, use the imfinfo function
imfinfo('pout2.png')
(The imfinfo fucntion returns information about the image in the file, such as its format, size, width, and height.)
M. M. Myint
![Page 17: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/17.jpg)
TIFF
JPG
PNG
![Page 18: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/18.jpg)
![Page 19: Digital image processing lab 1](https://reader030.vdocument.in/reader030/viewer/2022012404/587f270d1a28ab350c8b7f8f/html5/thumbnails/19.jpg)