Journal of Sensors
Volume 2016 (2016), Article ID 5479152, 8 pages
http://dx.doi.org/10.1155/2016/5479152

Research Article

Novel SGH Recognition Algorithm Based Robot Binocular Vision System for Sorting Process

Xiaoyang Yu,¹ Shuang Liu,¹ Ming Pang,² Jixun Zhang,¹ and Shuchun Yu¹

¹School of Measurement-Control Tech & Communications Engineering, Harbin University of Science and Technology, Harbin 150080, China
²College of Automation, Harbin Engineering University, Harbin 150001, China

Received 5 January 2015; Accepted 26 February 2015

Academic Editor: Yong Zhang

Copyright © 2016 Xiaoyang Yu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

To achieve automatic sorting on commodity trademarks, a binocular vision system has been constructed in this paper. By adjusting camera pose, this system can obtain greater shooting perspective. In order to improve sorting accuracy, a now SGH recognition method is proposed. SGH consists of spatial color histogram (S feature), gray level cooccurrence matrix (G feature), and Hu moments (H) feature, which represent color feature, texture feature, and shaper feature, respectively. Similarity judgment function is built by using SGH. The experimental results show that SGH algorithm has a higher visual accuracy compared to single feature based recognition method.

1. Introduction

In the automatic sorting system of commodity, robot executes recognition algorithm to judge the type of trademark according to the image information acquired by vision sensor. To improve the sorting efficiency, two aspects should be improved: the camera sensor can be adjusted flexibly and have large view, and recognition algorithm should have a high accuracy [1].

For the recognition process, machine vision recognition is often implemented with several steps including image acquisition, image preprocessing, image segmentation, feature extraction, and recognition classification [2]. The purpose of the study on new visual sensing systems is to have a larger shooting range as well as a higher image definition, which can lay a good foundation for the following image processing step. Among all the steps following image acquisition, feature extraction plays the most important role to influence the performance of the recognition algorithm.

In machine vision recognition, color feature is widely used in various algorithms. Zhou and Ruan proposed a recognition approach for the gesture images, which achieves the recognition through constructing and filling the color space of the image of the hand skin and then executing the support vector machine classification [3]. Besides, Binder and Kawanable separated the original image into subimages under multiple color channels, then built the collection of the SIFT features in each subimage with the help of the color histogram, and eventually finished the recognition through fusing these SIFT features [4]. Furthermore, S. Ghosh and A. Ghosh applied the machine vision recognition technique in the data comparison of the medical images. Color segmentation was implemented on the RGB color space of the images to be recognized and the features in the lesion area were restored with pseudocolor, which improved the efficiency and the accuracy of the pathological diagnosis [5]. Apart from the color feature, the texture feature is also frequently utilized in machine vision recognition. Lira et al. proposed a supervised learning technique which is used in texture feature recognition. The calculation of the texture features relied on the self-designed computing moments and the static statistical features of the image. The calculated texture information was input into the Bayes classifier for the recognition and the comparison [6]. Moreover, in Wang and Yau’s study on the facial gender recognition, a self-adapted texture detection method focusing on the moustache texture features was designed. Combined with color degradation and shadow segmentation, the method achieved more than 93% accuracy on gender recognition [7]. In the existing machine vision recognition methods, the shape feature of the image is widely used as well. Whytock et al. built the Poisson distance approximation function which was used to determine the shape edges in the image and then extract the shape features. The recognition was accomplished through comparing the extracted features with the shape feature library [8]. Also, Tan et al. built an eigenvalue matrix to describe the shape feature and applied it into the autorecognition of the flower blossom. The experimental result showed that the accuracy of the method is above 80% [9].

In this paper, we carry out the recognition on trademarks with the help of a binocular camera sensor. Trademark images have different features. Some have obvious color features, some have rich texture features, and some have significant shape features. Therefore, when designing the trademark recognition algorithm, we fuse the three types of features and use the images taken by the binocular camera sensor to achieve a higher recognition accuracy and efficiency.

2. Composition of the Hardware System

2.1. Binocular Camera Sensor

To obtain a larger shooting range, we design a binocular camera sensor of which the composition is shown in Figure 1.

Figure 1: The binocular camera sensor.

There are two cameras in this sensor. Two cameras are fixed by the bracket which can rotate and pitch with the movement of three-foot seat. The light source is arranged between two cameras. We can decide whether to use it according to the scene illumination conditions. Because of the existence of bracket spacing, two cameras can obtain a bigger view. Based on these two characteristics, binocular camera sensor can be applied in robot sorting process.

2.2. Recognition System Based on the Binocular Camera Sensor

We set up the machine vision recognition system on the basis of the binocular camera sensor, which is shown in Figure 2.

Figure 2: The machine vision recognition system.

First of all, the binocular camera sensor obtains the satisfactory shooting view by adjusting the poses of the two cameras. Then, the captured images are transmitted to the computer via the image capture card. Finally, the computer executes the recognition algorithm to process and analyze the images and at last gives the recognition result.

3. SGH Recognition Algorithm

Images captured by the camera often contain various feature information. Thus, it is usually hard to guarantee the robustness when using one certain feature to realize the recognition. For that reason, we combine the color feature, the texture feature, and the shape feature together to use by the recognition process.

3.1. S Feature

The color histogram is a significant feature to indicate the color information of the images and it is also the most common color feature used in image retrieval. Histograms like the color histogram, the overall histogram, the fuzzy histogram, and the accumulated histogram have been widely used in the existing recognition algorithms. However, these methods only focus on the statistical information of the color and ignore the relation between the color feature and the spatial position of the pixel. The spatial color histogram is a combination of the color and the space information which is adopted in our recognition algorithm.

Assume that the toke variable of the image is and the size of the image is ; then we can define a new intermediate descriptive variable which is indicated as

In (1), denotes the pixel of the image and has been normalized which indicates the color histogram information. Another two intermediate descriptive variables are defined as

In (3), indicates the Euclidean formula.

Based on , , and , we can define the mathematical form for the spatial color histogram, which is

3.2. G Feature

The gray-level cooccurrence matrix (GLCM) is the most common measurement to indicate the texture feature of the image. In the recognition process, the matrix represents the gray correlation of two images. Besides, the GLCM sometimes needs to be normalized into during the calculation. characterizes correlation between any two grayscale image textures.

When indicating the texture features, the GLCM usually needs 4 kinds of descriptions which are listed as follows.

(a) Energy. Here, energy represents the gray-level distribution of an image. If the image data distribute around the leading diagonal, then we consider the gray-level distribution of the image relatively symmetric. Under this circumstance, a larger energy value indicates a coarse texture feature. The equation to calculate the energy is as follows:

In formula (5), represents a total of gray-level image texture.

(b) Entropy. Entropy is a crucial parameter to measure the total information of an image and a large entropy value usually indicates a rich texture feature of an image. The equation to get the entropy is as follows:

(c) Contrast. Contrast is a vital measurement for the definition of the texture feature. If the texture feature is clear, the contrast value will be large. The equation for the contrast is as follows:

(d) Relativity. Relativity indicates the gray-level similarity between the row and the column elements of the GLCM. We can get the relativity based on the following equation:

Here, , , , and denote the mean value and the variance, respectively, and the equations for these parameters are

Altogether, the texture feature can be denoted as follows:

3.3. H Feature

The shape of the image can be seen as an advanced expression of the image visual effect. However, the shape may change if the basic information of the image (such as the size of the image) varies, which hinders its usage in machine vision recognition. For that reason, many feature description operators based on shape invariance have been extracted, such as the inertia moment, the interior angle, the Harris corner, and the Hu moment. In this paper, we use the Hu moment to indicate the shape feature of the image.

Commonly, the Hu moment is obtained based on the region and its calculation is very complex. In order to get the Hu moment with a shorter time, we propose a new calculation approach which is based on the contour. The specific steps of the approach are as follows.

Calculate the linear integral

of which denotes the coordinate of the pixel that curve C passes and ( and ). When , represents the arc length of the curve.

Get the th central moment with the equation shown in the following:

In (12), and .

Get the Hu set of invariant moments, which are shown as follows:

When we get to , we can have the Hu moment which is based on the contour. Here, we use a one-dimensional array to represent the result, which is .

3.4. The Recognition Judging Function

When applying the recognition system shown in Figure 2, we establish an image database that contains all the possible situations during the recognition process. Therefore, the recognition process has been transformed into the feature comparison between the captured image and the image database.

When carrying out the feature comparison, we compare the color feature, the texture feature, and the shape feature of the captured image with those in the image database and consequently get a similarity-judging formula, which is shown as follows:

In the formula, , , and indicate the color feature similarity, the texture feature similarity, and the shape feature similarity between the captured image and the image database, respectively. In addition, and represent the captured image and the image database. Also, we use , , and to denote the weight of the three features in the judging function.

4. Experimental Results and Analysis

In order to verify the proposed recognition algorithm and the corresponding recognition system, we carry out the experiment. For the hardware, the recognition system is based on the binocular camera sensor. The cameras used in our experiment are DH-SV2001FC/FM color industrial cameras manufactured by Daheng (group) Co., Ltd., of which the highest resolution can reach up to 1628 × 1236. Besides, the computer we use is a Dell Inspiron laptop with a dual-core 2.0 GHz CPU, an 8 G RAM, and a 1 TB hard drive. As for the software, we use C++ to write the algorithm and select 1,000 trademark images to establish the image database.

In our experiment, we attach some trademark images on a planar cardboard and position the board vertically to the principal optical axis of the two cameras. Images taken by the two cameras are shown in Figure 3.

(a) Images taken by the left camera

(b) Images taken by the right camera

Figure 3: Trademark images taken by the binocular camera sensor.

As shown in Figure 3, restricted by the shooting range, the two cameras can only capture part of the trademark board, respectively. Therefore, only the valid trademarks are selected and marked according to the segmentation algorithm. In our experiment, 16 valid trademarks are selected and compared with the image database.

From these 16 images, we extracted 3 vectors of S feature, 4 vectors of G feature, and 7 vectors of S feature. By performing normalization, features data are shown as in Table 1.

Table 1: Feature in 16 images.

Image
Feature information

0.0409
0.0387
0.0513
0.0226
0.0188
0.0192
0.0237

0.0354
0.0202
0.0216
0.0233
0.0302
0.0219
0.0246

0.0417
0.0392
0.0392
0.0184
0.0207
0.0178
0.0169

0.0213
0.0367
0.0109
0.0127
0.0275
0.0284
0.0199

0.0302
0.0317
0.0219
0.0422
0.0439
0.0393
0.0508

0.0104
0.0207
0.0322
0.0218
0.0190
0.0242
0.0233

0.0358
0.0409
0.0368
0.0385
0.0417
0.0423
0.0523

0.0189
0.0146
0.0233
0.0217
0.0202
0.0255
0.0216

0.0402
0.0315
0.0493
0.0222
0.0184
0.0175
0.0169

0.0301
0.0298
0.0254
0.0318
0.0323
0.279
0.0233

0.0388
0.0412
0.0545
0.0215
0.0102
0.0117
0.0163

0.0165
0.0173
0.0123
0.0144
0.0150
0.0142
0.0182

0.0526
0.0644
0.0397
0.0418
0.0527
0.0396
0.0444

0.0202
0.0186
0.0229
0.0213
0.0287
0.0255
0.0212

0.0297
0.0301
0.0254
0.0102
0.0143
0.0176
0.0188

0.0182
0.0176
0.0193
0.0204
0.0215
0.0192
0.0133

0.0182
0.0193
0.0145
0.0175
0.144
0.128
0.157

0.0201
0.0133
0.0127
0.0126
0.0132
0.0129
0.0125

0.0105
0.0124
0.0098
0.0053
0.0076
0.0021
0.0094

0.0100
0.0097
0.0065
0.0063
0.0026
0.0085
0.0017

0.0163
0.0129
0.0188
0.0231
0.0302
0.0256
0.0245

0.0205
0.0198
0.0214
0.0238
0.0186
0.0192
0.0203

0.0503
0.0489
0.0517
0.0323
0.0306
0.0279
0.0534

0.0192
0.0165
0.0177
0.0201
0.0162
0.0183
0.0174

0.0488
0.0476
0.0503
0.0431
0.0397
0.0296
0.0355

0.0282
0.0219
0.0284
0.0192
0.0235
0.0183
0.0192

0.0281
0.0277
0.0319
0.0454
0.0279
0.0321
0.0308

0.0182
0.0194
0.0201
0.0176
0.0183
0.0121
0.0175

0.0124
0.0153
0.0103
0.0188
0.0169
0.0170
0.0144

0.0358
0.0245
0.0327
0.0316
0.0355
0.0284
0.0285

0.0186
0.0190
0.0174
0.0126
0.0131
0.0154
0.0189

0.0193
0.0201
0.0185
0.0176
0.0227
0.0301
0.0743

Visual recognition platform is shown in Figure 4. In the platform, left-upper part is display area of visual sensor information, left-middle part is conclusion area, left-down part is function button area, and right part is information area of feature vectors.

Figure 4: Interface of vision recognition platform.

In order to verify the effectiveness of the proposed multifeature fusion recognition algorithm, we compare it with recognitions based only on color feature, texture feature, and shape feature, respectively. Recognition accuracy is shown as follows:

In formula (15), is recognition accuracy. is accurate identification image, is reference image in database, and is number.

Recognition accuracy results of four kinds of methods are shown in Table 2.

Table 2: The accuracies of the four recognition methods.

Color recognition
Texture recognition
Shape recognition
Fusion recognition

Recognizing 1 image
100%
100%
100%
100%

Recognizing 2 images
100%
100%
100%
100%

Recognizing 4 images
100%
100%
75%
100%

Recognizing 8 images
87.5%
87.5%
50%
100%

Recognizing 10 images
90%
80%
60%
100%

Recognizing 12 images
83.3%
75%
58.3%
91.7%

Recognizing 14 images
78.5%
71.4%
57.1%
92.8%

Recognizing 16 images
81.3%
75%
56.3%
87.5%

From Table 1, we can get that, with the increasing number of the images, the advantage of the proposed algorithm in recognition accuracy shows up. When the trademark images to be recognized pile up to 16, the accuracy of SGH recognition algorithm still reaches 87.5%. By contrast, the accuracies of the other three recognition methods are 81.3%, 75%, and 56.3%, respectively.

The reason for the low accuracy of the shape-feature based recognition is because shapes are simple and sometimes resemble others in the trademarks that we use for the experiment. Likewise, the reason for the relative high accuracy of the color-feature based recognition is that the trademarks contain very rich color information, which offers more references for the similarity judgment.

As for SGH recognition algorithm that we propose, the vital reason for its higher recognition accuracy is that it utilizes the three features simultaneously, which provides more effective information for the judgment.

We also find that recognition accuracy will decrease as the number of images increases by four kinds of algorithm. It is because similarity judgment will decrease with a large number of images.

Further, we compare the time consumption for the four recognition methods, which is shown in Figure 4.

From the curves in Figure 5, we can see that, due to the simultaneous usage of the three features, the time consumption of the proposed algorithm is more than the other three methods. However, with the number of the images going up, the time consumption of the proposed algorithm keeps declining. Thus, when dealing with a large number of images, the disadvantage of the proposed algorithm will diminish.

Figure 5: Time consumptions of the 4 recognition methods.

5. Conclusion

In this work, a new vision sensor with greater view is designed to apply on the sorting system. Based on this sensor, we establish a machine vision recognition system and design a novel SGH recognition algorithm.

In SGH algorithm, multiple features are utilized which includes color feature, texture feature, and the shape feature. These three types of features are indicated by spatial color histogram, gray-level cooccurrence matrix, and Hu moment, respectively. SGH is superior to traditional single feature based recognition algorithms which is limited by the partial representation power of single feature. Experimental results show that the accuracy of the proposed algorithm is obviously higher than those of the recognition methods merely based on the color feature, the texture feature, and the shape feature.

With respect to time consuming, SGH algorithm requires more time compared to single feature based algorithms, but this time weakness can be fully compensated by the superior recognition performance of SGH. Moreover, when the number of images increases, the time consumption of SGH presents an obvious decline tendency. This indicates that, in the large scale system, the efficiency of SGH approaches to the traditional methods. In the future, we will focus on how to further reduce the executing time and enhance the flexibility of our algorithm.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgment

This study was supported by Heilongjiang Province ordinary college training program for New Century Excellent Talents with Grant no. 1254-NCET-008.

References

K. Skonieczny, S. J. Moreland, V. M. Asnani, C. M. Creager, H. Inotsume, and D. S. Wettergreen, “Visualizing and analyzing machine-soil interactions using computer vision,” Journal of Field Robotics, vol. 31, no. 5, pp. 753–769, 2014.

H. T. Kim, K. Y. Cho, K. C. Jin, J. S. Yoon, and Y. J. Cho, “Mixing and simplex search for optimal illumination in machine vision,” International Journal of Optomechatronics, vol. 8, no. 3, pp. 206–217, 2014.

H. Zhou and Q. Q. Ruan, “Visual gesture recognition with color segmentation and support vector machines,” in Proceedings of the 7th International Conference on Signal Processing (ICSP ’04), vol. 2, pp. 1443–1446, IEEE, Beijing, China, September 2004.

A. Binder and M. Kawanable, “Enhancing recognition of visual concepts with primitive color histograms via non-sparse multiple kernel learning,” in Proceedings of the 10th Workshop of the Cross-Language Evaluation Forum (CLEF ’09), vol. 6242, pp. 269–276, Corfu, Greece, September–October 2009.

S. Ghosh and A. Ghosh, “Content based retrieval of malaria positive images from a clinical database via recognition in RGB colour space,” Advances in Intelligent Systems and Computing, vol. 249, pp. 1–8, 2014.

P. H. M. Lira, G. A. Giraldi, L. A. P. Neves, and R. A. Feijoo, “Dental r-ray image segmentation using texture recognition,” IEEE Latin America Transactions, vol. 12, no. 4, pp. 694–698, 2014.

J.-G. Wang and W.-Y. Yau, “Real-time moustache detection by combining image decolorization and texture detection with applications to facial gender recognition,” Machine Vision and Applications, vol. 25, no. 4, pp. 1089–1099, 2014.

T. Whytock, A. Belyaev, and N. M. Robertson, “Dynamic distance-based shape features for gait recognition,” Journal of Mathematical Imaging and Vision, vol. 50, no. 3, pp. 314–326, 2014.

W.-N. Tan, R. Sem, and Y.-F. Tan, “Blooming flower recognition by using eigenvalues of shape features,” in 6th International Conference on Digital Image Processing (ICDIP ’14), vol. 9159 of Proceedings of SPIE, Athens, Greece, April 2014.