Carriage area identification method and system, scrap steel intelligent grading system

By extracting the edge information of the car body from the scrap steel image, generating a mask, and fitting a straight line equation, the problem of accuracy in identifying the effective area of ​​the car body was solved, thus improving the recognition accuracy of the scrap steel grading system.

CN115222677BActive Publication Date: 2026-03-17YONYOU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In the intelligent scrap steel classification system, the identification of the effective area of ​​the car body in the focused image is affected by the obstruction of individual scrap steel pieces outside the car body and fully loaded vehicles, resulting in the incomplete acquisition of the edge information of the car body and affecting the calculation of the effective area of ​​the car body.

Method used

The system extracts carriage edge information using an instance segmentation model, generates carriage edge masks, obtains edge coordinate information, and linearly fits straight line equations to determine the carriage edge straight line. It then generates a mask for the area inside the carriage, eliminating interference from the area outside the carriage and improving recognition accuracy.

Benefits of technology

The accuracy of intelligent scrap steel classification has been improved. By optimizing the segmentation and recognition of the edge information of the wagon, the interference of the area outside the wagon to the area inside the wagon has been eliminated, ensuring the accuracy of the recognition of the area inside the wagon in the scrap steel image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115222677B_ABST
    Figure CN115222677B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for identifying carriage areas and an intelligent scrap steel grading system. The carriage area identification method includes: extracting carriage edge information from a scrap steel image to generate a carriage edge mask; obtaining carriage edge coordinate information based on the carriage edge mask; linearly fitting the equation of a straight line for each carriage edge based on the carriage edge coordinate information, and determining the carriage edge straight line based on the straight line equation; determining the carriage interior area based on the carriage edge straight line and generating a carriage interior area mask; and determining the carriage interior area in the scrap steel image based on the carriage interior area mask. This application uses linear regression processing on the carriage edge information obtained from instance segmentation to obtain the carriage edge straight line, constructs the carriage interior area mask based on the carriage edge straight line, and determines the carriage interior area in the scrap steel image based on the carriage interior area mask. This eliminates interference from the carriage exterior area on the identification of individual scrap steel items in the carriage interior area, improving the accuracy of the intelligent scrap steel grading service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and more specifically, to a method and system for identifying areas within a vehicle compartment and an intelligent scrap steel grading system. Background Technology

[0002] The intelligent scrap steel grading system is being applied to scrap steel procurement in the steel industry. When grading scrap steel from a whole truckload, a focused photograph is taken, and then a corresponding scrap steel detection and recognition algorithm is used to identify and detect each image individually. After statistically analyzing the scrap steel at each level, the system assigns a corresponding grade. However, during the detection and recognition of each focused image, the presence of individual scrap steel pieces outside the truck bed in the focused image can affect the identification of the effective area of ​​the truck bed. Furthermore, in fully loaded vehicles, scrap steel can obscure the edges of the truck bed, preventing the acquisition of complete edge information and affecting the calculation of the effective area of ​​the truck bed.

[0003] Therefore, how to propose a solution that can accurately identify the effective area of ​​the carriage in a focused image has become an urgent problem to be solved. Summary of the Invention

[0004] To address the aforementioned technical problems, the first aspect of this invention proposes a method for identifying carriage areas.

[0005] A second aspect of the present invention also proposes a carriage area recognition system.

[0006] A third aspect of the present invention also proposes a carriage area recognition system.

[0007] A fourth aspect of the invention also proposes a readable storage medium.

[0008] The fifth aspect of the present invention also proposes an intelligent scrap steel grading system.

[0009] In view of this, the first aspect of the present invention proposes a method for identifying the carriage area for use in a scrap steel intelligent grading system, comprising: extracting carriage edge information from a scrap steel image to generate a carriage edge mask; obtaining carriage edge coordinate information based on the carriage edge mask; linearly fitting the straight line equation of each carriage edge based on the carriage edge coordinate information, and determining the carriage edge straight line based on the straight line equation; determining the carriage interior area based on the carriage edge straight line, and generating a carriage interior area mask; and determining the carriage interior area in the scrap steel image based on the carriage interior area mask.

[0010] According to the method for identifying the carriage region provided by this invention, the edge information of the carriage in the scrap steel image is extracted to facilitate the generation of a carriage edge mask based on the extracted edge information. The extraction of carriage edge information can be performed using an instance segmentation model. Then, the coordinate information of the carriage edge is obtained based on the generated carriage edge mask. This facilitates the determination of the carriage edge position and allows for linear fitting of the carriage edge line based on the coordinate information. Specifically, a linear equation for the carriage edge is fitted based on the carriage edge information, and the carriage edge line is determined based on this equation. This facilitates subsequent segmentation of the image based on the carriage edge line to determine the inner and outer regions of the carriage. Simultaneously, the inner region mask is generated when the inner region of the carriage is determined based on the carriage edge line, enabling the determination of the inner region of the carriage in the scrap steel image. This application uses linear regression to process the edge information of the carriage obtained after instance segmentation to obtain a straight line of the carriage edge. Then, a mask of the inner region of the carriage is constructed based on the straight line of the carriage edge. This allows the inner region of the carriage in the scrap steel image to be determined based on the inner region mask, thereby eliminating the interference of scrap steel individuals in the outer region of the carriage on the identification of scrap steel individuals in the inner region of the carriage and improving the accuracy of the intelligent scrap steel classification service.

[0011] In addition, the carriage area identification method in the above-mentioned technical solution provided by the present invention may also have the following additional technical features:

[0012] In the above technical solution, the step of extracting the edge information of the carriage in the scrap steel image to generate the carriage edge mask specifically includes: performing instance segmentation on the scrap steel image to extract the edge information of the carriage in the scrap steel image; correcting the carriage edge information by combining the individual instance segmentation results of the scrap steel to obtain corrected carriage edge information; and generating the carriage edge mask based on the corrected carriage edge information.

[0013] In this technical solution, an instance segmentation model is used to segment the scrap steel image to extract the edge information of the carriage in the scrap steel image. Then, the individual scrap steel units in the scrap steel image are identified by the instance segmentation results of individual scrap steel units. The carriage edge information is corrected by combining the instance segmentation results of individual scrap steel units to eliminate scrap steel units that are misidentified as carriage edges. This ensures that the carriage edge information is not interfered with by individual scrap steel units, thereby improving the accuracy of the carriage edge information and optimizing the instance segmentation results of the carriage edges.

[0014] In the above technical solution, the carriage edge mask is a 0-1 matrix, where 0 represents non-carriage edges and 1 represents carriage edges. The steps of obtaining carriage edge coordinate information based on the carriage edge mask specifically include: obtaining the position coordinates of the value 1 in the 0-1 matrix; and performing deduplication processing on the coordinate information to obtain the carriage edge coordinate information.

[0015] In this technical solution, the coordinates of positions with a value of 1 in the 0-1 matrix of the carriage edge mask are obtained. Since the carriage edge has a certain width, it has multiple coordinate values ​​in width. By deduplicating the coordinate information, the numerous coordinate values ​​can be integrated and filtered. The outermost coordinate information or the innermost coordinate information can be selected as the carriage edge coordinate information, but no specific limitation is made here. The deduplication process of coordinate information can be arbitrarily adjusted according to actual needs. The ultimate goal is to filter out the most useful coordinate information for subsequent linear fitting.

[0016] In the above technical solution, the steps of determining the area inside the carriage based on the straight lines of the carriage edge and generating the mask of the area inside the carriage specifically include: determining the smaller area of ​​the scrap steel image divided by the straight lines of each carriage edge as the area outside the carriage; determining the area inside the carriage based on the area outside the carriage, and generating the mask of the area inside the carriage.

[0017] In this technical solution, the area outside the car body is determined by the straight line along the edge of the car body. Specifically, since the straight line along the edge of the car body intersects with the edge of the scrap steel image, it divides the scrap steel image into two parts. Based on the assumption that the car body of the scrap steel vehicle occupies most of the area of ​​the scrap steel image, the smaller part of the scrap steel image divided by the straight line along the edge of the car body is determined as the area outside the car body. This operation is performed on each straight line along the edge of the car body, thus determining all the areas outside the car body in the scrap steel image. The remaining part is then the area inside the car body. At the same time, an inner area mask is generated to facilitate the subsequent determination of the inner area of ​​the car body in the scrap steel image based on the inner area mask.

[0018] In the above technical solution, the step of generating the mask of the inner area of ​​the carriage based on the outer area of ​​the carriage specifically includes: establishing a full-1 matrix with the same size as the scrap steel image, and all values ​​in the full-1 matrix being 1; modifying the values ​​of the determined outer area of ​​the carriage in the full-1 matrix to 0 to form the mask of the inner area of ​​the carriage.

[0019] In this technical solution, an all-1 matrix is ​​established, and the size of the all-1 matrix is ​​consistent with the scrap steel image. Then, while determining the area outside the car body based on the straight lines of the car body edge, the value of the corresponding area outside the car body in the all-1 matrix is ​​modified to 0. After the area outside the car body is determined for each straight line of the car body edge, the position values ​​of the corresponding area outside the car body in the all-1 matrix are all 0. The remaining area with a value of 1 is the area inside the car body. At this time, the all-1 matrix after value modification is transformed into a 0-1 matrix, and the part with a value of 1 is the area inside the car body. Therefore, this 0-1 matrix is ​​the mask for the area inside the car body.

[0020] In the above technical solution, before extracting the edge information of the carriage in the scrap steel image to generate the carriage edge mask, the method further includes: when the resolution of the scrap steel image is greater than a first preset threshold, adjusting the resolution of the scrap steel image to a second preset threshold, wherein the second preset threshold is less than or equal to the first preset threshold.

[0021] In this technical solution, the resolution of the scrap steel image is obtained. When the resolution of the scrap steel image is greater than a first preset threshold, the resolution of the scrap steel image is adjusted to a second preset threshold. The second preset threshold is less than or equal to the first preset threshold. In this way, the resolution of the relatively high-definition image is reduced. Since the resolution determines the processing efficiency of the image, the higher the resolution, the greater the amount of computation. By reducing the image resolution, the efficiency of determining the area inside the carriage can be accelerated.

[0022] A second aspect of the present invention provides a carriage area recognition system, comprising: a generation module for extracting carriage edge information from a scrap steel image to generate a carriage edge mask; an acquisition module for acquiring carriage edge coordinate information based on the carriage edge mask; a fitting module for linearly fitting the straight line equation of each carriage edge based on the carriage edge coordinate information, and determining the carriage edge straight line based on the straight line equation; and a determination module for determining the carriage interior area based on the carriage edge straight line, generating a carriage interior area mask, and determining the carriage interior area in the scrap steel image based on the carriage interior area mask.

[0023] The carriage area recognition system provided by the technical solution of the present invention includes a generation module, an acquisition module, a fitting module, and a determination module. The generation module extracts carriage edge information from a scrap steel image to generate a carriage edge mask; the acquisition module acquires carriage edge coordinate information based on the carriage edge mask; the fitting module linearly fits the straight line equation of each carriage edge based on the carriage edge coordinate information, and determines the carriage edge straight line based on the straight line equation; the determination module determines the carriage interior area based on the carriage edge straight line, generates a carriage interior area mask, and determines the carriage interior area in the scrap steel image based on the carriage interior area mask. Furthermore, the carriage area recognition system provided by the technical solution of the present invention, since it implements the steps of the carriage area recognition method provided in the first aspect of the present invention, possesses all the technical effects of the carriage area recognition method, and will not be elaborated further here.

[0024] In the above technical solution, the generation module is specifically used for: performing instance segmentation on the scrap steel image to extract the edge information of the carriage in the scrap steel image; correcting the carriage edge information by combining the individual scrap steel instance segmentation results to obtain corrected carriage edge information; and generating a carriage edge mask based on the corrected carriage edge information.

[0025] In this technical solution, an instance segmentation model is used to segment the scrap steel image to extract the edge information of the carriage in the scrap steel image. Then, the individual scrap steel units in the scrap steel image are identified by the instance segmentation results of individual scrap steel units. The carriage edge information is corrected by combining the instance segmentation results of individual scrap steel units to eliminate scrap steel units that are misidentified as carriage edges. This ensures that the carriage edge information is not interfered with by individual scrap steel units, thereby improving the accuracy of the carriage edge information and optimizing the instance segmentation results of the carriage edges.

[0026] In the above technical solution, the carriage edge mask is a 0-1 matrix, where 0 represents non-carriage edges and 1 represents carriage edges. The acquisition module is specifically used to: acquire the position coordinates of the value 1 in the 0-1 matrix; and perform deduplication processing on the coordinate information to obtain the carriage edge coordinate information.

[0027] In this technical solution, the coordinates of positions with a value of 1 in the 0-1 matrix of the carriage edge mask are obtained. Since the carriage edge has a certain width, it has multiple coordinate values ​​in width. By deduplicating the coordinate information, the numerous coordinate values ​​can be integrated and filtered. The outermost coordinate information or the innermost coordinate information can be selected as the carriage edge coordinate information, but no specific limitation is made here. The deduplication process of coordinate information can be arbitrarily adjusted according to actual needs. The ultimate goal is to filter out the most useful coordinate information for subsequent linear fitting.

[0028] In the above technical solution, the acquisition module is also used to: determine the small area of ​​the scrap steel image divided by the straight lines of each carriage edge as the area outside the carriage; determine the area inside the carriage based on the area outside the carriage, and generate a mask for the area inside the carriage.

[0029] In this technical solution, the area outside the car body is determined by the straight line along the edge of the car body. Specifically, since the straight line along the edge of the car body intersects with the edge of the scrap steel image, it divides the scrap steel image into two parts. Based on the assumption that the car body of the scrap steel vehicle occupies most of the area of ​​the scrap steel image, the smaller part of the scrap steel image divided by the straight line along the edge of the car body is determined as the area outside the car body. This operation is performed on each straight line along the edge of the car body, thus determining all the areas outside the car body in the scrap steel image. The remaining part is then the area inside the car body. At the same time, an inner area mask is generated to facilitate the subsequent determination of the inner area of ​​the car body in the scrap steel image based on the inner area mask.

[0030] In the above technical solution, the acquisition module is also used to: establish a matrix of all 1s with the same size as the scrap steel image, and all values ​​in the matrix of all 1s are 1; modify the values ​​of the determined area outside the car body in the matrix of all 1s to 0, so as to form a mask for the area inside the car body.

[0031] In this technical solution, an all-1 matrix is ​​established, and the size of the all-1 matrix is ​​consistent with the scrap steel image. Then, while determining the area outside the car body based on the straight lines of the car body edge, the value of the corresponding area outside the car body in the all-1 matrix is ​​modified to 0. After the area outside the car body is determined for each straight line of the car body edge, the position values ​​of the corresponding area outside the car body in the all-1 matrix are all 0. The remaining area with a value of 1 is the area inside the car body. At this time, the all-1 matrix after value modification is transformed into a 0-1 matrix, and the part with a value of 1 is the area inside the car body. Therefore, this 0-1 matrix is ​​the mask for the area inside the car body.

[0032] In the above technical solution, the carriage area recognition method further includes: a processing module, used to adjust the resolution of the scrap steel image to a second preset threshold when the resolution of the scrap steel image is greater than a first preset threshold, wherein the second preset threshold is less than or equal to the first preset threshold.

[0033] In this technical solution, the resolution of the scrap steel image is obtained. When the resolution of the scrap steel image is greater than a first preset threshold, the resolution of the scrap steel image is adjusted to a second preset threshold. The second preset threshold is less than or equal to the first preset threshold. In this way, the resolution of the relatively high-definition image is reduced. Since the resolution determines the processing efficiency of the image, the higher the resolution, the greater the amount of computation. By reducing the image resolution, the efficiency of determining the area inside the carriage can be accelerated.

[0034] A third aspect of the present invention provides a carriage area recognition system, including a memory and a processor. The memory stores a program or instructions that can run on the processor. When the program or instructions are executed by the processor, they implement the steps of the carriage area recognition method of any of the above-described technical solutions.

[0035] The carriage area recognition system provided by the technical solution of the present invention includes a memory, a processor, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the steps defined in any of the above-described carriage area recognition methods. Furthermore, since the carriage area recognition system of this application can implement the steps defined in any of the above-described carriage area recognition methods, the carriage area recognition system provided by this technical solution has all the beneficial effects of the carriage area recognition methods provided in any of the above-described technical solutions.

[0036] A fourth aspect of the present invention provides a readable storage medium having a program and / or instructions stored thereon, wherein the program and / or instructions, when executed by a processor, implement the steps of the carriage area identification method in any of the above-described technical solutions.

[0037] The readable storage medium provided by the technical solution of the present invention has all the beneficial technical effects of the above-mentioned carriage area identification method when the program and / or instructions stored thereon are executed by the processor. Therefore, it has all the beneficial technical effects of the above-mentioned carriage area identification method.

[0038] The fifth aspect of the present invention provides a scrap steel intelligent grading system, including a car compartment area identification system as described in any of the above technical solutions; or a readable storage medium as described in the above technical solutions.

[0039] The intelligent scrap steel grading system provided by the present invention includes a vehicle compartment area identification system as described in any of the above-described technical solutions, or a readable storage medium as described in the above-described technical solutions. Therefore, the intelligent scrap steel grading system possesses all the technical effects of the vehicle compartment area identification system or the readable storage medium, which will not be elaborated further here.

[0040] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description

[0041] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0042] Figure 1 This is a flowchart illustrating a method for identifying carriage areas according to an embodiment of the present invention;

[0043] Figure 2 This is a block diagram of a carriage area recognition system according to an embodiment of the present invention;

[0044] Figure 3 This is a block diagram of a carriage area recognition system according to an embodiment of the present invention;

[0045] Figure 4 This is a flowchart illustrating a method for identifying a carriage area according to another embodiment of the present invention;

[0046] Figure 5 This is an overall framework diagram of a carriage area identification method according to another embodiment of the present invention.

[0047] in, Figure 2 and Figure 3 The correspondence between the reference numerals and component names in the attached drawings is as follows:

[0048] 200 Carriage Area Recognition System, 202 Generation Module, 204 Acquisition Module, 206 Fitting Module, 208 Determination Module, 300 Carriage Area Recognition System, 302 Memory, 304 Processor. Detailed Implementation

[0049] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0050] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0051] The following reference Figures 1 to 5 This invention describes a method and system for identifying carriage areas and an intelligent scrap steel grading system in some embodiments of the present invention.

[0052] The first aspect of this invention proposes a method for identifying areas within a vehicle compartment, used in an intelligent scrap steel grading system, such as... Figure 1 As shown, it includes:

[0053] S102, Extract the edge information of the car body in the scrap steel image to generate a car body edge mask;

[0054] S104, Obtain the coordinate information of the car edge based on the car edge mask;

[0055] S106, Based on the coordinate information of the car body edge, linearly fit the equation of the straight line of each car body edge, and determine the straight line of the car body edge based on the equation of the straight line;

[0056] S108, determine the area inside the carriage based on the straight line of the carriage edge, and generate a mask for the area inside the carriage;

[0057] S110, determine the area inside the car body in the scrap steel image based on the area mask inside the car body.

[0058] According to the carriage region recognition method provided in this embodiment, the carriage edge information is extracted from the scrap steel image to facilitate the generation of a carriage edge mask. The extraction of carriage edge information can employ an instance segmentation model. Then, the carriage edge coordinate information is obtained based on the generated carriage edge mask. This facilitates the determination of the carriage edge position and allows for linear fitting of the carriage edge line based on this coordinate information. Specifically, a straight line equation for the carriage edge is fitted based on the carriage edge information, and this equation is used to determine the carriage edge line. This facilitates subsequent segmentation of the image based on the carriage edge line to determine the inner and outer regions of the carriage. Simultaneously, the inner carriage region mask is generated when the inner carriage region is determined based on the carriage edge line, enabling the determination of the inner carriage region in the scrap steel image. This application uses linear regression to process the edge information of the carriage obtained after instance segmentation to obtain a straight line of the carriage edge. Then, a mask of the inner region of the carriage is constructed based on the straight line of the carriage edge. This allows the inner region of the carriage in the scrap steel image to be determined based on the inner region mask, thereby eliminating the interference of scrap steel individuals in the outer region of the carriage on the identification of scrap steel individuals in the inner region of the carriage and improving the accuracy of the intelligent scrap steel classification service.

[0059] In the above embodiments, the step of extracting the edge information of the carriage in the scrap steel image to generate the carriage edge mask specifically includes: performing instance segmentation on the scrap steel image to extract the edge information of the carriage in the scrap steel image; correcting the carriage edge information by combining the individual instance segmentation results of the scrap steel to obtain corrected carriage edge information; and generating the carriage edge mask based on the corrected carriage edge information.

[0060] In this embodiment, the scrap steel image is segmented using an instance segmentation model to extract the edge information of the carriage in the scrap steel image. Then, the individual scrap steel units in the scrap steel image are identified by the instance segmentation results of individual scrap steel units. The carriage edge information is corrected by combining the instance segmentation results of individual scrap steel units to eliminate scrap steel units that are misidentified as carriage edges. This ensures that the carriage edge information is not interfered with by individual scrap steel units, thereby improving the accuracy of the carriage edge information and optimizing the instance segmentation results of the carriage edges.

[0061] In the above embodiment, the carriage edge mask is a 0-1 matrix, where 0 represents non-carriage edges and 1 represents carriage edges. The step of obtaining carriage edge coordinate information based on the carriage edge mask specifically includes: obtaining the position coordinates of the value 1 in the 0-1 matrix; and performing deduplication processing on the coordinate information to obtain the carriage edge coordinate information.

[0062] In this embodiment, the coordinates of positions with a value of 1 in the 0-1 matrix of the carriage edge mask are obtained. Since the carriage edge has a certain width, it has multiple coordinate values ​​in width. By deduplicating the coordinate information, the numerous coordinate values ​​can be integrated and filtered. The outermost coordinate information can be selected as the carriage edge coordinate information, or the innermost coordinate information can be selected, but no specific limitation is made here. The deduplication of coordinate information can be arbitrarily adjusted according to actual needs. The ultimate goal is to filter out the most useful coordinate information for subsequent linear fitting.

[0063] In the above embodiment, the step of determining the area inside the carriage based on the straight lines of the carriage edge and generating a mask for the area inside the carriage specifically includes: determining the smaller area of ​​the scrap steel image divided by the straight lines of each carriage edge as the area outside the carriage; determining the area inside the carriage based on the area outside the carriage, and generating a mask for the area inside the carriage.

[0064] In this embodiment, the area outside the vehicle compartment is determined by the straight line along the edge of the vehicle compartment. Specifically, since the straight line along the edge of the vehicle compartment intersects with the edge of the scrap steel image, it divides the scrap steel image into two parts. Based on the assumption that the vehicle compartment occupies most of the scrap steel image, the smaller part of the scrap steel image divided by the straight line along the edge of the vehicle compartment is determined as the area outside the vehicle compartment. This operation is performed on each straight line along the edge of the vehicle compartment, thus determining all the areas outside the vehicle compartment in the scrap steel image. The remaining part is then the area inside the vehicle compartment. At the same time, an inner mask for the inner vehicle compartment is generated so that the inner vehicle compartment area in the scrap steel image can be determined later based on the inner mask.

[0065] In the above embodiment, the step of generating the mask of the inner area of ​​the carriage based on the outer area of ​​the carriage specifically includes: establishing a full-1 matrix with the same size as the scrap steel image, and all values ​​in the full-1 matrix being 1; modifying the values ​​of the determined outer area of ​​the carriage in the full-1 matrix to 0 to form the mask of the inner area of ​​the carriage.

[0066] In this embodiment, an all-1 matrix is ​​established, and the size of the all-1 matrix is ​​consistent with the scrap steel image. Then, while determining the area outside the car body based on the straight lines of the car body edge, the value of the corresponding area outside the car body in the all-1 matrix is ​​modified to 0. After the area outside the car body is determined for each straight line of the car body edge, the position values ​​of the corresponding area outside the car body in the all-1 matrix are all 0. The remaining area with a value of 1 is the area inside the car body. At this time, the all-1 matrix after the value modification is transformed into a 0-1 matrix, and the part with a value of 1 is the area inside the car body. Therefore, this 0-1 matrix is ​​the mask for the area inside the car body.

[0067] In the above embodiment, before extracting the carriage edge information from the scrap steel image to generate the carriage edge mask, the method further includes: when the resolution of the scrap steel image is greater than a first preset threshold, adjusting the resolution of the scrap steel image to a second preset threshold, wherein the second preset threshold is less than or equal to the first preset threshold.

[0068] In this embodiment, by acquiring the resolution of the scrap steel image, when the resolution of the scrap steel image is greater than a first preset threshold, the resolution of the scrap steel image is adjusted to a second preset threshold, and the second preset threshold is less than or equal to the first preset threshold. In this way, the resolution of the relatively high-definition image is reduced. Since the resolution determines the processing efficiency of the image, the higher the resolution, the greater the amount of computation. By reducing the image resolution, the efficiency of determining the area inside the carriage can be accelerated.

[0069] A second aspect of the present invention provides a carriage area identification system 200, such as... Figure 2 As shown, it includes: a generation module 202, used to extract the edge information of the car body in the scrap steel image to generate a car body edge mask; an acquisition module 204, used to acquire the coordinate information of the car body edge based on the car body edge mask; a fitting module 206, used to linearly fit the straight line equation of each car body edge based on the car body edge coordinate information, and determine the straight line of the car body edge based on the straight line equation; and a determination module 208, used to determine the area inside the car body based on the straight line of the car body edge, and generate a mask of the area inside the car body, and determine the area inside the car body in the scrap steel image based on the mask of the area inside the car body.

[0070] The carriage area recognition system 200 provided according to an embodiment of the present invention includes a generation module 202, an acquisition module 204, a fitting module 206, and a determination module 208. The generation module 202 is used to extract carriage edge information from a scrap steel image to generate a carriage edge mask; the acquisition module 204 is used to acquire carriage edge coordinate information based on the carriage edge mask; the fitting module 206 is used to linearly fit the straight line equation of each carriage edge based on the carriage edge coordinate information, and determine the carriage edge straight line based on the straight line equation; the determination module 208 is used to determine the carriage interior area based on the carriage edge straight line, generate a carriage interior area mask, and determine the carriage interior area in the scrap steel image based on the carriage interior area mask. Furthermore, the carriage area recognition system provided according to the embodiment of the present invention, since it implements the steps of the carriage area recognition method provided in the first aspect of the present invention, possesses all the technical effects of the carriage area recognition method, and will not be elaborated further here.

[0071] In the above embodiments, the generation module is specifically used to: perform instance segmentation on the scrap steel image to extract the edge information of the carriage in the scrap steel image; correct the carriage edge information by combining the individual scrap steel instance segmentation results to obtain corrected carriage edge information; and generate a carriage edge mask based on the corrected carriage edge information.

[0072] In this embodiment, the scrap steel image is segmented using an instance segmentation model to extract the edge information of the carriage in the scrap steel image. Then, the individual scrap steel units in the scrap steel image are identified by the instance segmentation results of individual scrap steel units. The carriage edge information is corrected by combining the instance segmentation results of individual scrap steel units to eliminate scrap steel units that are misidentified as carriage edges. This ensures that the carriage edge information is not interfered with by individual scrap steel units, thereby improving the accuracy of the carriage edge information and optimizing the instance segmentation results of the carriage edges.

[0073] In the above embodiment, the carriage edge mask is a 0-1 matrix, where 0 represents non-carriage edges and 1 represents carriage edges. The acquisition module is specifically used to: acquire the position coordinates of the position with a value of 1 in the 0-1 matrix; and perform deduplication processing on the coordinate information to obtain the carriage edge coordinate information.

[0074] In this embodiment, the coordinates of positions with a value of 1 in the 0-1 matrix of the carriage edge mask are obtained. Since the carriage edge has a certain width, it has multiple coordinate values ​​in width. By deduplicating the coordinate information, the numerous coordinate values ​​can be integrated and filtered. The outermost coordinate information can be selected as the carriage edge coordinate information, or the innermost coordinate information can be selected, but no specific limitation is made here. The deduplication of coordinate information can be arbitrarily adjusted according to actual needs. The ultimate goal is to filter out the most useful coordinate information for subsequent linear fitting.

[0075] In the above embodiments, the acquisition module is further configured to: determine the smaller area of ​​the scrap steel image divided by the straight lines of each carriage edge as the area outside the carriage; determine the area inside the carriage based on the area outside the carriage, and generate a mask for the area inside the carriage.

[0076] In this embodiment, the area outside the vehicle compartment is determined by the straight line along the edge of the vehicle compartment. Specifically, since the straight line along the edge of the vehicle compartment intersects with the edge of the scrap steel image, it divides the scrap steel image into two parts. Based on the assumption that the vehicle compartment occupies most of the scrap steel image, the smaller part of the scrap steel image divided by the straight line along the edge of the vehicle compartment is determined as the area outside the vehicle compartment. This operation is performed on each straight line along the edge of the vehicle compartment, thus determining all the areas outside the vehicle compartment in the scrap steel image. The remaining part is then the area inside the vehicle compartment. At the same time, an inner mask for the inner vehicle compartment is generated so that the inner vehicle compartment area in the scrap steel image can be determined later based on the inner mask.

[0077] In the above embodiments, the acquisition module is further configured to: establish a matrix of all 1s with the same size as the scrap steel image, wherein all values ​​in the matrix are 1; and modify the values ​​of the determined areas outside the car body in the matrix of all 1s to 0, so as to form a mask for the areas inside the car body.

[0078] In this embodiment, an all-1 matrix is ​​established, and the size of the all-1 matrix is ​​consistent with the scrap steel image. Then, while determining the area outside the car body based on the straight lines of the car body edge, the value of the corresponding area outside the car body in the all-1 matrix is ​​modified to 0. After the area outside the car body is determined for each straight line of the car body edge, the position values ​​of the corresponding area outside the car body in the all-1 matrix are all 0. The remaining area with a value of 1 is the area inside the car body. At this time, the all-1 matrix after the value modification is transformed into a 0-1 matrix, and the part with a value of 1 is the area inside the car body. Therefore, this 0-1 matrix is ​​the mask for the area inside the car body.

[0079] In the above embodiments, the carriage area recognition method further includes: a processing module, used to adjust the resolution of the scrap steel image to a second preset threshold when the resolution of the scrap steel image is greater than a first preset threshold, wherein the second preset threshold is less than or equal to the first preset threshold.

[0080] In this embodiment, by acquiring the resolution of the scrap steel image, when the resolution of the scrap steel image is greater than a first preset threshold, the resolution of the scrap steel image is adjusted to a second preset threshold, and the second preset threshold is less than or equal to the first preset threshold. In this way, the resolution of the relatively high-definition image is reduced. Since the resolution determines the processing efficiency of the image, the higher the resolution, the greater the amount of computation. By reducing the image resolution, the efficiency of determining the area inside the carriage can be accelerated.

[0081] A third aspect of the present invention provides a carriage area recognition system 300, such as... Figure 3 As shown, it includes: a memory 302, a processor 304, and a program stored in the memory 302 and executable on the processor 304. When the program is executed by the processor 304, it implements the steps defined by the carriage area identification method of any of the above embodiments.

[0082] The carriage area recognition system provided according to an embodiment of the present invention includes a memory, a processor, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the steps defined in any of the above-described carriage area recognition methods. Furthermore, since the carriage area recognition system of this application can implement the steps defined in any of the above-described carriage area recognition methods, the carriage area recognition system provided in this embodiment has all the beneficial effects of the carriage area recognition methods provided in any of the above embodiments.

[0083] A fourth aspect of the present invention provides a readable storage medium having a program and / or instructions stored thereon, which, when executed by a processor, implement the steps of the carriage area identification method in any of the above embodiments.

[0084] The readable storage medium provided according to the embodiments of the present invention has all the beneficial technical effects of the above-described carriage area identification method when the program and / or instructions stored thereon are executed by a processor.

[0085] A fifth aspect of the present invention provides a smart scrap steel grading system, including a car compartment area identification system as described in the above embodiments; or a readable storage medium as described in the above embodiments.

[0086] The intelligent scrap steel grading system provided according to embodiments of the present invention includes a vehicle compartment area identification system as described in the above embodiments or a readable storage medium as described in the above embodiments. Therefore, the intelligent scrap steel grading system possesses all the technical effects of the vehicle compartment area identification system or the readable storage medium, which will not be elaborated further here.

[0087] The method for identifying carriage areas provided in this application will be further described below with reference to another specific embodiment.

[0088] The carriage area identification method proposed in this embodiment, such as Figure 4 As shown, it includes:

[0089] S402, instance splitting.

[0090] Specifically, after a vehicle awaiting classification parks in the designated area, the PTZ camera uses a suction cup or a grabber to pick up the scrap steel and takes a focused photograph of the surface. The image is then preprocessed, followed by instance segmentation to detect and identify the edge information of the vehicle body in the PTZ camera's focused image. Because other objects that closely resemble the edge of the vehicle body can be misdetected as such, to improve the accuracy of instance segmentation, in practical applications, the results of individual instance segmentation are combined to eliminate misidentified individual scrap steel pieces, thereby improving the accuracy of instance segmentation of vehicle body edges and optimizing the recognition results.

[0091] S404, Optimization of recognition and detection result processing.

[0092] Specifically, the mask in the instance segmentation detection and recognition results is a 0-1 matrix (0 represents non-carriage edges, 1 represents carriage edges). It needs to be processed to convert the positions with values ​​of 1 into corresponding coordinate information, facilitating subsequent linear fitting based on these coordinates to obtain complete information for each carriage edge. For the coordinate information of each edge obtained through processing, based on the deduplication principle, the most useful coordinate information is optimized and retained to enable more efficient post-processing.

[0093] S406 performs linear regression and post-processing on the results of the optimization.

[0094] Specifically, based on the coordinate information of each edge obtained through optimization, linear fitting is performed sequentially, resulting in a linear equation for each edge. Then, the straight line or extension of each carriage edge intersects with the edge of the focused image. The coordinates of the intersection points are calculated sequentially based on the fitted lines. Then, based on the assumption that the carriage occupies a large portion of the focused image, the region outside the carriage for each fitted line is determined sequentially.

[0095] S408 constructs a mask for the effective area of ​​the carriage based on the results of linear regression.

[0096] Specifically, first, create a matrix with the same size as the focused image and all values ​​of 1. Then, based on the steps above, modify and fill all the values ​​of the outer area of ​​each side of the carriage with 0, thus obtaining a mask of the effective area of ​​the carriage in the focused image.

[0097] S410 removes detected scrap steel from outside the car body using a mask covering the effective area of ​​the car body.

[0098] Specifically, the mask of the effective area of ​​the carriage in the focused image constructed by the above method is processed in combination with the detection and recognition results in the actual classification application of intelligent scrap steel classification, so that the corresponding result of only retaining the detection and recognition inside the carriage can be obtained.

[0099] In practical applications, we may encounter situations where high-resolution images have very high resolutions. In such cases, we can scale down the original high-resolution image proportionally, i.e., reduce the resolution before processing, to ensure high processing efficiency.

[0100] like Figure 5 The diagram shown is an overall framework diagram of the carriage area recognition method in this embodiment.

[0101] This embodiment obtains information about the edges of the wagon carriages by segmenting the focused image. The incomplete information can be processed to calculate more complete and accurate edge data. This method accurately obtains the edge information, solving the problem of scrap steel models detecting scrap steel outside the wagon carriages. Simultaneously, processing the edge information of the wagon carriages in the focused image yields corresponding coordinate information. Linear regression fitting is then performed based on these coordinates to obtain the intersection points of the wagon carriage edges or their extensions with the image boundary. This method helps obtain the intersection point coordinates, facilitating the subsequent construction of a valid wagon carriage area mask. After filling in the calculated intersection point coordinates, the valid wagon carriage area mask is obtained. This mask can effectively remove scrap steel outside the wagon carriages detected by the scrap steel detection model, improving the accuracy of intelligent scrap steel classification.

[0102] In this specification, the term "multiple" refers to two or more unless otherwise expressly defined. The terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; "linking" can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0103] In the description of this specification, the terms "one embodiment," "some embodiments," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0104] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for identifying a vehicle compartment area for a scrap steel intelligent grading system, characterized in that, The method comprises the following steps: extracting the information of the carriage edge in the scrap steel image to generate a carriage edge mask; acquiring the carriage edge coordinate information according to the carriage edge mask; linearly fitting the linear equation of each carriage edge according to the carriage edge coordinate information, and determining the carriage edge straight line according to the linear equation; determining the carriage inner area according to the carriage edge straight line, and generating a carriage inner area mask; determining the carriage inner area in the scrap steel image according to the carriage inner area mask; The step of extracting the information of the carriage edge in the scrap steel image to generate a carriage edge mask specifically comprises: instance segmentation is performed on the scrap steel image to extract the information of the carriage edge in the scrap steel image; the carriage edge information is corrected in combination with the scrap steel monomer instance segmentation result to obtain corrected carriage edge information; a carriage edge mask is generated based on the corrected carriage edge information; The carriage edge mask is a 0-1 matrix, 0 in the matrix is a non-carriage edge, and 1 is a carriage edge. The step of acquiring the carriage edge coordinate information according to the carriage edge mask specifically comprises: acquiring the position coordinates of the values of 1 in the 0-1 matrix; de-duplicating the coordinate information to obtain the carriage edge coordinate information; The step of linearly fitting the linear equation of each carriage edge according to the carriage edge coordinate information, and determining the carriage edge straight line according to the linear equation comprises: linear fitting is sequentially performed according to the coordinate information of each edge obtained through optimization processing, each edge obtains a linear equation, then the straight line or the extension line of each carriage edge intersects with the edge of the focused picture, and the coordinate values of the intersection points are sequentially calculated according to the fitted straight lines; according to the assumption that the carriage occupies most of the area of the focused picture, it is sequentially determined which part of each fitted straight line is the area outside the carriage.

2. The car area identifying method according to claim 1, characterized by, The step of determining the carriage inner area according to the carriage edge straight line, and generating a carriage inner area mask specifically comprises: determining the small part of the area of the scrap steel image divided by each carriage edge straight line as the area outside the carriage; determining the carriage inner area according to the area outside the carriage, and generating the carriage inner area mask.

3. The vehicle compartment region recognition method according to claim 2, characterized by, The step of generating the carriage inner area mask according to the area outside the carriage specifically comprises: an all-1 matrix consistent with the size of the scrap steel image is established, and the values in the all-1 matrix are all 1; the values of the determined area outside the carriage in the all-1 matrix are modified to 0 to form the carriage inner area mask.

4. The vehicle compartment region identification method according to claim 1, characterized by, Before the step of extracting the information of the carriage edge in the scrap steel image to generate a carriage edge mask, the method further comprises: when the resolution of the scrap steel image is greater than a first preset threshold, adjusting the resolution of the scrap steel image to a second preset threshold, the second preset threshold is less than or equal to the first preset threshold.

5. A vehicle bay area identification system characterized by, The method comprises the following steps: a generating module is configured to extract the information of the carriage edge in the scrap steel image to generate a carriage edge mask; an acquiring module is configured to acquire the carriage edge coordinate information according to the carriage edge mask; a fitting module is configured to linearly fit the linear equation of each carriage edge according to the carriage edge coordinate information, and determine the carriage edge straight line according to the linear equation; determining a vehicle compartment inner region according to the vehicle compartment edge line, and generating a vehicle compartment inner region mask according to the vehicle compartment inner region mask to determine a vehicle compartment inner region in the scrap steel image; The generation module is specifically configured to: perform instance segmentation on the scrap steel image to extract vehicle compartment edge information in the scrap steel image; correct the vehicle compartment edge information in combination with a scrap steel monomer instance segmentation result to obtain corrected vehicle compartment edge information; generate a vehicle compartment edge mask based on the corrected vehicle compartment edge information; The vehicle compartment edge mask is a 0-1 matrix, 0 in the matrix is a non-vehicle compartment edge, and 1 is a vehicle compartment edge. The acquisition module is specifically configured to: acquire position coordinates of values being 1 in the 0-1 matrix; perform deduplication processing on the coordinate information to obtain the vehicle compartment edge coordinate information. The fitting module is specifically configured to: perform linear fitting in sequence according to the coordinate information of each edge obtained through the optimization processing, each edge obtains a linear equation, then the straight line or the extended line of each vehicle compartment edge intersects with the edge of the focused picture, and the coordinate values of the intersection points are calculated in sequence according to the fitted straight lines; 6. A vehicle bay area identification system characterized by, determine, according to an assumption that the vehicle compartment occupies most of the area of the focused picture, which part of each fitted straight line is a vehicle compartment outer region. comprise:

7. A readable storage medium, characterized by a memory, a processor, and a program stored on the memory and executable on the processor, and the program is executed by the processor to implement the steps defined in the vehicle compartment region identification method in any one of claims 1 to 4.

8. A scrap steel intelligent grading system characterized in that, a program and / or instructions are stored thereon, and the program and / or the instructions are executed by a processor to implement the steps of the vehicle compartment region identification method in any one of claims 1 to 4. comprise the vehicle compartment region identification system in claim 5 or 6; or the readable storage medium in claim 7.

Citation Information

Patent Citations

  • Machine-vision-based automatic positioning device and method for container loading and unloading trucks

    CN111704035A

  • Identification method based on scrap steel carriage area

    CN113269795A