Object information extraction method and device, intelligent agricultural system and electronic equipment

By transforming the image and detecting the Hough linearly, parallel strip information is extracted, and the problems of high complexity and poor applicability of linear or strips are solved in the prior art, and the cotton field and drone wires are realized. Accurate identification reduces the complexity of identification and improves applicability.

CN119091147APending Publication Date: 2024-12-06GUANGZHOU XAIRCRAFT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310668001.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-06
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The method of identifying linear or strips in the prior art has high computational complexity and poor applicability, and cannot effectively identify linear or strip-shaped obstacles such as cotton rows in cotton fields and electric wires in drone flights.

Method used

By performing image transformation and Hough linear detection on the original object image, parallel strip information, including angle and width, and using the multi-row element values ​​of the linear detection result to determine the key result information, so as to achieve accurate identification of linear or strip objects.

Benefits of technology

It significantly reduces the recognition complexity, improves the applicability of recognition, and can quickly and accurately identify linear or strips in the image without paying attention to the type of object, improving processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091147A_ABST
    Figure CN119091147A_ABST
Patent Text Reader

Abstract

The invention provides an object information extraction method and device, an intelligent agricultural system and electronic equipment, and the method comprises the steps: carrying out the image transformation of an original object image, and obtaining a transformed image; the transformed image is subjected to Hough straight line detection, a straight line detection result is obtained, the straight line detection result comprises multiple rows of elements, each element corresponds to a straight line in the original object image, and the position of each element is used for representing the position of the corresponding straight line in the original object image; the element value of each element is used for representing the reliability degree of the straight line; key result information is determined according to the element values of the multiple rows of elements, and the key result information is used for representing object parallel stripes in the original object image; and extracting parallel stripe information in the original object image according to the key result information and the position of at least one row of elements in the plurality of rows of elements. According to the method, the calculation complexity can be remarkably reduced, and the applicability is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and more specifically, to an object information extraction method, device, smart agriculture system and electronic equipment. Background Art

[0002] In some intelligent systems, linear or strip-shaped objects need to be identified. For example, in the intelligent management scenario of cotton fields, cotton rows need to be identified so that the identified cotton rows can be used for seedling rate statistics, weed identification, operation navigation, etc. For another example, in the flight control scenario of drones, linear or strip-shaped obstacles such as wires and poles need to be identified so that obstacle avoidance can be performed based on the identified wires and poles.

[0003] In the prior art, a neural network model can be trained, and an image of the area to be identified is input into the neural network model, and the neural network model identifies and outputs the position of the linear or strip-shaped object in the image.

[0004] However, the existing methods have the problems of high computational complexity and poor applicability. Summary of the invention

[0005] The purpose of this application is to provide an object information extraction method, device, smart agriculture system and electronic device to address the deficiencies in the above-mentioned prior art, so as to solve the problems of high computational complexity and poor applicability in the prior art.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, the present application provides an object information extraction method, comprising:

[0008] Performing image transformation on the original object image to obtain a transformed image, wherein the transformed image is a binary image or a mask image of the original object image;

[0009] Performing Hough line detection on the transformed image to obtain a line detection result, wherein the line detection result includes multiple rows of elements, each element corresponds to a line in the original object image, the position of each element is used to represent the position of the corresponding line in the original object image, and the element value of each element is used to represent the reliability of the line;

[0010] Determining key result information according to element values ​​of the multiple rows of elements, wherein the key result information is used to characterize object parallel strips in the original object image;

[0011] According to the key result information and the position of at least one row of elements in the multiple rows of elements, parallel stripe information in the original object image is extracted, and the parallel stripe information includes: an angle and a width of the object parallel stripe in the original object image.

[0012] As a possible implementation manner, determining the key result information according to the element values ​​of the multiple lines of elements includes:

[0013] Determine multiple key factor information according to the element values ​​of the multiple rows of elements, the key factor information including: gap density and strip element average value;

[0014] The key result information is determined according to the plurality of key factor information.

[0015] As a possible implementation, the multiple rows of 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 a 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 passing through the point corresponding to the position in the two-dimensional array in the Hough space;

[0016] The determining of multiple key factor information according to the element values ​​of the multiple rows of elements includes:

[0017] Determine the stripe elements and the non-stripe elements in each row according to the element values ​​of the elements in each row of the two-dimensional array;

[0018] Calculate the ratio of the number of non-strip elements in each row to the sum of the number of strip elements and non-strip elements in each row to obtain the void density of each row;

[0019] The average values ​​of the element values ​​of the strip elements in each row are calculated respectively to obtain the average value of the strip elements in each row.

[0020] As a possible implementation manner, determining the key result information according to the multiple key factor information includes:

[0021] Calculate the product of the void density of each row and the average value of the strip elements to obtain the representation degree value of each row;

[0022] Each element of the row with the largest representation degree value is used as the key result information.

[0023] As a possible implementation manner, extracting the parallel stripe information in the original object image according to the key result information and the position of at least one row of elements in the multiple rows of elements includes:

[0024] Obtain at least one continuous element sequence according to the element value of each element of the row with the maximum representation degree value;

[0025] Determine the width of the object parallel strip corresponding to the continuous element sequence according to the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence;

[0026] According to the position of each element in each continuous element sequence, the angle of the object parallel strip corresponding to the continuous element sequence is determined.

[0027] As a possible implementation manner, before determining the width of the object parallel strip corresponding to the continuous element sequence according to 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] Selecting a threshold value according to the element value of each element in the continuous element sequence to obtain an initial denoising threshold value of the continuous element sequence;

[0029] Based on the initial denoising threshold, filtering processing is performed on the elements in the continuous element sequence.

[0030] As a possible implementation manner, before determining the width of the object parallel strip corresponding to the continuous element sequence according to 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] Selecting a threshold value according to the element value of each element in the continuous element sequence to obtain an initial denoising threshold value of the continuous element sequence;

[0032] Determining a target denoising threshold of the continuous element sequence according to the initial denoising threshold and a preset coefficient;

[0033] Based on the target denoising threshold, filtering processing is performed on the elements in the continuous element sequence.

[0034] As a possible implementation manner, performing Hough line detection on the transformed image to obtain a line detection result includes:

[0035] Taking 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 a possible implementation, the original object image includes any one of the following: an image containing crop rows, an image of electric poles, an image of electric wires;

[0037] The parallel strip information includes any one of the following: the angle and width of crop rows, the angle and width of electric poles, the angle of electric wires and the distance between adjacent electric wires.

[0038] In a second aspect, an embodiment of the present application provides an object information extraction device, comprising:

[0039] A transformation module, used for performing image transformation on the original object image to obtain a transformed image, wherein the transformed image is a binary image or a mask image of the original object image;

[0040] A detection module, used to perform Hough line detection on the transformed image to obtain a line detection result, wherein the line detection result includes multiple rows of elements, each element corresponds to a line in the original object image, the position of each element is used to represent the position of the corresponding line in the original object image, and the element value of each element is used to represent the reliability of the line;

[0041] A determination module, configured to determine key result information according to element values ​​of the multiple rows of elements, wherein the key result information is used to characterize object parallel strips in the original object image;

[0042] The extraction module is used to extract the parallel stripe information in the original object image according to the key result information and the position of at least one row of elements in the multiple rows of elements, and the parallel stripe information includes: the angle and width of the parallel stripes of the object in the original object image.

[0043] As a possible implementation manner, the determining module is specifically used for:

[0044] Determine multiple key factor information according to the element values ​​of the multiple rows of elements, the key factor information including: gap density and strip element average value;

[0045] The key result information is determined according to the plurality of key factor information.

[0046] As a possible implementation, the multiple rows of 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 a 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 passing through the point corresponding to the position in the two-dimensional array in the Hough space;

[0047] The determination module is specifically used for:

[0048] Determine the stripe elements and the non-stripe elements in each row according to the element values ​​of the elements in each row of the two-dimensional array;

[0049] Calculate the ratio of the number of non-strip elements in each row to the sum of the number of strip elements and non-strip elements in each row to obtain the void density of each row;

[0050] The average values ​​of the element values ​​of the strip elements in each row are calculated respectively to obtain the average value of the strip elements in each row.

[0051] As a possible implementation manner, the determining module is specifically used for:

[0052] Calculate the product of the void density of each row and the average value of the strip elements to obtain the representation degree value of each row;

[0053] Each element of the row with the largest representation degree value is used as the key result information.

[0054] As a possible implementation manner, the extraction module is specifically used for:

[0055] Obtain at least one continuous element sequence according to the element value of each element of the row with the maximum representation degree value;

[0056] Determine the width of the object parallel strip corresponding to the continuous element sequence according to the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence;

[0057] According to the position of each element in each continuous element sequence, the angle of the object parallel strip corresponding to the continuous element sequence is determined.

[0058] As a possible implementation manner, the determining module is further used for:

[0059] Selecting a threshold value according to the element value of each element in the continuous element sequence to obtain an initial denoising threshold value of the continuous element sequence;

[0060] Based on the initial denoising threshold, filtering processing is performed on the elements in the continuous element sequence.

[0061] As a possible implementation manner, the determining module is further used for:

[0062] Selecting a threshold value according to the element value of each element in the continuous element sequence to obtain an initial denoising threshold value of the continuous element sequence;

[0063] Determining a target denoising threshold of the continuous element sequence according to the initial denoising threshold and a preset coefficient;

[0064] Based on the target denoising threshold, filtering processing is performed on the elements in the continuous element sequence.

[0065] As a possible implementation manner, the detection module is specifically used for:

[0066] Taking 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 a possible implementation, the original object image includes any one of the following: an image containing crop rows, an image of electric poles, an image of electric wires;

[0068] The parallel strip information includes any one of the following: the angle and width of crop rows, the angle and width of electric poles, the angle of electric wires and the distance between adjacent electric wires.

[0069] In a third aspect, an embodiment of the present application provides a smart agricultural system, including:

[0070] An acquisition device, used for acquiring an original object image;

[0071] A processing device, used for processing 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 stripe information in the original object image;

[0072] A graphical interface device is used to generate display information of the corresponding original object according to the parallel strip information.

[0073] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: 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 described in the first aspect above.

[0074] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the object information extraction method as described in the first aspect above are executed.

[0075] The object information extraction method, device, smart agricultural system and electronic device provided by the embodiment of the present application, after transforming the original object image to obtain the transformed image and performing Hough line detection on the transformed image to obtain the line detection result, the key result information that can characterize the parallel strips of the object can be determined by using the element values ​​of multiple rows of the line detection result, and then based on the key result information and the position of at least one row of elements in the multiple rows of elements of the line detection result, the parallel strip information in the original object image can be extracted, so that the linear or ribbon-like objects in the original object image can be accurately identified. The above process utilizes the characteristic that the parallel strips of the object can form a straight line. By detecting the straight line, determining the key result information and extracting the parallel strip information, the linear or ribbon-like objects in the original object image can be quickly and accurately identified, thereby greatly reducing the complexity of identification. At the same time, the above process only involves the processing of the information of the straight line and strip formed by the object, without paying attention to the type of the object, and therefore, it can be applied to the identification of any linear or ribbon-like objects, thereby greatly improving the applicability of the method. In addition, by determining the key result information, it is possible to find some elements in multiple rows that are sufficient to identify parallel strips in the original object image. These elements can be used for extraction to obtain parallel stripe information without the need to extract based on all elements, thereby greatly improving processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0077] Figure 1 A flowchart of an object information extraction method provided in an embodiment of the present application;

[0078] Figure 2 is a schematic diagram of a transformed image obtained after the original object image is binarized;

[0079] Figure 3 is a visualization diagram of the straight line detection result obtained after step S102;

[0080] Figure 4 is a visualization diagram of the parallel strips extracted after step S104;

[0081] Figure 5 A visualization diagram of the line detection result obtained when the origin of the polar coordinate system is set at a vertex of the image;

[0082] Figure 6 A schematic diagram of a process for determining key result information in the object information extraction method provided in an embodiment of the present application;

[0083] Figure 7 A schematic diagram of a process for determining the void density and the average value of strip elements in the object information extraction method provided in an embodiment of the present application;

[0084] Figure 8 A schematic diagram of a process for extracting parallel stripe information in the object information extraction method provided in an embodiment of the present application;

[0085] Fig. 9 A module structure diagram of an object information extraction device provided in an embodiment of the present application;

[0086] Fig.10 A schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0087] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0088] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0089] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0090] In the prior art, linear or ribbon-shaped objects are generally identified by training a neural network model. This method is to construct a large number of learning samples and mark the positions of linear or ribbon-shaped objects in the learning samples. For example, for the identification of cotton rows in a cotton field, the prior art needs to mark the edge coordinates of the cotton rows in the image to indicate the positions of the cotton rows in the image. Furthermore, during the training process of the neural network model, the neural network model can learn the features of the linear or ribbon-shaped objects in the learning samples based on the learning samples, so that after the training of the neural network model is completed, it has the ability to identify linear or ribbon-shaped objects in the image.

[0091] However, the essence of the solution of the prior art is that the neural network model constructs the ability to identify the characteristics of the linear or ribbon-shaped object itself. The above-mentioned solution of the prior art essentially leads to the problem that the neural network has high complexity and poor applicability. Specifically, first of all, the characteristics of the linear or ribbon-shaped object itself are highly complex, so the neural network model needs to learn and process the characteristics of the linear or ribbon-shaped object itself through a complex network structure and network parameters. In addition, in order to improve and ensure the recognition ability of the neural network model, a large number of learning samples need to be labeled to train the neural network model. As a result, the complexity of the neural network model in terms of training process, network structure, etc. is too high. Secondly, the neural network model can only learn the learning ability of the field where the learning sample is located, and cannot apply this ability to other fields. For example, if a labeled cotton field image is used as a training sample, the trained neural network model can identify the cotton rows in the cotton field, but cannot identify the telephone poles. Therefore, the applicability of the existing neural network model is poor.

[0092] Based on the above problems, the present application proposes an object information extraction method, which abandons the existing idea of ​​linear or ribbon-shaped object recognition based on learning the characteristics of linear or ribbon-shaped objects themselves by a neural network model, and instead is based on the commonality that linear or ribbon-shaped objects can form straight lines. By recognizing and processing straight lines in the image, the parallel strip information of linear or ribbon-shaped objects in the image can be accurately extracted to achieve accurate recognition of linear or ribbon-shaped objects, thereby significantly reducing the complexity of recognition and significantly improving the applicability of recognition.

[0093] The embodiments of the present application can be applied to any scenario where linear or strip-shaped objects need to be identified. For example, in the intelligent management scenario of cotton fields, the method of the embodiments of the present application can be used to identify the planting area of ​​the cotton row, so that the identified planting area of ​​the cotton row can be used to perform emergence rate statistics, weed identification, operation navigation, etc. For another example, in the flight control scenario of a drone, the method of the embodiments of the present application can be used to identify linear or strip-shaped obstacles such as wires and poles, so that obstacle avoidance can be performed based on the identified wires, poles, etc.

[0094] Figure 1This is a flow chart of the object information extraction method provided in the embodiment of the present application. The execution subject of the method can be any electronic device with computing and processing capabilities, such as a desktop computer, a server, etc. Figure 1 As shown, the method includes:

[0095] S101 . Perform image transformation on an original object image to obtain a transformed image, where the transformed image is a binary image or a mask image of the original object image.

[0096] Optionally, the original object image may refer to an image containing the object to be identified. For example, when the object is a cotton row in a cotton field, the original object image is an image containing the cotton field. When the object is a telephone pole, the original image is an image containing the telephone pole. The original object image may be obtained by photographing the area where the object is located using a device with an image acquisition function such as a drone. The embodiment of the present application does not specifically limit the format of the original object image.

[0097] Optionally, the transformed image obtained by performing image transformation on the original object image can be used for subsequent straight line detection. In an optional manner, the original object image can be subjected to a binary transformation, and accordingly, the transformed image obtained is the above-mentioned binary image. Specifically, in the process of binary transformation, the gray value of each pixel point can be transformed to 0 or 255 according to the original pixel value of each pixel point on the original object image, so that the transformed image presents only black and white effects, which is convenient for subsequent straight line detection. In another optional manner, the original object image can be subjected to mask processing, and accordingly, the transformed image obtained is the above-mentioned mask image. Specifically, before mask processing, an image mask can be generated by specifying data values, data ranges, regions of interest, etc., and the image mask can be a two-dimensional matrix array or a multi-valued image, etc. Further, during mask processing, the image mask is multiplied with the original object image to obtain a transformed image, so that part of the region in the transformed image is shielded, and only the region of interest is retained for subsequent straight line detection.

[0098] S102, performing Hough line detection on the transformed image to obtain a line detection result, which includes multiple rows of elements, each element corresponds to a straight line in the original object image, the position of each element is used to represent the position of the corresponding straight line in the original object image, and the element value of each element is used to represent the reliability of the straight line.

[0099] Optionally, the coordinate system where the transformed image is located has the following mapping relationship with the Hough coordinates of the Hough space: 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 that intersect at a point in the Hough coordinate system. Specifically, in the Hough coordinate system, the more straight lines passing through a point, it indicates that the line mapped to the point in the original coordinate system is composed of more points, and the greater the probability that the line mapped to the point in the original coordinate system is a straight line.

[0100] Optionally, the original coordinate system where the original object image resides may be 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, all points in the original coordinate system can be first mapped to a straight line in the Hough coordinate system using the mapping relationship, and then the points where the straight lines intersect can be judged. If the number of straight lines passing through a certain point reaches a threshold, the point can be mapped to a line in the original coordinate system as a straight line in the original object image. After the Hough line detection is completed, the above line detection result can be obtained, and the above line detection result includes the above multiple rows of elements. Exemplarily, the line detection result 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 of each row in the two-dimensional array, its position in the matrix can represent the position of a straight line corresponding to the element in the original object image. Among them, the position of the element in the matrix can refer to the row where the element is located and the column where the element is located. At the same time, the element value of the element can represent the reliability of the straight line corresponding to the element. Exemplarily, the larger the element value of the element, the higher the reliability of the straight line corresponding to the element. It should be understood that the higher the reliability, the greater the possibility of belonging to the straight line and the more reliable the result.

[0102] S103: Determine key result information according to the element values ​​of the multiple rows of elements, where the key result information is used to characterize the object parallel strips in the original object image.

[0103] Since each element in the above-mentioned multiple lines of elements corresponds to a straight line in the original object image, and the element value of each element can characterize the reliability of the straight line, therefore, based on the element values ​​of the multiple lines of elements, the above-mentioned key result information can be obtained by analyzing and comparing the element values ​​of the multiple lines of elements. Optionally, the above-mentioned key result information can include some elements determined from the above-mentioned multiple lines of elements, and these elements are sufficient to identify parallel strips in the original object image. Therefore, the above-mentioned key result information can characterize the object parallel strips in the above-mentioned original object image.

[0104] Optionally, the aforementioned object parallel strips refer to strips formed by the objects in the original object image, and the strips may be in the aforementioned linear shape or in the aforementioned band shape.

[0105] S104. Extracting parallel stripe information in the original object image according to the key result information and the position of at least one row of elements in the multiple rows of elements, the parallel stripe information including: an angle and a width of the object parallel stripes in the original object image.

[0106] Optionally, the above key result information can characterize the object parallel stripes in the original object image. At the same time, as mentioned above, the position of each element in the multiple rows of elements can characterize the position of a 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, the parallel stripe information includes the angle and width of the object parallel stripe. The angle can refer to the relative tilt angle of the object parallel stripe in the original object image, and the width can refer to the width of the object parallel stripe in the original object image.

[0107] Based on the above parallel strip information, the electronic device can obtain the position of the object parallel strip in the original object image, thereby realizing accurate recognition of linear or strip-shaped objects in the original object image.

[0108] Figure 2 is a schematic diagram of the transformed image obtained after the original object image is binarized, as shown in Figure 2 As shown, each white strip is a parallel strip of an object. Figure 3 is a visualization diagram of the straight line detection result obtained after step S102, such as Figure 3 As shown, the white highlighted portion is the location of the key result information, and the key result information is sufficient to identify the parallel strips in the original object image. Figure 4 is a visualization diagram of the parallel strips extracted after step S104, as shown in Figure 4 As shown, each line segment corresponds to an object parallel strip in the original object image, the height of the line segment in the vertical direction represents the angle of the object parallel strip, and the length of the line segment in the horizontal direction represents the width of the object parallel strip.

[0109] It is worth noting that, based on the parallel strip information obtained in step S104, after performing an inverse Hough transform according to the size of the original object image, an image consistent with the original object image can be obtained. Figure 4 After the Hough inverse transform of the parallel strip information represented by Figure 2 Consistent image. Figure 2A consistent image is one that is consistent with Figure 2 An image in which parallel strips are positioned identically.

[0110] In this embodiment, after the original object image is transformed to obtain the transformed image and the transformed image is subjected to Hough line detection to obtain the line detection result, the key result information that can characterize the parallel strips of the object can be determined by using the element values ​​of multiple rows of the line detection result, and then based on the key result information and the position of at least one row of elements in the multiple rows of elements of the line detection result, the parallel strip information in the original object image can be extracted, thereby realizing accurate recognition of linear or ribbon-like objects in the original object image. The above process utilizes the characteristic that the parallel strips of the object can form straight lines. By detecting straight lines, determining key result information, and extracting parallel strip information, the linear or ribbon-like objects in the original object image can be quickly and accurately identified, thereby greatly reducing the complexity of recognition. At the same time, the above process only involves the processing of the information of the straight lines and strips formed by the object, and there is no need to pay attention to the type of the object. Therefore, it can be applied to the recognition of any linear or ribbon-like objects, thereby greatly improving the applicability of the method. In addition, by determining the key result information, it is possible to find some elements in multiple rows that are sufficient to identify parallel strips in the original object image. These elements can be used for extraction to obtain parallel stripe information without the need to extract based on all elements, thereby greatly improving processing efficiency.

[0111] As an optional implementation, when performing Hough line detection on the transformed image in the above step S102, the process may be as follows.

[0112] Taking 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 result.

[0113] Optionally, when performing Hough line detection on the transformed image, if the origin of the polar coordinate system is set at other positions of 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 interlaced and mixed line detection results. Figure 5 This is a visualization diagram of the line detection results obtained when the origin of the polar coordinate system is set at a vertex of the image. Figure 5 It can be seen that this method makes the white highlight part tilted, which will make it difficult to extract the subsequent key result information. Considering this problem, in this embodiment, the center point of the transformed image is used as the origin of the polar coordinate system, so that the straight line parameters can be evenly distributed, and the straight line parameters corresponding to the straight lines at the same angle can be concentrated in a certain area, so that the key result information can be obtained more conveniently. Figure 3Obviously, in the straight line detection result obtained by taking the center point of the transformed image as the origin of the polar coordinate system, the white highlight part no longer appears tilted.

[0114] As mentioned above, the embodiments of the present application can be applied to any scene where linear or strip-shaped objects need to be identified. Therefore, the objects targeted by the embodiments of the present application can be any linear or strip-shaped objects. Exemplarily, the objects can be crop rows, electric poles, electric wires, etc. Correspondingly, the original object image can be an image containing crop rows, an electric pole image, or an electric wire image, etc.

[0115] Correspondingly, the parallel strip information obtained by using the application embodiment may be, for example: the angle and width of the crop row, the angle and width of the electric pole, the angle of the electric wire and the distance between adjacent electric wires, etc.

[0116] The process of determining the key result information in the above step S103 is described below.

[0117] Figure 6 A schematic diagram of a process for determining key result information in the object information extraction method provided in an embodiment of the present application, such as Figure 6 As shown, an optional manner of the above step S103 includes:

[0118] S601. Determine multiple key factor information according to the element values ​​of the multiple rows of elements, where the key factor information includes: gap density and strip element average value.

[0119] S602: Determine the key result information according to the multiple key factor information.

[0120] As mentioned above, the key result information is sufficient to identify parallel strips in the original object image, and the key result information is the partial elements in the multiple rows that best represent the parallel strips. In this embodiment, the key result information is found using the key factor information.

[0121] Optionally, the key factor information includes the above-mentioned gap density and strip element average value. Among them, the gap density can refer to the proportion of non-strip elements in multiple elements, and the non-strip elements can refer to elements with element values ​​of zero or less than a threshold. These elements cannot correspond to a real straight line in the original coordinate system due to their small element values. Corresponding to the non-strip elements are strip elements, and strip elements can refer to elements with element values ​​greater than or equal to the threshold. For multiple elements in the straight line detection result, the gap density can be used to measure the interval between parallel strips. Based on this interval, some elements that can best characterize parallel strips can be identified without being affected by some interfering non-strip elements between parallel strips. In addition to the gap density, the key factor information also includes the strip element average value. The strip element average value is obtained by statistics of the element values ​​of the strip elements. The strip element average value can be used to measure the possibility of elements forming parallel strips, and then this possibility can also be used to identify some elements that can best characterize parallel strips.

[0122] Based on the above void density and strip element average values, multiple elements can be analyzed and measured to determine key result information.

[0123] In this embodiment, multiple key factor information can be determined based on the element values ​​of multiple rows of elements. The key factor information includes the gap density and the strip element average value. The gap density can be used to measure the interval between parallel strips, and the strip element average value can be used to measure the possibility of elements forming parallel strips. Therefore, based on the gap density and the strip element average value, key result information with high accuracy can be determined, and the parallel strip information extracted based on the key result information has high accuracy.

[0124] As a possible implementation method, the above-mentioned multiple rows of elements can be stored in a two-dimensional array, and the position of each element in the two-dimensional array is used to represent the position of a 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 the Hough space passing through the point corresponding to the position in the two-dimensional array.

[0125] Specifically, each element in the two-dimensional array can correspond to a point in the Hough space, and of course, it also corresponds to a straight line in the original object image. Therefore, the position of the element in the two-dimensional array can represent the position of the corresponding straight line in the original object image. At the same time, each element has an element value in the two-dimensional array, and the element value can indicate the number of straight lines passing through the point corresponding to the element in the Hough space. The following is an example. Assuming that the coordinate system of the original object image is a polar coordinate system, there is an element in the two-dimensional array, and the element is located in the a row and b column of the two-dimensional array, which indicates that the element corresponds to the point (a, b) in the Hough space, and corresponds to the straight line with a polar angle of a and a polar radius of b in the polar coordinate system. Assuming that the element value of this element in the a row and b column is c, it indicates that there are c straight lines passing through the point (a, b) in the Hough space.

[0126] Based on the above storage method of multiple rows of elements, an optional method of the above step S601 includes:

[0127] According to the element values ​​of the elements in each row of the two-dimensional array, the gap density of each row and the average value of the strip elements are determined.

[0128] Optionally, when multiple rows of elements are stored in a two-dimensional array, the gap density of each row and the average value of the strip elements can be determined on a row-by-row basis.

[0129] Taking rows as units and determining the gap density and strip element average value of each row can make the determined gap density and strip element average value highly matched with the parallel strips, thereby making the subsequently determined key result information and parallel strip information highly accurate.

[0130] The following describes the process of determining the void density of each row and the average value of the stripe elements.

[0131] Figure 7 This is a flow chart of determining the void density and the average value of strip elements in the object information extraction method provided in the embodiment of the present application, such as Figure 7 As shown, an optional method for determining the gap density of each row and the average value of the strip elements according to the element values ​​of the elements in each row includes:

[0132] S701. Determine stripe elements and non-stripe elements in each row according to element values ​​of elements in each row of a two-dimensional array.

[0133] Optionally, as mentioned above, non-strip elements may refer to elements whose element values ​​are zero or less than a threshold value. These elements cannot correspond to a real straight line in the original coordinate system due to their small element values. Correspondingly, strip elements may refer to elements whose element values ​​are greater than or equal to the threshold value. Strip elements may correspond to a real straight line in the original coordinate system. Based on this, in this step, the elements in each row of the two-dimensional array may be judged one by one. If the element value of the element is greater than or equal to the threshold value, the element is treated as a strip element. If the element value of the element is 0 or less than the threshold value, the element is treated as a non-strip element.

[0134] It is worth noting that in the original object image, there are generally no objects at the left and right edges of the image. At the same time, there are no objects between the two parallel strips of the object, or there are only sporadic interfering objects. Therefore, by determining the strip elements and non-strip elements through this step, the left and right edges of the original object image and the middle part that does not belong to the object can be identified.

[0135] S702 , respectively calculating the ratio of the number of non-strip elements in each row to the sum of the number of strip elements and non-strip elements in each row to obtain the gap density of each row.

[0136] As mentioned above, the gap density can refer to the proportion of non-strip elements in multiple elements. Specifically in this step, since it is based on each row, the proportion of the number of non-strip elements in each row to all elements can be calculated to obtain the gap density of each row. Among them, the larger the proportion of the number of non-strip elements, the greater the gap density. Conversely, the smaller the proportion of the number of non-strip elements, the smaller the gap density.

[0137] S703 , respectively calculating the average values ​​of the element values ​​of the strip elements in each row to obtain the average value of the strip elements in each row.

[0138] Exemplarily, the element values ​​of all stripe elements in each row may be added together, and then the added result may be divided by the number of stripe elements to obtain the average value of the stripe elements in each row.

[0139] In this embodiment, the gap density and the strip element average value of each row are calculated respectively based on each row, so that the determined gap density and the strip element average value can have a high matching degree with the parallel strips.

[0140] Based on the above determination of the void density and the average value of the strip elements in each row in units of rows, the key result information can be determined in the following manner.

[0141] Optionally, an optional manner of the above step S602 includes:

[0142] The product of the void density and the average value of the strip elements of each row is calculated respectively to obtain the representation degree value of each row; each element of the row with the largest representation degree value is used as the above key result information.

[0143] Optionally, in the present application, the gap density and the strip element average value determined by the above-mentioned embodiment are both positively correlated with the key result information. Specifically, for the original object image, there is inevitably some interference information between the two real parallel strips of the object, such as weeds between two cotton rows, which belongs to interference information. Obviously, the more interference information there is, the smaller the gap density between the parallel strips of the object will be. On the contrary, the less interference information there is, the greater the gap density between the parallel strips of the object will be. Based on this, the row with a larger gap density can be found in each row for subsequent calculations, so as to minimize the influence of interference information on subsequent calculations. If the average value of the strip elements of a row is larger, it indicates that the more elements that can characterize the straight line in the row, the greater the possibility of forming parallel strips. Therefore, the gap density and the average value of the strip elements are combined. The gap density and the average value of the strip elements of each row are multiplied to obtain the representation degree value of each row. The larger the representation degree value of a row is, the more the row can be used to accurately identify the parallel strips in the original object image. On this basis, each element in the row with the largest representation degree value can be used as key result information. That is, the key result information includes a row of elements in the two-dimensional array.

[0144] In this embodiment, by multiplying the gap density and the average value of the strip elements that are positively correlated with the key result information, the representation degree value of each row can be obtained, and then the elements 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 strips in the original object image.

[0145] Based on the above-mentioned taking the elements of the row with the largest representation degree value as the key result information, the parallel stripe information in the original object image can be extracted through the following process.

[0146] Figure 8 A schematic diagram of a process for extracting parallel stripe information in the object information extraction method provided in an embodiment of the present application, such as Figure 8 As shown, an optional manner of the above step S104 includes:

[0147] S801. Obtain at least one continuous element sequence according to the element value of each element of the row with the largest representation degree value.

[0148] Optionally, at least one continuous element sequence can be obtained based on the element value of each element of the row with the largest representation degree value. Among them, the continuous element sequence is a sequence composed of continuous strip elements, and the elements in the continuous element sequence are all strip elements. Specifically, the elements in the row with the largest representation degree value can be traversed, and whenever the element value of a traversed element is 0 or less than a threshold, that is, a non-strip element is traversed, the strip element before the traversed element and the element between the first strip element after the previous continuous element sequence are taken as a continuous element sequence, and so on, until the row with the largest representation degree value is traversed.

[0149] For example, assuming that the elements of the row with the largest representation degree value are arranged in order: 35600653405326, where the value of 0 indicates that the element at that location is a non-strip element, and the non-zero value indicates that the element at that location is a strip element, then three consecutive element sequences can be obtained through the above process, namely: 356, 6534, and 5326.

[0150] S802: Determine the width of the object parallel strip corresponding to the continuous element sequence according to the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence.

[0151] After at least one continuous element sequence is determined, each element sequence can indicate an object parallel strip respectively, and the information of the object parallel strip can be obtained by parsing the information of the continuous element sequence. In this step, the polar radius corresponding to the last element in the continuous element sequence can be subtracted from the polar radius corresponding to the first element, and the result obtained is the width of the object parallel strip corresponding to the continuous element sequence. As an example, the polar radius corresponding to the last element can be specifically the column number where the last element is located, and the polar radius corresponding to the first element can be specifically the column number where the first element is located. It should be noted that the column number does not represent the column number where the element is located in the two-dimensional array, but represents the polar radius value corresponding to the column where the element is located in the two-dimensional data.

[0152] S803: Determine the angle of the object parallel strip corresponding to each continuous element sequence according to 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 the 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 element sequence includes the row number and column number of the element. The row number of any element in a continuous element sequence can be read to obtain the angle of the parallel strip of the object corresponding to the continuous element sequence.

[0154] It is worth noting that the execution order of the above steps S802-S803 is not specific and can be flexibly adjusted.

[0155] In this embodiment, after the continuous element sequence is determined, the angle and width of the object parallel strip corresponding to the continuous element sequence can be quickly and accurately obtained by analyzing the position information of each element in the continuous element sequence.

[0156] In the actual implementation process, since there may be interference information in the original object image, there may also be interference elements in the two-dimensional array, and accordingly, there may also be interference elements in the obtained continuous element sequence. Therefore, before using the continuous element sequence to determine the angle and width of the parallel strips of the object, the continuous element sequence can be filtered to remove noise. This can be achieved in any of the following two ways.

[0157] In the first way, a threshold may be selected according to the element value of each element in the continuous element sequence to obtain an initial denoising threshold of the continuous element sequence, and the elements in the continuous element sequence may be filtered based on the initial denoising threshold.

[0158] In this method, a suitable initial denoising threshold can be selected by the element value of each element in the continuous element sequence. For example, if the element values ​​of most elements in the continuous element sequence are large, a large threshold can be selected as the initial denoising threshold. When filtering the elements in the continuous element sequence based on the initial denoising threshold, the element value of the element whose element value is less than the initial denoising threshold can be adjusted, for example, the element value is adjusted to 0, so that the element becomes a non-band element.

[0159] In the second method, a threshold can be selected according to the element value of each element in the continuous element sequence to obtain an initial denoising threshold of the continuous element sequence; a target denoising threshold of the continuous element sequence is determined according to the initial denoising threshold and a preset coefficient; and based on the target denoising threshold, the elements in the continuous element sequence are filtered.

[0160] The method for determining the initial denoising threshold in this method is the same as the first method described above, and will not be repeated here. On this basis, in this method, the initial denoising threshold can be multiplied by a preset coefficient to obtain a target denoising threshold. And the target denoising threshold is used to filter the continuous element sequence. Specifically, the element value of the element whose element value is less than the target denoising threshold can be adjusted, for example, the element value is adjusted to 0, so that the element becomes a non-band element.

[0161] Since the preset coefficient is incorporated into the initial denoising threshold, the filtering process of the continuous element sequence can be made more flexible and controllable.

[0162] It is worth noting that after filtering the continuous element sequence in the above two ways, the original continuous element sequence may be divided into multiple continuous element sequences, and the angle and width of the object parallel strips can be determined based on these divided continuous element sequences according to the method of the above embodiment.

[0163] Based on the same inventive concept, an object information extraction device corresponding to the object information extraction method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned object information extraction method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0164] Fig. 9 The module structure diagram of the object information extraction device provided in the embodiment of the present application is as follows: Fig. 9 As shown, the device comprises:

[0165] The transformation module 901 is used to perform image transformation on the original object image to obtain a transformed image, where the transformed image is a binary 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, wherein the line detection result includes multiple rows of elements, each element corresponds to a straight line in the original object image, and the position of each element is used to represent the position of the corresponding straight line in the original object image, and the element value of each element is used to represent the reliability of the straight line.

[0167] The determination module 903 is used to determine key result information according to the element values ​​of the multiple rows of elements, where the key result information is used to characterize the object parallel strips in the original object image.

[0168] The extraction module 904 is used to extract the parallel stripe information in the original object image according to the key result information and the position of at least one row of elements in the multiple rows of elements, and the parallel stripe information includes: the angle and width of the object parallel stripe in the original object image.

[0169] As an optional implementation manner, the determining module 903 is specifically configured to:

[0170] A plurality of key factor information is determined according to the element values ​​of the plurality of rows of elements, wherein the key factor information includes: gap density and strip element average value.

[0171] The key result information is determined according to the plurality of key factor information.

[0172] As an optional implementation, the multiple rows of 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 a 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 the Hough space passing through the point corresponding to the position in the two-dimensional array.

[0173] The determining module 903 is specifically used for:

[0174] According to the element values ​​of the elements in each row of the two-dimensional array, the stripe elements and the non-stripe elements in each row are determined.

[0175] The ratio of the number of non-strip elements in each row to the sum of the number of strip elements and non-strip elements in each row is calculated to obtain the void density of each row.

[0176] The average values ​​of the element values ​​of the strip elements in each row are calculated respectively to obtain the average value of the strip elements in each row.

[0177] As an optional implementation manner, the determining module 903 is specifically configured to:

[0178] The product of the void density of each row and the average value of the strip elements is calculated to obtain the characterization degree value of each row.

[0179] Each element of the row with the largest representation degree value is used as the key result information.

[0180] As an optional implementation, the extraction module 904 is specifically used for:

[0181] At least one continuous element sequence is obtained according to the element value of each element of the row with the maximum representation degree value.

[0182] The width of the object parallel strip corresponding to the continuous element sequence is determined according to the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence.

[0183] According to the position of each element in each continuous element sequence, the angle of the object parallel strip corresponding to the continuous element sequence is determined.

[0184] As an optional implementation manner, the determining module 903 is further configured to:

[0185] A threshold is selected according to the element value of each element in the continuous element sequence to obtain an initial denoising threshold of the continuous element sequence.

[0186] Based on the initial denoising threshold, filtering processing is performed on the elements in the continuous element sequence.

[0187] As an optional implementation manner, the determining module 903 is further configured to:

[0188] A threshold is selected according to the element value of each element in the continuous element sequence to obtain an initial denoising threshold of the continuous element sequence.

[0189] A target denoising threshold of the continuous element sequence is determined according to the initial denoising threshold and a preset coefficient.

[0190] Based on the target denoising threshold, filtering processing is performed on the elements in the continuous element sequence.

[0191] As an optional implementation, the detection module 902 is specifically configured to:

[0192] Taking 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 one of the following: an image containing crop rows, an image of electric poles, and an image of electric wires.

[0194] The parallel strip information includes any one of the following: the angle and width of crop rows, the angle and width of electric poles, the angle of electric wires and the distance between adjacent electric wires.

[0195] The present application also provides a smart agriculture system, which includes:

[0196] The acquisition device is used to acquire the original object image.

[0197] The processing device is used to process the original object image obtained by the acquisition device in the object information extraction method described in the above method embodiment to obtain parallel stripe information in the original object image.

[0198] A graphical interface device is used to generate display information of the corresponding original object according to the parallel strip information.

[0199] It should be noted that the smart agricultural system can execute the method steps in the aforementioned method embodiment. In addition to the technical effects that can be achieved by the method in the aforementioned method embodiment, the display information of the corresponding original object is generated by a graphical interface device according to the parallel strip information, which can facilitate users to view the object information in the plot area corresponding to the original object image. For example, it is convenient for users to clearly view information such as crop rows, wires and / or poles, and it is also convenient for the system to control the operating equipment to perform adaptive operations based on the parallel strip information, or send the parallel strip information to the operating equipment to enable the operating equipment to operate autonomously. For example, the operating equipment can accurately operate along the crop rows and avoid obstacles such as wires or poles.

[0200] The present application embodiment also provides an electronic device 100, such as Fig.10 As shown, it is a schematic diagram of the structure of the electronic device 100 provided in the embodiment of the present application, including: a processor 1001, a memory 1002, and optionally, a bus 1003. The memory 1002 stores machine-readable instructions executable by the processor 1001 (for example, Fig. 9 In the device, the transformation module 901, the detection module 902, the determination module 903, the extraction module 904 and other execution instructions correspond to the same), when the electronic device 100 is running, the processor 1001 communicates with the memory 1002 through the bus 1003, and when the machine-readable instructions are executed by the processor 1001, the method steps in the aforementioned method embodiment are executed.

[0201] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned object information extraction method are executed.

[0202] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0203] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.

[0204] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A method for extracting object information, characterized in that: include: Performing image transformation on the original object image to obtain a transformed image, wherein the transformed image is a binary image or a mask image of the original object image; Performing Hough line detection on the transformed image to obtain a line detection result, wherein the line detection result includes multiple rows of elements, each element corresponds to a line in the original object image, the position of each element is used to represent the position of the corresponding line in the original object image, and the element value of each element is used to represent the reliability of the line; Determining key result information according to element values ​​of the multiple rows of elements, wherein the key result information is used to characterize object parallel strips in the original object image; According to the key result information and the position of at least one row of elements in the multiple rows of elements, parallel stripe information in the original object image is extracted, and the parallel stripe information includes: an angle and a width of the object parallel stripe in the original object image.

2. The method according to claim 1, characterized in that The determining key result information according to the element values ​​of the multiple lines of elements includes: Determine multiple key factor information according to the element values ​​of the multiple rows of elements, the key factor information including: gap density and strip element average value; The key result information is determined according to the plurality of key factor information.

3. The method according to claim 2, characterized in that The multiple rows of 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 a 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 passing through the point corresponding to the position in the two-dimensional array in the Hough space; The determining of multiple key factor information according to the element values ​​of the multiple rows of elements includes: Determine the stripe elements and the non-stripe elements in each row according to the element values ​​of the elements in each row of the two-dimensional array; Calculate the ratio of the number of non-strip elements in each row to the sum of the number of strip elements and non-strip elements in each row to obtain the void density of each row; The average values ​​of the element values ​​of the strip elements in each row are calculated respectively to obtain the average value of the strip elements in each row.

4. The method according to claim 3, characterized in that The determining the key result information according to the plurality of key factor information includes: Calculate the product of the void density of each row and the average value of the strip elements to obtain the representation degree value of each row; Each element of the row with the largest representation degree value is used as the key result information.

5. The method according to claim 4, characterized in that The extracting parallel stripe information in the original object image according to the key result information and the position of at least one row of elements in the multiple rows of elements includes: Obtain at least one continuous element sequence according to the element value of each element of the row with the maximum representation degree value; Determine the width of the object parallel strip corresponding to the continuous element sequence according to the polar radius corresponding to the first element and the polar radius corresponding to the last element in each continuous element sequence; According to the position of each element in each continuous element sequence, the angle of the object parallel strip corresponding to the continuous element sequence is determined.

6. The method according to claim 5, characterized in that Before determining the width of the object parallel strip corresponding to the continuous element sequence according to 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: Selecting a threshold value according to the element value of each element in the continuous element sequence to obtain an initial denoising threshold value of the continuous element sequence; Based on the initial denoising threshold, filtering processing is performed on the elements in the continuous element sequence.

7. The method according to claim 5, characterized in that Before determining the width of the object parallel strip corresponding to the continuous element sequence according to 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: Selecting a threshold value according to the element value of each element in the continuous element sequence to obtain an initial denoising threshold value of the continuous element sequence; Determining a target denoising threshold of the continuous element sequence according to the initial denoising threshold and a preset coefficient; Based on the target denoising threshold, filtering processing is performed on the elements in the continuous element sequence.

8. The method according to any one of claims 1 to 7, characterized in that: The performing Hough line detection on the transformed image to obtain a line detection result includes: Taking 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.

9. The method according to any one of claims 1 to 7, characterized in that: The original object image includes any one of the following: an image containing crop rows, an image of electric poles, an image of electric wires; The parallel strip information includes any one of the following: the angle and width of crop rows, the angle and width of electric poles, the angle of electric wires and the distance between adjacent electric wires.

10. An object information extraction device, characterized in that: include: A transformation module, used to perform image transformation on the original object image to obtain a transformed image, wherein the transformed image is a binary image or a mask image of the original object image; A detection module, used to perform Hough line detection on the transformed image to obtain a line detection result, wherein the line detection result includes multiple rows of elements, each element corresponds to a line in the original object image, the position of each element is used to represent the position of the corresponding line in the original object image, and the element value of each element is used to represent the reliability of the line; A determination module, configured to determine key result information according to element values ​​of the multiple rows of elements, wherein the key result information is used to characterize object parallel strips in the original object image; The extraction module is used to extract the parallel stripe information in the original object image according to the key result information and the position of at least one row of elements in the multiple rows of elements, and the parallel stripe information includes: the angle and width of the parallel stripes of the object in the original object image.

11. A smart agricultural system, characterized in that: include: An acquisition device, used for acquiring an original object image; A processing device, used for processing the original object image obtained by the acquisition device according to the object information extraction method according to any one of claims 1 to 9, so as to obtain parallel stripe information in the original object image; A graphical interface device is used to generate display information of the corresponding original object according to the parallel strip information.

12. An electronic device, characterized in that: include: 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 execute the steps of the object information extraction method as described in any one of claims 1 to 9.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the object information extraction method according to any one of claims 1 to 9 are executed.

Citation Information

Patent Citations

  • Crop row center line extraction method and device

    CN110288608A

  • Method and device for identifying farmland soil surface, agricultural machine and medium

    CN113807131A

  • Focus long diameter determination method, image labeling method, device and computer equipment

    CN114092475A

  • Rigid contact net positioning wire clamp clamping stagnation detection method and device, computer equipment and storage medium

    CN114219818A

  • Method for indirect measurement of range from a diesel locomotive shunter to a rail track straight section

    RU2729512C1