CN102339378A - Method and device for automatically extracting cotton seeds - Google Patents

Method and device for automatically extracting cotton seeds Download PDF

Info

Publication number
CN102339378A
CN102339378A CN2010102365420A CN201010236542A CN102339378A CN 102339378 A CN102339378 A CN 102339378A CN 2010102365420 A CN2010102365420 A CN 2010102365420A CN 201010236542 A CN201010236542 A CN 201010236542A CN 102339378 A CN102339378 A CN 102339378A
Authority
CN
China
Prior art keywords
cotton seedling
module
cotton
strain
weeds
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
CN2010102365420A
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.)
Chinese Academy of Agricultural Mechanization Sciences
Original Assignee
Chinese Academy of Agricultural Mechanization Sciences
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 Chinese Academy of Agricultural Mechanization Sciences filed Critical Chinese Academy of Agricultural Mechanization Sciences
Priority to CN2010102365420A priority Critical patent/CN102339378A/en
Publication of CN102339378A publication Critical patent/CN102339378A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method and device for automatically extracting cotton seeds. The method comprises the following steps of: step one, using green plants and soil color characteristics to carry out background segmentation on colorful images in a cotton seed field; step two, using position characteristics of cotton seed line spacing to carry out cotton seed belt location on the green plants obtained by the background segmentation; step three, using position characteristics of cotton seed row spacing to carry out single-plant cotton seed location and plant counting on the located cotton seed belts; and step four, using shape characteristics of the cotton seeds and weeds to extract the single-plant cotton seeds to obtain a cotton seed image in the field in accordance with the plant number of the cotton seeds. According to the method and device, the quick and automatic extraction of the cotton seeds with high recognition rate can be realized.

Description

The method and the device thereof of the cotton seedling of a kind of automatic extraction
Technical field
The invention belongs to precision agriculture mechanized equipment automatic control technology field, refer to the cotton seedling information in a kind of field method and the device thereof of identification automatically especially.
Background technology
The phenomenon of unreasonable use agricultural chemicals is general in China's agricultural production, has caused serious agroecological environment to be polluted, and harm is very serious.The one, to prevent and treat often, it is excessive that agricultural chemicals uses, and surpassed 50% in the Cotton Production; The 2nd, the effective rate of utilization of agricultural chemicals is low, has only 20~30% on the field crop, far below the average level of developed country 50%.Therefore, the demand of precision agriculture of variable rate spray application becomes the research focus.Realize variable spray medicine, the automatic identification that primarily solves the disease pest and weed of field crops, the automatic extraction problem of crop plant then is the disease pest and weed key issue of identification automatically.
The recognition methods of the field crops growth of cereal crop seedlings has personal monitoring, remote sensing monitoring and three kinds of approach of near-earth image monitoring.
1) personal monitoring is before the operation of spray medicine; Utilization GPS or other positioning system; The position of the field crops generation disease pest and weed that artificial record is automatically seen is depicted as distribution plan then, and this method exists inefficiency, labour intensity to rely on artificial experience greatly, fully; In the observation of the large tracts of land growth of cereal crop seedlings, it is powerless that the personal monitoring seems.
2) though remote sensing monitoring has overcome many drawbacks of personal monitoring, still,, be mainly used in several kinds of disease pest and weeds of large tracts of land generation in the identification certain growth phase because space and the spectral resolution of remote sensing images is lower, cause discrimination lower and bearing accuracy is low.
3) the near-earth image monitoring method is to utilize machine vision technique under the condition nearer apart from ground; Catch, handle and analyze the information of the crop that is comprised in the image of field, sick Chinese caterpillar fungus and background; And automatically identifying the growth of cereal crop seedlings, this method can reach high recognition.The near-earth image monitoring of cotton seedling; The characteristic of normally utilizing cotton seedling to have red stem is carried out cotton seedling and is extracted; Because cotton seedling stem is blocked in covering with ground sheeting, the expansion of cotton leaf; And problem such as the color of soil and cotton seedling stem is close, the discrimination of method that extracts cotton seedling with color automatically is lower, and the automatic discrimination of the cotton seedling of this method is usually less than 80%.
Summary of the invention
A purpose of the present invention is to provide the method and the device thereof of the cotton seedling of a kind of automatic extraction, is used to realize the cotton seedling of the high extraction fast and automatically of discrimination.
To achieve these goals, the present invention provides the method for the cotton seedling of a kind of automatic extraction, it is characterized in that, comprising:
Step 1 utilizes green plants and soil color characteristic to carry out background segment to cotton seedling field coloured image;
Step 2 to the green plants that obtains after the background segment, utilizes the position feature of cotton seedling line-spacing to carry out cotton seedling band location;
Step 3 to the cotton seedling band of being located, utilizes the position feature of cotton seedling spacing in the rows to carry out individual plant cotton seedling location and strain counting number;
Step 4, the shape facility of counting cotton seedling of utilization and weeds according to cotton seedling strain carries out the extraction of the cotton seedling of individual plant, obtains the cotton seedling image in field.
The method of the cotton seedling of described automatic extraction wherein, in the said step 1, further comprises:
With said cotton seedling field coloured image, convert the gray level image of 8bit into according to ultra green color threshold index;
With the greyscale image transitions of said 8bit is bianry image, and green plants is the prospect of white, and soil is the background of black.
The method of the cotton seedling of described automatic extraction wherein, in the said step 2, further comprises:
Based on said bianry image; According to the substantially invariable position feature of cotton seedling line-spacing; Obtain the vertical direction pixel histogram of said green plants through the vertical projection of said green plants; Confirm the center and the up-and-down boundary thereof of said cotton seedling band according to said vertical direction pixel histogram, and the outer weeds zone of filtering up-and-down boundary.
The method of the cotton seedling of described automatic extraction wherein, in the said step 2, further comprises:
According to the histogrammic maximal value of said vertical direction pixel, confirm the center of said cotton seedling band;
According to the histogrammic minimum value of said vertical direction pixel, confirm the boundary segmentation threshold value of said cotton seedling band;
According to the boundary segmentation threshold value of said cotton seedling band, begin respectively to search for the up-and-down boundary of said cotton seedling band to both sides up and down by the center of said cotton seedling band;
Weeds outside the up-and-down boundary of the said cotton seedling band of filtering are regional, are changed to these weeds zones the background of black.
The method of the cotton seedling of described automatic extraction wherein, in the said step 2, further comprises:
According to the up-and-down boundary of said cotton seedling band and the distance of center, revise up-and-down boundary.
The method of the cotton seedling of described automatic extraction wherein, in the said step 3, further comprises:
Based on said bianry image; According to the substantially invariable position feature of cotton seedling spacing in the rows; Through the horizontal projection of said cotton seedling band, obtain the horizontal direction pixel histogram of said cotton seedling band, according to the strain number of the cotton seedling of said horizontal direction pixel histogram calculation; Confirm the border, the left and right sides of the cotton seedling of each individual plant, and filtering right sides weeds zone out-of-bounds.
The method of the cotton seedling of described automatic extraction wherein, in the said step 3, further comprises:
According to the histogrammic maximal value of said horizontal direction pixel, confirm that the top strain counts threshold value;
According to the histogrammic minimum value of said horizontal direction pixel, confirm that the bottom strain counts threshold value;
Ask for the strain of said top and count first left and right sides intersection point of threshold line and said horizontal direction pixel histogram curve;
Ask for the strain of said bottom and count second left and right sides intersection point of threshold line and said horizontal direction pixel histogram curve;
By said first left and right sides intersection point and said second left and right sides intersection point, count the border, the left and right sides of strain number with the cotton seedling of each individual plant of said bianry image middle cotton seedling;
Each cotton seedling plant right sides of filtering weeds out-of-bounds are regional, are changed to these weeds zones the background of black.
The method of the cotton seedling of described automatic extraction wherein, in the said step 3, further comprises:
According to the width of the cotton seedling of each individual plant, revise the strain number of cotton seedling.
The method of the cotton seedling of described automatic extraction wherein, in the said step 4, further comprises:
According to the shape facility of cotton seedling plant area much larger than weeds plant area, obtain the area size in each cotton seedling and weeds zone, wipe the weeds zone of area much smaller than cotton seedling, obtain the cotton seedling image in said field.
The method of the cotton seedling of described automatic extraction wherein, in the said step 4, further comprises:
Utilization fast area labelling method each cotton seedling of mark and weeds zone, and calculate each regional area;
Area to each cotton seedling and weeds zone sorts from big to small;
From the area sequence after the ordering, remove the cotton seedling area identical with said cotton seedling strain number after, ask for the average of remaining each region area, and this average is wiped the area threshold of algorithm as particle;
According to said area threshold, wipe area less than the weeds of said area threshold zone, be changed to the background of black to these zones, obtain the cotton seedling image in said field.
To achieve these goals, the present invention also provides the device of the cotton seedling of a kind of automatic extraction, it is characterized in that, comprising:
The background segment module is used for utilizing green plants and soil color characteristic to carry out background segment to cotton seedling field coloured image;
Cotton seedling band locating module connects said background segment module, is used for the green plants to obtaining after the background segment, utilizes the position feature of cotton seedling line-spacing to carry out cotton seedling band location;
Individual plant cotton seedling location and strain counting number module connect said cotton seedling band locating module, are used for the cotton seedling band to being located, and utilize the position feature of cotton seedling spacing in the rows to carry out individual plant cotton seedling location and strain counting number;
The cotton seedling image collection module in field connects said individual plant cotton seedling location and strain counting number module, and the shape facility that is used for counting according to cotton seedling strain cotton seedling of utilization and weeds carries out the extraction of the cotton seedling of individual plant, obtains field cotton seedling image.
The device of the cotton seedling of described automatic extraction, wherein, said background segment module comprises:
The gradation conversion module is used for converting said cotton seedling field coloured image the gray level image of 8bit into according to ultra green color threshold index;
The two-value modular converter connects said gradation conversion module, and the greyscale image transitions that is used for said 8bit is a bianry image, and green plants is the prospect of white, and soil is the background of black.
The device of the cotton seedling of described automatic extraction, wherein, said cotton seedling band locating module comprises:
Green plants vertical projection module is used for based on said bianry image, according to the substantially invariable position feature of cotton seedling line-spacing, obtains the vertical direction pixel histogram of said green plants through the vertical projection of said green plants;
The center determination module connects said green plants vertical projection module, is used for confirming the center of said cotton seedling band according to the histogrammic maximal value of said vertical direction pixel;
The boundary segmentation threshold determination module connects said green plants vertical projection module, is used for confirming the boundary segmentation threshold value of said cotton seedling band according to the histogrammic minimum value of said vertical direction pixel;
Cotton seedling band up-and-down boundary determination module; Connect said center determination module, said boundary segmentation threshold determination module; Be used for boundary segmentation threshold value, begin respectively to search for the up-and-down boundary of said cotton seedling band to both sides up and down by the center of said cotton seedling band according to said cotton seedling band;
First weeds zone filtering module connects said cotton seedling band up-and-down boundary determination module, is used for the outer weeds zone of up-and-down boundary of the said cotton seedling band of filtering, is changed to these weeds zones the background of black.
The device of the cotton seedling of described automatic extraction, wherein, said cotton seedling band locating module also comprises:
The up-and-down boundary correcting module connects said center determination module, said cotton seedling band up-and-down boundary determination module, is used for according to the up-and-down boundary of said cotton seedling band and the distance of center, revises up-and-down boundary.
The device of the cotton seedling of described automatic extraction, wherein, said individual plant cotton seedling location and strain counting number module comprise:
Cotton seedling band horizontal projection module is used for based on said bianry image, according to the substantially invariable position feature of cotton seedling spacing in the rows, through the horizontal projection of said cotton seedling band, obtains the horizontal direction pixel histogram of said cotton seedling band;
Threshold determination module is counted in the top strain, connects said cotton seedling band horizontal projection module, is used for according to the histogrammic maximal value of said horizontal direction pixel, confirms that the top strain counts threshold value;
Threshold determination module is counted in the bottom strain, connects said cotton seedling band horizontal projection module, is used for according to the histogrammic minimum value of said horizontal direction pixel, confirms that the bottom strain counts threshold value;
First left and right sides intersection point is asked for module, connects said cotton seedling band horizontal projection module, threshold determination module is counted in the strain of said top, is used to ask for first left and right sides intersection point that threshold line and said horizontal direction pixel histogram curve are counted in the strain of said top;
Second left and right sides intersection point is asked for module, connects said cotton seedling band horizontal projection module, threshold determination module is counted in the strain of said bottom, is used to ask for second left and right sides intersection point that threshold line and said horizontal direction pixel histogram curve are counted in the strain of said bottom;
Cotton seedling strain number and border, left and right sides determination module; Connect that said first left and right sides intersection point is asked for module, said second left and right sides intersection point is asked for module; Be used for by said first left and right sides intersection point and said second left and right sides intersection point, count the border, the left and right sides of strain number with the cotton seedling of each individual plant of said bianry image middle cotton seedling;
Second weeds zone filtering module connects said cotton seedling strain number and border, left and right sides determination module, is used for each cotton seedling plant right sides of filtering weeds zone out-of-bounds, is changed to these weeds zones the background of black.
The device of the cotton seedling of described automatic extraction, wherein, said individual plant cotton seedling location and strain counting number module also comprise:
Correcting module is counted in cotton seedling strain, connects said cotton seedling strain number and border, left and right sides determination module, is used for the width according to the cotton seedling of each individual plant, revises the strain number of cotton seedling.
The device of the cotton seedling of described automatic extraction, wherein, the cotton seedling image collection module in said field comprises:
Cotton seedling and weeds zone acquisition module are used to use each cotton seedling of fast area labelling method mark and weeds zone, and calculate each regional area;
Cotton seedling and weeds region ordering module connect said cotton seedling and weeds zone acquisition module, are used for the area in each cotton seedling and weeds zone is sorted from big to small;
The area threshold acquisition module; Connect said cotton seedling and weeds region ordering module, be used for from the ordering after the area sequence, remove the cotton seedling area identical with said cotton seedling strain number after; Ask for the average of remaining each region area, and this average is wiped the area threshold of algorithm as particle;
The 3rd weeds zone filtering module; Connect said cotton seedling and weeds zone acquisition module, said area threshold acquisition module; Be used for according to said area threshold; Wipe area less than the weeds of said area threshold zone, be changed to the background of black to these weeds zones, obtain the cotton seedling image in said field.
Compared with prior art, useful technique effect of the present invention is:
Therefore the present invention, has high discrimination owing to adopted the position of cotton seedling and shape facility to combine with computer image processing technology; And can extract the cotton seedling plant between the cotton field fast and automatically, and count cotton seedling strain number, thereby condition is provided the disease pest and weed analysis of follow-up cotton seedling; Implement variable spray medicine; To solve the problem of the excessive use of agricultural chemicals, reduce agroecological environment and pollute, promote the construction of resource-conserving and environmentally friendly sustainable agriculture.
Description of drawings
Fig. 1 is the method flow diagram of the cotton seedling of automatic extraction of the present invention;
Fig. 2 is the process flow diagram of the automatic positioning method of the cotton seedling band of the present invention;
Fig. 3 is the process flow diagram of individual plant of the present invention cotton seedling location and strain counting number method;
Fig. 4 is the structure drawing of device of the cotton seedling of automatic extraction of the present invention.
Embodiment
Relevant detailed description of the present invention and technology contents, conjunction with figs. is explained as follows.
As shown in Figure 1, be the method flow diagram of the cotton seedling of automatic extraction of the present invention.This method utilizes computer programming to realize Flame Image Process and analysis, and to the cotton seedling image in the cotton field of gathering with digital camera, position and shape facility according to the cotton seedling of program request extract cotton seedling plant and strain number thereof, and the present invention takes following steps to extract cotton seedling:
Step 101 is carried out ultra green method gray processing to cotton seedling field original color image and is handled, and obtains gray level image;
Step 102 to gray level image utilization Otsu method binary conversion treatment, obtains bianry image;
Step 103 based on bianry image, adopts vertical projection method to locate cotton seedling band;
Step 104 to the cotton seedling band of being located, adopts horizontal projection method to confirm cotton seedling strain number;
Step 105 adopts particle to wipe the cotton seedling of legal position individual plant.
Further, step 101, step 102 are to utilize green plants and soil color characteristic to carry out background segment, according to " ultra green method ", adopt the color threshold index to cut apart green plants and Soil Background such as cotton seedling and weeds, that is:
To the cotton seedling of program request field 24bit RGB original color image,, convert the gray level image of 8bit into earlier according to ultra green color threshold index Extra-Green=2G-R-B;
Using the Otsu method then is bianry image with the greyscale image transitions of 8bit, and green plants is prospect-white (pixel value is 255), and soil is background-black (pixel value is 0).
Further; In the step 103; Being the green plants to obtaining after the background segment, utilizing the position feature of cotton seedling line-spacing to carry out cotton seedling band location, specifically is the pixel histogram according to the vertical projection acquisition of green plants; Confirm the center and the up-and-down boundary thereof of cotton seedling band, and the zone of the weeds outside the filtering border; Concrete substep is following:
B1, the pixel histogram of green plants in statistics vertical direction (along the crop row direction) bianry image, the histogrammic horizontal ordinate of pixel is the height of image, ordinate is the green plants pixel count in every row;
B2 according to the histogrammic maximal value of vertical direction pixel, confirms the center of cotton seedling band;
B3 according to the histogrammic minimum value of vertical direction pixel, confirms the boundary segmentation threshold value of cotton seedling band;
B4 is begun by the center of cotton seedling band, to both sides up and down, according to the boundary segmentation threshold value of cotton seedling band, searches for the up-and-down boundary of cotton seedling band respectively;
B5 according to the up-and-down boundary of cotton seedling band and the distance of center, revises up-and-down boundary;
B6, the outer zone of the cotton seedling band of filtering up-and-down boundary is changed to background (black) to these zones.
Further, in the step 104, be cotton seedling band to being located, utilize the position feature of cotton seedling spacing in the rows to carry out individual plant cotton seedling location and strain counting number; Specifically be the pixel histogram according to the horizontal projection acquisition of cotton seedling band, counting diagram is as the strain number of middle cotton seedling, and the border, the left and right sides of the cotton seedling of definite each individual plant, and filtering right sides weeds zone out-of-bounds, and concrete substep is following:
C1, the pixel histogram of statistics horizontal direction (vertical crop row direction) bianry image middle cotton seedling band, the histogrammic horizontal ordinate of pixel is the width of image, ordinate is the plant pixel count in every row;
C2 according to the histogrammic maximal value of horizontal direction pixel of cotton seedling band, confirms that the top strain counts threshold value;
C3 according to the histogrammic minimum value of horizontal direction pixel of cotton seedling band, confirms that the bottom strain counts threshold value;
C4 asks for the left and right sides intersection point that the horizontal direction pixel histogram curve of threshold line and cotton seedling band is counted in the top strain;
C5 asks for the left and right sides intersection point that the horizontal direction pixel histogram curve of threshold line and cotton seedling band is counted in the bottom strain;
C6, by the left and right sides, the top and the bottom intersection point of confirming, counting diagram is as the border, the left and right sides of strain number with the cotton seedling of each individual plant of middle cotton seedling;
C7, each cotton seedling plant right sides zone out-of-bounds of filtering is changed to background (black) to these zones;
C8 according to the width of the cotton seedling of each strain, revises cotton seedling strain number.
Further, in the step 105, be to utilize the shape facility of cotton seedling and weeds to carry out the extraction of the cotton seedling of individual plant, obtain the cotton seedling image in field; Specifically be according to the shape facility of cotton seedling plant area much larger than weeds plant area, the area that obtains each cotton seedling and weeds zone through the fast area labelling method is big or small, wipes the weeds zone of area much smaller than cotton seedling, thereby obtains the cotton seedling image in field.Concrete substep is following:
D1, utilization fast area labelling method each cotton seedling of mark and weeds zone, and calculate each regional area;
D2, utilization bubble sort method sorts to each cotton seedling and the regional area of weeds from big to small;
D3 calculates the average of each region area behind the cotton seedling strain number, wipes the area threshold of algorithm as particle with this; Wherein from the area sequence after the ordering, remove the cotton seedling area identical with cotton seedling strain number after, ask for the average of remaining each region area, the average of each region area of this average after as cotton seedling strain number.
D4, according to area threshold, the filtering area is changed to background (black) to these zones less than the weeds zone of area threshold, obtains cotton seedling plant image.
As shown in Figure 2, be the process flow diagram of the automatic positioning method of the cotton seedling band of the present invention.This flow process has been described the automatic positioning method of cotton seedling band; It is earlier according to the substantially invariable position feature of cotton seedling line-spacing; Through the vertical projection of green plants,, obtain the vertical direction histogram f (y) of plant pixel distribution promptly along the directional statistics plant pixel count of crop row:
f ( y ) = Σ x = 0 W - 1 f ( x , y ) 255 y=0,1,2,…H-1
Wherein, f (x, y) the presentation video pixel (x, gray-scale value y), W are the width of image, H is the height of image.
According to the vertical direction pixel histogram of green plants, confirm the center and the up-and-down boundary of cotton seedling band automatically, the plant pixel that is positioned at outside the border is weeds, gives filtering.
Particularly,
A) ask for the histogrammic maximal value Max of vertical direction pixel (f (y)), the pairing y of maximal value is the center Hc of cotton seedling band;
Hc=y, y are the pairing value of Max (f (y))
B) ask for the histogrammic minimum M in of vertical direction pixel (f (y)), confirm the boundary segmentation threshold value threshold of cotton seedling band by minimum value:
threshold=Min(f(y))+10
C) the center y=Hc from cotton seedling band begins, and upwards searches for the coboundary Ht of cotton seedling band, if f (y)≤threshold, coboundary Ht=y stops search.
D) the center y=Hc from cotton seedling band begins, and searches for the lower boundary Hb of cotton seedling band downwards, if f (y)≤threshold, lower boundary Hb=y stops search.
E) the distance B t of calculating coboundary and center line, Dt=Hc-Ht, the distance B b of calculating lower boundary and center line, Db=Hb-Hc, according to distance B t and Db, revise up-and-down boundary:
If Dt>Db revises lower boundary: Hb=Hc+Dt; If Dt<Db revises coboundary: Ht=Hc-Db.
F) the outer zone of the cotton seedling band of filtering up-and-down boundary is changed to background-black (pixel value is 0) to y=Ht to the zone of y=0, is changed to background-black (pixel value is 0) to y=Hb to the zone of y=H-1.
Details are as follows in the face of each step among Fig. 2 is carried out down:
Step 201, initialization, picture traverse W, picture altitude H, the histogrammic array f of pixel (H)=0, the histogrammic maximal value Maxf=0 of pixel, the histogrammic minimum M inf=W of pixel;
Step 202 begins to calculate the pixel histogram f (H) of vertical direction;
Step 203, (does x y), judge that (x is 0 y) for the gray-scale value f of pixel to get x row, pixel f that y is capable? As be not 0, then the value with the histogrammic array f of pixel (y) adds 1, and x is carried out x+1;
Does step 204 judge that the pixel of x row has been got x=W-1? As got, y is carried out y+1, otherwise return step 203;
Does step 205 judge that the capable y of image has got y=H-1? As got, then accomplish the calculating of the pixel histogram f (H) of vertical direction, otherwise return step 203;
Step 206, the histogrammic maximal value Maxf of beginning calculating pixel;
Is step 207 judged f (y)>Maxf? As greater than, then carry out Maxf=f (y), y=y+1;
Does step 208 judge that the histogram array got y=H-1? In this way, then accomplish the calculating of the histogrammic maximal value Maxf of pixel, otherwise return step 207;
Step 209 begins the calculating of cotton seedling band center Hc;
Is step 210 judged f (y)=Maxf? In this way, then carry out Hc=y, break; Otherwise carry out the y=y+1 continued and judge f (y)=Maxf?
Step 211, the histogrammic minimum M inf of beginning calculating pixel;
Is step 212 judged f (y)<Minf? In this way, carry out Minf=f (y), y=y+1;
Does step 213 judge that the histogram array got y=H-1? In this way, then accomplish the calculating of the histogrammic minimum M inf of pixel, otherwise return step 212;
Step 214, the boundary segmentation threshold value th=Minf+10 of cotton seedling band;
Step 215 begins the calculating of cotton seedling band coboundary Ht, begins from y=Hc;
Is step 216 judged f (y)<=th? In this way, then carry out coboundary Ht=y; Break; Otherwise carry out the y=y-1 continued and judge f (y)<=th?
Step 217 begins the calculating of cotton seedling band lower boundary Hb, begins from y=Hc;
Is step 218 judged f (y)<=th? In this way, then carry out coboundary Hb=y; Break; Otherwise carry out the y=y+1 continued and judge f (y)<=th?
Step 219, the distance B t=Hc-Ht of coboundary and center line;
Step 220, the distance B b=Hb-Hc of lower boundary and center line;
Is step 221 judged Dt>Db? In this way, then revise lower boundary, Hb=Hc+Dt, otherwise revise coboundary, Ht=Hc-Db;
Step 222, beginning separates cotton seedling filtering weeds zone in spite of illness according to up-and-down boundary;
Step 223 is changed to 0 to y=0 to the pixel value of the image-region of y=Ht, and f (x, y)=0;
Step 224 is changed to 0 to y=Hb to the pixel value of the image-region of y=H-1, and f (x, y)=0;
Step 225 finishes.
As shown in Figure 3, be the process flow diagram of individual plant of the present invention cotton seedling location and strain counting number method.This flow process has been described individual plant cotton seedling location and strain counting number method; It is earlier according to the substantially invariable position feature of cotton seedling spacing in the rows; Through the horizontal projection of cotton seedling band,, obtain the horizontal direction histogram f (x) of plant pixel distribution promptly along the directional statistics plant pixel count of crop row:
f ( x ) = Σ y = 0 H - 1 f ( x , y ) 255 x=0,1,2,…W-1
Wherein, f (x, y) the presentation video pixel (x, gray-scale value y), W are the width of image, H is the height of image.
Horizontal direction pixel histogram according to cotton seedling band; Counting diagram is as the strain number of middle cotton seedling; And confirm the border, the left and right sides (threshold line of each cotton seedling plant upper and lower, and with the left and right sides intersection point of horizontal direction pixel histogram curve) of the cotton seedling of each individual plant and filtering right sides weeds zone out-of-bounds.
A) ask for the histogrammic maximal value Max of horizontal direction pixel (f (x)), confirm that by Max (f (x)) the top strain counts threshold value Tt:
Tt=Max(f(x))/2
B) ask for the histogrammic minimum M in of horizontal direction pixel (f (x)), confirm that by Min (f (x)) the bottom strain counts threshold value Tb:
Tb=Min(f(x))+1
C) ask for the intersection point P (x) that threshold line y=Tt is counted in horizontal direction pixel histogram curve f (x) and top strain:
If f (x) >=Tt and f (x-1)<Tt and f (x+1) >=Tt then are left intersection point, P (x)=Tt; If f (x) >=Tt and f (x+1)<Tt and f (x-1) >=Tt then are right intersection point, P (x)=Tt.
D) ask for the intersection point N (x) that threshold line y=Tb is counted in horizontal direction pixel histogram curve f (x) and bottom strain:
If f (x) >=Tb and f (x-1)<Tb and f (x+1) >=Tb then are left intersection point, N (x)=Tb; If f (x) >=Tb and f (x+1)<Tb and f (x-1) >=Tb then are right intersection point, N (x)=Tb.
E) by intersection point P (x) and N (x) counting diagram as the border, the left and right sides of the strain number of middle cotton seedling and the cotton seedling of individual plant (promptly according to the threshold line of each cotton seedling plant upper and lower and the left and right sides intersection point of horizontal direction pixel histogram curve; Counting diagram is as the strain number of middle cotton seedling; Confirm the border, the left and right sides and the width of the cotton seedling of each individual plant, and the zone outside the border, the filtering left and right sides):
Begin to increase progressively search from x=0 with step-length 1, if N (x)=Tb then stops search, record x value Rb=x at this moment; In counting x ∈ [0, the Rb] interval, the number n of P (x)=Tt, if n<2, then x ∈ [0, Rb] zone is the background area, is changed to background-black to x=0 to the zone of x=Rb; If n >=2, then x ∈ [0, Rb] zone is the cotton seedling of strain zone, and cotton seedling strain numerical value s adds 1, and writes down the left margin SL [s]=0 in the cotton seedling of this strain zone, right margin SR [s]=Rb, the width S W of cotton seedling [s]=SR [s]-SL [s].
Begin with step-length 1 search of successively decreasing from x=W-1, if N (x)=Tb then stops search, the x value Lb=x of record this moment; Counting x ∈ [Lb, W) in the interval, the number n of P (x)=Tt, if n<2, then x ∈ [Lb, W) zone is the background area, is changed to background-black to x=Lb to the zone of x=W-1; If n >=2, then x ∈ [Lb, W) zone is the cotton seedling of strain zone, cotton seedling strain numerical value s adds 1, and writes down left margin SL [the s]=Lb in the cotton seedling of this strain zone, right margin SR [s]=W-1, the width S W of cotton seedling [s]=SR [s]-SL [s].
Begin to increase progressively search from x=Rb with step-length 1, till x=Lb: if N (x)=Tb, record x value L=x at this moment; Begin to increase progressively search from x=L with step-length 1, if N (x)=Tb, record x value R=x at this moment; In counting x ∈ [L, the R] interval, the number n of P (x)=Tt is if n<2 then x ∈ [L, R] zone is the background area are changed to background-black to x=L to the zone of x=R; If n >=2, then x ∈ [L, R] zone is the cotton seedling of strain zone, and cotton seedling strain numerical value s adds 1, and writes down left margin SL [the s]=L in the cotton seedling of this strain zone, right margin SR [s]=R, and the width S W of cotton seedling [s]=SR [s]-SL [s] stops search.Width S W [s] according to the cotton seedling of each strain revises cotton seedling strain number: if
Figure BSA00000205442300121
then cotton seedling strain numerical value s adds 1.
Details are as follows in the face of each step among Fig. 3 is carried out down:
Step 301, initialization, picture traverse W, picture altitude H, the histogrammic array f of pixel (W)=0, the histogrammic maximal value Maxf=0 of pixel, the histogrammic minimum M inf=H of pixel;
Step 302, the pixel histogram f (W) of calculated level direction;
Step 303, the histogrammic maximal value Maxf of calculating pixel;
Step 304, the histogrammic minimum M inf of calculating pixel;
Step 305, threshold value Tt=maxf/2 is counted in the top strain, and threshold value Tb=Minf+1 is counted in the bottom strain;
Step 306, the intersection point P (x) of threshold line is counted in beginning calculating pixel histogram and top strain;
Is step 307 judged f (x)>=Tt && f (x+1)<Tt && f (x-1)>=Tt? In this way, then carry out left intersection point P (x)=Tt, get into step 308, otherwise carry out x=x+1, continue and to judge;
Is step 308 judged f (x)>=Tt && f (x+1)>=Tt && f (x-1)<Tt? In this way, then carry out right intersection point P (x)=Tt; Otherwise carry out x=x+1, and continue the judgement in the step 307;
Step 309 is counted the intersection point N (x) of threshold line with the bottom strain in the beginning compute histograms;
Is step 310 judged f (x)>=Tb && f (x+1)<Tb && f (x-1)>=Tb? In this way, then carry out left intersection point N (x)=Tb, get into step 311, otherwise carry out x=x+1, continue and to judge;
Is step 311 judged f (x)>=Tb && f (x+1)>=Tb && f (x-1)<Tb? In this way, then carry out right intersection point N (x)=Tb, get into step 312, otherwise carry out x=x+1, and continue the judgement in the step 310;
Step 312, beginning are calculated the strain number and the border, the cotton seedling left and right sides of individual plant of cotton seedling by intersection point P (x) and N (x);
Step 313, left end begins from x=0;
Is step 314 judged N (x)=Tb? In this way, border, bottom right Rb=x then; N=0; Break; And counting is gone up the number of intersection point from x=0 to x=Rb; Otherwise carry out x=x+1, continue and to judge;
Is step 315 judged P (x)=Tt? In this way, then carrying out n=n+1, does x=x+1 judge x=Rb? Then get into step 316 in this way, otherwise continue to judge P (x)=Tt? Otherwise carry out x=x+1, judge x=Rb? In this way, then get into step 316, otherwise continue to judge P (x)=Tt?
Is step 316 judged n>=2?
In this way, then obtain:
Cotton seedling strain numerical value s=s+1, left margin SL [s]=0, right margin SR [s]=Rb, width S W [s]=SR [s]-SL [s];
Otherwise will be from x=0 to x=Rb the pixel in zone be changed to background f (x, y)=0;
Step 317, right-hand member begins from x=W-1;
Is step 318 judged N (x)=Tb? In this way, left lower side circle Lb=x then; N=0; Break; Counting is gone up the number of intersection point from x=Lb to x=W-1; Otherwise carry out x=x-1, continue and to judge;
Is step 319 judged P (x)=Tb? In this way, then carrying out n=n+1, does x=x+1 judge x=W-1? Then get into step 320 in this way, otherwise continue to judge P (x)=Tb? Otherwise carry out x=x+1, judge x=W-1? In this way, then get into step 320, otherwise continue to judge P (x)=Tb?
Is step 320 judged n>=2?
In this way, then obtain:
Cotton seedling strain numerical value s=s+1, left margin SL [s]=Lb, right margin SR [s]=W-1, width S W [s]=SR [s]-SL [s];
Otherwise will be from x=Lb to x=W-1 the pixel in zone be changed to background f (x, y)=0;
Step 321, middle from x=Lb to x=Rb;
Is step 322 judged N (x)=Tb? In this way, then left lower side circle L=x from x=L+1 to x=Rb, otherwise carries out x=x+1, continues and should judge;
Is step 323 judged N (x)=Tb? In this way, border, bottom right R=x then, n=0, counting is gone up the number of intersection point from x=L to x=R; Otherwise carry out x=x+1, continue and to judge;
Is step 324 judged P (x)=Tt? In this way, then carrying out n=n+1, does x=x+1 judge x=R? In this way, then get into step 325, otherwise continue to judge P (x)=Tt? Otherwise carry out x=x+1, judge x=R? In this way, then get into step 325, otherwise continue to judge P (x)=Tt?
Is step 325 judged n>=2?
In this way, then obtain:
Cotton seedling strain numerical value s=s+1, left margin SL [s]=0, right margin SR [s]=Rb, width S W [s]=SR [s]-SL [s]; Break;
Otherwise will be from x=L to x=R the pixel in zone be changed to background f (x, y)=0;
Step 326 begins to revise cotton seedling strain number;
Is step 327 judged SW [s+1]/SW [s]>=2? In this way, s=s+1 is counted in then cotton seedling strain; Otherwise carry out x=x+1, continue and to judge;
Step 328 finishes.
As shown in Figure 4, be the structure drawing of device of the cotton seedling of automatic extraction of the present invention.This device 400 comprises:
Background segment module 41 is used for utilizing green plants and soil color characteristic to carry out background segment to cotton seedling field coloured image;
Cotton seedling band locating module 42 connects background segment module 41, is used for the green plants to obtaining after the background segment, utilizes the position feature of cotton seedling line-spacing to carry out cotton seedling band location;
Individual plant cotton seedling location and strain counting number module 43 connect cotton seedling band locating module 42, are used for the cotton seedling band to being located, and utilize the position feature of cotton seedling spacing in the rows to carry out individual plant cotton seedling location and strain counting number;
The cotton seedling image collection module 44 in field connects individual plant cotton seedling location and strain counting number module 43, is used to utilize the shape facility of cotton seedling and weeds to carry out the extraction of the cotton seedling of individual plant, obtains the cotton seedling image in field.
Further, background segment module 41 comprises:
Gradation conversion module 411 is used for cotton seedling field 24bit RGB original color image, according to ultra green color threshold index Extra-Green=2G-R-B, converts the gray level image of 8bit into;
Two-value modular converter 412 connects gradation conversion module 411, and being used to use the Otsu method is bianry image with the greyscale image transitions of 8bit, and green plants is prospect-white (pixel value is 255), and soil is background-black (pixel value is 0).
Further, cotton seedling band locating module 42 comprises:
Green plants vertical projection module 421; Be used for based on bianry image, according to the substantially invariable position feature of cotton seedling line-spacing, through the vertical projection of green plants; Promptly, obtain the vertical direction pixel histogram f (y) of green plants along the directional statistics plant pixel count of crop row
f ( y ) = Σ x = 0 W - 1 f ( x , y ) 255 y=0,1,2,…H-1
Wherein, f (x, y) the presentation video pixel (x, gray-scale value y), W are the width of image, H is the height of image, the plant pixel count in every row.
Center determination module 422 connects green plants vertical projection module 421, is used for confirming the center Hc of cotton seedling band according to the histogrammic maximal value Max of vertical direction pixel (f (y)) that the pairing y of maximal value is the center Hc of cotton seedling band;
Boundary segmentation threshold determination module 423 connects green plants vertical projection module 421, is used for confirming the boundary segmentation threshold value threshold of cotton seedling band according to the histogrammic minimum M in of vertical direction pixel (f (y)) that formula is following:
threshold=Min(f(y))+10
Cotton seedling band up-and-down boundary determination module 424; Connect center determination module 422, boundary segmentation threshold determination module 423; Be used for boundary segmentation threshold value threshold according to cotton seedling band; Begin respectively to search for coboundary Ht, the lower boundary Hb of cotton seedling band by the center Hc of cotton seedling band to both sides up and down:
If f (y)≤threshold, coboundary Ht=y stops search; If f (y)≤threshold, lower boundary Hb=y stops search.
First weeds zone filtering module 425 connects cotton seedling band up-and-down boundary determination module 424, is used for the outer weeds zone of up-and-down boundary of the cotton seedling band of filtering, is changed to these weeds zones the background of black:
Be changed to background-black (pixel value is 0) to y=Ht to the zone of y=0, be changed to background-black (pixel value is 0) to y=Hb to the zone of y=H-1.
Further, cotton seedling band locating module 42 also comprises:
Up-and-down boundary correcting module 426; Connect center determination module 422, cotton seedling band up-and-down boundary determination module 424; Be used for according to the coboundary Ht of cotton seedling band and the distance B t (Dt=Hc-Ht) of center Hc, the lower boundary Hb of cotton seedling band and the distance B b (Db=Hb-Hc) of center Hc, revise up-and-down boundary:
If Dt>Db revises lower boundary: Hb=Hc+Dt;
If Dt<Db revises coboundary: Ht=Hc-Db.
Further, individual plant cotton seedling location and strain counting number module 43 comprise:
Cotton seedling band horizontal projection module 431; Be used for based on bianry image, according to the substantially invariable position feature of cotton seedling spacing in the rows, through the horizontal projection of cotton seedling band; Promptly, obtain the horizontal direction pixel histogram f (x) of cotton seedling band along the directional statistics plant pixel count of crop row:
f ( x ) = Σ y = 0 H - 1 f ( x , y ) 255 x=0,1,2,…W-1
Wherein, f (x, y) the presentation video pixel (x, gray-scale value y), W are the width of image, H is the height of image, the plant pixel count in every row.
Threshold determination module 432 is counted in the top strain, connects cotton seedling band horizontal projection module 431, is used for according to the histogrammic maximal value Max of horizontal direction pixel (f (x)), confirms that the top strain counts threshold value Tt:
Tt=Max(f(x))/2
Threshold determination module 433 is counted in the bottom strain, connects cotton seedling band horizontal projection module 431, is used for according to the histogrammic minimum M in of horizontal direction pixel (f (x)), confirms that the bottom strain counts threshold value Tb:
Tb=Min(f(x))+1
First left and right sides intersection point is asked for module 434, connects cotton seedling band horizontal projection module 431, threshold determination module 432 is counted in the top strain, is used to ask for first left and right sides intersection point P (x) that threshold line y=Tt and horizontal direction pixel histogram curve f (x) are counted in the top strain:
If f (x) >=Tt and f (x-1)<Tt and f (x+1) >=Tt then are left intersection point, P (x)=Tt; If f (x) >=Tt and f (x+1)<Tt and f (x-1) >=Tt then are right intersection point, P (x)=Tt.
Second left and right sides intersection point is asked for module 435, connects cotton seedling band horizontal projection module 431, threshold determination module 433 is counted in the bottom strain, is used to ask for second left and right sides intersection point N (x) that threshold line y=Tb and horizontal direction pixel histogram curve f (x) are counted in the bottom strain:
If f (x) >=Tb and f (x-1)<Tb and f (x+1) >=Tb then are left intersection point, N (x)=Tb; If f (x) >=Tb and f (x+1)<Tb and f (x-1) >=Tb then are right intersection point, N (x)=Tb.
Cotton seedling strain number and border, left and right sides determination module 436; Connect that first left and right sides intersection point is asked for module 434, second left and right sides intersection point is asked for module 435; Be used for by first left and right sides intersection point P (x) and second left and right sides intersection point N (x), left margin SL [s], the SR [s] of s and the cotton seedling of each individual plant are counted in the strain of counting bianry image middle cotton seedling.
Second weeds zone filtering module 437 connects cotton seedling strain number and border, left and right sides determination module 436, is used for the outer weeds zone of border, left and right sides SL [s], SR [s] of the cotton seedling of each individual plant of filtering, is changed to background-black to these weeds zones.
Cotton seedling strain number and border, left and right sides determination module 436 begin to increase progressively search with step-length 1 from x=0, if N (x)=Tb then stops search, and record x value Rb=x at this moment; In counting x ∈ [0, the Rb] interval, the number n of P (x)=Tt, if n<2, then x ∈ [0, Rb] zone is the background area, is changed to background-black to x=0 to the zone of x=Rb by the regional filtering module 437 of second weeds; If n >=2, then x ∈ [0, Rb] zone is the cotton seedling of strain zone, and cotton seedling strain numerical value s adds 1, and writes down the left margin SL [s]=0 in the cotton seedling of this strain zone, right margin SR [s]=Rb, the width S W of cotton seedling [s]=SR [s]-SL [s].
Cotton seedling strain number and border, left and right sides determination module 436 begin if N (x)=Tb then stops search, to write down x value Lb=x at this moment with step-length 1 search of successively decreasing from x=W-1; Counting x ∈ [Lb, W) in the interval, the number n of P (x)=Tt, if n<2, then x ∈ [Lb, W) zone is the background area, is changed to background-black to x=Lb to the zone of x=W-1 by the regional filtering module 437 of second weeds; If n >=2, then x ∈ [Lb, W) zone is the cotton seedling of strain zone, cotton seedling strain numerical value s adds 1, and writes down left margin SL [the s]=Lb in the cotton seedling of this strain zone, right margin SR [s]=W-1, the width S W of cotton seedling [s]=SR [s]-SL [s].
Cotton seedling strain number and border, left and right sides determination module 436 begin to increase progressively search with step-length 1 from x=Rb, till x=Lb: if N (x)=Tb, record x value L=x at this moment; Begin to increase progressively search from x=L with step-length 1, if N (x)=Tb, record x value R=x at this moment; In counting x ∈ [L, the R] interval, the number n of P (x)=Tt, if n<2, then x ∈ [L, R] zone is the background area, is changed to background-black to x=L to the zone of x=R by the regional filtering module 437 of second weeds; If n >=2, then x ∈ [L, R] zone is the cotton seedling of strain zone, and cotton seedling strain numerical value s adds 1, and writes down left margin SL [the s]=L in the cotton seedling of this strain zone, right margin SR [s]=R, and the width S W of cotton seedling [s]=SR [s]-SL [s] stops search.
Further, individual plant cotton seedling location and strain counting number module 43 also comprise:
Correcting module 438 is counted in cotton seedling strain; Connect cotton seedling strain number and border, left and right sides determination module 436; Be used for width S W [s] according to the cotton seedling of each individual plant; Revise the strain of cotton seedling and count s: if
Figure BSA00000205442300171
, then cotton seedling strain numerical value s adds 1.
Further, the cotton seedling image collection module 44 in field comprises:
Cotton seedling and weeds zone acquisition module 441 are used to use each cotton seedling of fast area labelling method mark and weeds zone, and calculate each regional area;
Cotton seedling and weeds region ordering module 442 connect cotton seedling and weeds zone acquisition module 441, are used to use the bubble sort method, and each cotton seedling and the regional area of weeds are sorted from big to small;
Area threshold acquisition module 443 connects cotton seedling and weeds region ordering module 442, is used to calculate the average of each region area behind the cotton seedling strain number, and this average is wiped the area threshold of algorithm as particle;
Further, area threshold acquisition module 443 is from the area sequence after the ordering, remove the cotton seedling area identical with cotton seedling strain number after, ask for the average of remaining each region area, and with the average of each region area of this average after as cotton seedling strain number.
The 3rd weeds zone filtering module 444; Connect cotton seedling and weeds zone acquisition module 441, area threshold acquisition module 443, be used for, wipe the weeds zone of area less than area threshold according to area threshold; Be changed to background-black to these weeds zones, obtain the cotton seedling image in field.
Certainly; The present invention also can have other various embodiments; Under the situation that does not deviate from spirit of the present invention and essence thereof; Those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.

Claims (17)

1. a method of extracting cotton seedling automatically is characterized in that, comprising:
Step 1 utilizes green plants and soil color characteristic to carry out background segment to cotton seedling field coloured image;
Step 2 to the green plants that obtains after the background segment, utilizes the position feature of cotton seedling line-spacing to carry out cotton seedling band location;
Step 3 to the cotton seedling band of being located, utilizes the position feature of cotton seedling spacing in the rows to carry out individual plant cotton seedling location and strain counting number;
Step 4, the shape facility of counting cotton seedling of utilization and weeds according to cotton seedling strain carries out the extraction of the cotton seedling of individual plant, obtains the cotton seedling image in field.
2. the method for the cotton seedling of automatic extraction according to claim 1 is characterized in that, in the said step 1, further comprises:
With said cotton seedling field coloured image, convert the gray level image of 8bit into according to ultra green color threshold index;
With the greyscale image transitions of said 8bit is bianry image, and green plants is the prospect of white, and soil is the background of black.
3. the method for the cotton seedling of automatic extraction according to claim 2 is characterized in that, in the said step 2, further comprises:
Based on said bianry image; According to the substantially invariable position feature of cotton seedling line-spacing; Obtain the vertical direction pixel histogram of said green plants through the vertical projection of said green plants; Confirm the center and the up-and-down boundary thereof of said cotton seedling band according to said vertical direction pixel histogram, and the outer weeds zone of filtering up-and-down boundary.
4. the method for the cotton seedling of automatic extraction according to claim 3 is characterized in that, in the said step 2, further comprises:
According to the histogrammic maximal value of said vertical direction pixel, confirm the center of said cotton seedling band;
According to the histogrammic minimum value of said vertical direction pixel, confirm the boundary segmentation threshold value of said cotton seedling band;
According to the boundary segmentation threshold value of said cotton seedling band, begin respectively to search for the up-and-down boundary of said cotton seedling band to both sides up and down by the center of said cotton seedling band;
Weeds outside the up-and-down boundary of the said cotton seedling band of filtering are regional, are changed to these weeds zones the background of black.
5. the method for the cotton seedling of automatic extraction according to claim 4 is characterized in that, in the said step 2, further comprises:
According to the up-and-down boundary of said cotton seedling band and the distance of center, revise up-and-down boundary.
6. according to the method for claim 2,3, the cotton seedling of 4 or 5 described automatic extractions, it is characterized in that, in the said step 3, further comprise:
Based on said bianry image; According to the substantially invariable position feature of cotton seedling spacing in the rows; Through the horizontal projection of said cotton seedling band, obtain the horizontal direction pixel histogram of said cotton seedling band, according to the strain number of the cotton seedling of said horizontal direction pixel histogram calculation; Confirm the border, the left and right sides of the cotton seedling of each individual plant, and filtering right sides weeds zone out-of-bounds.
7. the method for the cotton seedling of automatic extraction according to claim 6 is characterized in that, in the said step 3, further comprises:
According to the histogrammic maximal value of said horizontal direction pixel, confirm that the top strain counts threshold value;
According to the histogrammic minimum value of said horizontal direction pixel, confirm that the bottom strain counts threshold value;
Ask for the strain of said top and count first left and right sides intersection point of threshold line and said horizontal direction pixel histogram curve;
Ask for the strain of said bottom and count second left and right sides intersection point of threshold line and said horizontal direction pixel histogram curve;
By said first left and right sides intersection point and said second left and right sides intersection point, count the border, the left and right sides of strain number with the cotton seedling of each individual plant of said bianry image middle cotton seedling;
Each cotton seedling plant right sides of filtering weeds out-of-bounds are regional, are changed to these weeds zones the background of black.
8. the method for the cotton seedling of automatic extraction according to claim 7 is characterized in that, in the said step 3, further comprises:
According to the width of the cotton seedling of each individual plant, revise the strain number of cotton seedling.
9. according to the method for claim 2,3,4,5, the cotton seedling of 7 or 8 described automatic extractions, it is characterized in that, in the said step 4, further comprise:
According to the shape facility of cotton seedling plant area much larger than weeds plant area, obtain the area size in each cotton seedling and weeds zone, wipe the weeds zone of area much smaller than cotton seedling, obtain the cotton seedling image in said field.
10. the method for the cotton seedling of automatic extraction according to claim 9 is characterized in that, in the said step 4, further comprises:
Utilization fast area labelling method each cotton seedling of mark and weeds zone, and calculate each regional area;
Area to each cotton seedling and weeds zone sorts from big to small;
From the area sequence after the ordering, remove the cotton seedling area identical with said cotton seedling strain number after, ask for the average of remaining each region area, and this average is wiped the area threshold of algorithm as particle;
According to said area threshold, wipe area less than the weeds of said area threshold zone, be changed to the background of black to these zones, obtain the cotton seedling image in said field.
11. a device that extracts cotton seedling automatically is characterized in that, comprising:
The background segment module is used for utilizing green plants and soil color characteristic to carry out background segment to cotton seedling field coloured image;
Cotton seedling band locating module connects said background segment module, is used for the green plants to obtaining after the background segment, utilizes the position feature of cotton seedling line-spacing to carry out cotton seedling band location;
Individual plant cotton seedling location and strain counting number module connect said cotton seedling band locating module, are used for the cotton seedling band to being located, and utilize the position feature of cotton seedling spacing in the rows to carry out individual plant cotton seedling location and strain counting number;
The cotton seedling image collection module in field connects said individual plant cotton seedling location and strain counting number module, and the shape facility that is used for counting according to cotton seedling strain cotton seedling of utilization and weeds carries out the extraction of the cotton seedling of individual plant, obtains field cotton seedling image.
12. the device of the cotton seedling of automatic extraction according to claim 11 is characterized in that said background segment module comprises:
The gradation conversion module is used for converting said cotton seedling field coloured image the gray level image of 8bit into according to ultra green color threshold index;
The two-value modular converter connects said gradation conversion module, and the greyscale image transitions that is used for said 8bit is a bianry image, and green plants is the prospect of white, and soil is the background of black.
13. the device of the cotton seedling of automatic extraction according to claim 12 is characterized in that said cotton seedling band locating module comprises:
Green plants vertical projection module is used for based on said bianry image, according to the substantially invariable position feature of cotton seedling line-spacing, obtains the vertical direction pixel histogram of said green plants through the vertical projection of said green plants;
The center determination module connects said green plants vertical projection module, is used for confirming the center of said cotton seedling band according to the histogrammic maximal value of said vertical direction pixel;
The boundary segmentation threshold determination module connects said green plants vertical projection module, is used for confirming the boundary segmentation threshold value of said cotton seedling band according to the histogrammic minimum value of said vertical direction pixel;
Cotton seedling band up-and-down boundary determination module; Connect said center determination module, said boundary segmentation threshold determination module; Be used for boundary segmentation threshold value, begin respectively to search for the up-and-down boundary of said cotton seedling band to both sides up and down by the center of said cotton seedling band according to said cotton seedling band;
First weeds zone filtering module connects said cotton seedling band up-and-down boundary determination module, is used for the outer weeds zone of up-and-down boundary of the said cotton seedling band of filtering, is changed to these weeds zones the background of black.
14. the device of the cotton seedling of automatic extraction according to claim 13 is characterized in that said cotton seedling band locating module also comprises:
The up-and-down boundary correcting module connects said center determination module, said cotton seedling band up-and-down boundary determination module, is used for according to the up-and-down boundary of said cotton seedling band and the distance of center, revises up-and-down boundary.
15. the device according to claim 12, the cotton seedling of 13 or 14 described automatic extractions is characterized in that said individual plant cotton seedling location and strain counting number module comprise:
Cotton seedling band horizontal projection module is used for based on said bianry image, according to the substantially invariable position feature of cotton seedling spacing in the rows, through the horizontal projection of said cotton seedling band, obtains the horizontal direction pixel histogram of said cotton seedling band;
Threshold determination module is counted in the top strain, connects said cotton seedling band horizontal projection module, is used for according to the histogrammic maximal value of said horizontal direction pixel, confirms that the top strain counts threshold value;
Threshold determination module is counted in the bottom strain, connects said cotton seedling band horizontal projection module, is used for according to the histogrammic minimum value of said horizontal direction pixel, confirms that the bottom strain counts threshold value;
First left and right sides intersection point is asked for module, connects said cotton seedling band horizontal projection module, threshold determination module is counted in the strain of said top, is used to ask for first left and right sides intersection point that threshold line and said horizontal direction pixel histogram curve are counted in the strain of said top;
Second left and right sides intersection point is asked for module, connects said cotton seedling band horizontal projection module, threshold determination module is counted in the strain of said bottom, is used to ask for second left and right sides intersection point that threshold line and said horizontal direction pixel histogram curve are counted in the strain of said bottom;
Cotton seedling strain number and border, left and right sides determination module; Connect that said first left and right sides intersection point is asked for module, said second left and right sides intersection point is asked for module; Be used for by said first left and right sides intersection point and said second left and right sides intersection point, count the border, the left and right sides of strain number with the cotton seedling of each individual plant of said bianry image middle cotton seedling;
Second weeds zone filtering module connects said cotton seedling strain number and border, left and right sides determination module, is used for each cotton seedling plant right sides of filtering weeds zone out-of-bounds, is changed to these weeds zones the background of black.
16. the device of the cotton seedling of automatic extraction according to claim 15 is characterized in that, said individual plant cotton seedling location and strain counting number module also comprise:
Correcting module is counted in cotton seedling strain, connects said cotton seedling strain number and border, left and right sides determination module, is used for the width according to the cotton seedling of each individual plant, revises the strain number of cotton seedling.
17. the device according to claim 12,13, the cotton seedling of 14 or 16 described automatic extractions is characterized in that the cotton seedling image collection module in said field comprises:
Cotton seedling and weeds zone acquisition module are used to use each cotton seedling of fast area labelling method mark and weeds zone, and calculate each regional area;
Cotton seedling and weeds region ordering module connect said cotton seedling and weeds zone acquisition module, are used for the area in each cotton seedling and weeds zone is sorted from big to small;
The area threshold acquisition module; Connect said cotton seedling and weeds region ordering module, be used for from the ordering after the area sequence, remove the cotton seedling area identical with said cotton seedling strain number after; Ask for the average of remaining each region area, and this average is wiped the area threshold of algorithm as particle;
The 3rd weeds zone filtering module; Connect said cotton seedling and weeds zone acquisition module, said area threshold acquisition module; Be used for according to said area threshold; Wipe area less than the weeds of said area threshold zone, be changed to the background of black to these weeds zones, obtain the cotton seedling image in said field.
CN2010102365420A 2010-07-22 2010-07-22 Method and device for automatically extracting cotton seeds Pending CN102339378A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102365420A CN102339378A (en) 2010-07-22 2010-07-22 Method and device for automatically extracting cotton seeds

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102365420A CN102339378A (en) 2010-07-22 2010-07-22 Method and device for automatically extracting cotton seeds

Publications (1)

Publication Number Publication Date
CN102339378A true CN102339378A (en) 2012-02-01

Family

ID=45515103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102365420A Pending CN102339378A (en) 2010-07-22 2010-07-22 Method and device for automatically extracting cotton seeds

Country Status (1)

Country Link
CN (1) CN102339378A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103903252A (en) * 2012-12-28 2014-07-02 中国农业机械化科学研究院 Automatic cotton field pest situation monitoring device and automatic cotton field pest situation monitoring method
CN103900498A (en) * 2012-12-28 2014-07-02 中国农业机械化科学研究院 Automatic cotton field seedling situation detection method and detection device thereof
CN106503695A (en) * 2016-12-02 2017-03-15 汕头大学 A kind of tobacco plant identification and method of counting based on Aerial Images
CN107437253A (en) * 2017-08-07 2017-12-05 江西农业大学 A kind of preprocess method of the drilling crop row extraction based on vanishing point
CN107490579A (en) * 2016-06-09 2017-12-19 本田技研工业株式会社 Defect detecting method and its equipment
CN109197275A (en) * 2018-10-18 2019-01-15 广州极飞科技有限公司 The recognition methods of weeds type and device, the determination method for being administered information
CN116823918A (en) * 2023-08-30 2023-09-29 北京市农林科学院信息技术研究中心 Crop seedling number measuring method, device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1936919A (en) * 2005-09-23 2007-03-28 中国农业机械化科学研究院 Method for automatically identifying field weeds in crop seeding-stage using site and grain characteristic

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1936919A (en) * 2005-09-23 2007-03-28 中国农业机械化科学研究院 Method for automatically identifying field weeds in crop seeding-stage using site and grain characteristic

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
毛文华: "基于机器视觉的田间杂草识别技术研究", 《中国农业大学博士学位论文》 *
毛文华等: "基于机器视觉的苗期杂草实时分割算法", 《农业机械学报》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103903252A (en) * 2012-12-28 2014-07-02 中国农业机械化科学研究院 Automatic cotton field pest situation monitoring device and automatic cotton field pest situation monitoring method
CN103900498A (en) * 2012-12-28 2014-07-02 中国农业机械化科学研究院 Automatic cotton field seedling situation detection method and detection device thereof
CN103900498B (en) * 2012-12-28 2016-08-03 中国农业机械化科学研究院 A kind of cotton field automatic detection method of the growth of cereal crop seedlings and detection device thereof
CN107490579A (en) * 2016-06-09 2017-12-19 本田技研工业株式会社 Defect detecting method and its equipment
CN106503695A (en) * 2016-12-02 2017-03-15 汕头大学 A kind of tobacco plant identification and method of counting based on Aerial Images
CN106503695B (en) * 2016-12-02 2019-07-09 汕头大学 A kind of tobacco plant identification and method of counting based on Aerial Images
CN107437253A (en) * 2017-08-07 2017-12-05 江西农业大学 A kind of preprocess method of the drilling crop row extraction based on vanishing point
CN109197275A (en) * 2018-10-18 2019-01-15 广州极飞科技有限公司 The recognition methods of weeds type and device, the determination method for being administered information
CN109197275B (en) * 2018-10-18 2021-05-07 东莞极飞无人机科技有限公司 Weed species identification method and device, and method for determining pesticide application information
CN116823918A (en) * 2023-08-30 2023-09-29 北京市农林科学院信息技术研究中心 Crop seedling number measuring method, device, electronic equipment and storage medium
CN116823918B (en) * 2023-08-30 2023-12-22 北京市农林科学院信息技术研究中心 Crop seedling number measuring method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
Fu et al. A novel image processing algorithm to separate linearly clustered kiwifruits
CN100416590C (en) Method for automatically identifying field weeds in crop seeding-stage using site and grain characteristic
CN102339378A (en) Method and device for automatically extracting cotton seeds
CN101539531B (en) Rice leaf blast detection and classification method based on multi-spectral image processing
CN102564593B (en) Plant growth condition monitoring system based on compute vision and internet of things
CN106688705A (en) Intelligent planting greenhouse and monitoring method used for same
CN110163138B (en) Method for measuring and calculating wheat tillering density based on multispectral remote sensing image of unmanned aerial vehicle
CN101859375B (en) Method for recognizing inline crops and weeds of seedling stage in farmland
CN105987684A (en) Monocular vision-based agricultural vehicle navigation line detection system and method
CN106951836A (en) Crop cover degree extracting method based on priori threshold optimization convolutional neural networks
CN201600330U (en) System for recognizing and locating mature pineapples
CN106682639B (en) A kind of crop leaf portion abnormal image extracting method based on video surveillance
CN105719282B (en) A kind of orchard mcintosh image fruit branches and leaves area obtaining method
CN103530606A (en) Agricultural machine navigation path extraction method under weed environment
CN114818909B (en) Weed detection method and device based on crop growth characteristics
Ma et al. Automatic detection of crop root rows in paddy fields based on straight-line clustering algorithm and supervised learning method
CN114067207A (en) Vegetable seedling field weed detection method based on deep learning and image processing
Li et al. Image detection and verification of visual navigation route during cotton field management period
CN102542560A (en) Method for automatically detecting density of rice after transplantation
CN103020595B (en) Based on crops-weed identification and the localization method of three-dimensional time-of-flight method imaging
CN113142170A (en) Unmanned aerial vehicle intelligent fixed-point weeding technology suitable for rice field
CN103226709B (en) A kind of network curtain image recognition method of fall webworm larvae
CN105447860A (en) Wheat seeding counting method
CN108037123A (en) A kind of hybrid paddy rice disc type sows performance parameter accurate detecting method
CN103679131B (en) Many seasons of based on sequential remote sensing image crop automatic recognition method

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: 20120201