Anda di halaman 1dari 4

Latest Techniques and Applications Series

100 TIPS FOR


STABLE MACHINE
VISION INSPECTIONS
Image Filter Edition, vol.1
PREFACE
Image enhancement filters can play a vital role in stabilising machine vision system inspections by making the captured image easier to
inspect. There are many different types of image filters. Their effects vary and some provide more benefit when used in combination with
other filters. When selecting the image filters to use, an understanding of their characteristics and functions can lead to more stable
inspections. This guide will introduce the types of image filters and their results when used effectively.

EXAMPLE 1 REAL-TIME CORRECTION OF RANDOM VARIATION IN BRIGHTNESS FROM PART-TO-PART

FILTER USED SHADING CORRECTION

Image after applying the shading correction filter


IMPORTANT POINTS

When inspecting for stains or


Image prior to filter processing
scratches on metal surfaces,
uneven brightness and random
shading occurring on the surface
can cause instability.
The shading correction filter is
effective at ignoring these types
of surface problems making it
possible to extract only the
defects, regardless of variations
from part-to-part. Real-time
corrections are made to the
grey-scale image (instead of
dynamically changing the binary
level), which greatly improves
stability.

Image with binary filters

Typical applications in which Dimensional Character


Defect inspection Positioning Presence/quantity
the shading correction filter is used measurement inspection
ALGORITHM OF THE SHADING CORRECTION FILTER

1 Create an estimated background image. An estimated background image is created using an extraction
filter to remove details from the captured image of a size less
than the specified parameters.

2 Subtract the estimated background image Input image Estimated background image Subtracted image
from the input image.

3 Optimise the image. The image optimization changes the resulting image into one that is
more suited for inspection by increasing the gain and eliminating
noise.

CANCELING FILM REFLECTION + CANCELING UNEVEN LIGHTING +


EXAMPLE 2 STABILISING INKJET CHARACTERS EXAMPLE 3 EMPHASISING DEFECTS
FILTERS USED SHADING CORRECTION + SHRINKING FILTERS USED SHADING CORRECTION + SHRINKING

Image prior to filter processing Image prior to filter processing

Image after filter processing Image after filter processing

IMPORTANT POINTS IMPORTANT POINTS

The stability is increased by using the shading After eliminating uneven lighting (shading) caused by
correction filter to reduce the effect of the background part variation, the (bright) defect is expanded to
noise and the shrink filter is used connect the dots. emphasise it.
EXAMPLE 4 ELIMINATING BACKGROUND NOISE DURING THE INSPECTION OF DEFECTS

FILTER USED EXPAND FILTER

IMPORTANT POINTS

Sometimes, in addition to the


Image prior to filter processing Image after filter processing
defect that needs to be detected,
the captured image contains
background noise or small
debris that needs to be ignored.
In this situation, the expand filter
is used to eliminate the minor
noise and debris, leaving behind
only the large defect to be
targeted. When targeting a bright
defect (the background is dark),
use the shrink filter. It is also
possible to eliminate only the
noise components while
maintaining the original size by
using the expand filter in
combination with the shrink filter
(see example 5).

Typical applications in which Dimensional Character


Defect inspection Positioning Presence/quantity
the expand filter is used measurement inspection

EXAMPLE 5 PROFILE NOISE SMOOTHING


ALGORITHM OF THE EXPAND FILTER
FILTER USED EXPANDING (n TIMES) + SHRINKING (n TIMES)
In this processing, the
Maximum
intensity of the central pixel
Expanding intensity value
in a 3 × 3 set is replaced
with the maximum intensity 2 5 9
of the 9 pixels including the
one in the centre. This has
4 9 3
the effect of eliminating
black noise components.
0 1 2

Magnification
ALGORITHM OF THE SHRINK FILTER
In this processing, the
intensity of the central pixel
Shrinking
in a 3 × 3 set is replaced
with the minimum intensity of 2 5 9
the 9 pixels including the
one in the centre. This has
4 0 3
the effect of eliminating white
noise components. Image prior to filter processing Image after filter processing
0 1 2

Minimum intensity value IMPORTANT POINTS

Burrs occurring on the profile are deleted through the


Not only can these filters be used alone, but applying the expand application of the expand filters, and the original overall
KEY filter followed by the shrink filter the same number of times
POINT eliminates only the small black defects while maintaining the size is maintained through the application of an equal
original large features. number of shrink filters.
EXAMPLE 6 DENT INSPECTIONS THAT CANCEL THE UNEVEN REFLECTION OF METAL PARTS

FILTER USED EXPANDING + SHADING CORRECTION

IMPORTANT POINTS
Image prior to filter processing Image after filter processing

The expand filter can delete


subtle scratches caused during
manufacturing and the shading
correction filter can cancel the
uneven background colour and
brightness of metal parts.

EXAMPLE 7 DETECTION OF DENTS HIDDEN BY REFLECTIONS FROM GLASS

FILTER USED SHRINKING + SHADING CORRECTION

IMPORTANT POINTS
Image prior to filter processing Image after filter processing

It is possible to solve difficult


inspection problems by using the
shrink filter to highlight the dents
that appear as dark defects
within the diffuse reflection and
by using the shading correction
filter to cancel the random
uneven lighting.

EXAMPLE 8 SCRATCH DETECTION IGNORING UNEVEN LIGHTING AND HAIRLINE FRACTURES ON METAL SHAFTS

FILTERS USED EXPANDING + SHADING CORRECTION + SHRINKING

IMPORTANT POINTS
Image prior to filter processing Image after filter processing

The expand filter is used to


emphasise scratches when they
appear as bright defects. The
shading correction filter is used
to simultaneously cancel the
shading and hairline fractures
that occur on the curved surface
of the shaft. Then, the shrink filter
is used to delete the remaining
noise components.

www.keyence.com

Copyright (c) 2016 KEYENCE CORPORATION. All rights reserved. VisionSystemTips1-WW-EN-GB 1026-1 E 600I37

Anda mungkin juga menyukai