CN106373135A - Color-based pest identifying and counting method - Google Patents

Color-based pest identifying and counting method Download PDF

Info

Publication number
CN106373135A
CN106373135A CN201510439779.1A CN201510439779A CN106373135A CN 106373135 A CN106373135 A CN 106373135A CN 201510439779 A CN201510439779 A CN 201510439779A CN 106373135 A CN106373135 A CN 106373135A
Authority
CN
China
Prior art keywords
image
insect
saturation
color
prime
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
CN201510439779.1A
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 CN201510439779.1A priority Critical patent/CN106373135A/en
Publication of CN106373135A publication Critical patent/CN106373135A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30242Counting objects in image

Abstract

The invention relates to the technical field of agriculture and image processing, and discloses a color-based pest identifying and counting method. On one hand, an acquired original pest image is converted to a HIS color space from a colorful RGB image, the image is then subjected to saturation enhancement calculation, and color feature parameters of the pest are extracted; on the other hand, the colorful RGB image of the pest is converted to a gray level image, adaptive binary processing is carried out, and a binary image is obtained; and finally, the color feature parameters are combined with a built pest model database and a genetic neural network, identifying and counting on common pests are completed. The color feature parameters of the pests are combined, the pest identifying accuracy is greatly improved, and through experimental verification, the identifying accuracy achieves 86.3%.

Description

A kind of insect identification method of counting based on color
Technical field
The invention belongs to agricultural and technical field of image processing, be a kind of based on insect based on color and feature, and combine evil Worm model database, the method being identified by genetic neural network and counting.
Background technology
China is a large agricultural country, and agricultural insect pest also occurs frequently, therefore the monitoring of insect, the statistical fluctuation of insect pest situation disaster Work is particularly significant.If monitoring and prediction accurately and timely so that it may start early eliminate insect, reduces pesticide dosage.At present, extensively Species and density to count insect for the method for application black light lamp trapping and artificial cognition, the method high labor intensive, efficiency is low, Subjective factorss are larger simultaneously, have impact on the accuracy observing and predicting and ageing.Therefore, real-time, the accurate identification of insect, be A kind of inevitable application trend of modern agriculture crop protection, is also that current Digital Agriculture needs research and the problem solving.
Pest species in agricultural are many, and quantity is big, and a lot of insects pass through naked eyes and are also not easy to differentiate, and common are in China's agricultural The pest and disease damage of following species: dark fund Testudiniss, longicorn beetle, greenish brown hawk moth, bollworm, beet topss moth, black cutworm, little Ji fourth first, Oriental tobacco budworm etc., the present invention utilizes computer vision, Image Processing and Pattern Recognition technology, realize to the species of common insect, The automatic identification of quantity and counting, are the new techniques of agriculture field.
During insect being identified using computer technology, feature extraction is one of important link, and conventional does Method is often identified using the gray level image of insect, and one of the colouring information different pest species that are identification important Feature, it is less to the direction of image itself and the dependency at visual angle simultaneously, thus has higher robustness, increases evil After the color parameter of worm, it is greatly improved the recognition accuracy of insect.The insect database model that the present invention sets up simultaneously, and In conjunction with database model and 3 layers of genetic neural network, the identification to insect and counting, Average Accuracy finally can be completed well Reach 86.3%.
Content of the invention
For the deficiencies in the prior art, the present invention proposes a kind of identification method of counting of the insect based on color.Original insect Picture format is rgb form, and it is affected larger by light, and with the change of illumination condition, tri- components of r, g, b all can have Large change, directly tends not to obtain required effect using these components, so in the selection to image color space, Choose hsi space, the view mode that it more can be close to people to the colored world, it passes through tone h (hue), saturation s (saturation), three attributes of brightness i (intensity) to be representing color, in hsi space, h, s, i three-component it Between dependency than between r, g, b three-component much smaller so that image procossing is less affected by illumination condition.Therefore Can be obtained more more preferable effect than rgb space based on hsi space.
Rgb image color image original for the insect of acquisition is converted into hsi color space by this method first, and to saturation s Carry out the enhancing Adjustable calculation based on expected value;Complete the Color characteristics parameters to insect to extract.
A kind of insect identification method of counting based on color of the present invention, is characterized in that comprising step in detail below:
(1) pass through trap setting, obtain the original image of insect;
(2) by original image from rgb color space conversion to hsi color space, and choose h and s parameter as insect scheme The feature of picture;
(3) image is carried out with saturation and strengthens calculating, and extract the Color characteristics parameters of insect;
(4) insect original image is grayscale format from rgb format conversion, and carries out self-adaption binaryzation process;
(5) insect image, again after Morphological scale-space, completes image segmentation;
(6) combine the Color characteristics parameters design genetic algorithm back propagation neural network model of the Pest Model data base setting up and insect;
(7) identification and the counting of insect are completed.
By furtheing investigate the bodily form, color and its morphological feature of insect, the present invention is directed to the coloured image of insect, extracts The tone average of coloured image, saturation average, tone maximum difference, 4 Color characteristics parameters of saturation maximum difference.
Strengthen in calculating image is carried out with saturation, saturation s is carried out with the image enhaucament adjustment based on expected value, is first Calculate each pixel saturation value and its probability occurring in the picture in image, obtain its mathematic expectaion e (x),And the saturation of image is adjusted with this, adjustment formula is defined as:
s′i=e (x)+(1-e (x)) si α
siIt is original saturation component, si' it is saturation component after adjustment, α is stretching factor, determines saturation component Degree of saturation, xiFor the value of saturation in image, piFor the corresponding probability occurring of this intensity value, r is that the pixel of image is total Number.
The present invention adopts dynamic self-adapting binary conversion treatment, carries out subregion binary conversion treatment to image, first calculates each pixel Average gray g in m × m neighborhood:
g = 1 m 2 σ j ′ = - m / 2 m / 2 σ k ′ = - m / 2 m / 2 [ f ( x + j ′ , y + k ′ ) ]
Then, the standard deviation sigma of pixel gray level and self-adaption binaryzation threshold value t in this neighborhood are obtained:
σ = 1 m 2 σ j ′ = - m / 2 m / 2 σ k ′ = - m / 2 m / 2 [ f ( x + j ′ , y + k ′ ) - g ] 2
And: t=g+ β × σ wherein β is constant (0 < β < 1)
Recycle t that image is split;
And t value has different threshold values in the position of different pixels, by the binary image in each for gained region xi(i=1,2 ... ..., m) carry out image collection computing:
X=(x1∪x2……∪xi……∪xm)
The binary image of insect can be obtained.
Because some species of insect has more decorative pattern, so after the completion of self-adaption binaryzation is processed, can deposit in image In aperture or point, need to carry out Morphological scale-space further again, the present invention adopts traditional morphologic expansion and corrosion to calculate Method carries out successively expanding to image, corrodes.
Traditional bp algorithm, often due to initial value selection is improper, is easily absorbed in local minimum and leads to failure to train, and heredity is calculated Method has the advantages that to search for globally optimal solution, and the therefore present invention is learnt with reference to genetic algorithm and trains.
3 layers of bp network of system design, recognizable greenish brown hawk moth etc. 8 class common insect pests, input layer, hidden layer and output layer section Points are respectively 9,15,8, and characteristic parameter as input, is output as the species of insect after treatment.
In the design of specific genetic algorithm back propagation neural network model, the steps include:
A () initializes operational factor, in genetic algorithm, individual variable is neuroid weights, takes m, and n, i are respectively For hidden layer, input layer and output layer nodes;
B () determines network weight and initialization population, if total population w=(w1, w2... ..., wn), inside there is w1, w2... ..., wn Common n individual population number is it is determined that object function is:
e = 1 2 p σ p = 1 p σ i = 1 i [ f i ( x ) - y ( i ) ] 2 , And take the fitness function to be f = 1 e ;
For training sample to sum, i is output layer nodes to wherein p, and y (i) is the expectation of i-th training sample Network output valve, fiX () is the network output valve of i-th training sample;
C () carries out population duplication, keep the concordance of population scale simultaneously, fitness value is ranked up from big to small, protects Optimum individual is stayed not intersected and mutation operation, to remaining individuality according to crossover operator pc and mutation operator pm Intersected and mutation operation, repeated until composition population of new generation;
D identification that () completes neutral net calculates.
Brief description
Fig. 1 is the flow chart that insect identification and counting algorithm are processed.
Specific embodiment
In the identification and counting algorithm process of insect, research needs as the case may be, the input layer of neutral net Number elects 9 as, and output layer nodes are 8, and corresponding to 9 kinds of |input parametes and 8 class pest species, node in hidden layer is taken as 15, Genetic control parameter, through practical application, is chosen as follows: p is training sample to sum, in actual applications, general span It is 100~200, population size n is taken as 200, crossover operator pc is set to 0.8, and mutation operator pm is set to 0.007.In population training In, target is search best initial weights, makes e minimum, when object function e≤0.0001, search terminates.
In the enhanced calculating of saturation, the general value of Scaling parameter α is 0.8~1.0.
In the gray count of the pixel m × m neighborhood of image, for reducing operand, typically take m=3 or 5, with this to this Pixel neighborhood of a point gray scale is counted.In binary-state threshold calculates, β is constant (0 < β < 1), according to the quality of image Value.When picture quality is preferable, β takes less value, takes higher value to poor image β.
Original picture format is rgb form, but has very strong dependency between r, g, b three-component, with illumination condition Change, tri- components of r, g, b are all more big changes, and directly tend not to obtain required effect using these components, So in the selection to image color space, choosing hsi space.
Under hsi model, the color information of image mainly to be reflected by h and s, and the conversion from rgb to hsi space is public Formula is as follows:
h = 2 π - θ b > g θ b ≤ g
Wherein θ = arccos [ [ ( r - g ) + ( r - b ) / 2 ] ( r - g ) 2 + ( r - b ) ( g - b ) ]
s = 1 - 3 min ( r , g , b ) r + g + b
i = 1 3 ( r + g + b )
Present invention incorporates the Color characteristics parameters of insect, greatly improve the recognition correct rate of insect, experiments verify that, Recognition correct rate reaches 86.3%.

Claims (4)

1. a kind of insect identification method of counting based on color, is characterized in that comprising step in detail below:
(1) pass through trap setting, obtain the original image of insect;
(2) by original image from rgb color space conversion to hsi color space, and choose h and s parameter as insect scheme The feature of picture;
(3) image is carried out with saturation and strengthens calculating, and extract the Color characteristics parameters of insect;
(4) insect original image is grayscale format from rgb format conversion, and carries out self-adaption binaryzation process;
(5) insect image, again after Morphological scale-space, completes image segmentation;
(6) combine the Color characteristics parameters design genetic algorithm back propagation neural network model of the Pest Model data base setting up and insect, it is concrete Step is:
(6.1) initialize operational factor, in genetic algorithm, individual variable is neuroid weights, takes m, n, i divide Wei not hidden layer, input layer and output layer nodes;
(6.2) network weight and initialization population are determined, if total population w=(w1, w2..., wn), inside there is w1, w2..., wn Common n individual population number is it is determined that object function is:
e = 1 2 p σ p = 1 p σ i = 1 i [ f i ( x ) - y ( i ) ] 2 , And take the fitness function to be f = 1 e ;
For training sample to sum, i is output layer nodes to wherein p, and y (i) is the expectation of i-th training sample Network output valve, fiX () is the network output valve of i-th training sample;
(6.3) carry out population duplication, keep the concordance of population scale simultaneously, fitness value is ranked up from big to small, Retain optimum individual not intersected and mutation operation, to remaining individuality according to crossover operator pc and mutation operator pm Intersected and mutation operation, repeated until composition population of new generation;
(6.4) identification completing neutral net calculates;
(7) identification and the counting of insect are completed.
2. a kind of insect identification method of counting based on color according to claim 1, is characterized in that: right in step (3) Image carries out saturation and strengthens in calculating, saturation s is carried out with the image enhaucament adjustment based on expected value, is first to calculate figure Each pixel saturation value and its probability occurring in the picture in picture, obtain its mathematic expectaion e (x),And the saturation of image is adjusted with this, adjustment formula is defined as:
s′i=e (x)+(1-e (x)) si α
siIt is original saturation component, si' it is saturation component after adjustment, α is stretching factor, determines saturation component Degree of saturation, xiFor the value of saturation in image, piFor the corresponding probability occurring of this intensity value, r is the picture of image Vegetarian refreshments sum.
3. a kind of insect identification method of counting based on color according to claim 1, is characterized in that: carry in step (3) Take in the Color characteristics parameters of insect, be extracted tone average, saturation average, tone maximum difference, saturation altogether Big 4 Color characteristics parameters of difference.
4. a kind of insect identification method of counting based on color according to claim 1, is characterized in that: in step (4) certainly Adapt to, in binary conversion treatment, using dynamic self-adapting binary conversion treatment, carry out subregion binary conversion treatment to image, first count Calculate average gray g in m × m neighborhood of each pixel:
g = 1 m 2 σ j ′ = - m / 2 m / 2 σ k ′ = - m / 2 m / 2 [ f ( x + j ′ , y + k ′ ) ]
Then, the standard deviation sigma of pixel gray level and self-adaption binaryzation threshold value t in this neighborhood are obtained:
σ = 1 m 2 σ j ′ = - m / 2 m / 2 σ k ′ = - m / 2 m / 2 [ f ( x + j ′ , y + k ′ ) - g ] 2
And: t=g+ β × σ wherein β is constant (0 < β < 1)
Recycle t that image is split;
And t value has different threshold values in the position of different pixels, by the binary image in each for gained region xi(i=1,2 ..., m) carry out image collection computing:
X=(x1∪x2……∪xi……∪xm)
The binary image of insect can be obtained.
CN201510439779.1A 2015-07-22 2015-07-22 Color-based pest identifying and counting method Pending CN106373135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510439779.1A CN106373135A (en) 2015-07-22 2015-07-22 Color-based pest identifying and counting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510439779.1A CN106373135A (en) 2015-07-22 2015-07-22 Color-based pest identifying and counting method

Publications (1)

Publication Number Publication Date
CN106373135A true CN106373135A (en) 2017-02-01

Family

ID=57880165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510439779.1A Pending CN106373135A (en) 2015-07-22 2015-07-22 Color-based pest identifying and counting method

Country Status (1)

Country Link
CN (1) CN106373135A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107102223A (en) * 2017-03-29 2017-08-29 江苏大学 NPC photovoltaic DC-to-AC converter method for diagnosing faults based on improved hidden Markov model GHMM
CN108510490A (en) * 2018-03-30 2018-09-07 深圳春沐源控股有限公司 Method and device for analyzing insect pest trend and computer storage medium
CN109240184A (en) * 2018-11-16 2019-01-18 金再欣 The ecological remote real time monitoring system of control of agricultural pest
CN110428374A (en) * 2019-07-22 2019-11-08 北京农业信息技术研究中心 A kind of small size pest automatic testing method and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107102223A (en) * 2017-03-29 2017-08-29 江苏大学 NPC photovoltaic DC-to-AC converter method for diagnosing faults based on improved hidden Markov model GHMM
CN108510490A (en) * 2018-03-30 2018-09-07 深圳春沐源控股有限公司 Method and device for analyzing insect pest trend and computer storage medium
CN108510490B (en) * 2018-03-30 2021-02-19 深圳春沐源控股有限公司 Method and device for analyzing insect pest trend and computer storage medium
CN109240184A (en) * 2018-11-16 2019-01-18 金再欣 The ecological remote real time monitoring system of control of agricultural pest
CN110428374A (en) * 2019-07-22 2019-11-08 北京农业信息技术研究中心 A kind of small size pest automatic testing method and system

Similar Documents

Publication Publication Date Title
CN102930249A (en) Method for identifying and counting farmland pests based on colors and models
CN106373136A (en) Color and feature-based pest identifying and counting method
CN106446942A (en) Crop disease identification method based on incremental learning
CN103034872A (en) Farmland pest recognition method based on colors and fuzzy clustering algorithm
CN102013021B (en) Tea tender shoot segmentation and identification method based on color and region growth
CN107463920A (en) A kind of face identification method for eliminating partial occlusion thing and influenceing
CN105335716A (en) Improved UDN joint-feature extraction-based pedestrian detection method
CN107239514A (en) A kind of plants identification method and system based on convolutional neural networks
CN107480649A (en) A kind of fingerprint pore extracting method based on full convolutional neural networks
CN111105393B (en) Grape disease and pest identification method and device based on deep learning
CN103295191A (en) Multi-scale vision self-adaptation image enhancing method and evaluating method
CN106373135A (en) Color-based pest identifying and counting method
CN103593652B (en) A kind of cucumber disease recognition methods processed based on cucumber leaves symptomatic picture
CN107563389A (en) A kind of corps diseases recognition methods based on deep learning
CN103400368B (en) Based on graph theory and the parallel rapid SAR image segmentation method of super-pixel
CN107038416A (en) A kind of pedestrian detection method based on bianry image modified HOG features
CN110222696A (en) A method of plant leaf blade disease identification is carried out using GPCNNs and ELM
CN108898123A (en) A kind of face identification method based on signature analysis
CN104050680B (en) Based on iteration self-organizing and the image partition method of multi-agent genetic clustering algorithm
CN108734277A (en) A kind of targeted drug spray method based on convolutional neural networks
CN109829905A (en) It is a kind of face beautification perceived quality without reference evaluation method
CN101533475A (en) Method for extracting feature of shape-adaptive neighborhood based remote sensing image
CN109934256A (en) One kind is based on GA-ANN Feature Dimension Reduction and the preferred weeds in paddy field recognition methods of SOM feature
CN114170511A (en) Pavement crack disease identification method based on Cascade RCNN
Hitimana et al. Automatic estimation of live coffee leaf infection based on image processing techniques

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
DD01 Delivery of document by public notice
DD01 Delivery of document by public notice

Addressee: Cui Hujin

Document name: Notification that Application Deemed to be Withdrawn

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170201