CN114004757B - Method, system, device and storage medium for removing interference in industrial image - Google Patents
Method, system, device and storage medium for removing interference in industrial image Download PDFInfo
- Publication number
- CN114004757B CN114004757B CN202111199539.0A CN202111199539A CN114004757B CN 114004757 B CN114004757 B CN 114004757B CN 202111199539 A CN202111199539 A CN 202111199539A CN 114004757 B CN114004757 B CN 114004757B
- Authority
- CN
- China
- Prior art keywords
- image
- interference
- industrial
- processed
- acquiring
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000003860 storage Methods 0.000 title claims abstract description 14
- 230000008030 elimination Effects 0.000 claims abstract description 36
- 238000003379 elimination reaction Methods 0.000 claims abstract description 36
- 238000012549 training Methods 0.000 claims abstract description 20
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 14
- 230000008859 change Effects 0.000 claims abstract description 12
- 238000003708 edge detection Methods 0.000 claims abstract description 11
- 238000012545 processing Methods 0.000 claims description 36
- 230000006870 function Effects 0.000 claims description 12
- 238000007781 pre-processing Methods 0.000 claims description 10
- 238000001914 filtration Methods 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 8
- 238000012937 correction Methods 0.000 claims description 5
- 238000009499 grossing Methods 0.000 claims description 4
- 230000009466 transformation Effects 0.000 claims description 4
- 230000002708 enhancing effect Effects 0.000 claims description 3
- 230000008569 process Effects 0.000 description 7
- 239000000779 smoke Substances 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 239000000428 dust Substances 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000003466 welding Methods 0.000 description 4
- 238000003709 image segmentation Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000000877 morphologic effect Effects 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 239000000126 substance Substances 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/92—Dynamic range modification of images or parts thereof based on global image properties
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention provides a method, a system, a device and a storage medium for removing interference in an industrial image. The method comprises the following steps: acquiring an industrial line image and object edge characteristics of an industrial image to be processed through an edge detection algorithm; comparing the industrial line image with the edge characteristics of the object to obtain the interference image characteristics of the original industrial image; the change degree of the edge curvature of the disturbance image features meets the preset requirement, the corresponding region of the disturbance image features in the industrial image to be processed is used as a disturbance image region, and the regions except the disturbance image region are used as non-disturbance image regions; intercepting interference images and non-interference images from the industrial images to be processed according to the interference image areas and the non-interference image areas; inputting an interference image and a non-interference image into an interference elimination network model for training; and acquiring an image to be subjected to interference elimination, and inputting the image to be subjected to interference elimination into a trained interference elimination network model to acquire an interference-free image. The invention can effectively improve the image quality of the industrial image.
Description
Technical Field
The present invention relates to the field of image processing, and in particular, to a method, system, apparatus, and storage medium for removing interference in industrial images.
Background
The image processing technology is a technology for extracting various information in an image by applying certain operation and processing to the image by using a computer, a video camera and other digital processing technologies so as to achieve a certain specific purpose, and the image processing technology has the characteristics of good reproducibility, high precision, wide application range and the like, and the existing image processing method comprises point operation, filtering, global optimization and the like and has very wide application.
Welding equipment is often used for finishing welding work of related products in the industrial production process, however, smoke is generated in the welding process, light penetrability is seriously affected, and in the process of acquiring related industrial images through an industrial camera, the interference of gaseous substances such as smoke and the like can be caused, so that the image quality of the industrial images is reduced, and the problem is difficult to directly solve through the industrial camera.
Disclosure of Invention
The technical problem to be solved by the invention is that in the process of acquiring the industrial image, the industrial image is low in image quality due to the interference of gaseous substances such as smoke, and the method, the system, the equipment and the storage medium for removing the interference in the industrial image are provided aiming at the defects in the prior art.
The technical scheme adopted for solving the technical problems is as follows: there is provided a method of removing interference in an industrial image, comprising the steps of: acquiring an industrial image to be processed, acquiring an industrial line image of the industrial image to be processed through an edge detection algorithm, acquiring an HIS image of the industrial image to be processed, and acquiring object edge characteristics according to the HIS image; comparing the industrial line image with the edge characteristics of the object to obtain interference image characteristics of the industrial image to be processed; calculating a form angle of the interference image feature, acquiring edge curvature of the interference image feature, and taking a corresponding region of the interference image feature in the industrial image to be processed as an interference image region and taking a region outside the interference image region in the industrial image to be processed as a non-interference image region if the edge curvature change degree of the interference image feature meets a preset requirement; intercepting interference images and non-interference images from the industrial images to be processed according to the interference image areas and the non-interference image areas; inputting the interference image and the non-interference image into a de-interference network model for training, and obtaining a de-interference network model after training; and acquiring an image to be subjected to interference elimination, inputting the image to be subjected to interference elimination into the trained interference elimination network model, and acquiring an undisturbed image of the image to be subjected to interference elimination.
Wherein, after the step of acquiring the industrial line image of the industrial image to be processed, the method comprises the following steps: performing enhancement processing on the industrial line image by adopting histogram equalization; and/or enhancement processing is performed on the industrial line image through a gamma function and/or a sin function.
The step of acquiring the edge characteristics of the object according to the HIS image comprises the following steps: and acquiring a tone value and a transparency value of each pixel point in the HIS image, taking the pixel points of which the tone value and the transparency value meet preset conditions as object pixel points, taking the area where the object pixel points are located as an object area, and taking the outer contour of the object area as the object edge feature.
The method for removing the interference in the industrial image further comprises the following steps of: preprocessing the image to be processed to obtain a preprocessed image, wherein the preprocessing comprises at least one of filtering processing, smoothing processing, enhancing processing and equalizing processing; and layering the preprocessed image, acquiring high-frequency characteristics of the preprocessed image, and acquiring the edge characteristics of the object for the HIS image according to the high-frequency characteristics.
The step of layering the preprocessed image to obtain the high-frequency characteristic of the preprocessed image comprises the following steps: and filtering the preprocessed image at least twice in sequence in the horizontal direction and the vertical direction respectively by using a high-pass filter and a low-pass filter by adopting a wavelet transformation algorithm, and acquiring an approximate component, a horizontal detail component, a vertical detail component and a diagonal detail component according to the preprocessed image.
The step of acquiring the industrial image to be processed comprises the following steps: and acquiring an original industrial image, and performing distortion correction on the original industrial image to acquire the industrial image to be processed.
Wherein the step of acquiring the original industrial image comprises: the original industrial image is acquired through at least one industrial camera which is arranged in a central symmetry mode.
The technical scheme adopted for solving the technical problems is as follows: a system for removing interference in an industrial image is provided comprising: the acquisition module is used for acquiring an industrial image to be processed, acquiring an industrial line image of the industrial image to be processed, acquiring an HIS image of the industrial image to be processed, and acquiring edge characteristics of an object according to the HIS image; the characteristic module is used for comparing the industrial line image with the edge characteristic of the object to obtain the interference image characteristic of the industrial image to be processed; the computing module is used for computing the form angle of the interference image feature, acquiring the edge curvature of the interference image feature, and taking a corresponding region of the interference image feature in the industrial image to be processed as an interference image region and taking a region outside the interference image region in the industrial image to be processed as a non-interference image region if the edge curvature change degree of the interference image feature meets a preset requirement; the image module is used for intercepting interference images and non-interference images from the industrial images to be processed according to the interference image areas and the non-interference image areas; the training module is used for inputting the interference image and the non-interference image into the interference elimination network model for training, and obtaining the interference elimination network model after training; the input module is used for acquiring an image to be de-interfered, inputting the image to be de-interfered into the trained de-interfered network model, and acquiring an undisturbed image of the image to be de-interfered.
The technical scheme adopted for solving the technical problems is as follows: there is provided a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the method as described above.
The technical scheme adopted for solving the technical problems is as follows: there is provided a storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method as described above.
Compared with the prior art, the method has the advantages that the method is used for dividing the industrial image to be processed in the HIS model, extracting the edge characteristics of the object, obtaining the industrial line image of the industrial image to be processed, comparing the edge characteristics of the object with the industrial line image, obtaining the interference image characteristics, effectively reducing the calculation amount for positioning the interference image area, calculating the form angle of the interference image characteristics according to the edge curvature characteristics of cloud-like interference, accurately obtaining the interference image area, training the interference elimination network model by utilizing the interference image and the non-interference image obtained according to the interference image area and the non-interference image area, inputting the image to be eliminated into the interference elimination network model, rapidly obtaining the interference elimination image, having extremely strong adaptability, having very good processing effects on interference sources of different conditions, and rapidly obtaining high-quality industrial image data.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flow chart of a first embodiment of a method for removing disturbances in industrial images provided by the present invention;
FIG. 2 is a flow chart of a second embodiment of a method for removing disturbances in industrial images provided by the present invention;
FIG. 3 is a schematic diagram of a system for removing disturbances in industrial images according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an embodiment of a computer device according to the present invention;
fig. 5 is a schematic structural diagram of an embodiment of a storage medium according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a first embodiment of a method for removing interference in an industrial image according to the present invention. The method for removing the interference in the industrial image provided by the invention comprises the following steps:
s101: and acquiring an industrial image to be processed, acquiring an industrial line image of the industrial image to be processed, acquiring an HIS image of the industrial image to be processed, and acquiring edge characteristics of the object according to the HIS image.
In a specific implementation scenario, an industrial image to be processed is obtained, the industrial image to be processed is mainly used for displaying the condition of products in a production process, the industrial image to be processed can be interfered by cloud clusters caused by smoke dust generated in a welding process, and the image quality of the industrial image to be processed is seriously reduced, so that a user cannot accurately know the actual condition of the products in the production process. Therefore, it is necessary to remove the cloud-like interference, and thus, it is necessary to perform interference removal processing on the industrial image to be processed.
In particular, in this embodiment, the industrial line image of the industrial image to be processed may be acquired by an edge detection algorithm, and of course, other suitable algorithms may be adopted to acquire the industrial line image. The edge detection operator comprises one of prewitt operator, lobel operator, laplacian operator and Canny operator, and can also be other edge detection operators, and the edge detection operators are selected by a user according to actual requirements. Specifically, the position, namely the edge, where the gray level changes severely in the industrial image to be processed can be obtained through the edge detection algorithm, so that the industrial line image is obtained. It will be appreciated that cloud-like disturbances caused by smoke and dust tend to cause the pixel grey values of the disturbed areas to be different from those of the undisturbed areas, and therefore the outer contours of the cloud-like disturbances are included in the industrial line image.
The industrial image to be processed is an RGB image, the industrial image to be processed is converted from an RGB model to an HIS model, and an HIS (Hue-sensitivity-Saturation) image is obtained. The HIS color space is another color space commonly used in image processing, which uses Hue (Hue), saturation (Saturation or Chroma) and Brightness (Brightness) to describe colors from the human visual system. In the implementation scene, the industrial image is subjected to image segmentation according to the tone value, so that the foreground object outline of the industrial image to be processed can be obtained, and the foreground object outline is taken as an object edge feature.
S102: and comparing the industrial line image with the edge characteristics of the object to obtain the interference image characteristics of the industrial image to be processed.
In a specific implementation scenario, the industrial line image and the object edge feature are analyzed, for example, an image rapid matching algorithm based on the Edline image may be used to obtain the industrial line image feature of the industrial line image, then a corresponding portion between the industrial line image feature and the object edge feature, for example, a feature included in both the industrial line image feature and the object edge feature, or a feature with a position deviation smaller than a preset threshold value, is obtained through a processing method such as a mask, a bit operation, and the like, and the corresponding portion is used as the interference image feature.
S103: calculating the form angle of the interference image features, acquiring the edge curvature of the interference image features, and taking the corresponding area of the interference image features in the industrial image to be processed as an interference image area and taking the area outside the interference image area in the industrial image to be processed as a non-interference image area if the edge curvature change degree of the interference image features meets the preset requirement.
In a specific implementation scenario, because there may be some component edges that meet the gray level variation requirements of the edge detection algorithm on the gray level of the image in the industrial image to be processed, and at the same time, in the HIS model, the hue requirements of the object edge feature extraction are met on the hue, the interference image features include the contours of cloud-like interference of smoke and dust and other line features.
The outline of the cloud-shaped interference is a curve, and the edge curvature of the outline is continuously changed, so that the form angle of the interference image features is obtained, the edge curvature change degree of a plurality of interference image features meets the preset requirement, the corresponding interference image features are cloud-shaped interference in the industrial image to be processed, the corresponding area of the interference image features in the industrial image to be processed is used as an interference image area, and the area except the interference image area in the industrial image to be processed is used as a non-interference image area. In this embodiment, the morphological angle of the disturbance image feature is calculated using Randon variation. In this embodiment, the preset requirement is that the edge curvature change is greater than a preset Gap value. Although the undisturbed line image is a straight line, there will be a small part of the local burr bulge, whereas the cloud-like disturbing image will have a significant curvature change. Therefore, setting the value of Gap (unidirectional pixel accumulation value) can avoid misjudgment caused by oversensitivity to the change curvature generated by the local protrusions of the line images.
S104: and intercepting the interference image and the non-interference image from the industrial image to be processed according to the interference image area and the non-interference image area.
In one specific implementation scenario, a disturbance image and a non-disturbance image are obtained from a screenshot of an industrial image to be processed according to a disturbance image area and a non-disturbance image area. Further, the interference image and the non-interference image have the same area parameter (e.g., the same length and width). Thus, the interference image may be acquired after capturing along the outline of the interference image region, or may be acquired after capturing according to a part of the interference image region, or may be acquired by capturing a larger range than the interference image region.
S105: and inputting the interference image and the non-interference image into the interference elimination network model for training, and obtaining the interference elimination network model after training.
In a specific implementation scenario, the steps S101 to S104 are executed for a plurality of industrial images to be processed, so as to obtain a plurality of interference images and non-interference images, or the industrial images to be processed are subjected to screenshot according to different screenshot methods, so as to obtain a plurality of interference images and non-interference images. And inputting the acquired interference image and non-interference image into an interference elimination network model for training. The de-interference network model has an SE layer network structure, and the SE layer network structure utilizes a convolution layer to realize the calculation of the attention weight of each of a plurality of dimensions of an image processed by the SE layer, specifically, the channel weight of the image characteristics of each channel and the pixel weight of each pixel.
S106: and acquiring an image to be subjected to interference elimination, inputting the image to be subjected to interference elimination into a trained interference elimination network model, and acquiring an undisturbed image of the image to be subjected to interference elimination.
In a specific implementation scenario, an image to be interference removed is obtained, where the image to be interference removed may be acquired by an industrial camera in real time during a generating process, and the image to be interference removed includes cloud-like interference caused by smoke and dust. The images to be subjected to interference elimination are input into the trained interference elimination network model, cloud-like interference in the images to be subjected to interference elimination can be effectively eliminated, and interference-free images of the images to be subjected to interference elimination are obtained.
As can be seen from the above description, in this embodiment, the industrial image to be processed is segmented in the HIS model, the edge feature of the object is extracted, the industrial line image of the industrial image to be processed is obtained, the edge feature of the object is compared with the industrial line image to obtain the feature of the interference image, the calculation amount for locating the area of the interference image can be effectively reduced, and the form angle of the feature of the interference image is calculated according to the edge curvature feature of the cloud-like interference. Therefore, the interference image area is accurately acquired, the interference image to be removed is input into the interference removal network model by utilizing the interference image and the non-interference image acquired according to the interference image area and the non-interference image area to train the interference removal network model, the interference removal image can be quickly acquired, the adaptability is extremely high, the processing effect can be very good for interference sources under different conditions, and high-quality industrial image data can be quickly acquired.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for removing interference in an industrial image according to a second embodiment of the present invention. The method for removing the interference in the industrial image provided by the invention comprises the following steps:
s201: and acquiring an original industrial image, and performing distortion correction on the original industrial image to acquire an industrial image to be processed.
In one particular implementation scenario, a raw industrial image is acquired. The original industrial image is obtained by directly photographing an industrial camera. Due to the problem of the shooting angle of the camera, the original industrial image may have distortion, and the distortion correction is performed on the original industrial image to obtain the industrial image to be processed. In this implementation scenario, the original industrial image is acquired by one industrial camera. In other implementation scenarios, the original industrial image is acquired through a plurality of industrial cameras, which are arranged in a central symmetry manner, so that the image quality of the original industrial image can be improved.
S202: and acquiring an industrial image to be processed, and acquiring an industrial line image of the industrial image to be processed through an edge detection algorithm.
In a specific implementation scenario, step S202 is substantially identical to the portion of "acquiring an industrial image to be processed and acquiring an industrial line image of the industrial image to be processed by an edge detection algorithm" in step S101 in the first embodiment of the method for removing interference in an industrial image provided by the present invention, which is not described herein.
S203: carrying out enhancement treatment on the industrial line image by adopting histogram equalization; and/or enhancement processing is performed on the industrial line image through a gamma function and/or a sin function.
In a specific implementation scenario, histogram equalization processing is adopted to effectively enhance the quality of the industrial line image, and histogram equalization is adopted to transform the histogram of the original image into a uniformly distributed (equalized) form, so that the dynamic range of gray value difference between pixels is increased, and the effect of enhancing the overall contrast of the image is achieved. In the present embodiment, the image quality enhancement processing is also performed by the gamma function and the Sin function together, and the industrial line image is locally image quality enhanced in a kernel manner and in a sliding window manner.
S204: and acquiring an HIS image of the industrial image to be processed, acquiring a tone value and a transparency value of each pixel point in the HIS image, taking the pixel points with the tone value and the transparency value meeting preset conditions as object pixel points, taking the area where the object pixel points are located as object areas, and taking the outer contour of the object areas as object edge characteristics.
In a specific implementation scene, an HIS image of an industrial image to be processed is obtained, a tone value and a transparency value of each pixel point in the HIS image are obtained, and the pixel point with the tone value G between 180 and 190 and the transparency value alpha between 1 and 15 is taken as an object pixel point. The region where the target pixel point is located is taken as a target region, and the outer contour of the target region is taken as a target edge feature.
In another implementation scenario, in order to improve accuracy of extracting edge features of an object, more image detail features are acquired. Specifically, preprocessing is performed on an image to be processed, and a preprocessed image is acquired, the preprocessing including at least one of filtering processing, smoothing processing, enhancement processing, and equalization processing. The image quality of the image to be processed can be further improved by preprocessing. And layering processing is carried out on the preprocessed image, the high-frequency characteristic of the preprocessed image is obtained, the HIS image is subjected to image segmentation according to the high-frequency characteristic, the edge characteristic of the object is obtained, and the reliability of image segmentation can be improved.
In one implementation, the pre-processed image is filtered using a wavelet transform algorithm, and the object edge features are high frequency information of the image, and after transforming the image data of the pre-processed image into wavelets using wavelets, the object edge features can be separated in horizontal, vertical and diagonal directions. The transformation times n of the wavelet transformation are determined according to actual conditions. Specifically, the preprocessing image is sequentially filtered at least twice in the horizontal direction and the vertical direction by using a high-pass filter and a low-pass filter under different resolutions, so as to obtain an approximate component J, a horizontal detail component K, a vertical detail component L and a diagonal detail component Z. The filtering times are determined according to actual requirements.
S205: and comparing the industrial line image with the edge characteristics of the object to obtain the interference image characteristics of the original industrial image.
S206: calculating the form angle of the interference image features, acquiring the edge curvature of the interference image features, and taking the corresponding area of the interference image features in the industrial image to be processed as an interference image area and taking the area outside the interference image area in the industrial image to be processed as a non-interference image area if the edge curvature change degree of the interference image features meets the preset requirement.
S207: and intercepting the interference image and the non-interference image from the industrial image to be processed according to the interference image area and the non-interference image area.
S208: and inputting the interference image and the non-interference image into the interference elimination network model for training, and obtaining the interference elimination network model after training.
S209: and acquiring an image to be subjected to interference elimination, inputting the image to be subjected to interference elimination into a trained interference elimination network model, and acquiring an undisturbed image of the image to be subjected to interference elimination.
In a specific implementation scenario, steps S205 to S209 are substantially identical to steps S102 to S106 in the first embodiment of the method for removing interference in an industrial image provided in the present invention, and will not be described herein.
As can be seen from the foregoing description, in this embodiment, distortion correction is performed on an original industrial image, so that the image quality of the industrial image to be processed can be effectively improved, histogram equalization and/or enhancement processing is performed on the industrial line image by using a gamma function and/or a sin function, so that the image quality of the industrial line image can be effectively improved, pixel points in the HIS image, for which a hue value and a transparency value satisfy preset conditions, are used as object pixel points, an area in which the object pixel points are located is used as an object area, an outer contour of the object area is used as an object edge feature, and reliability of the object edge feature can be improved, so that reliability of a position of an interference image area is improved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a system for removing interference in an industrial image according to an embodiment of the invention. The system 10 for removing interference in an industrial image provided by the invention comprises the following steps: an acquisition module 11, a feature module 12, a calculation module 13, an image module 14, a training module 15 and an input module 16.
The acquiring module 11 is configured to acquire an industrial image to be processed, acquire an industrial line image of the industrial image to be processed, acquire an HIS image of the industrial image to be processed, and acquire edge features of the object according to the HIS image. The feature module 12 is configured to compare the industrial line image with the edge feature of the object, and obtain an interference image feature of the industrial image to be processed. The calculating module 13 is configured to calculate a morphological angle of the interference image feature, obtain edge curvatures of the interference image feature, and take a corresponding region of the interference image feature in the industrial image to be processed as an interference image region and take a region outside the interference image region in the industrial image to be processed as a non-interference image region if the degree of change of the edge curvatures of the interference image features meets a preset requirement.
The image module 14 is used for intercepting interference images and non-interference images from the industrial image to be processed according to the interference image areas and the non-interference image areas. The training module 15 is configured to input the interference image and the non-interference image into the interference-free network model for training, and obtain a trained interference-free network model. The input module 16 is configured to obtain an image to be de-interfered, input the image to be de-interfered into the trained de-interfered network model, and obtain a non-interfered image of the image to be de-interfered.
The acquisition module 11 is further used for carrying out enhancement processing on the industrial line image by adopting histogram equalization; and/or enhancement processing is performed on the industrial line image through a gamma function and/or a sin function.
The obtaining module 11 is further configured to obtain a hue value and a transparency value of each pixel in the HIS image, take a pixel where the hue value and the transparency value satisfy a preset condition as a target pixel, take a region where the target pixel is located as a target region, and take an outer contour of the target region as a target edge feature.
The obtaining module 11 is further configured to perform preprocessing on the image to be processed, to obtain a preprocessed image, where the preprocessing includes at least one of filtering processing, smoothing processing, enhancement processing, and equalization processing; and layering the preprocessed image, acquiring high-frequency characteristics of the preprocessed image, and acquiring object edge characteristics of the HIS according to the high-frequency characteristics.
The obtaining module 11 is further configured to sequentially perform filtering on the preprocessed image at least twice in the horizontal direction and the vertical direction by using a high-pass filter and a low-pass filter, respectively, by using a wavelet transform algorithm, so as to obtain an approximate component, a horizontal detail component, a vertical detail component, and a diagonal detail component according to the preprocessed image.
The acquiring module 11 is further configured to acquire an original industrial image, correct distortion of the original industrial image, and acquire an industrial image to be processed.
The acquisition module 11 is further configured to acquire the original industrial image by at least one industrial camera, where the at least one industrial camera is arranged in central symmetry.
As can be seen from the above description, in the system for removing interference in an industrial image in this embodiment, the industrial image to be processed is segmented in the HIS model, the edge feature of the object is extracted, the industrial line image of the industrial image to be processed is obtained, the edge feature of the object is compared with the industrial line image to obtain the feature of the interference image, the calculation amount for locating the area of the interference image can be effectively reduced, and the form angle of the feature of the interference image is calculated according to the edge curvature feature of the cloud-like interference. Therefore, the interference image area is accurately acquired, the interference image to be removed is input into the interference removal network model by utilizing the interference image and the non-interference image acquired according to the interference image area and the non-interference image area to train the interference removal network model, the interference removal image can be quickly acquired, the adaptability is extremely high, the processing effect can be very good for interference sources under different conditions, and high-quality industrial image data can be quickly acquired.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the invention. The computer device 20 comprises a processor 21, a memory 22. The processor 21 is coupled to the memory 22. The memory 22 has stored therein a computer program which is executed by the processor 21 in operation to implement the method as shown in fig. 1-2. The detailed method can be referred to above, and will not be described here.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a storage medium according to an embodiment of the invention. The storage medium 30 stores at least one computer program 31, and the computer program 31 is configured to be executed by a processor to implement the method shown in fig. 1-2, and the detailed method is referred to above and will not be described herein. In one embodiment, the computer readable storage medium 30 may be a memory chip, a hard disk or a removable hard disk in a terminal, or other readable and writable storage means such as a flash disk, an optical disk, etc., and may also be a server, etc.
Those skilled in the art will appreciate that the processes implementing all or part of the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, and the program may be stored in a non-volatile computer readable storage medium, and the program may include the processes of the embodiments of the methods as above when executed. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not thereby to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.
Claims (10)
1. A method for removing interference in an industrial image, comprising the steps of:
acquiring an industrial image to be processed, acquiring an industrial line image of the industrial image to be processed through an edge detection algorithm, acquiring an HIS image of the industrial image to be processed, and acquiring object edge characteristics according to the HIS image;
comparing the industrial line image with the edge characteristics of the object to obtain interference image characteristics of the industrial image to be processed;
calculating a form angle of the interference image feature, acquiring edge curvature of the interference image feature, and taking a corresponding region of the interference image feature in the industrial image to be processed as an interference image region and taking a region outside the interference image region in the industrial image to be processed as a non-interference image region if the edge curvature change degree of the interference image feature meets a preset requirement;
intercepting interference images and non-interference images from the industrial images to be processed according to the interference image areas and the non-interference image areas;
inputting the interference image and the non-interference image into a de-interference network model for training, and obtaining a de-interference network model after training;
and acquiring an image to be subjected to interference elimination, inputting the image to be subjected to interference elimination into the trained interference elimination network model, and acquiring an undisturbed image of the image to be subjected to interference elimination.
2. The method of removing interference from an industrial image according to claim 1, wherein after the step of acquiring an industrial line image of the industrial image to be processed, the method of removing interference from an industrial image further comprises the steps of:
performing enhancement processing on the industrial line image by adopting histogram equalization; and/or
The industrial line image is enhanced by a gamma function and/or a sin function.
3. The method of removing disturbances in an industrial image according to claim 1 where the step of obtaining object edge features from the HIS image includes the steps of:
and acquiring a tone value and a transparency value of each pixel point in the HIS image, taking the pixel points of which the tone value and the transparency value meet preset conditions as object pixel points, taking the area where the object pixel points are located as an object area, and taking the outer contour of the object area as the object edge feature.
4. The method of removing disturbances in an industrial image according to claim 1 where the step of obtaining object edge features from the HIS image includes the steps of:
preprocessing the image to be processed to obtain a preprocessed image, wherein the preprocessing comprises at least one of filtering processing, smoothing processing, enhancing processing and equalizing processing;
and layering the preprocessed image, acquiring high-frequency characteristics of the preprocessed image, and acquiring the object edge characteristics of the HIS image according to the high-frequency characteristics.
5. The method of removing interference from an industrial image according to claim 4, wherein the step of layering the preprocessed image to obtain high frequency features of the preprocessed image comprises the steps of:
and filtering the preprocessed image at least twice in sequence in the horizontal direction and the vertical direction respectively by using a high-pass filter and a low-pass filter by adopting a wavelet transformation algorithm, and acquiring an approximate component, a horizontal detail component, a vertical detail component and a diagonal detail component according to the preprocessed image.
6. The method of removing disturbances in an industrial image according to claim 1 where the step of obtaining an industrial image to be processed includes the steps of:
and acquiring an original industrial image, and performing distortion correction on the original industrial image to acquire the industrial image to be processed.
7. The method of removing disturbances in an industrial image according to claim 6 where the step of acquiring the original industrial image includes the steps of:
the original industrial image is acquired through at least one industrial camera which is arranged in a central symmetry mode.
8. A system for removing interference from an industrial image, comprising:
the acquisition module is used for acquiring an industrial image to be processed, acquiring an industrial line image of the industrial image to be processed, acquiring an HIS image of the industrial image to be processed, and acquiring edge characteristics of an object according to the HIS image;
the characteristic module is used for comparing the industrial line image with the edge characteristic of the object to obtain the interference image characteristic of the industrial image to be processed;
the computing module is used for computing the form angle of the interference image feature, acquiring the edge curvature of the interference image feature, and taking a corresponding region of the interference image feature in the industrial image to be processed as an interference image region and taking a region outside the interference image region in the industrial image to be processed as a non-interference image region if the edge curvature change degree of the interference image feature meets a preset requirement;
the image module is used for intercepting interference images and non-interference images from the industrial images to be processed according to the interference image areas and the non-interference image areas;
the training module is used for inputting the interference image and the non-interference image into the interference elimination network model for training, and obtaining the interference elimination network model after training;
the input module is used for acquiring an image to be de-interfered, inputting the image to be de-interfered into the trained de-interfered network model, and acquiring an undisturbed image of the image to be de-interfered.
9. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 7.
10. A storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111199539.0A CN114004757B (en) | 2021-10-14 | 2021-10-14 | Method, system, device and storage medium for removing interference in industrial image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111199539.0A CN114004757B (en) | 2021-10-14 | 2021-10-14 | Method, system, device and storage medium for removing interference in industrial image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114004757A CN114004757A (en) | 2022-02-01 |
CN114004757B true CN114004757B (en) | 2024-04-05 |
Family
ID=79922920
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111199539.0A Active CN114004757B (en) | 2021-10-14 | 2021-10-14 | Method, system, device and storage medium for removing interference in industrial image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114004757B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020155764A1 (en) * | 2019-01-29 | 2020-08-06 | 平安科技(深圳)有限公司 | Palmprint extraction method and device, storage medium and server |
WO2020173056A1 (en) * | 2019-02-25 | 2020-09-03 | 百度在线网络技术(北京)有限公司 | Traffic image recognition method and apparatus, and computer device and medium |
CN111626123A (en) * | 2020-04-24 | 2020-09-04 | 平安国际智慧城市科技股份有限公司 | Video data processing method and device, computer equipment and storage medium |
CN111899199A (en) * | 2020-08-07 | 2020-11-06 | 深圳市捷顺科技实业股份有限公司 | Image processing method, device, equipment and storage medium |
CN112215827A (en) * | 2020-10-20 | 2021-01-12 | 中广核核电运营有限公司 | Electromigration region detection method and device, computer equipment and storage medium |
-
2021
- 2021-10-14 CN CN202111199539.0A patent/CN114004757B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020155764A1 (en) * | 2019-01-29 | 2020-08-06 | 平安科技(深圳)有限公司 | Palmprint extraction method and device, storage medium and server |
WO2020173056A1 (en) * | 2019-02-25 | 2020-09-03 | 百度在线网络技术(北京)有限公司 | Traffic image recognition method and apparatus, and computer device and medium |
CN111626123A (en) * | 2020-04-24 | 2020-09-04 | 平安国际智慧城市科技股份有限公司 | Video data processing method and device, computer equipment and storage medium |
CN111899199A (en) * | 2020-08-07 | 2020-11-06 | 深圳市捷顺科技实业股份有限公司 | Image processing method, device, equipment and storage medium |
CN112215827A (en) * | 2020-10-20 | 2021-01-12 | 中广核核电运营有限公司 | Electromigration region detection method and device, computer equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
基于SCM的虹膜干扰区域去除算法;马义德;周炜超;滕飞;绽琨;赵荣昌;;计算机工程与应用;20131015(20);全文 * |
无参考的特征点复杂度激光干扰图像评估;钱方;孙涛;郭劲;王挺峰;;光学精密工程;20150415(04);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114004757A (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110473185B (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
US10521885B2 (en) | Image processing device and image processing method | |
US10963993B2 (en) | Image noise intensity estimation method, image noise intensity estimation device, and image recognition device | |
CN108510451B (en) | Method for reconstructing license plate based on double-layer convolutional neural network | |
EP3798975B1 (en) | Method and apparatus for detecting subject, electronic device, and computer readable storage medium | |
CN109492642B (en) | License plate recognition method, license plate recognition device, computer equipment and storage medium | |
CN109035167B (en) | Method, device, equipment and medium for processing multiple faces in image | |
CN109214996B (en) | Image processing method and device | |
CN110276831B (en) | Method and device for constructing three-dimensional model, equipment and computer-readable storage medium | |
CN113781406B (en) | Scratch detection method and device for electronic component and computer equipment | |
Yu et al. | Image and video dehazing using view-based cluster segmentation | |
CN111192241A (en) | Quality evaluation method and device of face image and computer storage medium | |
CN112053302A (en) | Denoising method and device for hyperspectral image and storage medium | |
Zhang et al. | Image dehazing based on dark channel prior and brightness enhancement for agricultural remote sensing images from consumer-grade cameras | |
US11373279B2 (en) | Image processing method and device | |
CN109544470A (en) | A kind of convolutional neural networks single image to the fog method of boundary constraint | |
CN114004757B (en) | Method, system, device and storage medium for removing interference in industrial image | |
CN112825189B (en) | Image defogging method and related equipment | |
CN112581481A (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
CN112052859A (en) | License plate accurate positioning method and device in free scene | |
DE102017009118A1 (en) | IMAGE BALANCE FOR SERIAL PICTURES | |
CN105405109A (en) | Dirty spot detection method based on zonal background modeling | |
Bilozerskyi et al. | New method for video stream brightness stabilization: algorithms and performance evaluation | |
Hu et al. | A low-illumination image enhancement algorithm based on morphological-Retinex (MR) operator | |
US9686449B1 (en) | Methods and systems for detection of blur artifact in digital video due to high quantization |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |