Object information extraction method and device, intelligent agricultural system, and electronic device
By transforming the image and performing Hough line detection, key result information is determined, and parallel strip information of linear or strip-shaped objects is extracted. This solves the problems of high complexity and poor applicability in existing technologies, and achieves fast and accurate recognition results.
Patent Information
- Application Number
- CN202310668001.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-06
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-06-06
AI Technical Summary
In the existing technology, the methods for identifying linear or strip-shaped objects have high computational complexity and poor applicability, and cannot effectively identify linear or strip-shaped objects in different fields.
The original object image is transformed to obtain a binarized or masked image, and Hough line detection is performed. The key result information is determined by using the multi-row element values of the line detection results, and parallel strip information, including angle and width, is extracted.
It enables rapid and accurate identification of linear or strip-shaped objects, reduces identification complexity, and improves applicability, making it suitable for the identification of any linear or strip-shaped object.
Smart Images

Figure CN119091147B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and more specifically, to a method, apparatus, smart agriculture system, and electronic device for extracting object information. Background Technology
[0002] In some intelligent systems, the identification of linear or strip-shaped obstacles is required. For example, in intelligent cotton field management, cotton rows need to be identified to perform tasks such as seedling emergence rate statistics, weed identification, and operation navigation. Similarly, in drone flight control, linear or strip-shaped obstacles such as power lines and poles need to be identified for obstacle avoidance.
[0003] In existing technologies, an image of the region to be identified can be input into a neural network model, which can then identify and output the location of linear or strip-shaped objects in the image.
[0004] However, existing methods suffer from high computational complexity and poor applicability. Summary of the Invention
[0005] The purpose of this application is to address the shortcomings of the prior art by providing a method, apparatus, smart agriculture system, and electronic device for extracting object information, thereby solving the problems of excessive computational complexity and poor applicability in the prior art.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0007] Firstly, this application provides a method for extracting object information, including:
[0008] The original object image is transformed to obtain a transformed image, which is a binarized image or a mask image of the original object image.
[0009] The transformed image is subjected to Hough line detection to obtain line detection results. The line detection results include multiple rows of elements, each element corresponding to a line in the original object image. The position of each element is used to characterize the position of the corresponding line in the original object image, and the element value of each element is used to characterize the reliability of the line.
[0010] Based on the element values of the multi-row elements, key result information is determined, which is used to characterize the parallel stripes of the object in the original object image;
[0011] Based on the key result information and the position of at least one row of elements in the multi-row elements, parallel strip information in the original object image is extracted. The parallel strip information includes the angle and width of the object parallel strip in the original object image.
[0012] As one possible implementation, determining the key result information based on the element values of the multi-row elements includes:
[0013] Based on the element values of the multi-row elements, several key factor information is determined, including: void density and average value of strip elements;
[0014] Based on the information of the multiple key factors, the key result information is determined.
[0015] As one possible implementation, the multi-row elements are stored in a two-dimensional array, and the position of each element in the two-dimensional array is used to represent the position of the corresponding straight line in the original object image. The element value of each element in the two-dimensional array is used to indicate the number of straight lines in Hough space that pass through the points corresponding to the positions in the two-dimensional array.
[0016] The step of determining multiple key factor information based on the element values of the multiple rows of elements includes:
[0017] Based on the element values of the elements in each row of the two-dimensional array, determine the striped elements and non-striped elements in each row;
[0018] Calculate the ratio of the number of non-strip elements in each row to the sum of the number of striped and non-striped elements in each row to obtain the porosity of each row;
[0019] Calculate the average value of the element values of the strip elements in each row to obtain the average value of the strip elements in each row.
[0020] As one possible implementation, determining the key result information based on the multiple key factor information includes:
[0021] The product of the void density and the average value of the strip elements in each row is calculated to obtain the characterization value of each row.
[0022] The elements of the row with the highest characterization value are used as the key result information.
[0023] As one possible implementation, extracting parallel stripe information from the original object image based on the key result information and the position of at least one row of elements in the multi-row elements includes:
[0024] Based on the element values of each element in the row with the highest representation degree value, at least one continuous element sequence is obtained;
[0025] The width of the parallel stripe corresponding to the continuous element sequence is determined based on the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence.
[0026] The angle of the parallel stripe corresponding to the continuous element sequence is determined based on the position of each element in the continuous element sequence.
[0027] As one possible implementation, before determining the width of the parallel stripe corresponding to the continuous element sequence based on the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence, the method further includes:
[0028] Based on the element value of each element in the continuous element sequence, a threshold is selected to obtain the initial denoising threshold of the continuous element sequence.
[0029] Based on the initial denoising threshold, the elements in the continuous element sequence are filtered.
[0030] As one possible implementation, before determining the width of the parallel stripe corresponding to the continuous element sequence based on the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence, the method further includes:
[0031] Based on the element value of each element in the continuous element sequence, a threshold is selected to obtain the initial denoising threshold of the continuous element sequence.
[0032] The target denoising threshold of the continuous element sequence is determined based on the initial denoising threshold and the preset coefficients.
[0033] Based on the target denoising threshold, the elements in the continuous element sequence are filtered.
[0034] As one possible implementation, performing Hough line detection on the transformed image to obtain line detection results includes:
[0035] Using the center point of the transformed image as the origin of the polar coordinate system, Hough line detection is performed on the transformed image to obtain the line detection result.
[0036] As one possible implementation, the original object image includes any of the following: an image containing crop rows, a utility pole image, or a power line image;
[0037] The parallel strip information includes any one of the following: the angle and width of the crop row, the angle and width of the utility pole, the angle of the wire, and the distance between adjacent wires.
[0038] Secondly, embodiments of this application provide an object information extraction device, comprising:
[0039] The transformation module is used to perform image transformation on the original object image to obtain a transformed image, wherein the transformed image is a binarized image or a mask image of the original object image;
[0040] The detection module is used to perform Hough line detection on the transformed image to obtain line detection results. The line detection results include multiple rows of elements, each element corresponding to a line in the original object image. The position of each element is used to characterize the position of the corresponding line in the original object image, and the element value of each element is used to characterize the reliability of the line.
[0041] The determination module is used to determine key result information based on the element values of the multi-row elements. The key result information is used to characterize the parallel stripes of the object in the original object image.
[0042] The extraction module is used to extract parallel strip information in the original object image based on the key result information and the position of at least one row of elements in the multi-row elements. The parallel strip information includes the angle and width of the parallel strips of the object in the original object image.
[0043] As one possible implementation, the determining module is specifically used for:
[0044] Based on the element values of the multi-row elements, several key factor information is determined, including: void density and average value of strip elements;
[0045] Based on the information of the multiple key factors, the key result information is determined.
[0046] As one possible implementation, the multi-row elements are stored in a two-dimensional array, and the position of each element in the two-dimensional array is used to represent the position of the corresponding straight line in the original object image. The element value of each element in the two-dimensional array is used to indicate the number of straight lines in Hough space that pass through the points corresponding to the positions in the two-dimensional array.
[0047] The determining module is specifically used for:
[0048] Based on the element values of the elements in each row of the two-dimensional array, determine the striped elements and non-striped elements in each row;
[0049] Calculate the ratio of the number of non-strip elements in each row to the sum of the number of striped and non-striped elements in each row to obtain the porosity of each row;
[0050] Calculate the average value of the element values of the strip elements in each row to obtain the average value of the strip elements in each row.
[0051] As one possible implementation, the determining module is specifically used for:
[0052] The product of the void density and the average value of the strip elements in each row is calculated to obtain the characterization value of each row.
[0053] The elements of the row with the highest characterization value are used as the key result information.
[0054] As one possible implementation, the extraction module is specifically used for:
[0055] Based on the element values of each element in the row with the highest representation degree value, at least one continuous element sequence is obtained;
[0056] The width of the parallel stripe corresponding to the continuous element sequence is determined based on the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence.
[0057] The angle of the parallel stripe corresponding to the continuous element sequence is determined based on the position of each element in the continuous element sequence.
[0058] As one possible implementation, the determining module is further configured to:
[0059] Based on the element value of each element in the continuous element sequence, a threshold is selected to obtain the initial denoising threshold of the continuous element sequence.
[0060] Based on the initial denoising threshold, the elements in the continuous element sequence are filtered.
[0061] As one possible implementation, the determining module is further configured to:
[0062] Based on the element value of each element in the continuous element sequence, a threshold is selected to obtain the initial denoising threshold of the continuous element sequence.
[0063] The target denoising threshold of the continuous element sequence is determined based on the initial denoising threshold and the preset coefficients.
[0064] Based on the target denoising threshold, the elements in the continuous element sequence are filtered.
[0065] As one possible implementation, the detection module is specifically used for:
[0066] Using the center point of the transformed image as the origin of the polar coordinate system, Hough line detection is performed on the transformed image to obtain the line detection result.
[0067] As one possible implementation, the original object image includes any of the following: an image containing crop rows, a telephone pole image, or a wire image;
[0068] The parallel strip information includes any one of the following: the angle and width of the crop row, the angle and width of the utility pole, the angle of the wire, and the distance between adjacent wires.
[0069] Thirdly, embodiments of this application provide a smart agriculture system, including:
[0070] Acquisition device, used to acquire the original object image;
[0071] A processing device is used to process the original object image obtained by the acquisition device according to the object information extraction method described in the first aspect above, so as to obtain parallel strip information in the original object image;
[0072] A graphical user interface device for generating display information of the corresponding original object based on the parallel strip information.
[0073] Fourthly, embodiments of this application provide an electronic device, including: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to perform the steps of the object information extraction method as described in the first aspect above.
[0074] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the object information extraction method described in the first aspect above.
[0075] The object information extraction method, apparatus, smart agriculture system, and electronic device provided in this application, after transforming the original object image to obtain a transformed image and performing Hough line detection on the transformed image to obtain line detection results, utilize the element values of multiple rows of the line detection results to determine key result information that can characterize parallel stripes of the object. Based on this key result information and the position of at least one row of elements in the multiple rows of the line detection results, parallel stripe information in the original object image can be extracted, thereby achieving accurate identification of linear or strip-shaped objects in the original object image. The above process utilizes the characteristic that parallel stripes of an object can form straight lines. By detecting straight lines, determining key result information, and extracting parallel stripe information, linear or strip-shaped objects in the original object image can be quickly and accurately identified, thus greatly reducing the complexity of identification. Furthermore, the above process only involves processing information on the straight lines and stripes formed by the object, without needing to consider the type of object. Therefore, it is applicable to the identification of any linear or strip-shaped object, thus greatly improving the applicability of the method. In addition, by identifying key result information, it is possible to find some elements in the multi-row that are sufficient to identify parallel stripes in the original object image. Parallel stripe information can be obtained by extracting these elements without having to extract based on all elements, thus greatly improving processing efficiency. Attached Figure Description
[0076] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0077] Figure 1 A flowchart illustrating the object information extraction method provided in this application embodiment;
[0078] Figure 2 This is a schematic diagram of the transformed image obtained after binarizing the original object image;
[0079] Figure 3 This is a visual diagram of the line detection result obtained after step S102;
[0080] Figure 4 This is a visual diagram of the parallel stripes extracted after step S104;
[0081] Figure 5 A visualization of the line detection results obtained when the origin of the polar coordinate system is set at a vertex of the image;
[0082] Figure 6 This is a flowchart illustrating the process of determining key result information in the object information extraction method provided in this application embodiment;
[0083] Figure 7 This is a schematic diagram of the process for determining the void density and the average value of the strip elements in the object information extraction method provided in the embodiments of this application;
[0084] Figure 8 A flowchart illustrating the process of extracting parallel stripe information using the object information extraction method provided in this application embodiment;
[0085] Figure 9 A module structure diagram of the object information extraction device provided in the embodiments of this application;
[0086] Figure 10 This is a schematic diagram of the structure of the electronic device 100 provided in an embodiment of this application. Detailed Implementation
[0087] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0088] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0089] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0090] Current methods typically involve training neural network models to identify linear or strip-shaped objects. This approach involves constructing a large number of training samples and labeling the locations of these linear or strip-shaped objects within the training samples. For example, to identify cotton rows in a cotton field, existing techniques require labeling the edge coordinates of the cotton rows in the image to indicate their location. Furthermore, during the training process of a neural network model, the model learns the features of linear or strip-shaped objects from the training samples, thus enabling the trained model to identify such objects in an image.
[0091] However, the essence of existing solutions lies in the fact that neural network models are built to recognize the features of linear or strip-shaped objects themselves. This inherent limitation leads to excessive complexity and poor applicability in neural networks. Specifically, firstly, the features of linear or strip-shaped objects are inherently complex; therefore, neural network models need complex network structures and parameters to learn and process these features. Furthermore, to improve and ensure the recognition ability of the neural network model, a large number of labeled training samples are required for training. This results in excessive complexity in the training process and network structure. Secondly, neural network models can only learn the learning capabilities of the domain of the training samples and cannot apply this capability to other domains. For example, if labeled cotton field images are used as training samples, the trained neural network model can identify cotton rows in the cotton field, but it cannot identify telephone poles. Therefore, the applicability of existing neural network models is poor.
[0092] Based on the above-mentioned problems, this application proposes an object information extraction method. This method abandons the existing approach of linear or strip-shaped object recognition based on neural network models learning the features of the linear or strip-shaped objects themselves. Instead, it is based on the commonality that linear or strip-shaped objects can form straight lines. By recognizing and processing straight lines in the image, the parallel strip information of linear or strip-shaped objects in the image can be accurately extracted to achieve accurate recognition of linear or strip-shaped objects, thereby significantly reducing the complexity of recognition and significantly improving the applicability of recognition.
[0093] The embodiments of this application can be applied to any scenario requiring the identification of linear or strip-shaped obstacles. For example, in the intelligent management of cotton fields, the method of this application can be used to identify the planting areas of cotton rows, thereby enabling seedling emergence rate statistics, weed identification, and operation navigation. As another example, in the flight control scenario of unmanned aerial vehicles (UAVs), the method of this application can be used to identify linear or strip-shaped obstacles such as power lines and utility poles, thereby enabling obstacle avoidance based on the identified power lines and utility poles.
[0094] Figure 1This is a flowchart illustrating the object information extraction method provided in this application embodiment. The executing entity of this method can be any electronic device with computing power, such as a desktop computer, server, etc. Figure 1 As shown, the method includes:
[0095] S101. Perform image transformation on the original object image to obtain the transformed image, which is a binarized image or a mask image of the original object image.
[0096] Optionally, the aforementioned original object image may refer to an image containing the object to be identified. For example, when the object is a row of cotton plants in a cotton field, the original object image is an image containing the cotton field. When the object is a utility pole, the original image is an image containing the utility pole. The original object image can be obtained by taking pictures in the area where the object is located using a device with image acquisition capabilities, such as a drone. This application does not specifically limit the format of the original object image.
[0097] Optionally, the transformed image obtained by performing an image transformation on the original object image can be used for subsequent line detection. In one optional approach, the original object image can be binarized, resulting in the binarized image described above. Specifically, during the binarization process, the grayscale value of each pixel in the original object image can be transformed to 0 or 255 according to the original pixel values, so that the transformed image exhibits only black and white, facilitating subsequent line detection. In another optional approach, the original object image can be masked, resulting in the masked image described above. Specifically, before masking, an image mask can be generated by specifying data values, data ranges, regions of interest, etc. The image mask can be a two-dimensional matrix array or a multi-valued image, etc. Then, during masking, the image mask is multiplied by the original object image to obtain the transformed image, causing some regions in the transformed image to be masked, retaining only the region of interest for subsequent line detection.
[0098] S102. Perform Hough line detection on the transformed image to obtain line detection results. The line detection results include multiple rows of elements, each element corresponding to a line in the original object image. The position of each element is used to characterize the position of the corresponding line in the original object image, and the element value of each element is used to characterize the reliability of the line.
[0099] Optionally, the coordinate system of the transformed image and the Hough coordinates in Hough space have the following mapping relationship: each point in the original coordinate system can be mapped to a straight line in the Hough coordinate system. Similarly, each point in the Hough coordinate system can also be mapped to a straight line in the original coordinate system. Accordingly, a straight line in the original coordinate system can be evaluated by the number of lines intersecting at a single point in the Hough coordinate system. Specifically, in the Hough coordinate system, the more straight lines passing through a point, the more points constitute the line mapped to that point in the original coordinate system, and the greater the probability that the line mapped to that point in the original coordinate system is a straight line.
[0100] Optionally, the original coordinate system of the original object image can be either a Cartesian coordinate system or a polar coordinate system.
[0101] Based on the above mapping relationship, when performing Hough line detection on the transformed image, we can first use the mapping relationship to map all points in the original coordinate system to a straight line in the Hough coordinate system. Then, we judge the points where the lines intersect. If the number of lines passing through a certain point reaches a threshold, then the line mapped to that point in the original coordinate system can be taken as a straight line in the original object image. After the Hough line detection is completed, the above line detection results can be obtained, which include the aforementioned multi-row elements. For example, the line detection results can be presented in the form of a two-dimensional array, which includes multiple rows of elements. The number of elements in each row of the two-dimensional array can be one or more. For each element in each row of the two-dimensional array, its position in the matrix can represent the position of the straight line corresponding to that element in the original object image. The position of the element in the matrix can refer to the row and column of the element. At the same time, the element value can represent the reliability of the straight line corresponding to that element. For example, the larger the element value, the higher the reliability of the straight line corresponding to that element. It should be understood that the higher the reliability, the greater the probability that it belongs to a straight line, and the more reliable the result.
[0102] S103. Based on the element values of the above multi-row elements, determine the key result information, which is used to characterize the parallel stripes of the objects in the above original object image.
[0103] Since each element in the aforementioned multi-row elements corresponds to a straight line in the original object image, and the element values of each element can characterize the reliability of the straight line, the aforementioned key result information can be obtained by analyzing and comparing the element values of the multi-row elements. Optionally, the aforementioned key result information may include some elements determined from the aforementioned multi-row elements, which are sufficient to identify parallel stripes in the original object image. Therefore, the aforementioned key result information can characterize the object parallel stripes in the aforementioned original object image.
[0104] Optionally, the aforementioned parallel stripes refer to the stripes formed by objects in the original object image. These stripes can be either linear or band-like.
[0105] S104. Based on the above key result information and the position of at least one row of elements in the above multi-row elements, extract the parallel strip information in the above original object image. The parallel strip information includes the angle and width of the object parallel strip in the original object image.
[0106] Optionally, the aforementioned key result information can characterize the parallel stripes of the object in the original object image. Simultaneously, as mentioned earlier, the position of each element in the multi-row elements can characterize the position of the corresponding straight line in the original object image. Therefore, by combining these two types of information, the parallel stripe information in the original object image can be extracted. Specifically, this parallel stripe information includes the angle and width of the object's parallel stripe. The angle can refer to the relative tilt angle of the object's parallel stripe in the original object image, and the width can refer to the width occupied by the object's parallel stripe in the original object image.
[0107] Based on the above parallel strip information, the electronic device can determine the position of the parallel stripes of the object in the original object image, thereby achieving accurate identification of linear or strip-shaped objects in the original object image.
[0108] Figure 2 This is a schematic diagram of the transformed image obtained after binarizing the original object image, as shown below. Figure 2 As shown, each white stripe represents a parallel stripe of an object. Figure 3 This is a visual representation of the line detection result obtained after step S102, as shown below. Figure 3 As shown, the white highlighted areas indicate the locations of key result information, which is sufficient to identify parallel stripes in the original object image. Figure 4 This is a visual representation of the parallel stripes extracted after step S104, as shown below. Figure 4 As shown, each line segment corresponds to a parallel stripe of an object in the original object image. The height of the line segment in the vertical direction represents the angle of the object's parallel stripe, and the length of the line segment in the horizontal direction represents the width of the object's parallel stripe.
[0109] It is worth noting that, based on the parallel stripe information obtained in step S104 above, after performing an inverse Hough transform according to the dimensions of the original object image, an image consistent with the original object image can be obtained. For example, for... Figure 4 After performing an inverse Hough transform on the parallel strip information, we can obtain the same as... Figure 2 Consistent images. Among them, with Figure 2A consistent image refers to an image that is consistent with... Figure 2 The image in which the parallel stripes are in the same position.
[0110] In this embodiment, after transforming the original object image to obtain a transformed image and performing Hough line detection on the transformed image to obtain line detection results, the key result information that can characterize the parallel stripes of the object can be determined using the element values of multiple rows of the line detection results. Based on this key result information and the position of at least one row of elements in the multiple rows of the line detection results, the parallel stripe information in the original object image can be extracted, thereby achieving accurate identification of linear or strip-shaped objects in the original object image. The above process utilizes the characteristic that parallel stripes of an object can form straight lines. By detecting straight lines, determining key result information, and extracting parallel stripe information, linear or strip-shaped objects in the original object image can be quickly and accurately identified, thus greatly reducing the complexity of identification. Furthermore, the above process only involves processing information on the straight lines and stripes formed by the object, without needing to consider the type of object. Therefore, it is applicable to the identification of any linear or strip-shaped object, thus greatly improving the applicability of the method. In addition, by identifying key result information, it is possible to find some elements in the multi-row that are sufficient to identify parallel stripes in the original object image. Parallel stripe information can be obtained by extracting these elements without having to extract based on all elements, thus greatly improving processing efficiency.
[0111] As an optional implementation, when performing Hough line detection on the transformed image in step S102 above, the process can be as follows.
[0112] Using the center point of the transformed image as the origin of the polar coordinate system, Hough line detection is performed on the transformed image to obtain the above line detection results.
[0113] Optionally, when performing Hough line detection on the transformed image, if the origin of the polar coordinate system is set at another position in the image, such as the left vertex of the image, the line parameters in the line detection results will all fall into the same quadrant, resulting in overlapping and mixed line detection results. Figure 5 This is a visualization of the line detection results obtained when the origin of the polar coordinate system is set at a vertex of the image. Figure 5 As can be seen, this method causes the white highlighted areas to tilt, making it difficult to extract subsequent key result information. Considering this problem, this embodiment uses the center point of the transformed image as the origin of the polar coordinate system. This allows for a uniform distribution of line parameters and ensures that the line parameters corresponding to lines at the same angle fall into a concentrated area, thus facilitating the acquisition of key result information. Referring to the aforementioned... Figure 3Obviously, in the line detection results obtained by taking the center point of the transformed image as the origin of the polar coordinate system, the white highlighted part no longer appears tilted.
[0114] As described above, the embodiments of this application can be applied to any scenario requiring the identification of linear or strip-shaped objects. Therefore, the object targeted by the embodiments of this application can be any linear or strip-shaped object. For example, the object can be a row of crops, a utility pole, a power line, etc. Correspondingly, the original object image can be an image containing a row of crops, a utility pole, or a power line, etc.
[0115] Accordingly, the parallel strip information obtained using the application embodiments may be, for example, the angle and width of crop rows, the angle and width of utility poles, the angle of wires, and the distance between adjacent wires.
[0116] The process of determining key result information in step S103 above will be explained below.
[0117] Figure 6 This is a flowchart illustrating the process of determining key result information in the object information extraction method provided in this application embodiment, such as... Figure 6 As shown, one possible approach to step S103 above includes:
[0118] S601. Based on the element values of the above multi-row elements, determine several key factor information, including: void density and average value of strip elements.
[0119] S602. Based on the above key factor information, determine the above key result information.
[0120] As mentioned earlier, key result information is sufficient to identify parallel stripes in the original object image. Key result information consists of the elements in a multi-row image that best represent the parallel stripes. In this embodiment, key factor information is used to find the key result information.
[0121] Optionally, key factor information includes the aforementioned void density and average value of strip elements. Void density refers to the proportion of non-strip elements among multiple elements. Non-strip elements are those with values of zero or less than a threshold; these elements, due to their small values, cannot correspond to a true straight line in the original coordinate system. Corresponding to non-strip elements are strip elements, which are those with values greater than or equal to a threshold. For multiple elements in the straight line detection result, void density measures the spacing between parallel stripes. Based on this spacing, the elements that best represent parallel stripes can be identified, unaffected by non-strip elements interfering with the parallel stripes. In addition to void density, key factor information also includes the average value of strip elements. The average value of strip elements is obtained by statistically analyzing the element values of the strip elements. This average value measures the probability that elements form parallel stripes, and this probability can be used to identify the elements that best represent parallel stripes.
[0122] Based on the above-mentioned void density and the average value of the strip elements, multiple elements can be analyzed and measured to determine key result information.
[0123] In this embodiment, based on the element values of multiple rows of elements, several key factor information can be determined. This key factor information includes the void density and the average value of the strip elements. Using the void density, the spacing between parallel strips can be measured, and using the average value of the strip elements, the probability of elements forming parallel strips can be measured. Thus, based on the void density and the average value of the strip elements, key result information with high accuracy can be determined, thereby making the parallel strip information extracted based on the key result information highly accurate.
[0124] As one possible implementation, the aforementioned multi-row elements can be stored in a two-dimensional array. The position of each element in the two-dimensional array is used to represent the position of the corresponding straight line in the original object image, and the element value of each element in the two-dimensional array is used to indicate the number of straight lines in Hough space that pass through the point corresponding to the position in the two-dimensional array.
[0125] Specifically, each element in the two-dimensional array corresponds to a point in Hough space, and also to a straight line in the original object image. Therefore, the position of an element in the two-dimensional array represents the position of the corresponding straight line in the original object image. Furthermore, each element in the two-dimensional array has a value, which indicates the number of straight lines in Hough space that pass through the point corresponding to that element. The following example illustrates this. Assume the original object image uses polar coordinates. If there is an element in the two-dimensional array located at row a, column b, it means that this element corresponds to the point (a, b) in Hough space, and also to the straight line in the polar coordinate system with polar angle 'a' and polar radius 'b'. If the value of this element at row a, column b is 'c', it means that there are 'c' straight lines in Hough space that pass through the point (a, b).
[0126] Based on the above storage method for multi-row elements, one possible approach to step S601 includes:
[0127] Based on the element values of each row in the above two-dimensional array, determine the void density and the average value of the strip elements in each row.
[0128] Optionally, when multiple rows of elements are stored as a two-dimensional array, the gap density and average value of the strip elements in each row can be determined on a per-row basis.
[0129] By determining the void density and average value of each strip element in each row, the determined void density and average value of the strip elements can be highly matched with the parallel stripes, thereby improving the accuracy of the subsequent key result information and parallel strip information.
[0130] The process of determining the void density of each row and the average value of the strip elements is explained below.
[0131] Figure 7 This is a schematic diagram of the process for determining the void density and the average value of the strip elements in the object information extraction method provided in the embodiments of this application, as shown below. Figure 7 As shown, one possible method for determining the void density and average value of the strip elements based on the element values of the elements in each row includes:
[0132] S701. Based on the element values of the elements in each row of the two-dimensional array, determine the striped elements and non-striped elements in each row.
[0133] Optionally, as mentioned above, non-strip elements can refer to elements with values of zero or less than a threshold. Because of their small values, these elements cannot correspond to a true straight line in the original coordinate system. Conversely, striped elements can refer to elements with values greater than or equal to a threshold, and these striped elements can correspond to a true straight line in the original coordinate system. Therefore, in this step, each element in each row of the two-dimensional array can be evaluated individually. If an element's value is greater than or equal to the threshold, it is treated as a striped element; otherwise, it is treated as a non-striped element.
[0134] It is worth noting that in the original object image, there are generally no objects on the left and right edges of the image. At the same time, there are no objects or only scattered interfering objects between two parallel stripes of objects. Therefore, by determining the strip elements and non-strip elements in this step, the parts that do not belong to objects on the left and right edges and in the middle of the original object image can be identified.
[0135] S702. Calculate the ratio of the number of non-strip elements in each row to the sum of the number of striped and non-striped elements in each row to obtain the porosity of each row.
[0136] As mentioned earlier, void density refers to the proportion of non-striped elements among multiple elements. Specifically, in this step, since each row is the unit, the proportion of non-striped elements in each row relative to all elements can be calculated to obtain the void density for each row. The higher the proportion of non-striped elements, the higher the void density. Conversely, the lower the proportion of non-striped elements, the lower the void density.
[0137] S703. Calculate the average value of the element values of the strip elements in each row to obtain the average value of the strip elements in each row.
[0138] For example, the average value of the stripe elements in each row can be obtained by summing the element values of all stripe elements in each row and then dividing the sum by the number of stripe elements.
[0139] In this embodiment, the void density and the average value of the strip elements are calculated for each row, which ensures a high degree of matching between the determined void density and the average value of the strip elements and the parallel strips.
[0140] Based on the above determination of the void density and average value of the strip elements for each row, key result information can be determined in the following way.
[0141] Optionally, one possible approach to step S602 above includes:
[0142] The product of the void density and the average value of the strip elements in each row is calculated to obtain the characterization value of each row; the elements of the row with the highest characterization value are used as the key result information mentioned above.
[0143] Optionally, in this application, the gap density and average value of the strip elements determined through the aforementioned embodiments are positively correlated with the key result information. Specifically, for the original object image, there is inevitably some interference information between two truly parallel stripes of the object, such as weeds between two cotton rows, which is interference information. Obviously, the more interference information there is, the smaller the gap density between the parallel stripes of the object will be, and vice versa. Based on this, rows with larger gap densities can be found in each row for subsequent calculations, thereby minimizing the impact of interference information on subsequent calculations. If the average value of the strip elements in a row is larger, it indicates that there are more elements in that row that can represent straight lines, and the probability of forming parallel stripes is greater. Therefore, by combining the two positively correlated factors of gap density and average value of strip elements, multiplying the gap density and average value of strip elements in each row, we can obtain the representation degree value of each row. The larger the representation degree value of a row, the more accurately that row can be used to identify parallel stripes in the original object image. Based on this, the elements in the row with the highest representation value can be used as key result information. That is, key result information includes one row of elements in a two-dimensional array.
[0144] In this embodiment, by multiplying the gap density, which is positively correlated with the key result information, and the average value of the strip elements, the representation degree value of each row can be obtained. Then, the element of the row with the largest representation degree value can be used as the key result information, so that the key result information can be used to accurately identify parallel stripes in the original object image.
[0145] Based on the above method of taking the elements of the row with the highest characterization value as key result information, the parallel strip information in the original object image can be extracted through the following process.
[0146] Figure 8 This is a flowchart illustrating the process of extracting parallel stripe information using the object information extraction method provided in this application embodiment. Figure 8 As shown, one possible approach to step S104 above includes:
[0147] S801. Based on the element values of each element in the row with the highest representation degree value, obtain at least one continuous element sequence.
[0148] Optionally, based on the element values of each element in the row with the highest representation value, at least one continuous element sequence can be obtained. This continuous element sequence is a sequence composed of consecutive strip elements, where all elements are strip elements. Specifically, the elements in the row with the highest representation value can be traversed. Whenever an element with a value of 0 or less than a threshold (i.e., a non-strip element) is encountered, the elements between the strip elements preceding that element and the first strip element following the previous continuous element sequence are considered as a continuous element sequence. This process continues until the row with the highest representation value has been traversed.
[0149] For example, suppose the elements of the row with the highest characterization value are arranged in order as: 35600653405326, where a value of 0 indicates that the element at that position is a non-strip element, and a value of non-zero indicates that the element at that position is a strip element. Then, through the above process, three consecutive element sequences can be obtained, namely: 356, 6534, and 5326.
[0150] S802. Determine the width of the parallel stripe corresponding to the object in each continuous element sequence based on the polar radius corresponding to the first element and the polar radius corresponding to the last element.
[0151] Once at least one continuous sequence of elements is identified, each element sequence can indicate a parallel stripe for an object. The information of the parallel stripe can then be obtained by parsing the information of the continuous sequence of elements. In this step, the width of the parallel stripe corresponding to the object corresponding to the continuous sequence of elements can be obtained by subtracting the polar radius corresponding to the first element from the polar radius corresponding to the last element. As an example, the polar radius corresponding to the last element can be the column number of the last element, and the polar radius corresponding to the first element can be the column number of the first element. It should be noted that the column number does not represent the column number of the element in the two-dimensional array, but rather the polar radius value corresponding to the column of the element in the two-dimensional data.
[0152] S803. Determine the angle of the parallel strip of the object corresponding to the continuous element sequence based on the position of each element in the continuous element sequence.
[0153] As an example, the row number of each element in a two-dimensional array can be used to represent the polar angle of the line corresponding to that element in the original coordinate system. All elements in the same row of the two-dimensional array have the same polar angle. The position of each element in a continuous sequence of elements includes its row number and column number. By reading the row number of any element in a continuous sequence of elements, the angle of the parallel strip of the object corresponding to the continuous sequence of elements can be obtained.
[0154] It is worth noting that the execution order of the above steps S802-S803 is not important and can be flexibly adjusted.
[0155] In this embodiment, after determining the continuous element sequence, the angle and width of the parallel strip of the object corresponding to the continuous element sequence can be obtained quickly and accurately by parsing and processing the position information of each element in the continuous element sequence.
[0156] In practical implementation, since the original object image may contain interference information, the two-dimensional array may also contain interference elements, and correspondingly, the resulting continuous element sequence may also contain interference elements. Therefore, before using the continuous element sequence to determine the angle and width of the object's parallel stripes, the continuous element sequence can be filtered to remove noise. This can be achieved through either of the following two methods.
[0157] In the first method, a threshold can be selected based on the element value of each element in the continuous element sequence to obtain the initial denoising threshold of the continuous element sequence, and the elements in the continuous element sequence can be filtered based on the initial denoising threshold.
[0158] In this method, an appropriate initial denoising threshold can be selected based on the element values of each element in the continuous element sequence. For example, if the element values of most elements in the continuous element sequence are relatively large, a larger threshold can be selected as the initial denoising threshold. When filtering elements in the continuous element sequence based on the initial denoising threshold, the element values of elements with values less than the initial denoising threshold can be adjusted, for example, by setting the element value to 0, so that the element becomes a non-strip element.
[0159] In the second approach, a threshold can be selected based on the element value of each element in the continuous element sequence to obtain an initial denoising threshold for the continuous element sequence; a target denoising threshold for the continuous element sequence can be determined based on the initial denoising threshold and a preset coefficient; and the elements in the continuous element sequence can be filtered based on the target denoising threshold.
[0160] The method for determining the initial denoising threshold in this approach is the same as the first approach described above, and will not be repeated here. Based on this, the initial denoising threshold can be multiplied by a preset coefficient to obtain the target denoising threshold. This target denoising threshold is then used to filter the continuous element sequence. Specifically, the element values of elements whose values are less than the target denoising threshold can be adjusted, for example, by setting the element value to 0, so that the element becomes a non-strip element.
[0161] Because a preset coefficient is incorporated into the initial denoising threshold, the filtering process for continuous element sequences becomes more flexible and controllable.
[0162] It is worth noting that after filtering the continuous element sequence using the two methods described above, the original continuous element sequence may be divided into multiple continuous element sequences. The angle and width of the object's parallel strip can be determined based on these divided continuous element sequences using the method described in the previous embodiment.
[0163] Based on the same inventive concept, this application also provides an object information extraction device corresponding to the object information extraction method. Since the principle of the device in this application is similar to the object information extraction method described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0164] Figure 9 This is a module structure diagram of the object information extraction device provided in the embodiments of this application, such as... Figure 9 As shown, the device includes:
[0165] The transformation module 901 is used to perform image transformation on the original object image to obtain a transformed image, wherein the transformed image is a binarized image or a mask image of the original object image.
[0166] The detection module 902 is used to perform Hough line detection on the transformed image to obtain a line detection result. The line detection result includes multiple rows of elements, each element corresponding to a line in the original object image. The position of each element is used to characterize the position of the corresponding line in the original object image, and the element value of each element is used to characterize the reliability of the line.
[0167] The determination module 903 is used to determine key result information based on the element values of the multi-row elements. The key result information is used to characterize the parallel stripes of the objects in the original object image.
[0168] The extraction module 904 is used to extract parallel strip information in the original object image based on the key result information and the position of at least one row of elements in the multi-row elements. The parallel strip information includes the angle and width of the object parallel strip in the original object image.
[0169] As an optional implementation, the determining module 903 is specifically used for:
[0170] Based on the element values of the multiple rows of elements, several key factor information is determined, including: void density and average value of strip elements.
[0171] Based on the information of the multiple key factors, the key result information is determined.
[0172] As an optional implementation, the multi-row elements are stored in a two-dimensional array. The position of each element in the two-dimensional array is used to represent the position of the corresponding straight line in the original object image. The element value of each element in the two-dimensional array is used to indicate the number of straight lines in Hough space that pass through the point corresponding to the position in the two-dimensional array.
[0173] The determining module 903 is specifically used for:
[0174] Based on the element values of the elements in each row of the two-dimensional array, determine the striped elements and non-striped elements in each row.
[0175] The void density of each row is obtained by calculating the ratio of the number of non-strip elements to the sum of the number of striped and non-striped elements in each row.
[0176] Calculate the average value of the element values of the strip elements in each row to obtain the average value of the strip elements in each row.
[0177] As an optional implementation, the determining module 903 is specifically used for:
[0178] The characterization value of each row is obtained by calculating the product of the void density and the average value of the strip elements for each row.
[0179] The elements of the row with the highest characterization value are used as the key result information.
[0180] As an optional implementation, the extraction module 904 is specifically used for:
[0181] Based on the element values of each element in the row with the highest representation value, at least one continuous element sequence is obtained.
[0182] The width of the parallel stripe corresponding to the continuous element sequence is determined based on the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence.
[0183] The angle of the parallel stripe corresponding to the continuous element sequence is determined based on the position of each element in the continuous element sequence.
[0184] As an optional implementation, the determining module 903 is further configured to:
[0185] Based on the element value of each element in the continuous element sequence, a threshold is selected to obtain the initial denoising threshold of the continuous element sequence.
[0186] Based on the initial denoising threshold, the elements in the continuous element sequence are filtered.
[0187] As an optional implementation, the determining module 903 is further configured to:
[0188] Based on the element value of each element in the continuous element sequence, a threshold is selected to obtain the initial denoising threshold of the continuous element sequence.
[0189] The target denoising threshold of the continuous element sequence is determined based on the initial denoising threshold and the preset coefficient.
[0190] Based on the target denoising threshold, the elements in the continuous element sequence are filtered.
[0191] As an optional implementation, the detection module 902 is specifically used for:
[0192] Using the center point of the transformed image as the origin of the polar coordinate system, Hough line detection is performed on the transformed image to obtain the line detection result.
[0193] As an optional implementation, the original object image includes any of the following: an image containing crop rows, a utility pole image, or a power line image.
[0194] The parallel strip information includes any one of the following: the angle and width of the crop row, the angle and width of the utility pole, the angle of the wire, and the distance between adjacent wires.
[0195] This application embodiment also provides a smart agriculture system, which includes:
[0196] An acquisition device used to acquire a raw image of an object.
[0197] The processing device is used to process the original object image obtained by the acquisition device using the object information extraction method described in the foregoing method embodiments, so as to obtain the parallel strip information in the original object image.
[0198] A graphical user interface device for generating display information of the corresponding original object based on the parallel strip information.
[0199] It should be noted that this smart agriculture system can execute the method steps in the aforementioned method embodiments. In addition to the technical effects achievable by the methods in the aforementioned method embodiments, the graphical interface device generates display information of the corresponding original objects based on the parallel strip information. This allows users to easily view object information in the plot area corresponding to the original object image. For example, it allows users to clearly see information such as crop rows, power lines, and / or utility poles. It also facilitates the system to control the operating equipment to perform adaptive operations based on the parallel strip information, or to send the parallel strip information to the operating equipment so that the operating equipment can operate autonomously. For example, the operating equipment can accurately operate along the crop rows and avoid obstacles such as power lines or utility poles.
[0200] This application also provides an electronic device 100, such as... Figure 10 The diagram shown is a schematic representation of the structure of an electronic device 100 provided in an embodiment of this application. It includes a processor 1001, a memory 1002, and optionally, a bus 1003. The memory 1002 stores machine-readable instructions executable by the processor 1001 (e.g., ...). Figure 9 The device includes a transformation module 901, a detection module 902, a determination module 903, and an extraction module 904 (with corresponding execution instructions, etc.). When the electronic device 100 is running, the processor 1001 and the memory 1002 communicate via a bus 1003. When the machine-readable instructions are executed by the processor 1001, the method steps in the aforementioned method embodiment are performed.
[0201] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the object information extraction method described above.
[0202] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0203] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0204] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for extracting object information, characterized in that, include: The original object image is transformed to obtain a transformed image, which is a binarized image or a mask image of the original object image. The transformed image is subjected to Hough line detection to obtain line detection results. The line detection results include multiple rows of elements, each element corresponding to a line in the original object image. The position of each element is used to characterize the position of the corresponding line in the original object image, and the element value of each element is used to characterize the reliability of the line. Based on the element values of the multi-row elements, key result information is determined, which is used to characterize the parallel stripes of the object in the original object image; Based on the key result information and the position of at least one row of elements in the multi-row elements, parallel strip information in the original object image is extracted. The parallel strip information includes the angle and width of the object parallel strip in the original object image. The step of determining key result information based on the element values of the multiple rows of elements includes: Based on the element values of the multi-row elements, several key factor information is determined, including: void density and average value of strip elements; Based on the information of the multiple key factors, the key result information is determined; The multi-row elements are stored in a two-dimensional array. The position of each element in the two-dimensional array is used to represent the position of the corresponding straight line in the original object image. The element value of each element in the two-dimensional array is used to indicate the number of straight lines in Hough space that pass through the points corresponding to the positions in the two-dimensional array. The step of determining multiple key factor information based on the element values of the multiple rows of elements includes: Based on the element values of the elements in each row of the two-dimensional array, determine the striped elements and non-striped elements in each row; Calculate the ratio of the number of non-strip elements in each row to the sum of the number of striped and non-striped elements in each row to obtain the porosity of each row; Calculate the average value of the element values of the strip elements in each row to obtain the average value of the strip elements in each row.
2. The method according to claim 1, characterized in that, The step of determining the key result information based on the multiple key factor information includes: The product of the void density and the average value of the strip elements in each row is calculated to obtain the characterization value of each row. The elements of the row with the highest characterization value are used as the key result information.
3. The method according to claim 2, characterized in that, The step of extracting parallel stripe information from the original object image based on the key result information and the position of at least one row of elements in the multi-row elements includes: Based on the element values of each element in the row with the highest representation degree value, at least one continuous element sequence is obtained; The width of the parallel stripe corresponding to the continuous element sequence is determined based on the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence. The angle of the parallel stripe corresponding to the continuous element sequence is determined based on the position of each element in the continuous element sequence.
4. The method according to claim 3, characterized in that, Before determining the width of the parallel stripe corresponding to the continuous element sequence based on the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence, the method further includes: Based on the element value of each element in the continuous element sequence, a threshold is selected to obtain the initial denoising threshold of the continuous element sequence. Based on the initial denoising threshold, the elements in the continuous element sequence are filtered.
5. The method according to claim 3, characterized in that, Before determining the width of the parallel stripe corresponding to the continuous element sequence based on the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence, the method further includes: Based on the element value of each element in the continuous element sequence, a threshold is selected to obtain the initial denoising threshold of the continuous element sequence. The target denoising threshold of the continuous element sequence is determined based on the initial denoising threshold and the preset coefficients. Based on the target denoising threshold, the elements in the continuous element sequence are filtered.
6. The method according to any one of claims 1-5, characterized in that, The step of performing Hough line detection on the transformed image to obtain line detection results includes: Using the center point of the transformed image as the origin of the polar coordinate system, Hough line detection is performed on the transformed image to obtain the line detection result.
7. The method according to any one of claims 1-5, characterized in that, The original object image includes any one of the following: an image containing crop rows, a utility pole image, or a power line image; The parallel strip information includes any one of the following: the angle and width of the crop row, the angle and width of the utility pole, the angle of the wire, and the distance between adjacent wires.
8. An object information extraction device, characterized in that, include: The transformation module is used to perform image transformation on the original object image to obtain a transformed image, wherein the transformed image is a binarized image or a mask image of the original object image; The detection module is used to perform Hough line detection on the transformed image to obtain line detection results. The line detection results include multiple rows of elements, each element corresponding to a line in the original object image. The position of each element is used to characterize the position of the corresponding line in the original object image, and the element value of each element is used to characterize the reliability of the line. The determination module is used to determine key result information based on the element values of the multi-row elements. The key result information is used to characterize the parallel stripes of the object in the original object image. The extraction module is used to extract parallel strip information in the original object image based on the key result information and the position of at least one row of elements in the multi-row elements. The parallel strip information includes the angle and width of the object parallel strip in the original object image. The determining module is specifically used for: Based on the element values of the multi-row elements, several key factor information is determined, including: void density and average value of strip elements; Based on the information of the multiple key factors, the key result information is determined; The multi-row elements are stored in a two-dimensional array. The position of each element in the two-dimensional array is used to represent the position of the corresponding straight line in the original object image. The element value of each element in the two-dimensional array is used to indicate the number of straight lines in Hough space that pass through the points corresponding to the positions in the two-dimensional array. The determining module is specifically used for: Based on the element values of the elements in each row of the two-dimensional array, determine the striped elements and non-striped elements in each row; Calculate the ratio of the number of non-strip elements in each row to the sum of the number of striped and non-striped elements in each row to obtain the porosity of each row; Calculate the average value of the element values of the strip elements in each row to obtain the average value of the strip elements in each row.
9. A smart agriculture system, characterized in that, include: Acquisition device, used to acquire the original object image; A processing device is used to process the original object image obtained by the acquisition device using the object information extraction method according to any one of claims 1 to 7, so as to obtain parallel strip information in the original object image; A graphical user interface device for generating display information of the corresponding original object based on the parallel strip information.
10. An electronic device, characterized in that, include: A processor and a memory, the memory storing machine-readable instructions executable by the processor, wherein when the electronic device is running, the processor executes the machine-readable instructions to perform the steps of the object information extraction method as described in any one of claims 1 to 7.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the object information extraction method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for identifying farmland soil surface, agricultural machine and medium
CN113807131A
