CN109389139A - A kind of locust method of counting and device - Google Patents

A kind of locust method of counting and device Download PDF

Info

Publication number
CN109389139A
CN109389139A CN201710686810.0A CN201710686810A CN109389139A CN 109389139 A CN109389139 A CN 109389139A CN 201710686810 A CN201710686810 A CN 201710686810A CN 109389139 A CN109389139 A CN 109389139A
Authority
CN
China
Prior art keywords
region
locust
image
target connected
connected region
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
CN201710686810.0A
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.)
China Agricultural University
Original Assignee
China Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Agricultural University filed Critical China Agricultural University
Priority to CN201710686810.0A priority Critical patent/CN109389139A/en
Publication of CN109389139A publication Critical patent/CN109389139A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds

Abstract

The present invention provides a kind of locust method of counting and device, the method comprise the steps that S1, clusters locust image using Meanshift algorithm, carries out binary conversion treatment to the locust image after cluster, obtains the target connected region in the locust image;S2 judges that each target connected region is monomer region or adhesion region, is split to the adhesion region;The number of the monomer region is added with the areal after the adhesion region segmentation, obtains the number of locust in the locust image by S3.The present invention has the automatic counting for realizing locust, and the beneficial effect that the accuracy counted is high.

Description

A kind of locust method of counting and device
Technical field
The present invention relates to image processing application fields, more particularly, to a kind of locust method of counting and device.
Background technique
Locust is worldwide pest, and China migratory locusts generating region is related to 16 provinces, cities and regions at present, involves the county Jin200Ge, wherein County, 100, recurrence area, the occurring area of summer and autumn migratory locusts is up to 2500~30,000,000 mu;Native locust generation area is related to more than 20 It saves, involves the county Jin500Ge, wherein the county of serious generating region 200, occurring area is at 200,000,000 mu or more.Locust occurrence frequency in recent years Rise, the extent of injury aggravates.
Generation for the plague of locusts is different degrees of, and anti-locust station needs to transfer different grades of anti-locust resource, if transferred excessive Resource it will cause the wastings of resources.Therefore, the accuracy for improving the estimation of plague of locusts degree is critically important.Generally by locust density into The estimation of row plague of locusts degree.It in traditional method, needs manually to obtain the number of locust, locust is obtained according to locust number Density, efficiency are very low.Currently, some methods obtain locust number by locust image, but only simply use a kind of algorithm pair Locust image is split, and is counted according to the number of segmentation to locust, and the result precision of counting is low.
Summary of the invention
For the low efficiency for overcoming above-mentioned locust to count, the problem of accuracy the or it at least is partially solved the above problem, The present invention provides a kind of locust method of counting and devices.
According to the first aspect of the invention, a kind of locust method of counting is provided, comprising:
S1 clusters locust image using Meanshift algorithm, carries out two-value to the locust image after cluster Change processing, obtains each target connected region in the locust image;
S2 judges that each target connected region is monomer region or adhesion region, divides the adhesion region It cuts;
The number of the monomer region is added with the areal after the adhesion region segmentation, obtains the locust by S3 The number of locust in worm image.
Specifically, before the step S1 further include:
Original locust image is obtained using the image acquiring device for loading filter plate;
The original locust image is pre-processed using median filtering algorithm.
Specifically, binary conversion treatment is carried out to the locust image after cluster in the step S1, obtains the locust The step of each target connected region in image, specifically includes:
Gray level image is converted by the locust image after cluster, obtains the histogram of the gray level image;
Choose the histogram it is bimodal between the lowest point position gray value as gray threshold, according to the gray threshold Thresholding processing is carried out to the gray level image;
According to thresholding processing as a result, obtaining each target connected region in the locust image.
Specifically, between the step S1 and S2 further include:
Corrosion or expansion process are carried out to each target connected region.
Specifically, the step of each target connected region is monomer region or adhesion region is judged in the step S2 It specifically includes:
According to the area and perimeter of each target connected region, the form factor of each target connected region is obtained;
According to the form factor of each target connected region, form factor threshold value is obtained;
According to the form factor threshold value and preset area threshold value, judge each target connected region be monomer region also It is adhesion region.
Specifically, the shape factor S F of each target connected region is obtained by following formula:
Wherein, A indicates that the area of the target connected region, C indicate the perimeter of the target connected region.
Specifically, according to the form factor threshold value and preset area threshold value, judge that each target connected region is single The step of body region or adhesion region, specifically includes:
When the form factor of the target connected region is greater than the form factor threshold value and the target connected region When area is less than the preset area threshold value, the target connected region is monomer region;
When the form factor of the target connected region is less than or equal to the form factor threshold value and target connection When the area in region is greater than or equal to the preset area threshold value, the target connected region is adhesion region.
Specifically, the step of being split in the step S2 to the adhesion region specifically includes:
S21 selects a pixel as sub-pixel, by described kind in each adhesion region from the adhesion region The son region new as one;
S22 calculates the gray scale difference value between the sub-pixel and each neighborhood of the sub-pixel, and it is default poor to be less than The corresponding neighborhood of the gray scale difference value of value threshold value is merged into the new region where the sub-pixel of selection as sub-pixel;
S23, iteration execute step S22, until for each sub-pixel, the sub-pixel and the sub-pixel Gray scale difference value between each neighborhood is all larger than or is equal to the preset difference value threshold value;
S24, for remaining pixel in the adhesion region, iteration executes step S21-S23, until in the adhesion region Each pixel is divided into new region.
According to the second aspect of the invention, a kind of locust counting device is provided, comprising:
Acquiring unit schemes the locust after cluster for being clustered using Meanshift algorithm to locust image As carrying out binary conversion treatment, each target connected region in the locust image is obtained;
Cutting unit, for judging that each target connected region is monomer region or adhesion region, to described each viscous Even region is split;
Counting unit, for by the areal phase after the number of the monomer region and each adhesion region segmentation Add, obtains the number of locust in the locust image.
According to the third aspect of the invention we, a kind of non-transient computer readable storage medium is provided, for storing such as preceding institute State the computer program of method.
The present invention provides a kind of locust method of counting and device, this method gather locust by Meanshift algorithm Class, and binaryzation is carried out to the locust after cluster, so that target connected region is obtained, by judging each target connected region It is monomer region or adhesion region, the adhesion region is split, after monomer region and each adhesion region segmentation The number in region is added, and the number of locust in locust image is obtained, thus the standard realizing the automatic counting of locust, and counting Exactness is high.The result that locust counts can be used for estimating the density of locust, and then detect to the severity of the plague of locusts, be locust Prevention and treatment help is provided.
Detailed description of the invention
Fig. 1 is locust method of counting overall flow schematic diagram provided in an embodiment of the present invention;
Fig. 2 is locust counting device overall structure diagram provided in an embodiment of the present invention;
Fig. 3 is locust counting equipment structural schematic diagram provided in an embodiment of the present invention.
Specific embodiment
With reference to the accompanying drawings and examples, specific embodiments of the present invention will be described in further detail.Implement below Example is not intended to limit the scope of the invention for illustrating the present invention.
A kind of locust method of counting is provided in one embodiment of the invention, and Fig. 1 is locust provided in an embodiment of the present invention Worm method of counting overall flow schematic diagram.Generally, this method comprises: S1, carries out locust image using Meanshift algorithm Cluster carries out binary conversion treatment to the locust image after cluster, obtains each target connected region in the locust image; S2 judges that each target connected region is monomer region or adhesion region, is split to the adhesion region;S3, will The number of the monomer region is added with the areal after the adhesion region segmentation, obtains locust in the locust image Number.
Specifically, in S1, the Meanshift algorithm is a kind of iterative algorithm, i.e., first calculates the offset mean value of current point, Then it as new starting point, continues to move to, until meeting preset constraint condition.Use the Meanshift algorithm pair Locust image is clustered, and by color in the locust image, similar, closely located pixel combination is a region, thus will The locust image is divided into multiple connected regions.Binary conversion treatment is carried out to the locust image after cluster, i.e., it will be described Locust image is converted to two kinds of features of black and white, and one of feature is background, and another feature is target, to distinguish Target and background in the locust image out, using the corresponding connected region of the target as target connected region.The mesh It is designated as locust.In S2, judges that each target connected region is monomer region or adhesion region, include in the monomer region Single locust includes multiple locusts in the adhesion region.The adhesion region is split, by each adhesion region segmentation At multiple regions, each region after segmentation includes single locust.Can be used region growing algorithm to the adhesion region into Row segmentation, but such partitioning algorithm is not limited in the present embodiment.In S3, by the number of the monomer region and each adhesion area Areal after regional partition is added, and the sum of addition is the number of locust in the locust image.It can be to the monomer Region behind region and shown each adhesion region segmentation is marked, and counts the number of label as locust in the locust image Number.
The present embodiment clusters locust by Meanshift algorithm, and carries out binaryzation to the locust after cluster, from And target connected region is obtained, by judging that each target connected region is monomer region or adhesion region, to described viscous Even region is split, and monomer region is added with the number in the region after each adhesion region segmentation, obtains locust image The number of middle locust, to realize the automatic counting of locust, and the accuracy counted is high.The result that locust counts can be used for estimating The density of locust, and then the severity of the plague of locusts is detected, help is provided for the prevention and treatment of locust.
On the basis of the above embodiments, before step S1 described in the present embodiment further include: use the figure for loading filter plate As acquisition device obtains original locust image;The original locust image is pre-processed using median filtering algorithm.
Specifically, the original locust image can obtain in field, can also obtain under experimental situation.When testing When obtaining under environment, experimental material is got out, has configured experimental situation, sets the parameter of image acquiring device, such as described The time for exposure of image acquiring device is 30s, and aperture is adjusted to maximum etc..Described image acquisition device can for camera, mobile phone, Camera etc., but the present embodiment is not limited to these image acquiring devices.Described image acquisition device is mounted with filter plate, and selection is closed The filter plate of suitable wave band, keeps the difference between background and target as big as possible, such as wave band is the filter plate of 763nm.Pass through filter The original locust image that wave plate obtains is single band image, since uneven illumination is even, background border in the original locust image Gray value it is close with the gray value of locust target area, the effect of subsequent processing is influenced, so scheming to the original locust As carrying out median filtering to the gray level image of the original locust image, inhibiting local gray noise, increase before being handled Add the accuracy of image segmentation, to improve the accuracy of locust counting.
Based on any of the above embodiments, to the locust image after cluster in step S1 described in the present embodiment The step of carrying out binary conversion treatment, obtaining each target connected region in the locust image specifically includes: by the institute after cluster It states locust image and is converted into gray level image, obtain the histogram of the gray level image;Choose the histogram it is bimodal between paddy The gray value of bottom position carries out thresholding processing to the gray level image as gray threshold, according to the gray threshold;According to Thresholding processing as a result, obtaining each target connected region in the locust image.
Specifically, since the locust image that filter plate obtains is band image, the locust image after cluster is also wave Section image, converts gray level image for the locust image after cluster, obtains the histogram of the gray level image.Described in selection Histogram it is bimodal between the lowest point position gray value as gray threshold.According to the gray threshold to the locust after the cluster Worm image carries out thresholding processing, the function of the thresholding processing are as follows:
Wherein, (x, y) is the position of each pixel in the gray level image, and g (x, y) is each picture in the gray level image Plain thresholding treated gray value, f (x, y) are the gray value of each pixel in the gray level image, and T is the gray scale threshold Value.According to thresholding processing as a result, the prospect and target in the gray level image are distinguished, to obtain in the locust image Target connected region.
The present embodiment is obtained in the locust image by carrying out binary conversion treatment to the locust image after cluster Target connected region improves the accuracy of locust counting to accurately distinguish out the prospect and target in the locust image.
Based on any of the above embodiments, step S1 described in the present embodiment and between S2 further include: to described each Target connected region carries out corrosion or expansion process.
Specifically, by carrying out corrosion or expansion process to the target connected region, tiny on image make an uproar can be eliminated Sound, and smoothed image boundary more accurately obtain the target connected region in the locust image, to improve locust counting Accuracy.
Based on any of the above embodiments, each target connected region is judged in step S2 described in the present embodiment The step of being monomer region or adhesion region, specifically includes: according to the area and perimeter of each target connected region, obtaining The form factor of each target connected region;According to the form factor of each target connected region, form factor threshold is obtained Value;According to the form factor threshold value and preset area threshold value, judge that each target connected region is monomer region or glues Even region.
Specifically, the area and perimeter for obtaining each target connected region, according to the face of each target connected region Long-pending and perimeter obtains the form factor of each target connected region, and the form factor is for describing the target connected region The shape in domain.According to the difference between the monomer region and the form factor in adhesion region, form factor threshold value is obtained.It is described Form factor threshold value with the form factor of each connected region for being compared, to distinguish monomer region and adhesion region.It is default Area threshold be it is preset, for being compared with the area of each connected region, to distinguish monomer region and adhesion region. According to the form factor threshold value and the preset area threshold value, judge that each target connected region is monomer region or glues Even region.
The present embodiment judges that each target connected region is single by the form factor threshold value and preset area threshold value Body region or adhesion region improve the accuracy of locust counting to accurately distinguish monomer region and adhesion region.
On the basis of the above embodiments, the shape factor S F of each target connected region described in the present embodiment passes through following formula It obtains:
Wherein, A indicates that the area of the target connected region, C indicate the perimeter of the target connected region.
On the basis of the above embodiments, sentenced in the present embodiment according to the form factor threshold value and preset area threshold value The step of each target connected region is monomer region or adhesion region of breaking specifically includes: when the target connected region When form factor is less than the preset area threshold value greater than the area of the form factor threshold value and the target connected region, institute Stating target connected region is monomer region;When the form factor of the target connected region is less than or equal to the form factor threshold When the area of value and the target connected region is greater than or equal to the preset area threshold value, the target connected region is adhesion Region.
On the basis of the above embodiments, the step adhesion region being split in step S2 described in the present embodiment Suddenly specifically include: the step of being split in the step S2 to the adhesion region specifically includes: S21, for each adhesion Region selects a pixel as sub-pixel, using the seed as a new region from the adhesion region;S22 is calculated Gray scale difference value between the sub-pixel and each neighborhood of the sub-pixel will be less than the gray scale of preset difference value threshold value The corresponding neighborhood of difference is merged into the new region where the sub-pixel of selection as sub-pixel;S23, iteration execute step S22, until for each sub-pixel, the gray scale difference value between the sub-pixel and each neighborhood of the sub-pixel is big In or equal to the preset difference value threshold value;S24, for remaining pixel in the adhesion region, iteration executes step S21-S23, Until each pixel in the adhesion region is divided into new region.
It specifically, will be in judging result after judging each target connected region for monomer region or adhesion region Adhesion region be split.It is split in the present embodiment using region growing algorithm.Specifically, for each adhesion area Domain selects a pixel as sub-pixel from the adhesion region.Using the sub-pixel region new as one.It calculates Gray scale difference value between the sub-pixel and each neighborhood of the sub-pixel will be less than the gray scale of preset difference value threshold value The corresponding neighborhood of difference is merged into the new region as sub-pixel.The neighborhood of the sub-pixel can be neighbours domain Or eight neighborhood.The preset difference value threshold value be it is preset, for being compared with each gray scale difference value, to obtain new seed Pixel.Iteration executes the step of obtaining sub-pixel according to gray scale difference value, until for each sub-pixel, the seed picture Gray scale difference value between element and each neighborhood of the sub-pixel is all larger than or is equal to the preset difference value threshold value.It is obtained in each iteration New sub-pixel is taken, when no longer obtaining new sub-pixel, stops iteration.Thus by the sub-pixel distance with selection In region close, where the similar pixel combination to the sub-pixel of selection of feature.For remaining picture in the adhesion region Element continues to execute above-mentioned selection seed and combined operation, until all seeds are all divided into new region.It will be described The seed selected is as different new regions, the number in the region for selecting the number of seed as to divide.
The present embodiment is split the adhesion region in judging result by using region growing algorithm, the area after segmentation Include single target in domain, locust is counted according to the result after segmentation, improves the accuracy of technology.
A kind of locust counting device is provided in another embodiment of the present invention, and Fig. 2 is provided in an embodiment of the present invention Locust counting device overall structure diagram.Generally, which includes acquiring unit 1, cutting unit 2 and counting unit 3, In:
The acquiring unit 1 is for clustering locust image using Meanshift algorithm, to the locust after cluster Worm image carries out binary conversion treatment, obtains each target connected region in the locust image;The cutting unit 2 is for judging Each target connected region is monomer region or adhesion region, is split to each adhesion region;The counting is single Member 3 obtains the locust for the number of the monomer region to be added with the areal after each adhesion region segmentation The number of locust in image.
Specifically, the Meanshift algorithm is a kind of iterative algorithm, i.e., first calculates the offset mean value of current point, then It as new starting point, continues to move to, until meeting preset constraint condition.Described in 1 use of acquiring unit Meanshift algorithm clusters locust image, is by similar, the closely located pixel combination of color in the locust image One region, so that the locust image is divided into multiple connected regions.The locust after 1 pair of acquiring unit cluster Image carries out binary conversion treatment, i.e., the locust image is converted to two kinds of features of black and white, and one of feature is back Scape, another feature is target, so that the target and background in the locust image is distinguished, by the corresponding connection of the target Region is as target connected region.The target is locust.The cutting unit 2 judges that each target connected region is monomer Region or adhesion region include single locust in the monomer region, include multiple locusts in the adhesion region.Described point It cuts unit 2 to be split the adhesion region, each region packet by each adhesion region segmentation at multiple regions, after segmentation Containing single locust.Region growing algorithm can be used to be split the adhesion region, but be not limited in the present embodiment such Partitioning algorithm.The counting unit 3 is by the areal phase after the number of the monomer region and each adhesion region segmentation Add, the sum of addition is the number of locust in the locust image.It can be to the monomer region and shown each adhesion region Region after segmentation is marked, and counts number of the number of label as locust in the locust image.
The present embodiment clusters locust by Meanshift algorithm, and carries out binaryzation to the locust after cluster, from And target connected region is obtained, by judging that each target connected region is monomer region or adhesion region, to described viscous Even region is split, and monomer region is added with the number in the region after each adhesion region segmentation, obtains locust image The number of middle locust, to realize the automatic counting of locust, and the accuracy counted is high.
On the basis of the above embodiments, device described in the present embodiment further includes pretreatment unit, for using loading The image acquiring device of filter plate obtains original locust image;The original locust image is carried out using median filtering algorithm pre- Processing.
On the basis of the above embodiments, acquiring unit described in the present embodiment is specifically used for: by the locust after cluster Worm image is converted into gray level image, obtains the histogram of the gray level image;Choose the histogram it is bimodal between the lowest point position The gray value set carries out thresholding processing to the gray level image as gray threshold, according to the gray threshold;According to threshold value Change processing as a result, obtaining the target connected region in the locust image.
On the basis of the above embodiments, device described in the present embodiment further includes optimization unit, for the target Connected region carries out corrosion or expansion process.
On the basis of the above embodiments, cutting unit described in the present embodiment is specifically used for: being connected according to each target The area and perimeter in logical region, obtain the form factor of each target connected region;According to each target connected region Form factor obtains form factor threshold value;According to the form factor threshold value and preset area threshold value, judge that each target connects Logical region is monomer region or adhesion region.
On the basis of the above embodiments, the shape factor S F of each target connected region described in the present embodiment passes through following formula It obtains:
Wherein, A indicates that the area of the target connected region, C indicate the perimeter of the target connected region.
On the basis of the above embodiments, cutting unit described in the present embodiment is further specifically used for: when the target The form factor of connected region is greater than the form factor threshold value and the area of the target connected region is less than the default face When product threshold value, the target connected region is monomer region;When the form factor of the target connected region is less than or equal to institute When stating the area of form factor threshold value and the target connected region and being greater than or equal to the preset area threshold value, the target connects Logical region is adhesion region.
On the basis of the above embodiments, cutting unit described in the present embodiment is specifically used for: to institute in the step S2 It states the step of adhesion region is split to specifically include: for each adhesion region, a pixel is selected from the adhesion region As sub-pixel, using the seed region new as one;Calculate each neighbour of the sub-pixel Yu the sub-pixel The corresponding neighborhood of the gray scale difference value for being less than preset difference value threshold value is merged by the gray scale difference value between domain as sub-pixel New region where the sub-pixel of selection;The step of iteration execution is merged according to the gray scale difference value, until for institute Each sub-pixel is stated, the gray scale difference value between the sub-pixel and each neighborhood of the sub-pixel is all larger than or is equal to described pre- If difference threshold;For remaining pixel in the adhesion region, iteration is held selected seed and is closed according to the gray scale difference value And the step of, until each pixel in the adhesion region is divided into new region.
The present embodiment provides a kind of locust counting equipment, Fig. 3 is locust counting equipment structure provided in an embodiment of the present invention Schematic diagram, the equipment include: at least one processor 31, at least one processor 32 and bus 33;Wherein,
The processor 31 and memory 32 complete mutual communication by the bus 33;
The memory 32 is stored with the program instruction that can be executed by the processor 31, and the processor calls the journey Sequence instruction is able to carry out method provided by above-mentioned each method embodiment, for example, S1, using Meanshift algorithm to locust Worm image is clustered, and is carried out binary conversion treatment to the locust image after cluster, is obtained each mesh in the locust image Mark connected region;S2 judges that each target connected region is monomer region or adhesion region, carries out to the adhesion region Segmentation;The number of the monomer region is added by S3 with the areal after the adhesion region segmentation, obtains the locust figure The number of locust as in.
The present embodiment provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage medium Computer instruction is stored, the computer instruction makes the computer execute method provided by above-mentioned each method embodiment, example Such as include: S1, locust image is clustered using Meanshift algorithm, two-value is carried out to the locust image after cluster Change processing, obtains each target connected region in the locust image;S2 judges that each target connected region is monomer region Or adhesion region, is split the adhesion region;S3, by the number of the monomer region and the adhesion region segmentation Areal afterwards is added, and obtains the number of locust in the locust image.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light The various media that can store program code such as disk.
Locust counting equipment embodiment described above is only schematical, wherein described be used as separate part description Unit may or may not be physically separated, component shown as a unit may or may not be Physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to the actual needs Some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying In the case where creative labor, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation Method described in certain parts of example or embodiment.
Finally, the present processes are only preferable embodiment, it is not intended to limit the scope of the present invention.It is all Within the spirit and principles in the present invention, any modification, equivalent replacement, improvement and so on should be included in protection of the invention Within the scope of.

Claims (10)

1. a kind of locust method of counting characterized by comprising
S1 clusters locust image using Meanshift algorithm, carries out at binaryzation to the locust image after cluster Reason, obtains each target connected region in the locust image;
S2 judges that each target connected region is monomer region or adhesion region, is split to the adhesion region;
The number of the monomer region is added by S3 with the areal after the adhesion region segmentation, obtains the locust figure The number of locust as in.
2. locust method of counting according to claim 1, which is characterized in that before the step S1 further include:
Original locust image is obtained using the image acquiring device for loading filter plate;
The original locust image is pre-processed using median filtering algorithm.
3. locust method of counting according to claim 1 or 2, which is characterized in that the institute after cluster in the step S1 The step of locust image carries out binary conversion treatment, obtains each target connected region in the locust image is stated to specifically include:
Gray level image is converted by the locust image after cluster, obtains the histogram of the gray level image;
Choose the histogram it is bimodal between the lowest point position gray value as gray threshold, according to the gray threshold to institute It states gray level image and carries out thresholding processing;
According to thresholding processing as a result, obtaining each target connected region in the locust image.
4. locust method of counting according to claim 1 or 2, which is characterized in that between the step S1 and S2 further include:
Corrosion or expansion process are carried out to each target connected region.
5. locust method of counting according to claim 1 or 2, which is characterized in that judge each mesh in the step S2 The step of mark connected region is monomer region or adhesion region specifically includes:
According to the area and perimeter of each target connected region, the form factor of each target connected region is obtained;
According to the form factor of each target connected region, form factor threshold value is obtained;
According to the form factor threshold value and preset area threshold value, judge that each target connected region is monomer region or glues Even region.
6. locust method of counting according to claim 5, which is characterized in that the form factor of each target connected region SF is obtained by following formula:
Wherein, A indicates that the area of the target connected region, C indicate the perimeter of the target connected region.
7. locust method of counting according to claim 5, which is characterized in that according to the form factor threshold value and default face Product threshold value, judges that the step of each target connected region is monomer region or adhesion region specifically includes:
When the form factor of the target connected region is greater than the area of the form factor threshold value and the target connected region When less than the preset area threshold value, the target connected region is monomer region;
When the form factor of the target connected region is less than or equal to the form factor threshold value and the target connected region Area be greater than or equal to the preset area threshold value when, the target connected region be adhesion region.
8. locust method of counting according to claim 1 or 2, which is characterized in that the adhesion area in the step S2 The step of domain is split specifically includes:
S21 selects a pixel as sub-pixel from the adhesion region, the seed is made for each adhesion region For a new region;
S22 calculates the gray scale difference value between the sub-pixel and each neighborhood of the sub-pixel, will be less than preset difference value threshold The corresponding neighborhood of the gray scale difference value of value is merged into the new region where the sub-pixel of selection as sub-pixel;
S23, iteration executes step S22, until for each sub-pixel, each neighbour of the sub-pixel and the sub-pixel Gray scale difference value between domain is all larger than or is equal to the preset difference value threshold value;
S24, for remaining pixel in the adhesion region, iteration executes step S21-S23, until each of the adhesion region Pixel is all divided into new region.
9. a kind of locust counting device characterized by comprising
Acquiring unit, for being clustered using Meanshift algorithm to locust image, to the locust image after cluster into Row binary conversion treatment obtains the target connected region in the locust image;
Cutting unit, for judging that each target connected region is monomer region or adhesion region, to each adhesion area Domain is split;
Counting unit is obtained for the number of the monomer region to be added with the areal after each adhesion region segmentation Take the number of locust in the locust image.
10. a kind of non-transient computer readable storage medium, which is characterized in that the non-transient computer readable storage medium is deposited Computer instruction is stored up, the computer instruction makes the computer execute method as described in any of the claims 1 to 8.
CN201710686810.0A 2017-08-11 2017-08-11 A kind of locust method of counting and device Pending CN109389139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710686810.0A CN109389139A (en) 2017-08-11 2017-08-11 A kind of locust method of counting and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710686810.0A CN109389139A (en) 2017-08-11 2017-08-11 A kind of locust method of counting and device

Publications (1)

Publication Number Publication Date
CN109389139A true CN109389139A (en) 2019-02-26

Family

ID=65413948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710686810.0A Pending CN109389139A (en) 2017-08-11 2017-08-11 A kind of locust method of counting and device

Country Status (1)

Country Link
CN (1) CN109389139A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111178354A (en) * 2019-12-23 2020-05-19 深圳市铁汉生态环境股份有限公司 Mangrove pest monitoring method and system
CN111209824A (en) * 2019-12-30 2020-05-29 江苏省血吸虫病防治研究所 Method for monitoring ampullaria gigas by using unmanned aerial vehicle
CN111696127A (en) * 2020-06-02 2020-09-22 中国联合网络通信集团有限公司 Locust plague analysis and early warning system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777124A (en) * 2010-01-29 2010-07-14 北京新岸线网络技术有限公司 Method for extracting video text message and device thereof
JP2011212307A (en) * 2010-03-31 2011-10-27 Shiseido Co Ltd Cosmetic-applied skin evaluation device, cosmetic-applied skin evaluation method, and cosmetic-applied skin evaluation program
CN104484877A (en) * 2014-12-12 2015-04-01 山东大学 AML cell segmentation method based on Meanshift cluster and morphological operations
CN105095958A (en) * 2014-05-12 2015-11-25 浙江理工大学 Cocoon counting method
CN106447672A (en) * 2016-09-14 2017-02-22 燕山大学 Identifying and counting method for intersecting and shielded fish

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777124A (en) * 2010-01-29 2010-07-14 北京新岸线网络技术有限公司 Method for extracting video text message and device thereof
JP2011212307A (en) * 2010-03-31 2011-10-27 Shiseido Co Ltd Cosmetic-applied skin evaluation device, cosmetic-applied skin evaluation method, and cosmetic-applied skin evaluation program
CN105095958A (en) * 2014-05-12 2015-11-25 浙江理工大学 Cocoon counting method
CN104484877A (en) * 2014-12-12 2015-04-01 山东大学 AML cell segmentation method based on Meanshift cluster and morphological operations
CN106447672A (en) * 2016-09-14 2017-02-22 燕山大学 Identifying and counting method for intersecting and shielded fish

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
BYOUYO: "灰度图像二值化阈值选取常用方法", 《HTTPS://WENKU.BAIDU.COM/VIEW/52C113650B1C59EEF8C7B4F6.HTML?SXTS=1583830390201》 *
SUMMER_ZJU: "图像处理算法—区域生长法", 《HTTPS://BLOG.CSDN.NET/XIAQUNFENG123/ARTICLE/DETAILS/16971913》 *
李文勇 等: "基于形状因子和分割点定位的粘连害虫图像分割方法", 《农业工程学报》 *
高宏伟 等: "《电子制造装备技术》", 30 September 2015 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111178354A (en) * 2019-12-23 2020-05-19 深圳市铁汉生态环境股份有限公司 Mangrove pest monitoring method and system
CN111178354B (en) * 2019-12-23 2024-02-27 中节能铁汉生态环境股份有限公司 Mangrove pest monitoring method and system
CN111209824A (en) * 2019-12-30 2020-05-29 江苏省血吸虫病防治研究所 Method for monitoring ampullaria gigas by using unmanned aerial vehicle
CN111696127A (en) * 2020-06-02 2020-09-22 中国联合网络通信集团有限公司 Locust plague analysis and early warning system and method

Similar Documents

Publication Publication Date Title
CN109389139A (en) A kind of locust method of counting and device
CN109726649B (en) Remote sensing image cloud detection method and system and electronic equipment
US20120224789A1 (en) Noise suppression in low light images
CN109146891B (en) Hippocampus segmentation method and device applied to MRI and electronic equipment
CN109740721A (en) Wheat head method of counting and device
CN102999922A (en) Multi-cell automatic tracking method and system based on plurality of task ant systems
CN109685806A (en) Image significance detection method and device
CN110533632B (en) Image blurring tampering detection method and device, computer equipment and storage medium
CN105869175A (en) Image segmentation method and system
CN112102288A (en) Water body identification and water body change detection method, device, equipment and medium
CN104484600B (en) Intrusion detection method and device based on improved density clustering
US11120307B2 (en) Multi-task learning for dense object detection
CN116012364B (en) SAR image change detection method and device
CN109658378A (en) Hole discrimination method and system based on soil CT image
CN105354575B (en) Image binaryzation threshold value determines method in a kind of sea horizon detection
Deshmukh et al. Segmentation of microscopic images: A survey
CN108961316A (en) Image processing method, device and server
CN107392887A (en) A kind of heterogeneous method for detecting change of remote sensing image based on the conversion of homogeneity pixel
CN115223042A (en) Target identification method and device based on YOLOv5 network model
CN110110736A (en) Increment clustering method and device
CN105913451B (en) A kind of natural image superpixel segmentation method based on graph model
CN110288025A (en) Frequency spectrum sensing method, device and equipment based on information geometry and spectral clustering
CN114783021A (en) Intelligent detection method, device, equipment and medium for wearing of mask
CN113034387B (en) Image denoising method, device, equipment and medium
CN109934784A (en) Image enchancing method, device, equipment and computer readable 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190226