Lighting training in machine vision and image processing

Machine vision experts believe that choosing the light source is the most challenging part in machine vision systems. If the light is chosen correctly, the programming process will be very simple, and if the light is chosen incorrectly, we are often unable to solve the problem.

Unfortunately, the importance of choosing the right light is not well understood in our country. The analysis of many domestic projects shows that their main problem was in the choice of light. In fact, they start to design a system without doing enough analysis and necessary to choose the light. This makes both their coding more complicated and their timing problem and finally they fail. Anyway, the problem of choosing light is easier to do in matte and non-glossy objects as well as flat objects. In this article, we will teach you the basic points of lighting in Machine vision systems.

Click here to register for the “Machine Vision Training Course with Halcon Software”.

1- Teaching different types of light sources in machine vision

Various sources are used in image processing. In this article, we introduce 5 important light sources in machine vision and image processing. We have described different types of commonly used lights. Reading this article can help you with your specialized knowledge in choosing sources. In the picture below, some of these light sources are shown. For example, if you are looking for metal lighting, a dome light source is great. For round objects like washers, ring light can be a good option. If you are looking to examine a transparent object, Back Light is a good option. To illuminate a non-glossy matte surface, you can use a screen light source or linear light.

Types of lights in Machine vision systems

2- Teaching lighting methods

Knowing lighting techniques is one of the basic steps in choosing light in machine vision systems. In the article lighting techniques in machine vision systems, we explain the types of lighting methods in machine vision. we have given Depending on what you are looking for in the image, you can choose the lighting technique you want.

Consider the following image as an example. The image of the printed circuit board was taken with different lighting techniques. If your purpose in checking the printed board is to find the holes, count the bases or check its outer border, you can use the back lighting technique. While for reading the numbers on the printed board, dark field illumination can create a good contrast. In the lighting from the front, with the ring light, a strong reflection is created on the surface and the border of the printed board with the background is not recognizable. You can get more details by looking carefully at the pictures.

Lighting techniques in car inspection systems

3- Check lighting in systems similar to machine vision.

One of the ways to choose the light you want is to get help from similar examples. As an example, suppose we want to check the presence of bottle caps in a production line. It is enough to search for similar examples in Google with the term “bottle cap inspection”. The image below is one of the results of Google images for searching the mentioned phrase. If you are familiar with lighting techniques, we will notice carefully in the image that the image was taken with Back Light. You can easily get one step closer to choosing what you want. Visit external sites for a more detailed search and find more complete information.

Please note that in some cases there is no similar sample or if it exists, its information is not accessible. Obviously, specialized companies in the field of vision systems try to introduce their products in such a way that they cannot be reverse engineered.

Identification Battery door with car vision

4- Test various lighting methods in Machine vision.

Choosing a light source in the machine vision system requires both experience and testing. In many specialized image processing companies in the world, there is a room called the test room where there are all kinds of lights. In this way, lighting specialists in machine vision systems test various lights to get a good image and save the results for comparison. In addition, these companies maintain a complete archive of their tests, this archive provides them with a good source for choosing lite. For example:

 Light test room in vision systems

Anyway, the issue of light selection is easier in matte and non-glossy objects as well as flat objects.

5- Use the websites of Light High Vision manufacturers.

You can visit the sites of professional light manufacturers and increase your knowledge in the field of Machine vision systems lighting. For example, the image of reading the barcode from the package belongs to a specialized website of the Lite manufacturer. If you visit the Application section of this site, it has provided many similar images in the automotive, pharmaceutical, packaging, etc. industries. Seeing these photos will help you a lot in knowing which photos are good for processing and which are bad.

خواندن بارکد با لایت مناسب در سیستم های بازرسی ماشین

6- Check the effect of lighting on the image.

From the perspective of the human eye, the photo may look very good for processing, but not from the point of view of the algorithm; So don’t trust your eyes. Also, the human eye does not recognize the contrast correctly, so a good photo is one that the image processing algorithm responds well to, rather than what the human eye sees as a good photo.

Defect detection on metal in vision systems

7- Selection of Machine vision light source

The problem of choosing a light is not that the product just lights up. The point is to choose the light in such a way that it is easy to distinguish between healthy and damaged products by programming. Our experience has shown that one of the reasons for the failure of many projects carried out by domestic companies is the wrong choice of light.

Let me break down the issue a bit. Let’s assume that in a vision system, out of every 1000 products, statistically, only 3 products may be defective and we seek to detect it. This means we will have 997 healthy products and 3 bad products. On the other hand, it is very important for the manufacturer to find all 3 damaged products. So we have to choose a light in such a way that we can easily distinguish 997 healthy products from 3 damaged products by programming. Therefore, the program error percentage should be almost zero.

 The method of light selection in vision systems

8- Comparison of different lighting methods

When we encounter metals, shiny objects, or special defects in products, the process of choosing a light sometimes takes a lot of time, and we may have done many steps in this way, including research, testing, programming, etc. . Therefore, it is necessary to write down all the cases so that we can finally make a decision based on them. When you test with different types of lights, be sure to save the photos.

As an example, we in the Bina Pardazesh team have saved the following images with lighting in different modes with the aim of separating the bottle cap from the background in order to analyze each image to get the best answer.

 Lighting of image processing systems

Be careful, lighting is only part of the results that you should write down to complete a project. In the process of carrying out the project, everything must be recorded, from the observations during the visit, from the project location to the analysis and selection of camera, light, processor, etc.

It may be that the result of all our analysis is that we cannot solve the problem, here it becomes a little difficult because in many cases the justification that this project is out of our knowledge is for corporate capitalists and non-technical people who benefit from Financial project profit is difficult.

9- Get expert advice

To get advice, first find the person you want. But only those who have experience working in the field of vision systems can give you good advice. Let me explain more to you. Some image processing programmers think that the advice of photographers can be useful if the knowledge of photography and industrial photography is only 10% of the knowledge that is needed to choose light and the key to the other 90% is in the hands of those who, in addition to acquiring specialized knowledge In the field of lights, Vision Systems have struggled with the selection of lights in various fields for years. In short, Lighting is a specialized field in the world. That is, just as image processing programming is a specialized field, lighting is also a specialized field.

light suitable for glass in car vision systems

10- The importance of the light installation environment in the lighting of Machine vision systems

When visiting a project, ask yourself the following questions.

1- Is there enough space to install the equipment?

In some cases, not having enough space can meshbe a whole. Each of the light sources needs their own space depending on their dimensions and working distance. We may not be able to use some lights due to lack of space. In any case, keep enough space in mind during the design phase.

2- Is there dust and pollution in the environment?

If there is pollution in the environment, it is necessary to periodically clean the equipment exposed to pollution. The duration of the period depends on the level of pollution. Of course, it should be noted that in some vision systems, this process is built in automatically. However, in the first step, you must determine the level of contamination.

3- Do we have light pollution?

Sometimes ambient light spoils our work. For example, in one of the projects, we came across a case where the error rate of the device had increased. On the other hand, all our reviews showed the accuracy of the device’s performance. Finally, we realized that the presence of noise caused by the lighting used during the night caused this error.

To prevent light pollution in machine vision and image processing systems, we use a dark room.

Using Dark room to prevent light pollution in vision systems

Note: To find out whether a light source has noise or not, it is enough to see that light source using the camera of your phone. If the brightness in the image was constant, it means that there is no noise, but if the light movements were visible in the image and the image “flickered”, it means that our light source has noise.

Additional materials in the training of lighting in machine vision

And finally, the last word is that you may do all the above analysis but you cannot get a suitable picture to solve the project. In this case, two situations are possible:

The first case: the problem can be solved and needs more tests.

Maybe you haven’t checked everything. You may need to change the background image. You may need to use both front and back light at the same time. Either the camera and lens must be changed, or the solution to your problem may require 3D processing.

The second case: the problem cannot be solved.

The result of all your analyzes may indicate that the problem cannot be solved. Such problems abound in the world of machine vision. For example, one of the manufacturers of glass containers inside wanted to detect small breaks on the glass. But the manufacturer was only looking to find small fractures. The results of the analysis of the images showed us that defects such as knot waves and… make it impossible to see a fracture in some images and it is not possible to see only a fracture.

related content

Leave a Reply

Your email address will not be published. Required fields are marked *