SlideShare a Scribd company logo
1 of 22
DIGITAL IMAGE PROCESSING
( useful for optical charactor recognition)
USING MATLAB
Presented by-
ANTRIKSH SAXENA
B-TECH 2nd year
ELECTRICAL ENGG.
IMAGE
• A digital image is a representation of a two-dimensional
image as a finite set of digital values, called picture elements
or pixels.
• The image is stored in computer memory as 2D array of
pixels.
• These pixels takes memory to store according to there variable
type like ---double,logical,uint8,uint16, uint32,char etc.
 Digital images can be created by a variety of input devices and techniques:
-digital cameras
-scanners
 Digital images can be classified as-
Color
Grayscale
Binary
• rgb2gray – RGB image or colormap to
grayscale.
• im2bw – image to binary image by
thresholding.
• im2double – image array to double precision.
• im2uint8 – image array to 8-bit unsigned
integers.
• im2uint16 – image array to 16-bit unsigned
integers.
COLOUR IMAGE
• There are different colour spaces to represent colour image.
1. RGB colour space.
2. NTSC colour space.
3. HSV colour space.
4. YCbCr colour space......etc.
• We will only consider RGB colour space here to represent colour
images.
• In RGB colour space there are 3 images layers-
RED,GREEN,BLUE.
GREYSCALE IMAGE(GSI)
- The above 3 images Red,Green,Blue are called greyscale images.
- These 3 greyscale image overlaps to form RGB image.
- In GSI there are different intensity’s pixels of red,blue green
colours are available to overlap to form colour image’s pixels.
BINARY IMAGE
• This type of image contains pixels of logical memory
(0 or 1).
- This is also called black and white image.
IMAGE PROCESSING USING MATLAB
what is image processing??-
• Digital image processing focuses on two major tasks
–Improvement of pictorial information for human interpretation
–Processing of image data for storage, transmission and representation
for autonomous machine perception .
Read the image in matlab.
>> a=imread('image.jpg');
>> imshow(a)
convert the image in grey scale.
>> g1=a(:,:,1);..........this is RED component of RGB.
>> imshow(g1)
convert the image in binary image.
>>bw=g1>150;.....if value of pixel>150 then 1
if value of pixel<150 then 0
>>imshow(bw)
Read the colour imageRGB(colour
image)
Convert to GREY SCALE IMAGE
Convert to BINARY IMAGE
MORPHOLOGY
-Binary images may contain numerous imperfections. In
particular, the binary regions produced by simple thresholding are
distorted by noise and texture. Morphological image processing
pursues the goals of removing these imperfections by accounting for
the form and structure of the image. These techniques can be
extended to greyscale images.
• # edge ditection
• # dilation
• # filling
• # filtering(convolution & corelation)
• # region properties(centroid, area, bounding box).
etc.
EDGE ditection by binary image
• Edge detection is identifying points in a digital image at which the image
brightness changes sharply or, more formally, has discontinuities.
>> Itedge = edge(uint8(bw));
>> imshow(Itedge)
IMAGE dilation
FILLING the bound areas
• This process fills the bounding areas in edge ditected binary image.
>> Itfill= imfill(Iedge2,'holes');
>> imshow(Itfill)
Process in single step
Discrete the diff. Elements in image
>> [label num] = bwlabel(fill);
props = regionprops(label);
- This regionprops provides a STRUCTURE(props) which contains =
# centroid’s cordinates of diff. Elements
# area of box bounding pefectly the elements
# bounding box.
Counting the no. of elements
- In above commands ‘num’ is the total number of elements
in filled image.
- Which is shown in next slide.
Counting the no. of elements
Make the bounding box around elements
Itbox = [Itprops.BoundingBox]; Itbox = reshape(Itbox,[4 numt]); imshow(It)
hold on;
for cntt = 1:numt
rectangle('position',Itbox(:,cntt),'edgecolor','r');
end........this command make the bounding box to each elements & descrete them.
Processing on RGB image
• Function imadjust =Is the basic IPT tool for intensity
transformations of gray-scale images. It has the syntax:
g = imadjust (f, [low_in high_in], [low_out high_out], gamma)
• As illustrated in figure 3.2 (above),
this function maps the
intensity values in
image f to new values in
g, such that values
between low_in and
high_in map to values
between low_out and high_out.
• Values below low_in and above high_in are clipped; that is values
below low_in map to low_out, and those above high_in map to
high_out.
>> f = imread ('baby-BW.jpg');
>> g = imadjust (f, [0 1], [1 0]);
>> imshow(f), figure, imshow (g);
>> imshow(f), figure, imshow (g);
>> g = imadjust (f, [0.5 0.75], [0 1], .5);
>> imshow(f), figure, imshow (g);
Ec section

More Related Content

What's hot

Matlab and Image Processing Workshop-SKERG
Matlab and Image Processing Workshop-SKERG Matlab and Image Processing Workshop-SKERG
Matlab and Image Processing Workshop-SKERG Sulaf Almagooshi
 
Images in matlab
Images in matlabImages in matlab
Images in matlabAli Alvi
 
Image processing on matlab presentation
Image processing on matlab presentationImage processing on matlab presentation
Image processing on matlab presentationNaatchammai Ramanathan
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer GraphicsAdri Jovin
 
Image proceesing with matlab
Image proceesing with matlabImage proceesing with matlab
Image proceesing with matlabAshutosh Shahi
 
Computer Graphics Introduction
Computer Graphics IntroductionComputer Graphics Introduction
Computer Graphics IntroductionGhaffar Khan
 
Multimedia graphics and image data representation
Multimedia graphics and image data representationMultimedia graphics and image data representation
Multimedia graphics and image data representationMazin Alwaaly
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlabneetirajsinh
 
Chapter 3 data representations
Chapter 3 data representationsChapter 3 data representations
Chapter 3 data representationsABDUmomo
 
Colour Rendering For True Colour Led Display System
Colour Rendering For True Colour Led Display SystemColour Rendering For True Colour Led Display System
Colour Rendering For True Colour Led Display SystemIJMER
 
Image processing basics using matlab
Image processing basics using matlabImage processing basics using matlab
Image processing basics using matlabAnkur Tyagi
 
Image compression
Image compressionImage compression
Image compressionIshucs
 
Introductory Digital Image Processing using Matlab, IIT Roorkee
Introductory Digital Image Processing using Matlab, IIT RoorkeeIntroductory Digital Image Processing using Matlab, IIT Roorkee
Introductory Digital Image Processing using Matlab, IIT RoorkeeVinayak Sahai
 

What's hot (18)

Color models
Color modelsColor models
Color models
 
Matlab and Image Processing Workshop-SKERG
Matlab and Image Processing Workshop-SKERG Matlab and Image Processing Workshop-SKERG
Matlab and Image Processing Workshop-SKERG
 
Images in matlab
Images in matlabImages in matlab
Images in matlab
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Image processing on matlab presentation
Image processing on matlab presentationImage processing on matlab presentation
Image processing on matlab presentation
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
Image proceesing with matlab
Image proceesing with matlabImage proceesing with matlab
Image proceesing with matlab
 
Unit 1
Unit 1Unit 1
Unit 1
 
Frame buffer
Frame bufferFrame buffer
Frame buffer
 
Computer Graphics Introduction
Computer Graphics IntroductionComputer Graphics Introduction
Computer Graphics Introduction
 
Multimedia graphics and image data representation
Multimedia graphics and image data representationMultimedia graphics and image data representation
Multimedia graphics and image data representation
 
Image compression
Image compressionImage compression
Image compression
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 
Chapter 3 data representations
Chapter 3 data representationsChapter 3 data representations
Chapter 3 data representations
 
Colour Rendering For True Colour Led Display System
Colour Rendering For True Colour Led Display SystemColour Rendering For True Colour Led Display System
Colour Rendering For True Colour Led Display System
 
Image processing basics using matlab
Image processing basics using matlabImage processing basics using matlab
Image processing basics using matlab
 
Image compression
Image compressionImage compression
Image compression
 
Introductory Digital Image Processing using Matlab, IIT Roorkee
Introductory Digital Image Processing using Matlab, IIT RoorkeeIntroductory Digital Image Processing using Matlab, IIT Roorkee
Introductory Digital Image Processing using Matlab, IIT Roorkee
 

Similar to Ec section

Image processing tool box.pptx
Image processing tool box.pptxImage processing tool box.pptx
Image processing tool box.pptxAvinashJain66
 
ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)Hasitha Ediriweera
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingAnkur Nanda
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging SystemVrushali Lanjewar
 
Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Joel P
 
Working with images in matlab graphics
Working with images in matlab graphicsWorking with images in matlab graphics
Working with images in matlab graphicsmustafa_92
 
الوسائط المتعددة Multimedia تاج
الوسائط المتعددة  Multimedia تاجالوسائط المتعددة  Multimedia تاج
الوسائط المتعددة Multimedia تاجmaaz hamed
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlabAman Gupta
 
Matlab intro
Matlab introMatlab intro
Matlab introfvijayami
 
Matlab Working With Images
Matlab Working With ImagesMatlab Working With Images
Matlab Working With Imagesmatlab Content
 
Dip digital image 3
Dip digital image 3Dip digital image 3
Dip digital image 3Shajun Nisha
 
Image processing for robotics
Image processing for roboticsImage processing for robotics
Image processing for roboticsSALAAMCHAUS
 
Presentation1.pptx qalid.pptx
Presentation1.pptx qalid.pptxPresentation1.pptx qalid.pptx
Presentation1.pptx qalid.pptxssuserd565841
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab SangeethaSasi1
 
project_final_seminar
project_final_seminarproject_final_seminar
project_final_seminarMUKUL BICHKAR
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlabminhtaispkt
 

Similar to Ec section (20)

Image processing tool box.pptx
Image processing tool box.pptxImage processing tool box.pptx
Image processing tool box.pptx
 
ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)ImageProcessingWithMatlab(HasithaEdiriweera)
ImageProcessingWithMatlab(HasithaEdiriweera)
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Image processing in MATLAB
Image processing in MATLABImage processing in MATLAB
Image processing in MATLAB
 
Matlab practical ---2.pdf
Matlab practical ---2.pdfMatlab practical ---2.pdf
Matlab practical ---2.pdf
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging System
 
Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)
 
Working with images in matlab graphics
Working with images in matlab graphicsWorking with images in matlab graphics
Working with images in matlab graphics
 
الوسائط المتعددة Multimedia تاج
الوسائط المتعددة  Multimedia تاجالوسائط المتعددة  Multimedia تاج
الوسائط المتعددة Multimedia تاج
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
Matlab Working With Images
Matlab Working With ImagesMatlab Working With Images
Matlab Working With Images
 
Dip digital image 3
Dip digital image 3Dip digital image 3
Dip digital image 3
 
Image processing for robotics
Image processing for roboticsImage processing for robotics
Image processing for robotics
 
Presentation1.pptx qalid.pptx
Presentation1.pptx qalid.pptxPresentation1.pptx qalid.pptx
Presentation1.pptx qalid.pptx
 
Dip day1&2
Dip day1&2Dip day1&2
Dip day1&2
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab
 
Lec2
Lec2Lec2
Lec2
 
project_final_seminar
project_final_seminarproject_final_seminar
project_final_seminar
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 

Ec section

  • 1. DIGITAL IMAGE PROCESSING ( useful for optical charactor recognition) USING MATLAB Presented by- ANTRIKSH SAXENA B-TECH 2nd year ELECTRICAL ENGG.
  • 2. IMAGE • A digital image is a representation of a two-dimensional image as a finite set of digital values, called picture elements or pixels. • The image is stored in computer memory as 2D array of pixels. • These pixels takes memory to store according to there variable type like ---double,logical,uint8,uint16, uint32,char etc.  Digital images can be created by a variety of input devices and techniques: -digital cameras -scanners  Digital images can be classified as- Color Grayscale Binary
  • 3. • rgb2gray – RGB image or colormap to grayscale. • im2bw – image to binary image by thresholding. • im2double – image array to double precision. • im2uint8 – image array to 8-bit unsigned integers. • im2uint16 – image array to 16-bit unsigned integers.
  • 4. COLOUR IMAGE • There are different colour spaces to represent colour image. 1. RGB colour space. 2. NTSC colour space. 3. HSV colour space. 4. YCbCr colour space......etc. • We will only consider RGB colour space here to represent colour images. • In RGB colour space there are 3 images layers- RED,GREEN,BLUE. GREYSCALE IMAGE(GSI) - The above 3 images Red,Green,Blue are called greyscale images. - These 3 greyscale image overlaps to form RGB image. - In GSI there are different intensity’s pixels of red,blue green colours are available to overlap to form colour image’s pixels.
  • 5. BINARY IMAGE • This type of image contains pixels of logical memory (0 or 1). - This is also called black and white image. IMAGE PROCESSING USING MATLAB what is image processing??- • Digital image processing focuses on two major tasks –Improvement of pictorial information for human interpretation –Processing of image data for storage, transmission and representation for autonomous machine perception .
  • 6.
  • 7. Read the image in matlab. >> a=imread('image.jpg'); >> imshow(a) convert the image in grey scale. >> g1=a(:,:,1);..........this is RED component of RGB. >> imshow(g1) convert the image in binary image. >>bw=g1>150;.....if value of pixel>150 then 1 if value of pixel<150 then 0 >>imshow(bw)
  • 8. Read the colour imageRGB(colour image)
  • 9. Convert to GREY SCALE IMAGE
  • 11. MORPHOLOGY -Binary images may contain numerous imperfections. In particular, the binary regions produced by simple thresholding are distorted by noise and texture. Morphological image processing pursues the goals of removing these imperfections by accounting for the form and structure of the image. These techniques can be extended to greyscale images. • # edge ditection • # dilation • # filling • # filtering(convolution & corelation) • # region properties(centroid, area, bounding box). etc.
  • 12. EDGE ditection by binary image • Edge detection is identifying points in a digital image at which the image brightness changes sharply or, more formally, has discontinuities. >> Itedge = edge(uint8(bw)); >> imshow(Itedge)
  • 14. FILLING the bound areas • This process fills the bounding areas in edge ditected binary image. >> Itfill= imfill(Iedge2,'holes'); >> imshow(Itfill)
  • 16.
  • 17. Discrete the diff. Elements in image >> [label num] = bwlabel(fill); props = regionprops(label); - This regionprops provides a STRUCTURE(props) which contains = # centroid’s cordinates of diff. Elements # area of box bounding pefectly the elements # bounding box. Counting the no. of elements - In above commands ‘num’ is the total number of elements in filled image. - Which is shown in next slide.
  • 18. Counting the no. of elements
  • 19. Make the bounding box around elements Itbox = [Itprops.BoundingBox]; Itbox = reshape(Itbox,[4 numt]); imshow(It) hold on; for cntt = 1:numt rectangle('position',Itbox(:,cntt),'edgecolor','r'); end........this command make the bounding box to each elements & descrete them.
  • 20. Processing on RGB image • Function imadjust =Is the basic IPT tool for intensity transformations of gray-scale images. It has the syntax: g = imadjust (f, [low_in high_in], [low_out high_out], gamma) • As illustrated in figure 3.2 (above), this function maps the intensity values in image f to new values in g, such that values between low_in and high_in map to values between low_out and high_out. • Values below low_in and above high_in are clipped; that is values below low_in map to low_out, and those above high_in map to high_out.
  • 21. >> f = imread ('baby-BW.jpg'); >> g = imadjust (f, [0 1], [1 0]); >> imshow(f), figure, imshow (g); >> imshow(f), figure, imshow (g); >> g = imadjust (f, [0.5 0.75], [0 1], .5); >> imshow(f), figure, imshow (g);