Book a free call

Image Processing Techniques in Computer Vision Explained

Image processing cleans, cuts and measures pictures so a computer vision system can read them. These are the core techniques, from filters to segmentation.

Hertiv engineering teamReviewed by a senior engineer
6 min read
Image Processing Techniques in Computer Vision Explained
On this page

Short answer

Image processing techniques prepare and analyse pictures so computer vision systems can recognise objects, read text and measure scenes. The main techniques are enhancement, filtering, edge detection, segmentation, feature extraction and morphology, each turning raw pixels into structure a model can use.

What is image processing in computer vision?

Image processing is the set of techniques that change a raw picture into a form a computer vision system can read. It cleans noise, fixes light, finds edges and cuts the picture into parts, so the system works with structure instead of raw pixels.

A camera gives the system a grid of coloured dots. On its own that grid says nothing about what is in the scene. Image processing turns the grid into lines, shapes and regions, and the vision model then reads those shapes to find objects, faces or text.

Processing happens before the model runs. A good pipeline can make a simple model work well, while a poor pipeline can make a strong model fail, so teams spend as much time on processing as on the model itself. For the wider field, what computer vision is explains how systems read pictures.

How does the image processing pipeline work?

An image processing pipeline runs a picture through a fixed set of steps, each one preparing it for the next. The table below shows the steps and what each one does.

StepWhat it doesExample
CaptureTakes the pictureCamera, scanner, sensor
PreprocessFixes size and colourResize, grey scale, normalise
EnhanceImproves clarityContrast, sharpen, denoise
Detect edgesFinds outlinesSobel, Canny
SegmentCuts into regionsThreshold, watershed
Extract featuresMeasures what mattersCorners, shapes, texture
DecideReads the resultClassify, count, measure

Not every picture needs every step. A clean studio photo may skip enhancement, while a dim warehouse photo needs it. The pipeline is tuned to the pictures the system actually sees. Each step also has a check: if the output looks wrong, the team adjusts that step before moving on.

How do enhancement and filtering work?

Enhancement improves a picture so the next steps can read it. Contrast stretching spreads out the brightness levels, so a washed-out photo gains detail. Sharpening makes edges stand out, and denoising removes the grain that sensors add in low light.

Filtering works by looking at each pixel with its neighbours. A blur filter averages nearby pixels to smooth noise, while a sharpening filter subtracts the average to bring out detail. The filter size matters: a small filter keeps fine detail, and a large filter smooths more but can erase small objects.

The risk is overdoing it. Too much sharpening adds false edges, and too much blur erases the small marks the system needs to read. Enhancement should be tested on real pictures, not just on a clean sample.

What is edge detection?

Edge detection finds the lines where brightness changes sharply, which usually mark the outline of an object. The system scans the picture for sudden changes and draws the lines where they happen, turning a photo into a sketch of its shapes.

Two common methods are Sobel and Canny. Sobel measures the change in brightness in two directions and is fast and simple. Canny adds steps that thin the edges and drop weak ones, so it gives cleaner lines and is the usual pick when accuracy matters more than speed.

Edges are the raw material for the next steps. A system that counts boxes or reads a meter starts from edges, because the outline of each object is what lets the system tell one object from the next. Edges are also what separates vision from plain recognition, as computer vision versus image recognition explains.

What is segmentation?

Segmentation cuts a picture into regions that belong together, such as one object, one surface or one background. After segmentation the system works with regions instead of pixels, which makes counting and measuring much simpler.

The simplest method is thresholding: pixels brighter than a cut-off become one region, and darker pixels become another. It works well when the object stands out from its background, such as dark text on white paper.

Harder pictures need smarter methods. Watershed treats brightness like a terrain of hills and valleys and floods the low points to find regions, while semantic segmentation uses a trained model to label each pixel as road, person, car or building. The method is chosen by how messy the picture is. In medical scans, segmentation separates tissue types so a doctor can measure a tumour or an organ.

What is feature extraction?

Feature extraction measures the parts of a picture that matter for the task, and drops the rest. Instead of feeding millions of pixels to a model, the system feeds a short list of numbers that describe corners, shapes, colours and textures.

Keypoints are the most used features: small spots the system can find again in another picture, such as a corner or a sharp texture change. By matching keypoints between two pictures, the system can tell whether it is looking at the same object from a new angle.

Descriptors describe what surrounds each keypoint, so the system can match them even when light or angle changes. Good features stay the same when the picture is rotated, scaled or lit differently, which is what makes matching reliable.

How to build an image processing pipeline

You build an image processing pipeline by starting with the decision the system must make, then adding only the steps that help that decision.

  1. Name the decision. Write down what the system must output: a count, a label, a measurement or a yes-or-no answer.
  2. Collect real pictures. Gather pictures from the actual cameras and light the system will face, not clean samples from the web.
  3. Start simple. Try resize, grey scale and a basic filter first, and add steps only when the result is not good enough.
  4. Test each step. Add one technique at a time and measure the result, so you know which step helped and which one hurt.
  5. Use proven libraries. Build on OpenCV, scikit-image or Pillow rather than writing filters from scratch.
  6. Measure on new pictures. Test the finished pipeline on pictures it has never seen, so the result is honest.

For the wider build, how to implement computer vision covers the steps from data to a working system.

Example (hypothetical): a warehouse counts boxes

Example (hypothetical): a warehouse needs to count boxes on a shelf each hour. A worker counts 120 boxes an hour by hand, and the count is often off by 5 or 6 boxes. A camera above the shelf takes a photo every minute instead.

The pipeline enhances the photo, finds the edges of each box, segments the shelf into box regions and counts the regions. It counts 600 boxes an hour, because it checks 10 boxes a minute and there are 60 minutes in an hour: 10 times 60 is 600.

The arithmetic: the camera system counts 600 boxes an hour against 120 by hand, which is 5 times as many, and the error falls from 5 or 6 boxes to 1 or 2, because the same pipeline runs the same way on every photo.

What are the common mistakes?

The most common image processing mistakes are over-processing, testing on clean pictures only, and adding steps that do not help the decision.

  • Too much sharpening. Heavy sharpening adds false edges that the next steps read as objects. Sharpen only enough to read the real edges.
  • Clean test pictures. A pipeline tuned on studio photos fails in a dim warehouse. Test on the pictures the system will actually see.
  • Steps with no purpose. Every step should help the final decision. If removing a step changes nothing, remove it.
  • Ignoring light. Light changes through the day, and a pipeline tuned at noon can fail at dusk. Test at different times.
  • No measurement. If nobody measures accuracy on new pictures, nobody knows when the pipeline breaks. Measure every week.

Key takeaways

  • Processing turns raw pixels into lines, shapes and regions
  • Enhancement should be tested on real pictures, not clean samples
  • Edges, segments and features each serve the final decision
  • Add one technique at a time and measure the result
  • The simplest pipeline that works is usually the right one

Frequently asked questions

What is image processing?

Image processing is the set of techniques that change a raw picture into a form a computer can read. It cleans noise, fixes light, finds edges and cuts the picture into regions, so a vision system works with structure instead of raw pixels.

What is the difference between image processing and computer vision?

Image processing changes a picture into a cleaner or more useful form, while computer vision reads that form to find objects, faces or text. Processing prepares the picture; vision decides what is in it.

What is edge detection used for?

Edge detection finds the outlines of objects by locating sharp changes in brightness. It is used to count objects, read meters and gauges, find shapes and prepare a picture for segmentation.

What is image segmentation?

Segmentation cuts a picture into regions that belong together, such as one object or one surface. It lets a system count and measure objects instead of working with individual pixels.

Which library is best for image processing?

OpenCV is the usual pick for production pipelines, scikit-image suits research and teaching, and Pillow handles simple loading and resizing. The choice depends on the task, not on the library's size.

Do modern vision models still need image processing?

Yes, though less than before. Deep learning models read raw pixels, but cleaning, resizing and normalising the picture still improves accuracy, and classical techniques such as edge detection remain useful for measurement tasks.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building a vision system that reads pictures? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Computer Vision service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call