A method, system and device for detecting the tightness of self-tapping screws
By image processing of self-tapping screw processing images, gaps and subject images are extracted, pixel parameters are calculated, and the tightness of self-tapping screws is quantified, the problems of inefficient detection efficiency and relying on manual experience in the prior art are solved, and the problem of inefficient detection in the prior art is improved. Accuracy and efficiency of detection.
Patent Information
- Application Number
- CN202410897591.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-07-05
AI Technical Summary
The prior art is difficult to quickly and accurately detect the tightness of self-tapping screws on metal roofs, especially in large-scale production environments, where traditional detection methods are inefficient and rely on manual experience.
By obtaining the processed image of each self-tapping screw, extracting the gap image and subject image, calculating various pixel parameters, and then quantifying the tightness of each self-tapping screw, achieving an accurate evaluation of the tightness when the self-tapping screw is inserted into the metal roof. .
It reduces the dependence on manual experience of the self-tapping screw tight state detection process, improves detection efficiency and accuracy, and can quickly screen out self-tapping screws to be tested and without the need for testing.
Smart Images

Figure CN118864398B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual detection technology, and in particular to a method, system and device for detecting the tightness state of a self-tapping screw. Background Art
[0002] At present, with the continuous development of industrial automation, self-tapping screws are important components for connecting metal roofing panels. Their tightness is directly related to the sealing, waterproofness and structural safety of the metal roof. Therefore, ensuring the tightness of self-tapping screws is an important part of quality control. Traditional screw tightness detection methods usually rely on manual measurement or visual inspection, which is not only inefficient but also easily affected by manual experience, resulting in inaccurate and unreliable detection results. In addition, for large-scale production of metal roofing projects, traditional detection methods cannot meet the needs of fast and accurate detection. With the development of machine vision and image processing technology, there are many efficient and accurate visual detection technologies used in the actual field of physical detection.
[0003] However, there is currently no method, system, or device for detecting the tightness of self-tapping screws using visual detection to quantitatively evaluate the tightness of self-tapping screws driven into metal roofs and to improve the efficiency of screw tightness detection.
[0004] Therefore, the present invention proposes a method, system and device for detecting the tightness status of a self-tapping screw. Summary of the invention
[0005] The present invention provides a method, system and device for detecting the tightness state of a self-tapping screw, which are used to accurately obtain a gap image and a main body image of each self-tapping screw according to a processed image of each self-tapping screw, accurately obtain a first tightness state detection result of each self-tapping screw according to the gap image and the main body image of each self-tapping screw, and accurately screen and divide all self-tapping screws to be tested and all self-tapping screws that do not need to be tested according to the first tightness state detection results of all self-tapping screws, and obtain the gap pixel width, main body pixel width, gap pixel width of each self-tapping screw to be tested according to the detected gap area and the real main body area of each self-tapping screw to be tested. The standard gap pixel width, standard main body pixel width, standard gap pixel area and standard main body pixel area are obtained according to the detection gap area and the real main body area of all the self-tapping screws that do not need to be tested. The tightness of each self-tapping screw to be tested is accurately obtained based on all the parameters determined in the above steps, that is, the tightness of each self-tapping screw to be tested when it is nailed into the metal roof is quantified, and the second tightness state detection result of each self-tapping screw to be tested is further accurately obtained, which reduces the dependence of the self-tapping screw tightness state detection process on manual experience and improves the efficiency and accuracy of screw tightness detection.
[0006] The present invention provides a method for detecting the tightness state of a self-tapping screw, comprising:
[0007] S1: obtaining a real-time three-dimensional model of the metal roof based on a preset method, obtaining a deformation judgment result of the roof component based on the initial three-dimensional model and the real-time three-dimensional model of the metal roof, and when the deformation judgment result of the roof component is non-deformation, obtaining a real-time image of each self-tapping screw of the metal roof, and performing image processing on the real-time image of each self-tapping screw to obtain a processed image of each self-tapping screw;
[0008] S2: obtaining a gap image and a main body image of each self-tapping screw based on the processed image of each self-tapping screw, and obtaining a first tightness state detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw;
[0009] S3: based on the first tightness state detection results of all self-tapping screws, all self-tapping screws to be tested and all self-tapping screws that do not need to be tested are obtained, based on the detection gap area and the real body area of each self-tapping screw to be tested, the gap pixel width, the body pixel width, the gap pixel area and the body pixel area of each self-tapping screw to be tested are obtained, and based on the detection gap area and the real body area of all self-tapping screws that do not need to be tested, the standard gap pixel width, the standard body pixel width, the standard gap pixel area and the standard body pixel area are obtained;
[0010] S4: Based on the gap pixel width, main body pixel width, gap pixel area, main body pixel area and standard gap pixel width, standard main body pixel width, standard gap pixel area and standard main body pixel area of each self-tapping screw to be tested, the tightness of each self-tapping screw to be tested is obtained, and based on the tightness of each self-tapping screw to be tested, a second tightness state detection result of each self-tapping screw to be tested is obtained.
[0011] Preferably, S1: obtaining a real-time three-dimensional model of the metal roof based on a preset method, obtaining a deformation judgment result of the roof component based on the initial three-dimensional model and the real-time three-dimensional model of the metal roof, when the deformation judgment result of the roof component is deformation, obtaining a real-time image of each self-tapping screw of the metal roof, and performing image processing on the real-time image of each self-tapping screw to obtain a processed image of each self-tapping screw, including:
[0012] A real-time three-dimensional model of the metal roof is obtained based on a preset method, and a deformation judgment result of the roof component is obtained based on the initial three-dimensional model, the real-time three-dimensional model of the metal roof and the preset three-dimensional comparison model, wherein the deformation judgment result of the roof component includes deformation and non-deformation;
[0013] When the deformation judgment result of the roof component is non-deformation, a real-time image of each self-tapping screw of the metal roof is obtained based on a preset device;
[0014] Obtain the three-channel pixel values of all pixels in the real-time image of each self-tapping screw, take the average of the three-channel pixel values of each pixel of each real-time image as the standard pixel value of the corresponding pixel, take the standard pixel value of all pixels of each real-time image as the pixel value of all pixels, and obtain the preprocessed image of each self-tapping screw;
[0015] Determine whether the difference between the pixel value of each pixel point of the preprocessed image of each self-tapping screw and the pixel values of all adjacent pixel points of the corresponding pixel point is greater than a preset threshold value, if so, the corresponding pixel point is regarded as an invalid pixel point, otherwise, the corresponding pixel point is regarded as a pixel point to be tested;
[0016] The pixel value of each invalid pixel point of the pre-processed image of each self-tapping screw is adjusted to the average value of the pixel values of all corresponding adjacent pixels to obtain a processed image of each self-tapping screw.
[0017] Preferably, S2: obtaining a gap image and a main body image of each self-tapping screw based on the processed image of each self-tapping screw, and obtaining a first tightness state detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw, including:
[0018] The area composed of all the pixel points to be tested that are adjacent to each other in the processed image of each self-tapping screw is regarded as the pixel point combination area, and all the pixel point combination areas in the processed image of each self-tapping screw are obtained;
[0019] Determine whether each pixel point combination area in the processed image of each self-tapping screw has a continuous curve segment connected by multiple pixel points with the same pixel value. If so, treat the corresponding pixel point combination area as a suspected pixel point combination area. Otherwise, treat all pixel points in the corresponding pixel point combination area as suspected roof pixel points.
[0020] The pixel values of all the suspected roof pixels corresponding to the largest number of the suspected roof pixels with the same pixel value in the processed image of each self-tapping screw are regarded as the roof pixel values, and the pixel points with the roof pixel values in the processed image of each self-tapping screw are regarded as the roof pixel points, and the image composed of all the roof pixels in the processed image of each self-tapping screw is regarded as the roof image of the corresponding self-tapping screw;
[0021] Determine a final gap image of each self-tapping screw based on all suspected pixel combination areas in the processed image of each self-tapping screw;
[0022] An image composed of all pixel points of the processed image of each self-tapping screw, except for all pixel points included in the roof image and the final gap image, is regarded as a main image of the corresponding self-tapping screw;
[0023] A first tightness state detection result of each self-tapping screw is obtained based on the gap image and the main body image of each self-tapping screw.
[0024] Preferably, determining the final gap image of each self-tapping screw based on all suspected pixel combination areas in the processed image of each self-tapping screw includes:
[0025] The smooth curve segment formed by connecting multiple pixels with the same pixel value and most adjacent to the roof image of the corresponding self-tapping screw in the combined area of all suspected pixels in the processed image of each self-tapping screw is regarded as the gap curve segment, and the average of the pixel values of all pixels in the gap curve segment is regarded as the gap pixel value;
[0026] All pixel points in the processed image that are adjacent to the gap curve segment and whose pixel values are the gap pixel values are aggregated with the gap curve segment to obtain a first gap image, and all pixel points in the processed image that are adjacent to the first gap image and whose pixel values are the gap pixel values are aggregated with the first gap image to obtain a second gap image, and a new gap image is continuously determined based on the second gap image until the processed image does not contain pixel points that are adjacent to the new gap image and whose pixel values are the gap pixel values, then the new gap image is regarded as the final gap image of the corresponding self-tapping screw.
[0027] Preferably, obtaining a first tightness state detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw includes:
[0028] An area composed of all two-by-two adjacent pixel points in the gap image of each self-tapping screw is regarded as a first gap area of each self-tapping screw, and an area composed of all two-by-two adjacent pixel points in the main body image of each self-tapping screw is regarded as a suspected main body area of each self-tapping screw;
[0029] Among all the suspected main body regions, the suspected main body region with the largest number of first gap regions adjacent to the corresponding suspected main body region is regarded as the real main body region, and all the suspected main body regions except the real main body region among all the suspected main body regions of each self-tapping screw are regarded as the second gap regions of each self-tapping screw;
[0030] All first gap regions and second gap regions adjacent to the corresponding real main body region in all gap regions of each self-tapping screw are summarized as the detection gap region of each self-tapping screw, wherein all gap regions of each self-tapping screw include all first gap regions and all second gap regions of each self-tapping screw;
[0031] The geometric center of the real main body area of each self-tapping screw is taken as the origin, and the maximum value of the distance between the origin and all pixel points in the corresponding detection gap area is taken as the radius to obtain the detection circle of each self-tapping screw;
[0032] Determine whether the quotient of the number of pixels contained in the detection gap area of each self-tapping screw and the number of pixels contained in the detection circle range of the corresponding self-tapping screw is greater than a preset value. If so, the first tightness state detection result of the corresponding self-tapping screw is determined to be to be tested; otherwise, the first tightness state detection result of the corresponding self-tapping screw is determined to be unnecessary to be tested.
[0033] Preferably, S3: based on the first tightness state detection results of all self-tapping screws, all self-tapping screws to be tested and all self-tapping screws that do not need to be tested are obtained, based on the detection gap area and the real body area of each self-tapping screw to be tested, the gap pixel width, the body pixel width, the gap pixel area and the body pixel area of each self-tapping screw to be tested are obtained, and based on the detection gap area and the real body area of all self-tapping screws that do not need to be tested, the standard gap pixel width, the standard body pixel width, the standard gap pixel area and the standard body pixel area are obtained, including:
[0034] All the self-tapping screws whose first tightness detection result indicates that they do not need to be tested are regarded as self-tapping screws that do not need to be tested, and all the self-tapping screws whose first tightness detection result indicates that they are to be tested are regarded as self-tapping screws to be tested;
[0035] Obtain the number of horizontal pixels in each row in the detection gap area of each self-tapping screw to be tested, and take the maximum value of all single-row pixel numbers in the detection gap area of each self-tapping screw to be tested as the gap pixel width of each self-tapping screw to be tested;
[0036] Obtain the number of horizontal pixels in each row in the real main body area of each self-tapping screw to be tested, and take the average of all the numbers of pixels in a single row in the real main body area of each self-tapping screw to be tested as the main body pixel width of each self-tapping screw to be tested;
[0037] The number of pixels contained in the detection gap area of each self-tapping screw to be tested is regarded as the gap pixel area of each self-tapping screw to be tested, and the number of pixels contained in the real main body area of each self-tapping screw to be tested is regarded as the main body pixel area of each self-tapping screw to be tested;
[0038] The average number of all horizontal pixel points in all detection gap areas that do not need to be tested self-tapping screws is used as the standard gap pixel width, and the average number of all horizontal pixel points in all real body areas that do not need to be tested self-tapping screws is used as the standard body pixel width;
[0039] The average number of pixels contained in all the detection gap areas that do not need the self-tapping screws to be tested is taken as the standard gap pixel area, and the average number of pixels contained in all the real body areas that do not need the self-tapping screws to be tested is taken as the standard body pixel area.
[0040] Preferably, based on the gap pixel width, body pixel width, gap pixel area, body pixel area, standard gap pixel width, standard body pixel width, standard gap pixel area, and standard body pixel area of each self-tapping screw to be tested, the tightness of each self-tapping screw to be tested is obtained, including:
[0041]
[0042] Among them, δ is the tightness of the self-tapping screw to be tested currently calculated, r is the gap pixel width of the self-tapping screw to be tested currently calculated, R is the main body pixel width of the self-tapping screw to be tested currently calculated, q is the gap pixel area of the self-tapping screw to be tested currently calculated, Q is the main body pixel area of the self-tapping screw to be tested currently calculated, u is the standard gap pixel width, U is the standard main body pixel width, k is the standard gap pixel area, K is the standard main body pixel area, ln is the natural logarithm, and the value of the natural constant e is 2.718.
[0043] Preferably, obtaining a second tightness state detection result of each self-tapping screw to be tested based on the tightness of each self-tapping screw to be tested includes:
[0044] Determine whether the tightness of each self-tapping screw to be tested is greater than a preset tightness threshold. If so, the second tightness state detection result of the corresponding self-tapping screw to be tested is judged as unqualified; otherwise, the second tightness state detection result of the corresponding self-tapping screw is judged as qualified.
[0045] The present invention provides a self-tapping screw tightness detection system, which is used to execute any one of the self-tapping screw tightness detection methods in embodiments 1 to 8, including:
[0046] A processing module is used to obtain a real-time three-dimensional model of the metal roof based on a preset method, obtain a deformation judgment result of the roof component based on the initial three-dimensional model and the real-time three-dimensional model of the metal roof, and when the deformation judgment result of the roof component is non-deformation, obtain a real-time image of each self-tapping screw of the metal roof, and perform image processing on the real-time image of each self-tapping screw to obtain a processed image of each self-tapping screw;
[0047] A first tightness detection module, used to obtain a gap image and a main body image of each self-tapping screw based on the processed image of each self-tapping screw, and obtain a first tightness detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw;
[0048] A parameter acquisition module, for obtaining all self-tapping screws to be tested and all self-tapping screws that do not need to be tested based on the first tightness state detection results of all self-tapping screws, obtaining the gap pixel width, body pixel width, gap pixel area and body pixel area of each self-tapping screw to be tested based on the detection gap area and the real body area of each self-tapping screw to be tested, and obtaining the standard gap pixel width, standard body pixel width, standard gap pixel area and standard body pixel area based on the detection gap area and the real body area of all qualified self-tapping screws;
[0049] The second tightness detection module is used to obtain the tightness of each self-tapping screw to be tested based on the gap pixel width and gap pixel area of each self-tapping screw to be tested and the standard gap pixel width and standard gap pixel area, and obtain the second tightness detection result of each self-tapping screw to be tested based on the tightness of each self-tapping screw to be tested.
[0050] The present invention provides a device for detecting the tightness status of self-tapping screws, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any one of Examples 1 to 8 when executing the computer program.
[0051] The beneficial effects of the present invention compared with the prior art are as follows: accurately obtaining the gap image and the main body image of each self-tapping screw according to the processed image of each self-tapping screw, accurately obtaining the first tightness state detection result of each self-tapping screw according to the gap image and the main body image of each self-tapping screw, and accurately screening and dividing all the self-tapping screws to be tested and all the self-tapping screws that do not need to be tested according to the first tightness state detection results of all self-tapping screws, and obtaining the gap pixel width, the main body pixel width, the gap pixel area and the main body area of each self-tapping screw to be tested according to the detected gap area and the real main body area of each self-tapping screw to be tested. The pixel area of the whole body is obtained, and the standard gap pixel width, standard main body pixel width, standard gap pixel area and standard main body pixel area are obtained according to all the detection gap areas and the real main body areas that do not need to be tested self-tapping screws. The tightness of each self-tapping screw to be tested is accurately obtained based on all the parameters determined in the above steps, that is, the tightness of each self-tapping screw to be tested when it is nailed into the metal roof is quantified, and the second tightness state detection result of each self-tapping screw to be tested is further accurately obtained, which reduces the dependence of the self-tapping screw tightness state detection process on manual experience and improves the efficiency and accuracy of screw tightness detection.
[0052] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structure specifically pointed out in the written application document.
[0053] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0055] Figure 1 This is a flow chart of a method for detecting the tightness state of a self-tapping screw in an embodiment of the present invention;
[0056] Figure 2 The figure is a schematic diagram of a system for detecting the tightness of a self-tapping screw in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0058] Embodiment 1:
[0059] The present invention provides a method for detecting the tightness of a self-tapping screw. Figure 1 ,include:
[0060] S1: obtaining a real-time three-dimensional model of the metal roof based on a preset method, obtaining a deformation judgment result of the roof component based on the initial three-dimensional model and the real-time three-dimensional model of the metal roof, and when the deformation judgment result of the roof component is non-deformation, obtaining a real-time image of each self-tapping screw of the metal roof, and performing image processing on the real-time image of each self-tapping screw to obtain a processed image of each self-tapping screw;
[0061] S2: obtaining a gap image and a main body image of each self-tapping screw based on the processed image of each self-tapping screw, and obtaining a first tightness state detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw;
[0062] S3: based on the first tightness state detection results of all self-tapping screws, all self-tapping screws to be tested and all self-tapping screws that do not need to be tested are obtained, based on the detection gap area and the real body area of each self-tapping screw to be tested, the gap pixel width, the body pixel width, the gap pixel area and the body pixel area of each self-tapping screw to be tested are obtained, and based on the detection gap area and the real body area of all self-tapping screws that do not need to be tested, the standard gap pixel width, the standard body pixel width, the standard gap pixel area and the standard body pixel area are obtained;
[0063] S4: Based on the gap pixel width, main body pixel width, gap pixel area, main body pixel area and standard gap pixel width, standard main body pixel width, standard gap pixel area and standard main body pixel area of each self-tapping screw to be tested, the tightness of each self-tapping screw to be tested is obtained, and based on the tightness of each self-tapping screw to be tested, a second tightness state detection result of each self-tapping screw to be tested is obtained.
[0064] In this embodiment, the metal roof is a general term for various metal roof forms made of metal plates (such as aluminum plates, titanium zinc plates, etc.) and aluminum alloy profiles as structural materials, through cold bending or welding. In this embodiment, self-tapping screws are nailed on the metal roof for connecting the metal roof plates.
[0065] In this embodiment, the preset method is an existing three-dimensional model reconstruction technology, such as multi-view geometry MVG.
[0066] In this embodiment, the real-time three-dimensional model is a three-dimensional model reflecting the structure of the connection between the self-tapping screws and the roof metal plate (metal roof).
[0067] In this embodiment, the initial three-dimensional model is a three-dimensional model of the structure of the connection between the self-tapping screws and the roof metal plate (metal roof) after the standard installation is initially performed.
[0068] In this embodiment, the roof component deformation judgment result includes two results: deformation and non-deformation.
[0069] In this embodiment, the real-time image of the self-tapping screws is an oblique side image of each self-tapping screw on the metal roof captured by a preset device at a preset viewing angle (for example, the shooting viewing angle forms an arbitrary acute angle with the plane where the metal roof is located), and the real-time image of each self-tapping screw is consistent in size.
[0070] In this embodiment, the image processing is a process of obtaining a processed image of each self-tapping screw based on a real-time image of each self-tapping screw.
[0071] In this embodiment, the processed image is an image reflecting the actual pixel situation of each self-tapping screw obtained by performing image processing on the real-time image of each self-tapping screw.
[0072] In this embodiment, the gap image is an image obtained based on the processed image of each self-tapping screw, reflecting the appearance characteristics of the gap generated after each self-tapping screw is nailed into the metal roof.
[0073] In this embodiment, the main body image is an image obtained based on the processed image of each self-tapping screw, reflecting the appearance characteristics of the main body of each self-tapping screw that is partially exposed after being driven into the metal roof.
[0074] In this embodiment, the first tightness detection result is a result obtained based on the gap image and the main body image of each self-tapping screw, indicating whether the tightness of each self-tapping screw needs further testing, wherein the first tightness detection result includes no need to be tested (the tightness of the self-tapping screw does not need further testing, and no need for further testing indicates that the tightness of the self-tapping screw to be tested is qualified and can play the connecting and tightening role of the self-tapping screw to be tested) and to be tested (the tightness of the self-tapping screw needs further testing).
[0075] In this embodiment, the self-tapping screw to be tested is a self-tapping screw whose first tightness state detection result is to be tested.
[0076] In this embodiment, the self-tapping screw that does not need to be tested is a self-tapping screw for which the first tightness state detection result indicates that it does not need to be tested.
[0077] In this embodiment, the detection gap area is a combined area of all first gap areas and second gap areas adjacent to the corresponding real body area in all gap areas of each self-tapping screw to be tested.
[0078] In this embodiment, the real main body area is the suspected main body area with the largest number of adjacent to the first gap area among all the suspected main body areas of each self-tapping screw (if there are adjacent pixels between the suspected main body area and the first gap area, it is determined that the suspected main body area is adjacent to the first gap area).
[0079] In this embodiment, the tightness of the self-tapping screw to be tested is a numerical value obtained based on the gap pixel width, main body pixel width, gap pixel area, main body pixel area and standard gap pixel width, standard main body pixel width, standard gap pixel area and standard main body pixel area of each self-tapping screw to be tested, which can reflect the tightness of each self-tapping screw to be tested when it is nailed into the metal roof.
[0080] In this embodiment, the second tightness detection result is a secondary detection result of the tightness of each self-tapping screw obtained based on the tightness of each self-tapping screw to be tested, wherein the second tightness detection result includes qualified and unqualified.
[0081] The beneficial effects of the above technology are: accurately obtaining the gap image and main body image of each self-tapping screw according to the processed image of each self-tapping screw, accurately obtaining the first tightness state detection result of each self-tapping screw according to the gap image and main body image of each self-tapping screw, and accurately screening and dividing all self-tapping screws to be tested and all self-tapping screws that do not need to be tested according to the first tightness state detection results of all self-tapping screws, and obtaining the gap pixel width, main body pixel width, gap pixel area and main body pixel area of each self-tapping screw to be tested according to the detected gap area and real main body area of each self-tapping screw to be tested. The standard gap pixel width, standard main body pixel width, standard gap pixel area and standard main body pixel area are obtained according to all the detection gap areas and real main body areas that do not need to be tested self-tapping screws. The tightness of each self-tapping screw to be tested is accurately obtained based on all the parameters determined in the above steps, that is, the tightness of each self-tapping screw to be tested when it is nailed into the metal roof is quantified, and the second tightness state detection result of each self-tapping screw to be tested is further accurately obtained, which reduces the dependence of the self-tapping screw tightness state detection process on manual experience and improves the efficiency and accuracy of screw tightness detection.
[0082] Embodiment 2:
[0083] On the basis of Example 1, S1: obtaining a real-time three-dimensional model of the metal roof based on a preset method, obtaining a roof component deformation judgment result based on the initial three-dimensional model and the real-time three-dimensional model of the metal roof, when the roof component deformation judgment result is deformation, obtaining a real-time image of each self-tapping screw of the metal roof, and performing image processing on the real-time image of each self-tapping screw to obtain a processed image of each self-tapping screw, including:
[0084] A real-time three-dimensional model of the metal roof is obtained based on a preset method, and a deformation judgment result of the roof component is obtained based on the initial three-dimensional model, the real-time three-dimensional model of the metal roof and the preset three-dimensional comparison model, wherein the deformation judgment result of the roof component includes deformation and non-deformation;
[0085] When the deformation judgment result of the roof component is non-deformation, a real-time image of each self-tapping screw of the metal roof is obtained based on a preset device;
[0086] Obtain the three-channel pixel values of all pixels in the real-time image of each self-tapping screw, take the average of the three-channel pixel values of each pixel of each real-time image as the standard pixel value of the corresponding pixel, take the standard pixel value of all pixels of each real-time image as the pixel value of all pixels, and obtain the preprocessed image of each self-tapping screw;
[0087] Determine whether the difference between the pixel value of each pixel point of the preprocessed image of each self-tapping screw and the pixel values of all adjacent pixel points of the corresponding pixel point is greater than a preset threshold value, if so, the corresponding pixel point is regarded as an invalid pixel point, otherwise, the corresponding pixel point is regarded as a pixel point to be tested;
[0088] The pixel value of each invalid pixel point of the pre-processed image of each self-tapping screw is adjusted to the average value of the pixel values of all corresponding adjacent pixels to obtain a processed image of each self-tapping screw.
[0089] In this embodiment, the preset three-dimensional comparison model is a pre-set model composed of a large number of initial three-dimensional models and the real-time three-dimensional model of the corresponding metal roof as the neural network training input, and the manually marked deformation or non-deformation result is obtained as the neural network training output. The initial three-dimensional model and the real-time three-dimensional model of the metal roof can be input to output the model to determine whether the roof component deformation is deformed or non-deformed.
[0090] In this embodiment, the preset device is a pre-set device for acquiring a real-time image of the self-tapping screw, such as a high-definition camera.
[0091] In this embodiment, the three-channel pixel values are the values of the three channels of R, G, and B of each pixel.
[0092] In this embodiment, the preset threshold is a preset pixel value threshold for determining whether a pixel point is an invalid pixel point.
[0093] In this embodiment, the invalid pixel points are invalid pixel points in the pre-processed image of each self-tapping screw, such as noise points, edge abnormal points, etc.
[0094] In this embodiment, the pixels to be tested are the remaining pixels except invalid pixels among all the pixels in the preprocessed image of each self-tapping screw.
[0095] The beneficial effects of the above technology are: according to the real-time image of each self-tapping screw of the metal roof, a processed image of each self-tapping screw is obtained, and the noise and interference in the image are effectively reduced by taking the mean of the three-channel pixel values of each pixel point of each real-time image as the standard pixel value. By judging whether the difference between the pixel value of each pixel point and the pixel value of its adjacent pixel point is greater than a preset threshold, the pixel value of the invalid pixel point is accurately adjusted, thereby improving the overall quality of the image and facilitating the acquisition of subsequent gap images and main images.
[0096] Embodiment 3:
[0097] On the basis of Example 1, S2: obtaining a gap image and a main body image of each self-tapping screw based on the processed image of each self-tapping screw, and obtaining a first tightness state detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw, including:
[0098] The area composed of all the pixel points to be tested that are adjacent to each other in the processed image of each self-tapping screw is regarded as the pixel point combination area, and all the pixel point combination areas in the processed image of each self-tapping screw are obtained;
[0099] Determine whether each pixel point combination area in the processed image of each self-tapping screw has a continuous curve segment connected by multiple pixel points with the same pixel value. If so, treat the corresponding pixel point combination area as a suspected pixel point combination area. Otherwise, treat all pixel points in the corresponding pixel point combination area as suspected roof pixel points.
[0100] The pixel values of all the suspected roof pixels corresponding to the largest number of the suspected roof pixels with the same pixel value in the processed image of each self-tapping screw are regarded as the roof pixel values, and the pixel points with the roof pixel values in the processed image of each self-tapping screw are regarded as the roof pixel points, and the image composed of all the roof pixels in the processed image of each self-tapping screw is regarded as the roof image of the corresponding self-tapping screw;
[0101] Determine a final gap image of each self-tapping screw based on all suspected pixel combination areas in the processed image of each self-tapping screw;
[0102] An image composed of all pixel points of the processed image of each self-tapping screw, except for all pixel points included in the roof image and the final gap image, is regarded as a main image of the corresponding self-tapping screw;
[0103] A first tightness state detection result of each self-tapping screw is obtained based on the gap image and the main body image of each self-tapping screw.
[0104] In this embodiment, the continuous curve segment is a curve segment without breakpoints formed by smoothly connecting multiple pixel points with the same pixel value.
[0105] The beneficial effects of the above technology are as follows: by analyzing the pixel point combination area in the processed image of each self-tapping screw, a continuous curve segment connected by multiple pixel points with the same pixel value, that is, a suspected pixel point combination area, is accurately identified; by counting the number of suspected roof pixel points with the same pixel value, the roof pixel value is accurately determined, thereby accurately extracting the roof image; based on the suspected pixel point combination area, the gap image is accurately determined, further improving the accuracy of tightness detection; based on the gap image and main body image of each self-tapping screw, the first tightness detection result of each self-tapping screw is accurately obtained.
[0106] Embodiment 4:
[0107] On the basis of Example 3, based on all suspected pixel combination areas in the processed image of each self-tapping screw, a final gap image of each self-tapping screw is determined, including:
[0108] The smooth curve segment formed by connecting multiple pixels with the same pixel value, which is the most adjacent to the roof image of the corresponding self-tapping screw (i.e., the number of pixels directly adjacent to the roof image of the corresponding self-tapping screw is the largest) in the combined area of all suspected pixels in the processed image of each self-tapping screw, is regarded as the gap curve segment, and the average of the pixel values of all pixels in the gap curve segment is regarded as the gap pixel value;
[0109] All pixel points in the processed image that are adjacent to the gap curve segment and whose pixel values are the gap pixel values are aggregated with the gap curve segment to obtain a first gap image, and all pixel points in the processed image that are adjacent to the first gap image and whose pixel values are the gap pixel values are aggregated with the first gap image to obtain a second gap image, and a new gap image is continuously determined based on the second gap image until the processed image does not contain pixel points that are adjacent to the new gap image and whose pixel values are the gap pixel values, then the new gap image is regarded as the final gap image of the corresponding self-tapping screw.
[0110] The beneficial effects of the above technology are: obtaining gap curve segments and gap pixel values based on all suspected pixel point combination areas in the processed image of each self-tapping screw, obtaining a first gap image based on the gap curve segments and gap pixel values, obtaining a second gap image based on the first gap image, and obtaining the final gap image of the self-tapping screw based on the second gap image. This embodiment provides a specific method for determining the final gap image of each self-tapping screw based on all suspected pixel point combination areas in the processed image of each self-tapping screw.
[0111] Embodiment 5:
[0112] On the basis of Example 4, a first tightness state detection result of each self-tapping screw is obtained based on the gap image and the main body image of each self-tapping screw, including:
[0113] An area composed of all two-by-two adjacent pixel points in the gap image of each self-tapping screw is regarded as a first gap area of each self-tapping screw, and an area composed of all two-by-two adjacent pixel points in the main body image of each self-tapping screw is regarded as a suspected main body area of each self-tapping screw;
[0114] Among all the suspected main body regions, the suspected main body region with the largest number of first gap regions adjacent to the corresponding suspected main body region is regarded as the real main body region, and all the suspected main body regions except the real main body region among all the suspected main body regions of each self-tapping screw are regarded as the second gap regions of each self-tapping screw;
[0115] All first gap regions and second gap regions adjacent to the corresponding real main body region in all gap regions of each self-tapping screw are summarized as the detection gap region of each self-tapping screw, wherein all gap regions of each self-tapping screw include all first gap regions and all second gap regions of each self-tapping screw;
[0116] The geometric center of the real main body area of each self-tapping screw is taken as the origin, and the maximum value of the distance between the origin and all pixel points in the corresponding detection gap area is taken as the radius to obtain the detection circle of each self-tapping screw;
[0117] Determine whether the quotient of the number of pixels contained in the detection gap area of each self-tapping screw and the number of pixels contained in the detection circle range of the corresponding self-tapping screw is greater than a preset value. If so, the first tightness state detection result of the corresponding self-tapping screw is determined to be to be tested; otherwise, the first tightness state detection result of the corresponding self-tapping screw is determined to be unnecessary to be tested.
[0118] In this embodiment, the detection circle is a circular area with the geometric center of the real main body area of the self-tapping screw as the origin and the maximum value of the distance between the origin and all pixel points in the corresponding detection gap area as the radius.
[0119] In this embodiment, the preset value is a threshold value pre-set to obtain the first tightness state detection result of the self-tapping screw, which is the quotient of the number of pixels contained in the detection gap area of the self-tapping screw and the number of pixels contained in the detection circle range of the corresponding self-tapping screw.
[0120] The beneficial effects of the above technology are: the first gap area and the second gap area of each self-tapping screw are obtained according to the gap image and the main image of each self-tapping screw, the detection gap area of each self-tapping screw is obtained according to the first gap area and the second gap area of each self-tapping screw, and the gap area when the screw is nailed into the metal roof is obtained more comprehensively and accurately, and the first tightness state detection result of each self-tapping screw is accurately obtained according to the detection gap area of each self-tapping screw and the detection circle of each self-tapping screw, which is convenient for accurately screening out the self-tapping screws to be tested.
[0121] Embodiment 6:
[0122] On the basis of Example 1, S3: based on the first tightness state detection results of all self-tapping screws, all self-tapping screws to be tested and all self-tapping screws that do not need to be tested are obtained, based on the detection gap area and the real body area of each self-tapping screw to be tested, the gap pixel width, the body pixel width, the gap pixel area and the body pixel area of each self-tapping screw to be tested are obtained, and based on the detection gap area and the real body area of all self-tapping screws that do not need to be tested, the standard gap pixel width, the standard body pixel width, the standard gap pixel area and the standard body pixel area are obtained, including:
[0123] All the self-tapping screws whose first tightness detection result indicates that they do not need to be tested are regarded as self-tapping screws that do not need to be tested, and all the self-tapping screws whose first tightness detection result indicates that they are to be tested are regarded as self-tapping screws to be tested;
[0124] Obtain the number of horizontal pixels in each row in the detection gap area of each self-tapping screw to be tested, and take the maximum value of all single-row pixel numbers in the detection gap area of each self-tapping screw to be tested as the gap pixel width of each self-tapping screw to be tested;
[0125] Obtain the number of horizontal pixels in each row in the real main body area of each self-tapping screw to be tested, and take the average of all the numbers of pixels in a single row in the real main body area of each self-tapping screw to be tested as the main body pixel width of each self-tapping screw to be tested;
[0126] The number of pixels contained in the detection gap area of each self-tapping screw to be tested is regarded as the gap pixel area of each self-tapping screw to be tested, and the number of pixels contained in the real main body area of each self-tapping screw to be tested is regarded as the main body pixel area of each self-tapping screw to be tested;
[0127] The average number of all horizontal pixel points in all detection gap areas that do not need to be tested self-tapping screws is used as the standard gap pixel width, and the average number of all horizontal pixel points in all real body areas that do not need to be tested self-tapping screws is used as the standard body pixel width;
[0128] The average number of pixels contained in all the detection gap areas that do not need the self-tapping screws to be tested is taken as the standard gap pixel area, and the average number of pixels contained in all the real body areas that do not need the self-tapping screws to be tested is taken as the standard body pixel area.
[0129] In this embodiment, the number of pixel points in a single row is the number of all pixel points in the same row in the detection gap area of each self-tapping screw to be tested.
[0130] The beneficial effects of the above technology are: according to the first tightness state detection results of all self-tapping screws, all self-tapping screws to be tested and all self-tapping screws that do not need to be tested are accurately obtained, and the self-tapping screws that need further tightness state detection are screened out, and the gap pixel width, main body pixel width, gap pixel area and main body pixel area of each self-tapping screw to be tested are obtained according to the detection gap area and the real main body area of each self-tapping screw to be tested, and the standard gap pixel width, standard main body pixel width, standard gap pixel area and standard main body pixel area are obtained according to the detection gap area and the real main body area of all self-tapping screws that do not need to be tested, so as to facilitate the subsequent calculation of the tightness of the self-tapping screws to be tested.
[0131] Embodiment 7:
[0132] On the basis of Example 1, based on the gap pixel width, body pixel width, gap pixel area, body pixel area and standard gap pixel width, standard body pixel width, standard gap pixel area and standard body pixel area of each self-tapping screw to be tested, the tightness of each self-tapping screw to be tested is obtained, including:
[0133]
[0134] Among them, 6 is the tightness of the self-tapping screw to be tested currently calculated, r is the gap pixel width of the self-tapping screw to be tested currently calculated, R is the main body pixel width of the self-tapping screw to be tested currently calculated, q is the gap pixel area of the self-tapping screw to be tested currently calculated, Q is the main body pixel area of the self-tapping screw to be tested currently calculated, u is the standard gap pixel width, U is the standard main body pixel width, k is the standard gap pixel area, K is the standard main body pixel area, ln is the natural logarithm, and the value of the natural constant e is 2.718.
[0135] The beneficial effects of the above technology are: according to the gap pixel width, main body pixel width, gap pixel area, main body pixel area and standard gap pixel width, standard main body pixel width, standard gap pixel area and standard main body pixel area of each self-tapping screw to be tested, the tightness of each self-tapping screw to be tested is obtained, and the tightness of each self-tapping screw to be tested when it is nailed into the metal roof is quantified, which is convenient for obtaining the subsequent second tightness state detection result. This embodiment provides a specific method for quantifying the tightness of each self-tapping screw to be tested when it is nailed into the metal roof.
[0136] Embodiment 8:
[0137] On the basis of Example 1, obtaining a second tightness state detection result of each self-tapping screw to be tested based on the tightness of each self-tapping screw to be tested includes:
[0138] Determine whether the tightness of each self-tapping screw to be tested is greater than a preset tightness threshold. If so, the second tightness state detection result of the corresponding self-tapping screw to be tested is judged as unqualified; otherwise, the second tightness state detection result of the corresponding self-tapping screw is judged as qualified.
[0139] In this embodiment, the preset tightness threshold is a tightness threshold that is preset to obtain a second tightness state detection result of the self-tapping screw to be tested.
[0140] In this embodiment, failure means that the tightness of the self-tapping screw to be tested is unqualified, and it is difficult for the self-tapping screw to be tested to play a connecting and tightening role.
[0141] In this embodiment, qualified means that the tightness state of the self-tapping screw to be tested is qualified, and the connection and tightening function of the self-tapping screw to be tested can be exerted.
[0142] The beneficial effect of the above technology is: according to the tightness of each self-tapping screw to be tested and the preset tightness threshold, the second tightness state detection result of each self-tapping screw to be tested is accurately obtained, thereby improving the efficiency of screw tightness detection.
[0143] Embodiment 9:
[0144] The present invention provides a self-tapping screw tightness detection system for executing any one of the self-tapping screw tightness detection methods in embodiments 1 to 8, referring to Figure 2 ,include:
[0145] A processing module is used to obtain a real-time three-dimensional model of the metal roof based on a preset method, obtain a deformation judgment result of the roof component based on the initial three-dimensional model and the real-time three-dimensional model of the metal roof, and when the deformation judgment result of the roof component is non-deformation, obtain a real-time image of each self-tapping screw of the metal roof, and perform image processing on the real-time image of each self-tapping screw to obtain a processed image of each self-tapping screw;
[0146] A first tightness detection module, used to obtain a gap image and a main body image of each self-tapping screw based on the processed image of each self-tapping screw, and obtain a first tightness detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw;
[0147] A parameter acquisition module, for obtaining all self-tapping screws to be tested and all qualified self-tapping screws based on the first tightness state detection results of all self-tapping screws, obtaining the gap pixel width, body pixel width, gap pixel area and body pixel area of each self-tapping screw to be tested based on the detection gap area and the real body area of each self-tapping screw to be tested, and obtaining the standard gap pixel width, standard body pixel width, standard gap pixel area and standard body pixel area based on the detection gap area and the real body area of all qualified self-tapping screws;
[0148] The second tightness detection module is used to obtain the tightness of each self-tapping screw to be tested based on the gap pixel width and gap pixel area of each self-tapping screw to be tested and the standard gap pixel width and standard gap pixel area, and obtain the second tightness detection result of each self-tapping screw to be tested based on the tightness of each self-tapping screw to be tested.
[0149] The beneficial effects of the above technology are: accurately obtaining the gap image and main body image of each self-tapping screw according to the processed image of each self-tapping screw, accurately obtaining the first tightness state detection result of each self-tapping screw according to the gap image and main body image of each self-tapping screw, and accurately screening and dividing all self-tapping screws to be tested and all self-tapping screws that do not need to be tested according to the first tightness state detection results of all self-tapping screws, and obtaining the gap pixel width, main body pixel width, gap pixel area and main body pixel area of each self-tapping screw to be tested according to the detected gap area and real main body area of each self-tapping screw to be tested. The standard gap pixel width, standard main body pixel width, standard gap pixel area and standard main body pixel area are obtained according to all the detection gap areas and real main body areas that do not need to be tested self-tapping screws. The tightness of each self-tapping screw to be tested is accurately obtained based on all the parameters determined in the above steps, that is, the tightness of each self-tapping screw to be tested when it is nailed into the metal roof is quantified, and the second tightness state detection result of each self-tapping screw to be tested is further accurately obtained, which reduces the dependence of the self-tapping screw tightness state detection process on manual experience and improves the efficiency and accuracy of screw tightness detection.
[0150] Embodiment 10:
[0151] The present invention provides a device for detecting the tightness status of self-tapping screws, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any one of Examples 1 to 8 when executing the computer program.
[0152] The beneficial effect of the above technology is: providing a self-tapping screw tightness state detection device that can efficiently and accurately detect the tightness state of the self-tapping screw based on visual detection.
[0153] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for detecting the tightness of a self-tapping screw, characterized in that: include: S1: obtaining a real-time three-dimensional model of the metal roof based on a preset method, obtaining a deformation judgment result of the roof component based on the initial three-dimensional model and the real-time three-dimensional model of the metal roof, and when the deformation judgment result of the roof component is non-deformation, obtaining a real-time image of each self-tapping screw of the metal roof, and performing image processing on the real-time image of each self-tapping screw to obtain a processed image of each self-tapping screw; S2: obtaining a gap image and a main body image of each self-tapping screw based on the processed image of each self-tapping screw, and obtaining a first tightness state detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw; S3: based on the first tightness state detection results of all self-tapping screws, all self-tapping screws to be tested and all self-tapping screws that do not need to be tested are obtained, based on the detection gap area and the real body area of each self-tapping screw to be tested, the gap pixel width, the body pixel width, the gap pixel area and the body pixel area of each self-tapping screw to be tested are obtained, and based on the detection gap area and the real body area of all qualified self-tapping screws, the standard gap pixel width, the standard body pixel width, the standard gap pixel area and the standard body pixel area are obtained; S4: based on the gap pixel width, body pixel width, gap pixel area, body pixel area, standard gap pixel width, standard body pixel width, standard gap pixel area, and standard body pixel area of each self-tapping screw to be tested, obtaining the tightness of each self-tapping screw to be tested, and obtaining a second tightness state detection result of each self-tapping screw to be tested based on the tightness of each self-tapping screw to be tested; Wherein, S2: obtaining a gap image and a main body image of each self-tapping screw based on the processed image of each self-tapping screw, and obtaining a first tightness state detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw, including: The area composed of all the pixel points to be tested that are adjacent to each other in the processed image of each self-tapping screw is regarded as the pixel point combination area, and all the pixel point combination areas in the processed image of each self-tapping screw are obtained; Determine whether each pixel point combination area in the processed image of each self-tapping screw has a continuous curve segment connected by multiple pixel points with the same pixel value. If so, treat the corresponding pixel point combination area as a suspected pixel point combination area. Otherwise, treat all pixel points in the corresponding pixel point combination area as suspected roof pixel points. The pixel values of all the suspected roof pixels corresponding to the largest number of the suspected roof pixels with the same pixel value in the processed image of each self-tapping screw are regarded as the roof pixel values, and the pixel points with the roof pixel values in the processed image of each self-tapping screw are regarded as the roof pixel points, and the image composed of all the roof pixels in the processed image of each self-tapping screw is regarded as the roof image of the corresponding self-tapping screw; Determine a final gap image of each self-tapping screw based on all suspected pixel combination areas in the processed image of each self-tapping screw; An image composed of all pixel points of the processed image of each self-tapping screw, except for all pixel points included in the roof image and the final gap image, is regarded as a main image of the corresponding self-tapping screw; Obtaining a first tightness state detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw; Wherein, based on all suspected pixel combination areas in the processed image of each self-tapping screw, the final gap image of each self-tapping screw is determined, including: The smooth curve segment formed by connecting multiple pixels with the same pixel value and most adjacent to the roof image of the corresponding self-tapping screw in the combined area of all suspected pixels in the processed image of each self-tapping screw is regarded as the gap curve segment, and the average of the pixel values of all pixels in the gap curve segment is regarded as the gap pixel value; Aggregating all pixel points in the processed image that are adjacent to the gap curve segment and whose pixel values are the gap pixel values with the gap curve segment to obtain a first gap image, and aggregating all pixel points in the processed image that are adjacent to the first gap image and whose pixel values are the gap pixel values with the first gap image to obtain a second gap image, and continuing to determine a new gap image based on the second gap image until the processed image does not contain pixel points that are adjacent to the new gap image and whose pixel values are the gap pixel values, then taking the new gap image as the final gap image of the corresponding self-tapping screw; Wherein, obtaining a first tightness state detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw includes: An area composed of all two-by-two adjacent pixel points in the gap image of each self-tapping screw is regarded as a first gap area of each self-tapping screw, and an area composed of all two-by-two adjacent pixel points in the main body image of each self-tapping screw is regarded as a suspected main body area of each self-tapping screw; Among all the suspected main body regions, the suspected main body region with the largest number of first gap regions adjacent to the corresponding suspected main body region is regarded as the real main body region, and all the suspected main body regions except the real main body region among all the suspected main body regions of each self-tapping screw are regarded as the second gap regions of each self-tapping screw; All first gap regions and second gap regions adjacent to the corresponding real main body region in all gap regions of each self-tapping screw are summarized as the detection gap region of each self-tapping screw, wherein all gap regions of each self-tapping screw include all first gap regions and all second gap regions of each self-tapping screw; The geometric center of the real main body area of each self-tapping screw is taken as the origin, and the maximum value of the distance between the origin and all pixel points in the corresponding detection gap area is taken as the radius to obtain the detection circle of each self-tapping screw; Determine whether the quotient of the number of pixels contained in the detection gap area of each self-tapping screw and the number of pixels contained in the detection circle range of the corresponding self-tapping screw is greater than a preset value. If so, the first tightness state detection result of the corresponding self-tapping screw is determined to be to be tested; otherwise, the first tightness state detection result of the corresponding self-tapping screw is determined to be unnecessary to be tested.
2. The method for detecting the tightness of a self-tapping screw according to claim 1, characterized in that: S1: obtaining a real-time three-dimensional model of the metal roof based on a preset method, obtaining a deformation judgment result of the roof component based on the initial three-dimensional model and the real-time three-dimensional model of the metal roof, and when the deformation judgment result of the roof component is non-deformation, obtaining a real-time image of each self-tapping screw of the metal roof, and performing image processing on the real-time image of each self-tapping screw to obtain a processed image of each self-tapping screw, including: A real-time three-dimensional model of the metal roof is obtained based on a preset method, and a deformation judgment result of the roof component is obtained based on the initial three-dimensional model, the real-time three-dimensional model of the metal roof and the preset three-dimensional comparison model, wherein the deformation judgment result of the roof component includes deformation and non-deformation; When the deformation judgment result of the roof component is non-deformation, a real-time image of each self-tapping screw of the metal roof is obtained based on a preset device; Obtain the three-channel pixel values of all pixels in the real-time image of each self-tapping screw, take the average of the three-channel pixel values of each pixel of each real-time image as the standard pixel value of the corresponding pixel, take the standard pixel value of all pixels of each real-time image as the pixel value of all pixels, and obtain the preprocessed image of each self-tapping screw; Determine whether the difference between the pixel value of each pixel point of the preprocessed image of each self-tapping screw and the pixel values of all adjacent pixel points of the corresponding pixel point is greater than a preset threshold value, if so, the corresponding pixel point is regarded as an invalid pixel point, otherwise, the corresponding pixel point is regarded as a pixel point to be tested; The pixel value of each invalid pixel point of the pre-processed image of each self-tapping screw is adjusted to the average value of the pixel values of all corresponding adjacent pixels to obtain a processed image of each self-tapping screw.
3. The method for detecting the tightness of a self-tapping screw according to claim 1, characterized in that: S3: based on the first tightness state detection results of all self-tapping screws, all self-tapping screws to be tested and all self-tapping screws that do not need to be tested are obtained, based on the detection gap area and the real body area of each self-tapping screw to be tested, the gap pixel width, the body pixel width, the gap pixel area and the body pixel area of each self-tapping screw to be tested are obtained, and based on the detection gap area and the real body area of all qualified self-tapping screws, the standard gap pixel width, the standard body pixel width, the standard gap pixel area and the standard body pixel area are obtained, including: All the self-tapping screws whose first tightness detection result indicates that they do not need to be tested are regarded as self-tapping screws that do not need to be tested, and all the self-tapping screws whose first tightness detection result indicates that they are to be tested are regarded as self-tapping screws to be tested; Obtain the number of horizontal pixels in each row in the detection gap area of each self-tapping screw to be tested, and take the maximum value of all single-row pixel numbers in the detection gap area of each self-tapping screw to be tested as the gap pixel width of each self-tapping screw to be tested; Obtain the number of horizontal pixels in each row in the real main body area of each self-tapping screw to be tested, and take the average of all the numbers of pixels in a single row in the real main body area of each self-tapping screw to be tested as the main body pixel width of each self-tapping screw to be tested; The number of pixels contained in the detection gap area of each self-tapping screw to be tested is regarded as the gap pixel area of each self-tapping screw to be tested, and the number of pixels contained in the real main body area of each self-tapping screw to be tested is regarded as the main body pixel area of each self-tapping screw to be tested; The average number of all horizontal pixel points in all detection gap areas that do not need to be tested self-tapping screws is used as the standard gap pixel width, and the average number of all horizontal pixel points in all real body areas that do not need to be tested is used as the standard body pixel width; The average number of pixels contained in all the detection gap areas that do not need the self-tapping screws to be tested is taken as the standard gap pixel area, and the average number of pixels contained in all the real body areas that do not need the self-tapping screws to be tested is taken as the standard body pixel area.
4. The method for detecting the tightness of a self-tapping screw according to claim 1, characterized in that: Based on the gap pixel width, body pixel width, gap pixel area, body pixel area, standard gap pixel width, standard body pixel width, standard gap pixel area, and standard body pixel area of each self-tapping screw to be tested, the tightness of each self-tapping screw to be tested is obtained, including: ; in, is the tightness of the self-tapping screw to be tested currently calculated, is the pixel width of the gap of the self-tapping screw to be tested. is the pixel width of the main body of the self-tapping screw to be tested. is the pixel area of the gap of the self-tapping screw to be tested, is the main pixel area of the self-tapping screw to be tested currently calculated, is the standard gap pixel width, is the standard subject pixel width, is the standard gap pixel area, is the standard subject pixel area, is the natural logarithm, and the value of the natural constant e is 2.
718.
5. The method for detecting the tightness of a self-tapping screw according to claim 1, characterized in that: Obtaining a second tightness state detection result of each self-tapping screw to be tested based on the tightness of each self-tapping screw to be tested, including: Determine whether the tightness of each self-tapping screw to be tested is greater than a preset tightness threshold. If so, the second tightness state detection result of the corresponding self-tapping screw to be tested is judged as unqualified; otherwise, the second tightness state detection result of the corresponding self-tapping screw is judged as qualified.
6. A self-tapping screw tightness detection system, characterized in that: A method for detecting the tightness of a self-tapping screw according to any one of claims 1 to 5, comprising: A processing module is used to obtain a real-time three-dimensional model of the metal roof based on a preset method, obtain a deformation judgment result of the roof component based on the initial three-dimensional model and the real-time three-dimensional model of the metal roof, and when the deformation judgment result of the roof component is non-deformation, obtain a real-time image of each self-tapping screw of the metal roof, and perform image processing on the real-time image of each self-tapping screw to obtain a processed image of each self-tapping screw; A first tightness detection module, used to obtain a gap image and a main body image of each self-tapping screw based on the processed image of each self-tapping screw, and obtain a first tightness detection result of each self-tapping screw based on the gap image and the main body image of each self-tapping screw; A parameter acquisition module, for obtaining all self-tapping screws to be tested and all self-tapping screws that do not need to be tested based on the first tightness state detection results of all self-tapping screws, obtaining the gap pixel width, body pixel width, gap pixel area and body pixel area of each self-tapping screw to be tested based on the detection gap area and the real body area of each self-tapping screw to be tested, and obtaining the standard gap pixel width, standard body pixel width, standard gap pixel area and standard body pixel area based on the detection gap area and the real body area of all qualified self-tapping screws; The second tightness detection module is used to obtain the tightness of each self-tapping screw to be tested based on the gap pixel width and gap pixel area of each self-tapping screw to be tested and the standard gap pixel width and standard gap pixel area, and obtain the second tightness detection result of each self-tapping screw to be tested based on the tightness of each self-tapping screw to be tested.
7. A device for detecting the tightness of a self-tapping screw, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Defect detection method and system, electronic equipment and storage medium
CN115965588A
Method and equipment for detecting coming-off of fastening bolt from rail joint plate
JP2008184763A