SlideShare a Scribd company logo
1 of 18
Digital Image
Processing
An Introduction to Digital Image Processing
with GNU Octave
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.
2
Types of digital image
1. Binary Image
• Binary: two possible values for each pixel, we only need one bit per
pixel.
• Each pixel is just black or white.
3
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.
4
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.
5
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.
6
Image Types
7
Example 4
Given the image ’’Lion.jpg’’, write a Matlab program to generate all
different image types and display all of them.
8
Example 5
Write a Matlab program that read an RGB image then separate it’s
three color channels.
9
Example 5 Cont.
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 6
Convert intensity image to index image
gray2ind - intensity image to index image
Indexed image
12
A=Imread(‘ cameraman.tif’);
[indimg,map]=Gray2ind(A);
Grayscale image
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
13
Grayscale image
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-dimensional matrix, all three values
will be the same.
14
Iminfo() function
15
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).
16
Simultaneous Contrast
There are a number of things to bear in mind:
Observed intensities vary as to the background.
17
Example 7
18

More Related Content

Similar to Sec 2.pptx

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
 
Ch2
Ch2Ch2
Ch2teba
 
Chapter 3 data representations
Chapter 3 data representationsChapter 3 data representations
Chapter 3 data representationsABDUmomo
 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subratSubrat Prasad
 
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
 
Image processing
Image processingImage processing
Image processingabuamo
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging SystemVrushali Lanjewar
 
06 cie552 image_manipulation
06 cie552 image_manipulation06 cie552 image_manipulation
06 cie552 image_manipulationElsayed Hemayed
 
Images in matlab
Images in matlabImages in matlab
Images in matlabAli Alvi
 
Comprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection AlgorithmComprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection AlgorithmCSCJournals
 
Programming in matlab lesson5
Programming in matlab lesson5Programming in matlab lesson5
Programming in matlab lesson5najmah17
 

Similar to Sec 2.pptx (20)

Matlab Working With Images
Matlab Working With ImagesMatlab Working With Images
Matlab Working With Images
 
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
 
Ch2
Ch2Ch2
Ch2
 
CLASS 1.1.pptx
CLASS 1.1.pptxCLASS 1.1.pptx
CLASS 1.1.pptx
 
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
 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subrat
 
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
 
Image processing
Image processingImage processing
Image processing
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging System
 
06 cie552 image_manipulation
06 cie552 image_manipulation06 cie552 image_manipulation
06 cie552 image_manipulation
 
Image processing report
Image processing reportImage processing report
Image processing report
 
Images in matlab
Images in matlabImages in matlab
Images in matlab
 
Shayek 10
Shayek 10Shayek 10
Shayek 10
 
Types of images
Types of imagesTypes of images
Types of images
 
Types of images
Types of imagesTypes of images
Types of images
 
Types of images
Types of imagesTypes of images
Types of images
 
Comprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection AlgorithmComprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection Algorithm
 
Programming in matlab lesson5
Programming in matlab lesson5Programming in matlab lesson5
Programming in matlab lesson5
 

Recently uploaded

The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...SOFTTECHHUB
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxMasterG
 
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
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?Paolo Missier
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)Wonjun Hwang
 

Recently uploaded (20)

The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
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
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
 

Sec 2.pptx

  • 1. 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. 2 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. 3
  • 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. 4
  • 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. 5
  • 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. 6
  • 8. Example 4 Given the image ’’Lion.jpg’’, write a Matlab program to generate all different image types and display all of them. 8
  • 9. Example 5 Write a Matlab program that read an RGB image then separate it’s three color channels. 9
  • 10. Example 5 Cont. Write a Matlab program that read an RGB image then separate it’s three color channels. 10
  • 11. Example 5 Cont. Write a Matlab program that read an RGB image then separate it’s three color channels. 11
  • 12. Example 6 Convert intensity image to index image gray2ind - intensity image to index image Indexed image 12 A=Imread(‘ cameraman.tif’); [indimg,map]=Gray2ind(A); 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 13 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-dimensional matrix, all three values will be the same. 14
  • 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). 16
  • 17. Simultaneous Contrast There are a number of things to bear in mind: Observed intensities vary as to the background. 17