0% found this document useful (0 votes)
2 views26 pages

Lecture 5

The document discusses digital halftoning, a technique that simulates shades of gray in images by varying the size of dots, and outlines various methods for generating halftoned images, including patterning, ordered dithering, and error diffusion. It also covers different image file formats, highlighting their advantages and disadvantages, such as TIFF for high-quality prints and JPEG for web use. The lecture is presented by Ashwini Kumar Upadhyay, an expert in Deep Learning and Computer Vision.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views26 pages

Lecture 5

The document discusses digital halftoning, a technique that simulates shades of gray in images by varying the size of dots, and outlines various methods for generating halftoned images, including patterning, ordered dithering, and error diffusion. It also covers different image file formats, highlighting their advantages and disadvantages, such as TIFF for high-quality prints and JPEG for web use. The lecture is presented by Ashwini Kumar Upadhyay, an expert in Deep Learning and Computer Vision.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Digital Halftoning & Image File Formats

Lecture 5

Ashwini Kumar Upadhyay


M.Tech, IIT Kanpur
Ph.D (Deep Learning & Computer Vision)

1
Halftoning

• Halftoning or analog halftoning is a process that simulates shades of gray by


varying the size of tiny black dots arranged in a regular pattern.

• This technique is used in Printers, as well as the publishing industry.

• Inspect a photograph in a Newspaper; you will notice that the picture is


composed of black dots even though it appears to be composed of grays.

• This is possible because of the spatial integration performed by our eyes.


Our eyes blend fine details and record the overall intensity.

Ref: https://people.ece.ubc.ca/irenek/techpaps/introip/manual04.html
2
3
Digital Halftoning

• Digital halftoning is similar to halftoning in which an


image is decomposed into a grid of halftone cells.

• Elements (or dots that halftoning uses in simulating


shades of grays) of an image are simulated by filling
the appropriate halftone cells.

• The more number of black dots in a halftone cell, the


darker the cell appears.

4
5
CMYK refers to the four ink plates
used: cyan, magenta, yellow, and key
(black)

Most commonly used in color


printing.

6
Brother DCP-T226
Multifunction (Print Scan
Copy) Ink Tank Color
Printer

CMYK
Image Source: Amazon India 7
8
There are several methods for generating digital halftoning images:

1. Patterning: one of the simplest methods.


2. Ordered Dithering: turns pixels into dots comparing with a matrix values.
3. Error diffusion Dithering: error between the original pixel value and the
quantized value is calculated and distributed to neighbouring pixels.
4.Clustered-Dot Halftoning: traditional halftoning method used in printing.
5.Dispersed-Dot Halftoning
6.Blue Noise Masking
7.Dot Diffusion
8.Toned Patterns (AM Halftoning)
9.Frequency Modulation (FM) Halftoning
10.Hybrid Halftoning

9
1. Patterning

• Patterning is the Simplest of the three techniques for generating digital halftoning
images.
• It generates an image that is of Higher Spatial Resolution than the source image.
• The number of halftone cells of the output image is the same as the number of
pixels in the source image.
• However, each halftone cell is Subdivided into a NxN grid where N could be 2, 3,
4, and so on.
• Each input pixel value is represented by a different number of filled squares in the
halftone cell.
• Since a NxN grid can only represent fixed number (NxN+1) of different
intensity levels, the source image must be Quantized.

10
Patterning
Fixed Pattern Size: The size of the patterns (blocks) is
predefined and repeated throughout the image.

No Error Diffusion: Unlike error diffusion dithering, patterning


does not adjust neighboring pixel values, meaning the error
between the original image and the halftoned image is not
spread to surrounding pixels.

Repetitive Structure: The patterns are repetitive across the


entire image, which can introduce visual artifacts if not
carefully managed, such as grid-like structures or texture.

11
2. Ordered Dithering

• Unlike patterning, dithering creates an output image with the Same number of dots
as the number of pixels in the source image.
• Dithering can be thought of as thresholding the source image with a dither matrix.
• The matrix is laid repeatedly over the source image.
• Wherever the pixel value of the image is lesser than the value in the matrix, a dot
on the output image is filled.
• A well-known problem of dithering is that it produces artifacts of patterns
introduced by fixed thresholding matrices.

 Bayer Matrix Dithering is one of the most common ordered dithering techniques.

12
Input Image

Dithering Matrix

Source: https://www.youtube.com/watch?v=9zsaegcL_84 13
Source: https://www.youtube.com/watch?v=9zsaegcL_84 14
3. Error Diffusion

• It is often called Spatial Dithering.


• Error diffusion sequentially traverses each pixel of the source image.
• Each pixel is compared to a threshold. If the pixel value is higher than the
threshold, a 255 is outputted; otherwise, a 0 is outputted.
• The Error - the difference between the input pixel value and the output value -
is dispersed to nearby neighbours.
• Error diffusion is a neighbourhood operation since it operates not only on the
input pixel, but also its neighbors.
• Generally, neighbourhood operations produce higher quality results than
point operations.
• Error diffusion, when compared to ordered dithering, does not generate those
artifacts introduced by fixed thresholding matrices.
• However, since error diffusion requires neighbourhood operations, it is very
computationally intensive.
 Floyd-Steinberg Dithering technique has been very popular. 15
Image Storage and File
formats
• Image Format describes how data related to the image will be
stored.
• Data can be stored in Compressed, Uncompressed, or
Vector format.
• Each format of the image has a different advantage and
disadvantage.
• Image types such as TIFF are good for printing while JPG or
PNG, are best for the web.

Ref: https://www.geeksforgeeks.org/image-formats/
16
17
 Common Vector Image
formats: .svg .eps .pdf
18
19
 Common Bitmap Image formats: .jpg .gif .png
.tif .bmp 20
21
22
•TIFF(.tif, .tiff) or Tagged Image File Format this format store
image data without losing any data. It does not perform any
compression on images, and a high-quality image is obtained but the
size of the image is also large, which is good for printing, and
professional printing.
•JPEG (.jpg, .jpeg) or Joint Photographic Experts Group is a
loss-prone (lossy) format in which data is lost to reduce the size of
the image. Due to compression, some data is lost but that loss is
very less. It is a very common format and is good for digital cameras,
nonprofessional prints, E-Mail, Powerpoint, etc., making it ideal for
web use.
•GIF (.gif) or Graphics Interchange Format files are used for
web graphics. They can be animated and are limited to only 256
colors, which can allow for transparency. GIF files are typically
small in size and are portable.
23
•PNG (.png) or Portable Network Graphics files are a
lossless image format. It was designed to replace gif format
as gif supported 256 colors unlike PNG which support 16
million colors.
•Bitmap (.bmp) Bit Map Image file is developed by Microsoft
for windows. It is same as TIFF due to lossless, no
compression property. Due to BMP being a proprietary
format, it is generally recommended to use TIFF files.

•RAW Image Files (.raw, .cr2, .nef, .orf, .sr2) These Files
are unprocessed and created by a camera or scanner.
Many digital SLR cameras can shoot in RAW, whether it be
a .raw, .cr2, or .nef. These images are the equivalent of a
digital negative, meaning that they hold a lot of image
information. These images need to be processed in an editor
such as Adobe Photoshop or Lightroom. It saves metadata and
is used for photography. 24
•EPS (.eps) Encapsulated PostScript file is a common vector
file type. EPS files can be opened in applications such as Adobe
Illustrator or CorelDRAW.

25
Earthrise is a photograph of Earth and part of the Moon's surface,
taken from lunar orbit by astronaut William Anders on December
24, 1968, during the Apollo 8 mission. Thank You

26

You might also like