MM 2024 Unit 2 1
MM 2024 Unit 2 1
SYLLABUS
UNIT II
Text: Introduction, Types of Text, Unicode Standard, Font, Text compression, File Formats.
Image data representation- image acquisition and processing-binary and color image processing-
image file formats
UNIT – II
Text: Introduction
In multimedia presentations, text can be combined with other media in a powerful way to prese
information and express moods.
Text can be of various types:
Plaintext, consisting of fixed sized characters having essentially the same type of appearance.
Formatted text, where appearance can be changed using font parameters
Hypertext, which can serve to link different electronic documents and enable the user to jump
from one to the other in a non-linear way.
Internally text is represented via binary codes as per the ASCII table.
The ASCII table is however quite limited in its scope and a new standard has been developed to
eventually replace the ASCII standard.
This standard is called the Unicode standard and can represent international characters from
various languages throughout the world.
We also generate text automatically from a scanned version of a paper document or image using
Optical Character Recognition (OCR) software.
TYPES OF TEXT
There are three types of text that can be used to produce pages of a document:
1. Unformatted text
2. Formatted text
3. Hypertext
1. Unformatted Text
Definition: This is plain text without any styling or formatting applied. It consists solely of
characters and does not include elements like fonts, colors, or sizes.
Unformatted Text also known as plaintext.
This comprise of fixed sized characters from a limited character set.
The character set is called ASCII table which is short for American Standard Code for Information
Interchange and is one of the most widely used character sets. It basically consists of a table where
each character is represented by a unique 7-bit binary code. The characters include a to z, A to Z, 0
to 9, and other punctuation characters like parenthesis, ampersand, single and double quotes,
mathematical operators, etc.
All the characters are of the same height. In addition, the ASCII character set also includes a
number of control characters. These include BS (backspace), LF (linefeed), CR (carriage return), SP
(space), DEL (delete), ESC (escape), FF (form feed) and others.
Use Cases: Often used in basic text files (.txt), code, or simple note-taking applications. It's highly
portable and compatible across different systems.
2. Formatted Text
Definition: This type includes styling elements such as fonts, colors, sizes, bold, italics, and
alignment. Formatted text is typically found in word processing applications.
Formatted text are those where apart from the actual alphanumeric characters, other control
characters are used to change the appearance of the characters, e.g. bold, underline, italics, varying
shapes, sizes, and colors etc., Most text processing software use such formatting options to change
text appearance.
It is also extensively used in the publishing sector for the preparation of papers, books, magazines,
journals, and so on.
Use Cases: Used in documents that require a specific presentation, such as reports, resumes, and
articles. Formats like .docx, .rtf, and .pdf often contain formatted text.
3. Hypertext
Definition: Hypertext includes links that connect to other texts or resources, allowing for non-
linear navigation. It often incorporates HTML (Hypertext Markup Language).
The term Hypertext is used to mean certain extra capabilities imparted to normal or standard
text. Like normal text, a hypertext document can be used to reconstruct knowledge through
sequential reading but additionally it can be used to link multiple documents in such a way that the
user can navigate non-sequentially from one document to the other for crossreferences.
These links are called hyperlinks.
The underlined text string on which the user clicks the mouse is called an anchor and the
document which opens as a result of clicking is called the target document.
On the web target documents are specified by a specific nomenclature called Web site address
technically known as Uniform Resource Locators or URL.
Node or Anchor:
The anchor is the actual visual element (text) which provides an entry point to another
document. In most cases the appearance of the text is changed from the surrounding text to
designate a hypertext, e.g. by default it is coloured blue with an underline.
Moreover, the mouse pointer changes to a finger icon when placed over a hypertext.
The user usually clicks over the hypertext to activate it and open a new document in the
document viewer.
In some cases instead of text an anchor can be an image, a video or some other non-textual
element (hypermedia).
Pointer or Link
These provide connection to other information units known as target documents.
A link has to be defined at the time of creating the hyperlink, so that when the user clicks on
an anchor the appropriate target document can be fetched and displayed.
Usually some information about the target document should be available to the user before
clicking on the anchor. If the destination is a text document, a short description of the
content can be represented.
Use Cases: Commonly used on the web, hypertext enables users to access information through
hyperlinks, enhancing interactivity and accessibility. It's essential for creating web pages, e-books,
and online articles.
Each type serves different purposes and is suited to various contexts in document creation and
presentation.
UNICODE STANDARD
The Unicode standard is a new universal character coding scheme for written characters
and text. It defines a consistent way of encoding multilingual text which enables textual data to be
exchanged universally. The Unicode standard goes far beyond ASCII‘s limited capability by providing the
capacity of encoding more than 1 million characters. The Unicode standard draws a distinction between
characters, which are the smallest component of written language, and glyphs, which represent the
shapes, the characters can have when displayed.
Some of the languages and their corresponding codes are: Latin (00), Greek (03), Arabic
(06), Devanagari/Bengali (09), Oriya/Tamil (0B), etc. Several methods have been suggested to
implement Unicode based on variations in storage space and compatibility. The mapping methods are
called Unicode Transformation Formats (UTF) and Universal Character Set (UCS). Some of the major
mapping methods are:
UCS-4,UTF-32
Uses 32-bit for each character. The simplest scheme as it consists of fixed length encoding, how
it is not efficient with regard to storage space and memory usage, and therefore
rarely used. Initially the UCS-4 was proposed with a possible address range of 0 to FFFFFFFFFF, but
Unicode requires only upto 10FFFF.
UTF-16
A 16-bit encoding format. In its native format it can encode numbers up to FFFF, i.e, as
xxxxxxxxxxxxxx. For coding beyond this, the original number is expressed as a combination of two
16-bit numbers.
UTF-8
The bits of a Unicode character is divided into a series of 8-bit numbers. The output code
against various ranges of input codes are given in Table 4.1
Code range Input code Output code
000000-00007F Xxxxxxx 0xxxxxxx
000080-0007FF xxx xxxxxxxxx 110xxxx 10xxxxxxx
FONT
A font is a specific style and size of text characters that make up the visual representation of
written language. It encompasses the design of the letters, numbers, symbols, and punctuation used in
typography. Fonts can vary widely in appearance based on attributes such as:
Typeface: The overall design of the characters (e.g., Arial, Times New Roman, Helvetica).
Weight: The thickness of the characters (e.g., light, regular, bold).
Style: Variations in the font's appearance, such as italic, oblique, or condensed.
Size: The measurement of the text, typically expressed in points (pt), which affects how large or
small the characters appear.
When discussing fonts, their appearance, style, and size are key elements that affect how text looks and
feels.
1. Font Appearance
Typeface: Refers to the design of the characters (e.g., Arial, Times New Roman). Each typeface has
a distinct look and personality.
Weight: Indicates how thick or thin the characters appear. Common weights include:
o Regular: Standard thickness.
o Bold: Thicker and darker, used for emphasis.
o Light: Thinner than regular, giving a more delicate look.
Style: Additional features that modify the appearance:
o Italic: Slanted text, often used for emphasis or titles.
o Oblique: Similar to italic but usually less stylized.
o Underline: Text with a line underneath, often for links or emphasis.
Case: Refers to the letter casing:
o Uppercase: All letters are capitalized (e.g., "HELLO").
o Lowercase: All letters are small (e.g., "hello").
o Title Case: Capitalizes the first letter of each word (e.g., "Hello World").
2. Font Size
Measured in points (pt), where one point is approximately 1/72 of an inch. Common sizes range
from 8pt to 72pt and beyond.
Relative Size: In web design, sizes can also be specified in pixels (px), ems, or percentages,
allowing for responsive designs.
Typical uses:
o Body Text: Generally between 10pt to 12pt for readability.
o Headings: Larger sizes, often 14pt to 36pt or more, depending on the hierarchy.
3. Combining Elements
Contrast: Using different weights, styles, and sizes can create visual interest. For instance, a bold
heading in a larger size paired with regular body text in a smaller size can help organize content
effectively.
Line Spacing (Leading): The space between lines of text affects readability. More space can
improve legibility, especially in larger text sizes.
Text manipulation using fonts
Text manipulation using fonts involves various techniques to change the appearance of text for emphasis,
aesthetics, or clarity. Here are some common methods:
1. Changing Font Type
Purpose: Different typefaces convey different emotions and tones. For instance, serif fonts (like
Times New Roman) are often seen as formal, while sans-serif fonts (like Arial) are considered
more modern.
Application: Select an appropriate font for your document's audience and purpose (e.g., using a
playful font for children's content).
2. Adjusting Font Size
Purpose: Varying font size helps establish a visual hierarchy, guiding readers through the content.
Application: Use larger sizes for headings and subheadings and smaller sizes for body text to
create clear distinctions.
3. Using Font Weight
Purpose: Weight (light, regular, bold) adds emphasis to specific parts of the text.
Application: Use bold for important points or keywords, and lighter weights for less critical
information.
4. Applying Italics and Oblique Styles
Purpose: Italics are often used for emphasis, titles, or foreign words.
Application: Italicize book titles, quotes, or to highlight specific terms within a body of text.
5. Utilizing Underline and Strikethrough
Purpose: Underlining can indicate links in digital content, while strikethrough shows deletions or
changes.
Application: Use underline for hyperlinks in web content and strikethrough for indicating removed
text in edits.
6. Text Color and Highlighting
Purpose: Color can evoke emotions and draw attention. Highlighting can emphasize important
information.
Application: Use contrasting colors for headings or calls to action, and highlighting for essential
notes or warnings.
7. Letter Spacing and Line Height
Purpose: Adjusting letter spacing (kerning) and line height (leading) affects readability and
aesthetics.
Application: Increase letter spacing for large headings or decrease it for tight body text. Adjust
line height to improve legibility, especially in longer paragraphs.
8. Text Effects
Shadow: Adds depth to text, making it stand out.
Outline: Creates a border around letters, enhancing visibility against backgrounds.
Gradient: Applies color transitions to text for a stylish look.
Examples of Use Cases
Web Design: Use different font styles and sizes to create a visually engaging website layout.
Presentations: Utilize bold and larger fonts for slides to ensure clarity and emphasis during
discussions.
Marketing Materials: Employ contrasting colors and fonts to attract attention to key messages or
calls to action.
TEXT COMPRESSION
Large text documents covering several pages may take a lot of disk space. We can apply compression
algorithms to reduce the size of the text file during storage. A reverse algorithm must be applied to
decompress the file before its contents can be displayed on screen. There are two types of compression
methods that are applied to text as explained:
1. Huffman Coding
Overview: Huffman coding is a lossless compression algorithm that assigns variable-length codes
to input characters based on their frequencies. More frequent characters are assigned shorter
codes, while less frequent characters receive longer codes.
Process:
1. Frequency Analysis: Count the frequency of each character in the text.
2. Building the Tree: Create a binary tree where each leaf node represents a character and
its frequency. The tree is constructed by combining the least frequent nodes until a single
tree remains.
3. Generating Codes: Traverse the tree to generate binary codes for each character.
Use Cases: Commonly used in file formats like ZIP, JPEG, and PNG.
FILE FORMATS
The following text formats are usually used for textual documents.
1. Plain Text Formats
.txt: Standard plain text file, containing unformatted text. Widely used and compatible with most
text editors.
.csv: Comma-Separated Values file, used for tabular data. Each line represents a row, and commas
separate the values.
2. Rich Text Formats
.rtf: Rich Text Format, allows basic formatting (like bold and italics) and is compatible with various
word processors.
.doc/.docx: Microsoft Word Document formats, supporting complex formatting, images, and other
media.
3. Markup Formats
.html/.htm: HyperText Markup Language, used for creating web pages. Supports links, images, and
multimedia.
.xml: eXtensible Markup Language, used for storing and transporting data in a structured way,
often with custom tags.
4. Scripting and Programming Formats
.py: Python script file, containing code written in Python.
.js: JavaScript file, used for writing scripts that run-in web browsers.
5. Configuration and Data Formats
.ini: Initialization file format, often used for configuration settings in applications.
.json: JavaScript Object Notation, a lightweight format for data interchange, commonly used in APIs.
6. Other Specialized Formats
.md: Markdown, a lightweight markup language for formatting plain text, often used in
documentation and on platforms like GitHub.
.tex: LaTeX, a high-quality typesetting system used for technical and scientific documentation.
IMAGES: INTRODUCTION
The pictures that we see in our everyday life can be broadly classified into two groups:
Images
Graphics
1. Images: Definition: Images are typically photographs or representations of real-world scenes
captured by cameras or other imaging devices.
2. Graphics: Definition: Graphics refer to visual representations created through design and
illustration, rather than direct capture of real-world scenes.
Image Data Representation
1. Definition: Image data representation refers to the methods and formats used to encode and store
visual information in a way that can be processed by computers.
2. Types of Image Representation:
Raster Images:
o Composed of a grid of pixels, each pixel representing a specific color.
o Common formats include JPEG, PNG, and BMP.
o Resolution is determined by the number of pixels in width and height.
Vector Images:
o Represent images using mathematical equations and geometric shapes (points,
lines, curves).
o Common formats include SVG and EPS.
o Scalable without loss of quality, making them ideal for logos and illustrations.
3. Color Representation:
RGB (Red, Green, Blue):
o Each color is created by combining different intensities of red, green, and blue.
o Commonly used in digital displays.
CMYK (Cyan, Magenta, Yellow, Black):
o Used in color printing; represents colors as a combination of these four inks.
Grayscale:
o Represents images in shades of gray, with each pixel having a single intensity value.
4. Compression Techniques:
Lossy Compression:
o Reduces file size by removing some image data, affecting quality (e.g., JPEG).
Lossless Compression:
o Reduces file size without losing any data (e.g., PNG, GIF).
5. Metadata:
Information about the image, such as dimensions, color profile, and creation date.
Important for organization and retrieval.
6. Applications:
Web Design: Efficient representation for fast loading.
Computer Vision: Image data is processed for tasks like object detection and recognition.
Medical Imaging: Accurate representation is critical for diagnosis in modalities like MRI and
CT scans.
Conclusion: Understanding image data representation is essential in fields like graphic
design,multimedia, and computer vision, enabling effective manipulation and analysis of visual
information.
Image acquisition and processing are fundamental components of modern imaging systems,
impacting various fields such as computer vision, medical imaging, remote sensing, and multimedia.
These processes enable the capture, enhancement, analysis, and interpretation of visual information,
facilitating a wide range of applications.
Image Acquisition
Image acquisition is the first step in the imaging pipeline, involving the capture of visual data
through various devices. The primary methods of image acquisition include:
1. Cameras: Digital cameras, including DSLRs and smartphones, capture images using sensors (such
as CCD or CMOS) that convert light into electronic signals. The quality of the acquired image
depends on factors like resolution, dynamic range, and lens quality.
2. Scanners: Flatbed and handheld scanners convert physical documents and photographs into
digital formats. They capture images linearly, pixel by pixel, allowing for high-resolution
digitization.
3. Sensors: Specialized sensors (e.g., thermal, hyperspectral) collect images based on specific
characteristics, such as heat emission or light wavelengths. These sensors are widely used in
applications like environmental monitoring and industrial inspection.
4. Medical Imaging Devices: Technologies like MRI, CT scans, and ultrasound capture detailed
images of the human body for diagnostic purposes. These devices rely on advanced algorithms to
reconstruct images from raw data.
Image Processing
Once images are acquired, processing is necessary to enhance their quality and extract
meaningful information. Image processing encompasses various techniques, including:
1. Basic Operations:
o Filtering: Techniques like Gaussian and median filtering are applied to reduce noise and
enhance features.
o Thresholding: Converts grayscale images to binary images based on pixel intensity, useful
for segmentation tasks.
o Edge Detection: Identifies boundaries within images using methods such as the Sobel or
Canny edge detectors.
2. Enhancement Techniques:
o Contrast Adjustment: Improves the distinction between light and dark areas.
o Histogram Equalization: Distributes pixel intensity values more evenly, enhancing
contrast.
o Sharpening: Enhances the clarity of edges and fine details.
3. Transformation Techniques:
o Geometric Transformations: Includes operations like rotation, scaling, and translation to
manipulate image orientation and size.
o Morphological Operations: Processes images based on their shapes, such as dilation and
erosion, useful in shape analysis.
4. Feature Extraction and Segmentation:
o Feature Extraction: Involves identifying key attributes in images, such as corners and
textures, for further analysis.
o Segmentation: Divides an image into meaningful regions, facilitating object recognition
and tracking.
5. Image Analysis: Advanced algorithms are applied to extract information, enabling applications like
object detection, classification, and image recognition.
6.
Applications of Image Acquisition and Processing
The combined processes of image acquisition and processing have widespread applications:
Medical Imaging: Enhancing and analyzing scans for accurate diagnosis and treatment planning.
Remote Sensing: Processing satellite images for environmental monitoring and disaster
management.
Machine Learning: Using processed images to train algorithms for tasks such as facial recognition
and autonomous navigation.
Multimedia: Enhancing images for use in advertising, web design, and entertainment.
As technology continues to evolve, the methods and applications of image acquisition and
processing will expand, further enhancing our ability to interpret and utilize visual data. Understanding
these processes is crucial for professionals in fields ranging from healthcare to engineering, as they
underpin many of the technological advancements that shape our world today.
Binary and Color Image Processing
Among the various types of images, binary and color images are two fundamental categories,
each with distinct characteristics and processing methods. Understanding the differences between
these types of images and the techniques applied to them is essential for applications ranging from
computer vision to digital media.
Binary Image Processing
Definition: A binary image is a type of image that consists of only two pixel values: typically
black (0) and white (1). Each pixel can be thought of as a bit, where black represents one state and
white represents another.
Characteristics
Simplicity: Binary images are simpler than grayscale or color images, making them easier to
process.
Storage Efficiency: They require less storage space due to the limited number of pixel values.
Processing Techniques
1. Thresholding: This is a common technique to convert grayscale images to binary. A threshold
value is selected, and all pixels above this value are set to white, while those below are set to
black. This is useful for segmenting objects from the background.
2. Morphological Operations: Techniques such as dilation and erosion manipulate the shape of
objects in a binary image.
o Dilation: Expands the boundaries of objects, filling small holes.
o Erosion: Reduces the boundaries, removing small noise and detaching objects.
3. Edge Detection: While binary images may not have gradients, techniques can be applied to find
object boundaries, such as using the Sobel operator or other edge detection methods.
4. Connected Component Labeling: This technique identifies and labels connected regions in a
binary image, enabling object counting and analysis.
Applications
Document Processing: Scanning and recognizing text.
Object Detection: In robotics and computer vision, for identifying shapes and forms.
Definition: Color images contain multiple channels representing colors, typically using the RGB
(Red, Green, Blue) color model, where each pixel is represented by three values corresponding to the
intensity of red, green, and blue components.
Characteristics
Complexity: Color images provide more information and detail than binary images, allowing for a
richer representation of scenes.
Higher Storage Requirements: Color images require more storage space due to multiple color
channels.
Processing Techniques
1. Color Space Conversion: Color images can be transformed between different color spaces (e.g.,
RGB to HSV, YCbCr) to facilitate specific processing tasks, such as segmentation and color
enhancement.
2. Filtering: Various filters can be applied to enhance colors or remove noise. For example, Gaussian
filters can smooth the image, while sharpening filters enhance edges.
3. Histogram Equalization: This technique improves the contrast of color images by redistributing
pixel intensity values across the color channels, making features more distinguishable.
4. Segmentation: Techniques like color-based segmentation use the color information in images to
identify and isolate objects. This can be done using clustering methods such as K-means.
5. Object Recognition: Algorithms are used to identify specific objects based on their color features,
which can be combined with shape and texture information.
Applications
Photography and Multimedia: Enhancing image quality and applying effects.
Medical Imaging: Analyzingcolor images for diagnostics.
Computer Vision: Enabling machines to interpret visual data more effectively.
Binary and color image processing techniques are essential tools in the field of image analysis
and computer vision.
While binary image processing focuses on simplicity and efficiency, color image processing
allows for richer representations and more detailed analysis.
Understanding these differences and techniques is crucial for applying image processing
methods effectively across various domains, from robotics and medical imaging to digital media and
beyond.
As technology advances, the applications and methodologies in both areas continue to evolve,
offering exciting opportunities for innovation.
Images may be stored in a variety of file formats. Each file format is characterized by a
specific compression type and color depth. The choice of file formats would depend on the final image
quality required and the import capabilities of the authoring system. The most popular file formats are:
BMP (Bitmap)
BMP is a standard Windows compatible computer. BMP formats supports RGB, Indexed
Color, Grey scale and Bitmap color modes, and does not support alpha channels.
JPEG (Joint Photographers Expert Group)
Joint Photographers Expert Group (JPEG) format is commonly used to display
photographs and other continuous-tone images in hypertext markup language (HTML)
documents over the World Wide Web and other online services.
GIF (Graphics Interchange Format)
Graphics Interchange Format (GIF) is the file format commonly used to display indexed
color graphics and images in hypertext markup language (HTML) document over the World
Wide Web and other online services.
TIFF (Tagged Image File Format)
Tagged Image File Format (TIFF) designed by Aldus Corporation and Microsoft in 1987,
is used to exchange files between applications and computer platforms. TIFF is a flexible bitmap
image format supported by virtually all paint, image-editing and page layout applications.
PNG (Portable Network Graphics)
Developed as a patent-free alternative to GIF, Portable Network Graphics (PNG) format is
used for lossless compression and for display of images on the World Wide Web.
PICT (Picture)
PICT format is widely used among Mac OS graphics and page-layout applications as an
intermediatary file format for transferring images between applications. PICT format is especially
effective at compression images with large areas of solid color.
TGA (Targa)
Targa (TGA) format is designed for systems using the True vision video board and is
commonly supported by MS-DOS color applications. This format supports 24-bit RGB images.
PSD (Photoshop Document)
Photoshop (PSD) format is a default file format used in the Adobe Photoshop package and
the only format supporting all available image modes.