Project information

  • Category: Computer Vision / Optics
  • Client: Sterex
  • Project year: 2019

Computer Vision QC of Electrolysis Needles

The client, Sterex, is a leading manufacturer of electrolysis products and equipment for electrolygists.

As part of their product range, Sterex supply the needles used in the process of hair removal by electrolysis. With their manufacturing systems reaching hardware obsolescence, they sought an upgrade implementing modern software/hardware solutions.

Requirements for the solution were:

  • to be plug-and-play with the existing manufacturing line PLC,
  • to be capable of deployment on machines with different ambient lighting conditions and optics, and with minimal reconfiguration,
  • (optional) to return quanity control (QC) decisions faster than the previous system.

The manufacturing process begins with the loading of a shank (the needle base) into a collet fixed to a rotary platform. The collet is then sequentially rotated around the centre of the platform, with each rotation moving the needle to another "station". Each station is dedicated to performing a single part of the manufacturing process.

Two of the stations are reserved for needle quality inspection, where checks are made to ensure the needle length and bend are within acceptable tolerances, and to ensure it has been properly capped. The capping process adds plastic shielding around the needle to protect it from damage during transit.

Each needle is inspected both prior to, and after, the capping process. The QC system has the responsibility of informing the PLC whether the needle should be accepted or rejected. It is this QC system that was replaced, including both the imaging component (identification/measurement) and interface to the PLC.

Numerous algorithms (and combinations thereof) were tested for identification of the needle in the image, including Canny/Hough and feature matching using ORB descriptors. Both of these produced reasonable results, but were not consistent enough for use on an automated production line. The realised algorithm was a more linear combination of thresholding, contouring, template matching, affine transformation, a bespoke needle identification routine and polynomial fitting.


The affine transformation is optional, but gives the system resilience to translation, scale and rotation. The resilience to scale and rotation is particularly effective in accounting for discrepancies between orientations of the needle in the collet, while resilience to scale is necessary in a system requiring physical measurements to be made without telecentric lenses.


The hardware solution used an arduino based PLC. The software solution was written in Python3 using a variety of libraries including Numpy, SciPy, OpenCV and Matplotlib. The pipeline is fully configurable through JSON.

If you're interested in implementing a machine vision system for your application, please do not hesitate to contact me.