Welcome to Kunshan EEK Automation Equipment Co., Ltd.
Home/Technical Guides/How Should Visual Inspection Accuracy Be Defined? Stop Treating the Pixel Equivalent as Accuracy

How Should Visual Inspection Accuracy Be Defined? Stop Treating the Pixel Equivalent as Accuracy

Visual inspection accuracy and pixel equivalent are not the same thing. This article explains the relationship between the smallest resolvable defect, pixel sampling, imaging contrast and judgement stability, and how to work backwards from the "minimum defect size" to an imaging solution.

Clarify One Thing First

Breaking down the word "accuracy": being able to capture ≠ being able to measure accurately ≠ being able to judge stably

The Short Answer

Visual inspection accuracy is not pixel equivalent. Pixel equivalent only tells you how much physical size one pixel represents, whereas the defects that can actually be detected also depend on the contrast of the defect in the image, the number of pixels the defect spans and the judgement threshold. The correct approach is to first define the "minimum defect size" and the "inspection area", then work backward to the camera resolution and lens, and finally validate by measurement with physical samples.

In visual inspection projects, "what is the accuracy" is the question asked most often and the one most easily answered vaguely. Many people answer with the "pixel scale", for example "0.02 mm/pixel". This number is meaningful, but it does not equal inspection accuracy.

Where is the difference? For a defect to be reliably detected in the image, it must span several pixels (usually at least 3-5) and must have sufficient contrast with the background. If the defect is only 1 pixel in size, or its contrast is close to the noise level, it cannot be detected — no matter how fine the pixel scale is.

So any discussion of accuracy must state three things at the same time: minimum defect size, inspection area, and the imaging contrast between defect and background. Without any one of them, the discussion cannot lead anywhere practical.

selection Factors

Minimum Resolvable Defect Size

This is the starting point of the whole solution. It determines how much pixel scale is needed and thus the camera and lens. The quality department should first provide a quantitative standard.

inspection area

Together with the minimum defect size, this determines camera resolution. The larger the area and the smaller the defect, the higher the resolution required, and costs rise quickly.

Imaging Contrast

Whether a defect forms a clear image depends on the illumination solution. The same defect may be clear under one illumination and invisible under another. This is the most easily overlooked link.

Judgement Stability

The requirement is not only that defects "can be detected" but that they "are detected every time". Stability depends on pose consistency, illumination stability and threshold margin.

cycle time

Exposure time and inspection time are both constrained by cycle time. The higher the speed, the shorter the permitted exposure time and the higher the demands on the light source.

Field of View and Pixel Sampling

Do Not Mistake Pixel Scale for Inspection Accuracy

Relationship between field of view, working distance and focal lengthExplains that working distance and focal length together determine the field of view (FOV) size, which in turn affects per-pixel sampling capability.Camera + LensField of view FOV: H × V (depends on focal length and working distance)Working Distance WDLonger focal lengthSmaller field of viewSingle-pixel SamplingHigher capabilityPixel sampling value ≠ inspection accuracy: the lens / light source / workpiece / mounting distance / mechanical stability / algorithm together determine the final result
FOV / working distance / focal length relationship diagram — increasing the focal length narrows the field of view and raises the pixel sampling capability per unit area; but the pixel sampling value cannot be taken directly as inspection accuracy.

The pixel equivalent is calculated directly: field of view width ÷ camera horizontal resolution. For example, with a field of view of 150 mm and a horizontal resolution of 8192 pixels, the pixel equivalent is about 0.018 mm/pixel.

But this number cannot be taken directly as the inspection accuracy. To judge whether a defect of a given size can be detected, you also need to look at how many pixels it spans and how large its difference from the background is in the image.

ConceptMeaningCommon Misconceptions
Pixel EquivalentThe physical size represented by one pixelMistaken for inspection accuracy
Smallest resolvable defectThe smallest defect that can be reliably detected under given imaging conditionsEquipment selection starts before quantified standards are defined
inspection accuracyDeviation of the measured value from the true value (dimensional)Often confused with pixel resolution
Detection Rate / Escape RateStatistical performance of defect detectionUsing a single test result to represent overall capability

Light Source and illumination

Three illumination methods illustrated: front, side and backlightThree common industrial vision illumination methods and their applicable scenarios.Front LightingcameraContour and surface details, best versatilityWorkpiece (Illustrative)Side LightingcameraEmphasizes bumps, scratches and edges while suppressing reflectionsWorkpiece (Illustrative)BacklightingcameraProduces a clear contour, suitable for presence/absence and dimensionsWorkpiece (Illustrative)The equipment comes standard with a white light source, with infrared light and polarizing filters available as options; the actual illumination method must be determined together with the workpiece material and reflection characteristics
Three Common Illumination Methods — The same workpiece shows very different visual features under different illumination methods; reflective metal parts, black parts, and transparent parts usually require tailored illumination.

Why Illumination Matters More Than the Camera

The camera determines "how fine a detail can be resolved", and the light source determines "whether it can be seen". If the light source does not bring the defect into view, a better camera will not help.

Illumination Orientation for Common Defects

Diffused light suits color difference and stains; low-angle light suits scratches and indentations; transmitted light suits holes and damage; coaxial light suits reflective surfaces.

Illumination Stability

Light source brightness drift makes thresholds ineffective. The solution must account for light source stability and aging compensation, as well as the influence of ambient light.

Trade-offs When Contrast Is Insufficient

If the contrast of a certain defect type on the existing material is consistently insufficient, it should be clearly acknowledged that it cannot be detected reliably, rather than forcing the threshold — the latter only produces a large number of over-rejections.

algorithm Selection

The principle for algorithm selection is "choose by the form of the acceptance criteria", not "choose by how advanced it is". Where the geometric criteria are clear, use a rule-based algorithm; where the form varies widely, use deep learning. The two are often combined.

Positioning and Matching

Establishing a stable coordinate system first is the prerequisite for all judgements.

  • Shape matching / gray-level matching
  • Align first, then segment regions

Thresholding and Morphology

Suitable for defects with a stable gray-level difference from the background.

  • Threshold segmentation + connected-component statistics
  • Judge by area / length-to-width / circularity

Edge and Contour Measurement

Suited to dimension and contour judgement.

  • Sub-pixel edge extraction
  • Line / circle / arc fitting

deep learning

Suitable for defects whose forms vary widely and whose rules are hard to enumerate.

  • Classification / detection / segmentation
  • Requires a sufficient number of labeled samples

Communication and interlocking

The output of the inspection system must act on the production line, so the communication scheme must be decided early in the project, not added at the end. The brand of the site PLC and the available interfaces directly determine the implementation.

  • 01 Camera image acquisition
  • 02 Algorithm-Based Judgement
  • 03 Combine results into a single OK / NG per piece
  • 04 Results written to the communication interface
  • 05 PLC reads and executes actions
  • 06 Rejection / sorting / alarm
  • 07 Data written back to the database

Common Question

Does a pixel size of 0.02 mm mean that 0.02 mm defects can be detected?
That does not follow. A defect must span enough pixels in the image (usually at least 3 to 5) and have sufficient contrast with the background to be detected reliably. Pixel scale only tells you what size one pixel represents; it is a necessary but not a sufficient condition.
How do I determine what configuration my project needs?
Define two things first: the minimum defect size and the inspection area. Then use them to work back to the required pixel scale and camera resolution, and select the illumination solution according to the defect types. Finally, always validate by measurement with physical samples.
Why Validate with Physical Samples?
Because the imaging contrast of a defect cannot be derived from a specification table. The same type of defect varies greatly with different materials and different illumination. Only measurement can confirm the precondition of "whether it can be seen".
Can inspection speed and accuracy be improved at the same time?
There is a trade-off relationship. High speed means short exposure time and requires a stronger light source; high accuracy requires higher resolution, which increases the data volume and the algorithm processing time. Real projects need to find a balance among these three.
What escape rate can your equipment guarantee?
[To be added] The escape rate is directly related to the specific defect type, imaging conditions and judgement threshold, so it cannot be promised as a single number. The reasonable approach is to calculate statistics separately for each defect type and to run an acceptance test on a sample set confirmed by both parties.
What is most easily overlooked during selection?
illumination plan and tooling. The root cause of most project failures is not that the algorithm is not strong enough, but that the defect was never captured in the image at all, or that the material orientation differs every time.

Submit sample testing

We recommend basing the selection conclusion on measured sample trials. Please provide samples containing known defects and quantitative defect criteria, and we will validate imaging and detection.

JPG / PNG supported, multiple files allowed
Each file must not exceed 20 MB
    JPG / PNG supported, multiple files allowed
    Each file must not exceed 20 MB
      JPG / PNG supported, multiple files allowed
      Each file must not exceed 20 MB
        A solution engineer will contact you within 1 business day after submission

        Need to assess imaging conditions, defect criteria and cycle time item by item? Go to the Full Requirement Assessment →

        The Most Effective Step in Selection: Test Your Own Sample

        For the same workpiece, the inspection result differs greatly with different lenses, light sources, mounting distances and algorithm combinations. Sending us samples for measurement is more reliable than extrapolating from a specification table.

        Online support WhatsApp
        WeChat
        Scan the QR code to add us on WeChat
        Call us Back to top