Method, device and equipment for detecting clamp in aircraft wire tube assembly and medium
By using computer vision technology to determine the region and remove graphic interference information of clamps in aircraft wiring harness assembly, the problems of low reliability and efficiency in clamp detection are solved, and efficient and accurate detection of clamp quantity and installation direction is achieved.
Patent Information
- Application Number
- CN202510677672.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-05-26
AI Technical Summary
In existing technologies, the reliability and efficiency of clamp detection in aircraft wiring harness assembly are not high, and it mainly relies on manual inspection, which is prone to omissions and misjudgments.
Computer vision technology is used to determine the region and remove graphic interference information from the target clamp image. The number and installation direction of the clamps are determined through image processing and analysis. The clamp region is filtered using the HSV color space, morphological processing is used to remove interference information, and polygon approximation processing is used to determine the installation direction.
This improves the reliability and efficiency of clamp inspection, reduces interference information, and ensures the accuracy and reliability of inspection results.
Smart Images

Figure CN120235902B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision, in particular to a method and device for detecting a clamp in aircraft wire and tube assembly, equipment and medium. BACKGROUND
[0002] There are a large number of parts used by an aircraft, and a large number of cable harnesses on the aircraft are needed to connect parts such as control computers, sensors and actuators of the aircraft, for example, some passenger aircraft have more than 40,000 types of parts, and the total number of parts reaches 2.5 million, of which there are about 724 cables and 2328 pipes. The correctness and reliability of the laying, fixing and connection of the aircraft wire harness and pipe will affect the normal working state of each part on the aircraft and the overall performance, and the clamp for fixing the cable and pipe also needs to be carefully designed. At present, the installation quality of the wire pipe clamp in the aircraft assembly mainly relies on manual multiple and repeated inspection. Manual inspection is prone to misjudgment, which is difficult to ensure the accuracy of the inspection. That is, in the prior art, there is a problem that the reliability and efficiency of clamp detection are not high. SUMMARY
[0003] Therefore, the purpose of the present application is to provide a method and device for detecting a clamp in aircraft wire and tube assembly, equipment and medium to improve the problem that the reliability and efficiency of clamp detection are not high in the prior art.
[0004] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0005] A method for detecting a clamp in aircraft wire and tube assembly, comprising:
[0006] performing clamp region determination processing on a target clamp image to obtain an initial clamp extraction image, wherein the target clamp image is formed by image acquisition on a region where the clamp is located after the aircraft wire and tube assembly, and the initial clamp extraction image is at least used to reflect image information of the clamp;
[0007] performing clamp pattern determination processing on the initial clamp extraction image to discard other interference information affecting the representation of the clamp pattern, to obtain a target clamp extraction image;
[0008] determining target clamp detection information based on the target clamp extraction image, wherein the target clamp detection information is at least used to reflect one of the number of clamps and the installation direction of the clamps in the target clamp image.
[0009] In the preferred selection of the present application, in the method for detecting a clamp in aircraft wire and tube assembly, the step of determining target clamp detection information based on the target clamp extraction image comprises:
[0010] performing contour detection operation on the target clamp extraction image to obtain each candidate clamp contour in the target clamp extraction image;
[0011] performing confirmation processing on each candidate clamp contour to obtain each target clamp contour, wherein the target clamp contour refers to a contour determined to belong to a clamp;
[0012] determining target clamp detection information based on each target clamp contour.
[0013] In a preferred selection of the present application, in the above method for detecting clamps in aircraft wire tube assembly, the step of performing confirmation processing on each candidate clamp contour to obtain each target clamp contour comprises:
[0014] determining the area of each candidate clamp contour respectively;
[0015] for each candidate clamp contour, comparing the area of the candidate clamp contour with a predetermined area threshold, and when the area is greater than or equal to the area threshold, retaining the candidate clamp contour, or when the area is less than the area threshold, discarding the candidate clamp contour;
[0016] for each retained candidate clamp contour, determining the minimum circumscribed rectangle of the candidate clamp contour, and determining the aspect ratio of the minimum circumscribed rectangle, and comparing the aspect ratio with a predetermined aspect ratio interval, and when the aspect ratio belongs to the aspect ratio interval, determining the candidate clamp contour as a target clamp contour, or when the aspect ratio does not belong to the aspect ratio interval, not determining the candidate clamp contour as a target clamp contour.
[0017] In a preferred selection of the present application, in the above method for detecting clamps in aircraft wire tube assembly, the step of determining target clamp detection information based on each target clamp contour comprises:
[0018] counting the number of each target clamp contour, wherein the number is used as target clamp detection information; and / or
[0019] determining the installation direction of each target clamp contour based on the contour feature information of each target clamp contour respectively, wherein the installation direction is used as target clamp detection information.
[0020] In a preferred selection of the present application, in the above method for detecting clamps in aircraft wire tube assembly, the step of determining the installation direction of each target clamp contour based on the contour feature information of each target clamp contour respectively comprises:
[0021] For each of the target clamp profile, the target clamp profile is polygonal approximation processing, forming the target clamp profile corresponding clamp polygonal profile;
[0022] Based on the distribution characteristics information of each corner point on the clamp polygonal profile, the installation direction of the target clamp profile is determined.
[0023] In the preferred selection of the present application, in the above-mentioned aircraft wire tube assembly clamp detection method, the step of polygonal approximation processing of the target clamp profile to form the corresponding clamp polygonal profile of the target clamp profile, comprising:
[0024] The target clamp profile is determined by the contour, and the target approximation threshold is determined based on the contour;
[0025] For each curve on the target clamp profile, the straight line segment connecting the first and last two end points of the curve is determined, and the point profile point with the maximum distance between the straight line segment is determined on the curve, and when the distance between the profile point and the straight line segment is less than or equal to the target approximation threshold, the straight line segment is taken as the approximate line segment of the curve, or when the distance between the profile point and the straight line segment is greater than the target approximation threshold, the curve is divided into two new curves based on the profile point, and the approximate line segment of each new curve is determined respectively;
[0026] Based on the approximate line segment of each curve on the target clamp profile, the corresponding clamp polygonal profile of the target clamp profile is formed.
[0027] In the preferred selection of the present application, in the above-mentioned aircraft wire tube assembly clamp detection method, the step of determining the installation direction of the target clamp profile based on the distribution characteristics information of each corner point on the clamp polygonal profile, comprising:
[0028] The minimum circumscribed rectangle corresponding to the target clamp profile is determined;
[0029] The minimum circumscribed rectangle is divided into first and second local rectangular frames in the row direction of pixel distribution, and the number of corner points in the first and second local rectangular frames is determined respectively to obtain the first and second numbers, and the absolute difference between the first and second numbers is determined to obtain the first difference value, wherein the corner point refers to the connecting point of the two edges connected together on the clamp polygonal profile;
[0030] the minimum circumscribed rectangle is divided into a third local rectangular frame and a fourth local rectangular frame in the column direction of the pixel distribution, and the number of corner points in the third local rectangular frame and the fourth local rectangular frame is determined respectively to obtain a third number and a fourth number, and the absolute difference between the third number and the fourth number is determined to obtain a second difference value;
[0031] If the first difference value is greater than the second difference value, it is determined that the installation direction of the target clamp profile is the row direction of the pixel distribution, and when the first number is greater than the second number, it is determined that the installation direction of the target clamp profile is a first direction in the row direction of the pixel distribution, and when the first number is not greater than the second number, it is determined that the installation direction of the target clamp profile is a second direction in the row direction of the pixel distribution, wherein the first direction is opposite to the second direction.
[0032] If the first difference value is less than the second difference value, it is determined that the installation direction of the target clamp profile is the column direction of the pixel distribution, and when the third number is greater than the fourth number, it is determined that the installation direction of the target clamp profile is a third direction in the column direction of the pixel distribution, and when the third number is not greater than the fourth number, it is determined that the installation direction of the target clamp profile is a fourth direction in the column direction of the pixel distribution, wherein the third direction is opposite to the fourth direction.
[0033] In the preferred selection of the present application, in the above-mentioned detection method of the clamp in the aircraft wire tube assembly, the step of performing clamp region determination processing on the target clamp image to obtain an initial clamp extraction image comprises:
[0034] The target clamp image belonging to the RGB image is converted into an HSV color space to obtain a converted clamp image corresponding to the target clamp image.
[0035] Based on the range of the color of the clamp in the HSV color space, the converted clamp image is subjected to clamp region determination processing to obtain an initial clamp extraction image, wherein the lower limit of the range of the color of the clamp in the HSV color space is (26, 43, 46), and the upper limit is (34, 255, 255).
[0036] In the preferred selection of the present application, in the above-mentioned detection method of the clamp in the aircraft wire tube assembly, the step of performing clamp region determination processing on the target clamp image to obtain an initial clamp extraction image comprises:
[0037] The initial clamp extraction image is subjected to morphological processing to remove the stainless steel strip for fixing the clamp adhesive tape to obtain a target clamp extraction image.
[0038] In the preferred selection of the present application, in the detection method of the clamp in the aircraft wire tube assembly, the step of performing morphological processing on the initial clamp extraction image to remove the stainless steel strip for fixing the clamp rubber strip to obtain the target clamp extraction image, comprises:
[0039] In the initial clamp extraction image, the binary clamp region separated by the stainless steel strip for fixing the clamp rubber strip is connected through morphological closing operation to form a closed clamp graph to obtain the target clamp extraction image, wherein in the morphological closing operation, the shape of the corresponding structural element core is a rectangle with a size of 17*17.
[0040] The present application also provides a detection device for a clamp in an aircraft wire tube assembly, comprising:
[0041] A clamp region determination module is configured to perform clamp region determination processing on the target clamp image to obtain an initial clamp extraction image, wherein the target clamp image is formed by image acquisition of the region where the clamp is located after the aircraft wire tube assembly, and the initial clamp extraction image is used to reflect at least the image information of the clamp;
[0042] A clamp graph determination module is configured to perform clamp graph determination processing on the initial clamp extraction image to discard other interference information affecting the representation of the clamp graph and obtain a target clamp extraction image;
[0043] A clamp detection information determination module is configured to determine target clamp detection information based on the target clamp extraction image, wherein the target clamp detection information is used to reflect at least one of the number of clamps and the installation direction of the clamps in the target clamp image.
[0044] On the basis of the above, the present application further provides an electronic device, comprising:
[0045] A memory is configured to store a computer program;
[0046] A processor connected to the memory is configured to execute the computer program stored in the memory to implement the detection method of the clamp in the aircraft wire tube assembly.
[0047] On the basis of the above, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program performs the steps of the detection method of the clamp in the aircraft wire tube assembly when running.
[0048] The application provides a detection method, device and equipment for a clamp in aircraft wire tube assembly and a medium. BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to make the above-mentioned purposes, features and advantages of the application more obvious and easy to understand, the following preferred embodiments are specifically described below with reference to the accompanying drawings.
[0050] Figure 1 The structural block diagram of the electronic device provided by the embodiments of the application is shown.
[0051] Figure 2 The flowchart of the detection method for the clamp in aircraft wire tube assembly provided by the embodiments of the application is shown.
[0052] Figure 3 The schematic diagram of the target clamp image provided by the embodiments of the application is shown.
[0053] Figure 4 The schematic diagram of the initial clamp extraction image provided by the embodiments of the application is shown.
[0054] Figure 5 The schematic diagram of the target clamp extraction image provided by the embodiments of the application is shown.
[0055] Figure 6 The schematic diagram of the clamp image with the installation direction marked provided by the embodiments of the application is shown.
[0056] Figure 7 The block schematic diagram of the detection device for the clamp in aircraft wire tube assembly provided by the embodiments of the application is shown. DETAILED DESCRIPTION
[0057] In order to make the purposes, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application but not all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.
[0058] Therefore, the detailed description of the embodiments of the present application provided below in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present application.
[0059] As shown in Figure 1 The embodiments of the present application provide an electronic device. The electronic device can include a memory, a processor, and a clamp detection device in an aircraft wire tube assembly.
[0060] In detail, the memory and the processor are electrically connected to realize data transmission or interaction. For example, the memory and the processor can be electrically connected through one or more communication buses or signal lines. The clamp detection device in the aircraft wire tube assembly includes at least one software function module stored in the memory in the form of software or firmware. The processor is configured to execute the executable computer programs stored in the memory, for example, the software function modules and computer programs included in the clamp detection device in the aircraft wire tube assembly, to realize the clamp detection method in the aircraft wire tube assembly provided by the embodiments of the present application.
[0061] Alternatively, the memory can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM), and the like.
[0062] The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a system on chip (SoC), etc., and can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
[0063] It can be understood that Figure 1 The structure shown is only schematic, and the electronic device can further include more or fewer components than those shown, or have a different configuration of components than those shown, such as further including a communication unit for information interaction with other devices (such as an image acquisition device, etc.). Figure 1 The structure shown is only schematic, and the electronic device can further include more or fewer components than those shown, or have a different configuration of components than those shown, such as further including a communication unit for information interaction with other devices (such as an image acquisition device, etc.). Figure 1
[0064] In combination with Figure 2 The embodiments of the present application also provide a detection method of a clamp in an aircraft wire tube assembly applicable to the electronic device described above. The method steps defined by the flow of the detection method of the clamp in the aircraft wire tube assembly can be implemented by the electronic device.
[0065] The specific flow shown in Figure 2 will be described in detail below.
[0066] Step S110, performing clamp region determination processing on a target clamp image to obtain an initial clamp extraction image.
[0067] In the embodiments of the present application, the electronic device can perform clamp region determination processing on a target clamp image to obtain an initial clamp extraction image. The target clamp image is formed by image acquisition on the region where the clamp is located after the aircraft wire tube assembly, and the initial clamp extraction image is at least used to reflect the image information of the clamp, that is, since there is a lot of background information such as wire harness in the region where the clamp is located, the information of the location where the clamp is located can be determined initially.
[0068] Step S120, performing clamp pattern determination processing on the initial clamp extraction image to discard other interference information affecting the representation of the clamp pattern, to obtain a target clamp extraction image.
[0069] In the embodiment of the present application, after the initial clamp extraction image is determined, the electronic device can perform clamp pattern determination processing on the initial clamp extraction image to discard other interference information affecting the representation of the clamp pattern, and obtain a target clamp extraction image. That is, after the position of the clamp is preliminarily determined, other interference information affecting the representation of the clamp pattern can be discarded on this basis, so that the information of the clamp can be further confirmed.
[0070] In step S130, target clamp detection information is determined based on the target clamp extraction image.
[0071] In the embodiment of the present application, after the target clamp extraction image is obtained, the electronic device can determine target clamp detection information based on the target clamp extraction image. The target clamp detection information is used to reflect at least one of the number of clamps and the installation direction of the clamps in the target clamp image, that is, at least one of the number and the installation direction is reflected, or other information can be reflected based on the two kinds of information. That is, due to the two-stage confirmation of the clamp-related information in steps S110 and S120, the target clamp extraction image formed has relatively high accuracy in representing the clamp, and therefore the reliability of the target clamp detection information determined based on the target clamp extraction image can be higher.
[0072] Based on the above, since the number and installation direction of the clamps can be detected by analyzing the image corresponding to the clamp, compared with the conventional technical solution based on manual detection, the efficiency and reliability of the detection can be improved to a certain extent. In addition, during the clamp pattern determination processing, other interference information affecting the representation of the clamp pattern is discarded, so that the interference information in the target clamp extraction image is reduced, thereby facilitating the effective determination of the target clamp detection information in the subsequent detection and analysis. Therefore, the problem that the reliability and efficiency of the clamp detection in the prior art are not high is improved.
[0073] First, for step S110, it should be noted that the specific way of performing clamp region determination processing on the target clamp image is not limited, and can be selected according to actual needs.
[0074] For example, in an alternative implementation, the neural network model formed by training can be used to identify the target clamp image to determine the region where the clamp is located, thereby obtaining the corresponding initial clamp extraction image.
[0075] For example, in another alternative implementation, in order to reduce the calculation cost, the step S110 can further include steps S111 and S112, the specific contents are as follows.
[0076] In step S111, the target clamping image belonging to the RGB image is converted into the HSV color space to obtain a converted clamping image corresponding to the target clamping image.
[0077] In the embodiments of the present application, the target clamping image belonging to the RGB image can be converted into the HSV color space to obtain a converted clamping image corresponding to the target clamping image. That is, the converted clamping image can be an image in the HSV color space.
[0078] In step S112, based on the range of the color of the clamping in the HSV color space, clamping region determination processing is performed on the converted clamping image to obtain an initial clamping extraction image.
[0079] In the embodiments of the present application, after obtaining the converted clamping image, based on the range of the color of the clamping in the HSV color space, clamping region determination processing can be performed on the converted clamping image to obtain an initial clamping extraction image. That is, since the color of the clamping is generally different from the color of other components such as the wire harness, in the preliminary region determination process, the color can be used for screening. For example, the lower limit of the range of the color of the clamping in the HSV color space is (26, 43, 46), and the upper limit is (34, 255, 255), the three values are H (hue), S (saturation), and V (lightness), and in other implementations, the three values can also be mapped to 0-1 for representation. That is, the pixel points in the converted clamping image whose parameters are between the aforementioned lower limit and upper limit can be determined as the region where the clamping is located. As shown in FIG. 6, it is an image containing three continuous adhesive strip clamps, that is, the target clamping image. Then, through the processing of steps S111 and S112, the initial clamping extraction image shown in FIG. 7 can be obtained. Figure 3 Figure 4
[0080] For the above step S111, it needs to be further explained that before the conversion of the HSV color space, the target clamping image can be first converted into an image with a target size, and then the HSV color space conversion is performed on the image. For example, the size of the target clamping image can be 1797*1187, and the size of the converted image can be 900*600.
[0081] Alternatively, in an alternative implementation, let (r, g, b) represent the coordinate components of red, green and blue respectively, and the value interval is a real number between 0 and 255. Let max be the maximum of r, g and b, and let min be the minimum of r, g and b. To obtain the (h, s, v) value in the HSV space, the calculation formula is:
[0082]
[0083]
[0084]
[0085] In the second aspect, it needs to be explained that the specific manner of the clamp pattern determination processing on the initial clamp extraction image is not limited, and can be selected according to actual needs.
[0086] For example, in an alternative implementation, the initial clamp extraction image can be restored by a trained neural network model to discard other interference information affecting the representation of the clamp pattern, so as to obtain a reliable target clamp extraction image.
[0087] For example, in another alternative implementation, in order to reduce the calculation cost of the clamp pattern determination processing, the step S120 can include the following contents:
[0088] The initial clamp extraction image is subjected to morphological processing to remove the stainless steel strip for fixing the clamp rubber strip, and obtain a target clamp extraction image.
[0089] As shown in Figure 3 The stainless steel strip for fixing the clamp rubber strip can divide the clamp region into two regions, affecting the normal representation of the clamp region. Therefore, in order to improve the reliability of subsequent detection, the interference information corresponding to the stainless steel strip can be discarded or removed, so that the divided clamp region can form a connected region. Specifically, morphological operation can be performed.
[0090] For example, in an alternative implementation, in the initial clamp extraction image, the binary clamp region separated by the stainless steel strip for fixing the clamp rubber strip can be connected by morphological closing operation to form a closed clamp pattern, so as to obtain a target clamp extraction image. In the morphological closing operation, the shape of the corresponding structural element kernel is a rectangle, and the size of the rectangle can be 17*17. Based on this, the target clamp extraction image as shown in Figure 5 can be obtained.
[0091] Thirdly, it should be noted that for step S130 , the specific method of determining the target clamp detection information is not limited and can be selected according to actual needs.
[0092] For example, in an alternative embodiment, the target clamp extraction image may be recognized based on a trained neural network model to obtain target clamp detection information.
[0093] For another example, in another alternative embodiment, in order to reduce the computational cost of determining the target clamp detection information, the above-mentioned step S130 may further include step S131, step S132 and step S133, and the specific content of each step is described as follows.
[0094] Step S131 : performing a contour detection operation on the target clamp extraction image to obtain each candidate clamp contour in the target clamp extraction image.
[0095] In the embodiment of the present application, the contour detection operation can be performed on the target clamp extraction image to obtain each candidate clamp contour in the target clamp extraction image. After the processing of step S120, the following can be obtained: Figure 5 The target clamp extraction image shown can be a binary image. There will be some connected domains in the target clamp extraction image (such as the contours formed by components such as the clamp). Therefore, the target clamp extraction image can be subjected to a contour detection operation (the contour detection technology can refer to the relevant existing technology and is not specifically limited here) to extract each contour in the image. Since each contour may contain the contours of components other than the clamp, it can be used as a candidate, i.e., a candidate clamp contour, and further confirmed.
[0096] Step S132: performing confirmation processing on each candidate clamp profile to obtain each target clamp profile.
[0097] In this embodiment of the present application, after obtaining the candidate clamp profiles, each candidate clamp profile can be verified to obtain a target clamp profile. The target clamp profile refers to the determined profile belonging to the clamp. In other words, step S131 only performs a preliminary extraction of the clamp profile. To ensure detection accuracy, further verification is required to obtain a reliable target clamp profile.
[0098] Step S133: determining target clamp detection information based on each target clamp profile.
[0099] In the embodiments of the present application, after the target clamp profiles are obtained, target clamp detection information can be determined based on each target clamp profile, i.e., the target clamp profile is further analyzed to determine corresponding target clamp detection information, such as counting the number of target clamp profiles, thereby obtaining the number of clamps, etc.
[0100] It can be understood that the specific manner of confirming each candidate clamp profile in the above step S132 is not limited, for example, in an alternative embodiment, in order to improve the reliability of the determined target clamp profile, the above step S132 can further include the following content:
[0101] First, the area of each candidate clamp profile can be determined respectively, wherein the calculation manner of the area can refer to the related prior art, which is not specifically limited here;
[0102] Secondly, for each candidate clamp profile, the area of the candidate clamp profile is compared with a predetermined area threshold, and when the area is greater than or equal to the area threshold, the candidate clamp profile is retained, or when the area is less than the area threshold, the candidate clamp profile is discarded, wherein the area threshold can be 100 (set according to the size of the clamp), that is, generally, the area of the clamp will be greater than 100;
[0103] Then, for each retained candidate clamp profile, the minimum circumscribed rectangle of the candidate clamp profile is determined, and the aspect ratio of the minimum circumscribed rectangle is determined, and the aspect ratio is compared with a predetermined aspect ratio interval, and when the aspect ratio belongs to the aspect ratio interval, the candidate clamp profile is determined as a target clamp profile, or when the aspect ratio does not belong to the aspect ratio interval, the candidate clamp profile is not determined as a target clamp profile; wherein the aspect ratio interval can be 0.5-2, that is, generally, the aspect ratio of the minimum circumscribed rectangle of the clamp belongs to the interval of 0.5-2.
[0104] It can be understood that in the above step S133, the specific manner of determining target clamp detection information based on each target clamp profile is not limited, for example, in an alternative embodiment, in order to effectively determine the target clamp detection information, the above step S133 can further include step S133a and / or step S133b, and the specific content of each step is as follows.
[0105] Step S133a, counting the number of each target clamp profile.
[0106] In the embodiments of the present application, the number of each target clamp contour can be counted. The number is taken as the target clamp detection information. That is, the target clamp detection information can include the number of clamps, as shown in Figure 5 the number is 3.
[0107] In step S133b, the installation direction of each target clamp contour is determined based on the contour feature information of each target clamp contour.
[0108] In the embodiments of the present application, the installation direction of each target clamp contour can be determined based on the contour feature information of each target clamp contour, that is, the installation direction is determined by further analyzing the contour feature information of the target clamp contour. The installation direction is taken as the target clamp detection information. That is, the target clamp detection information can include the installation direction of the clamp.
[0109] It can be understood that in the above step S133b, the specific manner of determining the installation direction of each target clamp contour is not limited, for example, in an alternative embodiment, in order to realize reliable determination of the installation direction, the above step S133b can further include steps b1 and b2, and the specific contents of each step are as follows.
[0110] In step b1, for each target clamp contour, the target clamp contour is subjected to polygon approximation processing to form a clamp polygon contour corresponding to the target clamp contour.
[0111] In the embodiments of the present application, for each target clamp contour, the target clamp contour is subjected to polygon approximation processing to form a clamp polygon contour corresponding to the target clamp contour. That is, since the target clamp contour can include a curve, in order to facilitate subsequent analysis, the curve can be approximated to a straight line segment to form a corresponding polygon, that is, the curve is approximated to a straight line segment to form a corresponding polygon.
[0112] In step b2, the installation direction of the target clamp contour is determined based on the distribution feature information of each corner point on the clamp polygon contour.
[0113] In the embodiments of the present application, after obtaining the clamp polygon contour, the installation direction of the target clamp contour can be determined based on the distribution feature information of each corner point (the connection point of edges) on the clamp polygon contour, that is, the distribution of the corner points is analyzed. It should be noted that the corresponding analysis can be performed for each clamp polygon contour.
[0114] It can be understood that the specific manner of polygon approximation of the target clamp profile in the above step b1 is not limited, for example, in an alternative embodiment, in order to achieve effective approximation of the polygon, the above step b1 can further include the following contents:
[0115] Firstly, the contour length of the target clamp profile can be determined, and the corresponding contour length is obtained, and the target approximation threshold is determined based on the contour length; for example, the product of the contour length and a proportion value can be calculated to obtain the corresponding target approximation threshold, wherein the specific value of the proportion value can be configured according to actual needs, such as 0.02, etc.
[0116] Secondly, for each curve on the target clamp profile, a straight line segment connecting the first and last two end points of the curve is determined (i.e. a straight line segment is constructed to connect the two end points, such as straight line segment AB), and a point contour point (such as point C) having a maximum distance between the straight line segment is determined on the curve, and when the distance between the contour point and the straight line segment is less than or equal to the target approximation threshold, the straight line segment is taken as the approximate line segment of the curve, or when the distance between the contour point and the straight line segment is greater than the target approximation threshold, the curve is divided into two new curves (i.e. curves AC and CB) based on the contour point, and the approximate line segment of each new curve is determined (the determination manner is according to the foregoing manner);
[0117] Then, the approximate line segment of each curve on the target clamp profile can be combined to form the corresponding clamp polygon profile of the target clamp profile; for example, when there is a straight line segment on the target clamp profile in addition to the curve, the straight line segment is also combined to form the edge of the clamp polygon profile.
[0118] It can be understood that in the above step b2, the specific manner of determining the installation direction of the target clamp profile is not limited, for example, in an alternative embodiment, in order to achieve effective determination of the installation direction, the above step b2 can further include the following contents:
[0119] Firstly, the minimum circumscribed rectangle frame corresponding to the target clamp profile is determined;
[0120] Secondly, the minimum circumscribed rectangle can be divided into a first local rectangular frame and a second local rectangular frame in the row direction of pixel distribution (such as the X axis of pixel distribution), and the number of corner points in the first local rectangular frame and the second local rectangular frame can be determined respectively to obtain a first number and a second number, and the absolute difference between the first number and the second number can be determined to obtain a first difference value, wherein the corner point refers to the connecting point of two edges connected together on the clamp polygon contour.
[0121] Then, the minimum circumscribed rectangle can be divided into a third local rectangular frame and a fourth local rectangular frame in the column direction of pixel distribution (such as the Y axis of pixel distribution), and the number of corner points in the third local rectangular frame and the fourth local rectangular frame can be determined respectively to obtain a third number and a fourth number, and the absolute difference between the third number and the fourth number can be determined to obtain a second difference value.
[0122] Further, if the first difference value is greater than the second difference value, it is determined that the installation direction of the target clamp contour is the row direction of pixel distribution, and when the first number is greater than the second number, it is determined that the installation direction of the target clamp contour is a first direction (such as left) in the row direction of pixel distribution, and when the first number is not greater than the second number, it is determined that the installation direction of the target clamp contour is a second direction (such as right) in the row direction of pixel distribution, wherein the first direction and the second direction are opposite.
[0123] Finally, if the first difference value is less than the second difference value, it is determined that the installation direction of the target clamp contour is the column direction of pixel distribution, and when the third number is greater than the fourth number, it is determined that the installation direction of the target clamp contour is a third direction (such as up) in the column direction of pixel distribution, and when the third number is not greater than the fourth number, it is determined that the installation direction of the target clamp contour is a fourth direction (such as down) in the column direction of pixel distribution, wherein the third direction and the fourth direction are opposite, as shown in Figure 6
[0124] In addition, it should be noted that in an alternative embodiment, if the first difference value is equal to the second difference value, detection information that cannot determine the installation direction can be generated.
[0125] In summary, based on the above detection method of the clamp in the aircraft wire pipe assembly, the following can be achieved:
[0126] The collected RGB image is converted to the HSV color space, and objects with a color close to that of the clamp rubber strip are screened out using color features and thresholds. Since the rubber strips on both sides of the clamp are separated by the stainless steel strip used for installation and fixation, the screened clamp is cut off in the middle. Therefore, a morphological closing operation is then performed to form a connected domain in the cut-off clamp area. The contour of the connected domain is then found and converted into a polygon using polygon approximation. Its area and minimum enclosing rectangle are calculated. The clamp is then determined based on the area, the aspect ratio of the minimum enclosing rectangle, and the number of polygon vertices, thereby obtaining the number of clamps.
[0127] According to the midpoint, length and width of the circumscribed rectangle of the clamp outline, it is divided into four areas: upper, lower, left and right. The corner point detection method is used to detect the difference between the corner points of the upper, lower and left and right groups. The direction with the most corner points is checked, that is, the direction of the screw, so as to obtain the installation direction of the clamp.
[0128] Combine Figure 7 The present application also provides a device for detecting clamps in aircraft conduit assembly, applicable to the aforementioned electronic equipment. The device can include a clamp region determination module, a clamp pattern determination module, and a clamp detection information determination module.
[0129] The clamp region determination module is used to perform clamp region determination processing on the target clamp image to obtain an initial clamp extraction image, wherein the target clamp image is formed by capturing an image of the area where the clamp is located after the aircraft wire tube is assembled, and the initial clamp extraction image is used to at least reflect the image information of the clamp. In this embodiment of the application, the clamp region determination module can be used to perform Figure 2 As shown in step S110, for the relevant content of the clamp area determination module, reference can be made to the above description of step S110.
[0130] The clamp pattern determination module is used to perform clamp pattern determination processing on the initial clamp pattern extraction image to discard other interference information that affects the characterization of the clamp pattern and obtain the target clamp pattern extraction image. Figure 2 As shown in step S120, for the relevant content of the clamp pattern determination module, reference can be made to the above description of step S120.
[0131] The clamp detection information determination module is used to determine target clamp detection information based on the target clamp extraction image, wherein the target clamp detection information is used to reflect at least one of the number of clamps in the target clamp image and the installation direction of the clamp. In the embodiment of the present application, the clamp detection information determination module can be used to perform Figure 2The step S130 is shown, and the content of the hoop detection information determination module can be referred to the foregoing description of step S130.
[0132] In the embodiments of the present application, corresponding to the above-mentioned detection method of the hoop in the aircraft wire tube assembly applied to the electronic device, a computer readable storage medium is also provided, and the computer readable storage medium stores a computer program. When the computer program runs, each step of the detection method of the hoop in the aircraft wire tube assembly is executed.
[0133] Wherein, the steps executed by the computer program when running are not repeated here, and can be referred to the foregoing explanation of the detection method of the hoop in the aircraft wire tube assembly.
[0134] In summary, the detection method, device, equipment and medium of the hoop in the aircraft wire tube assembly provided by the present application first perform hoop region determination processing on the target hoop image to obtain an initial hoop extraction image. Secondly, hoop figure determination processing is performed on the initial hoop extraction image to discard other interference information affecting the representation of the hoop figure, and a target hoop extraction image is obtained. Then, based on the target hoop extraction image, the target hoop detection information is determined. Based on the above, since the number and installation direction of the hoop can be detected by analyzing the image corresponding to the hoop, compared with the conventional technical solution based on manual detection, the efficiency and reliability of detection can be improved to a certain extent. In addition, since other interference information affecting the representation of the hoop figure is discarded during the hoop figure determination processing, the interference information in the target hoop extraction image is reduced, so that the target hoop detection information can be effectively determined in the subsequent detection and analysis, and thus the problem that the reliability and efficiency of the hoop detection in the prior art are not high is improved.
[0135] In several embodiments provided by the embodiments of the present application, it should be understood that the disclosed apparatus and method can also be implemented by other manners. The apparatus and method embodiments described above are only illustrative. For example, the flowchart and block diagram in the drawings show the possible implementation architecture, function and operation of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code, which includes one or more executable instructions for implementing the specified logic function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order from that shown in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the function involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for implementing the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0136] In addition, each functional module in the embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0137] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes. It should be noted that in this document, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the processes, methods, articles or devices that include a series of elements not only include those elements, but also include other elements not explicitly listed, or include elements inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of another identical element in the process, method, article or device that includes the element.
[0138] The above descriptions are only the preferred embodiment of the present application, but not for limiting the present application. For those skilled in the art, the present application can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for detecting clamps in aircraft wire tube assembly, characterized in that: include: performing clamp region determination processing on the target clamp image to obtain an initial clamp extraction image, wherein the target clamp image is formed by capturing an image of the area where the clamp is located after the aircraft wire tube is assembled, and the initial clamp extraction image is used to at least reflect image information of the clamp; performing a clamp pattern determination process on the initial clamp extraction image to discard other interference information that affects the representation of the clamp pattern, thereby obtaining a target clamp extraction image; Performing a contour detection operation on the target clamp extraction image to obtain each candidate clamp contour in the target clamp extraction image; performing confirmation processing on each candidate clamp contour to obtain each target clamp contour, wherein the target clamp contour refers to the contour determined to belong to the clamp; for each target clamp contour, performing polygonal approximation processing on the target clamp contour to form a clamp polygon contour corresponding to the target clamp contour; based on the distribution feature information of each corner point on the clamp polygon contour, determining the installation direction of the target clamp contour, wherein the installation direction is used as target clamp detection information.
2. The method for detecting clamps in aircraft wire tube assembly according to claim 1, characterized in that: The step of confirming each candidate clamp profile to obtain each target clamp profile includes: Determining the area of each candidate clamp contour; For each candidate clamp profile, compare the area of the candidate clamp profile with a predetermined area threshold, and retain the candidate clamp profile if the area is greater than or equal to the area threshold, or discard the candidate clamp profile if the area is less than the area threshold; For each retained candidate clamp profile, a minimum circumscribed rectangular box of the candidate clamp profile is determined, and an aspect ratio of the minimum circumscribed rectangular box is determined, and the aspect ratio is compared with a predetermined aspect ratio interval, and when the aspect ratio falls within the aspect ratio interval, the candidate clamp profile is determined as a target clamp profile, or when the aspect ratio does not fall within the aspect ratio interval, the candidate clamp profile is not determined as a target clamp profile.
3. The method for detecting clamps in aircraft wire tube assembly according to claim 1, characterized in that: The step of performing polygonal approximation processing on each target clamp profile to form a clamp polygon profile corresponding to the target clamp profile includes: Determining the perimeter of the target clamp contour to obtain a corresponding contour perimeter, and determining a target approximation threshold based on the contour perimeter; For each curve on the target clamp contour, determine a straight line segment connecting the first and last endpoints of the curve, and determine a contour point on the curve having a maximum distance from the straight line segment, and when the distance between the contour point and the straight line segment is less than or equal to the target approximation threshold, use the straight line segment as an approximate line segment of the curve, or when the distance between the contour point and the straight line segment is greater than the target approximation threshold, segment the curve into two new curves based on the contour point, and determine an approximate line segment for each new curve; Based on the approximate line segments of each curve on the target clamp profile, a clamp polygonal profile corresponding to the target clamp profile is formed by combining.
4. The method for detecting clamps in aircraft wire tube assembly according to claim 1, characterized in that: The step of determining the installation direction of the target clamp profile based on the distribution characteristic information of each corner point on the clamp polygonal profile includes: Determine the minimum circumscribed rectangular frame corresponding to the target clamp contour; Dividing the minimum circumscribed rectangular frame into a first partial rectangular frame and a second partial rectangular frame in a row direction of pixel distribution, and respectively determining the number of corner points in the first partial rectangular frame and the second partial rectangular frame to obtain a first number and a second number, and determining the absolute difference between the first number and the second number to obtain a first difference, wherein the corner point refers to a connection point of two edges connected together on the polygonal outline of the clamp; dividing the minimum circumscribed rectangular frame equally into a third partial rectangular frame and a fourth partial rectangular frame in a column direction of pixel distribution, and respectively determining the number of corner points in the third partial rectangular frame and the fourth partial rectangular frame to obtain a third number and a fourth number, and determining an absolute difference between the third number and the fourth number to obtain a second difference; If the first difference is greater than the second difference, determining that the installation direction of the target clamp profile is the row direction of the pixel distribution, and when the first number is greater than the second number, determining that the installation direction of the target clamp profile is the first direction in the row direction of the pixel distribution, and when the first number is not greater than the second number, determining that the installation direction of the target clamp profile is the second direction in the row direction of the pixel distribution, wherein the first direction is opposite to the second direction; If the first difference is smaller than the second difference, the installation direction of the target clamp profile is determined to be the column direction of the pixel distribution, and when the third number is greater than the fourth number, the installation direction of the target clamp profile is determined to be the third direction in the column direction of the pixel distribution, and when the third number is not greater than the fourth number, the installation direction of the target clamp profile is determined to be the fourth direction in the column direction of the pixel distribution, wherein the third direction is opposite to the fourth direction.
5. The method for detecting clamps in aircraft wire tube assembly according to any one of claims 1 to 4, characterized in that: The step of performing clamp region determination processing on the target clamp image to obtain an initial clamp extraction image includes: Convert the target clamp image belonging to the RGB image into the HSV color space to obtain a converted clamp image corresponding to the target clamp image; Based on the range of the color of the clamp in the HSV color space, the clamp region is determined on the converted clamp image to obtain an initial clamp extraction image, wherein the lower limit of the range of the color of the clamp in the HSV color space is (26, 43, 46) and the upper limit is (34, 255, 255).
6. The method for detecting clamps in aircraft wire tube assembly according to any one of claims 1 to 4, characterized in that: The step of performing a clamp pattern determination process on the initial clamp extraction image to discard other interference information that affects the representation of the clamp pattern and obtain a target clamp extraction image includes: Morphological processing is performed on the initial clamp extraction image to remove the stainless steel strip used to fix the clamp rubber strip, thereby obtaining a target clamp extraction image.
7. The method for detecting clamps in aircraft wire tube assembly according to claim 6, characterized in that: The step of performing morphological processing on the initial clamp extraction image to remove the stainless steel strip used to fix the clamp rubber strip to obtain the target clamp extraction image includes: In the initial clamp extraction image, the binary clamp regions separated by the stainless steel strips used to fix the clamp rubber strips are connected through a morphological closing operation to form a closed clamp graphic, thereby obtaining a target clamp extraction image. In the morphological closing operation, the shape of the corresponding structural element core is a rectangle, and the size of the rectangle is 17*17.
8. A detection device for clamps in aircraft wire tube assembly, characterized in that: include: a clamp region determination module, configured to perform clamp region determination processing on a target clamp image to obtain an initial clamp extraction image, wherein the target clamp image is formed by capturing an image of the region where the clamp is located after the aircraft wire conduit is assembled, and the initial clamp extraction image is configured to at least reflect image information of the clamp; a clamp pattern determination module, configured to perform clamp pattern determination processing on the initial clamp pattern extraction image to discard other interference information that affects the representation of the clamp pattern, thereby obtaining a target clamp pattern extraction image; The clamp detection information determination module is used to perform contour detection operations on the target clamp extraction image to obtain each candidate clamp contour in the target clamp extraction image; perform confirmation processing on each candidate clamp contour to obtain each target clamp contour, wherein the target clamp contour refers to the contour determined to belong to the clamp; for each target clamp contour, perform polygonal approximation processing on the target clamp contour to form a clamp polygon contour corresponding to the target clamp contour; based on the distribution feature information of each corner point on the clamp polygon contour, determine the installation direction of the target clamp contour, wherein the installation direction is used as the target clamp detection information.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor connected to the memory is used to execute the computer program stored in the memory to implement the method for detecting clamps in aircraft wire tube assembly according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed, executes the method for detecting clamps in aircraft wire tube assembly according to any one of claims 1 to 7.
Citation Information
Patent Citations
Building regular contour extraction method and system based on deep learning
CN114549566A
Bolt detection method, device, equipment and medium
CN115511828A