• No results found

Inspection for Grapefruit’s Shape Based on Image Processing Technology

N/A
N/A
Protected

Academic year: 2020

Share "Inspection for Grapefruit’s Shape Based on Image Processing Technology"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

2017 2nd International Conference on Information Technology and Industrial Automation (ICITIA 2017) ISBN: 978-1-60595-469-1

Inspection for Grapefruit’s Shape Based on

Image Processing Technology

Dongtao Yang, Jiexian Huang, Yueming Hu

and Tiansheng Hong

ABSTRACT

Grapefruit’s shape is a most important characteristic which effects Grapefruit’s classification directly. In order to realize inspection for Grapefruit’s shape, the algorithm of Sobel is firstly implemented in extracting Grapefruit’s contour. And then calculate directional angle of all the pixel on contour. On the basis of that, the function of Grapefruit’s shape difference is established to quantize shape’s difference between Grapefruits. The ineligible Grapefruit’s shape is distinguished through setting shape’s difference threshold. The final experiment prove its effectiveness, Grapefruit’s shape inspecting accuracy rate reach 92.24%. The algorithm not only has advantage of practicality, generality and convenience but also is significant for academic research.

INTRODUCTION

Grapefruit is rich in organic acids, vitamins and calcium, phosphorus, magnesium, sodium and other essential elements of the human body. It is also sweet, delicious, nutritious and easy for storage, which is also called natural canned

_______________________

Dongtao Yang, a senior experimentalist in School of Electronic Information Engineering, Jiaying University, Meizhou, Guangdong, China. She is currently visiting scholar in School of Automation Science and engineering, South China University of Technology, Guangzhou, China.

Jiexian Huang, corresponding author, is currently a lecturer in School of Electronic Information Engineering, Jiaying University, Meizhou, Guangdong, China.

This research is funded by Guangdong provincial organization department, Guangdong province 2014 sail plan support, postdoctor support program and Meizhou industrial

(2)

is more than 29,000 acres in Meizhou, and production reached 600,000 tons that is worth 2 billion yuan. The shape is one of most important quality index for Grapefruit, which affects grapefruit's classification [1-3]. So inspecting grapefruit's shape is necessary and very important work. The technology of machine vision is always applied to fruit shape inspection, such as apple, grape, orange, tomato inspecting device [4-7]. The inspecting method has advantage of high efficiency, accuracy and harmless damage to surface. It is very fit for production lines. As the above inspecting method is used for grapefruit's inspection, the inspecting result is unpleasant. The reason is that shape's inspection is realized by matching circularity of target. However, the grapefruit is not circular object, is similar to gourd. That brings difficulty to inspection. The information of grapefruit can be achieved by means of measuring horizontal and vertical diameter. Only horizontal and vertical diameters are not adequate to describe grapefruit's shape. And grapefruit should be arranged by guiding device firstly before inspection. The technology of binocular vision is applied to achieving three dimensional information of grapefruit. Although three dimensional data is comprehensive and complete, which can describe grapefruit's surface and shape delicately [8-10], the inspecting method costs large computation and consumes mass calculating resource. That affects inspecting efficiency seriously. So the processing object in my research is still two dimensional image, which ensure real-time performance. In this paper a new inspecting algorithm is developed, the detailed inspecting content includes such several work, grapefruit contour is extracted firstly, and pixel's directional angle on contour is calculated in succession. On the basis of the above work, the shape similar function is established, which is used to quantify difference between standard grapefruit and inspecting one. The unqualified grapefruit can be detected by mean of setting threshold according to similar function. The final experiment prove effectiveness of the inspecting algorithm.

FEATURE EXTRACTION BASED ON TEXTURE GRADIENT

The grapefruit image is shown in figure 1(a). The contour is extracted by algorithm of sobel [11]. The expression of sobel is defined by expression (2).

( 1, 1) 2 ( , 1) ( 1, 1)

( 1, 1) 2 ( , 1) ( 1, 1) Y

G f x y f x y f x y

f x y f x y f x y

        

      

[ ( 1, 1) 2 ( 1, ) ( 1, 1)] [ ( 1, 1) 2 ( 1, ) ( 1, 1)] X

G f x y f x y f x y

f x y f x y f x y

        

       (1)

2 2

( , ) X Y

(3)

(a) grapefruit (b) contour (c) 3-D distribution of gradient Figure 1. Grapefruit’s contour feature extraction.

Apply expression (2) to grapefruit image. And the image gradient can be obtained. The distribution of gradient in three dimensional space is shown in figure 1(c).The gradient around contour is obviously greater than other region. So set gradient threshold, and all contour can be segmented which is shown in figure1 (b).

ACHIEVEMENT OF GRAPEFRUIT CONTOUR PIXEL DIRECTIONAL ANGLE

Although contour is located, the only position information is not enough for shape inspection. More information is requested. The directional angle of all contour pixel is calculated through expression (3).

1

tan Y

X

G G

  (0 90 ), (3)

(4)

(a) circle (b) directional angle (c) 3-D exibition on directional angle Figure 2. Directional angle on circular target’s contour.

[image:4.612.215.384.297.406.2]

The three dimensional distribution of grapefruit contour pixel directional angle can also be achieved through above way, which is shown in figure 3.

Figure 3. Directional angle of Grapefruit’s contour in three dimensional space.

ANALYSIS ON GRAPEFRUIT CONTOUR SIMILARITY

(5)
[image:5.612.101.266.81.247.2] [image:5.612.111.474.350.540.2]

Figure 4. Analysis on referent Grapefruit’s contour. Figure 5. Grapefruit’s contour analysis 1.

Select three grapefruit samples, one is eligible, the other two are ineligible, draw their directional angle curve, which is shown in figures 5-7.

Figure 6. Grapefruit’s contour analysis 2. Figure 7. Grapefruit’s contour analysis 3.

To quantify difference between referent shape and inspecting shape, the function is defined by expression (4). The bigger the value is, the greater the shape difference is.

2

1

( )

N

i i

i

R M

Dif

N

(6)
[image:6.612.196.401.239.343.2]

sample, in figure 5, shape difference value on left and right contour is 5.62, 6.00 respectively. One ineligible sample, in figure 6, the shape difference value on left and right contour is 9.85, 10.82. Another ineligible sample is 12.40, 10.60. The quantifying result is pleasant. In order to prove effectiveness of above the method, select 30 grapefruit sample, 10 of them are eligible, the others are ineligible. 30 groups of data, 60 data in all are achieved. The distribution is shown in figure 8, In figure 8, X-axis is sample ID, Y-axis is shape difference value, the flag ‘o’ indicate eligible sample, the flag ‘*’ indicate ineligible sample.

Figure 8. The distribution on Grapefruit’s contour.

EXPERIMENT OF GRAPEFRUIT SHAPE INSPECTION

(7)
[image:7.612.192.404.89.443.2]

Figure 8. The distribution on Grapefruit’s contour.

TABLE I. EXPERIMENTAL.

Total sample

Ineligible sample

Error detection

Missed detection

Accurate rate (%)

Error Rate

(%)

Missing Rate

(%)

232 50 18 0 92.4

As shown in the TABLE I, all ineligible grapefruit are detected, the accuracy rate can reach 92.24%. The inspecting result is pleasant.

CONCLUSION AND ANALYSIS

[image:7.612.104.493.500.552.2]
(8)

its effectiveness. Through further analysis, the proposed inspecting algorithm has also advantage of generality and ease of use. The inspecting method is not only applicable for grapefruit but also for other fruit. Besides, the inspecting method is very easy to operate, only achieving standard grapefruit contour pixel directional angle is enough to start inspecting work without tedious operation. As shown in TABLE I, all ineligible grapefruit are detected, the accuracy can reach 92.24%. The inspecting result is pleasant.

REFERENCES

1. Zhang Jun-xiong, Xun Yi, Li Wei, et a1. Double-channel on-line automatic fruit grading system based on computer vision[C]//27th International Congress on High-speed Photography and Photonics, Proc. of SPIE Vo1.6279, Xi’an, China, 2006:17-22.

2. Bai Fei, Meng Chaoying. Research progress and commercialization of the automatic classification technology [J]. Food Science, 2005, 26(Supp.): 145-148.

3. Zheng Guan-nan, Tan Yu-zhi, Zhang Jun-xiong, et a1. Automatic detecting and grading method of potatoes with computer vision [J]. Transactions of the Chinese Society.

4. Luo Guo-guang. Historic task for China's viticulture: transformation from quantity focused pattern to quality oriented one[J]. Journal of Fruit Science, 2010, 27(3): 431-435.

5. Lu Wei-qi, Guo Yong-hong. A nondestructive detection method to distinguish different kinds of grapes[J]. Journal of China University of Metrology, 2012, 23(1):20-24.

6. Hu Fa-huan, Dong Zeng-wen, Kuang Yi-shun. Online navel orange grading detection system based on machine vision [J]. Journal of China Agricultural University, 2016,21(3):112-118. 7. Li Li, Yin Guo-Fu, Liu Ke-qi. Design and Experiments of Vision Sensor for Harvest Robots in

Field[J]. Transactions of The Chinese Society of Agricultural Machinery, 2010,41(5):152-157. 8. Li C, Gao H Y, Yuan C. Research on apple grading method based on computer [J]. Computer

simulation. 2012, 29(9):293-296.

9. Yun Shuang, Zhang Qiu-ju. A Method of Recognizing the Grapefruit Axial Orientation by Binocular Vision[J]. Journal of Jiangnan University (Natural Science Edition). 2012,11(1):33-37. 10. Zhou Jun, Liu Rui, Zhang Gao-yang. Design of Fruit Harvesting Robot Based on Stereo Vision

[J]. Transactions of the Chinese Society of Agricultural Machinery, 2010, 41(6):158-162. 11. Vesna Z K, Pavel P. Automatic object classification and image retrieval by sobel edge detection

and latent sematic methods [J]. Social and Telecommunications Engineer, 2012, 79(3):204-205. 12. Feng Ye, Di Li, Jiexian Huang, et al. Flaw detection on FPC solder surface [J]. Circuit World,

2012, 38 (3):142-152.

Figure

Figure 3. Directional angle of Grapefruit’s contour in three dimensional space.
Figure 4. Analysis on referent Grapefruit’s contour.        Figure 5. Grapefruit’s contour analysis 1
Figure 8. The distribution on Grapefruit’s contour.
TABLE I. EXPERIMENTAL.   Error Missed Accurate

References

Related documents