CVIP-Module-01-Reviewer
CVIP-Module-01-Reviewer
Computer Vision
➢ Aims to enable machines to interpret and understand visual information from the world (e.g.
images or videos)
➢ Mimics human vision and allows for applications like object detection, facial recognition, and
scene understanding.
Image Processing
➢ Focuses on transforming and analyzing images to improve their quality or extract information
➢ Techniques include filtering, noise reduction, and color adjustments
➢ Often acts as a preprocessing step for computer vision tasks
FUNDAMENTAL CONCEPTS
Image
➢ Composed of pixels
Pixel
Resolution
Color Models
1. Image Acquisition
2. Preprocessing
➢ Steps like resizing, cropping, and noise reduction to prepare the image for analysis
3. Enhancement
➢ Improving image quality for better visual interpretation (e.g. adjusting contrast or sharpness)
CORE TECHNIQUES
Edge Detection
Segmentation
➢ Dividing an image into meaningful regions or segments (e.g. separating a foreground object
from the background).
➢ Approaches include thresholding, clustering (e.g. K-means), and region-based methods.
Feature Extraction
➢ Extracting key characteristics or descriptors from an image (e.g. shapes, edges, or textures)
➢ These features are used in machine learning and deep learning for classification or recognition
tasks
APPLICATIONS
1. Healthcare
2. Automotive Industry
Self-driving cars rely on computer vision for lane detection, object recognition, and obstacle
avoidance.
Image Processing
➢ Involves transforming and enhancing raw images for better quality or feature extraction.
o These tools apply image processing techniques like color correction, sharpening, and
blurring.
o For example, Instagram filters adjust contrast, brightness, and saturation in real-time.
B. Medical Imaging
C. Document Scanning
o Image processing enhances the scanned document (e.g., increasing contrast) before
text is extracted using OCR.
o The scanned image is preprocessed to detect and decode the pattern for product
identification or payment processing.
o Satellite images are processed to analyze terrain, detect deforestation, or predict crop
health.
COMPUTER VISION IN REAL LIFE
Computer Vision
➢ Goes a step further by interpreting images and making decisions based on the content.
A. Facial Recognition
o Use case: Apple's Face ID uses a 3D map of your face for secure authentication.
B. Self-Driving Cars
o Computer vision analyzes medical images (like retinal scans) to detect diabetic
retinopathy or cancer.
o You can take a photo of a product, and the app finds similar products online.
o How it works: CV extracts features like color, shape, and texture to match items.
E. Augmented Reality (AR)
o CV identifies facial landmarks to apply filters or detects the ground to place virtual
Pokémon in the real world.
G. Agriculture
o Drones capture field images, and CV algorithms analyze the images for plant diseases,
water stress, or pest infestation.
• Example: Virtual try-on for clothes or glasses (e.g., Warby Parker, Sephora).
o CV maps your face or body to overlay products like glasses, makeup, or clothes in real-
time.
COMBINED USE OF IMAGE PROCESSING AND COMPUTER VISION
In most cases, image processing is a preprocessing step for computer vision tasks. Here's how they
work together:
• Step 1 (Image Processing): The camera captures an image of a vehicle, and preprocessing
is applied to enhance contrast and remove noise.
• Step 2 (Computer Vision): CV algorithms detect the number plate, segment the characters,
and recognize the text for applications like toll collection or traffic violation tracking.
• Step 1 (Image Processing): Enhance a CT scan to improve clarity and remove noise.
• Step 2 (Computer Vision): Analyze the enhanced image to detect patterns, such as
identifying cancerous cells or measuring organ sizes.
EMERGING TRENDS WITH EXAMPLES
1. Gesture Recognition
2. Real-Time Translation
3. Fraud Detection
o Use case: Verifying if ID documents (like a driver's license) match the face of the user
in real time.
4. Urban Planning
o Satellite images are processed and analyzed using CV to monitor changes over time.
• Efficiency: Automated systems can process thousands of images in seconds, far beyond
human capabilities.
• Accuracy: Machine learning-powered CV systems are often more accurate than manual
methods, such as detecting early-stage diseases or inspecting microscopic defects.
• Scalability: CV and IP applications can scale to industries like education, entertainment, and
even social media moderation (e.g., detecting harmful content).
TYPES OF IMAGES
1. Binary Images
2. Grayscale Images
➢ Monochrome images
➢ They only have one color.
➢ Do not contain any information about color.
➢ Each pixel determines available different grey levels.
➢ A normal grayscale image contains 8 bits/pixel data, which has 256 different grey levels.
➢ In medical images and astronomy, 12 or 16 bits/pixel images are used.
3. Colour Images
➢ Three band monochrome images in which, each band contains a different color and the actual
information is stored in the digital image.
➢ Contain gray level information in each spectral band.
➢ Represented as red, green, and blue (RGB images). Each color has 24 bits/pixel means 8 bits
for each of the three color band (RGB).
COLOR FORMATS
1. 8-bit Color
2. 16-bit Color
3. 24-bit Color
By changing the quantity of the 3 portions of red, green, and blue, you can make different colors.
Black 0 0 0 (0,0,0)
➢ Used for printers in which two carters are used: one for CMY color, and other for K (Black)
color. CMY can be changed to RGB.
➢ C: Cyan, M: Magenta, Y: Yellow, K: Black
PROCESS 1:
Step 1: Divide each number inside the parentheses by 16 repeatedly until you get a quotient of 0.
Take note of the remainders in order.
200/16 12 8
12/16 𝟎 12
100/16 6 4
6/16 𝟎 6
0/16 𝟎 0
Answer: #𝑪𝟖𝟔𝟒𝟎𝟎
PROCESS 2:
Step 1: Draw a table with 8 columns, with each column having 2𝑛 , where the value of 𝑛
increases from right to left.
𝟐𝒏 𝟐𝒏 𝟐𝒏 𝟐𝒏 𝟐𝒏 𝟐𝒏 𝟐𝒏 𝟐𝒏
𝟐𝟕 𝟐𝟔 𝟐𝟓 𝟐𝟒 𝟐𝟑 𝟐𝟐 𝟐𝟏 𝟐𝟎
𝟏𝟐𝟖 𝟔𝟒 𝟑𝟐 𝟏𝟔 𝟖 𝟒 𝟐 𝟏
Step 2: Create a row for each of the red, green, and blue digits of the RGB code.
𝑹𝑮𝑩 𝟏𝟐𝟖 𝟔𝟒 𝟑𝟐 𝟏𝟔 𝟖 𝟒 𝟐 𝟏
𝟐𝟎𝟎
𝟏𝟎𝟎
𝟎
Step 3: For each row, identify the largest values that sum to the given digit.
Assign a value of 1 to the digits that contribute to the given number when added.
Always start from left to right.
𝑹𝑮𝑩 𝟏𝟐𝟖 𝟔𝟒 𝟑𝟐 𝟏𝟔 𝟖 𝟒 𝟐 𝟏
𝟐𝟎𝟎 𝟏 𝟏 0 0 𝟏 0 0 0
𝟏𝟎𝟎 0 𝟏 𝟏 0 0 𝟏 0 0
𝟎 0 0 0 0 0 0 0 0
Step 4: Split the table vertically into two sections, then convert each section into the 8-4-2-1
format.
𝑹𝑮𝑩 𝟏𝟐𝟖 𝟔𝟒 𝟑𝟐 𝟏𝟔 𝟖 𝟒 𝟐 𝟏
𝟐𝟎𝟎 𝟏 𝟏 0 0 𝟏 0 0 0
𝟏𝟎𝟎 0 𝟏 𝟏 0 0 𝟏 0 0
𝟎 0 0 0 0 0 0 0 0
𝑹𝑮𝑩 𝟖 𝟒 𝟐 𝟏 𝟖 𝟒 𝟐 𝟏
𝟐𝟎𝟎 𝟏 𝟏 0 0 𝟏 0 0 0
𝟏𝟎𝟎 0 𝟏 𝟏 0 0 𝟏 0 0
𝟎 0 0 0 0 0 0 0 0
Step 5: Convert each row from binary to hexadecimal.
Add the numbers that has an assigned value of 1.
Since Blue has no assigned value of 1, all its values will be set to 0.
𝑹𝑮𝑩 𝟖 𝟒 𝟐 𝟏 𝟖 𝟒 𝟐 𝟏
𝟐𝟎𝟎 𝟏 𝟏 0 0 𝟏 0 0 0
𝟏𝟎𝟎 0 𝟏 𝟏 0 0 𝟏 0 0
𝟎 0 0 0 0 0 0 0 0
8+4 8 4+2 4 0 0
Convert two-
digit numbers 12 8 6 4 0 0
to hexadecimal
symbol (e.g.
“12” to “C”.
𝑪 𝟖 𝟔 𝟒 𝟎 𝟎
Answer: #𝑪𝟖𝟔𝟒𝟎𝟎
HEX CODE TO RGB CODE
Example: #𝐶86400
𝑪𝟖 𝟔𝟒 𝟎𝟎
𝑅𝑒𝑑 𝐺𝑟𝑒𝑒𝑛 𝐵𝑙𝑢𝑒
𝐶 → 12 𝐶8 → 12, 8
𝟎𝟎 = 𝟎
Step 4: Combine all the converted decimal numbers into this format (𝑅𝑒𝑑, 𝐺𝑟𝑒𝑒𝑛, 𝐵𝑙𝑢𝑒).
Image processing
➢ A set of techniques that involve manipulating and analyzing digital images to enhance their
quality, extract information, or perform specific tasks. These tasks can be of various types, like
recognizing objects, finding objects that are not visible, and sharpening and restoring the
image.
➢ Widely used in fields such as computer vision, medical imaging, remote sensing, and digital
photography.
Let's take a look at the steps in the image processing pipeline in the diagram below.
1. Image acquisition
• Image enhancement
o It aims to improve the visual quality, clarity, and interpretability of an image by adjusting
the brightness, contrast, and color balance of an image to make it more visually
appealing or highlight specific features.
o Common enhancement techniques include histogram equalization, contrast stretching,
gamma correction, and adaptive filtering.
• Image restoration
o Used to recover or restore degraded or damaged images to improve their quality,
thereby removing the artifacts caused by noise, blurring, compression, or other factors.
o Examples of image restoration techniques include denoising, deblurring, super-
resolution, and inpainting.
• Image denoising
o A technique used to reduce or remove noise from an image.
o Noise in an image can be introduced during image acquisition, transmission, or storage
processes, and it can degrade image quality and affect subsequent analysis or
processing tasks.
o Denoising can be done by spatial filters like mean, median, and the Gaussian filter or
frequency domain filters.
3. Image segmentation
4. Feature extraction
➢ After processing the image, the useful features are extracted from the image.
➢ Refers to the process of identifying and extracting meaningful and relevant information or
features from an image.
➢ These features capture distinctive characteristics of the image that can be used for various
tasks such as image recognition, object detection, image classification, and image retrieval.
➢ Some commonly used techniques for feature extraction in image processing are edge
detection and texture analysis.
➢ Edge detection algorithms identify and highlight the boundaries or edges of objects in an
image while texture analysis methods capture the spatial arrangement and statistical
properties of texture patterns in an image.
5. Recognition or detection
Consider the scenario of an autonomous vehicle navigating through a busy city road. In this scenario,
the image processing pipeline involves acquiring images from the vehicle's cameras, applying
preprocessing techniques such as enhancing the images, segmenting the scene, detecting and
recognizing objects like traffic signs, detecting lanes, and tracking obstacles. These steps collectively
provide valuable information to the autonomous vehicle system, enabling it to safely navigate through
the city street.
CONCLUSION
In conclusion, the image processing pipeline plays a vital role in various real-world applications, such
as computer vision, medical imaging, autonomous vehicles, surveillance, and more. It enables us to
extract meaningful information from images, make decisions based on visual data, and automate
tasks that would otherwise be time-consuming to perform.