Computer Vision

Published on June 29, 2025 by @mritxperts

A. What is Computer Vision (CV)?

Computer Vision is a field of Artificial Intelligence that enables computers to see, analyze, and understand images or videos just like humans do.

In simple words, computer vision allows machines to:

  • Identify objects in a photo
  • Detect faces
  • Read handwritten text
  • Understand gestures and movement

B. Why is Computer Vision Important?

Computer vision is widely used in real-world applications like:

  • Face recognition in mobile phones
  • Self-driving cars
  • Quality checks in factories
  • Medical image analysis
  • CCTV surveillance

C. How Do Computers See Images?

1. Image as Data

  • Computers do not “see” pictures the way humans do.
  • An image is stored as a grid of pixels.
  • Each pixel has a color value represented by numbers.

D. RGB Color Model

RGB stands for Red, Green, Blue – the three primary colors of light.

  • Every image is made up of tiny pixels.
  • Each pixel has three color values: R, G, and B.
  • The combination of these values decides the color of that pixel.

Example:

  • Pixel value: (255, 0, 0) → Pure Red
  • Pixel value: (0, 255, 0) → Pure Green
  • Pixel value: (0, 0, 255) → Pure Blue
  • Pixel value: (0, 0, 0) → Black
  • Pixel value: (255, 255, 255) → White

E. Understanding Image Structure

  • A color image is stored in a 3D array:
    • Rows × Columns × 3 (RGB channels)
  • A grayscale image has only one value per pixel:
    • Rows × Columns × 1

Example:

A 100×100 image will have:

  • 10,000 pixels
  • Each pixel has 3 values (R, G, B)

F. Common Computer Vision Tasks

TaskDescription
Image ClassificationIdentifying what object is in an image (e.g., dog or cat)
Object DetectionFinding where objects are in an image (e.g., box around a face)
Face RecognitionIdentifying specific people by their faces
Image SegmentationColoring each pixel based on the object it belongs to
OCR (Optical Character Recognition)Reading text from images (e.g., scanned documents)

G. Real-Life Examples of CV Applications

ApplicationDescription
Google PhotosDetects and groups faces automatically
Traffic CamerasDetect over-speeding vehicles or number plates
Facebook/InstagramDetect faces and suggest tags
HealthcareAnalyzing X-rays and MRI scans
E-commerceVisual search of products by uploading pictures

H. Tools Used in CV (Introductory Overview)

1. OpenCV

  • Open-source Python library for image processing and computer vision.
  • Helps in reading, editing, and analyzing images.

2. Python Libraries Used in CV

LibraryPurpose
OpenCVComputer vision and image tools
NumPyWorks with image arrays
MatplotlibDisplay images and graphs

Basic OpenCV Example (For teacher demonstration only):

pythonCopyEditimport cv2

img = cv2.imread('image.jpg')         # Load image
cv2.imshow('Output', img)             # Show image
cv2.waitKey(0)                        # Wait until key is pressed
cv2.destroyAllWindows()

I. Activity Suggestion for Students

Activity 1: Show an image of an object (e.g., a dog, a tree, or a pen).
Ask students:

  • What do you see?
  • How would you describe this image in numbers to a computer?

Activity 2: Show how RGB values change in a paint tool or photo editor.

Activity 3: Explain how filters on mobile apps work using color changes.


J. Limitations and Challenges in CV

LimitationDescription
Lighting issuesPoor lighting can affect object detection
Camera qualityLow resolution may miss details
OcclusionObjects may be partially hidden
Bias in training dataIf the AI model is trained on limited images, it may not work well on others

K. Keywords to Remember

TermDescription
Computer VisionA field of AI that teaches computers to see and understand images
RGBRed, Green, Blue color model used to store image data
PixelSmallest unit of an image
Image ClassificationIdentifying what is in an image
Object DetectionLocating objects in an image
OpenCVA Python library for image processing

L. Summary of the Unit

  • Computer vision helps machines “see” and understand images.
  • Images are made of pixels, and each pixel has RGB values.
  • CV can be used for tasks like face detection, object detection, and text recognition.
  • It is widely used in phones, self-driving cars, security, and medical fields.
  • Python and libraries like OpenCV are used to perform basic CV tasks.