Unit1
Unit1
o Light is essential for image perception, influencing brightness, contrast, and depth.
o Different light sources (sunlight, artificial) affect how objects appear, with shadows and reflections
playing a role.
o The retina, a biological image sensor, contains rods (black & white, night vision) and cones (color
vision).
o It converts light into electrical signals, which are sent to the brain for processing.
o The optic nerve transmits visual signals to the brain’s visual cortex for interpretation.
o The brain recognizes shapes, colors, and motion, relying on past experiences.
o The human eye perceives color through Red, Green, and Blue (RGB) cone cells in the retina.
o Lighting, color blindness, and psychological effects influence how colors are seen.
2. Preprocessing (1 Mark)
o Enhancing image quality through noise reduction, contrast adjustment, and edge enhancement.
3. Segmentation (1 Mark)
o Methods include thresholding, edge detection (Sobel, Canny), and region-based segmentation.
o Identifying key characteristics such as edges, corners, texture patterns, and shape measurements.
o Lossless (PNG, GIF) retains quality, while Lossy (JPEG) removes redundant data.
o Presenting processed images for medical diagnosis, surveillance, and AI-based decision-making.
A single image sensing element, such as a photodiode or CCD/CMOS pixel, converts light into electrical signals. The
basic operation involves:
2. Photoelectric Effect: The photons generate electron-hole pairs, creating an electrical charge proportional to
the light intensity.
3. Signal Conversion: The accumulated charge is converted into a voltage or digital signal, which is processed to
form an image.
o The first step involves capturing the analog image using a device such as a camera, scanner, or
sensor. These devices collect real-world data in the form of light intensity or color.
2. Sampling:
o The continuous analog image is divided into a grid of discrete points. This process is called sampling,
where each point (pixel) represents a specific location in the image. The resolution of the digital
image depends on the sampling rate, meaning higher sampling rates result in higher image detail.
3. Quantization:
o After sampling, the intensity values of each pixel are quantized to a finite set of levels. This means
the continuous range of color or intensity values is mapped to a set number of values. For example,
an image with 256 intensity levels uses 8 bits per pixel.
4. Digitization:
o The sampled and quantized data is converted into a digital format (matrix or array of numbers) that
can be processed by a computer. Each pixel is represented by its intensity or color value, making the
image suitable for digital manipulation.
o The digital image is stored in a file format such as JPEG, PNG, or TIFF. The image can now be
manipulated, analyzed, or transmitted efficiently for various applications like image processing,
computer vision, and machine learning.
This process converts the continuous analog image into a digital form that can be used by computers for processing
and analysis.
Connectivity refers to how pixels are related to each other based on their adjacency and similarity in an image. It
helps determine if pixels belong to the same object or region in the image. Connectivity plays a key role in image
segmentation and boundary detection.
1. 4-Connectivity: A pixel is connected to its immediate horizontal and vertical neighbors (up, down, left,
right).
2. 8-Connectivity: A pixel is connected to its immediate horizontal, vertical, and diagonal neighbors.
Example: Consider a binary image where pixels are either 1 (white) or 0 (black). Let’s use 4-connectivity:
0100
1110
0101
Pixel (1,1) (the second pixel in the first row) is connected to pixels (0,1), (2,1), and (1,0), forming a connected
region of white pixels.
In 8-connectivity, pixel (1,1) would also connect to diagonal neighbors, including (0,0) and (2,2).
1. Euclidean Distance
3. Chebyshev Distance
4. Minkowski Distance
5. Hamming Distance
6. Mahalanobis Distance
Explain Euclidean, D4, and Chessboard Distances with Simple Examples (4 Marks)
o Formula:
d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}d=(x2−x1)2+(y2−y1)2
o Example:
Between points (1,1) and (4,5):
d=(4−1)2+(5−1)2=9+16=25=5d = \sqrt{(4 - 1)^2 + (5 - 1)^2} = \sqrt{9 + 16} = \sqrt{25} =
5d=(4−1)2+(5−1)2=9+16=25=5
o Formula:
d=∣x2−x1∣+∣y2−y1∣d = |x_2 - x_1| + |y_2 - y_1|d=∣x2−x1∣+∣y2−y1∣
o This measures the sum of horizontal and vertical distance, often used in grid-based systems.
o Example:
Between points (1,1) and (4,5):
d=∣4−1∣+∣5−1∣=3+4=7d = |4 - 1| + |5 - 1| = 3 + 4 = 7d=∣4−1∣+∣5−1∣=3+4=7
o This measures the maximum of horizontal and vertical distances, similar to how a chess king moves
diagonally or horizontally.
o Example:
4d=max(∣4−1∣,∣5−1∣)=max(3,4)=4
These distance measures are used in applications like image processing, pathfinding algorithms, and object
recognition.
In image processing, adjacency refers to the relationship between pixels that are "connected" based on their spatial
proximity. Adjacency types are crucial for tasks like segmentation, object detection, and boundary recognition.
1. 4-Adjacency:
Definition: A pixel is 4-adjacent to another pixel if they are directly connected either horizontally or vertically
(not diagonally).
Connection: It includes the top, bottom, left, and right neighbors of the pixel.
Example:
For a pixel located at position (x, y), the 4-adjacent pixels are at:
(x-1, y) (Top)
(x+1, y) (Bottom)
Illustration:
010
111
010
In this example, the central 1 (at (1,1)) is 4-adjacent to the four neighboring 1 pixels in the cardinal directions.
2. 8-Adjacency:
Definition: A pixel is 8-adjacent to another pixel if they are connected either horizontally, vertically, or
diagonally.
Connection: It includes the top-left, top, top-right, left, right, bottom-left, bottom, and bottom-right
neighbors of the pixel.
Example:
For a pixel located at (x, y), the 8-adjacent pixels are at:
(x-1, y) (Top)
(x+1, y) (Bottom)
Illustration:
010
111
010
The central 1 (at (1,1)) is 8-adjacent to all surrounding 1 pixels in horizontal, vertical, and diagonal directions.
3. m-Adjacency:
Definition: m-Adjacency is a generalized form of adjacency where a pixel is considered adjacent to another if
they are connected through a path of adjacent pixels, either by 4-connectivity or by a conditional diagonal
adjacency.
Connection: In m-adjacency, a pixel may be connected to its neighboring pixels, but diagonal adjacency may
only be considered under certain conditions (e.g., the diagonal pixels must also be connected to the same
region).
Example:
Consider m-adjacency with diagonal connection allowed under certain conditions. This is typically used to reduce
ambiguity in pixel connection, and it may include paths of connected pixels, even if they are diagonally connected but
aligned with similar values.
Illustration: In an m-adjacency, if pixels (1,2) and (2,1) are connected by a similar value, then diagonal connections
can be considered valid.
4-Adjacency is often used for detecting simple boundaries and regions with strictly horizontal or vertical
separation.
8-Adjacency is commonly applied in object recognition and contour detection where diagonal connections
are important.
m-Adjacency is useful in cases where flexible or contextual adjacency relationships are required, especially in
complex segmentation tasks.
The formation of an image in the human eye is a complex biological process that involves several key steps:
1. Light Entry:
o Light enters the eye through the cornea, the transparent outer layer of the eye.
o The cornea refracts (bends) the light to direct it into the eye.
2. Pupil and Iris Control:
o After passing through the cornea, the light reaches the pupil, the black circular opening in the center
of the eye.
o The iris, a colored part of the eye, controls the size of the pupil, regulating the amount of light that
enters the eye. In bright conditions, the iris constricts the pupil to limit light; in dim conditions, the
pupil dilates to allow more light in.
o The light then passes through the lens, which further refracts and focuses the light onto the retina at
the back of the eye.
o The lens changes shape to focus on objects at different distances (a process known as
accommodation).
o The retina is a light-sensitive layer made up of millions of photoreceptor cells called rods and cones.
Rods are responsible for detecting light intensity (black and white vision) and are mainly
used for night vision.
Cones detect color and are responsible for daylight vision and sharpness (visual acuity).
o The electrical signals from the retina are transmitted via the optic nerve to the brain.
o The brain processes these signals in the visual cortex, where the brain constructs a visual
representation of the outside world.
6. Visual Perception:
o The brain processes the signals to interpret shapes, colors, depths, and movements, allowing us to
recognize objects and scenes.
o Visual cognitive processing also involves higher-level brain functions that help us make sense of the
image based on past experiences and knowledge.
o The final image formed in the brain is a two-dimensional projection of the three-dimensional world
we see, combining inputs from both eyes for depth perception and spatial awareness.
Define the Terms Region and Boundary with Regard to Image Processing (3 Marks)
1. Region:
o A region in image processing refers to a connected group of pixels that share similar characteristics or
attributes, such as intensity values, color, or texture.
o These regions often represent a specific object or part of an image that needs to be segmented for
further analysis.
Example: In medical imaging, a tumor might be identified as a distinct region based on its texture and color
compared to the surrounding tissue.
2. Boundary:
o A boundary refers to the outline or contour that separates two distinct regions in an image.
o Boundaries are typically defined by changes in intensity, color, or texture between adjacent regions.
Example: In a grayscale image of a plant, the boundary is the line that separates the plant from the background.
Advantages:
1. Improved Accuracy: Digital processing allows for precise operations like filtering, enhancement, and edge
detection without loss of information.
2. Flexibility: Image manipulation can be done easily without the limitations of physical media. Images can be
edited, stored, and transmitted digitally.
3. Consistency: Digital images can be processed with consistent results, ensuring reliability and reproducibility
in tasks like medical diagnostics or satellite imaging.
4. Storage and Transmission: Digital images can be compressed for efficient storage and faster transmission,
making them ideal for web applications and remote sensing.
5. Automation: Advanced algorithms in digital image processing can automate tasks like feature detection,
pattern recognition, and classification, reducing human effort.
Disadvantages:
1. High Storage Requirements: High-resolution digital images require significant storage space, especially when
working with large datasets or high-definition images.
2. Processing Power: Complex image processing tasks require substantial computational resources, which can
be slow and expensive for large-scale operations.
3. Loss of Detail: Digital image processing may sometimes result in a loss of fine details, especially when
compression or resizing techniques are used.
4. Noise Sensitivity: Digital images may be susceptible to noise (distortions or random variations), which can
affect the quality and accuracy of processing if not handled correctly.
5. Complexity of Algorithms: Implementing advanced image processing algorithms can be complex and require
specialized knowledge in mathematics and computer programming