SlideShare ist ein Scribd-Unternehmen logo
1 von 39
–Terry Pratchett
“Sooner or later all things are numbers, yes?”
Hasitha Ediriweera
Associate Software Engineer
Typefi Systems Pvt Ltd
AN INTRODUCTION TO
DIGITAL IMAGE PROCESSING WITH MATLAB
 What is Matlab, What is Image, What is Digital Image & Computer Imaging
 Computer Vision & Image Processing
 Natural Processor
 Image Matrix, RGB, Gray Scale & Binary image Matrix
 Extracting objects of specific colours from an image
 Count Number of objects
 Thresholding, Image segmentation
WHAT IS MATLAB.?
MATLAB is a numerical computing environment
which allows matrix manipulation,
plotting of functions and data,
implementation of algorithms ,
creation of user interfaces ,
and interfacing with programs
in other languages like C / C++ and Fortran.
WHAT IS IMAGE
An image is a single picture which represents
something. It may be a picture of a person, of
people or animals, or of an outdoor scene, or
a microphotograph of an electronic
component, or the result of medical imaging.
WHAT IS A DIGITAL IMAGE?
A digital image is a
representation of a
two- dimensional image
as a finite set of
digital values,
called picture elements
or pixels
COMPUTER IMAGING
It’s defined as the acquisition and processing of visual
information by computer.
• The ultimate receiver of information is:
– Computer
– Human visual system
• So we have two categories:-
– Computer vision
– Image processing
COMPUTER VISION AND IMAGE
PROCESSING
• In computer vision:
The processed output images
• In Image processing:
The output images are
for human consumption
VISION
Every technology comes from Nature:
• Eye - Sensor to acquire photons
• Brain - Processor to process photoelectric signals from eye
Step 1. Light(white light) falling on objects
Step 2. Eye lens focuses the light on retina
Step 3. Image formation on retina, and
Step 4. Developing electric potential on retina (Photoelectric effect)
Step 5. Optical nerves transmitting developed potentials to brain (Processor)
NATURAL PROCESSOR (BRAIN) –
PERCEPTION OF IMAGE
Hey, I got potentials of X
values
(Temporal lobe)
Yes, I know what does it
mean
(Frontal lobe)
To frontal lobe,
From Temporal lobe
COMPUTER VISION
• One of the computer vision fields is image analysis.
• It involves the examination of image data to facilitate
solving a vision problem.
• Image analysis has 2 topics:
– Feature extraction: acquiring higher level image
information
– Pattern classification taking these higher level of
information and identifying objects within the image
IMAGE MATRIX..?
Different types of images often used,
 Color – RGB -> remember cones in eyes?
 R –> 0-255
 G –> 0-255
 B –> 0-255
 Grayscale -> remember rods in eyes?
 0 – Pure black/white
 1-254 – Shades of black and white(gray)
 255 – Pure black/white
• Boolean
• 0- Pure black/white
• 1- Pure white/black
GRAYSCALE IMAGE
Pure black->0
Shades of black&white -> 1-
254
White-> 255
GRAYSCALE IMAGE
BINARY IMAGE
RGB IMAGE
RGB IMAGE CONT…
BORED WITH FUNDAMENTALS?
Things to keep in mind,
 Image -> 2 dimensional matrix of size(mxn)
Image processing -> Manipulating the values of each
element of the matrix
 From the above representation,
 f is an image
 f(0,0) -> single pixel of an image (similarly
for all values of f(x,y)
 f(0,0) = 0-255 for grayscale
0/1 for binary
0-255 for each of R,G and B
Extracting objects of specific colours from an image
From the image given below, how specific colour(say blue) can be
extracted?
Algorithm:
• Load an RGB image
• Get the size(mxn) of the image
• Create a new matrix of zeros of size mxn
• Read the values of R,G,B in each pixel while traversing
through every pixels of the image
• Restore pixels with required color to 1 and rest to 0 to the newly
created matrix
• Display the newly created matrix and the resultant image
would be the filtered image of specific color
Solution!
Input image:
Output image(Extracted blue objects):
Snippet:
c=imread('F:matlab sample images1.png');
[m,n,t]=size(c);
tmp=zeros(m,n);
for i=1:m
for j=1:n
if(c(i,j,1)==0 && c(i,j,2)==0 && c(i,j,3)==255)
tmp(i,j)=1;
end
end
end
imshow(tmp);
Count Number of objects in red colour
From the image, count t number of red objects,
Algorithm:
 Load the image
 Get the size of the image
 Find appropriate threshold level for red color
 Traverse through every pixel,
 Replace pixels with red threshold to 1 and remaining pixels to 0
 Find the objects with enclosed boundaries in the new image
 Count the boundaries to know number of objects
Solution!
Input image:
Output image(Extracted red objects):
Snippet:
c=imread('F:matlab sample
images1.png');
[m,n,t]=size(c);
tmp=zeros(m,n);
for i=1:m
for j=1:n
if(c(i,j,1)==255 && c(i,j,2)==0
&& c(i,j,3)==0)
tmp(i,j)=1;
end
end
end
imshow(tmp);
ss=bwboundaries(tmp);
num=length(ss);
Output: num = 3
How to count all objects irrespective of colour?
 Thresholding is used to segment an image by setting all pixels whose
intensity values are above a threshold to a foreground value and all the
remaining pixels to a background value.
 The pixels are partitioned depending on their intensity value
 Global Thresholding,
g(x,y) = 0, if f(x,y)<=T
g(x,y) = 1, if f(x,y)>T
g(x,y) = a, if f(x,y)>T2
g(x,y) = b, if T1<f(x,y)<=T2
g(x,y) = c, if f(x,y)<=T1
 Multiple
thresholding,
From the given image, Find the total number of objects present?
Algorithm:
 Load the image
 Convert the image into grayscale(incase of an RGB image)
 Fix a certain threshold level to be applied to the image
 Convert the image into binary by applying the threshold
level
 Count the boundaries to count the number of objects
Solution!
At 0.25 threshold At 0.5 threshold
At 0.6 threshold At 0.75 threshold
Snippet:
img=imread('F:matlab sample imagescolor.png');
img1=rgb2gray(img);
Thresholdvalue=0.75;
img2=im2bw(img1,Thresholdvalue);
figure,imshow(img2);
% to detect num of objects
B=bwboundaries(img2);
num=length(B);
Drawing bounding box over objects
Snippet:
img=imread('F:matlab sample imagescolor.png');
img1=rgb2gray(img);
Thresholdvalue=0.75;
img2=im2bw(img1,Thresholdvalue);
figure,imshow(img2);
% to detect num of objects
B=bwboundaries(img2);
num=length(B);
% to draw bow over objects
figure,imshow(img2);
hold on;
for k=1:length(B),
boundary = B{k};
plot(boundary(:,2), boundary(:,1), 'r','LineWidth',2);
end
Image segmentation
• Given an image of English alphabets, segment each and every alphabets
• Perform basic morphological operations on the letters
• Detect edges
• Filter the noises if any
• Replace the pixel with maximum value found in the defined pixel set
(dilate)
• Fill the holes in the images
• Label every blob in the image
• Draw the bounding box over each detected blob
output
Snippet:
a=imread('F:matlab sample imagesMYWORDS.png');
im=rgb2gray(a);
c=edge(im);
se = strel('square',8);
I= imdilate(c, se);
img=imfill(I,'holes');
figure,imshow(img);
[Ilabel num] = bwlabel(img);
disp(num);
Iprops = regionprops(Ilabel);
Ibox = [Iprops.BoundingBox];
Ibox = reshape(Ibox,[4 num]);
imshow(I)
hold on;
for cnt = 1:num
rectangle('position',Ibox(:,cnt),'edgecolor','r');
end
Simple image matching using colour
Algorithm:
• Load images to be matched
• convert images to type double
• reduce three channel
• Calculate the Normalized Histogram
• Calculate the histogram error and display the result
• Find the match percentage,
output
APPLICATIONS
of Image Processing
APPLICATIONS CONT.
–Terry Pratchett
“Sooner or later all things are numbers, yes?”
Don’t forget..
Q & A

Weitere ähnliche Inhalte

Was ist angesagt?

Image proceesing with matlab
Image proceesing with matlabImage proceesing with matlab
Image proceesing with matlabAshutosh Shahi
 
Image processing on matlab presentation
Image processing on matlab presentationImage processing on matlab presentation
Image processing on matlab presentationNaatchammai Ramanathan
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlabneetirajsinh
 
Basics of Image Processing using MATLAB
Basics of Image Processing using MATLABBasics of Image Processing using MATLAB
Basics of Image Processing using MATLABvkn13
 
Working with images in matlab graphics
Working with images in matlab graphicsWorking with images in matlab graphics
Working with images in matlab graphicsmustafa_92
 
Image processing basics using matlab
Image processing basics using matlabImage processing basics using matlab
Image processing basics using matlabAnkur Tyagi
 
Coin recognition using matlab
Coin recognition using matlabCoin recognition using matlab
Coin recognition using matlabslmnsvn
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlabAman Gupta
 
Image enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid techniqueImage enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid techniqueRahul Yadav
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlabminhtaispkt
 
1.arithmetic & logical operations
1.arithmetic & logical operations1.arithmetic & logical operations
1.arithmetic & logical operationsmukesh bhardwaj
 
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
 
Introduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab ToolboxIntroduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab ToolboxShahriar Yazdipour
 
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...Image Processing using Matlab ( using a built in Matlab function(Histogram eq...
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...Majd Khaleel
 
Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainMostafa G. M. Mostafa
 
Introduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLABIntroduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLABRay Phan
 
Digital image processing using matlab
Digital image processing using matlab Digital image processing using matlab
Digital image processing using matlab Amr Rashed
 
Image analysis using python
Image analysis using pythonImage analysis using python
Image analysis using pythonJerlyn Manohar
 
Dip digital image 3
Dip digital image 3Dip digital image 3
Dip digital image 3Shajun Nisha
 

Was ist angesagt? (20)

Image proceesing with matlab
Image proceesing with matlabImage proceesing with matlab
Image proceesing with matlab
 
Image processing on matlab presentation
Image processing on matlab presentationImage processing on matlab presentation
Image processing on matlab presentation
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 
Basics of Image Processing using MATLAB
Basics of Image Processing using MATLABBasics of Image Processing using MATLAB
Basics of Image Processing using MATLAB
 
Working with images in matlab graphics
Working with images in matlab graphicsWorking with images in matlab graphics
Working with images in matlab graphics
 
Image processing basics using matlab
Image processing basics using matlabImage processing basics using matlab
Image processing basics using matlab
 
Coin recognition using matlab
Coin recognition using matlabCoin recognition using matlab
Coin recognition using matlab
 
Image processing
Image processingImage processing
Image processing
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 
Image enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid techniqueImage enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid technique
 
Image processing with matlab
Image processing with matlabImage processing with matlab
Image processing with matlab
 
1.arithmetic & logical operations
1.arithmetic & logical operations1.arithmetic & logical operations
1.arithmetic & logical operations
 
Matlab and Image Processing Workshop-SKERG
Matlab and Image Processing Workshop-SKERG Matlab and Image Processing Workshop-SKERG
Matlab and Image Processing Workshop-SKERG
 
Introduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab ToolboxIntroduction in Image Processing Matlab Toolbox
Introduction in Image Processing Matlab Toolbox
 
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...Image Processing using Matlab ( using a built in Matlab function(Histogram eq...
Image Processing using Matlab ( using a built in Matlab function(Histogram eq...
 
Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial Domain
 
Introduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLABIntroduction to Digital Image Processing Using MATLAB
Introduction to Digital Image Processing Using MATLAB
 
Digital image processing using matlab
Digital image processing using matlab Digital image processing using matlab
Digital image processing using matlab
 
Image analysis using python
Image analysis using pythonImage analysis using python
Image analysis using python
 
Dip digital image 3
Dip digital image 3Dip digital image 3
Dip digital image 3
 

Ähnlich wie ImageProcessingWithMatlab(HasithaEdiriweera)

Image_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.pptImage_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.pptLOUISSEVERINOROMANO
 
Image processing tool box.pptx
Image processing tool box.pptxImage processing tool box.pptx
Image processing tool box.pptxAvinashJain66
 
BMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialBMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialpotaters
 
Programming in matlab lesson5
Programming in matlab lesson5Programming in matlab lesson5
Programming in matlab lesson5najmah17
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging SystemVrushali Lanjewar
 
Matlab intro
Matlab introMatlab intro
Matlab introfvijayami
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab SangeethaSasi1
 
computervision1.pdf it is about computer vision
computervision1.pdf it is about computer visioncomputervision1.pdf it is about computer vision
computervision1.pdf it is about computer visionshesnasuneer
 
Final image processing
Final image processingFinal image processing
Final image processingSharanjit Kaur
 
DIGITAL_SIGNAL_AND_IMAGE_PROCESSING_USIN.pptx
DIGITAL_SIGNAL_AND_IMAGE_PROCESSING_USIN.pptxDIGITAL_SIGNAL_AND_IMAGE_PROCESSING_USIN.pptx
DIGITAL_SIGNAL_AND_IMAGE_PROCESSING_USIN.pptxMdMojnuMiah3
 
Final Report for project
Final Report for projectFinal Report for project
Final Report for projectRajarshi Roy
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingAnkur Nanda
 

Ähnlich wie ImageProcessingWithMatlab(HasithaEdiriweera) (20)

Image_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.pptImage_Processing_LECTURE_c#_programming.ppt
Image_Processing_LECTURE_c#_programming.ppt
 
Dip day1&2
Dip day1&2Dip day1&2
Dip day1&2
 
Image processing
Image processingImage processing
Image processing
 
Image processing
Image processingImage processing
Image processing
 
Report
ReportReport
Report
 
Image processing tool box.pptx
Image processing tool box.pptxImage processing tool box.pptx
Image processing tool box.pptx
 
Image processing in MATLAB
Image processing in MATLABImage processing in MATLAB
Image processing in MATLAB
 
mini prjt
mini prjtmini prjt
mini prjt
 
BMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorialBMVA summer school MATLAB programming tutorial
BMVA summer school MATLAB programming tutorial
 
Programming in matlab lesson5
Programming in matlab lesson5Programming in matlab lesson5
Programming in matlab lesson5
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging System
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab
 
Image processing
Image processingImage processing
Image processing
 
computervision1.pdf it is about computer vision
computervision1.pdf it is about computer visioncomputervision1.pdf it is about computer vision
computervision1.pdf it is about computer vision
 
Final image processing
Final image processingFinal image processing
Final image processing
 
Log polar coordinates
Log polar coordinatesLog polar coordinates
Log polar coordinates
 
DIGITAL_SIGNAL_AND_IMAGE_PROCESSING_USIN.pptx
DIGITAL_SIGNAL_AND_IMAGE_PROCESSING_USIN.pptxDIGITAL_SIGNAL_AND_IMAGE_PROCESSING_USIN.pptx
DIGITAL_SIGNAL_AND_IMAGE_PROCESSING_USIN.pptx
 
Final Report for project
Final Report for projectFinal Report for project
Final Report for project
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 

ImageProcessingWithMatlab(HasithaEdiriweera)

  • 1. –Terry Pratchett “Sooner or later all things are numbers, yes?” Hasitha Ediriweera Associate Software Engineer Typefi Systems Pvt Ltd
  • 2. AN INTRODUCTION TO DIGITAL IMAGE PROCESSING WITH MATLAB  What is Matlab, What is Image, What is Digital Image & Computer Imaging  Computer Vision & Image Processing  Natural Processor  Image Matrix, RGB, Gray Scale & Binary image Matrix  Extracting objects of specific colours from an image  Count Number of objects  Thresholding, Image segmentation
  • 3. WHAT IS MATLAB.? MATLAB is a numerical computing environment which allows matrix manipulation, plotting of functions and data, implementation of algorithms , creation of user interfaces , and interfacing with programs in other languages like C / C++ and Fortran.
  • 4. WHAT IS IMAGE An image is a single picture which represents something. It may be a picture of a person, of people or animals, or of an outdoor scene, or a microphotograph of an electronic component, or the result of medical imaging.
  • 5. WHAT IS A DIGITAL IMAGE? A digital image is a representation of a two- dimensional image as a finite set of digital values, called picture elements or pixels
  • 6. COMPUTER IMAGING It’s defined as the acquisition and processing of visual information by computer. • The ultimate receiver of information is: – Computer – Human visual system • So we have two categories:- – Computer vision – Image processing
  • 7. COMPUTER VISION AND IMAGE PROCESSING • In computer vision: The processed output images • In Image processing: The output images are for human consumption
  • 8. VISION Every technology comes from Nature: • Eye - Sensor to acquire photons • Brain - Processor to process photoelectric signals from eye Step 1. Light(white light) falling on objects Step 2. Eye lens focuses the light on retina Step 3. Image formation on retina, and Step 4. Developing electric potential on retina (Photoelectric effect) Step 5. Optical nerves transmitting developed potentials to brain (Processor)
  • 9. NATURAL PROCESSOR (BRAIN) – PERCEPTION OF IMAGE Hey, I got potentials of X values (Temporal lobe) Yes, I know what does it mean (Frontal lobe) To frontal lobe, From Temporal lobe
  • 10. COMPUTER VISION • One of the computer vision fields is image analysis. • It involves the examination of image data to facilitate solving a vision problem. • Image analysis has 2 topics: – Feature extraction: acquiring higher level image information – Pattern classification taking these higher level of information and identifying objects within the image
  • 11. IMAGE MATRIX..? Different types of images often used,  Color – RGB -> remember cones in eyes?  R –> 0-255  G –> 0-255  B –> 0-255  Grayscale -> remember rods in eyes?  0 – Pure black/white  1-254 – Shades of black and white(gray)  255 – Pure black/white • Boolean • 0- Pure black/white • 1- Pure white/black
  • 12. GRAYSCALE IMAGE Pure black->0 Shades of black&white -> 1- 254 White-> 255
  • 18. Things to keep in mind,  Image -> 2 dimensional matrix of size(mxn) Image processing -> Manipulating the values of each element of the matrix  From the above representation,  f is an image  f(0,0) -> single pixel of an image (similarly for all values of f(x,y)  f(0,0) = 0-255 for grayscale 0/1 for binary 0-255 for each of R,G and B
  • 19. Extracting objects of specific colours from an image From the image given below, how specific colour(say blue) can be extracted?
  • 20. Algorithm: • Load an RGB image • Get the size(mxn) of the image • Create a new matrix of zeros of size mxn • Read the values of R,G,B in each pixel while traversing through every pixels of the image • Restore pixels with required color to 1 and rest to 0 to the newly created matrix • Display the newly created matrix and the resultant image would be the filtered image of specific color
  • 21. Solution! Input image: Output image(Extracted blue objects): Snippet: c=imread('F:matlab sample images1.png'); [m,n,t]=size(c); tmp=zeros(m,n); for i=1:m for j=1:n if(c(i,j,1)==0 && c(i,j,2)==0 && c(i,j,3)==255) tmp(i,j)=1; end end end imshow(tmp);
  • 22. Count Number of objects in red colour From the image, count t number of red objects,
  • 23. Algorithm:  Load the image  Get the size of the image  Find appropriate threshold level for red color  Traverse through every pixel,  Replace pixels with red threshold to 1 and remaining pixels to 0  Find the objects with enclosed boundaries in the new image  Count the boundaries to know number of objects
  • 24. Solution! Input image: Output image(Extracted red objects): Snippet: c=imread('F:matlab sample images1.png'); [m,n,t]=size(c); tmp=zeros(m,n); for i=1:m for j=1:n if(c(i,j,1)==255 && c(i,j,2)==0 && c(i,j,3)==0) tmp(i,j)=1; end end end imshow(tmp); ss=bwboundaries(tmp); num=length(ss); Output: num = 3
  • 25. How to count all objects irrespective of colour?  Thresholding is used to segment an image by setting all pixels whose intensity values are above a threshold to a foreground value and all the remaining pixels to a background value.  The pixels are partitioned depending on their intensity value  Global Thresholding, g(x,y) = 0, if f(x,y)<=T g(x,y) = 1, if f(x,y)>T g(x,y) = a, if f(x,y)>T2 g(x,y) = b, if T1<f(x,y)<=T2 g(x,y) = c, if f(x,y)<=T1  Multiple thresholding,
  • 26. From the given image, Find the total number of objects present?
  • 27. Algorithm:  Load the image  Convert the image into grayscale(incase of an RGB image)  Fix a certain threshold level to be applied to the image  Convert the image into binary by applying the threshold level  Count the boundaries to count the number of objects
  • 28. Solution! At 0.25 threshold At 0.5 threshold At 0.6 threshold At 0.75 threshold
  • 30. Drawing bounding box over objects
  • 31. Snippet: img=imread('F:matlab sample imagescolor.png'); img1=rgb2gray(img); Thresholdvalue=0.75; img2=im2bw(img1,Thresholdvalue); figure,imshow(img2); % to detect num of objects B=bwboundaries(img2); num=length(B); % to draw bow over objects figure,imshow(img2); hold on; for k=1:length(B), boundary = B{k}; plot(boundary(:,2), boundary(:,1), 'r','LineWidth',2); end
  • 32. Image segmentation • Given an image of English alphabets, segment each and every alphabets • Perform basic morphological operations on the letters • Detect edges • Filter the noises if any • Replace the pixel with maximum value found in the defined pixel set (dilate) • Fill the holes in the images • Label every blob in the image • Draw the bounding box over each detected blob
  • 34. Snippet: a=imread('F:matlab sample imagesMYWORDS.png'); im=rgb2gray(a); c=edge(im); se = strel('square',8); I= imdilate(c, se); img=imfill(I,'holes'); figure,imshow(img); [Ilabel num] = bwlabel(img); disp(num); Iprops = regionprops(Ilabel); Ibox = [Iprops.BoundingBox]; Ibox = reshape(Ibox,[4 num]); imshow(I) hold on; for cnt = 1:num rectangle('position',Ibox(:,cnt),'edgecolor','r'); end
  • 35. Simple image matching using colour Algorithm: • Load images to be matched • convert images to type double • reduce three channel • Calculate the Normalized Histogram • Calculate the histogram error and display the result • Find the match percentage,
  • 39. –Terry Pratchett “Sooner or later all things are numbers, yes?” Don’t forget.. Q & A

Hinweis der Redaktion

  1. a scenario about Eye & Brain - Sensor to acquire photons and Processor to process photoelectric signals from eye
  2. Image analysis has 2 topics: – Feature extraction: acquiring higher level image information – Pattern classification taking these higher level of information and identifying objects within the image
  3. m by n matrix represent binary or grayscale image. because it can only contain 0,1 or 0-255 pixel value , Bt in RGB it similar bt, contain 3 values for each pixel..its for red,green and Blue. Simply its like 3 matrix.
  4. This is how we create RGB image using RED , GREEN and BLUE images. Simply if it is a RGB image, It contain 3 images.
  5. segment an image by setting all pixels whose intensity values are above a threshold to a foreground value and all the remaining pixels to a background value