Artificial Intelligence

Working of Computer Vision (CBSE Class 12 Artificial Intelligence)

Class 12 · Artificial Intelligence

Working of Computer Vision

Computer Vision is the branch of Artificial Intelligence that enables machines to understand and interpret images and videos. Just like humans observe an object, analyze its characteristics, and recognize it, a Computer Vision system follows a sequence of computational steps before making a prediction.

When an image is captured, the computer cannot immediately identify what it contains. Instead, it processes the image through multiple stages such as image acquisition, preprocessing, feature extraction, object recognition, and decision-making. Each stage plays an important role in improving the accuracy of the final prediction.

Modern Computer Vision systems combine Image Processing techniques with Machine Learning and Deep Learning algorithms to recognize patterns, classify objects, detect faces, identify handwritten text, and analyze visual information with remarkable accuracy.


Learning Objectives

After studying this topic, you will be able to:

  • Understand the working of a Computer Vision system.
  • Learn the stages involved in image processing.
  • Understand image acquisition and preprocessing.
  • Learn the importance of feature extraction.
  • Understand object recognition and classification.
  • Explain the complete Computer Vision workflow.

Stages of Computer Vision

A Computer Vision system generally works through the following stages:

  1. Image Acquisition
  2. Image Preprocessing
  3. Feature Extraction
  4. Feature Selection
  5. Object Detection or Classification
  6. Decision Making

Overall Workflow



Image Capture

      │

      ▼

Image Preprocessing

      │

      ▼

Feature Extraction

      │

      ▼

Machine Learning Model

      │

      ▼

Object Recognition

      │

      ▼

Prediction / Decision


Step 1: Image Acquisition

The first step in Computer Vision is to acquire or capture an image.

Images can be obtained from various sources:

  • Digital cameras
  • Mobile phones
  • CCTV cameras
  • Medical imaging devices
  • Satellite sensors
  • Web cameras
  • Drones
Definition

Image Acquisition is the process of capturing or obtaining an image from a camera or another imaging device.


Example

When Face Unlock is activated on a smartphone, the front camera first captures the user's face. This captured image becomes the input for the Computer Vision system.


Step 2: Image Preprocessing

The captured image may contain unwanted noise, poor lighting, blur, or unnecessary background information. Therefore, before analyzing the image, it is improved through preprocessing.

Definition

Image Preprocessing is the process of improving the quality of an image before further analysis.


Common Preprocessing Techniques

Technique Purpose
Noise Removal Removes unwanted disturbances.
Image Resizing Adjusts image dimensions.
Cropping Removes unnecessary regions.
Brightness Adjustment Improves visibility.
Contrast Enhancement Makes objects clearer.
Grayscale Conversion Simplifies image processing.

Why is Preprocessing Necessary?

  • Improves image quality.
  • Reduces processing time.
  • Removes unwanted information.
  • Improves recognition accuracy.
  • Standardizes input images.

Step 3: Feature Extraction

After preprocessing, the Computer Vision system identifies important characteristics of the image that help distinguish one object from another.

These characteristics are called features.

Definition

Feature Extraction is the process of identifying important characteristics such as edges, corners, colours, textures, and shapes from an image.


Examples of Features

  • Edges
  • Lines
  • Corners
  • Curves
  • Colours
  • Textures
  • Patterns
  • Facial landmarks

Example

To recognize a human face, the Computer Vision system extracts features such as:

  • Distance between the eyes.
  • Shape of the nose.
  • Face outline.
  • Position of the mouth.
  • Jawline structure.

Step 4: Feature Selection

Not every extracted feature contributes equally to object recognition. Some features may be redundant or irrelevant.

Feature Selection chooses only the most useful features for training the Machine Learning model.

Definition

Feature Selection is the process of selecting the most important features from the extracted features to improve model performance.


Benefits of Feature Selection

  • Reduces computational complexity.
  • Improves prediction accuracy.
  • Removes unnecessary data.
  • Speeds up training.
  • Reduces overfitting.

Flowchart



Capture Image

      │

      ▼

Improve Image

      │

      ▼

Extract Features

      │

      ▼

Select Best Features

      │

      ▼

Send to Machine Learning Model


Think Like an AI Engineer

A facial recognition system captures a blurry image from a CCTV camera.

Which stage of the Computer Vision process is responsible for improving the image before recognition?

Click to View Answer

The Image Preprocessing stage improves image quality by reducing noise, adjusting brightness, sharpening the image, and preparing it for feature extraction.


Step 5: Object Detection and Classification

After extracting and selecting the important features, the Computer Vision system sends these features to a trained Machine Learning or Deep Learning model. The model compares the extracted features with the patterns learned during training and predicts the object present in the image.

Definition

Object Detection is the process of identifying one or more objects in an image and determining their locations.

Image Classification is the process of assigning an image to a predefined category based on its features.


Example of Image Classification

Input Image Prediction
? Dog
? Cat
? Car
? Tree

Example of Object Detection

Suppose an image contains two people, one bicycle, and one car.

The Computer Vision model identifies each object separately and locates them using bounding boxes.



Detected Objects

-------------------------

Person

Person

Bicycle

Car

-------------------------


Step 6: Decision Making

Once the objects are recognized, the Computer Vision system performs the required action based on the prediction. This final stage is called Decision Making.

Definition

Decision Making is the process of performing an action or generating an output based on the recognized object.


Examples of Decision Making

Recognized Object Decision Taken
Authorized Face Unlock the smartphone.
Traffic Signal Apply vehicle brakes.
Tumour in X-ray Alert the doctor.
Defective Product Remove from production line.
Handwritten Digit Convert to digital text.

Complete Computer Vision Pipeline



Image Acquisition

        │

        ▼

Image Preprocessing

        │

        ▼

Feature Extraction

        │

        ▼

Feature Selection

        │

        ▼

Machine Learning Model

        │

        ▼

Object Detection /

Image Classification

        │

        ▼

Decision Making


Real-Life Example

An autonomous (self-driving) car continuously captures images of the road using multiple cameras.

  1. The cameras capture live road images.
  2. The images are preprocessed to improve quality.
  3. Road lanes, vehicles, traffic signs, and pedestrians are identified.
  4. The Machine Learning model classifies the detected objects.
  5. The vehicle decides whether to accelerate, slow down, stop, or turn.

All these steps are performed within milliseconds, enabling safe navigation.


Case Study

A manufacturing company uses Computer Vision to inspect mobile phone screens during production.

High-resolution cameras capture images of every screen. The images are preprocessed to remove lighting variations, and features such as cracks, scratches, and dead pixels are extracted.

A trained Machine Learning model classifies each screen as Defective or Non-Defective. Defective screens are automatically removed from the production line, improving quality control and reducing manual inspection time.


Advantages of the Computer Vision Workflow

  • Processes images automatically.
  • Provides consistent results.
  • Handles large volumes of visual data.
  • Reduces human effort.
  • Improves decision-making accuracy.
  • Supports real-time applications.

Applications Following This Workflow

  • Face Recognition
  • Medical Image Analysis
  • Autonomous Vehicles
  • Agricultural Crop Monitoring
  • Industrial Quality Inspection
  • Traffic Surveillance
  • Smart Retail Systems
  • Security and Surveillance

Competency-Based Question

A smart parking system uses cameras to detect vacant parking spaces and guide drivers to the nearest available slot.

Explain how the stages of the Computer Vision workflow help the system perform this task efficiently.


Activity

Choose any one Computer Vision application (Face Unlock, QR Code Scanner, Traffic Monitoring, or Medical Diagnosis) and identify the role of each stage of the Computer Vision workflow in that application.


Common Beginner Mistakes

  • Skipping image preprocessing before feature extraction.
  • Confusing feature extraction with feature selection.
  • Assuming Machine Learning can recognize objects without training.
  • Ignoring the importance of image quality.
  • Believing that object detection and image classification are the same task.

Quick Revision

  • Computer Vision begins with image acquisition.
  • Preprocessing improves image quality.
  • Feature Extraction identifies important characteristics.
  • Feature Selection removes unnecessary information.
  • Machine Learning models recognize objects.
  • The final stage performs intelligent decision-making.

Memory Trick

Capture → Clean → Extract → Select → Recognize → Decide

Remember: Camera → Pixels → Features → AI → Prediction → Action


Exam Tips

  • Memorize the six stages of the Computer Vision workflow in the correct order.
  • Understand the purpose of each stage.
  • Differentiate between Feature Extraction and Feature Selection.
  • Know the difference between Image Classification and Object Detection.
  • Prepare at least two real-life examples of Computer Vision systems.

Frequently Asked Questions (FAQs)

1. What is the first step in Computer Vision?

The first step is Image Acquisition, where an image is captured using a camera or another imaging device.

2. Why is Image Preprocessing necessary?

Image Preprocessing improves image quality by removing noise, adjusting brightness, resizing images, and preparing them for further analysis.

3. What is Feature Extraction?

Feature Extraction identifies important characteristics such as edges, colours, textures, and shapes that help recognize objects.

4. What is the difference between Feature Extraction and Feature Selection?

Feature Extraction identifies all useful characteristics, whereas Feature Selection chooses only the most relevant features for model training.

5. What is the final step in the Computer Vision workflow?

The final step is Decision Making, where the system performs an action based on the recognized object or prediction.


Summary

  • Computer Vision follows a systematic workflow to understand images.
  • The workflow consists of Image Acquisition, Image Preprocessing, Feature Extraction, Feature Selection, Object Detection or Classification, and Decision Making.
  • Machine Learning enables computers to recognize patterns learned from training data.
  • The workflow is widely used in healthcare, transportation, manufacturing, agriculture, retail, and security.
  • Each stage contributes to accurate and intelligent visual recognition.

Next Topic: Computer Vision Process