Method, device and electronic equipment for determining object parameters
By determining the object profile and screening the contour lines in the binary depth image, the problem of interfering objects in the measurement of object parameters is solved, and high accuracy and high efficiency measurement of object parameters is achieved.
Patent Information
- Application Number
- CN202111317344.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-09
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-11-09
AI Technical Summary
The prior art is susceptible to interference during the measurement of object parameters, resulting in low measurement accuracy and efficiency.
By determining the foreground object profile in a binary depth image, a contour line is generated and a straight line that meets a specific threshold is selected to determine the contour rectangle, thereby obtaining the parameters of the object.
In the presence of interference objects, the parameters and volume of the object can be accurately measured, which improves the accuracy and efficiency of measurement.
Smart Images

Figure CN114187236B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of measurement technology, and in particular to a method, device and electronic equipment for determining object parameters. Background Art
[0002] In the field of logistics, during the steps of package collection and sorting, special equipment is needed to scan, weigh and measure the volume of each package in order to obtain the barcode, weight and volume information of the package.
[0003] Volume measurement is to collect the point cloud data of an object through a 3D camera, and then calculate the volume information of the object through a volume measurement algorithm. 3D cameras can obtain three-dimensional point cloud information of objects and have been widely used in the fields of object positioning, recognition, and measurement.
[0004] In a parcel sorting process, the parcel needs to be placed on the platform manually, and then the parcel point cloud data is obtained through the 3D camera to measure the parcel volume. Existing measurement equipment needs to calculate the parcel volume data after the human hand leaves the parcel, otherwise the measured volume data will be interfered by the hand. When blocked by hands or other interferences, the detection of the edge of the object is affected, so the system will detect errors or be unable to detect, which results in low efficiency in measuring the object volume and low convenience of operation. Summary of the invention
[0005] The present application provides a method, device and electronic device for determining object parameters, which are used to accurately measure the object when there are interference objects during the object parameter measurement process, thereby improving the accuracy and efficiency of object measurement.
[0006] In a first aspect, the present application provides a method for determining object parameters, the method comprising:
[0007] Determining whether there is an interference object in the acquired binary depth image containing the foreground object contour, wherein the foreground object contour includes a contour corresponding to the target object;
[0008] When the interference object exists, N contour lines are generated according to the edge points of the contour of the foreground object, where N is a positive integer greater than or equal to 2;
[0009] Screening out a contour line whose ratio of foreground area ratios on both sides of the contour line is greater than a first threshold value from the N contour lines;
[0010] Determining a contour rectangle in the contour image according to the screened contour straight line;
[0011] Determine a first outline rectangle from among all determined outline rectangles;
[0012] The parameters of the first outline rectangle are used as the parameters of the target object.
[0013] In a possible design, determining a foreground object contour corresponding to the target object in the acquired binary depth image includes:
[0014] Binarize the depth image collected based on the reference plane to obtain a depth binary image corresponding to the target object;
[0015] Contour search is performed in the binary depth image to obtain the contour of the foreground object.
[0016] In a possible design, generating N contour lines according to edge points of the foreground object contour includes:
[0017] Taking edge points of the foreground object contour as coordinate points;
[0018] According to the coordinate points, the N contour lines are generated based on a random sampling consensus algorithm.
[0019] Based on the above method, when measuring the volume of the object being measured, if there is an interference object blocking the object being measured, a contour rectangle can be obtained through the contour of the foreground object of the measured object. Based on the contour rectangle, various parameters of the object being measured can be determined, and the volume of the object being measured can be finally obtained. This method realizes accurate measurement of various parameters and volume of the object in the presence of interference objects, which not only improves the accuracy of volume measurement, but also improves the efficiency of object parameter measurement.
[0020] In a possible design, determining a contour rectangle in the contour image according to the screened contour straight line includes:
[0021] Determine the contour line segment corresponding to each contour line according to the obtained contour lines and the edge points of the foreground object contour;
[0022] Translating a side of the rectangle of the contour segment from a first position to a second position, wherein when the contour segment is at the second position, a ratio of the target object area ratios on both sides of the contour segment is less than a second threshold;
[0023] Determine the contour rectangle enclosed by the contour line segments and the translated contour line segments.
[0024] In a possible design, determining a first outline rectangle from all determined outline rectangles includes:
[0025] Scoring each contour rectangle according to the preset scoring rules to obtain the corresponding score of each contour rectangle;
[0026] A maximum score is determined among all the scores, and a contour rectangle corresponding to the maximum score is determined as the first contour rectangle.
[0027] In a possible design, determining whether an interference object exists in the acquired binary depth image containing the outline of the foreground object includes:
[0028] Determining a corresponding convex hull based on the foreground object contour;
[0029] Determine the concave distance between each contour point and an adjacent convex hull edge, wherein the convex hull edge is an edge of the convex hull;
[0030] Whether there is an interference object is determined according to whether the recess distance is greater than a distance threshold.
[0031] In a second aspect, the present application provides a device for determining object parameters, the device comprising:
[0032] An acquisition module, used to determine whether there is an interference object in the acquired binary depth image containing the foreground object contour, wherein the foreground object contour includes a contour corresponding to the target object;
[0033] a calculation module, configured to generate N contour lines according to edge points of the foreground object contour when the interference object exists, and screen out contour lines whose ratio of foreground area ratios on both sides of the contour lines is greater than a first threshold value from the N contour lines; and determine a contour rectangle in the contour image according to the screened contour lines, wherein N is a positive integer greater than or equal to 2;
[0034] The control module is used to determine a first outline rectangle from all determined outline rectangles; and use parameters of the first outline rectangle as parameters of the target object.
[0035] In one possible design, the calculation module is specifically used to determine the contour segment corresponding to each contour line based on the obtained contour line and the edge points of the foreground object contour; translate one side of the rectangle where the contour line segment is located from a first position to a second position, and determine the contour line segment and the contour rectangle enclosed by the translated contour line segment, wherein, when the contour line segment is at the second position, the ratio of the target object area ratios on both sides of the contour line segment is less than a second threshold.
[0036] In a possible design, the control module is specifically used to score each contour rectangle according to a preset scoring rule to obtain a score corresponding to each contour rectangle; determine the maximum score among all the scores, and determine the contour rectangle corresponding to the maximum score as the first contour rectangle.
[0037] In a third aspect, the present application provides an electronic device, including:
[0038] Memory, used to store computer programs;
[0039] The processor is used to implement the above-mentioned object parameter determination method steps when executing the computer program stored in the memory.
[0040] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned object parameter determination method steps are implemented.
[0041] For each aspect from the second to the fourth aspect and the technical effects that may be achieved by each aspect, please refer to the above description of the technical effects that can be achieved by the first aspect or various possible schemes in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of the structure of a measuring device provided for this application;
[0043] Figure 2 A flow chart of a method for determining object parameters provided in this application;
[0044] Figure 3 A schematic diagram of the depth image provided for this application;
[0045] Figure 4 A schematic diagram of the outline of a foreground object in a binary image provided by the present application;
[0046] Figure 5 A schematic diagram of the contour line determined in the binary image provided by this application;
[0047] Figure 6 Schematic diagram of contour segments in a binary image provided by the present application;
[0048] Figure 7 Schematic diagram of the outline rectangle in the binary image provided by the present application;
[0049] Figure 8 A schematic diagram of the structure of a device for determining object parameters provided by the present application;
[0050] Fig. 9 The present application provides a schematic diagram of the structure of an electronic device. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A is connected to B, which can represent: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0052] The embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0053] See also Figure 1 The figure shows an application scenario of the object parameter determination method provided in the embodiment of the present application. Figure 1 The measuring device includes a 3D camera and a measuring platform. The 3D camera can collect point cloud data of objects in the field of view. The point cloud data can include parameters such as the length, width, and height of the object, so that the volume of the measured object can be measured by the measuring device. However, during the measurement process, if the user's hand or other objects cover or block the measured object, the measuring device will make a measurement error or even fail to measure, which results in low accuracy and efficiency in object measurement.
[0054] In order to solve the problem of low object measurement accuracy and measurement efficiency, the embodiments of the present application provide a method and device for determining object parameters, which are used to accurately measure the measured object when there are interference objects during the parameter measurement process, thereby improving the accuracy and measurement efficiency of the object measurement. Among them, the method and device described in the embodiments of the present application are based on the same technical concept. Since the principles of the problems solved by the method and the device are similar, the embodiments of the device and the method can refer to each other, and the repeated parts will not be repeated.
[0055] Reference Figure 2 , the present application provides a method for determining object parameters, the implementation process of the method is as follows:
[0056] S1, determining whether there is an interference object in the acquired binary depth image containing the outline of the foreground object;
[0057] First, before measuring the parameters of an object, it is necessary to determine whether there are other interfering objects on the object being measured. The specific determination method is as follows:
[0058] The 3D camera on the measuring device collects point cloud data of the object in the field of view. According to the calibrated reference plane equation, the point cloud collected by the 3D camera is projected onto the reference plane. The reference plane can be a plane with a preset range or the measuring platform of the measuring device. The distance between each point on the object and the reference plane is taken as the height of the point. Thus, a depth image containing the measured object and the interference object is obtained, such as Figure 3 The figure shows a depth image with interference objects obtained in an actual application scenario. It should be noted here that the measured object is the foreground of the image, and therefore the measured object is the target object.
[0059] After obtaining the depth image, the depth image is binarized, that is, the point cloud data in the depth image that is greater than or equal to the preset height is adjusted to white pixels, and the point cloud data below the preset height is adjusted to black pixels, so as to obtain the binarized image corresponding to the measured object, and then the contour of the binarized image is searched, and the foreground object contour corresponding to the target object is determined in the binarized image.
[0060] After determining the foreground object contour corresponding to the target object, determine the convex hull corresponding to the foreground object contour. The convex hull is a polygon containing all the contour points of the target object. Then determine the distance between each contour point and the nearest edge of the convex hull. This distance is determined as the concave distance. Determine the maximum value among all the determined concave distances, and determine whether the maximum value is greater than the distance threshold. If it is greater than the distance threshold, it is determined that there is an interference object. If the maximum concave distance is less than the distance threshold, it is determined that there is no interference object. The interference object here can be a hand or other objects.
[0061] The above method can accurately determine whether there is interference in the binary image.
[0062] In the presence of interferents, step S2 is performed.
[0063] S2, generating N contour lines according to the edge points of the foreground object contour;
[0064] On the basis of determining the contour of the foreground object, multiple edge points are determined on the contour of the foreground object. The edge points here are used as coordinate points of the fitting line. In the embodiment of the present application, the determined coordinate points are fitted into a contour line through the Random Sample Consensus (RANSAC) algorithm. Since the contour of the foreground object is a polygon, multiple contour lines will be fitted based on the above-mentioned RANSAC algorithm.
[0065] participate Figure 4 As shown, in Figure 4 Multiple contour lines are generated in the binary image based on the contour of the foreground object.
[0066] S3, screening out, from the N contour lines, contour lines whose ratio of foreground area ratios on both sides of the contour line is greater than a first threshold;
[0067] After determining multiple contour lines corresponding to the foreground object contour, some of these lines are peripheral lines of the foreground object contour, and the other part are non-peripheral lines of the foreground object contour. Here, the peripheral lines are the lines at the edge of the foreground object contour, and the non-peripheral lines are the lines within the foreground object contour. Since the parameters of the foreground object need to be determined, the straight line needs to select the peripheral lines. The specific method of determining the peripheral lines is as follows:
[0068] Determine the foreground area on both sides of each contour line. That is to say, the contour line determined above will divide the foreground contour image into two parts. Therefore, it is necessary to determine the foreground areas corresponding to the foreground contour images on both sides of the contour line respectively, and then obtain the ratio of the foreground area ratios on both sides of the contour line. Here, the ratio is the larger foreground area to the smaller foreground area.
[0069] Then the obtained ratio is compared with the first threshold, and the contour line corresponding to the ratio greater than the first threshold is taken as the final required peripheral line. Figure 5 The final determined contour line is shown.
[0070] S4, determining a contour rectangle in the contour image according to the screened contour straight line;
[0071] After determining the required contour lines, determine the contour line segments corresponding to each contour line based on the edge points on the foreground object contour, see Figure 6 As shown, in Figure 6 In the figure, the contour line passes through the edge point of the foreground object contour, so the contour segment can be determined based on the edge point and the contour line.
[0072] After the contour line segment is determined, the contour line segment is translated from the first position to the second position as one side of the rectangle, and when the contour line segment is at the second position, the ratio of the target object area ratio on both sides of the contour line segment is less than the second threshold, and the second threshold here can be set to 0.8. Specifically, when the contour line segment is translated, the contour line segment before the translation is used as one side of the contour rectangle finally determined, and the contour line segment obtained by the translation is used as the other side of the contour rectangle.
[0073] Similarly, the translation method of other contour line segments is the same as the above method, so each contour line segment can form multiple contour rectangles after translation.
[0074] For example, see Figure 7 As shown, in Figure 7 After each contour segment in is translated, there will be an intersection point. Figure 7 There are multiple outline rectangles in .
[0075] S5, determining a first outline rectangle from all determined outline rectangles;
[0076] In the above steps, multiple contour rectangles have been determined. In order to ensure that the parameters between the contour rectangle and the measured object match, it is necessary to screen out a contour rectangle that meets the conditions from all the contour rectangles. In the embodiment of the present application, the first contour rectangle is determined by scoring the contour rectangles. The specific scoring method can be:
[0077] 1. Score the outline rectangle according to the size of the rectangle;
[0078] The larger the area of the rectangle, the higher the corresponding score.
[0079] 2. Score the outline rectangle according to its rectangularity;
[0080] The greater the rectangularity, the higher the corresponding score.
[0081] 3. Score based on the distance between the rectangle and the border of the rectangular measurement area;
[0082] When measuring an object, a measurement area is preset, and the farther the rectangle is from the boundary of the measurement area, the higher the score is.
[0083] According to the above scoring method, each determined rectangle can be scored, and the scores are added to obtain the score corresponding to each outline rectangle. The rectangle with the largest score is selected from all outline rectangles, and the rectangle is used as the final first outline rectangle.
[0084] It should be noted here that the above scoring rule is only an example. The scoring rule can be adjusted in actual application scenarios, such as selecting one of the scoring methods, or adding a weight value to each scoring method, and calculating the comprehensive score based on the score and weight value of each item. Therefore, the specific scoring method is not limited in this application.
[0085] Through the above-mentioned scoring method, the contour rectangle that matches the actual measured object parameters can be accurately screened out from all contour rectangles, so that the object parameters can be accurately measured.
[0086] S6: Using the parameters of the first outline rectangle as the parameters of the target object.
[0087] After the first contour rectangle is finally determined, the length and width parameters corresponding to the first contour rectangle will be used as the length and width parameters corresponding to the measured object. The depth information is already included when the depth image of the measured object is collected. The depth information at this time can be used as the height of the measured object, so the volume of the measured object can be obtained.
[0088] Based on the above method, when measuring the volume of the object being measured, if there is an interference object blocking the object being measured, a contour rectangle can be obtained through the contour of the foreground object of the measured object. Based on the contour rectangle, various parameters of the object being measured can be determined, and the volume of the object being measured can be finally obtained. This method realizes accurate measurement of various parameters and volume of the object in the presence of interference objects, which not only improves the accuracy of volume measurement, but also improves the efficiency of object parameter measurement.
[0089] Based on the same inventive concept, an object parameter determination device is also provided in an embodiment of the present application. The object parameter determination device can accurately measure the object when there are interference objects in the object parameter measurement process, thereby improving the accuracy and efficiency of the object measurement. Figure 8 As shown, the device comprises:
[0090] An acquisition module 801 is used to determine whether there is an interference object in the acquired binary depth image containing the foreground object contour, wherein the foreground object contour is a contour corresponding to the target object;
[0091] The calculation module 802 is used to generate N contour lines according to the edge points of the foreground object contour when the interference object exists, and screen out contour lines whose ratio of the foreground area ratio on both sides of the contour lines is greater than a first threshold value from the N contour lines; and determine a contour rectangle in the contour image according to the screened contour lines, wherein N is a positive integer greater than or equal to 2;
[0092] The control module 803 is used to determine a first outline rectangle from all determined outline rectangles; and use parameters of the first outline rectangle as parameters of the target object.
[0093] In one possible design, the calculation module 802 is specifically used to determine the contour line segment corresponding to each contour line based on the obtained contour line and the edge points of the foreground object contour; translate one side of the rectangle where the contour line segment is located from a first position to a second position, and determine the contour line segment and the contour rectangle enclosed by the translated contour line segment, wherein, when the contour line segment is at the second position, the ratio of the target object area ratios on both sides of the contour line segment is less than a second threshold.
[0094] In one possible design, the control module 803 is specifically used to score each contour rectangle according to a preset scoring rule to obtain a score corresponding to each contour rectangle; determine the maximum score among all the scores, and determine the contour rectangle corresponding to the maximum score as the first contour rectangle.
[0095] Based on the above device, when measuring the volume of the object to be measured, if there is an interference object blocking the measured object, a contour rectangle can be obtained through the contour of the foreground object of the measured object. Based on the contour rectangle, various parameters of the measured object can be determined, and the volume of the measured object can be finally obtained. This method realizes the accurate measurement of the parameters and volume of the object in the presence of interference objects, which not only improves the accuracy of volume measurement, but also improves the efficiency of object parameter measurement.
[0096] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can realize the function of the output device of the aforementioned landing area, referring to Fig. 9 , the electronic device comprises:
[0097] At least one processor 901, and a memory 902 connected to the at least one processor 901. The specific connection medium between the processor 901 and the memory 902 is not limited in the embodiment of the present application. Fig. 9 In the example, the processor 901 and the memory 902 are connected via a bus 900. Fig. 9 The bus 900 is represented by a bold line, and the connection between other components is only for schematic illustration and is not intended to be limiting. The bus 900 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 901 can also be called a controller, and there is no limitation on the name.
[0098] In the embodiment of the present application, the memory 902 stores instructions that can be executed by at least one processor 901. The at least one processor 901 can execute the object parameter determination method discussed above by executing the instructions stored in the memory 902. The processor 901 can implement Fig. 9 The functions of each module in the device shown.
[0099] Among them, processor 901 is the control center of the device, and can use various interfaces and lines to connect various parts of the entire control device. By running or executing instructions stored in memory 902 and calling data stored in memory 902, various functions of the device and processing data, the device can be monitored as a whole.
[0100] In one possible design, the processor 901 may include one or more processing units, and the processor 901 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 901. In some embodiments, the processor 901 and the memory 902 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0101] The processor 901 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the object parameter determination method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0102] The memory 902 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 902 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 902 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 902 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0103] By programming the processor 901, the code corresponding to the object parameter determination method described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 2The steps of the object parameter determination method of the embodiment shown are as follows: How to design and program the processor 901 is a technique well known to those skilled in the art and will not be described in detail here.
[0104] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the object parameter determination method discussed above.
[0105] In some possible implementations, various aspects of the object parameter determination method provided in the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the object parameter determination method according to various exemplary embodiments of the present application described above in this specification.
[0106] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0107] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0108] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0110] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for determining object parameters, characterized in that: The method comprises: Determining whether there is an interference object in the acquired binary depth image containing the outline of the foreground object, wherein the outline of the foreground object is a outline corresponding to the target object; When the interference object exists, N contour lines are generated according to the edge points of the contour of the foreground object, where N is a positive integer greater than or equal to 2; Screening out a contour line whose ratio of foreground area ratios on both sides of the contour line is greater than a first threshold value from the N contour lines; Determine the contour line segment corresponding to each contour line according to the obtained contour lines and the edge points of the foreground object contour; Translating a side of the rectangle of the contour segment from a first position to a second position, wherein when the contour segment is at the second position, a ratio of the target object area ratios on both sides of the contour segment is less than a second threshold; Determine the contour rectangle enclosed by the contour line segments and the translated contour line segments; Determine a first outline rectangle from among all determined outline rectangles; The parameters of the first outline rectangle are used as the parameters of the target object.
2. The method according to claim 1, characterized in that Determining the foreground object contour corresponding to the foreground object in the acquired binary depth image includes: Binarize the depth image collected based on the reference plane to obtain a depth binary image corresponding to the target object; Contour search is performed in the binary depth image to obtain the contour of the foreground object.
3. The method according to claim 1, characterized in that Generating N contour lines according to the edge points of the foreground object contour includes: Taking edge points of the foreground object contour as coordinate points; According to the coordinate points, the N contour lines are generated based on a random sampling consensus algorithm.
4. The method according to claim 1, characterized in that Determining a first outline rectangle from all determined outline rectangles includes: Scoring each contour rectangle according to the preset scoring rules to obtain the corresponding score of each contour rectangle; A maximum score is determined among all the scores, and a contour rectangle corresponding to the maximum score is determined as the first contour rectangle.
5. The method according to claim 1, characterized in that Determining whether there is an interference object in the acquired binary depth image containing the outline of the foreground object includes: Determining a corresponding convex hull based on the foreground object contour; Determine the concave distance between each contour point and an adjacent convex hull edge, wherein the convex hull edge is an edge of the convex hull; Whether there is an interference object is determined according to whether the recess distance is greater than a distance threshold.
6. An object parameter determination device, characterized in that: The device comprises: An acquisition module, used to determine whether there is an interference object in the acquired binary depth image containing the outline of the foreground object, wherein the outline of the foreground object is a contour corresponding to the target object; A calculation module, used for generating N contour lines according to the edge points of the foreground object contour when the interference object exists, screening out contour lines whose ratio of foreground area ratios on both sides of the contour lines is greater than a first threshold value from the N contour lines; determining contour line segments corresponding to each contour line according to the obtained contour lines and the edge points of the foreground object contour; translating one side of the rectangle of the contour line segment from a first position to a second position, determining the contour line segment and the contour rectangle enclosed by the translated contour line segment, wherein when the contour line segment is at the second position, the ratio of the target object area ratios on both sides of the contour line segment is less than a second threshold value; and N is a positive integer greater than or equal to 2; The control module is used to determine a first outline rectangle from all determined outline rectangles; and use parameters of the first outline rectangle as parameters of the target object.
7. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method steps of any one of claims 1 to 5 when executing the computer program stored in the memory.
8. 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 method steps described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Convex hull analysis-based shielded vehicle detection method and system
CN107341490A
Logistics box volume and weight measurement system and implementation method thereof
CN107816943A