Detailed Description
The foregoing description is only an overview of the present application, and is intended to be implemented in accordance with the teachings of the present application in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present application more readily apparent.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail with reference to the accompanying drawings, and the described embodiments should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict, the term "first\second" being referred to merely as distinguishing between similar objects and not representing a particular ordering for the objects. The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements that are expressly listed or inherent to such process, article, or apparatus, but may include other steps or components not expressly listed or inherent to such process, article, or apparatus, and unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for the purpose of describing embodiments of the application only.
The embodiment of the application provides a vehicle paint scratch detection device integrating multi-mode imaging, which is shown in fig. 1 and comprises a multi-mode image determination module 10, a detection constraint condition setting module 20, a scratch detection module construction module 30, a gray level image processing module 40 and a homology induction marking module 50.
The multi-mode image determining module 10 is configured to configure a plurality of annular light sources, perform time-sharing exposure and continuous acquisition, and determine multi-mode images, wherein the multi-mode images have light source mode numbers based on the same target area.
Preferably, a plurality of paths of annular light sources are configured to acquire the multi-mode image, wherein the plurality of paths of light sources possibly comprise LED lamps, infrared light sources, ultraviolet light sources and the like with different wavelengths or spectrum ranges, the quantity of the LED lamps, the infrared light sources, the ultraviolet light sources and the like are configured according to the actual situation of a vehicle, the design of the annular light sources can ensure that light uniformly irradiates a target area, and the influence of shadows and reflection is reduced, so that the quality of the multi-mode image is improved; the method comprises the steps of carrying out time-sharing exposure and continuous acquisition by utilizing a plurality of annular light sources, wherein images generated by different light sources possibly have different characteristics and information, sequentially activating the light sources in a time-sharing exposure mode and acquiring corresponding vehicle detection images, ensuring that only one light source is activated at the same time point to avoid interference among the different light sources, continuously acquiring the images generated by the light sources on the basis of time-sharing exposure to form multi-mode images for subsequent vehicle paint scratch detection and analysis, wherein the multi-mode images comprise a plurality of vehicle paint scratch detection images generated by the different light sources, each image of each mode reflects the characteristics and information of a target area under the different light sources, and distributing a light source number based on the same target area to each image of the multi-mode images for distinguishing and identifying, wherein the light source mode number is unique and corresponds to the light source mode used for acquiring the image.
The specific configuration of the multi-mode image determining module 10 further includes setting a light source angle and a light source type, determining a plurality of paths of annular light sources in a combined manner, setting a light source exposure sequence and a neighborhood light source exposure interval, determining an acquisition rule, determining the neighborhood light source exposure interval based on exposure hysteresis influence, and performing time-sharing exposure and continuous acquisition based on the plurality of paths of annular light sources and the acquisition rule.
Preferably, the angle of the light source refers to the irradiation direction of the light source relative to a target area (such as a vehicle paint surface), the distribution and reflection conditions of light on the target area can be changed by adjusting the angle of the light source, so that the quality and characteristics of an image are affected, the type of the light source refers to the type of the light source used, such as an LED (light-emitting diode), a halogen lamp, a fluorescent lamp and the like, different types of light sources have different spectral characteristics, brightness and stability, the characteristics can influence the color, contrast and definition of the image, specifically, the light sources with different angles and types are combined together to form a multi-path annular light source, the light sources can be uniformly distributed around the target area, the light sources can also be configured according to specific angles and distances, so that more comprehensive image information can be obtained, the correct illumination can be used for separating the light source from the background in the image acquisition process, for example, the edge of a convex part can be illuminated at a low angle, and the edge of a convex part can be illuminated by using diffuse light when the image is detected for smooth defect or curved surface defect detection, and meanwhile, the accuracy and the integrity of the scratch defect can be ensured by using multiple light sources.
Preferably, the light source exposure sequence and the neighborhood light source exposure interval are set, specifically, the light source exposure sequence refers to the sequence in which each path of light source is activated in the time-sharing exposure process, by setting a reasonable exposure sequence, the illumination condition of the target area is consistent when the images of each mode are acquired, so that interference among images of different modes is avoided, the neighborhood light source exposure interval refers to the time interval between two adjacent light source exposures in the continuous acquisition process, the setting of the interval needs to take the influence of exposure hysteresis into consideration, namely, after the exposure of the previous light source, the target area may need to be restored to a stable state for avoiding interference to the images generated by the exposure of the next light source, specific acquisition rules are formulated based on the set light source exposure sequence and the neighborhood light source exposure interval, the specific acquisition rules are used for guiding the time-sharing exposure and continuous acquisition processes, namely, the light sources are sequentially activated according to the set light source exposure sequence, the corresponding image data are acquired during each light source exposure period, the image data generated by each light source exposure are continuously acquired on the basis of time-sharing exposure, the image data generated by each light source exposure is ensured, the image data generated by the image acquisition of each light source exposure is ensured to be high-efficiency, the image acquisition can be realized under the condition of high-precision imaging accuracy, the image detection accuracy is improved, the accuracy is more convenient, and the scratch information is more applied to the image detection is provided.
The detection constraint setting module 20 is configured to set a detection constraint, where the detection constraint includes an interference constraint for a natural texture of a surface and an optical magnification condition based on a detection requirement.
Preferably, detection constraint conditions are set to ensure accuracy and reliability of scratch detection, meanwhile, the possibility of false alarm and false omission is reduced, the detection constraint conditions generally comprise interference constraint conditions aiming at natural textures of the surface, and optical amplification conditions based on detection requirements, specifically, complex natural textures tend to exist on the vehicle paint surface, the textures are easy to be confused with scratches in the scratch detection process, false alarm or false omission is caused, therefore, the interference constraint conditions aiming at the natural textures of the surface are set, possibly including texture feature recognition, the natural texture features of the vehicle paint surface are recognized and extracted through an image processing technology and used for distinguishing the scratches from the natural textures, therefore false alarm is reduced, and a filtering algorithm is applied to smooth the natural textures in an image, so that the influence of the natural textures on the scratch detection is reduced, and the accuracy of the scratch detection is improved. The scratch detection is often required to identify tiny scratches, the device is required to have enough optical amplifying capability, the optical amplifying conditions based on detection requirements generally comprise optical amplifying factors, namely, proper optical amplifying factors are set according to the size and detection requirements of the scratches, the detailed characteristics of the scratches are ensured to be captured clearly, so that the detection accuracy is improved, the stability of an optical system is critical to the scratch detection, the stability of the optical system is required to be ensured to be kept stable in the amplifying process, the problems of image blurring or distortion and the like are avoided, the adaptability of the optical system is required, and different scratches may need different optical amplifying conditions, so that the optical system needs to have certain adaptability and can be adjusted and optimized according to the detection requirements. Through the interference constraint condition aiming at the surface natural texture and the optical amplification condition based on the detection requirement, false alarm and false alarm can be effectively reduced, and the accuracy and efficiency of scratch detection are improved
The scratch detection module construction module 30 is configured to construct a scratch detection module, where the scratch detection module includes a preprocessing unit based on the detection constraint condition and morphological operation, and a fusion detection unit connected with the rear part.
Preferably, a scratch detection module is constructed, which comprises a preprocessing unit based on detection constraint conditions and morphological operation and a fusion detection unit connected with the preprocessing unit in a rear-mounted manner, wherein the preprocessing unit is an important component of the scratch detection module and is mainly responsible for processing input image data so as to reduce noise and enhance scratch characteristics, and provides high-quality images for subsequent scratch detection, and specifically comprises the steps of screening the input images according to the detection constraint conditions (such as optical amplification factor, texture characteristic identification and the like), screening the input images according to the set detection constraint conditions (such as optical amplification factor and texture characteristic identification) to ensure that the image quality meets the requirements of scratch detection, and then processing the images by using morphological operation (such as expansion, corrosion, opening operation, closing operation and the like) to remove noise, smooth edges, connecting broken scratches and the like in the images, so that the scratch characteristics are enhanced, the accuracy of the scratch detection is improved, and the scratch characteristics in the images can be further enhanced by methods such as contrast adjustment and brightness adjustment and the like so that the scratches are more clear and visible; the fusion detection unit is a core part of a scratch detection module and is mainly responsible for scratch detection of the preprocessed image, and comprises feature extraction, scratch recognition and positioning and fusion detection, specifically, the image processing technology (such as edge detection, corner detection and the like) is utilized to extract scratch features in the image, wherein the features comprise the shape, the length, the width, the direction and the like of scratches, based on the extracted scratch features, the scratch is recognized and positioned by utilizing a machine learning algorithm or a threshold segmentation method and the like, whether the scratches exist in the image is judged by comparing the scratch features with a preset scratch template or threshold, and determining the position and the size of the scratch, finally carrying out fusion processing on the vehicle scratch detection results of different modes, outputting the final detection result and ensuring the accuracy and the reliability of scratch detection.
The gray image processing module 40 is configured to identify the multi-mode image, perform morphological processing and adaptive binarization processing on the gray image based on the preprocessing unit, and flow to the fusion detection unit to perform multi-mode superposition fusion and scratch feature identification, and integrate and output a scratch detection sheet.
Preferably, the collected multi-mode images are identified, converted to obtain corresponding gray images and input into a scratch detection module, morphological processing and adaptive binarization processing are performed on the gray images by utilizing a preprocessing unit, processing result flows are transferred to a fusion detection unit to perform multi-mode superposition fusion and scratch feature recognition, specifically, the multi-mode images are a plurality of images of a target vehicle paint surface, which may include visible light images, infrared images, ultraviolet images and the like, each mode provides different feature information of the target, the original color multi-mode images are converted into gray images, so that the calculated amount during processing is reduced, the gray information is generally enough for scratch detection, morphological processing such as expansion, corrosion, on-off operation and the like is performed on the gray images, noise, enhanced scratch features, connected broken scratches and the like are removed, a threshold value is automatically determined according to the local features of the images, the gray images are converted into binary images, and the scratches are usually represented as white or black communication areas in the binary images, so that subsequent scratch recognition is facilitated; the preprocessed images of different modes are input into a fusion detection unit for superposition fusion, for example, the superposition fusion is realized by simple methods such as image superposition, weighted average, maximum and minimum fusion and the like, the fused images contain complementary information from different modes, so that scratches can be more accurately identified, finally, on the fused images, the characteristics of the scratches are identified by utilizing image processing technologies (such as edge detection, contour extraction, template matching and the like), the shape, length, width, direction, position and the like of the scratches are included, the identified scratch characteristic information is integrated into a scratch detection list, and the scratch detection list can include detailed descriptions of the scratches, location markers, sizing, severity assessment, etc.
As shown in fig. 2, the specific configuration of the gray image processing module 40 further includes acquiring a multi-mode gray image, performing morphological processing on the multi-mode gray image to determine a primary processed image, traversing the primary processed image, performing binarization processing and optical magnification processing based on the detection constraint condition, and determining a preprocessed image.
Preferably, the original color image of each mode is converted into a corresponding gray level image, namely, color channels red (R), green (G) and blue (B) of the color image are extracted, the values of the three channels red, green and blue are added according to a certain weight to calculate gray level values, the most commonly used weights are 0.299 (R), 0.587 (G) and 0.114 (B), the multi-mode gray level image is obtained, morphological processing such as expansion, corrosion, open operation, closed operation and the like is carried out on the multi-mode gray level image, noise in the image, scratch characteristics are enhanced, scratches connected with the scratches are removed, the morphological processing result is used as a first-stage processing image, each pixel or region of the first-stage processing image is traversed, the first-stage processing image is subjected to self-adaptive binarization processing according to preset detection constraint conditions (such as the minimum width of the scratches, the maximum width of the scratches, the contrast threshold and the like), specifically, the image is converted into an image only containing black and white colors according to the set detection constraint conditions, the scratches are usually represented as white regions, the accuracy of the binarization processing is ensured, the noise or the non-scratch is recognized as the scratch, the scratch is further amplified on the basis, the amplification characteristics can be further recognized as the scratch, the amplification characteristics are further can be recognized on the basis of the scratch, and the scratch is still can be amplified, and the amplification characteristics are further, and the clear image can be obtained.
The specific configuration of the gray image processing module 40 further includes determining a structural element characteristic and a morphological processing scale based on a detection and identification requirement, setting an operation processing mode, wherein the operation processing mode is determined based on a combination of a closed operation and an open operation, and performing morphological processing on the multi-mode gray image based on the structural element characteristic, the morphological processing scale and the operation processing mode.
Preferably, the characteristic of the structural element and the morphological processing scale are determined based on detection and identification requirements, in general, the size and shape of the structural element can influence the effect of operation to a certain extent, for example, an appropriate structural element can be selected according to the characteristics of an image and the requirements of removing noise, meanwhile, in order to avoid conditions such as loss of image details or excessive smoothness in operation, excessive processing is preferably avoided in the processing process, so as to keep the definition and details of the image, the processing scale is limited, in particular, the structural element (also called a kernel or a mask) is the basis of morphological operation, the shape and size of the operation are defined, the shape of the structural element can be rectangular, circular, elliptical, cross-shaped and the like, and an appropriate structural element is selected to help to identify and extract scratches more accurately according to the shape and characteristics of an object to be processed (such as scratches), the morphological processing scale is generally related to the size of the structural element, the influence range of the morphological operation mode is determined, when processing a multi-gray-scale image is required, the appropriate morphological processing scale is selected according to the characteristics such as the width, the length and the contrast of the scratches, and the like, the larger contrast may be more suitable for the scratches or the scratch may be more suitable for the scratch or the scratch.
Preferably, according to the detection and recognition requirements, the closed operation and the open operation are combined to form a specific operation processing mode, namely, single operation, combined operation, sequential self-adaption and the like, noise processing is performed, for example, the closed operation can be performed firstly to connect scratches, then the open operation is performed secondly to remove noise, so as to help reduce interference factors in an image while maintaining the scratch characteristics, wherein the closed operation (first expansion and then corrosion) and the open operation (first expansion and then expansion) are two basic operations in morphological processing, the closed operation helps to connect broken scratches and fill small holes, the open operation helps to remove small noise and separate adhered objects, finally, morphological processing is performed on the multimode gray level image based on the determined structural element characteristics, morphological processing scale and operation processing mode, each pixel or region of the multimode gray level image is traversed, and corresponding operation is performed according to the structural element and the operation processing mode, and the processed image contains more clear and obvious scratch characteristics for subsequent scratch detection and recognition tasks.
The specific configuration of the gray image processing module 40 further includes performing a binarization process for the image background and the texture to determine a primary processing result, performing binarization for the natural texture and the non-natural texture based on the interference constraint condition to determine a secondary processing result, traversing the secondary processing result, and performing a level marking of the non-natural texture to determine a binarized image.
Preferably, the image background and the texture are subjected to a binarization process, that is, each pixel point in the image is converted into a pixel point only containing two possible values (usually 0 and 1 or black and white), the pixel point is usually set to white (or 1) based on a threshold value, the pixel value is set to black (or 0) below the threshold value, the background area and the texture area in the image are regarded as a whole, the natural texture and the non-natural texture are not distinguished, a primary processing result is obtained, that is, the image after the binarization process is obtained, each pixel point in the image is black and white, the binarization process of the natural texture and the non-natural texture is carried out by utilizing an interference constraint condition, specifically, the natural texture (such as the naturally formed texture of leaves, stones and the like) and the non-natural texture (such as the texture formed by buildings, artificial articles and the like) are further distinguished on the basis of the first binarization process, the secondary processing result is obtained, that is, the image after the binarization process of the natural texture and the non-natural texture is set to black and 0, the background area is not distinguished, the whole image after the binarization process is inspected, that is still subjected to the contrast is still or the non-natural texture is still classified into a complex form according to the two-level, for example, the contrast of the binary image can be further classified according to the two-level or the non-natural texture is obtained.
The specific configuration of the gray image processing module 40 further includes performing boundary segmentation on the binarized image based on the optical magnification condition to determine a segmented image, wherein the magnification mode includes geometric magnification and contrast enhancement, traversing the segmented image, and performing image optical magnification processing.
Preferably, the binary image is subjected to boundary segmentation according to the optical amplification condition, namely, the binary image is subjected to further processing, and the edge detection algorithm such as Roberts gradient operator method, sobel operator method and Canny edge detection method is utilized, so that points with significant change of gray values in the image can be identified, and accordingly boundaries or contours in the image are identified and extracted, the segmented image is determined, for example, an optimal threshold value is determined according to an inter-class variance between a foreground and a background, so that the segmented image is obtained, the segmented image generally comprises a plurality of subareas, each subarea corresponds to a pixel set with similar characteristics and represents different objects, backgrounds or texture characteristics in the image, the optical amplification mode generally comprises two modes of geometric form amplification and contrast enhancement, the geometric form amplification is to amplify the objects or the characteristics in the image by changing the size or shape of the image, the amplification mode possibly introduces some distortion or blurring effect, but can be corrected through an image processing algorithm, the contrast enhancement mode is to enhance the objects or the characteristics in the image by adjusting the contrast of the image, the amplification mode does not change the size of the image but the image can be more easily identified, the quality of the images is more easily enlarged, the image is more accurately processed, and the quality is better after the image is segmented, the image is more detail, the image is more clearly enlarged, and the image is more detail, and the quality is more clearly processed, and the image is more clearly has better quality is better than the quality can be obtained.
The specific configuration of the gray image processing module 40 further comprises the steps of introducing visual algorithm to complete the shape, setting a check checkpoint, and checking the scratch track of the scratch detection sheet based on the check checkpoint.
Preferably, visual algorithm means that visual information is simulated and analyzed by using mathematical and computational methods, which covers image processing, computer vision, pattern recognition and the like, in psychology and cognition science, the whole is emphasized to be larger than the sum of parts by the whole theory, namely, when people perceive objects or scenes, the whole theory tends to be regarded as a whole and meaningful rather than a single part, for example, in the manual detection process, the shape possibly presented by defects, namely, the finishing capability in psychology, can be predicted by intuition and experience, when the images are processed, not only single pixels or local features are focused, but also how to be combined into the whole objects or scenes are considered, namely, the verification after the verification of the output of a verification checkpoint is set according to specific requirements and targets of scratch detection, the verification checkpoint possibly comprises the verification of the length, the width, the direction, the position and other features of scratches, and the verification of the relation between the scratches and the background and other objects is helpful for more accurately recognizing and understanding information in the images, then, based on the verification of the verification checkpoint, whether the detection of the scratches and the single scratch track is detected by the verification of the scratch track is carried out, based on the verification of the relation between the scratch and the set and the background, whether the scratch detection accuracy is guaranteed to be in accordance with the expected or not, and whether the detection of the scratch detection accuracy is guaranteed to be improved.
And the homology induction marking module 50 is used for carrying out homology induction marking on the scratch detection list and visualizing the scratch detection list on a terminal display interface.
Further, the specific configuration of the homology induction marking module 50 further includes performing a first induction marking on the scratch detection sheet with homology of scratch type, and performing a second induction marking on the scratch detection sheet with homology of repair type.
Preferably, the method comprises the steps of carrying out homologous induction marking on the scratch detection list, namely inducing and classifying scratch data from the same source or under the same detection condition, and distributing corresponding labels for the scratch data, which is helpful for rapidly identifying and processing scratch data with similar characteristics, wherein the homologous induction marking mainly comprises the steps of inducing homology with scratch types, carrying out first induction marking on the scratch detection list, carrying out second induction marking on the scratch detection list in a repairing mode, specifically, classifying the scratch according to various factors such as appearance, formation reason, influence degree and the like of the scratch detection list, for example, in machine vision detection, the scratch can be classified into scratch with obvious gray level change (first type of scratch), scratch with insignificant gray level change (second type of scratch) and scratch with long-strip shape (third type of scratch), carrying out first induction marking on the scratch detection list according to the scratch types, which is helpful for rapidly identifying and classifying different types of scratch; the repair method of the scratch depends on factors such as the type, position, size and material of the scratch, for example, for a slight scratch on the surface of some materials, polishing or grinding may be only needed for repair, while for a deep scratch or a scratch affecting the material performance, a more complex repair method such as welding, spraying and the like may be needed, according to the repair method, the scratch detection list is subjected to second generalized marking, which means that the detection lists with the same or similar repair requirements are classified into one class and assigned with a specific mark, which is helpful for formulating a targeted repair scheme, and the repairing efficiency and effect are improved.
Preferably, the interface layout with reasonable design on the terminal display interface ensures that the information of the scratch detection list can be clearly and intuitively displayed on the terminal screen, including the display of key information such as images, positions, sizes, types, repair modes and the like of scratches, and the visual display is performed, wherein the visualization is to convert data into graphics or images by using computer graphics and image processing technology, display the graphics or images on the screen and perform interactive processing, and is used for displaying the scratch information in the scratch detection list, summarizing marking results, repair schemes and the like, and simultaneously provide rich interactive functions, so that a user can conveniently browse, inquire, edit and derive the information of the scratch detection list, for example, click or drag to check the detailed information of different scratches, or search the detection list with specific summarizing marks by using a screening function, and the scratch detection data can be more effectively managed and processed, thereby improving the accuracy and efficiency of scratch detection.
Although the present application makes various references to certain components in the apparatus according to the embodiments of the present application, any number of different components may be used and run on the user terminal and/or the server, and each unit and component included are only divided according to functional logic, but are not limited to the above-described division, so long as the corresponding functions can be implemented, and in addition, specific names of each functional unit are only for convenience of distinguishing from each other, and are not used to limit the scope of protection of the present application.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.