Académique Documents
Professionnel Documents
Culture Documents
INDEX
Chapter 1
1 2 3
An explanation on the use of 2D code readers based on reading principles and structure.
Types of 2D code readers 2D code reading principles The principle of monochrome recognition 3-1 How to capture monochrome 3-2 Differences in appearance based on colour 3-3 Characteristics based on the surface condition and shape of the workpiece 1. Types of reflection 2. 2D codes printed on a casting surface 3. 2D codes printed on a machined and processed surface 4. 2D codes printed on a black resin surface 5. 2D codes printed on a mirrored surface
Lighting
Camera
Lens
Camera/Lens
Decoder
Lighting
Separate type:
The separate type 2D code reader is one in which the lighting, camera, lens, and decoder all exist as individual devices. Because each part is separate, this type of reader offers reading performance with an extremely high degree of freedom.
2D code readers generally extract and decode 2D codes from captured images that have been converted to binary. If the correct code cannot be recognised using the binary-processed image, the code cannot be read.
(1) Light emitted from an LED illuminates the target code and is captured using a CMOS sensor or other such device. (1) (2) The captured image is downloaded and converted to grey-scale. Captured image
Optimal image
Grey-scale images are also known as "monochrome" or "black and white" images. Because they are displayed with a smooth brightness that uses white, grey, and black, they are classified as distinct from binary images and are thus called so in image processing.
(3) (4) The image is decoded in accordance with code standards. The code data is then output via RS-232C or Ethernet communication. Binary image
As seen in image (2), the binary image will vary greatly depending on how the image was captured using greyscale. Even if the printing condition is such that it can be recognised by the human eye, depending on the way the light hits the target, the surface condition of the printed workpiece, and camera conditions, the 2D code reader may be unable to correctly recognise the code.
Camera
Code (Black)
Background (White)
Purple
Blue
Aqua
Green
Yellow
Red
Now, apply this understanding to 2D code readers where red lighting is often used. When white, black, red, and blue items are illuminated with red lighting, the reflection will be as follows.
Reflected light when red lighting has been used to illuminate a white or black target
Red lighting
Camera
The property of the colour white is that it reflects all colours. Therefore, light that has been emitted from a red light source will be completely reflected off of white objects.
Transmitted light
Reflected Light
White object
Red lighting
Camera
Conversely, the property of the colour black is that it absorbs all colours. Therefore, once it hits a black object, light that has been emitted from a red light source is almost entirely absorbed.
Transmitted light
Reflected Light
Black object
Photo
The background of the code is projected in the image as bright white, while the black of the code is projected as black. Following this principle, 2D code readers have been designed to capture high-contrast images.
Reflected light when red lighting has been used to illuminate a red or blue target
Red lighting
Camera
The property of the colour red is that it only reflects the colour red. Therefore, light that has been emitted from a red light source will be completely reflected off of red objects.
Transmitted light
Reflected Light
Red object
Red lighting
Camera
Conversely, the property of the colour blue is that it absorbs all colours (does not reflect light) except for the colour blue. Therefore, once it hits a blue object, light that has been emitted from a red light source is almost entirely absorbed.
Transmitted light
Reflected Light
Blue object
Photo
Photo
Because both the white background and the red code reflect red light, there is a low contrast between the background and the code. Conversely, with blue codes, the background reflects red light and the blue code absorbs red light. As mentioned, 2D code readers have been designed to capture an image in which there is high contrast between the background and code. When looking to increase the contrast in applications such as this, it is important to recognise the combination of lighting, the code colour, and the background colour. Colour combinations that are close in wavelength will be low contrast and result in an unstable reading. When reading 2D codes, review the specifications along with the relationship between the colours of the lighting, background, and code to ensure the highest contrast is achieved.
3-3 Characteristics based on the surface condition and shape of the workpiece
Surface conditions and the shapes that codes are printed on are also important factors to consider when reading 2D codes. When printing 2D codes on objects other than labels, the way in which the lighting is reflected will vary depending on the surface condition and shape. Because of this, stable reading cannot be performed unless it is done in a manner that fits the workpiece in question. When determining reading performance, it is necessary to understand the features of the target workpiece.
1. Types of reflection
Entry angle
Reflection angle
Mirrored reflection
This indicates reflection that occurs as it would when light hits a mirror; a reflection in which light coming from one direction is emitted away in another direction. This is also known as specular reflection. In a mirrored reflection, the entry angle and reflection angle become equal and almost no diffuse reflection occurs.
Diffuse reflection
This indicates reflection that occurs when light hits a textured surface and is then reflected in various directions. This is also called a scatter reflection.
Specular reflected light Diffuse reflected light (scatter reflected light)
When checking code reader grey-scale images, it is possible to see small differences in the background by using a normal image. When converting a grey-scale image into a binary image, many black elements are produced around the code, resulting in a 2D code that cannot be read.
[Grey-scale image]
[Binary image]
When the lighting for the code reader is increased, the black elements of the projections and depressions of the cast surface will appear white. Because the cell has been printed by direct marking, though faint, it is clearer than the projections and depressions of the cast surface. When viewing a binary image, stable reading is possible because the code is in a state that allows it to be properly recognised. When printing directly on a cast surface, try to do so in a manner that will allow for a large amount of light to be used.
[Binary image]
[Magnified image]
If machined and processed surfaces are not polished, the resulting processing flaws will remain. As seen in the image above, when a 2D code is printed on a cylindrical workpiece, processing flaws are left in the cutting direction. As a result, the lighting is extended in the direction of these processing flaws (images below).
There are many instances where 2D codes are printed without regard for the direction of the hairlines. When directly illuminated with ring lighting or other such illumination, the lighting will be reflected in various ways depending on the workpiece, making it impossible to perform stable reading. In order to evenly irradiate the lighting, a diffusion plate is used (Image A). If the object has clear printing, it is possible to intensify the lighting and make the hairlines around the 2D code appear white, creating a state in which only the 2D code stands out (Image B). When printing a 2D code on a surface with hairlines, it is important to print the cells deeply and precisely.
Image A
Image B
10
Both codes below are printed on a resin surface with a laser. When capturing images with a 2D code reader, the black resin surface will be highly reflective and produce many white areas due to the influence of glass fibre elements.
Under normal conditions, both codes should appear white, but when looking at a grey-scale image, the code area on the right has been inversed to black. This is because the amount of reflected light for the printed area is smaller than the area around the code. The 2D code reader also has settings to perform reading in black/white inverse, as it is impossible to perform reading with a single setting if this type of condition occurs.
In order to allow the light reflected from the glass fibres to escape, the code reader is mounted in an angled direction. Angling the light makes it possible to reflect only the printed area of the code and allows it to be seen unaltered in white print (black/white inverse).
11
Depending on the printing method, 2D codes that have been printed on a mirrored surface will appear to have been coloured black or coloured white. However, with a camera image, the cells will appear in inverse as white no matter what the printing conditions are.
If the code reader is mounted perpendicular to the workpiece, the reading unit will be reflected in the workpiece surface, as shown in the image above. Even if the 2D code is properly recognised, due to the influence of the lighting and the reading unit, the range in which stable reading can be performed will be narrow, resulting in a state where cells become hidden and unreadable.
Lets mirror-reflected light escape so that it receives only diffuse reflected light from the cells Results in a state in which the reading unit is not reflected in the code surface.
In order to achieve stable reading, it is best to mount the code reader in an angled direction with respect to the workpiece.
12