CN115393586B - Farmland breeding area dividing method, device, computer equipment and medium - Google Patents

Farmland breeding area dividing method, device, computer equipment and medium Download PDF

Info

Publication number
CN115393586B
CN115393586B CN202210994603.2A CN202210994603A CN115393586B CN 115393586 B CN115393586 B CN 115393586B CN 202210994603 A CN202210994603 A CN 202210994603A CN 115393586 B CN115393586 B CN 115393586B
Authority
CN
China
Prior art keywords
image
pixels
line set
transverse
longitudinal
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
Application number
CN202210994603.2A
Other languages
Chinese (zh)
Other versions
CN115393586A (en
Inventor
郭建明
张旭博
韩海燕
曲伟伟
李贺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aikenong Technology Co ltd
Original Assignee
Beijing Aikenong Technology Co ltd
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 Beijing Aikenong Technology Co ltd filed Critical Beijing Aikenong Technology Co ltd
Priority to CN202210994603.2A priority Critical patent/CN115393586B/en
Publication of CN115393586A publication Critical patent/CN115393586A/en
Application granted granted Critical
Publication of CN115393586B publication Critical patent/CN115393586B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/02Agriculture; Fishing; Mining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/70Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in livestock or poultry

Abstract

The invention discloses a farmland breeding area dividing method, a farmland breeding area dividing device, computer equipment and a farmland breeding medium, which are characterized in that an orthographic image is subjected to binarization processing after being obtained, the orthographic image is divided into a transverse image strip and a longitudinal image strip from the transverse direction and the longitudinal direction, transverse plant pixels and longitudinal plant pixels contained in the transverse image strip and the longitudinal image strip are connected into a longitudinal area dividing line and a transverse area dividing line, and finally the orthographic image is divided by using the longitudinal area dividing line and the transverse area dividing line, so that the problem that the conventional breeding area dividing method in the prior art is low in efficiency due to the fact that the conventional breeding area dividing method is mainly used for dividing areas by manual visual observation is solved, and in addition, the automatic or semi-automatic image identification dividing method is low in dividing effect precision, and the efficiency and precision of breeding area dividing are improved.

Description

Farmland breeding area dividing method, device, computer equipment and medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method, an apparatus, a computer device, and a medium for dividing a farmland breeding area.
Background
The breeding has important functions on the increase of the yield and the income of agriculture, and before the new variety is promoted in a large area, various tests such as the breeding yield in a small area are needed, and the breeding area is divided into a plurality of breeding cells for testing, thereby being beneficial to monitoring and managing the crop growth and collecting the crop information. Meanwhile, the division of crop breeding cells can provide data support for the monitoring and standardized management of the emergence rate of the breeding cells;
the existing breeding district dividing method is mainly divided by manual visual observation, although the precision is higher, the time and labor consumption efficiency is low, and in addition, some automatic or semi-automatic methods for dividing the areas by binarization or multi-scale identification of images exist in the industry, and in practical application, the dividing effect is often lower in precision and cannot meet the practical application requirements due to the influence of foreign matters of the same species and different spectrums and foreign matters of the same spectrum around the breeding district.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a method, an apparatus, a computer device, and a medium for dividing a breeding area in a farmland, which can improve efficiency and accuracy of the division of the breeding area;
a method for dividing farmland breeding areas, comprising:
Acquiring an orthographic image of a farmland;
performing binarization processing on the orthographic image, and then performing transverse division and longitudinal division respectively, so as to calculate transverse plant pixels contained in the transverse image strips and longitudinal plant pixels contained in the longitudinal image strips after a plurality of transverse image strips and longitudinal image strips are generated;
the transverse plant pixels are screened and then connected, so that a transverse area dividing line is generated, the transverse area dividing line is integrated into a transverse line set, the longitudinal plant pixels are screened and then connected, so that a longitudinal area dividing line is generated, and the longitudinal area dividing line is integrated into a longitudinal line set;
intersecting the longitudinal line set and the transverse line set to generate candidate regions, and combining the candidate regions to generate a breeding region;
the step of screening and connecting the transverse plant pixels to generate a transverse area dividing line, integrating the transverse area dividing line into a transverse line set, screening and connecting the longitudinal plant pixels to generate a longitudinal area dividing line, and integrating the longitudinal area dividing line into a longitudinal line set comprises the following steps:
A preset line set generation step is obtained, and the plant pixels are input into the preset line set generation step for calculation, so that a final line set is output, wherein the final line set is one of the longitudinal line set and the transverse line set;
judging whether the plant pixels calculated in the step of inputting the preset line set are longitudinal plant pixels or not, if yes, outputting the longitudinal line set by the step of inputting the preset line set;
judging whether the plant pixels calculated in the step of inputting the preset line set are transverse plant pixels or not, if yes, outputting the transverse line set by the step of inputting the preset line set;
the step of presetting the branching set specifically comprises the following steps:
acquiring plant pixels contained in each long side of the image strip, and marking the plant pixels as pixels to be combined;
connecting the pixels to be combined so as to generate long edges of the pixels;
acquiring pixel values of all pixel points in the long side of the pixel, wherein the pixel values are the number of the plant pixels contained in the pixel points;
judging whether the pixel value is larger than a preset threshold value, if so, setting the value of the pixel point corresponding to the pixel value as 1, and marking the pixel point as a pixel point to be connected;
Connecting the pixel points to be connected so as to generate a long side to be operated, and then performing open operation on the long side to be operated so as to generate an image to be processed;
acquiring a pixel data set of each row of image pixels in the image to be processed, and judging whether the image pixels higher than a preset threshold value continuously exist in the pixel data set;
if yes, acquiring row and column numbers of the image pixels corresponding to the pixel data set in the image to be processed, and adding the row and column numbers into a preset point set corresponding to the pixel data set, so as to generate a row and column data point set;
and merging the image pixels corresponding to the rank numbers in the rank data point set into a dividing line so as to generate the final dividing line set.
Further, the step of calculating plant pixels contained in the image strips after performing parallel division on the orthographic image after performing binarization processing to generate a plurality of image strips specifically includes:
downsampling the orthographic image to generate a downsampled image of low resolution;
respectively carrying out graying treatment and average treatment on the downsampled image so as to generate a gray image and an average image;
Performing image subtraction on the gray image bar and the average image bar so as to generate a processed image, wherein the processed image comprises image pixels;
dividing the processed image in parallel so as to generate a plurality of image strips;
judging whether the image strip is a longitudinal image strip or not, if so, judging that the image pixels contained in the image strip are longitudinal image pixels;
performing a pixel calculation step on the longitudinal image pixels, so as to calculate longitudinal plant pixels;
in addition, after the step of determining whether the image bar is a longitudinal image bar, the method further includes:
if not, judging the image strip as a transverse image strip, wherein the image pixels contained in the transverse image strip are transverse image pixels;
performing a pixel estimation step on the transverse image pixels, thereby calculating the transverse plant pixels;
wherein, the pixel calculating step specifically includes:
judging whether the pixel value of the image pixel is larger than a preset threshold value or not;
if yes, judging the image pixel as an identification pixel;
acquiring a pixel value of the identification pixel, and calculating a pixel value average value of the identification pixel;
judging whether the pixel value of the identification pixel is larger than the average value of the pixel values;
If yes, the identification pixel is marked as a plant pixel.
Further, the step of screening and connecting the transverse plant pixels and the longitudinal plant pixels to generate transverse area dividing lines and longitudinal area dividing lines and integrating the transverse area dividing lines and the longitudinal area dividing lines into a transverse line set and a longitudinal line set includes:
a preset line set generation step is obtained, and the plant pixels are input into the preset line set generation step for calculation, so that a final line set is output, wherein the final line set is one of the longitudinal line set and the transverse line set;
judging whether the plant pixels calculated in the step of inputting the preset line set are longitudinal plant pixels or not, if yes, outputting the longitudinal line set by the step of inputting the preset line set;
judging whether the plant pixels calculated in the step of inputting the preset line set are transverse plant pixels or not, if yes, outputting the transverse line set by the step of inputting the preset line set;
the step of presetting the branching set specifically comprises the following steps:
acquiring plant pixels contained in each long side of the image strip, and marking the plant pixels as pixels to be combined;
connecting the pixels to be combined so as to generate long edges of the pixels;
Acquiring pixel values of all pixel points in the long side of the pixel, wherein the pixel values are the number of the plant pixels contained in the pixel points;
judging whether the pixel value is larger than a preset threshold value, if so, setting the value of the pixel point corresponding to the pixel value as 1, and marking the pixel point as a pixel point to be connected;
connecting the pixel points to be connected so as to generate a long side to be operated, and then performing open operation on the long side to be operated so as to generate an image to be processed;
acquiring a pixel data set of each row of image pixels in the image to be processed, and judging whether the image pixels higher than a preset threshold value continuously exist in the pixel data set;
if yes, acquiring row and column numbers of the image pixels corresponding to the pixel data set in the image to be processed, and adding the row and column numbers into a preset point set corresponding to the pixel data set, so as to generate a row and column data point set;
and merging the image pixels corresponding to the rank numbers in the rank data point set into a dividing line so as to generate the final dividing line set.
Further, the step of merging the image pixels corresponding to the rank numbers in the rank data point set into a dividing line, thereby generating the final dividing line set specifically includes:
Acquiring the image pixels corresponding to the rank numbers in the rank data point set, and judging whether the distance between the image pixels is smaller than a preset threshold value or not;
if yes, the row numbers corresponding to the image pixels are combined, and therefore pixels to be combined are generated.
Judging whether the distance between the pixels to be combined in two adjacent row and column data point sets is smaller than a preset threshold value;
if yes, combining the pixels to be combined, so as to generate a dividing line;
and after integrating the dividing lines into a primary dividing line set, screening and integrating the dividing lines in the primary dividing line set so as to generate the final dividing line set.
Further, after integrating the dividing lines into a preliminary dividing line set, screening and integrating the dividing lines in the preliminary dividing line set, thereby generating the final dividing line set, specifically including:
judging whether the number of pixels to be combined contained in the dividing lines in the preliminary dividing line set is less than a preset value or not;
if not, acquiring the adjacent preliminary dividing line sets, and marking the preliminary dividing line sets as a first dividing line set and a second dividing line set;
judging whether the line number overlapped with the first dividing line set or not exists between the first dividing line set and the second dividing line set;
If yes, judging whether the number of the coincident row-column signals is smaller than a preset threshold value;
if yes, respectively acquiring the end point row and column numbers of the first dividing line set and the second dividing line set, and marking the end point row and column numbers as a first row and column number and a second row and column number;
judging whether the difference value between the first row number and the second row number is smaller than a preset threshold value or not;
if yes, combining the first dividing line set and the second dividing line set, so as to generate the preliminary dividing line set;
acquiring the end point row and column numbers of the dividing lines contained in the primary dividing line set, and marking the end point row and column numbers as row and column numbers to be prolonged;
judging whether the pixels to be combined corresponding to the row number to be prolonged are effective pixels or not;
if not, the dividing lines contained in the primary dividing line set are lengthened, and after the row number to be lengthened is lengthened to the corresponding effective pixel, the primary dividing line set is recorded as the final dividing line set.
Further, the step of integrating the division lines into a preliminary division line set after screening, and merging the preliminary division line set, thereby generating the final division line set specifically includes:
Judging whether the number of effective pixels in the pixels to be combined contained in the dividing lines in the preliminary dividing line set is larger than a preset threshold value or not;
if yes, acquiring the dividing lines with the lengths longer than a preset threshold value in the primary dividing line set, marking the dividing lines as mark dividing lines, and marking the dividing lines except the mark dividing lines in the primary dividing line set as dividing lines to be combined;
judging whether the distance between the dividing line to be combined and the mark dividing line is smaller than a preset threshold value or not;
if yes, combining the dividing line to be combined with the mark dividing line, so as to generate a final dividing line;
judging whether the proportion of effective pixels in the pixels to be combined contained in the final dividing line is larger than a preset threshold value or not;
if yes, merging the final dividing lines, so as to generate the final dividing line set.
Further, the orthographic image comprises a preset identification block;
the step of generating a breeding region by intersecting the longitudinal line set and the transverse line set to generate a candidate region and then combining the candidate regions, specifically includes:
overlapping the longitudinal region dividing line and the transverse region dividing line to generate a positioning coordinate system, wherein the longitudinal region dividing line and the transverse region divided region in the positioning coordinate system are marked as undetermined regions;
Generating a positioning number of the to-be-determined area according to the arrangement sequence of the to-be-determined area in the positioning coordinate system;
adding the positioning number to the short side of the undetermined area to generate a candidate area;
adding the positioning coordinate system into the orthographic image for comparison, and judging whether the candidate region falls into the preset identification block or not;
if so, combining the candidate regions to generate the breeding region.
A field breeding area division system, comprising:
an acquisition unit for acquiring an orthographic image of a farmland;
the dividing unit is used for carrying out parallel division on the orthographic image after binarization processing so as to generate a plurality of image strips, and calculating plant pixels contained in the image strips, wherein the plant pixels are pixels containing agricultural plant pixels, the image strips comprise transverse image strips and longitudinal image strips, and the plant pixels contain transverse plant pixels and longitudinal plant pixels;
the connecting unit is used for screening and connecting the transverse plant pixels and the longitudinal plant pixels to generate transverse area dividing lines and longitudinal area dividing lines and integrating the transverse area dividing lines and the longitudinal area dividing lines into a transverse line set and a longitudinal line set;
And the region generation unit is used for intersecting the longitudinal line set and the transverse line set so as to generate candidate regions, and then combining the candidate regions so as to generate a breeding region.
A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
acquiring an orthographic image of a farmland;
carrying out parallel division on the orthographic image after binarization processing so as to generate a plurality of image strips, and calculating plant pixels contained in the image strips, wherein the plant pixels are pixels containing agricultural plant pixels, the image strips comprise transverse image strips and longitudinal image strips, and the plant pixels contain transverse plant pixels and longitudinal plant pixels;
the transverse plant pixels and the longitudinal plant pixels are screened and then connected to generate transverse area dividing lines and longitudinal area dividing lines, and the transverse area dividing lines and the longitudinal area dividing lines are integrated into a transverse line set and a longitudinal line set;
and intersecting the longitudinal line set and the transverse line set to generate candidate regions, and combining the candidate regions to generate a breeding region.
A computer readable medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring an orthographic image of a farmland;
carrying out parallel division on the orthographic image after binarization processing so as to generate a plurality of image strips, and calculating plant pixels contained in the image strips, wherein the plant pixels are pixels containing agricultural plant pixels, the image strips comprise transverse image strips and longitudinal image strips, and the plant pixels contain transverse plant pixels and longitudinal plant pixels;
the transverse plant pixels and the longitudinal plant pixels are screened and then connected to generate transverse area dividing lines and longitudinal area dividing lines, and the transverse area dividing lines and the longitudinal area dividing lines are integrated into a transverse line set and a longitudinal line set;
and intersecting the longitudinal line set and the transverse line set to generate candidate regions, and combining the candidate regions to generate a breeding region.
According to the farmland breeding area dividing method, device, computer equipment and medium, the orthographic image is subjected to binarization processing after being obtained, the orthographic image is divided into the transverse image strips and the longitudinal image strips from the transverse direction and the longitudinal direction, the transverse plant pixels and the longitudinal plant pixels contained in the transverse image strips and the longitudinal image strips are connected into the longitudinal area dividing line and the transverse area dividing line, and finally the orthographic image is divided by using the longitudinal area dividing line and the transverse area dividing line, so that the problem that the existing breeding area dividing method in the prior art is low in efficiency is mainly caused by manual visual observation is solved, and in addition, the automatic or semi-automatic image identification dividing method is low in dividing effect precision is solved, and the breeding area dividing efficiency and precision are improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Wherein:
FIG. 1 is a flow chart of a method for partitioning a field breeding region in one embodiment;
FIG. 2 is a schematic diagram of a system for dividing a breeding area of an agricultural field according to an embodiment;
fig. 3 is a block diagram of a computer device in one embodiment.
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 be within the scope of the invention.
Referring to fig. 1, the invention discloses a farmland breeding area dividing method, which comprises the following steps:
S1, acquiring an orthographic image of a farmland;
as described in the above step S1, the background system acquires an orthographic image of a farmland in which the planting area is required to be divided, it is to be understood that the orthographic image is a remote sensing image with orthographic projection property, and a user can shoot from directly above the farmland through an unmanned plane, so that the farmland remote sensing image with orthographic projection property is shot;
in addition, the background system is generally a background server, and in addition, the background system may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms, which are not limited in this invention.
S2, carrying out binarization processing on the orthographic image, then carrying out parallel division so as to generate a plurality of image strips, and calculating plant pixels contained in the image strips, wherein the plant pixels are pixels containing agricultural plant pixels, the image strips comprise transverse image strips and longitudinal image strips, and the plant pixels contain transverse plant pixels and longitudinal plant pixels;
As described in the above step S2, after the background system acquires the orthographic image, the background system performs two-dimensional processing on the orthographic image to generate an orthographic image subjected to two-dimensional processing, and then the background system performs parallel division on the orthographic image to generate a plurality of mutually parallel image strips, it is understood that when the background system performs parallel division on the orthographic image, the parallel division is divided into two types of longitudinal division and transverse division, when the background system performs longitudinal division on the orthographic image, the output image strip is the longitudinal image strip, the longitudinal image strip contains longitudinal plant pixels therein, and when the background system performs transverse division on the orthographic image, the output image strip is the transverse image strip, the transverse image strip contains transverse plant pixels therein
S3, screening and connecting the transverse plant pixels and the longitudinal plant pixels to generate transverse area dividing lines and longitudinal area dividing lines, and integrating the transverse area dividing lines and the longitudinal area dividing lines into a transverse line set and a longitudinal line set;
as described in the step S3, the background system screens and connects the plant pixels to generate a plurality of area dividing lines, it can be understood that when the connected plant pixels are longitudinal plant pixels, the screened and connected area dividing lines are longitudinal area dividing lines, and then the background system integrates the longitudinal area dividing lines into the same line set and marks the same line set as the longitudinal line set;
Similarly, when the connected plant pixels are transverse plant pixels, the region dividing lines connected after screening are transverse region dividing lines, and then the background system integrates the transverse region dividing lines into the same line set and marks the same as the transverse line set.
S4, intersecting the longitudinal line set and the transverse line set to generate candidate regions, and combining the candidate regions to generate a breeding region.
As described in the above step S4, the background system intersects the longitudinal region dividing line in the longitudinal line set and the transverse region dividing line in the transverse line set, so as to divide a plurality of candidate regions, and then the background system combines the candidate regions, so as to generate the breeding region matching with the farmland breeding region.
According to the method, through the fact that the orthographic image of a farmland is obtained and then binarized, and is divided into the transverse image strips and the longitudinal image strips from the transverse direction and the longitudinal direction, the transverse plant pixels and the longitudinal plant pixels contained in the transverse image strips and the longitudinal image strips are connected into the longitudinal area dividing line and the transverse area dividing line, finally the orthographic image is divided by the longitudinal area dividing line and the transverse area dividing line, the fact that the orthographic image is visually divided without depending on manpower is achieved, the efficiency of area division is improved, meanwhile, the accuracy of area division is improved by the fact that the two manners of binarization and pixel identification are used for synchronous identification, the problem that in the prior art, the existing breeding cell dividing method is low in efficiency is mainly achieved through manual visual observation is solved, in addition, the automatic or semi-automatic image identification dividing method is low in dividing effect accuracy is solved, and the efficiency and accuracy of breeding cell division are improved.
In one embodiment, the step S2 specifically includes:
s21, downsampling the orthographic image to generate a downsampled image with low resolution, respectively carrying out graying treatment and average treatment on the downsampled image to generate a gray image and an average image, carrying out image subtraction on the gray image strips and the average image strips to generate a processed image, wherein the processed image comprises image elements, carrying out parallel division on the processed image to generate a plurality of image strips, judging whether the image strips are longitudinal image strips, if so, judging that the image elements contained in the image strips are longitudinal image elements, carrying out an image element calculation step on the longitudinal image elements to calculate the longitudinal plant image elements
As described in the above step S21, the background system performs downsampling on the ortho-image to generate a downsampled image with a low resolution of 0.03m, and then the background system performs a graying process and an averaging process on the downsampled image respectively, wherein during the graying process, the background system uses an ExG (exg=2g—r-B) to perform the graying process on the downsampled image to generate a gray image, and during the averaging process, the background system uses an averaging window with a size of DIST (line space) 4/3 to process the downsampled image to output an average image, and then the background system performs an image subtraction on the gray image and the average image to generate a processed image, wherein the processed image contains image pixels, and then the background system performs parallel division on the processed image;
It can be understood that, because the parallel division mode is divided into two modes of longitudinal division and transverse division, a longitudinal image strip or a transverse image strip is generated after the processed image is divided, the background system judges whether the image strip divided in the step execution process of the parallel division of the processed image by the background system is a longitudinal image strip, if yes, the background system judges that the output image pixel is a longitudinal image pixel, and carries out a pixel estimation step on the longitudinal image pixel, so as to calculate the longitudinal plant pixel;
in addition, after the step of determining whether the image bar is a longitudinal image bar, the method further includes:
s22, if not, judging the image strip as a transverse image strip, wherein the image pixels contained in the transverse image strip are transverse image pixels, and then performing a pixel estimation step on the transverse image pixels so as to calculate the transverse plant pixels;
as described in the above step S22, the background system determines whether the image bar is a vertical image bar in the execution process of the steps of respectively performing the grayscale processing and the average processing on the image bar, thereby generating a grayscale image bar and an average image bar, if not, the background system determines that the divided image bar is a horizontal image bar, the output image pixels are horizontal image pixels, and performs a pixel estimation step on the horizontal image pixels, thereby calculating the horizontal plant pixels;
Wherein, the pixel calculating step specifically includes:
s23, judging whether the pixel value of the image pixel is larger than a preset threshold value, if so, judging that the image pixel is an identification pixel, acquiring the pixel value of the identification pixel, calculating the average value of the pixel values of the identification pixel, judging whether the pixel value of the identification pixel is larger than the average value of the pixel values, and if so, marking the identification pixel as a plant pixel.
As described in step S23, the background system determines whether the pixel value of the image pixel is greater than a preset threshold, in this embodiment, if the specific value of the preset threshold is 0, the background system determines whether the pixel value of the image pixel is greater than 0, if yes, marks the image pixel as an identification pixel, then the background system obtains the pixel values of the identification pixels, estimates the average value of the pixel values according to the pixel values of the rest of the identification pixels, and determines whether the pixel value of the identification pixel is greater than the average value of the pixel values, if yes, the background system determines that the pixel value of the identification pixel is greater and clearer, and marks the identification pixel as a plant pixel.
It can be understood that when the background system determines that the pixel value of the image pixel is less than 0, the background system determines that the image pixel does not contain any pixel and pixel value, and then the background system deletes the image pixel.
In one embodiment, the step S3 includes:
s31, acquiring a preset line distribution set generation step, inputting plant pixels into the preset line distribution set generation step for calculation, and outputting a final line distribution set, wherein the final line distribution set is one of the longitudinal line set and the transverse line set, judging whether the plant pixels calculated in the preset line distribution set are longitudinal plant pixels, if yes, outputting the longitudinal line set by the preset line distribution set step, judging whether the plant pixels calculated in the preset line distribution set are transverse plant pixels, and if yes, outputting the transverse line set by the preset line distribution set step;
as described in the step S31, the background system acquires a preset line set generating step, inputs the plant pixels into the preset line set generating step to calculate, thereby outputting a final line set, wherein the final line set is one of a vertical line set and a horizontal line set, then the background system judges whether the plant pixels calculated in the input preset line set step are vertical plant pixels, if yes, the final line set output by the preset line set step is a vertical line set, in addition, the background system judges whether the plant pixels calculated in the input preset line set step are horizontal plant pixels, if yes, the final line set output by the preset line set step is a horizontal line set;
The step of presetting the branching set specifically comprises the following steps:
s32, acquiring the plant pixels contained in each long side of the image strip, marking the plant pixels as to-be-combined pixels, connecting the to-be-combined pixels to generate a pixel long side, acquiring pixel values of all pixel points in the pixel long side, judging whether the pixel values are larger than a preset threshold value or not, if yes, setting the value of the pixel point corresponding to the pixel values as 1, marking the pixel points to be connected, connecting the pixel points to be connected to generate a to-be-calculated long side, performing an open operation on the to-be-calculated long side to generate a to-be-processed image, acquiring pixel data sets of the image pixels of each row in the to-be-processed image, judging whether the image pixels higher than the preset threshold value continuously exist in the pixel data sets, if yes, acquiring row numbers of the image pixels corresponding to the pixel data sets in the to-be-processed image, adding the row numbers to the pixel data sets corresponding to the pixel data sets to the preset row numbers, and column numbers and row numbers and column numbers in the to column numbers to the image data sets, and the column numbers are divided into the row numbers and column numbers and the column numbers.
As described in the above step S32, the background system takes the plant pixels included in the long side of the image strip and marks the plant pixels as the pixels to be combined, and it can be understood that, in order to obtain the long side of the image strip, the background system obtains the length parameters of each side of the image strip, and marks the side with the largest length parameter, i.e. the side with the longest length, as the long side of the image strip, then the background system connects the pixels to be combined, thereby generating the long side of the pixel corresponding to the image strip, so as to realize the function of splitting the image strip into a plurality of long sides of the pixel, then the background system obtains the pixel values of each pixel point in the long side of the pixel, the pixel values are the number of plant pixels in the pixel points included in the long side of the pixel, then the background system determines whether the pixel values are greater than a preset threshold, in this embodiment, when the background system determines that the pixel values are greater than 5, setting the value of the pixel point corresponding to the pixel value to be 1, determining the pixel point as an effective pixel point by the background system at this time, marking the pixel point to be connected as the pixel point to be connected, connecting the pixel point to be connected, generating a long side to be operated, and then performing an open operation on the long side to be operated, generating a to-be-processed image, wherein the window size when the open operation is performed is 3-5, the background system acquires the pixel data set of each row of image pixels in the to-be-processed image, determining whether 3 image pixels higher than a preset threshold exist continuously in the pixel data set, wherein the preset threshold is 0 in the embodiment, it is understood that when the image pixels are larger than 0, the image pixels are effective pixels, and the background system acquires the number of the image pixels corresponding to the pixel data set in the to-be-processed image, the line numbers are added into preset point sets corresponding to the pixel data sets, so that a line data point set is generated, and it is understood that the line numbers are used for indicating positions of image pixels in an image to be processed, so that line number information of each image pixel is contained in the line data point set, a background system combines the image pixels corresponding to the line numbers in the line data point set into dividing lines, and finally all dividing lines are integrated, so that a final dividing line set corresponding to image strips is generated;
In one embodiment, the step of merging the image pixels corresponding to the rank numbers in the rank data point set into a dividing line, thereby generating the final dividing line set specifically includes:
s33, acquiring the image pixels corresponding to the row and column numbers in the row and column data point sets, judging whether the distance between the image pixels is smaller than a preset threshold, if yes, merging the row and column numbers corresponding to the image pixels to generate pixels to be merged, judging whether the distance between the pixels to be merged in two adjacent row and column data point sets is smaller than the preset threshold, if yes, merging the pixels to be merged to generate a dividing line, and after integrating the dividing line into a primary dividing line set, screening and integrating the dividing line in the primary dividing line set to generate the final dividing line set.
As described in the foregoing embodiment, the background system acquires image pixels corresponding to row numbers in the row-column data point sets, and determines whether a distance between each image pixel is smaller than a preset threshold, it may be understood that the distance between each image pixel is a distance between two adjacent image pixels, so that the background system determines whether a distance between two adjacent image pixels is smaller than the preset threshold, if yes, merges the row numbers corresponding to the image pixels with too close distance, thereby generating pixels to be merged, and then the background system determines whether a distance between the pixels to be merged in two adjacent row-column data point sets is smaller than the preset threshold, if yes, merges the pixels to be merged, thereby merging the image pixels with relatively close distances in the two row-column data point sets, thereby finally generating the above-mentioned dividing line set, and after integrating the dividing line into the preliminary dividing line set, integrating the dividing line in the preliminary dividing line set, thereby generating the final dividing line set.
In an embodiment, after integrating the dividing lines into a preliminary dividing line set, the step of screening and integrating the dividing lines in the preliminary dividing line set to generate the final dividing line set specifically includes:
s34, judging whether the number of pixels to be combined contained in the dividing lines in the preliminary dividing line set is smaller than a preset value, if not, acquiring the adjacent preliminary dividing line set, marking the adjacent preliminary dividing line set as a first dividing line set and a second dividing line set, judging whether the overlapping line numbers exist between the first dividing line set and the second dividing line set, if yes, judging whether the number of the overlapping line numbers is smaller than a preset threshold, if yes, respectively acquiring end point line numbers of the first dividing line set and the second dividing line set, marking the end point line numbers as a first line number and a second line number, judging whether the difference between the first line number and the second line number is smaller than the preset threshold, if yes, combining the first dividing line set and the second dividing line set, generating the preliminary dividing line set, acquiring the end point line numbers of the dividing lines contained in the preliminary dividing line set, marking the end point line numbers to be prolonged, marking the end point line numbers of the dividing line sets to be prolonged, if yes, marking the end point line numbers of the dividing line sets to be prolonged, marking the end point line numbers to be prolonged, and if the end point line numbers are prolonged, marking the end line numbers to be prolonged, and if the line numbers are prolonged, respectively marking the end line sets to be prolonged.
As described in the above embodiment, the background system determines whether the number of pixels to be combined included in the dividing line of the preliminary dividing line set is less than a preset value, in this embodiment, the background system determines whether the number of pixels to be combined included in the dividing line is less than 4 if the preset threshold is 4, if yes, the background system determines that the number of pixels to be combined included in the dividing line corresponding to the pixels to be combined is less, deletes the dividing line, otherwise, when the number of pixels to be combined included in the dividing line is greater than 4, the background system obtains the adjacent preliminary dividing line set, and records as the first dividing line set and the second dividing line set, determines whether a row number overlapping between the first dividing line set and the second dividing line set exists, if yes, the background system determines whether the number of pixels to be combined in the same position exists between the first dividing line set and the second dividing line set, and then the background system determines whether the number of pixels to be combined overlapping is less than the preset threshold,
in this embodiment, if the preset threshold is 5, when the background system determines that the number of the rows and the columns that overlap is less than 5, if not, it is determined that there are a plurality of pixels to be merged that overlap exists between the first partition line set and the second partition line set, so the background system merges the first partition line set and the second partition line set, and when the background system determines that the number of the rows and the columns that overlap is less than 5, the background system respectively obtains the end line numbers of the first partition line set and the second partition line set, and records the end line numbers as a first line number and a second line number, and determines whether the difference between the first line number and the second line number is less than the preset threshold, and it can be understood that the second line number includes the first line number and the first line number, and the second line number, and the difference between the first line number and the second line number is determined to be the difference between the first line number and the second line number, and the difference between the first line number and the second line number is determined to be the specific difference between the first line number and the second line number is smaller than the preset threshold, and if the difference between the first line number and the second line number is smaller than the preset threshold is shown in the first line number:
ROW_OFFSET=DIST/Res*1/2
Meanwhile, the background system judges whether the difference value between the first row number and the second row number is smaller than a second preset threshold value, and the second preset threshold value is embodied as follows:
COL_OFFSET=DIST/Res*2/3
if so, the background system merges the first dividing line set and the second dividing line set, so as to generate the preliminary dividing line set, then the background system obtains the end line numbers of the dividing lines contained in the preliminary dividing line set, and marks the end line numbers as line numbers to be lengthened, it can be understood that the line numbers to be lengthened are the line numbers corresponding to the two end points of the dividing lines, then the background system judges whether the pixels to be merged corresponding to the line numbers to be lengthened are effective pixels, when the pixels to be merged corresponding to the line numbers to be lengthened are not effective pixels, the background system judges that the end points of the dividing lines do not contact the effective pixels in the orthographic image, extension lines are required, so that the dividing lines can contact the effective pixels in the orthographic image, and then the background system marks the preliminary dividing line set corresponding to the dividing lines contacting the effective pixels as the final dividing line set.
In an embodiment, the step of integrating the division lines into a preliminary division line set after the division lines are screened and merging the preliminary division line set, thereby generating the final division line set specifically includes:
S35, judging whether the number of effective pixels in the pixels to be combined contained in the dividing lines in the preliminary dividing line set is larger than a preset threshold, if yes, acquiring the dividing lines with lengths longer than the preset threshold in the preliminary dividing line set, marking the dividing lines as mark dividing lines, marking the dividing lines except the mark dividing lines in the preliminary dividing line set as the dividing lines to be combined, judging whether the distance between the dividing lines to be combined and the mark dividing lines is smaller than the preset threshold, if yes, combining the dividing lines to be combined with the mark dividing lines, so as to generate a final dividing line, judging whether the proportion of the effective pixels in the pixels to be combined contained in the final dividing line is larger than the preset threshold, if yes, combining the final dividing line, so as to generate the final dividing set.
As described in the above embodiment, the background system determines whether the number of effective pixels in the pixels to be combined included in the primary dividing line set is greater than a preset THRESHOLD, in this embodiment, the background system determines whether the number of effective pixels in the pixels to be combined is greater than 5, if not, the background system determines that the number of effective pixels in the dividing line set is too small, the dividing line is deleted, otherwise, the background system acquires dividing lines with a primary dividing line concentration length longer than the preset THRESHOLD, marks the dividing lines as mark dividing lines, marks the dividing lines in the primary dividing line set except the mark dividing lines as dividing lines to be combined, then the background system determines whether the distance between the dividing lines to be combined and the mark dividing lines is smaller than the preset THRESHOLD, and it can be understood that the length of the preset THRESHOLD is THRESHOLD (threshold_dist=dist/resx 1/2), if the background system determines that the dividing lines to be combined and the mark dividing lines are smaller than the preset dividing lines, if the distance between the mark dividing lines and the mark dividing lines are larger than the preset THRESHOLD, and finally, if the mark dividing lines are larger than the mark dividing lines are included, the final dividing line is generated, and if the final dividing line is generated, and the final dividing line is 50% is generated.
In one embodiment, the orthographic image includes a predetermined identification block;
the step S4 specifically includes:
s41, overlapping the longitudinal region dividing line and the transverse region dividing line to generate a positioning coordinate system, wherein the regions divided by the longitudinal region dividing line and the transverse region in the positioning coordinate system are marked as undetermined regions, positioning numbers of the undetermined regions are generated according to the arrangement sequence of the undetermined regions in the positioning coordinate system, the positioning numbers are added to the short sides of the undetermined regions to generate candidate regions, the positioning coordinate system is added to the orthographic images to be compared, whether the candidate regions fall into the preset identification blocks is judged, and if yes, the candidate regions are combined to generate the breeding regions.
As described in the above embodiment, the background system intersects the longitudinal region dividing line included in the longitudinal line set and the transverse region dividing line included in the transverse line set, thereby generating a positioning coordinate system, wherein the positioning coordinate system includes a plurality of to-be-determined regions generated by intersecting the longitudinal region dividing line and the transverse region dividing line, then the background system generates a positioning number matching each to-be-determined region according to an arrangement order of the to-be-determined regions in the positioning coordinate system, and adds the positioning number to a short side of the to-be-determined region, thereby generating a candidate region, and when the background system acquires a short side of the to-be-determined region, the background system can acquire lengths of each side of the to-be-determined region, and determines the side with the shortest length as the short side of the to-be-determined region, then the background system adds the positioning coordinate system to the orthographic image, and then judges whether the candidate region is framed in the preset identification block, and when the area intersected with the candidate region exceeds 2/3 of the candidate region in the preset identification block in the candidate region, the background system can be understood as a plurality of the candidate region, and then the candidate region is accurately divided into a plurality of candidate regions, and the candidate region is bred, thereby achieving the breeding effect.
Referring to fig. 2, the invention also discloses a farmland breeding area dividing system, which comprises:
an acquisition unit 1 for acquiring an orthographic image of a farmland;
the dividing unit 2 is used for carrying out parallel division on the orthographic image after binarization processing so as to generate a plurality of image strips, and calculating plant pixels contained in the image strips, wherein the plant pixels are pixels containing agricultural plant pixels, the image strips comprise transverse image strips and longitudinal image strips, and the plant pixels contain transverse plant pixels and longitudinal plant pixels;
the connecting unit 3 is used for screening and connecting the transverse plant pixels and the longitudinal plant pixels to generate transverse area dividing lines and longitudinal area dividing lines, and integrating the transverse area dividing lines and the longitudinal area dividing lines into a transverse line set and a longitudinal line set;
and a region generation unit 4 configured to generate a candidate region by intersecting the longitudinal line set and the transverse line set, and then combine the candidate regions to generate a breeding region.
The above units are not described here one by one for executing the above farmland breeding area division system.
FIG. 3 illustrates an internal block diagram of a computer device in one embodiment. The computer device may be, in particular, a server including, but not limited to, a high performance computer and a high performance computer cluster. As shown in fig. 3, the computer device includes a processor, a memory, and a network interface connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and may also store a computer program that, when executed by the processor, causes the processor to implement the employee status determination method. The internal memory may also store a computer program which, when executed by the processor, causes the processor to perform the method of dividing a breeding area of a farm.
It will be appreciated by those skilled in the art that the structure shown in FIG. 3 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, the farmland breeding area division method provided herein may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 3. The memory of the computer device can store various program templates which form a farmland breeding area dividing system. For example, an acquisition unit 1, a division unit 2, a pixel estimation unit 3, and a connection unit 4.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of when executing the computer program:
acquiring an orthographic image of a farmland, carrying out binarization processing on the orthographic image, then carrying out parallel division so as to generate a plurality of image strips, calculating plant pixels contained in the image strips, wherein the plant pixels are pixels containing agricultural plant pixels, the image strips contain transverse image strips and longitudinal image strips, the plant pixels contain transverse plant pixels and longitudinal plant pixels, the transverse plant pixels and the longitudinal plant pixels are screened and then connected to generate transverse area dividing lines and longitudinal area dividing lines, the transverse area dividing lines and the longitudinal area dividing lines are integrated into transverse line sets and longitudinal line sets, the longitudinal line sets and the transverse line sets are intersected so as to generate candidate areas, and then the candidate areas are combined so as to generate a breeding area.
As can be seen from the above embodiments, the present invention has the following advantages: the method comprises the steps of obtaining an orthographic image of a farmland, performing binarization processing on the orthographic image, dividing the orthographic image into a transverse image bar and a longitudinal image bar from the transverse direction and the longitudinal direction, connecting transverse plant pixels and longitudinal plant pixels contained in the transverse image bar and the longitudinal image bar into a longitudinal region dividing line and a transverse region dividing line, and finally dividing the orthographic image by using the longitudinal region dividing line and the transverse region dividing line, so that the orthographic image is not needed to be visually divided by manpower, the efficiency of region division is improved, meanwhile, the accuracy of region division is improved by using a mode of synchronous identification of two modes of binarization and pixel identification, the problem that the existing breeding cell dividing method in the prior art is mainly used for region division by manual visual observation, and the efficiency is lower is solved.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink)
DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that variations and modifications can be made by those skilled in the art without departing from the inventive concept, and these are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (9)

1. The farmland breeding area dividing method is characterized by comprising the following steps:
acquiring an orthographic image of a farmland;
performing binarization processing on the orthographic image, and then performing transverse division and longitudinal division respectively, so as to calculate transverse plant pixels contained in the transverse image strips and longitudinal plant pixels contained in the longitudinal image strips after a plurality of transverse image strips and longitudinal image strips are generated;
The transverse plant pixels are screened and then connected, so that a transverse area dividing line is generated, the transverse area dividing line is integrated into a transverse line set, the longitudinal plant pixels are screened and then connected, so that a longitudinal area dividing line is generated, and the longitudinal area dividing line is integrated into a longitudinal line set;
intersecting the longitudinal line set and the transverse line set to generate candidate regions, and combining the candidate regions to generate a breeding region;
the step of screening and connecting the transverse plant pixels to generate a transverse area dividing line, integrating the transverse area dividing line into a transverse line set, screening and connecting the longitudinal plant pixels to generate a longitudinal area dividing line, and integrating the longitudinal area dividing line into a longitudinal line set comprises the following steps:
a preset line set generation step is obtained, and the plant pixels are input into the preset line set generation step for calculation, so that a final line set is output, wherein the final line set is one of the longitudinal line set and the transverse line set;
judging whether the plant pixels calculated in the step of inputting the preset line set are longitudinal plant pixels or not, if yes, outputting the longitudinal line set by the step of inputting the preset line set;
Judging whether the plant pixels calculated in the step of inputting the preset line set are transverse plant pixels or not, if yes, outputting the transverse line set by the step of inputting the preset line set;
the step of presetting the branching set specifically comprises the following steps:
acquiring plant pixels contained in each long side of the image strip, and marking the plant pixels as pixels to be combined;
connecting the pixels to be combined so as to generate long edges of the pixels;
acquiring pixel values of all pixel points in the long side of the pixel, wherein the pixel values are the number of the plant pixels contained in the pixel points;
judging whether the pixel value is larger than a preset threshold value, if so, setting the value of the pixel point corresponding to the pixel value as 1, and marking the pixel point as a pixel point to be connected;
connecting the pixel points to be connected so as to generate a long side to be operated, and then performing open operation on the long side to be operated so as to generate an image to be processed;
acquiring a pixel data set of each row of image pixels in the image to be processed, and judging whether the image pixels higher than a preset threshold value continuously exist in the pixel data set;
if yes, acquiring row and column numbers of the image pixels corresponding to the pixel data set in the image to be processed, and adding the row and column numbers into a preset point set corresponding to the pixel data set, so as to generate a row and column data point set;
And merging the image pixels corresponding to the rank numbers in the rank data point set into a dividing line so as to generate the final dividing line set.
2. The method for dividing a farmland breeding area according to claim 1, wherein said step of calculating a horizontal plant pixel contained in said horizontal image strip and a vertical plant pixel contained in said vertical image strip after said subjecting said orthographic image to binarization processing is respectively subjected to horizontal division and vertical division to thereby generate a plurality of horizontal image strips and vertical image strips, specifically comprises:
downsampling the orthographic image to generate a downsampled image of low resolution;
respectively carrying out graying treatment and average treatment on the downsampled image so as to generate a gray image and an average image;
performing image subtraction on the gray image bar and the average image bar so as to generate a processed image, wherein the processed image comprises image pixels;
dividing the processed image in parallel so as to generate a plurality of image strips;
judging whether the image strip is a longitudinal image strip or not, if so, judging that the image pixels contained in the image strip are longitudinal image pixels;
Performing a pixel calculation step on the longitudinal image pixels, so as to calculate longitudinal plant pixels;
in addition, after the step of determining whether the image bar is a longitudinal image bar, the method further includes:
if not, judging the image strip as a transverse image strip, wherein the image pixels contained in the transverse image strip are transverse image pixels;
performing a pixel estimation step on the transverse image pixels, thereby calculating the transverse plant pixels;
wherein, the pixel calculating step specifically includes:
judging whether the pixel value of the image pixel is larger than a preset threshold value or not;
if yes, judging the image pixel as an identification pixel;
acquiring a pixel value of the identification pixel, and calculating a pixel value average value of the identification pixel;
judging whether the pixel value of the identification pixel is larger than the average value of the pixel values;
if yes, the identification pixel is marked as a plant pixel.
3. The method for dividing a farmland breeding area according to claim 1, wherein said step of generating said final dividing line set by merging said image pixels corresponding to said line number in said line-column data point set into dividing lines comprises:
Acquiring the image pixels corresponding to the rank numbers in the rank data point set, and judging whether the distance between the image pixels is smaller than a preset threshold value or not;
if yes, merging the row and column numbers corresponding to the image pixels, so as to generate pixels to be merged;
judging whether the distance between the pixels to be combined in two adjacent row and column data point sets is smaller than a preset threshold value;
if yes, combining the pixels to be combined, so as to generate a dividing line;
and after integrating the dividing lines into a primary dividing line set, screening and integrating the dividing lines in the primary dividing line set so as to generate the final dividing line set.
4. The method for partitioning a breeding area of a farmland according to claim 3, wherein said step of integrating said partitioning lines into a preliminary partitioning line set, and then screening and integrating the partitioning lines in said preliminary partitioning line set, thereby generating said final partitioning line set, comprises the steps of:
judging whether the number of pixels to be combined contained in the dividing lines in the preliminary dividing line set is less than a preset value or not;
if not, acquiring the adjacent preliminary dividing line sets, and marking the preliminary dividing line sets as a first dividing line set and a second dividing line set;
Judging whether the line number overlapped with the first dividing line set or not exists between the first dividing line set and the second dividing line set;
if yes, judging whether the number of the coincident row-column signals is smaller than a preset threshold value;
if yes, respectively acquiring the end point row and column numbers of the first dividing line set and the second dividing line set, and marking the end point row and column numbers as a first row and column number and a second row and column number;
judging whether the difference value between the first row number and the second row number is smaller than a preset threshold value or not;
if yes, combining the first dividing line set and the second dividing line set, so as to generate the preliminary dividing line set;
acquiring the end point row and column numbers of the dividing lines contained in the primary dividing line set, and marking the end point row and column numbers as row and column numbers to be prolonged;
judging whether the pixels to be combined corresponding to the row number to be prolonged are effective pixels or not;
if not, the dividing lines contained in the primary dividing line set are lengthened, and after the row number to be lengthened is lengthened to the corresponding effective pixel, the primary dividing line set is recorded as the final dividing line set.
5. The method for partitioning a breeding area of a farmland according to claim 3, wherein said step of integrating said partitioning lines into a preliminary partitioning line set after screening, and combining said preliminary partitioning line sets to thereby generate said final partitioning line set, specifically comprises:
Judging whether the number of effective pixels in the pixels to be combined contained in the dividing lines in the preliminary dividing line set is larger than a preset threshold value or not;
if yes, acquiring the dividing lines with the lengths longer than a preset threshold value in the primary dividing line set, marking the dividing lines as mark dividing lines, and marking the dividing lines except the mark dividing lines in the primary dividing line set as dividing lines to be combined;
judging whether the distance between the dividing line to be combined and the mark dividing line is smaller than a preset threshold value or not;
if yes, combining the dividing line to be combined with the mark dividing line, so as to generate a final dividing line;
judging whether the proportion of effective pixels in the pixels to be combined contained in the final dividing line is larger than a preset threshold value or not;
if yes, merging the final dividing lines, so as to generate the final dividing line set.
6. The method of claim 1, wherein the orthographic image comprises a predetermined identification block;
the step of generating a breeding region by intersecting the longitudinal line set and the transverse line set to generate a candidate region and then combining the candidate regions, specifically includes:
Overlapping the longitudinal region dividing line and the transverse region dividing line to generate a positioning coordinate system, wherein the longitudinal region dividing line and the transverse region divided region in the positioning coordinate system are marked as undetermined regions;
generating a positioning number of the to-be-determined area according to the arrangement sequence of the to-be-determined area in the positioning coordinate system;
adding the positioning number to the short side of the undetermined area to generate a candidate area;
adding the positioning coordinate system into the orthographic image for comparison, and judging whether the candidate region falls into the preset identification block or not;
if so, combining the candidate regions to generate the breeding region.
7. A field breeding area dividing system, comprising:
an acquisition unit for acquiring an orthographic image of a farmland;
the dividing unit is used for carrying out binarization processing on the orthographic image, then carrying out transverse division and longitudinal division respectively, so as to calculate transverse plant pixels contained in the transverse image strips and longitudinal plant pixels contained in the longitudinal image strips after a plurality of transverse image strips and longitudinal image strips are generated;
The connecting unit is used for screening and connecting the transverse plant pixels so as to generate transverse area dividing lines, integrating the transverse area dividing lines into transverse line sets, screening and connecting the longitudinal plant pixels so as to generate longitudinal area dividing lines, and integrating the longitudinal area dividing lines into longitudinal line sets;
the region generation unit is used for intersecting the longitudinal line set and the transverse line set so as to generate candidate regions, and then combining the candidate regions so as to generate a breeding region;
the connection unit is configured to screen and connect the transverse plant pixels, thereby generating a transverse area dividing line, integrate the transverse area dividing line into a transverse line set, screen and connect the longitudinal plant pixels, thereby generating a longitudinal area dividing line, and integrate the longitudinal area dividing line into a longitudinal line set, and specifically includes:
the connecting unit is further used for acquiring a preset line set generating step, inputting the plant pixels into the preset line set generating step for calculation, and outputting a final line set, wherein the final line set is one of the longitudinal line set and the transverse line set;
The connection unit is further used for judging whether the plant pixels calculated in the step of inputting the preset line set are longitudinal plant pixels or not, and if yes, the step of outputting the longitudinal line set by the preset line set;
the connection unit is further used for judging whether the plant pixels calculated in the step of inputting the preset line set are transverse plant pixels or not, and if yes, the transverse line set output by the step of inputting the preset line set is obtained;
the step of presetting the branching set specifically comprises the following steps:
acquiring plant pixels contained in each long side of the image strip, and marking the plant pixels as pixels to be combined;
connecting the pixels to be combined so as to generate long edges of the pixels;
acquiring pixel values of all pixel points in the long side of the pixel, wherein the pixel values are the number of the plant pixels contained in the pixel points;
judging whether the pixel value is larger than a preset threshold value, if so, setting the value of the pixel point corresponding to the pixel value as 1, and marking the pixel point as a pixel point to be connected;
connecting the pixel points to be connected so as to generate a long side to be operated, and then performing open operation on the long side to be operated so as to generate an image to be processed;
Acquiring a pixel data set of each row of image pixels in the image to be processed, and judging whether the image pixels higher than a preset threshold value continuously exist in the pixel data set;
if yes, acquiring row and column numbers of the image pixels corresponding to the pixel data set in the image to be processed, and adding the row and column numbers into a preset point set corresponding to the pixel data set, so as to generate a row and column data point set;
and merging the image pixels corresponding to the rank numbers in the rank data point set into a dividing line so as to generate the final dividing line set.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method of dividing a breeding field according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the farmland breeding area division method according to any one of claims 1 to 6.
CN202210994603.2A 2022-08-18 2022-08-18 Farmland breeding area dividing method, device, computer equipment and medium Active CN115393586B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210994603.2A CN115393586B (en) 2022-08-18 2022-08-18 Farmland breeding area dividing method, device, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210994603.2A CN115393586B (en) 2022-08-18 2022-08-18 Farmland breeding area dividing method, device, computer equipment and medium

Publications (2)

Publication Number Publication Date
CN115393586A CN115393586A (en) 2022-11-25
CN115393586B true CN115393586B (en) 2023-06-27

Family

ID=84121565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210994603.2A Active CN115393586B (en) 2022-08-18 2022-08-18 Farmland breeding area dividing method, device, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN115393586B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163039A (en) * 2018-03-15 2019-08-23 北京航空航天大学 Determine method, equipment, storage medium and the processor of vehicle running state
CN110275544A (en) * 2019-04-16 2019-09-24 上海大学 A kind of plant protection drone flight course planning method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8798965B2 (en) * 2009-02-06 2014-08-05 The Hong Kong University Of Science And Technology Generating three-dimensional models from images
CN102706328A (en) * 2012-04-28 2012-10-03 中国神华能源股份有限公司 Method and device for detecting subsidence area of ground and data processing equipment
US20170171473A1 (en) * 2015-12-15 2017-06-15 Le Holdings (Beijing) Co., Ltd. Method for realizing photographing effect of a distorting mirror and electronic device
CN107247571B (en) * 2017-06-26 2020-07-24 京东方科技集团股份有限公司 Display device and display method thereof
CN109522904B (en) * 2018-09-30 2020-06-09 广州地理研究所 Rule farmland extraction method based on remote sensing data
CN109886279B (en) * 2019-01-24 2023-09-29 平安科技(深圳)有限公司 Image processing method, device, computer equipment and storage medium
CN110796031A (en) * 2019-10-11 2020-02-14 腾讯科技(深圳)有限公司 Table identification method and device based on artificial intelligence and electronic equipment
CN111757014B (en) * 2020-08-07 2022-03-11 深圳市爱普泰科电子有限公司 Focal length adjusting method, device, equipment and storage medium of network camera
CN114910079A (en) * 2022-06-30 2022-08-16 广州极飞科技股份有限公司 Navigation path planning method and device, electronic equipment and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163039A (en) * 2018-03-15 2019-08-23 北京航空航天大学 Determine method, equipment, storage medium and the processor of vehicle running state
CN110275544A (en) * 2019-04-16 2019-09-24 上海大学 A kind of plant protection drone flight course planning method

Also Published As

Publication number Publication date
CN115393586A (en) 2022-11-25

Similar Documents

Publication Publication Date Title
CN109034078B (en) Training method of age identification model, age identification method and related equipment
US20210027429A1 (en) Noise detection method for time-series vegetation index derived from remote sensing images
CN111524137A (en) Cell identification counting method and device based on image identification and computer equipment
DE102004004528A1 (en) Stereo image processing method for measuring parallax between stereo images to determine 3D position coordinates of image objects, wherein both parallax and a parallax reliability factor are determined
CN114037637B (en) Image data enhancement method and device, computer equipment and storage medium
CN113376327B (en) Environmental monitoring information management method and system based on big data
CN113516661A (en) Defect detection method and device based on feature fusion
Malavasi et al. Multifaceted analysis of patch-level plant diversity in response to landscape spatial pattern and history on Mediterranean dunes
CN115439654B (en) Method and system for finely dividing weakly supervised farmland plots under dynamic constraint
CN113487607A (en) Defect detection method and device based on multi-view-field image
Uribeetxebarria et al. Stratified sampling in fruit orchards using cluster-based ancillary information maps: a comparative analysis to improve yield and quality estimates
CN111445487A (en) Image segmentation method and device, computer equipment and storage medium
CN115393586B (en) Farmland breeding area dividing method, device, computer equipment and medium
CN111445513B (en) Plant canopy volume acquisition method and device based on depth image, computer equipment and storage medium
CN116579521A (en) Yield prediction time window determining method, device, equipment and readable storage medium
CN108364024B (en) Image matching method and device, computer equipment and storage medium
CN113436193B (en) Urban black and odorous water body monitoring method and device
CN112418043B (en) Corn weed occlusion determination method and device, robot, equipment and storage medium
CN115294191A (en) Marker size measuring method, device, equipment and medium based on electronic endoscope
CN112395988A (en) Finger vein recognition method and device, computer equipment and storage medium
CN117173578B (en) Snow line elevation detection method and device, computer equipment and storage medium
Avolio et al. Automatic Detection of Anomalous Time Trends from Satellite Image Series to Support Agricultural Monitoring
Convertino et al. Inferring species richness and turnover by statistical multiresolution texture analysis of satellite imagery
CN116664663B (en) Method, device, computer equipment and storage medium for calculating crop area
CN110648346A (en) Tumor network construction method and device, computer equipment 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