A kind of wheat leaf blade stomatal frequency measuring method based on micro-image
Technical field
The invention belongs to technical field of computer vision, be specifically related to a kind of wheat leaf blade stomatal frequency measuring method based on micro-image.
Background technology
In recent years, the pore character of crop has become the important research content of the basic research such as crop yield physiology and stress physiology.The density of pore can affect photosynthesis and the transpiration of plant, is one of important parameter characterizing wheat leaf blade stomatal properties.Major part research at present is all the measurement being carried out stomatal frequency by artificial counting, the method not only lavishes labor on, and when data volume is very big, is manually easy to because mistake occurs in fatigue, also can be subject to the impact of outside environmental elements, it is impossible in time the data gathered are processed.Along with the development of computer technology, image processing techniques, due to its environmental protection, not by advantages such as external environment are limited, is widely used in multiple links of agriculture field, including the visual system of the detection of agricultural product, crop growth conditions monitoring and agricultural robot.
Summary of the invention
It is an object of the invention to provide a kind of method of wheat leaf blade stomatal frequency in automatic calculating visual field.Processed by the wheat leaf blade image that digital microscope is collected, obtain the quantity of wheat leaf blade pore in visual field, thus calculating the density obtaining wheat leaf blade pore.In order to realize above-mentioned target, the present invention mainly adopts the following technical scheme that:
A kind of wheat leaf blade stomatal frequency measuring method based on micro-image, carries out as steps described below:
(1) image acquisition and gray processing process
Using digital microscope to gather the image of wheat leaf blade pore, computer reads the image gathered and processes.Consider that in the coloured image of wheat leaf blade, G component is higher, in order to isolate air cap preferably, the image gathered is carried out gray processing by the gray processing method adopting mixing, then by regular for gray value be double (double-precision floating point type) type in 0 to 1 scope, obtain the gray level image of wheat leaf blade.
(2) image segmentation
Adopt maximum variance between clusters that the image of gray processing is carried out binary conversion treatment, obtain image segmentation result.Maximum variance between clusters divides the image into background and target two parts by the gamma characteristic of image, inter-class variance between background and target is more big, illustrating that the two-part difference of pie graph picture is more big, therefore, the segmentation making inter-class variance maximum means that misclassification probability is minimum.
(3) image denoising
Choose linear structure element according to wheat leaf blade pore orientation self adaptation and carry out morphology opening operation, eliminate the impact of background noise.The arrangement of wheat leaf blade pore aligns mutually, and the process of adaptive detection pore orientation is as follows:
A. arranging horizontal direction is 0 degree of angular direction, and respectively to 0 °, 45 ° clockwise, 90 ° clockwise, 135 ° of four directions clockwise carry out row gray average statistics, obtain the gray average variance in each direction, the maximum direction of variance be image differentiate direction in advance;
B. carry out the opening operation of the linear structure element vertical with differentiating direction in advance according to the other direction of anticipation, eliminate tiny effect of noise;
C. direction is the image of 0 ° and 45 ° clockwise, seeks the abscissa average of the element that its each column is not zero, and carries out fitting a straight line, obtains the direction of accurate wheat leaf blade pore.Direction is the image of 90 ° and 135 ° clockwise, seeks the abscissa average of the element that its each row is not zero, and carries out fitting a straight line, obtains the direction of accurate wheat leaf blade pore;
D. carry out overall situation straight-line detection according to the direction of accurate wheat leaf blade pore, obtain meeting the parameter of all straight lines of wheat leaf blade pore orientation.
(4) connected region detection
Image segmentation result is carried out connected region detection, all connected regions detected are detected, be think hole area in fact when it meets stomatal parameters, obtain the positional information of Semen Tritici aestivi Stoma of Leaves in image.The parameter of pore includes the distance etc. of area, length-width ratio and the straight line from its nearest neighbours.
(5) statistics connected region quantity, obtains stomatal frequency
Finally statistics visual field inner air vent quantity, the actual size according to the Size calculation visual field that microscope is demarcated, obtain the stomatal frequency of reality.
The outstanding feature of the present invention is the process and the analysis that adopt the method for image procossing to replace manually carrying out micro-image.Image processing process is considered the impact of noise and background, the impact of most noise and background can be removed according to the method for the orientation of detection wheat leaf blade pore.The method that the present invention proposes has good robustness, and the accuracy that the micro-image gathered carries out density measure is higher.
Accompanying drawing explanation
Fig. 1 is the flow chart of the present invention.
Fig. 2 is the schematic diagram differentiating direction in advance.
Fig. 3 is the angle detecting process of wheat leaf blade pore arrangement.
Fig. 4 is the interpretation of result of the wheat leaf blade stomatal frequency that the present invention obtains.
Detailed description of the invention
The implementation process of the present invention is described in detail below in conjunction with embodiment and accompanying drawing.As shown in Figure 1, a kind of wheat leaf blade stomatal frequency measuring method based on micro-image, carry out as steps described below:
(1) read the image of digital microscope collection and carry out gray processing process
Consider that in the coloured image of wheat leaf blade, G component (green component) is higher, in order to isolate air cap preferably, the image gathered is carried out gray processing by the gray processing method adopting mixing, then by regular for gray value be double type in 0 to 1 scope, obtain the gray level image of wheat leaf blade.Fig. 4 (b) gives the design sketch obtained after the coloured image of collection carries out gray processing, Fig. 4 (a) is the design sketch that ordinary gamma method obtains, it can be seen that Fig. 4 (b) has targets improvement effect in contrast, it is easier to target is split.
The mathematical formulae that gray processing processes is as follows:
Wherein, T1And T2For the threshold value of segmentation, the red component of R, G, B respectively coloured image, green component and blue component.
(2) image segmentation
Adopt maximum variance between clusters that the image of gray processing is carried out binary conversion treatment, obtain image segmentation result.Maximum variance between clusters divides the image into background and target two parts by the gamma characteristic of image, inter-class variance between background and target is more big, illustrating that the two-part difference of pie graph picture is more big, therefore, the segmentation making inter-class variance maximum means that misclassification probability is minimum.
(3) image denoising
Choose linear structure element according to wheat leaf blade pore orientation self adaptation and carry out morphology opening operation, eliminate the impact of background noise.The arrangement of wheat leaf blade pore aligns mutually, and the process of adaptive detection pore orientation is as follows:
A. arranging horizontal direction is 0 degree of angular direction, and respectively to 0 °, 45 ° clockwise, 90 ° clockwise, 135 ° of four directions clockwise carry out row gray average statistics, obtain the gray average variance in each direction, the maximum direction of variance be image differentiate direction in advance.Accompanying drawing 2 is pre-differentiation direction schematic diagram, a1、a2、a3、a4Represent the direction of 0 °, 45 ° clockwise, 90 ° and 135 ° clockwise clockwise respectively;
B. carrying out the opening operation of the linear structure element vertical with differentiating direction in advance according to the other direction of anticipation, eliminate tiny effect of noise, Fig. 4 (c) gives the design sketch obtained after embodiment Fig. 4 (b) carries out morphology operations;
C. direction is the image of 0 ° and 45 ° clockwise, seeks the abscissa average of the element that its each column is not zero, and carries out fitting a straight line, obtains the direction of accurate wheat leaf blade pore.Direction is the image of 90 ° and 135 ° clockwise, seeks the abscissa average of the element that its each row is not zero, and carries out fitting a straight line, obtains the direction of accurate wheat leaf blade pore;
D. carrying out overall situation straight-line detection according to the direction of accurate wheat leaf blade pore, obtain meeting the parameter of all straight lines of wheat leaf blade pore orientation, in Fig. 3, black line is the design sketch that this embodiment carries out straight-line detection.
(4) connected region detection
Image segmentation result is carried out connected region detection, all connected regions detected are detected, be think hole area in fact when it meets stomatal parameters, obtain the positional information of Semen Tritici aestivi Stoma of Leaves in image.The parameter of pore includes the distance etc. of area, length-width ratio and the straight line from its nearest neighbours.Fig. 4 (d) gives the result of embodiment Fig. 4 (b) connected region detection, and black rectangle frame is the minimum enclosed rectangle of the connected region detected.
(5) statistics connected region quantity, obtains stomatal frequency
Finally statistics visual field inner air vent quantity, the actual size according to the Size calculation visual field that microscope is demarcated, obtain the stomatal frequency of reality, wherein the formula of stomatal frequency is as follows: