Unit 1 Chapter 1 Lecture 4

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 44

Apex Institute of Technology

Department of Computer Science & Engineering


Bachelor of Engineering (Computer Science & Engineering)
DIGITAL IMAGE PROCESSING– (20CST-481)
Prepared By: MR. Aadi Partap Singh (E15043)

Unit-1_Chapter-1_lecture-6_Image formats and color space DISCOVER . LEARN . EMPOWER


04/10/2024 1
DIGITAL IMAGE
PROCESSING
Course Objective:
During the course, students will be able :

CO
Title Level
Number Will be covered in
To Understand the fundamental of digital Understand this lecture
CO1 image processing with python.
To acquire the knowledge to apply various
CO2 Understand
image processing techniques and tools.
To learn the practical applications of
CO3 image processing steps to real world Understand
problem.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 2


DIGITAL IMAGE
PROCESSING
Course Outcome:
Upon successful completion of this course, students will be able to:

CO
Title Level
Number
Will be covered in
Fundaments and techniques implemented in
CO1
digital image processing technologies
Understand this lecture
Understanding the various filters applications,
CO2 smoothing applications and techniques by Understand
image processing implementation by python
Acquiring knowledge on various compression
CO3 and segmentation techniques, for image Understand
enhancement methods.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 3


Recap of Previous session
In previous session we tried understanding the below concept :
Stages of Image processing
Components of Image processing
Elements of digital image processing
What is Image resolution, and its importance
What is PPI & DPI ?
Lossless compression and Lossy compression

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 4


Welcome to the session of
Unit-1: Fundamentals of Image processing

Chapter-1: Introduction to Image Processing

Lecture-6: Image formats and color space

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 5


Agenda
Chapter:1 __Lecture: 6

 Introduction and concepts around Digital Image


 Discuss the various factors that apply to the
use of images in multimedia.
 Describe the capabilities and limitations of
bitmap images.
 Describe the capabilities and limitations of
vector images.
 Define various aspects of 3D modeling.
 Describe the use of colors and palettes in
multimedia. Cite the various file types used in
multimedia. Link:
https://medium.com/futframe-ai/fundamental-steps-of-digital-image-processing-d7518
d6bb23c

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 6


Types of Still Images
Still images are generated in two ways:
– Bitmaps (or raster-based) . Vector-
– drawn graphics.

Link: https://www.britannica.com/technology
04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 7
Bitmaps
• Bitmap is derived from the words ‘bit’, which means the simplest
element in which only two digits are used, and ‘map’, which is a two-
dimensional matrix of these bits.

• A bitmap is a data matrix describing the individual dots of an


image that are the smallest elements (pixels) of resolution on a
computer screen or prin

ter.

R. Gonzalez and R. Woods, “Digital Image Processing – 2 Ed i ti o n ”, Prenti ce Hall, 2 0 0 2


dn Link: https://www.britannica.com/technology/bitmap

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 8


• Example

Link: https://www.britannica.com/technology/bitmap

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 9


Bitmaps
• Bitmaps are an image format suited for creation of:

– Photo-realistic images. Complex


– drawings.
– Images that require fine detail.

• Bitmapped images are known as paint graphics.


• Bitmapped images can have varying bit and color depths.

Link: https://www.britannica.com/technology/bitmap

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 10


Bitmaps
• More bits provide more color depth, hence more photo-realism;
• but require more memory and processing power

Available binary Combinations for


Describing a Color

Link: https://www.britannica.com/technology/bitmap

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 11


• Bitmaps picture and their suitability of use:-
– Use the native Microsoft bmp format as a raw image that will later be processed. It faster to
process.
– Use JPEG, for photo sharing on the web because of its size and quality.

– GIF is normally used for diagrams, buttons, etc., that have a small number of colours

• It is also suitable for simple animation because it supports


interlaced images.

– PNG is almost equal to gif except that it didn’t support the animation format.

Link: https://www.britannica.com/technology/bitmap

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 12


Bitmaps
Bitmaps can be inserted by:
– Using clip art galleries. Using Clip Art
– bitmap software.
– Capturing and editing images. Scanning
– images.
Drawn

Scan Capture

Link: https://www.britannica.com/technology/bitmap

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 13


High Resolution Photo

Low resolution photo High resolution photo


• Any pictures found on the web normally are • A high resolution picture is determined by its
low resolution and not suitable for print quality. number of pixels; more pixels improves the
sharpness of the picture.

• A picture that is low-resolution cannot be made • This is print quality


into a high resolution photo

Link: https://www.britannica.com/technology/bitmap

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 14


Vector-Drawn Images v/s Bitmaps

• Vector images use less memory space and have a smaller file size (.svg) as compared to bitmaps.
• For the Web, pages that use vector graphics in plug-ins download faster, and when used for
animation, draw faster than bitmaps.
• Vector images cannot be used for photorealistic images.
• Vector images require a plug-in for Web- based display.
• Bitmaps are not easily scalable and resizable.
• Bitmaps can be converted to vector images using auto tracing.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 15


Computer Color Models
• Different ways of representing information about color.
• Models used to specify color in computer terms are:

 RGB model - A 24-bit methodology where color is specified in terms of red, green, and blue values
ranging from 0 to 255.
 HSB and HSL models – Color is specified as an angle from 0 to 360 degrees on a color wheel.
Other models include CMYK, CIE, YIQ, YUV, and YCC.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 16


Dithering
Dithering:
– Dithering is a process whereby the color value of each pixel is
changed to the closest matching color value in the target palette.
– This is done using a mathematical algorithm.

Link: https://www.ft.unicamp.br/docentes/magic/khoros/html-dip/c3/s7/front-page.html

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 17


Dithering

Original Picture Undeterred Picture Deterred Picture

Link: https://www.ft.unicamp.br/docentes/magic/khoros/html-dip/c3/s7/front-page.html

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 18


Image file formats
There are 5 main formats in which to store images
TIFF (also known as TIF)
JPEG (also known as JPG)
JPEG 2000
 GIF, file types ending in .gif
PNG, file types ending in .png
Raw image files
BMP Bitmap
WebP
SVG

Link: https://www.computerhope.com/jargon/f/file-formats.jpg

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 19


TIFF Image Format

TIFF images create very large file


sizes.
TIFF images are uncompressed
and thus contain a lot of detailed
image data (which is why the files
are so big) TIFFs are also
extremely flexible in terms of
color (they can be grayscale, or
CMYK for print, or RGB for web)
and content (layers, image tags). TIFF (also known as TIF), file types ending in .tif
TIFF stands for Tagged Image File Format.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 20


JPEG
• JPEG stands for Joint Photographic Experts
Group, which created this standard for this
type of image formatting.
• JPEG files are images that have been
compressed to store a lot of information in JPEG
a small-size file.
• Most digital cameras store photos in JPEG
format, because then you can take more
photos on one camera card than you can
with other formats.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 21


JPEG 2000
JPEG 2000 code streams are
regions of interest that offer several
mechanisms to support spatial random
access or region of interest access at
varying degrees of granularity. It is
possible to store different parts of the
same picture using different quality.

Link:https://en.wikipedia.org/wiki/JPEG_2000

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 22


GIF

This format compresses images but, as


different from JPEG, the compression is
lossless (no detail is lost in the
compression, but the file can’t be made
as small as a JPEG).

GIF stands for Graphic Interchange Format.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 23


PNG

• It was created as an open format to


replace GIF, because the patent for
GIF was owned by one company and
nobody else wanted to pay licensing
fees. It also allows for a full range of
color and better compression.

PNG stands for Portable Network Graphics.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 24


Raw image files
Raw image files contain data from a
digital camera (usually).
The files are called raw because they
haven’t been processed and therefore
can’t be edited or printed yet. There are
a lot of different raw formats–each
camera company often has its own
proprietary format.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 25


BMP Bitmap
• The BMP file format, also known
as bitmap image file, device
independent bitmap (DIB) file
format and bitmap, is a
raster graphics image file format used
to store bitmap digital images,
independently of the display device
(such as a graphics adapter),
especially on Microsoft Windows
and OS operating systems.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 26


WebP
• WebP is an image format
employing both lossy and
lossless compression. Format
developed by Google, based on
technology
• Format developed by Google
• Lossless and lossy compression;
small size, but comparable image
quality with JPEG

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 27


SVG

• SVG is a vector graphic format—based


on XML and is used to display a
variety of graphics on the Web and
other environments. SVG documents
are nothing more than simple plain
text files that describe lines, curves,
shapes, colors, and text.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 28


Descriptions and Uses of Different Image Types

Link: Practical machine learning and Image Processing by Himanshu Singh

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 29


Color space

• The organization of the colors of


in an image in a specific format
is called color space.
• The way in which a color is
represented is called a color
model.

https://en.wikipedia.org/wiki/Color_space

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 30


Color space
Each and every image uses one of the following color spaces for effective picture
representation:
RGB: red, green, blue
XYZ: color in the x, y, and z dimensions
HSV/HSL: hue, saturation, and value/hue, saturation, and lightness
LAB: luminance, and green–red and blue–yellow color components
LCH: lightness, chroma, and hue
YPbPr: green, blue, and red cables
YUV: brightness and chroma, or color
YIQ: luminance, in-phase parameter, and quadrature.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 31


RGB
The RGB color space, red, green, and
blue are mixed in different ways to
make different color combinations.
RGB color space has two more
components :
1. White point chromaticity
2. Gamma connection curve

https://www.teachengineering.org/makerchallenges/view/sp
fun_rgbcolor_maker1

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 32


XYZ
• Using XYZ, we can encode all the colors that exist in the real world. This color
space is called XYZ because it extrapolates RGB colors in three dimensions: x, y,
and z.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 33


HSV/HSL

HSV/HSL is an alternative
representation of the RGB color
space. It consists of the following
components:
• Hue
• Saturation
• Value
• Lightness

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 34


LAB
The LAB color space has three
components:
1.Luminance
2.a*, which is the green and red color
component
3.b*, which is the blue and yellow color
component The colors we can perceive,
and those we cannot, are included in
the LAB color space.
https://www.xrite.com/blog/lab-color-space

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 35


LCH

The LCH is similar to the LAB color space, but instead of using
cylindrical coordinates, it uses rectangular coordinates.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 36


YPbPr

The YPbPr color space is used in


video electronics, such as DVD
players.
It consists of following three
components:
1.Y: the green cable
2.Pb: the blue cable https://en.wikipedia.org/wiki/YPbPr

3.Pr: the red cable

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 37


DEFINITION

lossless and lossy compression


What are lossless and lossy compression?
Lossless and lossy file compression describe whether all original data can be recovered when the file is uncompressed.
With lossless compression, every bit of data originally in a file remains after it is uncompressed, and all the information is restored.
Lossy compression reduces a file by permanently eliminating certain information, especially redundant information.
When the file is uncompressed, some of the original information is not there, although the user may not notice it.
What is file compression?
Digital files such as image files are often "compressed" to reduce their size and/or to change various attributes, such as:
• file type
• dimensions
• resolution
• bit depth
Compression reduces the size of a file, often without appreciable loss of information. It can be either lossless or lossy.
A smaller-sized compressed file can be restored to its larger form -- in its entirety or with some data loss, depending on the
compression type -- by decompression.

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 38


Lossless compression vs. lossy compression
Lossless compression restores and rebuilds file data in its original form after the file is decompressed. For example, when a picture's file size is
compressed, its quality remains the same.
The file can be decompressed to its original quality without any loss of data. This compression method is also known as reversible compression.
With this method, although file sizes are reduced, the reduction is less compared to reduction using lossy compression.
In lossy compression, the data in a file is removed and not restored to its original form after decompression. Specifically, data is permanently
removed, which is why this method is also known as irreversible compression.
This data loss is not usually noticeable. However, the more a file is compressed, the more degradation occurs, and the loss eventually becomes
visible.
Lossy compression reduces file size much more than the file size achieved after lossless compression.
Algorithms used in lossless and lossy compression
Different kinds of algorithms are used to reduce file sizes in lossless and lossy compression.
The algorithms used in lossless compression are:
• Run Length Encoding
• Lempel-Ziv-Welch (LZW)
• Huffman Coding
• Arithmetic Encoding
The algorithms used in lossy compression are:
• Transform Coding
• Discrete Cosine Transform
• Discrete Wavelet Transform
• Fractal Compression
04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 39
04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 40
Summary
In todays session we tried understanding the below concept :
Colour spaces
Image formats with features

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 41


References:

 https://www.simplilearn.com/how-facebook-is-using-big-data-article?source=CTAexp
 https://www.icas.com/ca-today-news/10-companies-using-big-data
 https://www.bernardmarr.com/default.asp?contentID=1076
 Bryant, R.E., Katz, R.H., Lazowska, E.D.: Big-Data Computing: Creating Revolutionary Breakthroughs in
Commerce, Science and Society
 Sathi, A.: Implementation section (book 1). In: Big Data Analytics: Disruptive Technologies for Changing the
Game, 1st ed. MC Press Online (2012)
 R. Gonzalez and R. Woods, “Digital Image Processing – 2 Editi on”, Prenti ce Hall, 2 0 0 2
nd

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 42


Assessment Pattern
S.No. Item Number/semester Marks
1 MSTs 2 20 per each
2 Quiz 2 per unit 4 per each quiz
3 Time bound surprise test 3 (one per unit) 12 per each test

4 Assignments 3 (one per unit) 10 per each Assignment

Engagement task (non


5 One per each topic depends
gradable)
Attendance +
6 Above 90% 2
Engagement score
Internal (division as mentioned above points 1-6) 40

External 60

Total 100

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 43


THANK YOU

For queries
Email: aadi.e15043@cumail.in

04/10/2024 Unit-1_Chapter-1_lecture-6_Image formats and color space 44

You might also like