A method, system, device and medium for identifying defects in plastic steel profiles
By obtaining the frontal image of the plastic steel profile and using machine vision recognition technology to identify the profile features and defect characteristics of the profile, the problem of low accuracy of the existing detection methods is solved, and high accuracy and high efficiency defect recognition is achieved.
Patent Information
- Application Number
- CN202311824708.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2043-12-26
AI Technical Summary
The existing defect detection and identification methods for plastic steel profiles have low accuracy, there are problems such as large human error and low accuracy, and the detection efficiency is also relatively low.
By obtaining the frontal image of the plastic steel profile, using machine vision recognition technology and image processing technology, the profile features of the profile are extracted and identified, whether there are cavity deformation and fastener offset characteristics, and the qualification of the plastic steel profile is judged.
Compared with manual detection, the error is greatly reduced, the detection accuracy is improved, the deformation defect recognition timing of different parts is reasonably planned, and the identification efficiency is improved.
Smart Images

Figure CN117974558B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image data processing technology, and in particular to a method, system, device and medium for identifying defects in plastic-steel profiles. Background Art
[0002] Plastic steel profiles are referred to as plastic steel. The main chemical component is PVC, so it is also called PVC profiles. It is a new type of building material that is widely used. Due to its excellent physical properties such as rigidity, elasticity, corrosion resistance, and anti-aging performance, it is usually used as a good substitute for non-ferrous metals such as copper, zinc, and aluminum. In house construction, it is mainly used for sliding, casement doors and windows, guardrails, pipes, and ceiling materials. Through new process processing, it is also widely used in automobile engine protection panels. It is not only light in weight, but also has good toughness and has the excellent properties of rigidity. It is sometimes also called alloy plastic steel.
[0003] Plastic-steel profiles can have a variety of structural forms depending on the usage scenarios. Some of the composite structures include a profile body with a cavity inside the profile body for filling the supporting reinforcement structure, and a plurality of fasteners outside the profile body for installation. During the production and manufacturing process of plastic-steel profiles, due to the influence of the process, defects such as shrinkage and deformation of the cavity inside the profile body and displacement and deformation of the fasteners outside the profile body are prone to occur, resulting in the inability to assemble with other accessories later. Therefore, defect detection and identification are still required in the end. The current detection and identification methods are mainly through manual visual inspection or detection using measuring tools. There are problems of large human errors and low accuracy, and the detection efficiency is also relatively low. Summary of the invention
[0004] The main purpose of the present application is to provide a method, system, device and medium for identifying defects in plastic-steel profiles, aiming to solve the technical problem of low accuracy of existing defect detection and identification methods for plastic-steel profiles.
[0005] To achieve the above objectives, the present application provides a method for identifying defects in plastic-steel profiles, comprising the following steps:
[0006] Acquire a front image of the plastic-steel profile; wherein the plastic-steel profile includes a first profile and a second profile connected to the upper and lower parts of the first profile, two fasteners are connected to the outer walls of the two second profiles, a first cavity is defined in the first profile, a second cavity is defined in the second profile, and the front image is an image showing the first cavity and the second cavity;
[0007] Extracting a first contour feature corresponding to the first profile in the front image, and identifying whether a first cavity deformation feature exists in the first contour feature;
[0008] If the first cavity deformation feature does not exist, extract the second contour feature corresponding to the second profile in the front image, and identify whether the second cavity deformation feature exists in the second contour feature;
[0009] If the second cavity deformation feature does not exist, extract the third contour feature corresponding to the fastener in the front image, and identify whether there is a fastener offset feature in the third contour feature;
[0010] If there is no fastener offset feature, the plastic-steel profile is judged to be a qualified product.
[0011] Optionally, identifying whether a first cavity deformation feature exists in the first contour feature includes:
[0012] Extracting a first contour figure corresponding to the first cavity from the first contour feature; wherein the first contour figure is a closed figure surrounded by a plurality of broken lines;
[0013] Identifying and marking a plurality of first inflection points in the first contour graph;
[0014] Connect the two marked first inflection points of the opposite point group to obtain a plurality of mutually intersecting first reference lines and second reference lines; wherein the opposite point group is two first inflection points that are left-right symmetrical or top-bottom symmetrical in the first contour figure when the first cavity is not deformed.
[0015] Identify multiple angles formed by multiple first reference lines and multiple second reference lines, and determine whether the multiple angles all meet preset verticality requirements;
[0016] If any angle does not meet the verticality requirement, it is identified as the presence of the first cavity deformation feature.
[0017] Optionally, identifying whether a second cavity deformation feature exists in the second contour feature includes:
[0018] Extracting a second contour figure corresponding to the second cavity from the second contour feature; wherein the second contour figure is a closed figure surrounded by a plurality of arcs and broken lines;
[0019] Identifying and marking a plurality of second inflection points in the second contour graph;
[0020] Connect the marked two second inflection points which are mutually symmetrical point groups to obtain at least three first auxiliary lines; wherein the symmetrical point group is two second inflection points which are centrally symmetrical in the second contour figure when the second cavity is not deformed;
[0021] Identify the number of intersections of multiple first auxiliary lines;
[0022] If there are multiple intersection points, it is identified as the presence of a second cavity deformation feature.
[0023] Optionally, if the number of intersections is one, the following steps are also included:
[0024] Connecting the intersection points in the two corresponding second cavities to obtain a second auxiliary line;
[0025] Get the verticality of the second auxiliary line;
[0026] If the verticality is qualified, the measured length of the second auxiliary line is obtained;
[0027] Compare the measured length with a preset length threshold; wherein the length threshold is the length of the second auxiliary line formed when the two second cavities are not offset as a whole;
[0028] If the measured length is equal to the length threshold, it is identified that the second cavity deformation feature does not exist.
[0029] Optionally, identifying whether there is a fastener offset feature in the third contour feature includes:
[0030] Identify two end corner points corresponding to each fastener in the third contour feature; wherein the fastener is L-shaped, and the end corner points are right-angled endpoints at two ends of the L-shaped fastener;
[0031] Connect the four end corner points end to end to obtain a measuring quadrilateral;
[0032] The measured quadrilateral is overlapped and matched with a preset standard quadrilateral; wherein the standard quadrilateral is a quadrilateral constructed when the fastener is not offset;
[0033] If the measured quadrilateral completely overlaps with the standard quadrilateral, it is recognized that there is no fastener offset feature.
[0034] Optionally, the lines of the standard quadrilateral have a line width of a preset width.
[0035] Optionally, obtaining a front image of the plastic-steel profile includes:
[0036] Obtain the original image of the plastic steel profile;
[0037] Perform grayscale processing on the original image to obtain a grayscale image;
[0038] Perform noise reduction on grayscale images;
[0039] The denoised grayscale image is binarized to obtain a black and white frontal image.
[0040] To achieve the above objectives, the present application also provides a plastic-steel profile defect identification device, comprising:
[0041] An image acquisition module is used to acquire a front image of the plastic-steel profile; wherein the plastic-steel profile includes a first profile and a second profile connected to the upper and lower parts of the first profile, two fasteners are connected to the outer walls of the two second profiles, a first cavity is opened in the first profile, a second cavity is opened in the second profile, and the front image is an image showing the first cavity and the second cavity;
[0042] A first feature recognition module is used to extract a first contour feature corresponding to the first profile in the front image, and to identify whether there is a first cavity deformation feature in the first contour feature;
[0043] A second feature recognition module is used to extract a second contour feature corresponding to the second profile in the front image if the first cavity deformation feature does not exist, and to recognize whether the second cavity deformation feature exists in the second contour feature;
[0044] A third feature recognition module is used to extract a third contour feature corresponding to the fastener in the front image if the second cavity deformation feature does not exist, and to identify whether there is a fastener offset feature in the third contour feature;
[0045] The judgment module is used to judge that the plastic-steel profile is a qualified product if there is no fastener offset feature.
[0046] To achieve the above objectives, the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above method.
[0047] To achieve the above objectives, the present application also provides a computer-readable storage medium, on which a computer program is stored, and a processor executes the computer program to implement the above method.
[0048] The beneficial effects that this application can achieve are as follows:
[0049] The present application is based on the structural characteristics of plastic-steel profiles, and combined with machine vision recognition technology, using the acquired front image of the plastic-steel profile, and using image processing technology, to preferentially identify the deformation feature of the first cavity located in the middle of the profile with the greatest deformation influence. Since if the first cavity in the first profile is deformed, it is easy to indirectly cause the second cavity of the second profile on the upper and lower sides to undergo a certain deformation. Therefore, the first cavity deformation feature is preferentially identified here. If the deformation feature does not exist, then the second cavity deformation feature located in the upper and lower parts of the profile is identified. Similarly, if the second cavity is deformed, it is also easy to cause the outer fasteners to deform accordingly. Therefore, the second cavity deformation feature is first identified. If the deformation feature does not exist, the fastener offset feature is identified at this time. When the fastener offset feature does not exist, the current plastic-steel profile can be identified as a qualified product, and finally the defect identification of the easily deformed part of the plastic-steel profile of the composite structure of the present application is completed. Compared with manual detection, the error is greatly reduced, the detection accuracy is improved, and the deformation defect identification sequence of different parts is reasonably planned to improve the recognition efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the prior art description. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0051] Figure 1 A schematic diagram of a process of identifying defects in a plastic-steel profile in an embodiment of the present application;
[0052] Figure 2 This is a schematic diagram of the structure of the plastic-steel profile in the embodiment of the present application;
[0053] Figure 3 A schematic diagram of a front image of a plastic-steel profile obtained in an embodiment of the present application;
[0054] Figure 4 This is a schematic diagram of the principle of identifying the deformation feature of the first cavity in an embodiment of the present application;
[0055] Figure 5 This is a schematic diagram of the principle of identifying the deformation feature of the second cavity in an embodiment of the present application;
[0056] Figure 6 This is a schematic diagram of the principle of further identifying the deformation characteristics of the second cavity in the embodiment of the present application;
[0057] Figure 7 It is a schematic diagram of the principle of identifying the offset feature of a fastener in an embodiment of the present application.
[0058] Reference numerals:
[0059] 110 - first profile, 111 - first cavity, 120 - second profile, 121 - second cavity, 130 - fastener.
[0060] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0062] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components in a certain specific posture. If the specific posture changes, the directional indication will also change accordingly.
[0063] In this application, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0064] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the meaning of "and / or" appearing in the full text includes three parallel schemes. Taking "A and / or B" as an example, it includes scheme A, or scheme B, or a scheme that satisfies both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in the field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0065] Example 1
[0066] Reference Figure 1-Figure 7 This embodiment provides a method for identifying defects in a plastic-steel profile, comprising the following steps:
[0067] Obtain a front image of the plastic-steel profile; wherein the plastic-steel profile includes a first profile 110 and a second profile 120 connected to the upper and lower parts of the first profile 110, two fasteners 130 are connected to the outer walls of the two second profiles 120, a first cavity 111 is defined in the first profile 110, a second cavity 121 is defined in the second profile 120, and the front image is an image showing the first cavity 111 and the second cavity 121;
[0068] Extracting a first contour feature corresponding to the first profile 110 in the front image, and identifying whether there is a deformation feature of the first cavity 111 in the first contour feature;
[0069] If the deformation feature of the first cavity 111 does not exist, extract the second contour feature corresponding to the second profile 120 in the front image, and identify whether the deformation feature of the second cavity 121 exists in the second contour feature;
[0070] If there is no deformation feature of the second cavity 121, extract the third contour feature corresponding to the fastener 130 in the front image, and identify whether there is a deviation feature of the fastener 130 in the third contour feature;
[0071] If there is no deviation feature of the fastener 130, the plastic-steel profile is judged to be a qualified product.
[0072] In this embodiment, based on the structural characteristics of the plastic-steel profile, combined with machine vision recognition technology, the front image of the plastic-steel profile obtained is used, and image processing technology is used to preferentially identify the deformation characteristics of the first cavity 111 located in the middle of the profile with the greatest deformation influence. Since the first cavity 111 in the first profile 110 is easily deformed if it is deformed, it is easy to indirectly cause the second cavity 121 of the second profile 120 on the upper and lower sides to be deformed accordingly, therefore, the deformation characteristics of the first cavity 111 are preferentially identified here. If the deformation characteristics do not exist, the second cavity 121 located in the upper and lower parts of the profile is then identified. 1 deformation feature. Similarly, if the second cavity 121 is deformed, it is also easy to cause the outer fastener 130 to deform accordingly. Therefore, the deformation feature of the second cavity 121 is first identified. If the deformation feature does not exist, the offset feature of the fastener 130 is then identified. When the offset feature of the fastener 130 does not exist, the current plastic-steel profile can be identified as a qualified product. Finally, the defect identification of the easily deformed part of the plastic-steel profile of the composite structure of this embodiment is completed. Compared with manual detection, the error is greatly reduced, the detection accuracy is improved, and the deformation defect identification sequence of different parts is reasonably planned to improve the identification efficiency.
[0073] As an optional implementation, identifying whether there is a deformation feature of the first cavity 111 in the first contour feature includes:
[0074] Extracting a first contour figure corresponding to the first cavity 111 from the first contour feature; wherein the first contour figure is a closed figure surrounded by a plurality of broken lines;
[0075] Identifying and marking a plurality of first inflection points in the first contour graph;
[0076] The two marked first inflection points of the opposite point group are connected to obtain a plurality of mutually intersecting first reference lines and second reference lines; wherein the opposite point group is two first inflection points that are left-right symmetrical or top-bottom symmetrical in the first contour figure when the first cavity 111 is not deformed.
[0077] Identify multiple angles formed by multiple first reference lines and multiple second reference lines, and determine whether the multiple angles all meet preset verticality requirements;
[0078] If any angle does not meet the verticality requirement, it is identified that the first cavity 111 has a deformation feature.
[0079] In the present embodiment, since the first cavity 111 needs to be assembled with the supporting reinforcement structure later, the first cavity 111 has an uneven shape to play a role in limiting rotation, and the undeformed standard first cavity 111 can be regarded as a closed figure surrounded by multiple broken lines, and should be a symmetrical figure, so multiple first inflection points will be formed. Based on left-right symmetry or top-bottom symmetry, two corresponding first inflection points can form an opposite point group. Therefore, in the present embodiment, two first inflection points that are opposite point groups can be connected to obtain multiple mutually intersecting first reference lines and second reference lines, and at the same time, it is identified whether multiple angles formed by multiple first reference lines and multiple second reference lines meet the preset verticality requirements. As long as any angle does not meet the verticality requirements, it means that after the first cavity 111 is deformed, the position of one or more first inflection points is offset, resulting in the corresponding first reference line or second reference line offset, and then the mutual perpendicularity requirement cannot be met, so it can be identified as the existence of the first cavity 111 deformation feature. Based on this identification method, the deformation feature of the first cavity 111 can be effectively and accurately identified.
[0080] It should be noted that after the first inflection points are identified, it is not necessary to mark all of them. It is only necessary to mark a certain number of first inflection points at the positions where deformation should be performed, and ensure that at least two first reference lines and two second reference lines can be formed subsequently, thereby ensuring recognition accuracy.
[0081] As an optional implementation, identifying whether the second cavity 121 deformation feature exists in the second contour feature includes:
[0082] Extracting a second contour figure corresponding to the second cavity 121 from the second contour feature; wherein the second contour figure is a closed figure surrounded by a plurality of arcs and broken lines;
[0083] Identifying and marking a plurality of second inflection points in the second contour graph;
[0084] Connect the two marked second inflection points that are mutually symmetrical point groups to obtain at least three first auxiliary lines; wherein the symmetrical point group is two second inflection points that are centrally symmetrical in the second contour graph when the second cavity 121 is not deformed;
[0085] Identify the number of intersections of multiple first auxiliary lines;
[0086] If there are multiple intersections, it is identified that there is a deformation feature of the second cavity 121 .
[0087] In this embodiment, the second cavity 121 is similar to a spline structure, which is used to limit the position after being assembled with the reinforcement structure, and the second cavity 121 is a centrally symmetrical figure. When the second cavity 121 is not deformed, when two second inflection points of the mutually symmetrical point group corresponding to the second contour figure of the second cavity 121 are connected to obtain at least three first auxiliary lines, the intersection points between the first auxiliary lines are all the same point (i.e., the centrally symmetrical point), that is, there is only one intersection point. If there is overall deformation or local deformation, the second contour figure will become an asymmetrical figure, and ultimately the intersection points of multiple first auxiliary lines will not be at the same point. Therefore, by identifying the number of intersection points, once more than or equal to two intersection points are identified, the deformation feature of the second cavity 121 can be accurately and effectively identified.
[0088] As an optional implementation manner, if the number of intersections is one, the following steps are also included:
[0089] Connect the intersection points in the two corresponding second cavities 121 to obtain a second auxiliary line;
[0090] Get the verticality of the second auxiliary line;
[0091] If the verticality is qualified, the measured length of the second auxiliary line is obtained;
[0092] Compare the measured length with a preset length threshold, wherein the length threshold is the length of the second auxiliary line formed when the two second cavities 121 are not offset as a whole;
[0093] If the measured length is equal to the length threshold, it is identified that the deformation feature of the second cavity 121 does not exist.
[0094] In this embodiment, when it is identified that the number of intersections obtained by connecting two second contour figures is one, it is proved that there is no deformation of a single second cavity 121. Under normal circumstances, the two second cavities 121 should also be symmetrical with each other, but the special case that one and two second cavities 121 are offset as a whole is not excluded. In order to further detect whether the relative positions of the two second cavities 121 are offset, the second auxiliary lines are obtained based on the intersections in the two second cavities 121. By detecting the verticality of the second auxiliary lines, if they are not vertical, it means that the overall offset of a second cavity 121 causes the center (i.e., the intersection) to be offset, or the two second cavities 121 are offset to different degrees, which will cause the second auxiliary lines to be tilted to a certain extent. If they are perpendicular to each other, the measured length of the second auxiliary lines is also detected to detect whether there is a situation where the second cavity 121 is just vertically offset as a whole. Although this situation meets the verticality, the measured length will be lower than the preset length threshold, so that the special case of the vertical overall offset of the second cavity 121 can be further detected. Therefore, this embodiment takes into account various situations of the overall offset of the second cavity 121, and the defect recognition accuracy is high.
[0095] It should be noted that if the two second cavities 121 are offset in symmetrical directions and have the same offset, the second auxiliary lines will also be vertical, but the probability of this situation is extremely small, almost zero, so there is no need to consider this situation.
[0096] As an optional implementation, identifying whether there is a buckle 130 offset feature in the third contour feature includes:
[0097] Identify two end corner points corresponding to each fastener 130 in the third contour feature; wherein the fastener 130 is L-shaped, and the end corner points are right-angled endpoints at two ends of the L-shaped fastener 130;
[0098] Connect the four end corner points end to end to obtain a measuring quadrilateral;
[0099] The measured quadrilateral is overlapped and matched with a preset standard quadrilateral; wherein the standard quadrilateral is a quadrilateral constructed when the fastener 130 is not offset;
[0100] If the measured quadrilateral completely coincides with the standard quadrilateral, it is recognized that there is no offset feature of the fastener 130 .
[0101] In this embodiment, due to the special structure of the fastener 130, when it is deformed, the corresponding right-angle endpoints at the two ends are the parts with the largest and most obvious position offset. Therefore, this embodiment identifies the two end corner points corresponding to each fastener 130 in the third contour feature (which should be the contour feature of the two fasteners 130 connected to the same second profile 120), and then connects the four end corner points end to end to obtain a measuring quadrilateral, and the measuring quadrilateral is overlapped and matched with the standard quadrilateral. If there is an offset of one or two fasteners 130, the shape of the measuring quadrilateral will change to a certain extent, and it will not be able to completely overlap with the standard quadrilateral. If it completely overlaps, it can be identified that there is no offset feature of the fastener 130. The identification is accurate and effective, and can be used to accurately identify the deformation defects of L-shaped fasteners 130.
[0102] As an optional implementation, the lines of the standard quadrilateral have a preset line width, so that the measuring quadrilateral can overlap with the standard quadrilateral with a certain line width under a certain deformation amount, thereby allowing a certain error offset of the fastener 130.
[0103] As an optional implementation, obtaining a front image of the plastic-steel profile includes:
[0104] Obtain the original image of the plastic steel profile;
[0105] Perform grayscale processing on the original image to obtain a grayscale image;
[0106] Perform noise reduction on grayscale images;
[0107] The denoised grayscale image is binarized to obtain a black and white frontal image.
[0108] In this embodiment, when obtaining the front image, the original image of the plastic-steel profile is first obtained, and then the original image is subjected to grayscale processing, noise reduction processing, and binarization processing in sequence, so as to obtain a black and white front image, which facilitates the subsequent recognition and extraction of contour features and improves recognition accuracy.
[0109] Example 2
[0110] Reference Figure 1-Figure 7 Based on the same inventive concept as the above-mentioned embodiment, this embodiment provides a plastic steel profile defect identification device, comprising:
[0111] An image acquisition module is used to acquire a front image of the plastic-steel profile; wherein the plastic-steel profile includes a first profile 110 and a second profile 120 connected to the upper and lower parts of the first profile 110, two fasteners 130 are connected to the outer walls of the two second profiles 120, a first cavity 111 is opened in the first profile 110, and a second cavity 121 is opened in the second profile 120, and the front image is an image showing the first cavity 111 and the second cavity 121;
[0112] A first feature recognition module is used to extract a first contour feature corresponding to the first profile 110 in the front image, and recognize whether there is a deformation feature of the first cavity 111 in the first contour feature;
[0113] A second feature recognition module is used to extract the second contour feature corresponding to the second profile 120 in the front image if there is no deformation feature of the first cavity 111, and recognize whether there is a deformation feature of the second cavity 121 in the second contour feature;
[0114] A third feature recognition module is used to extract the third contour feature corresponding to the fastener 130 in the front image if there is no deformation feature of the second cavity 121, and to recognize whether there is an offset feature of the fastener 130 in the third contour feature;
[0115] The judgment module is used to judge that the plastic-steel profile is a qualified product if there is no deviation feature of the fastener 130.
[0116] The relevant explanations and examples of each module in the device of this embodiment can refer to the method of the aforementioned embodiment, and will not be repeated here.
[0117] Example 3
[0118] Based on the same inventive concept as the above-mentioned embodiment, this embodiment provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-mentioned method.
[0119] Example 4
[0120] Based on the same inventive concept as the aforementioned embodiment, this embodiment provides a computer-readable storage medium, on which a computer program is stored, and a processor executes the computer program to implement the aforementioned method.
[0121] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for identifying defects in plastic steel profiles, characterized in that: The following steps are involved: Acquire a front image of a plastic-steel profile; wherein the plastic-steel profile comprises a first profile and a second profile connected to the upper and lower parts of the first profile, two fasteners are connected to the outer walls of the two second profiles, a first cavity is defined in the first profile, a second cavity is defined in the second profile, and the front image is an image showing the first cavity and the second cavity; Extracting the first contour feature corresponding to the first profile in the front image, and identifying whether there is a first cavity deformation feature in the first contour feature; including: extracting the first contour figure corresponding to the first cavity in the first contour feature; wherein the first contour figure is a closed figure surrounded by a plurality of broken lines; identifying and marking a plurality of first inflection points in the first contour figure; connecting the marked two first inflection points that are mutually opposite point groups to obtain a plurality of mutually intersecting first reference lines and second reference lines; wherein the opposite point groups are two first inflection points that are left-right symmetrical or top-bottom symmetrical in the first contour figure when the first cavity is not deformed; identifying a plurality of angles formed by a plurality of the first reference lines and a plurality of the second reference lines, and judging whether the plurality of angles all meet the preset verticality requirement; if any of the angles does not meet the verticality requirement, identifying the presence of the first cavity deformation feature; If the first cavity deformation feature does not exist, extract the second contour feature corresponding to the second profile in the front image, and identify whether the second cavity deformation feature exists in the second contour feature; including: extracting the second contour figure corresponding to the second cavity in the second contour feature; wherein the second contour figure is a closed figure surrounded by multiple arcs and broken lines; identifying multiple second inflection points in the second contour figure and marking them; connecting the marked two second inflection points that are mutually symmetrical point groups to obtain at least three first auxiliary lines; wherein the symmetrical point group is two second inflection points that are centrally symmetrical in the second contour figure corresponding to the second cavity when the second cavity is not deformed; identifying the number of intersections of multiple first auxiliary lines; if the number of intersections is multiple, it is identified as the presence of a second cavity deformation feature; If the second cavity deformation feature does not exist, extract the third contour feature corresponding to the fastener in the front image, and identify whether there is a fastener offset feature in the third contour feature; including: identifying two end corner points corresponding to each of the fasteners in the third contour feature; wherein the fastener is L-shaped, and the end corner points are the right-angled endpoints of the two ends of the L-shaped fastener; connecting the four end corner points end to end to obtain a measurement quadrilateral; coinciding and matching the measurement quadrilateral with a preset standard quadrilateral; wherein the standard quadrilateral is a quadrilateral constructed based on the fastener without offset; if the measurement quadrilateral completely coincides with the standard quadrilateral, it is identified that there is no fastener offset feature; If the fastener offset feature does not exist, the plastic-steel profile is judged to be a qualified product.
2. A method for identifying defects in plastic steel profiles as claimed in claim 1, characterized in that: If the number of the intersection is one, the following steps are also included: Connecting two corresponding intersection points in the second cavities to obtain a second auxiliary line; Obtaining the verticality of the second auxiliary line; If the verticality is qualified, obtaining the measured length of the second auxiliary line; Compare the measured length with a preset length threshold; wherein the length threshold is the length of the second auxiliary line formed when the two second cavities are not offset as a whole; If the measured length is equal to the length threshold, it is identified that the second cavity deformation feature does not exist.
3. A method for identifying defects in plastic steel profiles as claimed in claim 1, characterized in that: The lines of the standard quadrilateral have a line width of a preset width.
4. A method for identifying defects in plastic steel profiles as claimed in claim 1, characterized in that: The method of obtaining the front image of the plastic-steel profile comprises: Obtain the original image of the plastic steel profile; Performing grayscale processing on the original image to obtain a grayscale image; Performing noise reduction processing on the grayscale image; The grayscale image after noise reduction is binarized to obtain a black-and-white front image.
5. A plastic steel profile defect identification device, characterized in that: include: An image acquisition module is used to acquire a front image of a plastic-steel profile; wherein the plastic-steel profile comprises a first profile and a second profile connected to the upper and lower parts of the first profile, two fasteners are connected to the outer walls of the two second profiles, a first cavity is defined in the first profile, a second cavity is defined in the second profile, and the front image is an image showing the first cavity and the second cavity; A first feature recognition module is used to extract the first contour feature corresponding to the first profile in the front image, and identify whether there is a first cavity deformation feature in the first contour feature; including: extracting the first contour figure corresponding to the first cavity in the first contour feature; wherein the first contour figure is a closed figure surrounded by a plurality of broken lines; identifying and marking a plurality of first inflection points in the first contour figure; connecting the marked two first inflection points that are mutually opposite point groups to obtain a plurality of mutually intersecting first reference lines and second reference lines; wherein the opposite point groups are two first inflection points that are left-right symmetrical or top-bottom symmetrical in the first contour figure when the first cavity is not deformed; identifying a plurality of angles formed by a plurality of the first reference lines and a plurality of the second reference lines, and judging whether the plurality of angles all meet the preset verticality requirement; if any of the angles does not meet the verticality requirement, it is identified as the presence of a first cavity deformation feature; A second feature recognition module is used to extract the second contour feature corresponding to the second profile in the front image if the first cavity deformation feature does not exist, and identify whether the second cavity deformation feature exists in the second contour feature; including: extracting the second contour figure corresponding to the second cavity in the second contour feature; wherein the second contour figure is a closed figure surrounded by multiple arcs and broken lines; identifying multiple second inflection points in the second contour figure and marking them; connecting the marked two second inflection points that are mutually symmetrical point groups to obtain at least three first auxiliary lines; wherein the symmetrical point group is two second inflection points that are centrally symmetrical in the second contour figure corresponding to the second cavity when the second cavity is not deformed; identifying the number of intersections of multiple first auxiliary lines; if the number of intersections is multiple, it is recognized that the second cavity deformation feature exists; A third feature recognition module is used to extract the third contour feature corresponding to the fastener in the front image if the second cavity deformation feature does not exist, and identify whether there is a fastener offset feature in the third contour feature; including: identifying two end corner points corresponding to each of the fasteners in the third contour feature; wherein the fastener is L-shaped, and the end corner points are the right-angled endpoints of the two ends of the L-shaped fastener; connecting the four end corner points end to end to obtain a measurement quadrilateral; coinciding and matching the measurement quadrilateral with a preset standard quadrilateral; wherein the standard quadrilateral is a quadrilateral constructed based on the fastener without offset; if the measurement quadrilateral completely coincides with the standard quadrilateral, it is identified that there is no fastener offset feature; The judgment module is used to judge that the plastic-steel profile is a qualified product if the fastener offset feature does not exist.
6. A computer device, characterized in that: The computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Cable fixture defect detection method, device, equipment and medium
CN116500048A