SlideShare uma empresa Scribd logo
1 de 32
Vision system
   (image processing)
By: karim ahmed abuamu
Image Representation



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 integers

Digital images can be created by a variety of input devices and
 techniques:

   digital cameras,
   scanners,
   coordinate measuring machines etc.
Representation of Digital Images
Types of Images


Digital images can be classified according to number and nature
 of those samples
  Binary
  Grayscale
  Color
Binary Images


A binary image is a digital image that has only two possible
 values for each pixel

Binary images are also called bi-level or two-level


Binary images often arise in digital image processing as masks or
 as the result of certain operations such as segmentation,
 thresholding.
Grayscale Image   Binary Image
Grayscale Images


A grayscale digital image is an image in which the value of each
 pixel is a single sample.

Displayed images of this sort are typically composed of shades of
 gray, varying from black at the weakest intensity to white at the
 strongest.

The values of intensity image ranges from 0 to 255.
Grayscale Image
True color images


A true color image is stored as an m-by-n-by-3 data array that
 defines red, green, and blue color components for each individual
 pixel.

The RGB color space is commonly used in computer displays
True color Image
Image segmentation

In computer vision, image segmentation is the process of partitioning a
digital image into multiple segments (sets of pixels, also known as superpixels).

The goal of segmentation is to simplify and/or change the representation of an image
into something that is more meaningful and easier to analyze.

Image segmentation is typically used to locate objects and boundaries (lines, curves,
etc.) in images. More precisely, image segmentation is the process of assigning a
label to every pixel in an image such that pixels with the same label share certain
visual characteristics.
Histograms

 o A tool that is used often in image analysis .
o The (intensity or brightness) histogram shows how many
     times a particular grey level appears in an image.
 o For example, 0 - black, 255 – white.
                            7

    0   1   1   2   4       6
                            5

    2   1   0   0   2       4
                            3
    5   2   0   0   4       2
                            1
    1   1   2   4   1       0
                                0   1      2   3    4   5   6


        image                           histogram
Histogram Features


An image has low contrast when the complete range of possible
values is not used. Inspection of the histogram shows this
lack of contrast.
Histogram Equalization
Thresholding (image processing)


Threshold converts each pixel into black, white or unchanged depending on
whether the original color value is within the threshold range.

Thresholding is usually the first step in any segmentation




Single value thresholding can be given mathematically as follows:


                     1 if f ( x, y ) > T
        g ( x, y ) = 
                     0 if f ( x, y ) ≤ T
Imagine a poker playing robot that needs to visually interpret the cards in
its hand




             Original Image                            Thresholded Image
If you get the threshold wrong the results can be disastrous




           Threshold Too Low                          Threshold Too High
Basic Global Thresholding

 Based on the histogram of an image Partition the image histogram using a
 single global threshold


 The success of this technique very strongly depends on how well the histogram
 can be partitioned

The basic global threshold, T, is calculated as follows:

       1.   Select an initial estimate for T (typically the average grey level in the
            image)
       2.   Segment the image using T to produce two groups of pixels: G1
            consisting of pixels with grey levels >T and G2 consisting pixels with grey
            levels ≤ T
       3.   Compute the average grey levels of pixels in G1 to give μ1 and G2 to give
            μ2
4.   Compute a new threshold value:

                      µ1 + µ 2
                   T=
                         2
       5.   Repeat steps 2 – 4 until the difference in T in successive iterations is
            less than a predefined limit T∞




This algorithm works very well for finding thresholds when the histogram is suitable
Thresholding Example 1
Thresholding Example 2
Problems With Single Value Thresholding


Single value thresholding only works for bimodal histograms
Images with other kinds of histograms need more than a single threshold
Single value thresholding only works for bimodal histograms
Images with other kinds of histograms need more than a single threshold
Thank You

Mais conteúdo relacionado

Mais procurados

Introduction to Image Compression
Introduction to Image CompressionIntroduction to Image Compression
Introduction to Image CompressionKalyan Acharjya
 
Anti- aliasing computer graphics
Anti- aliasing computer graphicsAnti- aliasing computer graphics
Anti- aliasing computer graphicsSafayet Hossain
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and SegmentationA B Shinde
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial DomainA B Shinde
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 
Image Processing Basics
Image Processing BasicsImage Processing Basics
Image Processing BasicsA B Shinde
 
Boundary Extraction
Boundary ExtractionBoundary Extraction
Boundary ExtractionMaria Akther
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram ProcessingAmnaakhaan
 
HSI MODEL IN COLOR IMAGE PROCESSING
HSI MODEL IN COLOR IMAGE PROCESSING HSI MODEL IN COLOR IMAGE PROCESSING
HSI MODEL IN COLOR IMAGE PROCESSING anam singla
 
Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Moe Moe Myint
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processingkumari36
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit NotesAAKANKSHA JAIN
 
Mpeg video compression
Mpeg video compressionMpeg video compression
Mpeg video compressionGem WeBlog
 

Mais procurados (20)

Introduction to Image Compression
Introduction to Image CompressionIntroduction to Image Compression
Introduction to Image Compression
 
Anti- aliasing computer graphics
Anti- aliasing computer graphicsAnti- aliasing computer graphics
Anti- aliasing computer graphics
 
Chap6 image restoration
Chap6 image restorationChap6 image restoration
Chap6 image restoration
 
Background subtraction
Background subtractionBackground subtraction
Background subtraction
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Image Processing Basics
Image Processing BasicsImage Processing Basics
Image Processing Basics
 
Boundary Extraction
Boundary ExtractionBoundary Extraction
Boundary Extraction
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram Processing
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
HSI MODEL IN COLOR IMAGE PROCESSING
HSI MODEL IN COLOR IMAGE PROCESSING HSI MODEL IN COLOR IMAGE PROCESSING
HSI MODEL IN COLOR IMAGE PROCESSING
 
Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processing
 
Image Compression
Image CompressionImage Compression
Image Compression
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
Mpeg video compression
Mpeg video compressionMpeg video compression
Mpeg video compression
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
 

Semelhante a Image processing

ModuleII.ppt
ModuleII.pptModuleII.ppt
ModuleII.pptSKILL2021
 
Histogram based Enhancement
Histogram based Enhancement Histogram based Enhancement
Histogram based Enhancement Vivek V
 
Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancementliba manopriya.J
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1shabanam tamboli
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptShabanamTamboli1
 
Image Segmentation.ppt
Image Segmentation.pptImage Segmentation.ppt
Image Segmentation.pptakshaya870130
 
project presentation-90-MCS-200003.pptx
project presentation-90-MCS-200003.pptxproject presentation-90-MCS-200003.pptx
project presentation-90-MCS-200003.pptxNiladriBhattacharjee10
 
Multimedia digital images
 Multimedia  digital images Multimedia  digital images
Multimedia digital imagesMohammad Dwikat
 
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...IJMER
 
Spatial and tonal resolution
Spatial and tonal resolutionSpatial and tonal resolution
Spatial and tonal resolutionSIES GST
 
Dip digital image 3
Dip digital image 3Dip digital image 3
Dip digital image 3Shajun Nisha
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...Hemantha Kulathilake
 
Icdecs 2011
Icdecs 2011Icdecs 2011
Icdecs 2011garudht
 

Semelhante a Image processing (20)

h.pdf
h.pdfh.pdf
h.pdf
 
ModuleII.ppt
ModuleII.pptModuleII.ppt
ModuleII.ppt
 
ModuleII.ppt
ModuleII.pptModuleII.ppt
ModuleII.ppt
 
ModuleII.ppt
ModuleII.pptModuleII.ppt
ModuleII.ppt
 
Histogram based Enhancement
Histogram based Enhancement Histogram based Enhancement
Histogram based Enhancement
 
Histogram based enhancement
Histogram based enhancementHistogram based enhancement
Histogram based enhancement
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.ppt
 
Image Segmentation.ppt
Image Segmentation.pptImage Segmentation.ppt
Image Segmentation.ppt
 
IR.pptx
IR.pptxIR.pptx
IR.pptx
 
DIP.ppt
DIP.pptDIP.ppt
DIP.ppt
 
project presentation-90-MCS-200003.pptx
project presentation-90-MCS-200003.pptxproject presentation-90-MCS-200003.pptx
project presentation-90-MCS-200003.pptx
 
Multimedia digital images
 Multimedia  digital images Multimedia  digital images
Multimedia digital images
 
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
Comparison of Histogram Equalization Techniques for Image Enhancement of Gray...
 
Spatial and tonal resolution
Spatial and tonal resolutionSpatial and tonal resolution
Spatial and tonal resolution
 
Dip digital image 3
Dip digital image 3Dip digital image 3
Dip digital image 3
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Icdecs 2011
Icdecs 2011Icdecs 2011
Icdecs 2011
 
CLASS 1.1.pptx
CLASS 1.1.pptxCLASS 1.1.pptx
CLASS 1.1.pptx
 

Mais de abuamo

Electronic cooling
Electronic coolingElectronic cooling
Electronic coolingabuamo
 
Hydraulic cushions
Hydraulic cushionsHydraulic cushions
Hydraulic cushionsabuamo
 
GENETIC ALGORITHM ( GA )
GENETIC ALGORITHM ( GA )GENETIC ALGORITHM ( GA )
GENETIC ALGORITHM ( GA )abuamo
 
CONTINOUS VARIABLE TRANSMISSION
CONTINOUS  VARIABLE  TRANSMISSIONCONTINOUS  VARIABLE  TRANSMISSION
CONTINOUS VARIABLE TRANSMISSIONabuamo
 
Quarter model of passive suspension system with simscape
Quarter model of passive suspension system with simscapeQuarter model of passive suspension system with simscape
Quarter model of passive suspension system with simscapeabuamo
 
Semiconductors materials
Semiconductors materialsSemiconductors materials
Semiconductors materialsabuamo
 

Mais de abuamo (6)

Electronic cooling
Electronic coolingElectronic cooling
Electronic cooling
 
Hydraulic cushions
Hydraulic cushionsHydraulic cushions
Hydraulic cushions
 
GENETIC ALGORITHM ( GA )
GENETIC ALGORITHM ( GA )GENETIC ALGORITHM ( GA )
GENETIC ALGORITHM ( GA )
 
CONTINOUS VARIABLE TRANSMISSION
CONTINOUS  VARIABLE  TRANSMISSIONCONTINOUS  VARIABLE  TRANSMISSION
CONTINOUS VARIABLE TRANSMISSION
 
Quarter model of passive suspension system with simscape
Quarter model of passive suspension system with simscapeQuarter model of passive suspension system with simscape
Quarter model of passive suspension system with simscape
 
Semiconductors materials
Semiconductors materialsSemiconductors materials
Semiconductors materials
 

Último

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 

Último (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 

Image processing

  • 1. Vision system (image processing) By: karim ahmed abuamu
  • 2. Image Representation 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 integers Digital images can be created by a variety of input devices and techniques:  digital cameras,  scanners,  coordinate measuring machines etc.
  • 4. Types of Images Digital images can be classified according to number and nature of those samples  Binary  Grayscale  Color
  • 5. Binary Images A binary image is a digital image that has only two possible values for each pixel Binary images are also called bi-level or two-level Binary images often arise in digital image processing as masks or as the result of certain operations such as segmentation, thresholding.
  • 6. Grayscale Image Binary Image
  • 7. Grayscale Images A grayscale digital image is an image in which the value of each pixel is a single sample. Displayed images of this sort are typically composed of shades of gray, varying from black at the weakest intensity to white at the strongest. The values of intensity image ranges from 0 to 255.
  • 9. True color images A true color image is stored as an m-by-n-by-3 data array that defines red, green, and blue color components for each individual pixel. The RGB color space is commonly used in computer displays
  • 11. Image segmentation In computer vision, image segmentation is the process of partitioning a digital image into multiple segments (sets of pixels, also known as superpixels). The goal of segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze. Image segmentation is typically used to locate objects and boundaries (lines, curves, etc.) in images. More precisely, image segmentation is the process of assigning a label to every pixel in an image such that pixels with the same label share certain visual characteristics.
  • 12. Histograms o A tool that is used often in image analysis . o The (intensity or brightness) histogram shows how many times a particular grey level appears in an image. o For example, 0 - black, 255 – white. 7 0 1 1 2 4 6 5 2 1 0 0 2 4 3 5 2 0 0 4 2 1 1 1 2 4 1 0 0 1 2 3 4 5 6 image histogram
  • 13. Histogram Features An image has low contrast when the complete range of possible values is not used. Inspection of the histogram shows this lack of contrast.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 22.
  • 23. Thresholding (image processing) Threshold converts each pixel into black, white or unchanged depending on whether the original color value is within the threshold range. Thresholding is usually the first step in any segmentation Single value thresholding can be given mathematically as follows: 1 if f ( x, y ) > T g ( x, y ) =  0 if f ( x, y ) ≤ T
  • 24. Imagine a poker playing robot that needs to visually interpret the cards in its hand Original Image Thresholded Image
  • 25. If you get the threshold wrong the results can be disastrous Threshold Too Low Threshold Too High
  • 26. Basic Global Thresholding Based on the histogram of an image Partition the image histogram using a single global threshold The success of this technique very strongly depends on how well the histogram can be partitioned The basic global threshold, T, is calculated as follows: 1. Select an initial estimate for T (typically the average grey level in the image) 2. Segment the image using T to produce two groups of pixels: G1 consisting of pixels with grey levels >T and G2 consisting pixels with grey levels ≤ T 3. Compute the average grey levels of pixels in G1 to give μ1 and G2 to give μ2
  • 27. 4. Compute a new threshold value: µ1 + µ 2 T= 2 5. Repeat steps 2 – 4 until the difference in T in successive iterations is less than a predefined limit T∞ This algorithm works very well for finding thresholds when the histogram is suitable
  • 30. Problems With Single Value Thresholding Single value thresholding only works for bimodal histograms Images with other kinds of histograms need more than a single threshold
  • 31. Single value thresholding only works for bimodal histograms Images with other kinds of histograms need more than a single threshold