CN101819410A - Intelligent spectrophotometry artificial neural network training method for testing water quality - Google Patents

Intelligent spectrophotometry artificial neural network training method for testing water quality Download PDF

Info

Publication number
CN101819410A
CN101819410A CN201010162044A CN201010162044A CN101819410A CN 101819410 A CN101819410 A CN 101819410A CN 201010162044 A CN201010162044 A CN 201010162044A CN 201010162044 A CN201010162044 A CN 201010162044A CN 101819410 A CN101819410 A CN 101819410A
Authority
CN
China
Prior art keywords
plane
rgb
sigma
vector
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201010162044A
Other languages
Chinese (zh)
Inventor
李华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201010162044A priority Critical patent/CN101819410A/en
Publication of CN101819410A publication Critical patent/CN101819410A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to an artificial neural network training method for testing water quality. In the method, training data can be automatically generated and the artificial neural network can be automatically trained. The technical scheme is characterized by comprising the following steps of: reading the histogram data of three primary colors of red (R), green (G) and blue (B) of digital images; mapping the histogram data to two-dimensional planes, wherein the mapping result is plane PR(x, y), plane PG(x, y) and plane PB(x, y); extracting 7-dimensional characteristic vectors from the plane PR(x, y), the plane PG(x, y) and the plane PB(x, y) respectively, wherein seed characteristic vectors with the total number M correspond to the content concentration of a certain substance in the tested water sample; and training the artificial neural network according to the M seed characteristic vectors {VRGBi, wherein i is equal to 1, 2,..., and M}.

Description

The intelligent spectrophotometric artificial neural network training method that is used for water quality detection
Technical field
The invention belongs to water quality detection intelligence spectrophotometric artificial neural network training method field, especially a kind ofly can generate training data automatically, train artificial neural network's the artificial neural network's training method that is used for water quality detection automatically.
Background technology
Artificial neural network's training method is used for color recognition, though report for work in the research abroad, but its training result is not accurate enough, the data sampling mode lacks the ability of meticulous depiction color variables, training effect is not good, and convergence is slow, resultant error is big, can not perform well in the automatic colorimetric of spectrophotometric method.
Summary of the invention
The purpose of this invention is to provide and a kind ofly can generate training data automatically, train artificial neural network's the artificial neural network's training method that is used for water quality detection automatically.
Technical scheme of the present invention is: the intelligent spectrophotometric artificial neural network training method that is used for water quality detection, it is characterized in that comprising the following steps: to read the histogram data of digital picture R, G, B three primary colours, histogram data is mapped to two dimensional surface, promptly tie up variable as transverse axis with histogrammic first, unit is the quantization unit value of image primary colours, tie up variable as the longitudinal axis with histogrammic second, unit is through the highest numerical value of histogram after the normalization, mapping result is plane P R (x, y), plane PG (x, y) and plane PB (x, y)
To described each plane P R (x, y), (x, y) (x y) extracts 7 dimensional feature vectors, i.e. V respectively to plane PG with plane PB R=(V R 1, V R 2, V R 3... V R 7), V G=(V G 1, V G 2, V G 3... V G 7), V B=(V B 1, V B 2, V B 3... V B 7), V RProper vector corresponding flat PR (x, y), V GProper vector corresponding flat PG (x, y), V BProper vector corresponding flat PB (x, y), each 7 dimensional feature vector is defined as follows, N=7 in the formula:
V R 1 = Σ x = 0 N - 1 Σ y = 0 M - 1 PR ( x , y ) ; · · · ( 1 )
V R 2 = Σ x = 0 N - 1 Σ y = 0 M - 1 xPR ( x , y ) / V 1 ; · · · ( 2 )
V R 3 = Σ x = 0 N - 1 Σ y = 0 M - 1 yPR ( x , y ) / V 1 ; · · · ( 3 )
V R 4 = Σ x = 0 N - 1 Σ y = 0 M - 1 2 xyPR ( x , y ) / V 1 ; · · · ( 4 )
V R 5 = Σ x = 0 N - 1 Σ y = 0 M - 1 x 2 PR ( x , y ) / V 1 ; · · · ( 5 )
V R 6 = Σ x = 0 N - 1 Σ y = 0 M - 1 y 2 PR ( x , y ) / V 1 ; · · · ( 6 )
V R 7=V 4/(V 5-V 6);...(7)
(x is y) with plane PB (x, y) the proper vector V on for two primary color plane PG of other G and B G, V BWith defining with quadrat method;
M is training artificial neural network's seed characteristics vector total number in the above-mentioned formula, and the span of M is determined (M is a number of samples) by the number of samples in the chemical reagent colourimetry, and total number is that M seed characteristics vector representation is V RGB 1=(V R 1, V G 1, V B 1), V RGB 2=(V R 2, V G 2, V B 2) ... V RGB M=(V R M, V G M, V B M); Be designated as { V RGB i| i=1,2 ... M), the concentration of certain content of material in M corresponding one by one detected water sample of proper vector, and according to the increase ordering of concentration, i.e. the 1st seed characteristics vector V RGB 1Represent that certain content of material is minimum, the 2nd proper vector V RGB 2Represent that certain content of material is inferior low, and the like, M V RGB MRepresent that certain content of material is the highest, M proper vector be expressed as plane P R (x, y), plane PG (x, y) and plane (x, M point in the N-dimension space that maps out on y);
According to M seed characteristics vector { V RGB i| i=1,2 ... M} trains the artificial neural network, comprises the following steps:
(1) extract per two proper vectors successively from the seed characteristics vector of M, form neighbours' " vector to ", this vector is to being designated as (V RGB, i, V RGB, j), i=1 here, 2 ... M-1; J=i+1;
(2) choose primary color space R, in this primary color space, neighbours' " vector to " (V RGB, i, V RGB, j) become (V R, i, V R, j);
(3) with (V R, i, V R, j) successively to the projection of N-dimension space, on each projector space, obtain projection value, calculate the midrange on each projector space, serve as basis definition upper limit value and lower limit value with this midrange, higher limit V R, ij K, MAXBe defined as the numerical value after midrange increases by 10% increment, lower limit V R, ij K, MINBe defined as the numerical value after midrange reduces by 10% increment;
Thereby on the 1st dimension space, V is arranged R, ij 1, MID, V R, ij 1, MIN, V R, ij 1, MAXOn the 2nd dimension space, V is arranged R, ij 2, MID, V R, ij 2, MIN, V R, ij 2, MAXAnd the like, on the whole N-dimension space { V is arranged R, ij K, MID, V R, ij K, MIN, V R, ij K, MAX| k=1,2 ..., M}; So on the N-dimension space, form the data set G of gang at each neighbour " vector to " R Ij, G here R Ij={ V R, ij K, MID, V R, ij K, MIN, V R, ij K, MAX| k=1,2 ..., M};
(4) finish to all i j neighbours' " vector to " (V RGB, i, V RGB, j) midrange and the calculating of upper limit value and lower limit value, i=1,2 ... M-1; J=i+1; Thereby obtain (x, y) the training data group G of the artificial neural network on the plane on this basis at PR R SUM={ G R Ij| i=1,2 ... M-1; J=i+1};
(5) choose primary color space G and B, finish same steps as (3), (4), thus obtain PG (x, y), PB (x, y) the training data group G of the artificial neural network on the plane G SUM={ G G Ij| i=1,2 ... M-1; J=i+1} and G B SUM={ G B Ij| i=1,2 ... M-1; J=i+1}, so far data generate and finish, and finish the training to the artificial neural network thus.
Effect of the present invention is: the present invention is a kind of to the training data generation technique of artificial neural network in intelligent spectrophotometric is used.Present technique is according to the N dimensional feature vector that extracts from Digital Image Processing, generation is to artificial neural network's training matrix data set, can the implementation pattern recognition function through the artificial neural network of this training, finish automatic colorimetric detection, under spectrophotometric, recognize contaminants associated in the water sample water sample.This training data generation technique and artificial neural network are applicable to that portable broad spectrum spectroscopic luminosity liquid trace element detects the wireless sensing instrument, be convenient on embedded system, realize, has automatic generation training data, automatically train the artificial neural network, proofread and correct the characteristics of portable detector fast, be suitable for wide-spectrum water and detect application.
The present invention is described further below in conjunction with drawings and Examples.
Description of drawings
Fig. 1 is a procedure chart of the present invention;
Fig. 2 is a schematic diagram of the present invention.
Embodiment
Present technique is made up of three parts: one, from lower dimensional space, and through the Compound Mappings method, definition N dimensional feature vector.At first by histogram to the two-dimensional geometry space conversion, and the N dimension space that reaches proper vector is on this basis realized.Two, calculate the midrange of any two proper vectors behind the k-th space projection, and the border higher limit and the lower limit in k-th space be set hereinto on the basis of point value, with k-th space midrange is to form k dimensional feature data field between the higher limit of reference and the lower limit, gathers as the training data point on the k-th space.Three, the method for fetching data on the k-th space is extended in the N dimension space, form one group comprise RGB three primary colours plane, to artificial neural network's training matrix data set, thereby finish the work of automatic generation training data.
Arthmetic statement of the present invention is shown in figure one.A is the first step of algorithm among the figure one, promptly obtains the histogram of digital picture R, G, B three primary colours, and the histogram of three primary colours is shown in figure two.Algorithm B disposes for judging whether each histogram among the figure one, if dispose, has then finished the generation work of training data, enters C, the computing that end data generates; Otherwise enter D, histogram be mapped to the 2-dimensional plane, mapping result be PR (x, y), PG (x, y) and PB (x, y); Be three 2-dimensional planes.
The method that histogram data is mapped to two dimensional surface is: as transverse axis, unit is the quantization unit value (quantization level) of image primary colours with the histogrammic first dimension variable.As primary colours is 8 bits, and then the first dimension variable transverse axis has 256 values, i.e. 28 powers.As the longitudinal axis, unit is through the highest numerical value of histogram after the normalization with the histogrammic second dimension variable.As image analytic degree is NxN, and then the highest numerical value of histogram is N 2, it is made its normalization divided by N, then the highest numerical value of histogram after the normalization is N.The two dimensional surface of Xing Chenging contains the histogram after the normalization like this, becomes the result after the two dimensional surface mapping.
On the basis of this 2-dimension space, to each plane P R (x, y), PG (x, y) and PB (x y) extracts N dimensional feature vector (N=7) respectively, shown in E among the figure, V is arranged promptly R=(V R 1, V R 2, V R 3... V R 7) proper vector corresponding PR (x, y) plane, V G=(V G 1, V G 2, V G 3... V G 7) proper vector corresponding PG (x, y) plane, V B=(V B 1, V B 2, V B 3... V B 7) the corresponding PB of proper vector (x, y) plane.Each N-dimensional feature vector is defined as follows:
V R 1 = Σ x = 0 N - 1 Σ y = 0 M - 1 PR ( x , y ) ; · · · ( 1 )
V R 2 = Σ x = 0 N - 1 Σ y = 0 M - 1 xPR ( x , y ) / V 1 ; · · · ( 2 )
V R 3 = Σ x = 0 N - 1 Σ y = 0 M - 1 yPR ( x , y ) / V 1 ; · · · ( 3 )
V R 4 = Σ x = 0 N - 1 Σ y = 0 M - 1 2 xyPR ( x , y ) / V 1 ; · · · ( 4 )
V R 5 = Σ x = 0 N - 1 Σ y = 0 M - 1 x 2 PR ( x , y ) / V 1 ; · · · ( 5 )
V R 6 = Σ x = 0 N - 1 Σ y = 0 M - 1 y 2 PR ( x , y ) / V 1 ; · · · ( 6 )
V R 7=V 4/(V 5-V 6);...(7)
Two primary color plane PG of other G and B (x, y) and PB (x, y) the proper vector V on G, V BWith defining with quadrat method.
Training artificial neural network's seed characteristics vector total number is M, is expressed as V RGB 1=(V R 1, V G 1, V B 1), V RGB 2=(V R 2, V G 2, V B 2) ... V RGB M=(V R M, V G M, V B M); Be designated as { V RGB i| i=1,2 ... M}, the concentration of certain content of material in the corresponding one by one detected water sample of this M proper vector, and according to the increase of concentration ordering, also, the 1st seed characteristics vector V RGB 1Represent that certain content of material is minimum, the 2nd proper vector V RGB 2Represent that certain content of material is inferior low, and the like, so M V RGB MRepresent that certain content of material is the highest.Can M proper vector be expressed as each plane P R (x, y), PG (x, y) and PB (x, M point in the N-dimension space that maps out on y).
According to M seed characteristics vector { V RGB i| i=1,2 ... M}, we set up artificial neural network's data creation method, are used for the training to the artificial neural network.
Step 1 is extracted per two proper vectors successively from total number is the seed characteristics vector of M, form neighbours' " vector to ", and promptly among the figure one shown in the F, this vector is to being designated as (V RGB, i, V RGB, j), i=1 here, 2 ... M-1; J=i+1;
Step 2 is chosen primary color space R, in this primary color space, and neighbours' " vector to " (V RGB, i, V RGB, j) become (V R, i, V R, j);
Step 3, on this basis, with (V R, i, V R, j) successively to the projection of N-dimension space, on each projector space, obtain projection value, shown in G among the figure one; And the midrange of calculating on each projector space.Midrange is a basis definition upper limit value and lower limit value thus, shown in H among the figure one.Higher limit V R, ij K, MAXAfter being defined as the increment of midrange increase by 10%, near V R, j kNumerical value, lower limit V R, ij K, MINAfter being defined as the increment of midrange minimizing 10%, near V R, i kNumerical value.
Thereby on the 1st dimension space, have: V R, ij 1, MID, V R, ij 1, MIN, V R, ij 1, MAXOn the 2nd dimension space, have: V R, ij 2, MID, V R, ij 2, MIN, V R, ij 2, MAXAnd the like, on the whole N-dimension space { V is arranged R, ij K, MID, V R, ij K, MIN, V R, ij K, MAX| k=1,2 ..., M}; So on the N-dimension space, form the data set G of gang at each neighbour " vector to " R Ij, G here R Ij={ V R, ij K, MID, V R, ij K, MIN, V R, ij K, MAX| k=1,2 ..., M}.
Step 4 is finished all i, j neighbours' " vector to " (V RGB, i, V RGB, j) midrange and the calculating of upper limit value and lower limit value, i=1,2 ... M-1; J=i+1; Thereby obtain (x, y) the training data group G of the artificial neural network on the plane on this basis at PR R SUM={ G R Ij| i=1,2 ... M-1; J=i+1} is shown in I among the figure one.
Step 5 is chosen primary color space G and B, finishes same steps as three, four; Thereby obtain PG (x, y), PB (x, y) the training data group G of the artificial neural network on the plane G SUM={ G G Ij| i=1,2 ... M-1; J=i+1} and G B SUM={ G B Ij| i=1,2 ... M-1; J=i+1}, shown in J among the figure one, so far data generate and finish, and finish the training to the artificial neural network thus.

Claims (1)

1. the intelligent spectrophotometric artificial neural network training method that is used for water quality detection, it is characterized in that comprising the following steps: to read the histogram data of digital picture R, G, B three primary colours, histogram data is mapped to two dimensional surface, promptly tie up variable as transverse axis with histogrammic first, unit is the quantization unit value of image primary colours, tie up variable as the longitudinal axis with histogrammic second, unit is through the highest numerical value of histogram after the normalization, mapping result is plane P R (x, y), plane PG (x, y) and plane PB (x, y)
To described each plane P R (x, y), (x, y) (x y) extracts 7 dimensional feature vectors, i.e. V respectively to plane PG with plane PB R=(V R 1, V R 2, V R 3... V R 7), V G=(V G 1, V G 2, V G 3... V G 7), V B=(V B 1, V B 2, V B 3... V B 7), V RProper vector corresponding flat PR (x, y), V GProper vector corresponding flat PG (x, y), V BProper vector corresponding flat PB (x, y), each 7 dimensional feature vector is defined as follows, N=7 in the formula:
V R 1 = Σ x = 0 N - 1 Σ y = 0 M - 1 PR ( x , y ) ;
V R 2 = Σ x = 0 N - 1 Σ y = 0 M - 1 xPR ( x , y ) / V 1 ;
V R 3 = Σ x = 0 N - 1 Σ y = 0 M - 1 yPR ( x , y ) / V 1 ;
V R 4 = Σ x = 0 N - 1 Σ y = 0 M - 1 2 xyPR ( x , y ) / V 1 ;
V R 5 = Σ x = 0 N - 1 Σ y = 0 M - 1 x 2 PR ( x , y ) / V 1 ;
V R 6 = Σ x = 0 N - 1 Σ y = 0 M - 1 y 2 PR ( x , y ) / V 1 ;
V R 7=V 4/(V 5-V 6);
(x is y) with plane PB (x, y) the proper vector V on for two primary color plane PG of other G and B G, V BWith defining with quadrat method;
M is training artificial neural network's seed characteristics vector total number in the above-mentioned formula, and the span of M is determined that by the number of samples in the chemical reagent colourimetry promptly M is a number of samples; Total number is that M seed characteristics vector representation is V RGB 1=(V R 1, V G 1, V B 1), V RGB 2=(V R 2, V G 2, V B 2) ... V RGB M=(V R M, V G M, V B M); Be designated as { V RGB i| i=1,2 ... the concentration of certain content of material among the M}, M corresponding one by one detected water sample of proper vector, and according to the increase ordering of concentration, i.e. the 1st seed characteristics vector V RGB 1Represent that certain content of material is minimum, the 2nd proper vector V RGB 2Represent that certain content of material is inferior low, and the like, M V RGB MRepresent that certain content of material is the highest, M proper vector be expressed as plane P R (x, y), plane PG (x, y) and plane (x, M point in the N-dimension space that maps out on y);
According to M seed characteristics vector { V RGB i| i=1,2 ... M} trains the artificial neural network, comprises the following steps:
(1) extract per two proper vectors successively from the seed characteristics vector of M, form neighbours' " vector to ", this vector is to being designated as (V RGB, i, V RGB, j), i=1 here, 2 ... M-1; J=i+1;
(2) choose primary color space R, in this primary color space, neighbours' " vector to " (V RGB, i, V RGB, j) become (V R, i, V R, j);
(3) with (V R, i, V R, j) successively to the projection of N-dimension space, on each projector space, obtain projection value, calculate the midrange on each projector space, serve as basis definition upper limit value and lower limit value with this midrange, higher limit V R, ij K, MAXBe defined as the numerical value after midrange increases by 10% increment, lower limit V R, ij K, MINBe defined as the numerical value after midrange reduces by 10% increment;
Thereby on the 1st dimension space, V is arranged R, ij 1, MID, V R, ij 1, MIN, V R, ij 1, MAXOn the 2nd dimension space, V is arranged R, ij 2, MID, V R, ij 2, MIN, V R, ij 2, MAXAnd the like, on the whole N-dimension space { V is arranged R, ij K, MID, V R, ij K, MIN, V R, ij K, MAX| k=1,2 ..., M}; So on the N-dimension space, form the data set G of gang at each neighbour " vector to " R Ij, G here R Ij={ V R, ij K, MID, V R, ij K, MIN, V R, ij K, MAX| k=1,2 ..., M};
(4) finish to all i j neighbours' " vector to " (V RGB, i, V RGB, j) midrange and the calculating of upper limit value and lower limit value, i=1,2 ... M-1; J=i+1; Thereby obtain (x, y) the training data group G of the artificial neural network on the plane on this basis at PR R SUM={ G R Ij| i=1,2 ... M-1; J=i+1};
(5) choose primary color space G and B, finish same steps as (3), (4), thus obtain PG (x, y), PB (x, y) the training data group G of the artificial neural network on the plane G SUM={ G G Ij| i=1,2 ... M-1; J=i+1} and G B SUM={ G B Ij| i=1,2 ... M-1; J=i+1}, so far data generate and finish, and finish the training to the artificial neural network thus.
CN201010162044A 2010-04-28 2010-04-28 Intelligent spectrophotometry artificial neural network training method for testing water quality Pending CN101819410A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010162044A CN101819410A (en) 2010-04-28 2010-04-28 Intelligent spectrophotometry artificial neural network training method for testing water quality

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010162044A CN101819410A (en) 2010-04-28 2010-04-28 Intelligent spectrophotometry artificial neural network training method for testing water quality

Publications (1)

Publication Number Publication Date
CN101819410A true CN101819410A (en) 2010-09-01

Family

ID=42654539

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010162044A Pending CN101819410A (en) 2010-04-28 2010-04-28 Intelligent spectrophotometry artificial neural network training method for testing water quality

Country Status (1)

Country Link
CN (1) CN101819410A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426857A (en) * 2017-08-21 2019-03-05 浙江工业大学 Water quality index prediction method based on state pool network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426857A (en) * 2017-08-21 2019-03-05 浙江工业大学 Water quality index prediction method based on state pool network
CN109426857B (en) * 2017-08-21 2021-06-08 浙江工业大学 Water quality index prediction method based on state pool network

Similar Documents

Publication Publication Date Title
CN112507793B (en) Ultra-short term photovoltaic power prediction method
CN102506772B (en) Method and device for quickly detecting area of leaf blade based on mobile phone
CN106709958A (en) Gray scale gradient and color histogram-based image quality evaluation method
KR20080016847A (en) Methods of chromogen separation-based image analysis
CN111160171A (en) Radiation source signal identification method combining two-domain multi-features
KR102094780B1 (en) A method and system for measuring biochemical information using color space conversion
CN111079807B (en) Ground object classification method and device
CN105181912A (en) Method for detection of freshness during rice storage
CN108647568A (en) Grassland degeneration extraction method based on full convolutional neural networks
CN112557307B (en) Space-air-ground integrated lake and reservoir water quality monitoring fusion data method
CN113298086A (en) Red tide multispectral detection method based on U-Net network
CN111105389A (en) Detection method for pavement crack by fusing Gabor filter and convolutional neural network
CN102881007A (en) Image processing method and system for plane separation result of compound
CN103295238B (en) Video real-time location method based on ROI motion detection on Android platform
CN104463919A (en) Full-pixel color analysis method for evaluating skin pigments
Sreenivas et al. Processing of satellite image using digital image processing
CN101819410A (en) Intelligent spectrophotometry artificial neural network training method for testing water quality
CN1885345A (en) Analysis method of digital image color analysis system
CN117237736A (en) Daqu quality detection method based on machine vision and deep learning
CN116721385A (en) Machine learning-based RGB camera data cyanobacteria bloom monitoring method
CN112203072A (en) Aerial image water body extraction method and system based on deep learning
CN111881922B (en) Insulator image recognition method and system based on salient features
CN110658156B (en) Near infrared spectrum feature extraction method and device
CN114187380A (en) Color transfer method based on visual saliency and channel attention mechanism
Hu et al. GBSS: a global building semantic segmentation dataset for large-scale remote sensing building extraction

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20100901