Screw leak detection method, system, device and storage medium
By acquiring and accurate allocating key frame images, combined with Gaussian enlightened pre -processing and feature extraction, the automation and efficiency of screw leakage detection were realized, and the missed inspection and misunderstanding of artificial testing in existing technologies were solved.
Patent Information
- Application Number
- CN202010350517.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-28
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2040-07-28
AI Technical Summary
In the prior art, screw leakage lock detection mainly relies on manual inspection, and there are missed inspection and false inspection, which increases labor costs and reduces product yield.
By obtaining key frame images including screw images, accurate allocation is performed, and the accurate image of the screw is obtained using the screw positive and negative sample templates, and the Gaussian Bente pre -processing and feature extraction are performed to determine whether the screw is locked.
Achieve automated detection, reduce the use of human resources, improve the accuracy and efficiency of detection, and reduce the risk of product leakage.
Smart Images

Figure CN113570539B_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to the field of image analysis, and in particular to a screw leakage detection method and system, device and storage medium. Background Art
[0002] In the whole machine assembly production line, the detection of whether the screws are leaking is generally done manually, which may cause missed detection and false detection, which not only increases labor costs but also causes a decrease in product yield. Summary of the invention
[0003] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a screw leak detection method and system, device and storage medium.
[0004] In a first aspect, a method for detecting screw leakage is provided, comprising the steps of: obtaining a key frame image to be detected, wherein the key frame image includes a screw image;
[0005] The key frame image is accurately registered with a reference image, and a screw image is acquired on the key frame image. A positive sample image and a negative sample image of the screw are made on the reference image. The positive sample image is a state where the screw is locked, and the negative sample image is a state where the screw is not provided. The screw image is determined by referring to the positive sample image and the negative sample image;
[0006] Performing Gaussian mask preprocessing on the screw image;
[0007] Feature extraction and classification are performed on the preprocessed screw images to determine the unlocked screw images.
[0008] In a second aspect, a screw leakage detection system is provided, comprising:
[0009] An image acquisition module, used for acquiring a key frame image to be detected, wherein the key frame image includes a screw image;
[0010] A precise registration module, used for precisely registering the key frame image with a reference image, and acquiring a screw image on the key frame image, wherein a positive sample image and a negative sample image of the screw are produced on the reference image, wherein the positive sample image is a state where the screw is locked, and the negative sample image is a state where the screw is not provided, and the screw image is determined by referring to the positive sample image and the negative sample image;
[0011] A preprocessing module, used for performing Gaussian mask preprocessing on the screw image;
[0012] The processing module is used to extract and classify the pre-processed screw images and determine the unlocked screw images.
[0013] According to a third aspect, a device is provided, the device comprising:
[0014] one or more processors;
[0015] The memory is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned screw leakage detection method.
[0016] In a fourth aspect, a computer-readable storage medium storing a computer program is provided, wherein the program implements the above-mentioned screw leakage detection method when executed by a processor.
[0017] According to the technical solution provided in the embodiment of the present application, a key frame image including an image of a screw is obtained and accurately registered for the key frame image. An accurate image of the screw is obtained from the key frame image by using a picture including positive and negative sample templates of the screw as a reference image for accurate registration. Then, a judgment is made as to whether the screw is tightened based on the accurate image of the screw. On the one hand, the screw status is detected by using intelligent recognition, thereby releasing human resources and saving resources. On the other hand, an accurate image of the screw is obtained through accurate registration, and a judgment is made as to whether the screw is not tightened based on the image, which makes the judgment more accurate and efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0019] Figure 1 This is a flow chart of the screw leakage detection method in this embodiment;
[0020] Figure 2 This is the template matching principle diagram in this embodiment;
[0021] Figure 3 This is a schematic diagram of images of a tightened screw and an unlocked screw in this embodiment;
[0022] Figure 4 This is the Gaussian mask surface diagram in this embodiment;
[0023] Figure 5 for Figure 3 Schematic diagram of the image after preprocessing;
[0024] Figure 6 This is a schematic diagram of the structure of the screw leakage detection system in this embodiment;
[0025] Figure 7 Schematic diagram of the device structure in this embodiment. DETAILED DESCRIPTION
[0026] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] Please refer to Figure 1 , This embodiment provides a method for detecting screw leakage, comprising the steps of: obtaining a key frame image to be detected, wherein the key frame image includes a screw image;
[0029] The key frame image is accurately registered with a reference image, and a screw image is acquired on the key frame image. A positive sample image and a negative sample image of the screw are made on the reference image. The positive sample image is a state where the screw is locked, and the negative sample image is a state where the screw is not provided. The screw image is determined by referring to the positive sample image and the negative sample image;
[0030] Performing Gaussian mask preprocessing on the screw image;
[0031] The preprocessed screw images are subjected to feature acquisition and classification to determine the unlocked screw images.
[0032] In this embodiment, by processing the acquired key frame image including the screw image, it is determined whether the screw in the captured image is in a locked state, and the screw state is detected by intelligent recognition, thereby releasing human resources and saving resources; wherein the key frame image is accurately aligned with the reference image so as to obtain an accurate image of the screw from the key frame image, and a check is performed on whether the screw is locked based on the acquired accurate image, making the judgment more accurate and efficient.
[0033] In this embodiment, a key frame image including an image of a screw is first obtained by photographing. The components to be inspected are placed on a conveyor belt. The camera photographs the components on the conveyor belt. Each image covers all the screws on the components as much as possible, which is a key frame image. The key frame images are accurately registered to obtain the exact position of the screws and the accurate image of each screw. After pre-processing, they are classified to achieve fast and efficient detection of whether the screws are leaking.
[0034] Furthermore, the “precisely registering the key frame image with the reference image and acquiring the screw image on the key frame image” specifically includes:
[0035] Acquire at least two screw sample images on the reference image, wherein the centers of the screw sample images are point P and the screw sample images at least include a screw positive sample image and a screw negative sample image,
[0036] Taking point P as the center on the key frame image, a screw search image is obtained, wherein the size of the screw search image is not less than the size of the screw sample image;
[0037] The screw positive sample image and the screw negative sample image are respectively matched with the screw search image to obtain a region of interest (ROI) that is most similar to the screw positive sample or the screw negative sample;
[0038] The center of the region of interest is taken as the screw center, and an image of a set size is cropped as a screw image.
[0039] The accurate registration in this embodiment is performed by using a template matching algorithm. In this embodiment, the acquired key frame images are accurately matched, and a template matching algorithm, namely a normalized cross-correlation algorithm, is specifically used. Figure 2 The following is the principle diagram of template matching. Given 2 images, T is M x *M y Template image, S is N x *N y The matching image. During matching, the template is translated on the matching image, and the search sub-image on the matching image is denoted as S i,j , i, j are the positions of the upper left corner pixels of this sub-image in the matching image S, where 1≤i≤N x -M x +1; 1≤j≤N y -M y +1. The matching result is obtained by finding the position with the largest normalized correlation coefficient between the search sub-graph and the template graph. The calculation formula of the normalized correlation coefficient is as follows:
[0040]
[0041] Since the area of the screw is relatively small, if the screw is directly intercepted at the corresponding position on the key frame image according to the position of the screw on the reference image, the integrity of the screw image will be affected, and further the accuracy of the subsequent screw leakage detection will be affected. In order to obtain an accurate screw image, the above template matching algorithm is used to accurately locate the position of the screw on the key frame image, specifically including:
[0042] Assume that the position of the screw on the reference image is P(x, y), and take this point P as the center and crop the image with the size of T_w, T_h as the template image. Two template images of the screw at this position are collected, one is the positive sample image Pos_t of the screw, and the other is the negative sample image Neg_t of the screw;
[0043] Then, at the same position P of the key frame image, an image of size (S_w, S_h) is cropped with P as the center as the screw search image, and the size of the screw search image is set to be not less than the size of the screw sample image, that is, S_w>=T_w, S_h>=T_h; a matching operation is performed on the search image using both the positive sample image and the negative sample image of the screw, and the matching results are compared to find the ROI area that is most similar to the positive sample image or the negative sample image;
[0044] Assume that the size of the screw image to be acquired is (screw_w, screw_h), so the center of the ROI area is taken as the screw center, and the image of the size of (screw_w, screw_h) is cropped as the target image, that is, the final screw image;
[0045] The screw image finally obtained in the above steps accurately represents the image of each screw, and the screw missed locking inspection is performed based on the image;
[0046] In this embodiment, a screw search image is obtained on a key frame image, wherein the key frame image is a key frame image after coarse registration. The key frame image is preliminarily corrected through the coarse registration step. For details, refer to the following coarse registration step.
[0047] Furthermore, the “performing Gaussian mask preprocessing on the screw image” specifically includes: performing Gaussian mask processing on the screw image, multiplying the screw image with the Gaussian mask, and obtaining a Gaussian mask image of the screw.
[0048] like Figure 3 As shown in FIG. 1 , in the images of the tightened screw and the unlocked screw, except for the influence of illumination, the difference between the two is only in the center position. Therefore, when judging the screw image in this embodiment, it is only necessary to highlight the difference in the center position. Weakening the edge background part is helpful to judge whether the screw is tightened. Therefore, in this embodiment, the obtained screw image is preprocessed with a Gaussian mask, as shown in FIG. Figure 4 The Gaussian mask surface is shown, and the Gaussian mask formula is: The Gaussian mask has a higher value in the center and a smaller value as it moves outward. Therefore, multiplying the Gaussian mask function with the screw image can well retain the value in the middle of the screw image, further reduce the influence of surrounding pixels, facilitate subsequent feature extraction and judgment, and improve recognition accuracy.
[0049] The formula for preprocessing the screw image using Gaussian mask is: R(x,y)=I(x,y)*g(x,y),x∈[0,M],y∈[0,N]; where R(x,y) is the preprocessing result, I is the screw image, g(x,y) is the Gaussian mask, M, N are the image width and height, and the result is the point-to-point multiplication of the image and the Gaussian mask. When point-to-point multiplication is used, the width and height of the Gaussian mask are consistent with the width and height of the screw image, such as Figure 5 Shown are images of a tightened and unlocked screw after Gaussian mask preprocessing.
[0050] In this embodiment, a Gaussian mask is used to preprocess the screw image so that the features of the screw image are concentrated in the central area, which is convenient for subsequent feature extraction and analysis. At the same time, the Gaussian mask function used is a circular or elliptical Gaussian surface, so it can also be used for defect detection of circular or elliptical structures.
[0051] Furthermore, before the step of “obtaining the key frame image to be detected”, the method further includes the steps of: obtaining the image to be detected, and roughly registering the image to be detected with the reference image to form a key frame image;
[0052] The coarse registration adopts SIFT algorithm.
[0053] In this embodiment, the image is also roughly registered before precise registration, and the SIFT algorithm is used for rough registration. Since the acquired image may be skewed, which affects the subsequent acquisition of the screw image, the image is adjusted by storage registration, and the corrected image is the key frame image, so that the position of the screw and other parts in the image after rough registration is basically consistent with the reference image. Since the screw position obtained by rough registration is not very accurate, the above-mentioned precise registration is required to determine the image of the screw for feature extraction.
[0054] In this embodiment, the preprocessed screw image is then subjected to feature extraction and classification to determine whether the screw is tightened, wherein the feature value is extracted using the LBP (Local Binary Pattern, local binary pattern feature extraction) method;
[0055] After extracting the features, a classifier is used for classification. Common classification methods include KNN, SVM, etc. The selection of the above classification methods can select a suitable classifier for operation according to the number of samples; among them, this embodiment can be regarded as a binary classification to identify whether the screw is locked or not, and the identification data is the preprocessed screw image data.
[0056] This embodiment obtains a key frame image including a screw image, performs precise registration on the key frame image, and uses pictures including positive and negative sample templates of the screw as reference images for precise registration to obtain an accurate image of the screw from the key frame image, and then determines whether the screw is tightened based on the accurate image of the screw. On the one hand, by using intelligent recognition to detect the state of the screw, human resources are released and resources are saved. On the other hand, by accurately registering the accurate image of the screw, the accurate image of the screw is obtained, and based on the image, it is determined whether the screw is not tightened, which makes the determination more accurate and efficient.
[0057] like Figure 6 As shown, this embodiment also provides a screw leakage detection system, including:
[0058] An image acquisition module 10 is used to acquire a key frame image to be detected, wherein the key frame image includes a screw image;
[0059] A precise registration module 20, used for precisely registering the key frame image with a reference image, and acquiring a screw image on the key frame image, wherein a positive sample image and a negative sample image of the screw are prepared on the reference image, wherein the positive sample image is a state where the screw is locked, and the negative sample image is a state where the screw is not provided, and the screw image is determined by referring to the positive sample image and the negative sample image;
[0060] A preprocessing module 30, used for performing Gaussian mask preprocessing on the screw image;
[0061] The processing module 40 is used to extract features and classify the pre-processed screw images to determine the images of the screws that are not tightened.
[0062] In this embodiment, the key frame image is accurately aligned with the reference portrait through a precise registration module, so that an accurate image of the screw can be obtained from the key frame image, and the screw is checked to see if it is tightened based on the acquired accurate image, making the judgment more accurate and efficient.
[0063] Further, the precise registration module 20 includes: a sample image acquisition unit 21, which is used to acquire at least two screw sample images on the reference image, the center of the screw sample image is point P, and at least includes a screw positive sample image and a screw negative sample image;
[0064] A search image acquisition unit 22, used to acquire a screw search image with point P as the center on the key frame image, wherein the size of the screw search image is not less than the size of the screw sample image;
[0065] A region of interest acquisition unit 23, configured to use the screw positive sample image and the screw negative sample image to match the screw search image respectively, and acquire a region of interest (ROI) that is most similar to the screw positive sample or the screw negative sample;
[0066] The screw image acquisition unit 24 is used to cut an image of a set size with the center of the region of interest as the screw center as the screw image.
[0067] In this embodiment, a template matching algorithm is used for precise matching. The search image acquisition unit determines the search image based on the center and the screw sample image, and further determines the screw image. The screw image finally obtained accurately represents the image of each screw, and the screw leakage inspection is performed based on the image.
[0068] Furthermore, the preprocessing module 30 specifically includes: a Gaussian mask unit 31, used to set a required Gaussian mask;
[0069] The calculation unit 32 is used to multiply the screw image with the Gaussian mask to obtain a Gaussian mask image of the screw.
[0070] In this embodiment, in order to highlight the center position of the screw image and weaken the edge background part, so as to provide effective assistance for judging whether the screw is tightened, the screw image is preprocessed with a Gaussian mask through a computing unit, which well retains the value in the middle of the screw image while reducing the influence of surrounding pixels, thereby facilitating subsequent feature extraction and judgment and improving recognition accuracy.
[0071] Furthermore, the image acquisition module is also used to acquire the image to be detected.
[0072] It also includes a coarse registration module, which is used to coarsely register the image to be detected with the reference image to form a key frame image.
[0073] In this embodiment, the image is also roughly registered before precise registration to obtain a key frame image. The SIFT algorithm is used for rough registration. Since the acquired image may be skewed, which affects the subsequent acquisition of the screw image, the image is adjusted as a whole through storage registration to obtain the key frame image. The initially acquired image can be photographed by a camera so that the positions of parts such as screws in the image after rough registration are basically consistent with the reference image.
[0074] This embodiment further provides a device, characterized in that the device comprises:
[0075] one or more processors;
[0076] The memory is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned inventory method.
[0077] This embodiment provides a device such as Figure 7 As shown, there is shown a schematic diagram of the structure of a computer system 300 suitable for implementing the device of an embodiment of the present application.
[0078] like Figure 7 As shown, the computer system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage part into a random access memory (RAM) 303. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 303 is also connected to the bus 304.
[0079] The following components are connected to the I / O interface 303: an input section 306 including a keyboard, a mouse, etc.; an output section including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface 303 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 as needed.
[0080] In particular, according to an embodiment of the present invention, the above reference process Figure 1 The described process can be implemented as a computer software program. For example, the embodiment of screw leakage detection disclosed in the present application includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by the central processing unit (CPU) 301, the above-mentioned functions defined in the system of the present application are executed.
[0081] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0082] In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0083] The flowchart and block diagram in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the real-time control device, method and computer program product of the display device screen brightness according to the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0084] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not constitute limitations on the units themselves under certain circumstances. The units or modules described may also be set in a processor, for example, it may be described as: a processor includes a first acquisition module, a second acquisition module, and a calculation module.
[0085] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the screw leakage detection method described in the above embodiment, specifically performing the following steps: obtaining a key frame image to be detected, wherein the key frame image includes a screw image;
[0086] The key frame image is accurately registered with a reference image, and a screw image is acquired on the key frame image. A positive sample image and a negative sample image of the screw are made on the reference image. The positive sample image is a state where the screw is locked, and the negative sample image is a state where the screw is not provided. The screw image is determined by referring to the positive sample image and the negative sample image;
[0087] Performing Gaussian mask preprocessing on the screw image;
[0088] The preprocessed screw images are subjected to feature acquisition and classification to determine the unlocked screw images.
[0089] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0090] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0091] Through the description of the above implementations, those skilled in the art can easily understand that the example implementations described here can be implemented by software, or by combining software with necessary hardware.
[0092] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the screw leakage detection method described in the above embodiment is implemented.
[0093] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.
Claims
1. A screw leak detection method, characterized in that: Includes steps: Acquire a key frame image to be detected, wherein the key frame image includes a screw image; The key frame image is accurately registered with a reference image, and a screw image is acquired on the key frame image. A positive sample image and a negative sample image of the screw are made on the reference image. The positive sample image is a state where the screw is locked, and the negative sample image is a state where the screw is not provided. The screw image is determined by referring to the positive sample image and the negative sample image; Performing Gaussian mask preprocessing on the screw image; Feature extraction and classification are performed on the preprocessed screw images to determine the unlocked screw images.
2. The screw leak detection method according to claim 1, characterized in that: The key frame image is accurately registered with the reference image, and the screw image is acquired on the key frame image, specifically including: Acquire at least two screw sample images on the reference image, wherein the centers of the screw sample images are point P and the screw sample images at least include a screw positive sample image and a screw negative sample image, Taking point P as the center on the key frame image, a screw search image is obtained, wherein the size of the screw search image is not less than the size of the screw sample image; The screw positive sample image and the screw negative sample image are respectively matched with the screw search image to obtain a region of interest (ROI) that is most similar to the screw positive sample or the screw negative sample; The center of the region of interest is taken as the screw center, and an image of a set size is cropped as a screw image.
3. The screw leakage detection method according to claim 2, characterized in that: The screw image is subjected to Gaussian mask preprocessing, specifically comprising: performing Gaussian mask processing on the screw image, multiplying the screw image with the Gaussian mask, and obtaining a Gaussian mask image of the screw.
4. The screw leak detection method according to claim 1, characterized in that: Before obtaining the key frame image to be detected, the method further includes the steps of: obtaining the image to be detected, and roughly registering the image to be detected with the reference image to form a key frame image; The coarse registration adopts SIFT algorithm.
5. A screw leak detection system, characterized in that: include: An image acquisition module, used for acquiring a key frame image to be detected, wherein the key frame image includes a screw image; A precise registration module, used for precisely registering the key frame image with a reference image, and acquiring a screw image on the key frame image, wherein a positive sample image and a negative sample image of the screw are produced on the reference image, wherein the positive sample image is a state where the screw is locked, and the negative sample image is a state where the screw is not provided, and the screw image is determined by referring to the positive sample image and the negative sample image; A preprocessing module, used for performing Gaussian mask preprocessing on the screw image; The processing module is used to extract and classify the pre-processed screw images and determine the unlocked screw images.
6. The screw leakage detection system according to claim 5, characterized in that: The precise registration module comprises: a sample image acquisition unit, which is used to acquire at least two screw sample images on the reference image, wherein the center of the screw sample image is point P, and the screw sample image comprises at least a screw positive sample image and a screw negative sample image; A search image acquisition unit, used to acquire a screw search image with point P as the center on the key frame image, wherein the size of the screw search image is not less than the size of the screw sample image; A region of interest acquisition unit, used to use the screw positive sample image and the screw negative sample image to match the screw search image respectively, and acquire a region of interest (ROI) that is most similar to the screw positive sample or the screw negative sample; The screw image acquisition unit is used to take the center of the region of interest as the screw center and crop an image of a set size as the screw image.
7. The screw leakage detection system according to claim 6, characterized in that: The preprocessing module specifically includes: a Gaussian mask unit, used to set the required Gaussian mask; The calculation unit is used to multiply the screw image with the Gaussian mask to obtain a Gaussian mask image of the screw.
8. The screw leakage detection system according to claim 5, characterized in that: The image acquisition module is also used to acquire the image that needs to be detected. It also includes a coarse registration module, which is used to coarsely register the image to be detected with the reference image to form a key frame image.
9. A device, characterized in that: The device comprises: one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to execute the screw leakage detection method as described in any one of claims 1 to 4.
10. A computer-readable storage medium storing a computer program, characterized in that: When the program is executed by a processor, the screw leakage detection method as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Key frame extraction method and device and electronic equipment
CN110399847A
Target tracking method and device, electronic equipment and storage medium
CN110610510A