Color separation with image processing and mobile camera

In the past,  machine vision systems worked with black and white cameras, but gradually with the advancement of technology, color cameras entered the machine vision. Using colors makes image processing easier. With color processing, we can separate objects, detect their damage and check their quality. In this article, we want to distinguish color fuses using color processing.  We use HALCON software to implement this project. This software can be connected to all industrial and non-industrial cameras Here we have shown how to connect a simple mobile camera to the efficient HALCON software instead of an industrial camera and use it to process color parts.

Separation of colored parts with mobile

Color processing in industry

It is not possible to do some machine vision projects without using color processing. Color processing is used to check the quality of products. For example, by using color detection, it is possible to detect the ripeness or unripeness of fruits or the presence of stains and damage on them. Color image processing is also used in the automotive industry. As an example, the picture below is related to the fuse box of the car and there are a number of fuses in it. By analyzing the colors, we can check whether all the fuses are in their proper place or not.

Separation of colored parts with mobile

Choosing color recognition software

We can use HALCON’s powerful software to process color images. With this software, we can easily write a program to recognize colors. This program can take images from the camera at high speed, then process them and display the result in the output. Many image processing software are only able to analyze photos offline, but with Halcon software, we can easily receive color images from the camera and process them. In the picture below, you can see that we have used HALCON software to detect the number and color of the dummies

Color recognition in Halken

Implementation of fuse color processing system with mobile camera in HALCON

We are going to implement the fuse color detection program in HALCON software. To run this program , we need a BackLight camera and lighting . We have used the mobile camera to send images to the HALCON app. In order to keep the distance of the camera from the fuses constant, we have placed the mobile phone on aluminum profiles connected to the metal base. The mobile phone sends the images to the HALCON program; HALCON receives the images and processes them quickly and displays the results

In the following, we will explain how to connect the mobile phone to the HALCON image processing software. Then, considering that lighting is particularly important in the color processing system, we will explain the reason for using backlight lighting and finally, we will see the display of the result of the program execution.

Mobile image processing

 

Connecting mobile phone to HALCON software

The mobile camera is available to all of us, the quality of its images is relatively good and it has suitable settings; So it’s great that you can transfer images to the software and process them with your mobile phone at no extra cost!

Here, we have used an interface software to connect the mobile phone to the HALCON software. The mobile phone is placed on aluminum profiles, so the distance of the camera from the fuses is fixed. The mobile phone is connected to the HALCON software using the WiFi network. In the HALCON software training course, we have explained the details of connecting the mobile phone to the HALCON software.

Proper lighting in the color separation system of fuses

Lighting in machine vision is the most important step in doing the project right. By using the right lighting, we can highlight the information we want in the photos. Here we have used BachLight or back light as the light source. As you can see in the picture, because the fuses are transparent, this lighting has highlighted the characteristic color of the fuses well.

Backlight lighting

Detecting the color of fuses with a mobile phone

By connecting the mobile phone to the HALCON program, the image of the fuses is sent to the program. The program first receives the color samples from us and is so-called trained, and then it is able to display the color and the number of fuses online with high speed and accuracy. As you can see in the figure, the program displays the color type next to each fuse and prints the number of each type in the corner of the image.

Color recognition in industry

In the picture below, the number of orange, red, blue and yellow fuses is 2 and the number of green fuses is 3. The program is not dependent on the number of fuses and any number of fuses can be placed on the light. You can see the description of the codes related to the program in the HALCON software training course

Fuse color detection

An example of the application of color image processing in industry

In many industrial projects, color processing is a breakthrough. For example, in the image below, you can see that color processing has been used in the car fuse box to check the placement of fuses in the right place. Automotive fuses are classified based on color. For example, 10 amp fuses are red and 15 amp fuses are blue. In the figure below, the red color around a rectangular area means there is an error in the fuse color of that area. You can see the complete coding training of this program in the training course of HALCON software .

Fuse box quality control

Leave a Reply

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

ارتباط سریع با ما