CN117274812B - Tobacco plant counting method - Google Patents
Tobacco plant counting method Download PDFInfo
- Publication number
- CN117274812B CN117274812B CN202311291534.XA CN202311291534A CN117274812B CN 117274812 B CN117274812 B CN 117274812B CN 202311291534 A CN202311291534 A CN 202311291534A CN 117274812 B CN117274812 B CN 117274812B
- Authority
- CN
- China
- Prior art keywords
- vector
- vector surface
- preset
- updated
- eta
- 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.)
- Active
Links
- 235000002637 Nicotiana tabacum Nutrition 0.000 title claims abstract description 90
- 244000061176 Nicotiana tabacum Species 0.000 title claims abstract description 58
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000012545 processing Methods 0.000 claims abstract description 33
- 241000208125 Nicotiana Species 0.000 claims abstract description 32
- 238000006243 chemical reaction Methods 0.000 claims abstract description 8
- 239000000779 smoke Substances 0.000 claims abstract description 8
- 241000196324 Embryophyta Species 0.000 claims abstract description 5
- 101100518501 Mus musculus Spp1 gene Proteins 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 16
- 238000011835 investigation Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
- 230000004083 survival effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
- G06V20/188—Vegetation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/42—Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
- G06V20/17—Terrestrial scenes taken from planes or by drones
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Remote Sensing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of image processing, in particular to a tobacco plant counting method. The method comprises the following steps: acquiring a target tobacco field image P; acquiring a saturation waveband graph S corresponding to P; traversing S, if S' n Pixel values of (a) are less than delta 0 Then S 'in S' n Is updated to null; carrying out grid vector surface conversion processing on the updated S to obtain an initial vector surface pattern spot sequence B; traversing B, if B m Is smaller than sq 0 Will b m Add to the preset initial vector surface pattern spot set C 0 The method comprises the steps of carrying out a first treatment on the surface of the If u=M, then walk through C 0 For c i Performing vector surface turning point processing to obtain PO 1 The method comprises the steps of carrying out a first treatment on the surface of the Traversing PO 1 If po 1,i With PO (PO) 1 If the distance between other vector points is smaller than the preset distance threshold value, PO is added 1 Middle po 1,i Deleting to obtain updated PO 1 The method comprises the steps of carrying out a first treatment on the surface of the Will update PO 1 The number of medium vector points is taken as the number of smoke plants in P. The invention improves the accuracy of counting tobacco plants.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a tobacco plant counting method.
Background
The tobacco plant count is a basic index in tobacco monitoring evaluation, can reflect the information of planting density, survival rate, growth vigor and the like of tobacco, and provides scientific basis for tobacco production. The traditional tobacco strain counting method mainly comprises two types: the first is a manual field investigation method, i.e. the field investigation is carried out by professionals to the field for sampling or comprehensive investigation, and the number of tobacco plants is recorded; the second is an image-based automatic counting method. Compared with the first method, the second method reduces the occupation of human resources, but if the time for shooting the tobacco field is later, the situation that the leaves of adjacent tobacco plants are mutually blocked in the shot tobacco field image easily causes the situation that the tobacco plant counting result is inaccurate.
Disclosure of Invention
The invention aims to provide a tobacco plant counting method which is used for improving the accuracy of tobacco plant counting.
According to the invention, a method for counting tobacco plants comprises the following steps:
s100, acquiring a target tobacco field image P, wherein P is a visible light image, and P= (a) 1 ,a 2 ,…,a n ,…,a N ),a n The value range of N is 1 to N, and N is the number of the pixel points included by P.
S200, acquiring a saturation waveband graph S corresponding to P, wherein S= (S' 1 ,s’ 2 ,…,s’ n ,…,s’ N ),s’ n For the nth pixel point included in S, S' n The pixel value of (a) is a n Corresponding saturation.
S300, traversing S, if S' n Is less than a preset initial saturation threshold delta 0 Then S 'in S' n Is updated to be empty.
S400, performing grid-to-vector surface processing on the updated S to obtain an initial vector surface pattern spot sequence B, B= (B) 1 ,b 2 ,…,b m ,…,b M ),b m In order to perform grid-to-vector surface processing on the updated S, the M-th vector surface pattern spot is obtained, the value range of M is 1 to M, and M is the number of vector surface pattern spots obtained by performing grid-to-vector surface processing on the updated S.
S500, traversing B, if B m Is smaller than a preset area threshold sq 0 Will b m Add to the preset initial vector surface pattern spot set C 0 Obtaining C 0 ={c 1 ,c 2 ,…,c i, …,c u },c i Is added to C for the ith 0 I has a value ranging from 1 to u, u being added to C 0 Vector surface patch(s)Is the number of (3); c (C) 0 Is initialized to an empty set.
S600, if u=m, then S700 is entered.
S700, traversing C 0 For c i Performing vector surface turning point processing to obtain a first vector point set PO 1 ,PO 1 ={po 1,1 ,po 1,2 ,…,po 1,i ,…,po 1,u },po 1,i To pair c i Vector points obtained by performing vector surface turning processing are provided.
S800, traversing PO 1 If po 1,i With PO (PO) 1 If the distance between other vector points is smaller than the preset distance threshold value, PO is added 1 Middle po 1,i Deleting to obtain updated PO 1 。
S900, updated PO 1 The number of medium vector points is taken as the number of smoke plants in P.
The invention has at least the following beneficial effects:
according to the method, a saturation band diagram corresponding to a target tobacco field image is updated according to a preset initial saturation threshold value, a pixel value, of which the saturation is smaller than the preset initial saturation threshold value, in the saturation band diagram corresponding to the target tobacco field image is set to be empty in the updating process, the pixel points, of which the saturation is smaller than the preset initial saturation threshold value, in the saturation band diagram corresponding to the target tobacco field image are initially judged to be non-tobacco plant pixel points, on the basis, grid vector surface conversion processing is carried out on updated S, an initial vector surface diagram spot sequence is obtained, if the area of each vector surface diagram spot in the sequence is smaller than the preset area threshold value, the preset area threshold value represents the maximum value of the vector surface diagram spot corresponding to a single tobacco plant, and therefore the fact that each vector surface diagram spot in the sequence corresponds to the single tobacco plant can be judged; on the basis, in order to avoid the situation that a single tobacco plant corresponds to a plurality of vector surface image spots, the invention acquires the vector point corresponding to each vector surface image spot, acquires the distance between each vector point and other vector points, deletes the vector point if the distance between a certain vector point and other vector points is smaller than a preset distance threshold value, and takes the number of the final vector points as the number of the tobacco plants corresponding to the target tobacco field image. According to the method, the condition that adjacent tobacco plants belong to the same vector surface pattern spots due to the mutual shielding of the blades of the adjacent tobacco plants is considered, the number of the vector surface pattern spots is not used as the number of the tobacco plants, the problem that the tobacco plant count is inaccurate due to the mutual shielding of the blades of the adjacent tobacco plants is solved, and the accuracy of the obtained tobacco plant number is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for counting tobacco plants according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
According to the present invention, there is provided a method of counting tobacco plants, as shown in fig. 1, comprising:
s100, acquiring a target tobacco field image P, wherein P is a visible light image, and P= (a) 1 ,a 2 ,…,a n ,…,a N ),a n The value range of N is 1 to N, and N is the number of the pixel points included by P.
Those skilled in the art will appreciate that any method of obtaining a visible light image in the prior art falls within the scope of the present invention. The unmanned aerial vehicle remote sensing has the advantages of high resolution, short revisit period, low data acquisition cost, flexible operation and the like, and preferably, the target tobacco field image P is obtained through unmanned aerial vehicle shooting.
Optionally, the present invention further includes, before S100:
s10, acquiring a field image set DP to be determined, wherein DP= { DP 1 ,dp 2 ,…,dp t ,…,dp T },dp t For the t-th field image to be determined in DP, DP t =(dp t,1 ,dp t,2 ,…,dp t,k ,…,dp t,w ),dp t,k Is dp t K is in the range of 1 to w, and w is dp t The value range of T is 1 to T, and T is the number of field images to be judged in DP.
Optionally, the DP is a set of images obtained by dividing an initial visible light image by using a SAM (Segment Anything Model) model, where the initial visible light image is a visible light image of a region with a larger range, and optionally, the initial visible light image is obtained by stitching multiple frame images captured by an unmanned aerial vehicle.
S20, traversing the DP to obtain the DP t Corresponding first sequence RG t ,RG t =(rg t,1 ,rg t,2 ,…,rg t,k ,…,rg t,w ),rg t,k Is dp t,k Red band to green band.
S30, traversing the DP to obtain the DP t Corresponding characteristic value fe t ,fe t =(∑ w k=1 rg t,k )/w。
S40, traversing DP, if DP t Corresponding characteristic value fe t Belonging to the preset characteristic value range, dp is determined t And adding the preset tobacco field image set, and initializing the preset tobacco field image set as an empty set.
In this embodiment, the preset characteristic value range is an empirical value, when dp t Corresponding characteristic value fe t Judging dp when the value belongs to the preset characteristic value range t Is a tobacco field image; otherwise, determine dp t Is a non-tobacco field image.
S50, judging any image in a preset tobacco field image set as a target tobacco field image P.
S200, acquiring a saturation waveband graph S corresponding to P, wherein S= (S' 1 ,s’ 2 ,…,s’ n ,…,s’ N ),s’ n For the nth pixel point included in S, S' n The pixel value of (a) is a n Corresponding saturation.
Those skilled in the art will appreciate that any method of obtaining the saturation of a pixel according to the RGB values of the pixel in the prior art falls within the scope of the present invention.
S300, traversing S, if S' n Is less than a preset initial saturation threshold delta 0 Then S 'in S' n Is updated to be empty.
The initial saturation threshold delta in this embodiment 0 As an empirical value, the present embodiment intends to be based on the initial saturation threshold δ 0 And distinguishing the pixel points of the tobacco plants in the S from the pixel points of the non-tobacco plants. In this embodiment, the pixel value is updated to be empty, that is, the pixel value is assigned as nodata.
S400, performing grid-to-vector surface processing on the updated S to obtain an initial vector surface pattern spot sequence B, B= (B) 1 ,b 2 ,…,b m ,…,b M ),b m In order to perform grid-to-vector surface processing on the updated S, the M-th vector surface pattern spot is obtained, the value range of M is 1 to M, and M is the number of vector surface pattern spots obtained by performing grid-to-vector surface processing on the updated S.
Those skilled in the art will appreciate that any method of grid inversion vector surface known in the art falls within the scope of the present invention.
S500, traversing B, if B m Is smaller than a preset area threshold sq 0 Will b m Add to the preset initial vector surface pattern spot set C 0 Obtaining C 0 ={c 1 ,c 2 ,…,c i, …,c u },c i Is added to C for the ith 0 I has a value ranging from 1 to u, u being added to C 0 The number of vector surface patches; c (C) 0 Is initialized to an empty set.
As a first alternative embodiment sq 0 Is an empirical value.
As a second preferred embodiment, sq 0 The acquisition process of (1) comprises:
s510, acquiring an initial vector surface patch area sequence SQ, SQ= (SQ) 1 ,sq 2 ,…,sq m ,…,sq M ),sq m B is m Is a part of the area of the substrate.
S520, rearranging the areas of the vector surface patches in the SQ to obtain rearranged vector surface patch area sequences SQ ', SQ' = (SQ '' 1 ,sq’ 2 ,…,sq’ m ,…,sq’ M ),sq’ m The area of the m-th small vector surface patch in SQ; the second variable z=1 is set.
In this embodiment, the areas of the SQ' are arranged in order from small to large, the area of the first small vector surface patch in the SQ is the area of the smallest vector surface patch in the SQ, the area of the second small vector surface patch in the SQ is the area of the next smallest vector surface patch in the SQ, and so on, the area of the M-1 th small vector surface patch in the SQ is the area of the next largest vector surface patch in the SQ, and the area of the M-th small vector surface patch in the SQ is the area of the largest vector surface patch in the SQ.
S530, obtaining sq' z Vector points and sq 'corresponding to corresponding vector surface patches' z Minimum value d of distance between corresponding other vector points z,min ;sq’ z The corresponding other vector point is the division sq 'in B' z Vector points corresponding to other vector surface patches except for the corresponding vector surface patch.
S540, if d z,min If the distance is smaller than the preset distance threshold, z=z+1, repeating S530 until d z,min And the distance is larger than or equal to a preset distance threshold.
S550, xsxsq' z Determined as sq 0 Xs is a preset coefficient, 1<xs≤2。
Xsxsq 'in this example' z Sq 'in (3)' z Sq 'corresponding to the latest z value' z 。
Preferably, xs=2. Determine 2 Xmin (SQ) as SQ 0 Can avoid single cigaretteThe method improves the accuracy of the tobacco plant counting obtained by the method under the condition that a single tobacco plant with a larger corresponding area cannot be judged as a single tobacco plant due to the difference of the areas of the vector surface image spots corresponding to the plants.
Sq determined according to the invention S510-S550 0 Considering the situation that a single tobacco plant corresponds to a plurality of vector surface pattern spots, only when the distance between a vector point corresponding to a vector surface pattern spot corresponding to a certain area in SQ and a vector point corresponding to any other vector surface pattern spot is equal to or more than a preset distance threshold value, and the area in SQ is the minimum area in the areas meeting the above conditions (namely, the distance between the vector point corresponding to the corresponding vector surface pattern spot and the vector point corresponding to any other vector surface pattern spot is equal to or more than the preset distance threshold value), the area is taken as the minimum value of the vector surface pattern spot corresponding to the single tobacco plant, and the xs times of the area is determined as SQ in consideration of the fact that the growth conditions of the single tobacco plant in a tobacco field are different and not big 0 Based on the sq 0 Whether a certain vector surface pattern spot corresponds to a single tobacco plant or not can be accurately judged, and the accuracy of the tobacco plant counting obtained by the invention is improved.
S600, if u=m, then S700 is entered.
S700, traversing C 0 For c i Performing vector surface turning point processing to obtain a first vector point set PO 1 ,PO 1 ={po 1,1 ,po 1,2 ,…,po 1,i ,…,po 1,u },po 1,i To pair c i Vector points obtained by performing vector surface turning processing are provided.
Those skilled in the art will appreciate that any method of vector surface to vector point in the prior art falls within the scope of the present invention.
S800, traversing PO 1 If po 1,i With PO (PO) 1 If the distance between other vector points is smaller than the preset distance threshold value, PO is added 1 Middle po 1,i Deleting to obtain updated PO 1 。
PO in this example 1 Other vector points in (a) refer to PO 1 Middle removing po 1,i Other vector points.
In this example, PO is used 1 The distance between two vector points is obtained after all the vector points are placed in the same layer.
If po 1,i With PO (PO) 1 If the distance between certain vector points in other vector points is smaller than the preset distance threshold value, PO is added 1 Middle po 1,i Deleting to obtain updated PO 1 The method comprises the steps of carrying out a first treatment on the surface of the Traversing PO 1 If PO is in the process of 1 Is updated, traversing is the updated PO 1 . Thus, the PO is traversed 1 Thereafter, the updated PO is obtained 1 The distance between any two vector points is greater than or equal to the preset distance threshold, and the embodiment judges the updated PO 1 Each vector point of (2) corresponds to a single tobacco plant.
Optionally, the preset distance threshold is an empirical value, and the preset distance threshold is obtained through a user input mode, and corresponds to the minimum distance between two adjacent tobacco plants when the tobacco plants are planted manually.
S900, updated PO 1 The number of medium vector points is taken as the number of smoke plants in P.
According to the method, a saturation band diagram corresponding to a target tobacco field image is updated according to a preset initial saturation threshold value, a pixel value, of which the saturation is smaller than the preset initial saturation threshold value, in the saturation band diagram corresponding to the target tobacco field image is set to be empty in the updating process, the pixel points, of which the saturation is smaller than the preset initial saturation threshold value, in the saturation band diagram corresponding to the target tobacco field image are initially judged to be non-tobacco plant pixel points, on the basis, grid vector surface conversion processing is carried out on updated S, an initial vector surface diagram spot sequence is obtained, if the area of each vector surface diagram spot in the sequence is smaller than the preset area threshold value, the preset area threshold value represents the maximum value of the vector surface diagram spot corresponding to a single tobacco plant, and therefore the fact that each vector surface diagram spot in the sequence corresponds to the single tobacco plant can be judged; on the basis, in order to avoid the situation that a single tobacco plant corresponds to a plurality of vector surface image spots, the invention acquires the vector point corresponding to each vector surface image spot, acquires the distance between each vector point and other vector points, deletes the vector point if the distance between a certain vector point and other vector points is smaller than a preset distance threshold value, and takes the number of the final vector points as the number of the tobacco plants corresponding to the target tobacco field image. According to the method, the condition that adjacent tobacco plants belong to the same vector surface pattern spots due to the mutual shielding of the blades of the adjacent tobacco plants is considered, the number of the vector surface pattern spots is not used as the number of the tobacco plants, the problem that the tobacco plant count is inaccurate due to the mutual shielding of the blades of the adjacent tobacco plants is solved, and the accuracy of the obtained tobacco plant number is improved.
In this embodiment, S600 further includes: if u < M, the first variable η=1 is set and S610 is entered.
S610, obtaining a saturation band image S obtained by performing the eta clipping processing on S η The η -th clipping process includes: updating the pixel value of the eta target pixel point in S to be null, wherein the eta target pixel point in S is sigma η-1 ρ=0 C ρ In the corresponding pixel point in S, the value range of rho is 0 to eta-1, and when rho=0, C ρ A preset initial vector surface pattern spot set; c when ρ is not less than 1 ρ Is a preset rho vector surface pattern spot set.
It should be noted that S refers to an un-updated S, i.e., S in S200.
Sigma in the present embodiment η-1 ρ=0 C ρ To C 0 、C 1 、…、C η-1 The process of performing an addition operation on the set is the prior art, and will not be described here.
As a specific embodiment, the first target pixel point in S is C 0 Corresponding pixel point in S, if C 0 ={c 1 ,c 2 ,c 3 Then C 0 The corresponding pixel point in S is c in S 1 、c 2 And c 3 Corresponding pixel point, c in S 1 Corresponding pixel point and c 1 Characterized by the same position in the geodetic coordinate system, c in S 2 Corresponding pixel point and c 2 Characterised by the same position in the geodetic systemC in S 3 Corresponding pixel point and c 3 The same position in the geodetic coordinate system is characterized.
S620, traversing S η If the pixel value of a certain pixel point is smaller than the preset eta saturation threshold delta η Will S η The pixel value of the pixel point is updated to be empty, delta η =δ 0 +ηxΔδ, Δδ is a preset saturation adjustment step, Δδ>0。
S630, for updated S η Performing grid vector surface conversion processing to obtain an eta vector surface pattern spot sequence B' η ,B’ η =(b’ η,1 ,b’ η,2 ,…,b’ η,λ(η) ,…, b’ η,φ(η) ),b’ η,λ(η) To updated S η The lambda (eta) vector surface image spots obtained by carrying out grid vector surface conversion processing have the value range of lambda (eta) from 1 to phi (eta), wherein phi (eta) is the updated S η And carrying out grid-to-vector surface processing to obtain the number of vector surface pattern spots.
S640, traversing B' η If b' η,λ(η) Is smaller than sq 0 Then b' η,λ(η) Add to preset eta vector surface pattern spot set C η Obtaining C η ={c’ η,1 ,c’ η,2 ,…,c’ η,ε(η), …,c’ η,ζ(η) },c’ η,ε(η) Is added to C for the epsilon (eta) th η The vector surface map patch of (C) has a value of ε (eta) ranging from 1 to ζ (eta), ζ (eta) being added to C η The number of vector surface patches; c (C) η Is initialized to an empty set; otherwise, will b' η,λ(η) Add to preset eta key set JH η ,JH η Is initialized to an empty set.
S650, if JH η If not, η=η+1, repeating S610-S640 until JH η Is an empty set.
S660, obtaining a target vector surface pattern spot set C ', C' =C η +∑ η-1 ρ=0 C ρ 。
Those skilled in the art will appreciate that the process of adding the set is known in the art, and will not be described in detail herein.
In this embodiment, the area of each vector surface patch in C' is smaller than sq 0 。
S670, traversing C ', and performing vector surface turning point processing on each vector surface image spot in C ' to obtain a second vector point set PO ', PO ' = { PO ' 1 ,po’ 2 ,…,po’ h ,…,po’ F },po’ h In order to perform vector surface turning point processing on the h vector surface image spots in the C ', the value range of h is 1 to F, and F is the number of the vector surface image spots in the C'.
Those skilled in the art will appreciate that any method of vector surface to vector point in the prior art falls within the scope of the present invention.
S680, traversing PO ', if PO' h The distance between the vector points and other vector points in PO ' is smaller than a preset distance threshold value, and PO ' in PO ' h Deleting to obtain updated PO'.
Other vector points in PO ' in this embodiment refer to the removal of PO ' in PO ' h Other vector points.
If po' h The distance between the vector point and one of other vector points in PO ' is smaller than a preset distance threshold value, and PO ' in PO ' h Deleting to obtain updated PO'; in traversing the PO ', if the PO ' is updated, the updated PO ' is traversed. Therefore, after traversing the PO ', the distance between any two vector points in the updated PO ' is greater than or equal to a preset distance threshold, and in the embodiment, each vector point in the updated PO ' is judged to correspond to a single tobacco plant.
S690, determining the number of vector points in the updated PO' as the number of tobacco plants in P.
The invention has vector surface pattern spots in B which are not added to C 0 In the case of (1), a saturation band image S is obtained in which the 1 st clipping process is performed on the saturation band image corresponding to the target tobacco field image 1 The image S 1 Is added to C 0 The pixel value of the pixel point corresponding to the vector surface map patch is calculatedSet to empty for the image S 1 The pixel value of each pixel point is combined with a first saturation threshold delta 1 Comparing the delta 1 Greater than an initial saturation threshold delta 0 Thereby, for updated S 1 After the grid-to-vector surface processing, B is not added to C 0 May be divided into vector surface patches or remain undivided if not appended to C in B 0 Is divided into vector surface pattern spots smaller than a preset area threshold value, then based on C 0 Middle vector surface patch and pair B is not appended to C 0 Each vector surface pattern spot obtained by dividing the vector surface pattern spots determines the number of the final tobacco plants; otherwise, executing a loop, continuously cutting the saturation wave band diagram corresponding to the target tobacco field image and increasing the saturation threshold until the saturation wave band diagram is not added to C in the B 0 The vector surface pattern spots of the tobacco plants are divided into vector surface pattern spots smaller than a preset area threshold value, and finally the number of the tobacco plants is determined. According to the invention, the condition that a single vector surface image spot in B corresponds to a plurality of tobacco plants due to smaller initial saturation threshold setting is considered, and the accuracy of the number of the acquired tobacco plants is improved.
While certain specific embodiments of the invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the invention. Those skilled in the art will also appreciate that many modifications may be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.
Claims (7)
1. A method of counting tobacco plants, comprising the steps of:
s100, acquiring a target tobacco field image P, wherein P is a visible light image, and P= (a) 1 ,a 2 ,…,a n ,…,a N ),a n The value range of N is 1 to N, and N is the number of the pixel points included by P;
s200, acquiring a saturation waveband graph S corresponding to P, wherein S= (S' 1 ,s’ 2 ,…,s’ n ,…,s’ N ),s’ n For the nth pixel point included in S, S' n The pixel value of (a) is a n Corresponding saturation;
s300, traversing S, if S' n Is less than a preset initial saturation threshold delta 0 Then S 'in S' n Is updated to null;
s400, performing grid-to-vector surface processing on the updated S to obtain an initial vector surface pattern spot sequence B, B= (B) 1 ,b 2 ,…,b m ,…,b M ),b m For the M-th vector surface pattern spot obtained by carrying out grid vector surface processing on the updated S, the value range of M is 1 to M, and M is the number of the vector surface pattern spots obtained by carrying out grid vector surface processing on the updated S;
s500, traversing B, if B m Is smaller than a preset area threshold sq 0 Will b m Add to the preset initial vector surface pattern spot set C 0 Obtaining C 0 ={c 1 ,c 2 ,…,c i, …,c u },c i Is added to C for the ith 0 I has a value ranging from 1 to u, u being added to C 0 The number of vector surface patches; c (C) 0 Is initialized to an empty set;
s600, if u=m, then enter S700;
s700, traversing C 0 For c i Performing vector surface turning point processing to obtain a first vector point set PO 1 ,PO 1 ={po 1,1 ,po 1,2 ,…,po 1,i ,…,po 1,u },po 1,i To pair c i Vector points obtained by vector surface turning point processing are carried out;
s800, traversing PO 1 If po 1,i With PO (PO) 1 If the distance between other vector points is smaller than the preset distance threshold value, PO is added 1 Middle po 1,i Deleting to obtain updated PO 1 ;
S900, updated PO 1 The number of medium vector points is taken as the number of smoke plants in P.
2. The method of smoke count of claim 1 wherein S600 further comprises: if u < M, setting a first variable η=1, and proceeding to S610;
s610, obtaining a saturation band image S obtained by performing the eta clipping processing on S η The η -th clipping process includes: updating the pixel value of the eta target pixel point in S to be null, wherein the eta target pixel point in S is sigma η-1 ρ=0 C ρ In the corresponding pixel point in S, the value range of rho is 0 to eta-1, and when rho=0, C ρ A preset initial vector surface pattern spot set; c when ρ is not less than 1 ρ A preset rho vector surface pattern spot set;
s620, traversing S η If the pixel value of a certain pixel point is smaller than the preset eta saturation threshold delta η Will S η The pixel value of the pixel point is updated to be empty, delta η =δ 0 +ηxΔδ, Δδ is a preset saturation adjustment step, Δδ>0;
S630, for updated S η Performing grid vector surface conversion processing to obtain an eta vector surface pattern spot sequence B' η ,B’ η =(b’ η,1 ,b’ η,2 ,…,b’ η,λ(η) ,…, b’ η,φ(η) ),b’ η,λ(η) To updated S η The lambda (eta) vector surface image spots obtained by carrying out grid vector surface conversion processing have the value range of lambda (eta) from 1 to phi (eta), wherein phi (eta) is the updated S η Carrying out grid vector surface conversion treatment to obtain the number of vector surface pattern spots;
s640, traversing B' η If b' η,λ(η) Is smaller than sq 0 Then b' η,λ(η) Add to preset eta vector surface pattern spot set C η Obtaining C η ={c’ η,1 ,c’ η,2 ,…,c’ η,ε(η), …,c’ η,ζ(η) },c’ η,ε(η) Is added to C for the epsilon (eta) th η The vector surface map patch of (C) has a value of ε (eta) ranging from 1 to ζ (eta), ζ (eta) being added to C η Vector of (2)The number of panel spots; c (C) η Is initialized to an empty set; otherwise, will b' η,λ(η) Add to preset eta key set JH η ,JH η Is initialized to an empty set;
s650, if JH η If not, η=η+1, repeating S610-S640 until JH η Is an empty set;
s660, obtaining a target vector surface pattern spot set C ', C' =C η +∑ η-1 ρ=0 C ρ ;
S670, traversing C ', and performing vector surface turning point processing on each vector surface image spot in C ' to obtain a second vector point set PO ', PO ' = { PO ' 1 ,po’ 2 ,…,po’ h ,…,po’ F },po’ h In order to perform vector surface turning point processing on the h vector surface image spots in the C ', the value range of h is 1 to F, and F is the number of the vector surface image spots in the C';
s680, traversing PO ', if PO' h The distance between the vector points and other vector points in PO ' is smaller than a preset distance threshold value, and PO ' in PO ' h Deleting to obtain updated PO';
s690, determining the number of vector points in the updated PO' as the number of tobacco plants in P.
3. A method of smoke counting according to claim 1, characterized in that sq 0 The acquisition process of (1) comprises:
s510, acquiring an initial vector surface patch area sequence SQ, SQ= (SQ) 1 ,sq 2 ,…,sq m ,…,sq M ),sq m B is m Is a part of the area of (2);
s520, rearranging the areas of the vector surface patches in the SQ to obtain rearranged vector surface patch area sequences SQ ', SQ' = (SQ '' 1 ,sq’ 2 ,…,sq’ m ,…,sq’ M ),sq’ m The area of the m-th small vector surface patch in SQ; setting a second variable z=1;
s530, obtaining sq' z Corresponding vector points and sq of corresponding vector surface image spots’ z Minimum value d of distance between corresponding other vector points z,min ;sq’ z The corresponding other vector point is the division sq 'in B' z Vector points corresponding to other vector surface image spots except the corresponding vector surface image spot;
s540, if d z,min If the distance is smaller than the preset distance threshold, z=z+1, repeating S530 until d z,min A preset distance threshold value or more;
s550, xsxsq' z Determined as sq 0 Xs is a preset coefficient, 1<xs≤2。
4. The method of smoke count of claim 1, further comprising, prior to S100:
s10, acquiring a field image set DP to be determined, wherein DP= { DP 1 ,dp 2 ,…,dp t ,…,dp T },dp t For the t-th field image to be determined in DP, DP t =(dp t,1 ,dp t,2 ,…,dp t,k ,…,dp t,w ),dp t,k Is dp t K is in the range of 1 to w, and w is dp t The value range of T is 1 to T, and T is the number of field images to be judged in DP;
s20, traversing the DP to obtain the DP t Corresponding first sequence RG t ,RG t =(rg t,1 ,rg t,2 ,…,rg t,k ,…,rg t,w ),rg t,k Is dp t,k A ratio of red band to green band;
s30, traversing the DP to obtain the DP t Corresponding characteristic value fe t ,fe t =(∑ w k=1 rg t,k )/w;
S40, traversing DP, if DP t Corresponding characteristic value fe t Belonging to the preset characteristic value range, dp is determined t Adding a preset tobacco field image set, and initializing the preset tobacco field image set as an empty set;
s50, judging any image in a preset tobacco field image set as a target tobacco field image P.
5. The method of claim 1, wherein P is captured by an unmanned aerial vehicle.
6. A method of smoke counting according to claim 3, wherein xs = 2.
7. The method of claim 1, wherein the predetermined distance threshold is a user entered value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311291534.XA CN117274812B (en) | 2023-10-08 | 2023-10-08 | Tobacco plant counting method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311291534.XA CN117274812B (en) | 2023-10-08 | 2023-10-08 | Tobacco plant counting method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117274812A CN117274812A (en) | 2023-12-22 |
CN117274812B true CN117274812B (en) | 2024-02-20 |
Family
ID=89217518
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311291534.XA Active CN117274812B (en) | 2023-10-08 | 2023-10-08 | Tobacco plant counting method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117274812B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105447859A (en) * | 2015-11-18 | 2016-03-30 | 扬州大学 | Field wheat aphid counting method |
CN105976386A (en) * | 2016-05-19 | 2016-09-28 | 重庆交通大学 | Pavement disease binary pattern boundary algorithm based on mutation point sorting |
CN106295661A (en) * | 2016-08-15 | 2017-01-04 | 北京林业大学 | The plant species identification method of leaf image multiple features fusion and device |
CN106503695A (en) * | 2016-12-02 | 2017-03-15 | 汕头大学 | A kind of tobacco plant identification and method of counting based on Aerial Images |
CN107016691A (en) * | 2017-04-14 | 2017-08-04 | 南京信息工程大学 | Moving target detecting method based on super-pixel feature |
CN110310274A (en) * | 2019-07-02 | 2019-10-08 | 河北农业大学 | A kind of plant flower quantity detection method |
CN112001910A (en) * | 2020-08-26 | 2020-11-27 | 中国科学院遗传与发育生物学研究所 | Method and device for automatically identifying number of plant ears, electronic equipment and storage medium |
CN114202687A (en) * | 2021-08-12 | 2022-03-18 | 昆明理工大学 | Automatic tobacco plant extraction and counting method and system based on unmanned aerial vehicle image |
-
2023
- 2023-10-08 CN CN202311291534.XA patent/CN117274812B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105447859A (en) * | 2015-11-18 | 2016-03-30 | 扬州大学 | Field wheat aphid counting method |
CN105976386A (en) * | 2016-05-19 | 2016-09-28 | 重庆交通大学 | Pavement disease binary pattern boundary algorithm based on mutation point sorting |
CN106295661A (en) * | 2016-08-15 | 2017-01-04 | 北京林业大学 | The plant species identification method of leaf image multiple features fusion and device |
CN106503695A (en) * | 2016-12-02 | 2017-03-15 | 汕头大学 | A kind of tobacco plant identification and method of counting based on Aerial Images |
CN107016691A (en) * | 2017-04-14 | 2017-08-04 | 南京信息工程大学 | Moving target detecting method based on super-pixel feature |
CN110310274A (en) * | 2019-07-02 | 2019-10-08 | 河北农业大学 | A kind of plant flower quantity detection method |
CN112001910A (en) * | 2020-08-26 | 2020-11-27 | 中国科学院遗传与发育生物学研究所 | Method and device for automatically identifying number of plant ears, electronic equipment and storage medium |
CN114202687A (en) * | 2021-08-12 | 2022-03-18 | 昆明理工大学 | Automatic tobacco plant extraction and counting method and system based on unmanned aerial vehicle image |
Also Published As
Publication number | Publication date |
---|---|
CN117274812A (en) | 2023-12-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111914834B (en) | Image recognition method, device, computer equipment and storage medium | |
CN110298211B (en) | River network extraction method based on deep learning and high-resolution remote sensing image | |
US20110288835A1 (en) | Data processing device, data processing method and program | |
JP2004348732A5 (en) | ||
WO2007149250A2 (en) | Remote sensing and probabilistic sampling based forest inventory method | |
CN112597870B (en) | Construction method of land cover classification model | |
EP1363235A1 (en) | Signal processing device | |
EP1887514B1 (en) | Signal processing device | |
CN112861810B (en) | Artificial forest planting time automatic detection method based on time sequence remote sensing observation data | |
CN111832828B (en) | Intelligent precipitation prediction method based on wind cloud No. four meteorological satellites | |
CN114022368A (en) | Pavement disease data enhancement method based on generation of countermeasure network | |
CN115331124A (en) | Invasive plant biomass estimation method based on unmanned aerial vehicle remote sensing | |
CN117274812B (en) | Tobacco plant counting method | |
CN111009179B (en) | Method and device for determining denudation thickness | |
CN117115664B (en) | Tobacco maturity judging method | |
CN111931698B (en) | Image deep learning network construction method and device based on small training set | |
CN108229467B (en) | Method and device for interpreting remote sensing image and electronic equipment | |
CN108564564A (en) | Based on the medical image cutting method for improving fuzzy connectedness and more seed points | |
CN110211109B (en) | Image change detection method based on deep neural network structure optimization | |
CN110070513B (en) | Radiation correction method and system for remote sensing image | |
CN116579521A (en) | Yield prediction time window determining method, device, equipment and readable storage medium | |
CN113506343B (en) | Color coordinate estimation method, system, device and medium based on multi-source data | |
JP4030318B2 (en) | Map data update device and map data update method | |
CN109726641B (en) | Remote sensing image cyclic classification method based on automatic optimization of training samples | |
CN113920079A (en) | Difficult sample mining method, system, terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |