CN103810522A - Counting method and device for corn ear grains - Google Patents

Counting method and device for corn ear grains Download PDF

Info

Publication number
CN103810522A
CN103810522A CN201410008628.6A CN201410008628A CN103810522A CN 103810522 A CN103810522 A CN 103810522A CN 201410008628 A CN201410008628 A CN 201410008628A CN 103810522 A CN103810522 A CN 103810522A
Authority
CN
China
Prior art keywords
image
corn
obtaining
gray level
threshold
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.)
Granted
Application number
CN201410008628.6A
Other languages
Chinese (zh)
Other versions
CN103810522B (en
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.)
China Agricultural University
Original Assignee
China Agricultural University
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 China Agricultural University filed Critical China Agricultural University
Priority to CN201410008628.6A priority Critical patent/CN103810522B/en
Publication of CN103810522A publication Critical patent/CN103810522A/en
Application granted granted Critical
Publication of CN103810522B publication Critical patent/CN103810522B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a counting method and a counting device for corn ear grains. The method comprises the following steps: step S1, obtaining an estimation model for the corn ear grains, wherein the estimation model for the corn ear grains is used for showing a function relation between the number of the ear grains on the single surface of corn and the number of all ear grains; step 2, obtaining the single sided image of the corn, and preprocessing the single sided image to obtain a corresponding gray level image; step S3, performing multi-threshold segmentation on the gray level image obtained in the step S2, so as to obtain a corresponding binary image; step S4, counting communicating areas with the same gray values, and obtaining the number of the communication areas corresponding to the grey values for showing the corn grains; and step S5, determining all ear grains according to the number obtained in the step S4 and the corn grain estimation model in the step S1. By adopting the counting method for the corn ear grains, the corn ear grains can be quickly and conveniently counted.

Description

A kind of corn ear seed method of counting and device
Technical field
The present invention relates to image processing techniques, relate in particular to a kind of corn ear seed method of counting and device.
Background technology
Corn seed selection is the heterozygosity of utilizing corn cross-pollination and hereditary basis, and a large amount of self-mating systems and assorted combo are closed and carried out cross experiment, and the cenospecies of finally selecting indivedual excellences puts into production use.Wherein the seed-producing rate of fruit ear is the important indicator of passing judgment on corn variety quality.
At present China's corn ear seed counting work is mainly take manually as main.This mode not only workload is very huge, and reading out data error is large, and the data that cannot repeat having read read again, goes wrong and is difficult to verify that it corrects errors.Developed country's researchs such as America and Europe are used species test instrument.But this quasi-instrument selling at exorbitant prices, volume weight is large, is difficult for flowing using, and is not suitable in production reality, promoting and using.
Therefore develop a kind of automated computer and assist to improve corn ear seed counting efficiency, improve method of counting, examination and the popularization of accelerating kind are very necessary.
Summary of the invention
The invention provides a kind of corn ear seed method of counting and device, can realize the fast and convenient counting of corn ear seed,
The invention provides a kind of corn ear seed method of counting, the method comprises:
A kind of corn ear seed method of counting, is characterized in that, comprising:
Step S1, obtains corn ear seed appraising model; Wherein said corn ear seed appraising model is for the funtcional relationship between the fruit ear kernal number that represents corn one side and whole fruit ear kernal numbers;
Step S2, obtains the one-sided image of corn, and described one-sided image is carried out to image pre-service, obtains corresponding gray level image;
Step S3, carries out many Threshold segmentations to the gray level image obtaining in step S2, obtains corresponding bianry image;
Step S4, counts the connected region with same grayscale value, obtains the number with the connected region that the gray-scale value for representing iblet is corresponding;
Step S5, determines whole fruit ear kernal numbers according to the iblet appraising model in the number getting in step S4 and step S1.
Preferably, described step S1 specifically comprises:
Obtain following formula as corn ear seed appraising model:
y=ax+b;
Wherein, x represents the corn kernel number in the one-sided image of corn ear, and a, b are trained values, and y is whole fruit ear kernal numbers.
Preferably, described step S2 comprises:
Step S21, carries out medium filtering processing to described one-sided image;
Step S22, carries out Wallis filtering processing to the image obtaining in step S21;
Step S23, carries out histogram enhancement processing to the image obtaining in step S22, obtains the gray level image that described one-sided image is corresponding.
Preferably, described step S3, specifically comprises:
Take many threshold segmentation methods that RBGM and OTSU combine to carry out to the gray level image obtaining in step S2 the bianry image that corn kernel is cut apart and then obtained to image.
Preferably, described in take many threshold segmentation methods that RBGM and OTSU combine to carry out to corn ear seed gray level image the bianry image that corn kernel is cut apart and then obtained to image, specifically comprise:
Step S31, selects primary iteration point t iwith iteration step length η mfollowing many Threshold segmentations iterative formula is carried out to iterative, obtain optimal segmenting threshold
Figure BDA0000454673300000021
described optimal segmenting threshold for making
Figure BDA0000454673300000023
get peaked segmentation threshold:
x i mN + j + 1 = x i mN + j - η m ∂ σ B 2 ∂ t i , i = 1,2 , . . . , N ;
Wherein,
Figure BDA0000454673300000025
Figure BDA0000454673300000031
j=0,1,...,N-1;m=0,1,...
σ B 2 = Σ k = 0 n - 1 Σ j = k + 1 n - 1 ω k ω j ( μ k - μ j ) 2 ;
Wherein ω k, μ kbe respectively corresponding probability and the inequality of k class problem while representing n class problem to cut apart;
Step S32, uses the optimal segmenting threshold obtaining in step S31
Figure BDA0000454673300000033
the gray level image obtaining in step S2 is carried out to many Threshold segmentations.
The invention provides a kind of corn ear seed counting assembly, comprising:
MBM, for obtaining corn ear seed appraising model; Wherein said corn ear seed appraising model is for the funtcional relationship between the fruit ear kernal number that represents corn one side and whole fruit ear kernal numbers;
Image pretreatment module, for obtaining the one-sided image of corn, and carries out image pre-service to described one-sided image, obtains corresponding gray level image;
Image is cut apart module, carries out many Threshold segmentations for the gray level image that described image pretreatment module is obtained, and obtains corresponding bianry image;
Counting module, for counting, obtain the number with the connected region that the gray-scale value for representing iblet is corresponding to the connected region with same grayscale value;
Computing module, the iblet appraising model obtaining according to the number getting in described counting module and described MBM is determined whole fruit ear kernal numbers.
Preferably, described MBM is specifically for obtaining following formula as corn ear seed appraising model:
y=ax+b;
Wherein, x represents the corn kernel number in the one-sided image of corn ear, and a, b are trained values, and y is whole fruit ear kernal numbers.
Preferably, described image pretreatment module comprises:
First processes submodule, for described one-sided image is carried out to medium filtering processing;
Second processes submodule, carries out Wallis filtering processing for the image that the first processing submodule is obtained;
The 3rd processes submodule, carries out histogram enhancement processing for the image that the second processing submodule is obtained, and obtains the gray level image that described one-sided image is corresponding.
Preferably, described image is cut apart module, specifically for taking the gray level image that many threshold segmentation methods that RBGM and OTSU combine obtain described image pretreatment module to carry out the bianry image that corn kernel is cut apart and then obtained to image.
Preferably, described image is cut apart gray level image that module obtains described image pretreatment module for many threshold segmentation methods of taking RBGM and OTSU and combining and is carried out image when cutting apart and then obtaining the bianry image of corn kernel, specifically for carrying out:
Step S31, selects primary iteration point t iwith iteration step length η mfollowing many Threshold segmentations iterative formula is carried out to iterative, obtain optimal segmenting threshold
Figure BDA0000454673300000041
described optimal segmenting threshold
Figure BDA0000454673300000042
for making
Figure BDA0000454673300000043
get peaked segmentation threshold:
x i mN + j + 1 = x i mN + j - η m ∂ σ B 2 ∂ t i , i = 1,2 , . . . , N ;
Wherein,
Figure BDA0000454673300000045
Figure BDA0000454673300000046
j=0,1,...,N-1;m=0,1,...
σ B 2 = Σ k = 0 n - 1 Σ j = k + 1 n - 1 ω k ω j ( μ k - μ j ) 2 ;
Wherein ω k, μ kbe respectively corresponding probability and the inequality of k class problem while representing n class problem to cut apart;
Step S32, uses the optimal segmenting threshold obtaining in step S31
Figure BDA0000454673300000048
the gray level image obtaining in step S2 is carried out to many Threshold segmentations.
Adopt corn ear seed method of counting provided by the invention, can realize the fast and convenient counting of corn ear seed.
Accompanying drawing explanation
The schematic flow sheet of a kind of corn ear seed method of counting that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of gray scale processing in the corn ear seed method of counting that Fig. 2 provides for the embodiment of the present invention;
The schematic flow sheet that in the corn ear seed method of counting that Fig. 3 provides for the embodiment of the present invention, image is cut apart;
One side corn map picture after the corn ear seed method of counting that Fig. 4 a provides for the use embodiment of the present invention identifies corn ear;
Local one side corn map picture after the corn ear seed method of counting that Fig. 4 b provides for the use embodiment of the present invention identifies corn ear;
The structural representation of the corn ear seed counting assembly that Fig. 5 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is further described.Following examples are only for technical scheme of the present invention is more clearly described, and can not limit the scope of the invention with this.
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in further detail.Following examples are used for illustrating the present invention, but do not limit the scope of the invention.
Embodiment mono-
A kind of corn ear seed counting is provided, and as shown in Figure 1, the method comprises:
Step S1, obtains corn ear seed appraising model; Wherein said corn ear seed appraising model is for the funtcional relationship between the fruit ear kernal number that represents corn one side and whole fruit ear kernal numbers;
Step S2, obtains the one-sided image of corn, and described one-sided image is carried out to image pre-service, obtains corresponding gray level image;
Step S3, carries out many Threshold segmentations to the gray level image obtaining in step S2, obtains corresponding bianry image;
Step S4, counts the connected region with same grayscale value, obtains the number with the connected region that the gray-scale value for representing iblet is corresponding;
Step S5, determines whole fruit ear kernal numbers according to the iblet appraising model in the number getting in step S4 and step S1.
Adopt corn ear seed method of counting provided by the invention, can realize the fast and convenient counting of corn ear seed.
Realizing in process of the present invention, present inventor finds: (1) corn ear seed line number is substantially fixing, is generally 14 row or 16 row; (2) when corn image sampling, use erect image projecting method, corn kernel accounts for corn kernel region at image visible part and fixes, on this basis, in the preferred embodiment of the invention, described step S1 can be specially: obtain following formula (1) as corn ear seed appraising model:
y=ax+b; (1)
Wherein, x represents the corn kernel number in the one-sided image of corn ear, and a, b are trained values, and y is whole fruit ear kernal numbers.
Here a, b can obtain by training, by part corn ear is carried out to artificial counting, and a, b value are carried out to assignment.It is pointed out that the training pattern of setting up can be used for many times for step S2-S5, is convenient to realize the quick counter to other corn ear seeds here.
Because step S4 is the result of the one-sided image to corn, the seed therefore obtaining is also one side, is equivalent to the x in above-mentioned relation formula, now x is brought in above-mentioned relational expression, can obtain total number of corn ear seed.
Certainly in practical application, those skilled in the art also can use other mathematical model, specifically use which kind of model not affect protection scope of the present invention.
Preferably, in above-mentioned step S2, one-sided image being carried out to the pretreated method of image can comprise as shown in Figure 2:
Step S21, carries out medium filtering processing to described one-sided image;
Step S22, carries out Wallis filtering processing to the image obtaining in step S21;
Step S23, carries out histogram enhancement processing to the image obtaining in step S22, obtains the gray level image that described one-sided image is corresponding.
In practical application, before step S21, also can get corn fruit fruit ear seed gray level image f (x, y), wherein f (x, y) is the gray-scale value that (x, y) pixel is corresponding.
Wherein, the formula that the medium filtering in step S21 adopts in processing is following formula (2):
f ' ( x 0 , y 0 ) = [ Sort ( x i , y i ) ∈ S ω ij f ( x i , y i ) ] | S | + 1 2 - - - ( 2 )
Wherein S is pixel (x 0, y 0) neighborhood set wherein comprise (x 0, y 0), (x, y) represents the arbitrary element in S, f (x, y) represents the gray-scale value of (x, y) point, | S| represents the number of element in S set, and Sort represents sequence, and ω represents the weights that add while calculating intermediate pixel value.
In step S22, to process the formula adopting be following formula (3) in Wallis filtering:
g ( i , j ) = [ α m d + ( 1 - α ) f ‾ ( i , j ) ] + [ f ( i , j ) - f ‾ ( i , j ) ] A σ d Aσ ( i , j ) + σ d - - - ( 3 )
Wherein [f (i, j)] m × Nrepresent original image, [g (i, j)] m × Nrepresent the image after strengthening,
Figure BDA0000454673300000073
represent local mean value, m drepresent mean value, σ drepresent standard deviation, A represents gain coefficient, and α controls the proportionality constant that strengthens edge and background composition in image.
In step S23, to process the formula adopting be following formula (4) to histogram enhancement
z=G -1[T(r)] (4)
Pixel grayscale before r presentation video strengthens, transforming function transformation function s=T (r) represents the grey scale pixel value after enhancing, inverse transform function z=G -1(s) represent desired new gray level.
Preferably, described step S3, specifically comprises:
Take many threshold segmentation methods that RBGM and OTSU combine to carry out to the gray level image obtaining in step S2 the bianry image that corn kernel is cut apart and then obtained to image.
Concrete, step S3 can comprise each step as shown in Figure 3:
Step S31, selects primary iteration point t iwith iteration step length η mfollowing many Threshold segmentations iterative formula (5) is carried out to iterative, obtain optimal segmenting threshold
Figure BDA0000454673300000074
described optimal segmenting threshold
Figure BDA0000454673300000075
for making
Figure BDA0000454673300000076
get peaked segmentation threshold:
x i mN + j + 1 = x i mN + j - η m ∂ σ B 2 ∂ t i , i = 1,2 , . . . , N ; - - - ( 5 )
Wherein,
Figure BDA0000454673300000082
Figure BDA0000454673300000083
j=0,1,...,N-1;m=0,1,...
σ B 2 = Σ k = 0 n - 1 Σ j = k + 1 n - 1 ω k ω j ( μ k - μ j ) 2 ;
Wherein ω k, μ kbe respectively corresponding probability and the inequality of k class problem while representing n class problem to cut apart.
Step S32, uses the optimal segmenting threshold obtaining in step S31
Figure BDA0000454673300000085
the gray level image obtaining in step S2 is carried out to many Threshold segmentations.
The principle of above-mentioned steps S31 is:
Suppose that population variance is labeled as σ for n class segmentation problem 2, all kinds of probability, average, variances are labeled as respectively ω k, μ k,
Figure BDA0000454673300000086
(k=0,1 ..., n-1), the composite marking of each segmentation threshold is t={t k| k=1,2 ..., n-1}, has:
Figure BDA0000454673300000087
wherein k=0,1 ...., n-1(6)
Figure BDA0000454673300000088
t 0=0, t n=L is histogram border (7)
Figure BDA0000454673300000089
wherein 1 < t k< L (k=1,2 ..., n-1) be each segmentation threshold, (8)
Each class internal variance of many threshold values is:
&sigma; w 2 = &Sigma; k = 0 n - 1 &omega; k &sigma; k 2 - - - ( 9 )
Be similar to single threshold problem, set up the equation of constraint of many Thresholds:
&sigma; 2 = &Sigma; i = 1 L ( i - &mu; ) 2 P i = &Sigma; i = 1 L i 2 P i - 2 &mu; &Sigma; i = 1 L i P i + &mu; 2 &Sigma; i = 1 L P i = &Sigma; i = 1 L i 2 P i - &mu; 2 ;
Can draw according to above formula &sigma; 2 - &sigma; w 2 = &Sigma; k = 0 n - 1 &omega; k &mu; k 2 + &Sigma; k = 0 n - 1 &omega; k &mu; k &Sigma; j &NotEqual; k &omega; j &mu; j ;
Derive and can draw through arranging &sigma; B 2 = &sigma; 2 - &sigma; w 2 = &Sigma; k = 0 n - 1 &Sigma; j = k + 1 n - 1 &omega; k &omega; j ( &mu; k - &mu; j ) 2 - - - ( 10 ) ; Obviously
Figure BDA0000454673300000094
for with respect to independent variable t ifunction.
Afterwards by the x in gradient descent method (RBGM) formula (11) ireplace with t i, by f(x) replace with
Figure BDA0000454673300000095
can fall for solution formula (12):
Figure BDA0000454673300000096
Wherein,
Figure BDA0000454673300000097
j=0,1,...,N-1;m=0,1,...。
x i mN + j + 1 = x i mN + j - &eta; m &PartialD; &sigma; B 2 &PartialD; t i , i = 1,2 , . . . , N ; - - - ( 12 ) .
Many threshold segmentation methods that employing RBGM and OTSU combine are for processing in the many threshold segmentation methods of traditional OSTU along with segmentation threshold number is increased to many threshold values from single threshold, the calculated amount that optimal threshold is solved will become the problem of geometric growth, adopt the method can under same precision, greatly reduce separation calculation amount, and then shorten the separation calculation time.
The bianry image of available corn ear seed after step S3, wherein each corn kernel is divided into the region of a connection, now, the connected region with same grayscale value is counted, obtain the number with the connected region that the gray-scale value for representing iblet is corresponding, calculate corn ear seed sum according to the corn ear seed appraising model of setting up in advance afterwards.As Fig. 4 (a) (b) as shown in, in the bianry image of corn ear seed, each corn kernel is divided into the region of a connection, in this region, adjacent pixel has same gray-scale value 0 or 1.Counter C of first initialization before mark, initial value is 1, is used for counting one side corn kernel number, p (x, y) represent pixel is at the pixel value of (x, y) point.From any one initial point (x of image 0, y 0) set out and line by line each pixel is scanned, in the time running into p (x, y) and be not 1, explanation is image background or has identified pixel and skip this pixel; In the time that to run into p (x, y) be 1 pixel, be counter C value by this pixel logo, and the adjacent all pixel values of the scanning element pixel that is 1 its value is designated to C, C value added to 1 after completing mark, continue next pixel logo.Identify pixel one by one until all pixels are scanned complete position, finally obtain one side corn kernel number.
Beneficial effect of the present invention comprises: (1) utilizes computer graphics disposal technology to replace manual corn ear seed counting method, can draw quick, easy, exactly corn ear seed sum, overcome in prior art scheme corn ear seed gate time long, subjectivity is strong, the large deficiency that waits of reading out data error; (2) the present invention is by using the part one side corn ear seed image collecting as sample, do regretional analysis according to one side corn ear kernal number in image and actual corn ear seed sum, obtain corn ear seed appraising model y=ax+b, and according to Corn Seeds appraising model, can estimate corn ear seed sum, rate of accuracy reached to 93% by one side corn kernel number in image; (3) the present invention adopts many threshold segmentation methods that RBGM and OTSU combine for processing in the many threshold segmentation methods of traditional OSTU along with segmentation threshold number is increased to many threshold values from single threshold, the calculated amount that optimal threshold is solved will become the problem of geometric growth, adopt the method can under same precision, greatly reduce separation calculation amount, and then shorten the separation calculation time.
Embodiment bis-
Based on identical design, the present invention also provides a kind of corn ear seed counting assembly, and as shown in Figure 5, this device comprises:
MBM 501, for obtaining corn ear seed appraising model; Wherein said corn ear seed appraising model is for the funtcional relationship between the fruit ear kernal number that represents corn one side and whole fruit ear kernal numbers;
Image pretreatment module 502, for obtaining the one-sided image of corn, and carries out image pre-service to described one-sided image, obtains corresponding gray level image;
Image is cut apart module 503, carries out many Threshold segmentations for the gray level image that image pretreatment module 502 is obtained, and obtains corresponding bianry image;
Counting module 504, for counting, obtain the number with the connected region that the gray-scale value for representing iblet is corresponding to the connected region with same grayscale value;
Computing module 505, the iblet appraising model obtaining according to the number getting in counting module 504 and MBM 501 is determined whole fruit ear kernal numbers.
Preferably, MBM 501 is specifically for obtaining following formula as corn ear seed appraising model:
y=ax+b;
Wherein, x represents the corn kernel number in the one-sided image of corn ear, and a, b are trained values, and y is whole fruit ear kernal numbers.
Preferably, image pretreatment module 502 specifically comprises:
First processes submodule, for described one-sided image is carried out to medium filtering processing;
Second processes submodule, carries out Wallis filtering processing for the image that the first processing submodule is obtained;
The 3rd processes submodule, carries out histogram enhancement processing for the image that the second processing submodule is obtained, and obtains the gray level image that described one-sided image is corresponding.
Preferably, image is cut apart module 503, specifically for taking the gray level image that many threshold segmentation methods that RBGM and OTSU combine obtain image pretreatment module 502 to carry out the bianry image that corn kernel is cut apart and then obtained to image.
Preferably, cut apart module map and look like to cut apart module for taking gray level image that many threshold segmentation methods that RBGM and OTSU combine obtain image pretreatment module 502 to carry out image when cutting apart and then obtaining the bianry image of corn kernel, specifically for carrying out:
Step S31, selects primary iteration point t iwith iteration step length η mfollowing many Threshold segmentations iterative formula is carried out to iterative, obtain optimal segmenting threshold
Figure BDA0000454673300000111
described optimal segmenting threshold
Figure BDA0000454673300000112
for making
Figure BDA0000454673300000113
get peaked segmentation threshold:
x i mN + j + 1 = x i mN + j - &eta; m &PartialD; &sigma; B 2 &PartialD; t i , i = 1,2 , . . . , N ;
Wherein,
Figure BDA0000454673300000122
Figure BDA0000454673300000123
j=0,1,...,N-1;m=0,1,...
&sigma; B 2 = &Sigma; k = 0 n - 1 &Sigma; j = k + 1 n - 1 &omega; k &omega; j ( &mu; k - &mu; j ) 2 ;
Wherein ω k, μ kbe respectively corresponding probability and the inequality of k class problem while representing n class problem to cut apart;
Step S32, uses the optimal segmenting threshold obtaining in step S31
Figure BDA0000454673300000125
the gray level image obtaining in step S2 is carried out to many Threshold segmentations.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, do not departing under the prerequisite of the technology of the present invention principle; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. a corn ear seed method of counting, is characterized in that, comprising:
Step S1, obtains corn ear seed appraising model; Wherein said corn ear seed appraising model is for the funtcional relationship between the fruit ear kernal number that represents corn one side and whole fruit ear kernal numbers;
Step S2, obtains the one-sided image of corn, and described one-sided image is carried out to image pre-service, obtains corresponding gray level image;
Step S3, carries out many Threshold segmentations to the gray level image obtaining in step S2, obtains corresponding bianry image;
Step S4, counts the connected region with same grayscale value, obtains the number with the connected region that the gray-scale value for representing iblet is corresponding;
Step S5, determines whole fruit ear kernal numbers according to the iblet appraising model in the number getting in step S4 and step S1.
2. the method for claim 1, is characterized in that, described step S1 specifically comprises:
Obtain following formula as corn ear seed appraising model:
y=ax+b;
Wherein, x represents the corn kernel number in the one-sided image of corn ear, and a, b are trained values, and y is whole fruit ear kernal numbers.
3. the method for claim 1, is characterized in that, described step S2 comprises:
Step S21, carries out medium filtering processing to described one-sided image;
Step S22, carries out Wallis filtering processing to the image obtaining in step S21;
Step S23, carries out histogram enhancement processing to the image obtaining in step S22, obtains the gray level image that described one-sided image is corresponding.
4. the method for claim 1, is characterized in that, described step S3, specifically comprises:
Take many threshold segmentation methods that RBGM and OTSU combine to carry out to the gray level image obtaining in step S2 the bianry image that corn kernel is cut apart and then obtained to image.
5. method as claimed in claim 4, is characterized in that, described in take many threshold segmentation methods that RBGM and OTSU combine to carry out to corn ear seed gray level image the bianry image that corn kernel is cut apart and then obtained to image, specifically comprise:
Step S31, selects primary iteration point t iwith iteration step length η mfollowing many Threshold segmentations iterative formula is carried out to iterative, obtain optimal segmenting threshold
Figure FDA0000454673290000027
described optimal segmenting threshold for making get peaked segmentation threshold:
x i mN + j + 1 = x i mN + j - &eta; m &PartialD; &sigma; B 2 &PartialD; t i , i = 1,2 , . . . , N ;
Wherein,
Figure FDA0000454673290000024
Figure FDA0000454673290000025
j=0,1,...,N-1;m=0,1,...
&sigma; B 2 = &Sigma; k = 0 n - 1 &Sigma; j = k + 1 n - 1 &omega; k &omega; j ( &mu; k - &mu; j ) 2 ;
Wherein ω k, μ kbe respectively corresponding probability and the inequality of k class problem while representing n class problem to cut apart;
Step S32, uses the optimal segmenting threshold obtaining in step S31
Figure FDA0000454673290000028
the gray level image obtaining in step S2 is carried out to many Threshold segmentations.
6. a corn ear seed counting assembly, is characterized in that, comprising:
MBM, for obtaining corn ear seed appraising model; Wherein said corn ear seed appraising model is for the funtcional relationship between the fruit ear kernal number that represents corn one side and whole fruit ear kernal numbers;
Image pretreatment module, for obtaining the one-sided image of corn, and carries out image pre-service to described one-sided image, obtains corresponding gray level image;
Image is cut apart module, carries out many Threshold segmentations for the gray level image that described image pretreatment module is obtained, and obtains corresponding bianry image;
Counting module, for counting, obtain the number with the connected region that the gray-scale value for representing iblet is corresponding to the connected region with same grayscale value;
Computing module, the iblet appraising model obtaining according to the number getting in described counting module and described MBM is determined whole fruit ear kernal numbers.
7. device as claimed in claim 6, is characterized in that, described MBM is specifically for obtaining following formula as corn ear seed appraising model:
y=ax+b;
Wherein, x represents the corn kernel number in the one-sided image of corn ear, and a, b are trained values, and y is whole fruit ear kernal numbers.
8. device as claimed in claim 6, is characterized in that, described image pretreatment module comprises:
First processes submodule, for described one-sided image is carried out to medium filtering processing;
Second processes submodule, carries out Wallis filtering processing for the image that the first processing submodule is obtained;
The 3rd processes submodule, carries out histogram enhancement processing for the image that the second processing submodule is obtained, and obtains the gray level image that described one-sided image is corresponding.
9. device as claimed in claim 6, it is characterized in that, described image is cut apart module, specifically for taking the gray level image that many threshold segmentation methods that RBGM and OTSU combine obtain described image pretreatment module to carry out the bianry image that corn kernel is cut apart and then obtained to image.
10. device as claimed in claim 9, it is characterized in that, described image is cut apart gray level image that module obtains described image pretreatment module for many threshold segmentation methods of taking RBGM and OTSU and combining and is carried out image when cutting apart and then obtaining the bianry image of corn kernel, specifically for carrying out:
Step S31, selects primary iteration point t iwith iteration step length η mfollowing many Threshold segmentations iterative formula is carried out to iterative, obtain optimal segmenting threshold
Figure FDA0000454673290000033
described optimal segmenting threshold
Figure FDA0000454673290000031
for making get peaked segmentation threshold:
x i mN + j + 1 = x i mN + j - &eta; m &PartialD; &sigma; B 2 &PartialD; t i , i = 1,2 , . . . , N ;
Wherein,
Figure FDA0000454673290000042
Figure FDA0000454673290000043
j=0,1,...,N-1;m=0,1,...
&sigma; B 2 = &Sigma; k = 0 n - 1 &Sigma; j = k + 1 n - 1 &omega; k &omega; j ( &mu; k - &mu; j ) 2 ;
Wherein ω k, μ kbe respectively corresponding probability and the inequality of k class problem while representing n class problem to cut apart;
Step S32, uses the optimal segmenting threshold obtaining in step S31
Figure FDA0000454673290000045
the gray level image obtaining in step S2 is carried out to many Threshold segmentations.
CN201410008628.6A 2014-01-08 2014-01-08 Counting method and device for corn ear grains Expired - Fee Related CN103810522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410008628.6A CN103810522B (en) 2014-01-08 2014-01-08 Counting method and device for corn ear grains

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410008628.6A CN103810522B (en) 2014-01-08 2014-01-08 Counting method and device for corn ear grains

Publications (2)

Publication Number Publication Date
CN103810522A true CN103810522A (en) 2014-05-21
CN103810522B CN103810522B (en) 2017-02-08

Family

ID=50707261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410008628.6A Expired - Fee Related CN103810522B (en) 2014-01-08 2014-01-08 Counting method and device for corn ear grains

Country Status (1)

Country Link
CN (1) CN103810522B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105574853A (en) * 2015-12-07 2016-05-11 中国科学院合肥物质科学研究院 Method and system for calculating number of wheat grains based on image identification
CN106485708A (en) * 2016-10-11 2017-03-08 南京航空航天大学 A kind of round log method of counting based on image recognition
CN109863530A (en) * 2016-10-19 2019-06-07 巴斯夫农化商标有限公司 Determine the grain weight of grain ear
CN110490868A (en) * 2019-08-23 2019-11-22 陈�峰 A kind of lossless method of counting based on computer vision corn grain number per spike
CN110806373A (en) * 2019-10-08 2020-02-18 郑州轻工业学院 Seed cotton web fraction detection device and seed cotton web fraction detection method
CN116129331A (en) * 2023-04-12 2023-05-16 成都航空职业技术学院 Method and device for counting number of through holes on surface of rotary part
CN117455912A (en) * 2023-12-23 2024-01-26 安徽农业大学 Corn cob and grain panoramic counting method and counting system based on three plane mirrors

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NL8702738A (en) * 1987-11-17 1989-06-16 Heineken Technische Beheer Bv METHOD AND APPARATUS FOR COUNTING OBJECTS OBTAINED ON A TRANSPORTATION TRACK
CN102750584B (en) * 2012-04-18 2014-10-08 中国农业大学 On-corncob corn niblet counting method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘贤喜 等: "一种新的二值图像连通区域准确标记算法", 《计算机工程与应用》 *
王传宇 等: "采用全景技术的机器视觉测量玉米果穗考种指标", 《采用全景技术的机器视觉测量玉米果穗考种指标 *
王海燕 等: "基于机器视觉的颗粒识别计数", 《长春工程学院学报》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105574853A (en) * 2015-12-07 2016-05-11 中国科学院合肥物质科学研究院 Method and system for calculating number of wheat grains based on image identification
CN105574853B (en) * 2015-12-07 2018-05-15 中国科学院合肥物质科学研究院 The method and system that a kind of wheat head grain number based on image recognition calculates
CN106485708A (en) * 2016-10-11 2017-03-08 南京航空航天大学 A kind of round log method of counting based on image recognition
CN106485708B (en) * 2016-10-11 2018-12-28 南京航空航天大学 A kind of round log method of counting based on image recognition
CN109863530A (en) * 2016-10-19 2019-06-07 巴斯夫农化商标有限公司 Determine the grain weight of grain ear
CN110490868A (en) * 2019-08-23 2019-11-22 陈�峰 A kind of lossless method of counting based on computer vision corn grain number per spike
CN110490868B (en) * 2019-08-23 2023-05-30 陈�峰 Nondestructive counting method based on computer vision corn cob grain number
CN110806373A (en) * 2019-10-08 2020-02-18 郑州轻工业学院 Seed cotton web fraction detection device and seed cotton web fraction detection method
CN116129331A (en) * 2023-04-12 2023-05-16 成都航空职业技术学院 Method and device for counting number of through holes on surface of rotary part
CN116129331B (en) * 2023-04-12 2023-07-04 成都航空职业技术学院 Method and device for counting number of through holes on surface of rotary part
CN117455912A (en) * 2023-12-23 2024-01-26 安徽农业大学 Corn cob and grain panoramic counting method and counting system based on three plane mirrors
CN117455912B (en) * 2023-12-23 2024-03-19 安徽农业大学 Corn cob and grain panoramic counting method and counting system based on three plane mirrors

Also Published As

Publication number Publication date
CN103810522B (en) 2017-02-08

Similar Documents

Publication Publication Date Title
CN103810522A (en) Counting method and device for corn ear grains
CN107220277A (en) Image retrieval algorithm based on cartographical sketching
CN105701508A (en) Global-local optimization model based on multistage convolution neural network and significant detection algorithm
CN103745454B (en) Method for evaluating image processing algorithms or systems based on rank learning
CN111724355B (en) Image measuring method for abalone body type parameters
CN104867225A (en) Banknote face orientation identification method and apparatus
CN113658117B (en) Method for identifying and dividing aggregate boundary in asphalt mixture based on deep learning
CN102289671A (en) Method and device for extracting texture feature of image
CN104063713A (en) Semi-autonomous on-line studying method based on random fern classifier
CN104899892A (en) Method for quickly extracting star points from star images
CN106156805A (en) A kind of classifier training method of sample label missing data
CN110827312A (en) Learning method based on cooperative visual attention neural network
CN110335280A (en) A kind of financial documents image segmentation and antidote based on mobile terminal
CN104866871A (en) Projection structure sparse coding-based hyperspectral image classification method
CN111815526B (en) Rain image rainstrip removing method and system based on image filtering and CNN
CN106056161A (en) Visual inspection method for planar rotating target
CN106250901A (en) A kind of digit recognition method based on image feature information
CN107169520A (en) A kind of big data lacks attribute complementing method
CN103310217B (en) Based on Handwritten Numeral Recognition Method and the device of image covariance feature
CN105787045A (en) Precision enhancing method for visual media semantic indexing
CN115830514B (en) Whole river reach surface flow velocity calculation method and system suitable for curved river channel
CN103761520A (en) Document image non-parameter binaryzation method based on stroke width
CN111210408A (en) Ray image-based composite material defect identification method
CN115937693A (en) Road identification method and system based on remote sensing image
CN115184998A (en) Rayleigh wave frequency dispersion curve automatic extraction method based on improved U-net neural network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170208

CF01 Termination of patent right due to non-payment of annual fee