SlideShare a Scribd company logo
1 of 28
Download to read offline
P R ES EN T ED BY
EM A N T A R EK
Digital Image
Processing
An Introduction to Digital Image Processing
with GNU Octave
2
1. Binary: Each pixel is just black or white. Since there are only two possible
values for each pixel (0,1), we only need one bit per pixel.
2. Grayscale: Each pixel is a shade of gray, normally from 0 (black) to 255
(white). This range means that each pixel can be represented by eight bits,
or exactly one byte. Other greyscale ranges are used, but generally they are
a power of 2.
3. True Color, or RGB: Each pixel has a particular color; that color is described
by the amount of red, green and blue in it. If each of these components has
a range 0–255, this gives a total of 2563 different possible colors. Such an
image is a “stack” of three matrices; representing the red, green and blue
values for each pixel. This means that for every pixel there correspond 3
values.
Types of digital image
3
1. Binary Image
• Binary: two possible values for each pixel, we only need one bit per
pixel.
• Each pixel is just black or white.
4
2. Grayscale Image
 Grayscale: Each pixel is a shade of grey, normally from .
 means that each pixel can be represented by eight bits, or exactly one
byte.
5
3. Color Image
 True color or RGB: here each pixel has a particular color, that color
being described by the amount of red, green and blue in it.
 Such an image may be considered as consisting of a stack of three
matrices; representing the red, green and blue values for each pixel.
 This means that for every pixel there correspond three values.
6
4. Indexed Image
 Indexed: Most color images only have a small subset of the more than
sixteen million possible colors.
 For convenience of storage and le handling, the image has an
associated color map.
7
Image Types
8
Example 4
Given the image ’’Lion.jpg’’, write a Matlab program to generate all
different image types and display all of them.
9
Example 5
Write a Matlab program that read an RGB image then separate it’s
three color channels.
10
Example 5 Cont.
Write a Matlab program that read an RGB image then separate it’s
three color channels.
11
Example 5 Cont.
Write a Matlab program that read an RGB image then separate it’s
three color channels.
12
Example 6
Convert intensity image to index image
gray2ind - intensity image to index image
A=Imread(‘ cameraman.tif’);
[indimg,map]=Gray2ind(A);
Indexed image
Grayscale image
13
Example 6 Cont.
Convert index image to intensity image
ind2gray - indexed image to intensity image
Code
Load trees
Imshow(X,map)
Grayimg=Ind2gray(X,map);
Imshow(Grayimg)
Indexed image
Grayscale image
14
Impixel(i,j) function
 A useful function for obtaining RGB values is impixel
returns the red, green, and blue values of the
pixel at column 200, row 100.
 This command also applies to grayscale images:
return three values, but since g is a single
two-dimensionalmatrix, all three values
will be the same.
15
Iminfo() function
16
Iminfo() function
we can see :
 the size of the image in pixels,
 the size of the file (in bytes),
 the number of bits per pixel (this is given by BitDepth),
 and the color type (in this case indexed).
17
Simultaneous Contrast
There are a number of things to bear in mind:
Observed intensities vary as to the background.
18
Example 7
19
 Spatial resolution is the density of pixels over the image:
 The greater the spatial resolution, the more pixels are used
to display the image.
 We can experiment with spatial resolution
with imresize function.
Suppose we have an 256*256 8-bit
grayscale image saved to the matrix x.
Then the command:
 will halve the size of the image….
Spatial Resolution
20
 B=imresize(A,scale)
 If scale is between 0 and 1 the return is less than the actual size.
 If scale is greater than 1the return is greater than the actual size.
Imresize() Function
21
 Greyscale images can be transformed into a sequence of
binary images by breaking them up into their bit-planes.
 We consider the grey value of each pixel of an 8-bit image
as an 8-bit binary word.
 The 0th bit plane consists of the last bit of each grey value.
 Since this bit has the least effect (least significant bit
plane).
 The 7th bit plane consists of the first bit in each value (most
significant bit plane).
Bit Planes
22
Bit plane Slicing
Instead of highlighting gray level images, highlight the contribution
made by specific bits s to total image appearance
23
Bit plane Slicing
plane 0  contains the lowest order bit of all the pixels in the image.
plane 7  contains the highest order bit of all the pixels in the image.
24
Bit plane Slicing
25
Bit plane Slicing
26
Example 8
Write a Matlab program that generate all bit planes of a gray scale
image
27
Example 8 Cont.
28
Bit plane Slicing
• Image reconstruction using n bit planes

More Related Content

What's hot

Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processingkiruthiammu
 
Chapter 6 color image processing
Chapter 6 color image processingChapter 6 color image processing
Chapter 6 color image processingasodariyabhavesh
 
Simultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color ImagesSimultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color ImagesCristina Pérez Benito
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processingAbinaya B
 
Multimedia communication jpeg
Multimedia communication jpegMultimedia communication jpeg
Multimedia communication jpegDr. Kapil Gupta
 
Predictive coding
Predictive codingPredictive coding
Predictive codingp_ayal
 
Digital Image Processing - Image Enhancement
Digital Image Processing  - Image EnhancementDigital Image Processing  - Image Enhancement
Digital Image Processing - Image EnhancementMathankumar S
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphicanku2266
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression modelslavanya marichamy
 
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standardsComparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standardsRishab2612
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantizationBCET, Balasore
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsJoseph Charles
 
Image enhancement techniques a review
Image enhancement techniques   a reviewImage enhancement techniques   a review
Image enhancement techniques a revieweSAT Journals
 
Erosion and dilation
Erosion and dilationErosion and dilation
Erosion and dilationAkhil .B
 
Contrast enhancement in digital images
Contrast enhancement in digital imagesContrast enhancement in digital images
Contrast enhancement in digital imagesSakher BELOUADAH
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGmuthu181188
 

What's hot (20)

Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
Chapter 6 color image processing
Chapter 6 color image processingChapter 6 color image processing
Chapter 6 color image processing
 
Simultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color ImagesSimultaneous Smoothing and Sharpening of Color Images
Simultaneous Smoothing and Sharpening of Color Images
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processing
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
 
Image compression models
Image compression modelsImage compression models
Image compression models
 
Multimedia communication jpeg
Multimedia communication jpegMultimedia communication jpeg
Multimedia communication jpeg
 
Predictive coding
Predictive codingPredictive coding
Predictive coding
 
Digital Image Processing - Image Enhancement
Digital Image Processing  - Image EnhancementDigital Image Processing  - Image Enhancement
Digital Image Processing - Image Enhancement
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
 
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standardsComparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantization
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methods
 
Image enhancement techniques a review
Image enhancement techniques   a reviewImage enhancement techniques   a review
Image enhancement techniques a review
 
Unit3 dip
Unit3 dipUnit3 dip
Unit3 dip
 
Erosion and dilation
Erosion and dilationErosion and dilation
Erosion and dilation
 
Image inpainting
Image inpaintingImage inpainting
Image inpainting
 
Contrast enhancement in digital images
Contrast enhancement in digital imagesContrast enhancement in digital images
Contrast enhancement in digital images
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSING
 

Similar to Sec 2.pdf

Multimedia graphics and image data representation
Multimedia graphics and image data representationMultimedia graphics and image data representation
Multimedia graphics and image data representationMazin Alwaaly
 
Unit i mm_chap3_graphics and image data representation
Unit i mm_chap3_graphics and image data representationUnit i mm_chap3_graphics and image data representation
Unit i mm_chap3_graphics and image data representationEellekwameowusu
 
Lecture 2-2023.pdf
Lecture 2-2023.pdfLecture 2-2023.pdf
Lecture 2-2023.pdfssuserff72e4
 
Lecture 2-2023.pdf
Lecture 2-2023.pdfLecture 2-2023.pdf
Lecture 2-2023.pdfssuserff72e4
 
Spatial and tonal resolution
Spatial and tonal resolutionSpatial and tonal resolution
Spatial and tonal resolutionSIES GST
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingAnkur Nanda
 
RGB Color Model and Monitor Resolution
RGB Color Model and Monitor ResolutionRGB Color Model and Monitor Resolution
RGB Color Model and Monitor ResolutionAdya Tiwari
 
Multimedia digital images
 Multimedia  digital images Multimedia  digital images
Multimedia digital imagesMohammad Dwikat
 
Programming in matlab lesson5
Programming in matlab lesson5Programming in matlab lesson5
Programming in matlab lesson5najmah17
 
Chapter 3 data representations
Chapter 3 data representationsChapter 3 data representations
Chapter 3 data representationsABDUmomo
 
Comprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection AlgorithmComprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection AlgorithmCSCJournals
 
Images in matlab
Images in matlabImages in matlab
Images in matlabAli Alvi
 
Color
ColorColor
ColorFNian
 
Bitmap vs vectors image
Bitmap vs vectors imageBitmap vs vectors image
Bitmap vs vectors image31angel
 
WEB I - 08 - Digital Media
WEB I - 08 - Digital MediaWEB I - 08 - Digital Media
WEB I - 08 - Digital MediaRandy Connolly
 
06 cie552 image_manipulation
06 cie552 image_manipulation06 cie552 image_manipulation
06 cie552 image_manipulationElsayed Hemayed
 
Basics of image processing & analysis
Basics of image processing & analysisBasics of image processing & analysis
Basics of image processing & analysisMohsin Siddique
 

Similar to Sec 2.pdf (20)

Sec 2.pptx
Sec 2.pptxSec 2.pptx
Sec 2.pptx
 
Multimedia graphics and image data representation
Multimedia graphics and image data representationMultimedia graphics and image data representation
Multimedia graphics and image data representation
 
Unit i mm_chap3_graphics and image data representation
Unit i mm_chap3_graphics and image data representationUnit i mm_chap3_graphics and image data representation
Unit i mm_chap3_graphics and image data representation
 
Lecture 2-2023.pdf
Lecture 2-2023.pdfLecture 2-2023.pdf
Lecture 2-2023.pdf
 
Lecture 2-2023.pdf
Lecture 2-2023.pdfLecture 2-2023.pdf
Lecture 2-2023.pdf
 
Spatial and tonal resolution
Spatial and tonal resolutionSpatial and tonal resolution
Spatial and tonal resolution
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
RGB Color Model and Monitor Resolution
RGB Color Model and Monitor ResolutionRGB Color Model and Monitor Resolution
RGB Color Model and Monitor Resolution
 
Multimedia digital images
 Multimedia  digital images Multimedia  digital images
Multimedia digital images
 
Image processing report
Image processing reportImage processing report
Image processing report
 
Programming in matlab lesson5
Programming in matlab lesson5Programming in matlab lesson5
Programming in matlab lesson5
 
Matlab practical ---2.pdf
Matlab practical ---2.pdfMatlab practical ---2.pdf
Matlab practical ---2.pdf
 
Chapter 3 data representations
Chapter 3 data representationsChapter 3 data representations
Chapter 3 data representations
 
Comprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection AlgorithmComprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection Algorithm
 
Images in matlab
Images in matlabImages in matlab
Images in matlab
 
Color
ColorColor
Color
 
Bitmap vs vectors image
Bitmap vs vectors imageBitmap vs vectors image
Bitmap vs vectors image
 
WEB I - 08 - Digital Media
WEB I - 08 - Digital MediaWEB I - 08 - Digital Media
WEB I - 08 - Digital Media
 
06 cie552 image_manipulation
06 cie552 image_manipulation06 cie552 image_manipulation
06 cie552 image_manipulation
 
Basics of image processing & analysis
Basics of image processing & analysisBasics of image processing & analysis
Basics of image processing & analysis
 

Recently uploaded

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 

Sec 2.pdf

  • 1. P R ES EN T ED BY EM A N T A R EK Digital Image Processing An Introduction to Digital Image Processing with GNU Octave
  • 2. 2 1. Binary: Each pixel is just black or white. Since there are only two possible values for each pixel (0,1), we only need one bit per pixel. 2. Grayscale: Each pixel is a shade of gray, normally from 0 (black) to 255 (white). This range means that each pixel can be represented by eight bits, or exactly one byte. Other greyscale ranges are used, but generally they are a power of 2. 3. True Color, or RGB: Each pixel has a particular color; that color is described by the amount of red, green and blue in it. If each of these components has a range 0–255, this gives a total of 2563 different possible colors. Such an image is a “stack” of three matrices; representing the red, green and blue values for each pixel. This means that for every pixel there correspond 3 values. Types of digital image
  • 3. 3 1. Binary Image • Binary: two possible values for each pixel, we only need one bit per pixel. • Each pixel is just black or white.
  • 4. 4 2. Grayscale Image  Grayscale: Each pixel is a shade of grey, normally from .  means that each pixel can be represented by eight bits, or exactly one byte.
  • 5. 5 3. Color Image  True color or RGB: here each pixel has a particular color, that color being described by the amount of red, green and blue in it.  Such an image may be considered as consisting of a stack of three matrices; representing the red, green and blue values for each pixel.  This means that for every pixel there correspond three values.
  • 6. 6 4. Indexed Image  Indexed: Most color images only have a small subset of the more than sixteen million possible colors.  For convenience of storage and le handling, the image has an associated color map.
  • 8. 8 Example 4 Given the image ’’Lion.jpg’’, write a Matlab program to generate all different image types and display all of them.
  • 9. 9 Example 5 Write a Matlab program that read an RGB image then separate it’s three color channels.
  • 10. 10 Example 5 Cont. Write a Matlab program that read an RGB image then separate it’s three color channels.
  • 11. 11 Example 5 Cont. Write a Matlab program that read an RGB image then separate it’s three color channels.
  • 12. 12 Example 6 Convert intensity image to index image gray2ind - intensity image to index image A=Imread(‘ cameraman.tif’); [indimg,map]=Gray2ind(A); Indexed image Grayscale image
  • 13. 13 Example 6 Cont. Convert index image to intensity image ind2gray - indexed image to intensity image Code Load trees Imshow(X,map) Grayimg=Ind2gray(X,map); Imshow(Grayimg) Indexed image Grayscale image
  • 14. 14 Impixel(i,j) function  A useful function for obtaining RGB values is impixel returns the red, green, and blue values of the pixel at column 200, row 100.  This command also applies to grayscale images: return three values, but since g is a single two-dimensionalmatrix, all three values will be the same.
  • 16. 16 Iminfo() function we can see :  the size of the image in pixels,  the size of the file (in bytes),  the number of bits per pixel (this is given by BitDepth),  and the color type (in this case indexed).
  • 17. 17 Simultaneous Contrast There are a number of things to bear in mind: Observed intensities vary as to the background.
  • 19. 19  Spatial resolution is the density of pixels over the image:  The greater the spatial resolution, the more pixels are used to display the image.  We can experiment with spatial resolution with imresize function. Suppose we have an 256*256 8-bit grayscale image saved to the matrix x. Then the command:  will halve the size of the image…. Spatial Resolution
  • 20. 20  B=imresize(A,scale)  If scale is between 0 and 1 the return is less than the actual size.  If scale is greater than 1the return is greater than the actual size. Imresize() Function
  • 21. 21  Greyscale images can be transformed into a sequence of binary images by breaking them up into their bit-planes.  We consider the grey value of each pixel of an 8-bit image as an 8-bit binary word.  The 0th bit plane consists of the last bit of each grey value.  Since this bit has the least effect (least significant bit plane).  The 7th bit plane consists of the first bit in each value (most significant bit plane). Bit Planes
  • 22. 22 Bit plane Slicing Instead of highlighting gray level images, highlight the contribution made by specific bits s to total image appearance
  • 23. 23 Bit plane Slicing plane 0  contains the lowest order bit of all the pixels in the image. plane 7  contains the highest order bit of all the pixels in the image.
  • 26. 26 Example 8 Write a Matlab program that generate all bit planes of a gray scale image
  • 28. 28 Bit plane Slicing • Image reconstruction using n bit planes