A method and system for detecting damage to a ceramic surface
By taking ceramic images under multiple light intensities, determining the light intensity range, and combining gradient calculation and grayscale value to identify the damaged area on the ceramic surface, the problem of inaccurate identification of ceramic surface damage in the existing technology is solved, and higher recognition accuracy is achieved.
Patent Information
- Application Number
- CN202210334717.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-03-31
AI Technical Summary
In the existing technology, existing software algorithms are difficult to accurately identify damage on the ceramic surface, which affects the accuracy of detection.
By acquiring a set of ceramic images taken under multiple light intensities, determining the light intensity range, performing image acquisition and gradient calculation, and combining the gradient value and grayscale value of the pixel point, the damaged area on the ceramic surface is identified.
The recognition accuracy of damaged areas on ceramic surfaces is improved, the influence of light on images is reduced, and damaged areas can be identified more accurately.
Smart Images

Figure CN117152041B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of ceramic detection and image processing, and particularly relates to a ceramic surface damage detection method and system. BACKGROUND
[0002] In the prior art, image processing technology is usually used to detect the surface damage of ceramics. However, due to the influence of various factors, the existing software algorithm is difficult to accurately identify the damage of the ceramic surface, which affects the accuracy of the ceramic surface damage detection.
[0003] Therefore, it is necessary to propose an effective ceramic surface damage detection method which can more accurately identify the damage area of the ceramic surface. SUMMARY
[0004] The present application aims to provide a ceramic surface damage detection method and system to solve one or more technical problems existing in the prior art, at least to provide a beneficial choice or create conditions.
[0005] In order to achieve the above-mentioned purpose, the present application provides the following technical solutions:
[0006] A ceramic surface damage detection method, the method comprising the following steps:
[0007] Step S100, obtaining a first image set of the ceramic taken under a plurality of illumination intensities, and determining an illumination intensity interval for image acquisition of the ceramic according to the first image set;
[0008] Step S200, image acquisition of the surface of the ceramic within the illumination intensity interval to obtain a surface image of the ceramic;
[0009] Step S300, gradient calculation of the surface image, and determination of a surface damage image based on the gradient value of each pixel point in the surface image;
[0010] Step S400, determination of the edge line of the surface damage image, and determination of the damage area of the ceramic surface based on the gray value of the pixel points on the edge line.
[0011] Further, the step S100 comprises:
[0012] Step S110, controlling the light source to gradually increase the illumination intensity, obtaining the images taken on the ceramic surface under a plurality of illumination intensities as the first image set;
[0013] The illumination intensity refers to the size of the luminous intensity light source through the luminous flux in a certain direction solid angle.
[0014] Step S120, calculating the gray standard deviation of each image in the first image set;
[0015] Step S130, selecting the first n images with the minimum gray scale standard deviation from the first image set as a second image set; wherein 10≤n≤50;
[0016] Step S140, calculating the white area proportion of each image in the second image set; wherein the white area proportion is the ratio of the pixel points with a continuous gray scale value of 0 to all pixel points in the image;
[0017] Step S150, selecting the first m images with the minimum white area proportion in the second image set as reference images, and determining the illumination intensity corresponding to the reference images as an illumination intensity interval; wherein 3≤m≤5.
[0018] Further, the step S200 comprises:
[0019] Step S210, controlling the rotation of the ceramic in the illumination intensity interval, and collecting images of the surface of the ceramic at a set frequency during the rotation of the ceramic to obtain a plurality of second images;
[0020] Step S220, converting each second image from an RGB space to an HSV space, identifying the pattern color of the surface of the ceramic in the HSV space, and obtaining a feature region of each second image; wherein the pattern color of the surface of the ceramic is pre-set;
[0021] Step S230, determining the common part of the feature regions in two adjacent second images, matching the common part of the feature regions in the two adjacent second images, and sequentially splicing the two adjacent second images to obtain a surface image of the ceramic.
[0022] Further, the step S300 comprises:
[0023] Step S310, calculating the gradient value of each pixel point of the surface image in its 8-neighborhood direction, and taking the maximum 3 values in the gradient values as the candidate gray scale values of the pixel point; the 3 candidate gray scale values of a pixel point correspond to 3 neighborhood directions respectively;
[0024] Step S320, determining the gradient difference value of each pixel point in the 3 neighborhood directions; the gradient difference value is the difference between the gradient values of two pixel points;
[0025] Step S330, selecting the pixel points with a gradient difference value greater than a predetermined threshold value as feature points;
[0026] Step S340, connecting the adjacent feature points along the 3 neighborhood directions of each feature point to obtain a surface damage region; wherein the surface damage region includes a surface damage edge;
[0027] Step S350, the pixel points of the surface damage edge are closed loop connected to obtain a surface damage image.
[0028] Further, the step S400 comprises:
[0029] Step S410, a reference pixel point is selected from the edge line of the surface damage image as a judgment point.
[0030] Step S420, the judgment point and its 8 adjacent neighborhood pixel points are compared in terms of gray value, if the gray value of the judgment point is greater than that of its neighborhood pixel points, step S430 is executed; otherwise, step S440 is executed.
[0031] Step S430, a pixel point adjacent to the judgment point in the edge line of the surface damage image is selected, and after the pixel point is set as a judgment point, step S420 is executed.
[0032] Step S440, a neighborhood pixel point with a gray value greater than that of the judgment point is determined as a to-be-determined pixel point from the neighborhood pixel points of the judgment point, and whether the to-be-determined pixel point is a pixel point in the edge line of the surface damage image is determined, if yes, step S430 is executed, if no, step S450 is executed.
[0033] Step S450, a neighborhood pixel point with the greatest gray value is selected from the neighborhood pixel points of the judgment point, and the neighborhood pixel point with the greatest gray value is included in the edge line of the surface damage image.
[0034] Step S460, whether the pixel points in the edge line of the surface damage image are all traversed is determined, if no, after the neighborhood pixel point with the greatest gray value is set as a judgment point, step S420 is executed, if yes, the process is ended to obtain a damage area of a ceramic surface.
[0035] A ceramic surface damage detection system, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the ceramic surface damage detection method of any one of the above.
[0036] A computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the ceramic surface damage detection method of any one of the above.
[0037] The beneficial effects of the present application are: the present application discloses a ceramic surface damage detection method and system, the present application determines the light intensity interval for image acquisition of the ceramic according to the first image set; image acquisition is performed on the surface of the ceramic in the light intensity interval, and the surface image of the ceramic is obtained; thus, good lighting conditions are selected, and the influence of light on the surface image of the ceramic is reduced; then, gradient calculation is performed on the surface image, and the surface damage image is determined based on the gradient values of each pixel point in the surface image; and the damage area of the ceramic surface is determined based on the gray values of the pixel points on the edge line of the surface damage image. The recognition accuracy of the damage area of the ceramic surface can be further improved. The present application can more accurately recognize the damage area of the ceramic surface by improving each link of ceramic recognition. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0039] Figure 1 It is a flowchart of the ceramic surface damage detection method in the embodiments of the present application;
[0040] Figure 2 It is a connection block diagram of the ceramic surface damage detection system in the embodiments of the present application. DETAILED DESCRIPTION
[0041] The concept, specific structure and generated technical effects of the present application will be described clearly and completely in the following embodiments and drawings, so as to fully understand the purposes, schemes and effects of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0042] REFERENCE Figure 1 As Figure 1 shown is a ceramic surface damage detection method provided by the embodiments of the present application, the method comprises the following steps:
[0043] Step S100, a first image set of the ceramic photographed under a plurality of light intensities is obtained, and a light intensity interval for image acquisition of the ceramic is determined according to the first image set;
[0044] Step S200, image acquisition is performed on the surface of the ceramic in the light intensity interval, and a surface image of the ceramic is obtained;
[0045] Step S300, gradient calculation is performed on the surface image, and a surface damage image is determined based on gradient values of each pixel point in the surface image;
[0046] Step S400, an edge line of the surface damage image is determined, and a damage area of the ceramic surface is determined based on gray values of pixel points on the edge line.
[0047] In this embodiment, first, a suitable light intensity is selected as a light intensity interval to reduce the influence of light on the image; then, gradient calculation is performed on the surface image of the collected ceramic, and a surface damage image is determined based on gradient values of each pixel point in the surface image; the ceramic surface damage area is preliminarily determined, and the damage area of the ceramic surface is further determined based on the gray values of the pixel points on the edge line, so that the obtained damage area of the ceramic surface is more accurate.
[0048] In a preferred embodiment, the step S100 comprises:
[0049] Step S110, the light source is controlled to gradually increase the light intensity, and images taken under multiple light intensities on the ceramic surface are obtained as a first image set;
[0050] The light intensity refers to the size of the luminous flux transmitted by the light source in a certain direction solid angle.
[0051] Step S120, the gray standard deviation of each image in the first image set is calculated;
[0052] Step S130, the first n images with the smallest gray standard deviation are selected from the first image set as a second image set; wherein 10≤n≤50;
[0053] Step S140, the white area proportion of each image in the second image set is calculated; wherein the white area proportion is the ratio of the pixel points with a continuous gray value of 0 in the image to all pixel points in the image;
[0054] Step S150, the first m images with the smallest white area proportion in the second image set are selected as the reference image, and the light intensity corresponding to the reference image is determined as the light intensity interval; wherein 3≤m≤5.
[0055] It should be noted that the outer wall of the ceramic is in the shape of a circular arc, so that the uniform light condition cannot be achieved during imaging. In an image, different parts of the outer wall of the ceramic present different brightness, which interferes with the recognition accuracy of the crack. Therefore, the present application determines the light intensity interval to reduce the interference of light. The pixel points with a continuous gray value of 0 in the image are determined as the white area, and the ratio of the white area to all pixel points in the image is determined; thereby, multiple images with the smallest white area proportion are screened out, and the reference image obtained is least affected by the light.
[0056] In one preferred embodiment, the step S200 comprises:
[0057] Step S210, controlling the rotation of the ceramic in the light intensity interval, and acquiring images of the surface of the ceramic at a set frequency during the rotation of the ceramic to obtain a plurality of second images;
[0058] Step S220, converting each of the second images from an RGB space to an HSV space, identifying the pattern color of the surface of the ceramic in the HSV space, and obtaining a feature region of each of the second images; wherein the pattern color of the surface of the ceramic is pre-set;
[0059] Step S230, determining a common part of the feature regions in two adjacent second images, and matching the common part of the feature regions in the two adjacent second images to sequentially splice the two adjacent second images to obtain a surface image of the ceramic.
[0060] It should be noted that since the pattern color of the surface of the ceramic is known in advance, the pattern color can be identified by pre-setting the pattern color, and the identified pattern region is taken as a feature region, so that the image splicing and integration can be performed.
[0061] In one preferred embodiment, the step S300 comprises:
[0062] Step S310, calculating gradient values of each pixel point of the surface image in 8-neighbor directions of the pixel point respectively, and taking the largest 3 values in the gradient values as candidate gray values of the pixel point; the 3 candidate gray values of one pixel point correspond to 3 neighbor directions respectively;
[0063] Step S320, determining gradient difference values of each pixel point in 3 neighbor directions, the gradient difference value being a difference between gradient values of two pixel points;
[0064] Step S330, selecting a pixel point with a gradient difference value greater than a predetermined threshold value as a feature point;
[0065] Step S340, connecting adjacent feature points along 3 neighbor directions of each feature point to obtain a surface damage region; wherein the surface damage region includes a surface damage edge;
[0066] Step S350, performing closed loop communication on the pixel points of the surface damage edge to obtain a surface damage image.
[0067] Specifically, the pixel points of the surface damage edge are processed by communication, dilation and the like to connect the non-closed loop surface damage edge into a closed loop surface damage edge, and the region formed by the closed loop edge is the surface damage image.
[0068] In an embodiment, edges are generated in the direction of tangent at two adjacent end points of the surface damage edge respectively until the edges grown from the two ends intersect, completing the connection of the surface damage edge at the location.
[0069] Due to local stress concentration of the ceramic, the ceramic cracks locally along the stress concentration direction to form irregular elongated cracks. The cracks are caused by stress concentration of the ceramic, and the stress direction is perpendicular to the tangential direction of the crack center line. The application fully utilizes the cracking characteristics of the ceramic cracks, and defines the damage area through the change of gradient value, thereby improving the recognition efficiency and accuracy of the ceramic damage.
[0070] In a preferred embodiment, the step S400 comprises:
[0071] Step S410, selecting a reference pixel point in the edge line of the surface damage image as a judgment point;
[0072] Step S420, comparing the gray value of the judgment point with that of its eight adjacent neighborhood pixel points. If the gray value of the judgment point is greater than that of its neighborhood pixel points, step S430 is executed; otherwise, step S440 is executed.
[0073] Step S430, selecting a pixel point adjacent to the judgment point in the edge line of the surface damage image, and setting the pixel point as a judgment point, and then executing step S420.
[0074] Step S440, determining a neighborhood pixel point with a gray value greater than that of the judgment point as a to-be-determined pixel point, and determining whether the to-be-determined pixel point is a pixel point in the edge line of the surface damage image. If yes, step S430 is executed; if no, step S450 is executed.
[0075] Step S450, selecting a neighborhood pixel point with the maximum gray value from the neighborhood pixel points of the judgment point, and including the neighborhood pixel point with the maximum gray value in the edge line of the surface damage image.
[0076] Step S460, determining whether all the pixel points in the edge line of the surface damage image have been traversed. If no, setting the neighborhood pixel point with the maximum gray value as a judgment point, and then executing step S420; if yes, ending and obtaining the damage area of the ceramic surface.
[0077] Corresponding to the method of Figure 1 , reference is made to Figure 2The embodiment of the present application also provides a ceramic surface damage detection system, which comprises a memory 11, a processor 12 and a computer program stored in the memory 11 and executable on the processor 12.
[0078] The processor 12 and the memory 11 can be connected through a bus or other means.
[0079] The non-transitory software program and instructions required for implementing the ceramic surface damage detection method of the above embodiment are stored in the memory 11, and when executed by the processor 12, the ceramic surface damage detection method in the above embodiment is executed.
[0080] The contents in the above method embodiment are applicable to the system embodiment, the system embodiment specifically implements the same functions as the above method embodiment, and achieves the same beneficial effects as the above method embodiment.
[0081] In addition, one embodiment of the present application also provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are executed by a processor or a controller, for example, a processor in the above electronic device embodiment, so that the above processor executes the ceramic surface damage detection method in the above embodiment.
[0082] Those skilled in the art can understand that all or some steps of the above method and the system can be implemented as software, firmware, hardware and appropriate combinations thereof. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on a computer readable medium, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, as known to those skilled in the art, communication media generally includes computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery medium.
[0083] The above describes the preferred embodiments of the present application, but the present application is not limited to the above-described embodiments, and those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the present application, and these equivalent modifications or replacements are all included in the scope defined by the claims of the present application.
Claims
1. A method for detecting ceramic surface damage, characterized in that: The method comprises the following steps: Step S100: Acquire a first image set of ceramics captured under multiple illumination intensities, and determine an illumination intensity interval for capturing images of the ceramics based on the first image set; Step S200: capturing an image of the surface of the ceramic within a light intensity range to obtain a surface image of the ceramic; Step S300: performing gradient calculation on the surface image, and determining a surface damage image based on the gradient value of each pixel in the surface image; Step S400: determining an edge line of the surface damage image, and determining a damaged area on the ceramic surface based on the grayscale values of pixels on the edge line; The step S100 includes: Step S110: controlling the light source to gradually increase the light intensity, and acquiring images of the ceramic surface captured under multiple light intensities as a first image set; Step S120, calculating the grayscale standard deviation of each image in the first image set; Step S130: Select the first n images with the smallest grayscale standard deviation from the first image set as the second image set; where 10≤n≤50; Step S140: Calculate the white area ratio of each image in the second image set; wherein the white area ratio is the ratio of pixels with consecutive grayscale values of 0 in the image to all pixels in the image; Step S150: taking the first m images in the second image set with the smallest proportion of white areas as reference images, and determining the illumination intensity corresponding to the reference images as the illumination intensity interval; wherein 3≤m≤5; The step S200 includes: Step S210, controlling the ceramic to rotate within a light intensity range, and capturing images of the ceramic surface at a set frequency during the ceramic rotation process to obtain multiple frames of second images; Step S220: convert each frame of the second image from the RGB space to the HSV space, identify the pattern color of the ceramic surface in the HSV space, and obtain a feature area of each frame of the second image; wherein the pattern color of the ceramic surface is preset; Step S230: determining a common portion of characteristic regions in two adjacent frames of the second image; matching the common portion of characteristic regions in the two adjacent frames of the second image, and sequentially splicing the two adjacent frames of the second image to obtain a surface image of the ceramic; The step S300 includes: Step S310: Calculate the gradient values of each pixel of the surface image in its eight neighborhood directions, and take the three largest values of the gradient values as candidate grayscale values of the pixel; the three candidate grayscale values of a pixel correspond to three neighborhood directions respectively; Step S320: Determine the gradient difference of each pixel in three neighborhood directions, where the gradient difference is the difference between the gradient values of two pixels; Step S330: Select pixels whose gradient difference is greater than a predetermined threshold as feature points; Step S340: Connect adjacent feature points in sequence along the three neighborhood directions of each feature point to obtain a surface damage region; wherein the surface damage region includes a surface damage edge; Step S350: Connect the pixels at the edge of the surface damage in a closed loop to obtain a surface damage image; The step S400 includes: Step S410: selecting a reference pixel point from the edge line of the surface damage image as a determination point; Step S420: Compare the grayscale values of the decision point with those of its eight neighboring pixels. If the grayscale value of the decision point is greater than the grayscale values of its neighboring pixels, proceed to step S430; otherwise, proceed to step S440. Step S430: Select a pixel point adjacent to the determination point in the edge line of the surface damage image, set the pixel point as the determination point, and then execute step S420; Step S440: Determine the neighboring pixel points of the decision point whose grayscale value is greater than the neighboring pixel points of the decision point as the pending pixel points; determine whether the pending pixel points are pixels on the edge line of the surface damage image; if so, execute step S430; if not, execute step S450; Step S450: Selecting a neighboring pixel point with the largest grayscale value from the neighboring pixel points of the determination point, and incorporating the neighboring pixel point with the largest grayscale value into the edge line of the surface damage image; Step S460, determine whether all pixel points in the edge line of the surface damage image have been traversed; if not, set the neighborhood pixel point with the largest grayscale value as the judgment point, and execute step S420; if so, end and obtain the damaged area on the ceramic surface.
2. A ceramic surface damage detection system, characterized in that: The system includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the ceramic surface damage detection method according to claim 1 is implemented.
3. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the ceramic surface damage detection method according to claim 1 are implemented.
Citation Information
Patent Citations
Defect detection method based on visual identification and system
CN106127779A