A solution to improving the color identification of visual system

xiaoxiao2021-03-06  66

Foreword

The robustness of color identification in the visual system often encounters in the visual system, how to improve its robustness is a certain theoretical significance and practical value. This article proposes a practical scheme to introduce the color identification example in the visual subsystem of the football robot.

A difficult problem in achieving the visual subsystem of the football robot is the robustness of the image color. The main reason for the robustness of the image color is illuminated, and the noise formed during image acquisition, these factors make the collected The color on the image is unstable, and the color training algorithm is designed to solve this difficult point. The main purpose of the color training algorithm is to make a color correction list. When performing image identification, use the list to determine the actual meaning of each pixel color, which can accurately identify the color standard on the robot and accurately identify Data such as coordinates, directions of active objects on the field.

First, the color model selection

The two color models most common in image processing are the YUV model and the RGB model. These two color models can be converted to each other. The correspondence is as follows:

YUV in YUV indicates that the brightness, U and V represent hue, which can represent all colors. In theory, this color model can be judged by U and V to be a color, but the value of U and V is not very accurate due to the noise generated by the image acquisition card.

R represents red in the RGB, g represents green, b represents blue, each of which can represent the three-dimensional color of 256 * 256 * 256 = 16777216 colors, so it can basically represent all colors. Due to the noise generated by the illumination and image acquisition card, the RGB value of the color in the image is relatively large.

If the image of the image capture card output is a color array composed of RGB, select the RGB color model. The color training algorithm proposed in this paper is designed to solve the problem of robustness of the color that appears using the RGB color model. Obviously, after appropriate conversion, this method can also be used for YUV color model based color identification.

Second, the design idea of ​​the program

In the football robot competition, the football robot confronted in the venue, and he must always know that the football robot in the venue, azimuth and the position of the ball, so that the decision system gives the football robot actions. In the R0B0TCUP-180 football robot competition, each team has five players, each team has a color label, or blue or yellow, the ball is a diameter of 38 orange golf. In response to this situation, the visual system of the football robot system should be required:

1. Correctly identify the coordinates, azimuth, and ball coordinates of each team member of the enemy.

2, a certain real-time requirement, such as one second, ten times to process the image data sent by the camera, and issues data such as corresponding coordics;

3. Complete the required work under a limited PC resource. Generally, each team is equipped with a PC, in addition to completing the work of the visual system, you need to complete the decision system and work with the upper and lower machine.

The human identification object is identified by comparing the characteristics of the object, such as a shape, pattern, color, or a complex of the character. The human identification object first receives information to identify the object by the visual system, and then compares the object in memory, and then makes a decision.

The simulator is recognized by the identification requirements and conditions of the football robot:

1. Optimize the pattern and color of the football robot header;

2. Establish color libraries that can be trained and modified, store the color and patterns of each football robot;

3. Fast lookup algorithm for the physical color library.

Third, optimize the design of the football robot header pattern and colors

The football robot has a head sign, allowing the camera to be inserted at 3 meters above the site. There are some restrictions here: the venue is large, like a table tennis table; the football robot has no more than 180 square centimeters per person (calculated by projected area); the resolution of the camera is limited (generally 1024 * 1024). Corresponding to these conditions, one pixel corresponds to 3 * 3 square centimeters, i.e., the number of pixels corresponding to a football robot is limited, i.e., based on this limited pixel basis. Of course, improving hard device performance can provide more loose recognition processing. Isn't it better if you can perform a predetermined drama on a limited number of stages? The header of the football robot identifies the identification of a two-dimensional image, how is the design of the header pattern and color make the header image of the headline image, and the hardware software resources and the least overhead.

Several patterns and colors were designed in the experiment, and a pattern of simplicity and easily calculating the processing was designed. At the same time, considering the color of the color, let the color of the pattern are large, i.e., the difference between the RGB tricho is large, easy to distinguish. Figure 1 is one of them.

Figure one head symbol

Fourth, establish a color library that can be trained and modified

The color of the football robot header is different under different illumination, and its RGB value is different, and the ratio between them is also different; because the team can be blue or yellow, there must be a two-set image header Adapt to it; the other party of the game is different from the different sessions, so their pattern and colors are different. As seen from the above description, the pattern and color required to be identified are changed.

If you create a color library, after quick training, remember their color features, then apply in the actual environment, which is a way to make a manner.

The color library stores the color RGB value and the color standard it represents. When the image is identified, the RGB value of each pixel in the image is compared to the value in the color library, finds it equal or similar to it, color The color of this color represented by this color as the color of this pixel and adds the RGB value of this pixel to the color library. This creates the relationship between colors and color. The process sees Figure 2.

Figure II

V. Fast Find Algorithm for Real Color Bank

There are many kinds of colors in the color library. If you compare the color when you look for it, it's too wasteful. It is impossible to apply this, so you must design an optimized color lookup algorithm to make the color time Short as possible.

If the color library is built into the structure similar to the Haxi table, see Figure 3, so that the time complexity of the finding algorithm can reach the constant level, the spectacle can find the color you want to find in the library.

Save color standard status

R red component

G

Green component

B blue component

Point to the location of G component storage

Point to the location of B component storage

Figure 3, the structure of the color library

For example, find the color RGB (3, 253, 3) of a pixel.

First look up the R red component No. 3 area, found that there is a G green component, continue to find the number 253 position of the green component, find that there is a B blue component, continue to find the 3rd position of the blue component, where it is The color RGB (3, 3, 3) is specified. This only requires little calculation, you can find the color label state referred to in the color library. If the corresponding color returns the color label state corresponding to the color, if the fuzzy lookup algorithm is called if there is no call.

The idea of ​​the fuzzy lookup algorithm is to search on both sides of the R, G, B components to be found in the library, and find the color closest to this color within a certain range, this range is determined as needed. Tell it to a fuzzy factor. If there is a closest color in this range, add this color to the library to the library, and make the color label it represents equal to the color label representing the closest color, see Figure 4.

For example, to look for color RGB (4, 255, 2), the fuzzy coefficient is 3.

First look up from the No. 4 of the R red component, find that the G green component is not specified in the library, and look for both sides, the range is 3 cells, and when you find 3, you find that there is G green component, just follow the 3 G green The component entry looks for the 255th cell, and it is found that there is no specified B blue component. When you look for it, when you find a blue component, you find a blue component, you will find the No. 2 cell, discovery No specified color label state, look for both sides, find the 3rd point specified, return this color label state. This is over. 255

Have

to

One

side

Searching

Find

Save color standard status

R red component

G

Green component

B blue component

Point to the location of G component storage

Point to the location of B component storage

No. 4 did not look for both sides

No. 2 does not look for both sides

Figure 4, fuzzy identification process diagram

Sixth, conclusions

This algorithm actually makes a correction list for irregular colors on the image, using an optimized query algorithm to identify the color, and has certain learning capabilities to adapt to the color of the colors. The accuracy of the identification color is closely related to the good and bad interest in color library. If you have a practical person to control the scale of color training, you will be able to train very accurate color libraries. From some experimental results, the hit rate reached more than 90%, basically meeting the needs, of course, must do certain work and improve the hit rate.

The development tool is Visual C 6.0, with object-oriented methods to encapsulate color libraries and various operations to it into a class called color manager, so that the image recognition algorithm can be easily operated on the color library.

This method can also be extended, applied to more occasions.

references

1 He Bin et al, Visual C Image Processing, Beijing, People's Posts and Telecommunications Publishing House, 2001

转载请注明原文地址:https://www.9cbs.com/read-90136.html

New Post(0)