Overview of vision system (Principle of edge detection)

This time, I will talk about the theme of "Overview of vision system". Based on the experience of production engineer, this section mainly introduces overview of vision system and key points during mass production.

Background of vision system

With vision system price reduction and automated judgment trend, more and more companies are introducing automatic judgment by cameras in their production lines.

When I first introduced them around 2010, the number of pixels in the camera was about 2 million, and the unit price was more or less $10,000. At these days, there are camera with 20 million pixels available. In the case of cheap camera, you can buy them for a few hundred dolloars, just like sensors.

By the way,even 10 years ago, digital cameras were sold for a few hundred dollars. I wondered why industrial cameras were so expensive, even though they had the same number of pixels, but the reason why they were expensive was not the hardware but the software.

Advantage of vision system

The advantages of vision system are as follows. You can make a quantitative judgment. Processing is fast. Record remains. Compared to the case of human judgment, handling is easier and there is no difference in quality among judges (quality judgment is quantified).

It has lower installation costs, so you can design your production line at a much lower cost than putting operators.

You can also leave the image data as a record. Recently, the number of pixels has increased and the size of image data has increased, but you can also select the option that leaves only NG judgment image.

Disadvantages of vision system

I can't find much disadvantage, but if I dare to mention, sometimes there is a subtle difference in the way the image is reflected, which causes an erroneous judgment.

If the shape of reference position changes subtly, or if abnormal light reflection occurs on detector, it will make an erroneous judgement.

Even if it's small difference that doesn't affect people's judgment, it could affect when judging by camera.



Principle and function of vision system

Vision system has various functions.
Please consider that it has the same functions as PC, such as position correction, edge detection, color extraction, dimension measurement, shape judgment, etc.

The software specifications such as operability differ depending on the manufacturer, but the basic internal processing is the same. This time, I will briefly introduce the principle of edge detection.

How edge detection works

Image data is composed of many points called pixels. One pixel consists of an element called RGBA.

1 byte is used for each of R (Red), G (Green), B (Blue), and A (Alpha, transparency). For example, if you have a camera with 20 million pixels, the number of pixels is 5000 pixels vertically x 4000 pixels horizontally. *The total number of pixels in the vertical and horizontal directions is 20 million.

The RGBA data of the Nth pixel on this screen are defined as follows.

R: data(N+0)
G: data(N+1)
B: data(N+2)
A: data(N+3)

screen and pixel

This mechanism and process works exactly the same way as the image editing software on your computer.

The Nth RGBA data is compared with the (N+1)th (*next pixel) RGBA data, and the part with the largest change is detected as the edge.

The inspection direction is determined by setting the direction of X and Y axes, respectively.

pixel and edge detection

The above is a simple principle of edge detection.     (*Reference: Simple edge detection program)

The hardware part, such as the camera, is basically the same.

The software is also basically the same for all companies, but because each company develops their own software, the price of industrial vision system is more expensive than commercially available digital cameras.

Concerns at mass production process

After more than 10 years of experience working as production engineer, I have two concerns with vision system.

In order to manage the system for the long run, it is "necessary to learn the software" and "avoid complicated flow".

Don't create complicated flows

The processing speed of computer is fast. It can process entire flow in less than a second. Some production engineers try to inspect everything, but I disagree with this idea.

For example, it is possible to combine more than 50 flows. Not just edge detection, but also a combination of position correction and complex calculation flow. I see them often.

Need to learn software

While there is an advantage in being able to do a large number of tests at low cost, you have to realize that you are responsible for the maintenance costs of the software.

It would be nice if the person in charge of the installation could take responsibility for the production line until the production life ends, but this is not really possible. When it comes to 24-hour production, it's impossible for one person to take care of it.

Controls that are difficult for other engineers to see and understand should be avoided as much as possible. Unlike mechanical drawings and wiring diagrams, software controls are rarely included in equipment operating manuals, and even if they are, they are not easy to understand.

My impression is that unlike PLC programs and wiring diagrams, there is very little information or comment that others can understand the overview later on. It is unfortunate that no one but the person who set up the inspection algorithm can understand the outlines, and it is impossible to debug it without analyzing the operation of the system and the inspection algorithm from zero. This means that the initial hurdle for other engineers is quite high.

This hurdle can be lowered if camera and vision system is common to exsiting production lines. A new production line that has nothing in common with other lines and just introduces the latest products will cause this kind of disadvantage.

RELATED) introduction of product traceability in the manufacturing industry
RELATED) Principles of TIG Welding and Issues in Mass Production
RELATED) Introduction of caulking process



Tweet

comment or question