Introduction to Computer Vision

    Yash Kabra4 min readUpdated

    Computer vision is the area of artificial intelligence that lets computers interpret images and video. It powers face unlock, photo sorting, document scanning, and quality checks on factory lines. The starting point for all of it is a simple fact: to a computer, an image is just a grid of numbers, and a model learns patterns in those numbers to work out what the picture shows.

    An image is a grid of numbers

    A digital image is made of pixels. Each pixel holds a number for its brightness — for colour images, three numbers for red, green, and blue. So a small 28-by-28 greyscale image is a grid of 784 numbers. A computer never "sees" a cat; it sees a large array of pixel values and tries to find the patterns of values that tend to mean "cat". This is why computer vision is, at its core, machine learning applied to grids of numbers.

    # A tiny "image" as a grid of numbers (0 = dark, 255 = bright).
    import numpy as np
    
    # 3x3 greyscale image.
    image = np.array([
        [  0, 128, 255],
        [128, 255, 128],
        [255, 128,   0],
    ])
    
    print(image.shape)   # (3, 3): height, width
    print(image.max())   # 255: brightest pixel
    

    Real images are far bigger, but the idea is the same: a grid (or a stack of grids for colour) of pixel values. Understanding NumPy basics helps a lot here, since images are handled as NumPy arrays.

    Common computer vision tasks

    Most computer vision work falls into a few task types:

    • Image classification: what is in this picture? (cat / dog / neither)
    • Object detection: where are the objects, and what are they? (boxes around each)
    • Segmentation: which exact pixels belong to which object?
    • Recognition: reading text from images, or matching faces.

    Classification is the simplest and the usual starting point — it is classification where the input happens to be pixels.

    A small classification example

    scikit-learn includes a dataset of small handwritten-digit images, perfect for a first vision example. Each image is flattened into a row of pixel values and fed to a classifier.

    # Classify small handwritten-digit images.
    from sklearn.datasets import load_digits
    from sklearn.model_selection import train_test_split
    from sklearn.linear_model import LogisticRegression
    

    Want to learn this properly?

    Join the waitlist for our courses — beginner-friendly, project-first classes in Jalgaon.

    Browse courses

    Each image is 8x8 pixels, flattened into 64 numbers.

    digits = load_digits() X, y = digits.data, digits.target # X: pixel values, y: the digit 0-9

    X_train, X_test, y_train, y_test = train_test_split( X, y, test_size=0.25, random_state=0 )

    model = LogisticRegression(max_iter=2000) model.fit(X_train, y_train)

    print("Test accuracy:", round(model.score(X_test, y_test), 2))

    
    This treats each pixel as a feature. It works on small, tidy images but does not understand shapes or position well, which is where more advanced methods come in.
    
    ## Why deep learning dominates vision
    
    Treating each pixel as an independent feature ignores the structure of images — that nearby pixels relate to each other and that an object can appear anywhere in the frame. Deep learning, especially networks designed to scan across an image, captures this structure and learns useful features automatically. This is why most modern computer vision uses [neural networks](/learn/ai-ml/neural-networks-intro) rather than treating pixels as a plain list. The trade-off, as always, is more data and computing power.
    
    ## Common mistakes
    
    - **Ignoring image structure.** Flattening pixels into a list loses spatial relationships. Fine for tiny tidy images, weak for real photos.
    - **Too little or unvaried data.** Models trained on narrow data fail on different lighting, angles, or backgrounds. Variety in training images matters.
    - **Forgetting to scale or normalise pixel values.** Consistent value ranges help models train, just as with other [data preprocessing](/learn/ai-ml/data-preprocessing).
    - **Assuming the model generalises.** A model trained on one camera or setting may not transfer to another. Always test on realistic, unseen images.
    
    ## FAQ
    
    **Do I need a powerful computer to start computer vision?**
    For small datasets like the digits example, no. Larger deep learning vision models benefit from more computing power, often a GPU.
    
    **Is computer vision only about photos?**
    No. It also covers video, medical scans, satellite images, and any visual data represented as pixels.
    
    **Should I start with deep learning?**
    Start with the simple pixel-based classifier to grasp the workflow, then move to neural networks designed for images.
    
    ## Keep learning
    
    Explore the full [AI & machine learning hub](/learn/ai-ml) for more guides, or join the waitlist for our structured [Artificial Intelligence course](/courses/artificial-intelligence) at Infoplanet, Jalgaon, to learn computer vision step by step with mentor support.
    

    Want to learn this properly?

    Join the waitlist for our courses — beginner-friendly, project-first classes in Jalgaon.

    Browse courses
    Yash Kabra

    Founder, Atlee Technologies

    Yash Kabra is the founder of Atlee Technologies, a product studio that ships SaaS products end-to-end. He owns products from strategy through launch and growth — including Infoplanet, TrackRise and Perqee — and teaches AI, Machine Learning and Data Science at Infoplanet with a focus on how these tools are used to build real products.

    Related guides