Anda di halaman 1dari 5

Proceedings of the 2007 IEEE

International Conference on Mechatronics and Automation


August 5 - 8, 2007, Harbin, China

Detection of Meat Fresh Degree Based on Neural Network


Guo Peiyuan and Bao Man

Qu Shiha and Chen Tianhua

School of Information Engineering


Beijing Technology and Business University
Beijing 100037
ggppyy126.com

School of Information Engineering


Beijing Technology and Business University
Beijing 100037
chenthua@126.com

Abstract: In order to find a quick valid scientific way to


identify meat freshness, the article analyses the measuring
mechanism of identifying to fresh degree of meat, and
designs one set of intellectual detection and identification
system that is based on electronic information technology,
photoelectric detection technique, image processing
technology and neural network model recognition
technology. Through the test and analysis of the pork
sample, it improves that this system is real-time in
discerning the fresh degree of meat accurately. In addition,
this method can apply to other relevant fields. The
research result has very important reality and long-term
meaning.

complex decomposed matter. The detection to meat fresh


degree should be carried out with the participation of all kinds
of indexes including sensory indexes, quantities and character
of decomposed matter, changes of color and luster etc. The
single index cannot identify the fresh degree of meat correctly.
The following pictures are caught during the course of meat
corruption. They show the changes of putridity.

Index Terms: Freshness of pork; pattern-recognition; neural


network

Fig.1 The changes of meat putridity

The following content is about primary indexes related to


the detection to meat fresh degree.

I. INTRODUCTION
Because of the changes of idea to life, peoples
consciousness about health is becoming stronger, the desire of
green healthy food is increasing, the demand to the sanitation
of food is becoming higher and higher. Nowadays the
detection methods of meat fresh degree include following
methods: the sensory detection, all kinds of physicochemical
detection, sanitation (microorganism) detection etc. The
sensory detection requires the detection personnel with high
level, who have been trained many times and have much
practice experience. The physicochemical detection needs a
series of equipments. The course is complex and the time is
long. So it is exigent to find a quick effective scientific
detection method to detect the fresh degree of meat.

A. TVB-N
TVB-N is the quantity of nitric matter that is distilled
from fleshy liquid with vapor at the alkalization condition. It
includes all nitrogen matter that can form ammonia at such
condition. The protein of meat is decomposed alkalization
matter including ammonia, nitrogen etc. that all have the
character of volatility.
When thinking of all kinds of detection methods, most
thinkers think that TVB-N can reflect obviously the changes
of meat fresh degree during the course of meat
corruption.There is very remarkable difference among fresh
meat, hypo-fresh meat and degenerative meat. The changes
are accordant to the changes of sense. So TVB-N is
impersonal index of assessing the changes of meat fresh
degree. The index is brought into national standards. Now
TVB-N is the most important physicochemical index when
we detect the fresh degree of meat. According to national
standard GB2722-81, the corresponding relation between
TVB-N and the fresh degree of meat is shown in the
following Table I.

The article analyses and studies primary indexes to the


detection of meat fresh degree, Making use of gas detection
technology, image processing technology and Neural network
mode recognition technology etc., the article studies the
different gas from meat putridity at different times, the value
of H, S and I and the value of TVB-N. The identifying of
meat fresh degree can be finished quickly in this way.
II. PRIMARY INDEXES OF ASSESSING MEAT FRESH
DEGREE
Because of including much water and high protein, meat
is easy to corrupt. The course of corruption is such a course
that nutriment including protein, fat etc. decomposes and
becomes poisonous matter with the participation of corrupt
matter including microorganism, enzyme etc. The course is
complex. Many factors affect the course. There is much

1-4244-0828-8/07/$20.00 2007 IEEE.

TABLE.I
GRADES OF MEAT FRESH DEGREE AND TVB-N CONTENT

Grade of meat fresh degree

2726

Content of TVB-N

Fresh meat

<15mg/100g

Hypo-fresh meat

15-30mg/100g

Degenerative meat

>30mg/100g

fresh degree of meat can be known.

The content of TVB-N (room temperature) is accordant to


the sense index of meat fresh degree according to the metrical
results of some departments [1].

System of gas 0 To measure NH3 and H2S


collection

B. H2S and NH3


When meat is polluted by all kinds of microorganism,
putridity occurs. When meat is decomposed by the enzyme in
meat, acid and volatility odor matters occurs. Under such
condition sulphur and other volatile matter such as NH3 will
occur [2][3]. Thus according to the quantity of gas at different
time, we can collect the gas by using the gas sensors to
identify and analyze the fresh degree of meat.

Neural

Series of

network

degree

fresh

System of image

To measure H, S, I

collection

Fig.2 The identification flow chart of the fresh degree grades

A. The Design of Gas Collection System


Fig.3 shows the gas collection system.
Gas room of constant tempture

C. The Value of Gray Degree


The color and luster is determined by the quantity of
muscle-red protein and off springs decomposed. It is the first
impression to customers. It is best that meat is Cerise and has
luster. The color of meat can well manifest its characters.
During the store of meat, its color and luster will change
easily with the corruption of meat. Fresh meat is with rosy.
Hypo-fresh meat is gray. Degenerative meat is henna, has no
luster and there is asymmetric green speckles in partial area.
The changes of color and luster of meat can be reflected
through the changes of the gray degree. The meat fresh degree
can be identified through the changes of the gray degree [4].

Sensor H2S
1 2 3

Gas
collection
card

Sensor NH3
1 2 3

Gas sensor arrays

Database
of
swatch

PC

Fig.3 The system of gathering gas

CCD

Thinking of all above descriptions, we can see that every


index can detect the fresh degree of meat from some lay. But
the course of meat corruption is a complex course that is
affected by some circumstance factors. So we cannot identify
the fresh degree of meat according to some index. We should
identify the fresh degree of meat according to different
indexes. In the article, the Intellectual detection technology to
meat fresh degree based on much data merging and neural
network identifies the meat fresh degree by thinking of all
possible factors.

lig h t
ro o m

Im ag e
c o lle c tio n
c a rd
m eat

la m p h o u se

PC

Fig.4 The system of gathering pictures

Gas gathering card is HK-PCI812 made in Beijing


Huakong Technical Company. The sensor of H2S is MQ136.
The sensor of NH3 is MQ137. Six gas sensors form a sensor
array. Every time the six values gathered is not independent.
As a whole, they reflect the mode of gas. Before imported into
NN, the data is dealt with and normalized between 0 and 1.

III. THE SYSTEM BASED ON MUCH DATA MERGING AND


NEURAL NETWORK
The system measures NH3 and H2S released from the
meat corruption through sensor arrays, measures the changes
of value H, S and I during the course of meat corruption
through the picture collection system based on CCD,
measures accurately the content of TVB-N through
physicochemical tests. The value of H, S, I, NH3 and H2S are
treated as swatch input signals. The value of TVB-N is treated
as target output signals. The identification of meat fresh
degree is through BP NN. The flow chart of system is
shown in Fig.2.

B. Image Collection System


The image collection system shown in Fig.4 mostly
includes CCD, image collection card and PC, The value of
gray degree can be collected through this system during the
course of meat corruption. The value of color and gloss
collected through CCD is based on RGB color mode. Before
using it, we must transform it into the value of H, S and I
based on HSI model. Any three values of RGB tricolor
between 0 and 1 can be transformed into the values of HSI
tricolor in HSI color mode through the following formulas [5].

The total idea is that under some fixed temperature (For


instance room temperature), we buy a piece of meat, then
divide it into three parts, do the experiment of gas detection,
HSI detection, and TVB-N detection. The data is collected
once half an hour. The same experiment is done repeatedly
until the data is enough. The data is imported into BP NN, the

2727

1
3

1

R
R

 G  B
3
 G  B

>min R , G , B @

(1)
 (2)

> R  G  R  B @

2
arccos
1

2
2
R  G  R  G R  B

>

way different
(3)

> R  G  R  B @

360  arccos
1

2
2
R
G
R
G
R
B










>

3) To Combine

(4)

sk .

4) To strengthen the picture through

s k combined.

The results of strengthening images are shown in Fig.5.


(a) represents the original image. (b) represents the result
through linearity strengthening. (c) represents the result of the
equilibrium transform of histogram.

If the contrast degree is deficient when the picture is


caught, the degree of picture gray should carry out linearity
extending. Suppose the range of gray degree of original
picture f x, y is a, b , the dynamic range of the desired

>

T r k ,0 d k d L  1 .

sk

> @
g x, y

degree, the contrast degree enlarges by reducing the series of


gray degree. The practical steps to achieve is:
1) To obtain histogram.
2) To obtain transform equation

 When GB, formula (3) can work out the value of H
between [001800]. When G<B, the value of H is more than
1800. The value of H is:
o

s k is combined to a same series of gray

transformed picture
is c, d . The transform can
be achieved through the following formula.

d  c > f x, y  a @  c

g x, y

ba

 

(5)

During the equilibrium transform of histogram, suppose


the variable represents the series of gray degree of picture
before strengthened, namely 0-255. After being normalized
between 0 and 1, there is 0 d r d 1 , r 0 represents black,
r 1 represents white. Suppose the series of gray degree of
picture after strengthened is s. The relation between s and r is
s T r . And T satisfies: (1) 0 d r d 1 , T r is
monotonous increase; (2) 0 d r d 1 , 0 d T r d 1 .As to
digital pictures, the series of gray degree r is a dispersing
parameter, namely ^rk , k 0 ,1 ....., L  1`, parameter L is
the number of gray degree grades. Suppose in the image

nk

is the images number of the series of gray degree rk , n is the


total of images in image. Thus the transform is:

sk

T r k

ni

 

,2

L 1

(c)

C. The Design of NN

1) The Structure of NN
The first task to design NN is to confirm the structure of
NN. Generally the design of NN is to confirm the parameters
of input and output, the number of hidden lays, the number of
neuron in hidden lays and the transform functions of every lay.
After a detailed analysis, in the article, the input of NN is the
values of NH3, H2S, H, S and I, the target output data is the
values TVB-N (the teacher signal). In the article there are
three lays in BP NN including a hidden lay. The number of
neuron in hidden lay is 10 (It is adjustable according to the
actual instance.). The function of the hidden lay is TANSIG.
The function of the output lay is PURELIN. (Such BP NN can
approach any continuous functions.)

input lay

After above transform, the histogram of digital picture


becomes equably distributing form, namely the equilibrium
transform of histogram. During the practical realization,
because of the dispersing character of the series of gray
degree, the series of gray degree after strengthened will not
increase. The series of gray degree is merely

L 1

(b)
Fig.5 The pictures strengthened

The structure of NN model on the intellectual detection


system to meat fresh degree is shown in Fig.6.

 (6)

i 0

0, 1

(a)

hidden lay output lay

NH3

TVB-N of
NN output

,......,1 , which the total number is L. But

0,1....., L  1`
corresponds to the L dispersing values. So every s k must
have a value approaching i
, 0 d i d L  1 . In this
L 1
it is not completely sure that

^rk , k

Fig.6 The configuration of BPNN

2) The Training and Establishment of NN Model [6]


There is Neural Network Toolbox in the toolbox of
MATLAB, whose initialization functions, training functions

2728

and simulation functions are steady, reliable and high


precision. Thus, the programming goal of BP arithmetic is to
transfer related functions in Neural Network Toolbox. The
following is the programming of major arithmetic:
a. To choose the input and output data of the training swatch.
The 60 groups of data (NH3, H2S, H, S and I) from
experiment act as the input data p to train the BP NN. The 60
groups of data (TVB-N) act as the output data t to train the BP
NN. In addition the 6 groups of data (NH3, H2S, H, S, I and
TVB-N) are used to test the precision of the NN model.
b. To deal with the swatch data through the function prestd.
[pn,meanp,stdp,tn,meant,stdt]=prestd(p,t);
c. To create a new BP NN.
net=newff(minmax(pn),[10,1],{'tansig','purelin'},'trainlm');
d. To set the threshold and the power of input lay and the
hidden lay, to set the training parameter.
net.trainparam.epochs=500;
net.trainparam.goal=1e-3;

e. To transfer the training functions to train BP NN.


net=train(net,pn,tn);
f. To simulate BP NN.
an=sim(net,pn);
g. To revert the result data of simulation.
a = post (an,meant,stdt);

Fig.7 The error of the NN training and output error of target

4) Results
The test on the BP NN through experiment data proves
that the BP NN designed in the article has high accurate rate,
more than 90%, in detecting the fresh degree of meat. The NN
has excellent capacity of dealing with error and good robust
properties.

The training result of BP NN is shown in Fig.7. From the


figure we can see that the BP NN has excellent capacity of
study. When the training epochs is 46, the value of error reach
1e-3 set beforehand. It shows the error between the output of
NN and the output of target (namely e=t-a). In the figure *
represents the value of error. From the figure we can see that
the BP NN has excellent capacity of function approach. The
TVB-N error of NN output is [-0.1 0.1].

IV. CONCLUSIONS
The article analyses the gas NH3 and H2S from the
corruption of meat, the changes of gray degree (H, S and I)
and TVB-N, and based on NN and image processing, applies
new sensor technology, electron information technology,
photo-electricity detection technology, image processing
technology and neural network mode recognition technology
to the detection of meat. The article seeks after the detection
of meat fresh degree from many sides and many lays. The
intellectual detection method introduced in the article has high
accurate rate through the test on much data.

3) The Test of NN Model


To test the performance of the BP NN and its veracity,
simulate the experiment data through the BP NN trained well.
The output of NN, the experiment data and the error are listed
in Table II.
TABLE II
THE PRACTICAL VALUE AND THE OUTPUT VALUE OF TVB-N
Groups
1

TVB-N
Output of NN

4.87

6.12

12.86

17.83

24.76

40.80

4.75

6.15

12.87

17.92

24.69

40.82

-0.08

0.03

0.01

0.09

-0.06

0.02

The method gives an effective and practice method on


detection of meat fresh degree. It can be used in other related
detection area.

Experimental
value
Error

ACKNOWLEDGMENT
This research is supported by the Outstanding Youth
Science Foundation of Beijing (No.2005424). Guo Peiyuan is

2729

technology, 2002. pp.1-2.


[3] Changxia Ma, The system of gas identification based on gas sensor arrays
and forward feedback neural network. measure and control technology,
2001,20(3):pp.18-19.
[4] Yonghai Sun, Xiwei Zhao etc, The praise method of refrigerant beef
based on computer vision. Proceeding of agriculture and machine, 2004.
35(1): pp.1-2.
[5] Kim Won-Soon. Park Rae-Hong, Color image palette construction based
on the HSI color system for minimizing the reconstruction error,
Proceeding of International Conference on Image Processing[M], March
1996, pp.1041-1044.

PhD and professor of School of Information Engineering,


Beijing Technology and Business University. His special
fields of interest include linear embedded system analysis and
nonlinear control as well as optimizing control.
REFERENCES
[1] Yongdong Han, Sanxing Xie, The question on detection of the meat fresh
degree. Animal quarantine in china, 1977, pp.34-35.
[2] Jonghua Teng, Chaohui, Yuan etc, The study on the detection method of
beef fresh degree based on gas sensor arrays [J]. measure and control

2730

Anda mungkin juga menyukai