3D printing ceramic product surface smoothness detection method based on vision measurement
By projecting structured light stripes onto the surface of 3D printed ceramic products and performing multi-angle visual acquisition, three-dimensional point cloud data is generated. Combined with wavelet decomposition to extract texture features and calculate the smoothness index, the problem of difficulty in integrating three-dimensional geometric information and texture features in existing technologies is solved, and high-precision smoothness detection is achieved.
Patent Information
- Application Number
- CN202511623060.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-02-17
AI Technical Summary
Existing visual inspection-based methods for analyzing ceramic surface quality struggle to accurately integrate three-dimensional geometric information and texture features under conditions of high reflectivity and heterogeneous surfaces, affecting the accuracy of surface finish testing for 3D printed ceramic products.
By projecting structured light stripes onto the surface of 3D printed ceramics and performing multi-angle visual acquisition, multi-angle high-contrast images are generated. Depth imaging data is generated by using phase demodulation and geometric distortion correction. Three-dimensional point cloud data is generated by combining phase demodulation and geometric distortion correction. Multi-scale wavelet decomposition is performed to extract texture features and calculate the comprehensive smoothness index.
It enables the acquisition of high-precision spatial geometry and reflection information of complex curved surfaces under non-contact conditions, overcomes the measurement challenges of highly reflective or low diffuse reflective surfaces, and improves the accuracy of surface morphology restoration and feature fidelity.
Smart Images

Figure CN121544536A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of surface quality assessment technology, and in particular to a method for detecting the surface smoothness of 3D printed ceramic products based on visual measurement. Background Technology
[0002] With the continuous development of 3D printing technology, its application in the ceramic manufacturing field is constantly expanding, greatly enhancing the ability of ceramic products to achieve complex structures and precision molding. Due to their high hardness, high temperature resistance, and excellent chemical stability, 3D printed ceramics have attracted widespread attention in aerospace, high-temperature structural components, biomedical implants, and precision electronic components. Currently, the main fabrication processes for 3D printed ceramics include photopolymerization, selective laser sintering, and inkjet deposition modeling, enabling high-precision manufacturing from microstructures to integral components. During the printing process, factors such as photopolymerization layer control, particle distribution and rheological properties of the ceramic slurry, and sintering temperature field control all have a significant impact on the dimensional stability and surface finish of the final product.
[0003] Existing vision-based methods for ceramic surface quality analysis primarily rely on two-dimensional image feature recognition or single-point depth reconstruction. While these methods can identify local defects or roughness trends, they struggle to simultaneously consider three-dimensional geometric information and surface texture features, and lack globally consistent analysis methods for complex curved surfaces. Particularly in the evaluation of the smoothness of 3D-printed ceramic products, accurately fusing depth information and texture features under conditions of high reflectivity and heterogeneous surfaces remains a key issue affecting detection accuracy. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a visual measurement-based method for detecting the surface finish of 3D printed ceramic products, which solves the problem of insufficient fusion analysis of three-dimensional geometric information and texture features in the detection of complex surface finish.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a method for detecting the surface finish of 3D-printed ceramic products based on visual measurement, comprising: Structured light stripes are projected onto the surface of 3D printed ceramic products, and visual data is acquired from different perspectives to generate multi-angle high-contrast images. Phase demodulation and geometric distortion correction are performed on multi-angle high-contrast images to generate depth imaging data, and surface spatial coordinate points are calculated to generate three-dimensional point cloud data. The three-dimensional point cloud data is mapped onto the two-dimensional visual plane to form a two-dimensional image. Multi-scale wavelet decomposition is then performed to extract texture features. At the same time, roughness parameters are calculated using the three-dimensional point cloud data to generate a roughness parameter set. By utilizing the roughness parameter set and texture features, a comprehensive surface finish index is calculated and compared with the surface finish standard threshold to generate defect locations. Abnormal areas are marked by surface spatial coordinate points and feature analysis is performed to generate a visual inspection report.
[0007] As a preferred embodiment of the vision-based measurement method for detecting the surface finish of 3D printed ceramic products according to the present invention, the specific steps for generating multi-angle high-contrast images are as follows: The surface of 3D printed ceramic products is pre-scanned to estimate the reflectivity and curvature distribution, and a light projection scheme is formed. Based on the light projection scheme, structured light stripes are simultaneously projected from different viewpoints and visual acquisition is performed to generate a multi-angle image set; Phase demodulation and geometric distortion correction are performed on multi-angle image sets to generate multi-angle high-contrast images.
[0008] As a preferred embodiment of the vision-based measurement method for detecting the surface finish of 3D printed ceramic products according to the present invention, the specific steps for generating depth imaging data are as follows: Phase extraction and phase unfolding are performed on the grayscale distribution of structured light stripes in multi-angle high-contrast images. The phase value is calculated and a phase distribution map is generated by using sine curve fitting and phase difference inversion methods. Based on the projection relationship between viewpoints and the phase continuity of overlapping areas, the phase distribution map is offset and corrected to generate a global phase map; Geometric distortion correction is performed on the global phase map, and the depth value of each pixel is analyzed to generate depth imaging data.
[0009] As a preferred embodiment of the vision-based measurement method for detecting the surface finish of 3D printed ceramic products according to the present invention, the specific steps for generating three-dimensional point cloud data are as follows: Based on the depth value of each pixel in the depth imaging data, combined with the camera's projection relationship and intrinsic and extrinsic parameters, the three-dimensional position of each pixel is calculated to generate a preliminary set of surface space coordinate points. The initial set of surface spatial coordinate points is matched, coordinate deviations are corrected, surface spatial coordinate points are generated, and resampling and interpolation are performed to generate three-dimensional point cloud data.
[0010] As a preferred embodiment of the vision-based measurement method for detecting the surface finish of 3D printed ceramic products according to the present invention, the specific steps for forming a two-dimensional image are as follows: By utilizing the camera's projection relationship and intrinsic and extrinsic parameters, projection calculations are performed on the 3D point cloud data to generate preliminary 2D mapped coordinates; The initial two-dimensional mapped coordinates are optimized by perspective to eliminate perspective distortion error and generate an optimized two-dimensional mapped coordinate set. Based on the optimized two-dimensional mapping coordinate set, the three-dimensional point cloud data is mapped to the two-dimensional visual plane to form a two-dimensional image.
[0011] As a preferred embodiment of the vision-based measurement method for detecting the surface finish of 3D printed ceramic products according to the present invention, the specific steps for extracting texture features are as follows: Perform multi-scale analysis on two-dimensional images to generate decomposition scheme parameters; Using the decomposition scheme parameters, a multi-scale wavelet decomposition is performed on the two-dimensional image to obtain the multi-scale decomposition coefficient matrix; Texture changes are analyzed from the multi-scale decomposition coefficient matrix to extract texture features.
[0012] As a preferred embodiment of the vision-based measurement method for detecting the surface finish of 3D printed ceramic products according to the present invention, the specific steps for generating the roughness parameter set are as follows: Roughness analysis is performed on 3D point cloud data to generate preliminary roughness description data; Spatial scale decomposition is performed on the preliminary roughness description data to obtain roughness feature sets at different scales; Weighted fusion of roughness feature sets at different scales generates a roughness parameter set.
[0013] As a preferred embodiment of the visual measurement-based surface finish detection method for 3D printed ceramic products described in this invention, the surface finish standard threshold is obtained through statistical analysis and experimental calibration of historical test data, material performance indicators, and process requirements.
[0014] As a preferred embodiment of the vision-based measurement method for detecting the surface finish of 3D printed ceramic products according to the present invention, the specific steps for generating defect locations are as follows: The roughness parameter set and texture features are weighted and fused to generate preliminary comprehensive surface finish data; Based on the surface finish standard threshold, the preliminary comprehensive surface finish data is compared and analyzed to generate comparison result data; Based on the surface spatial coordinates, the defect location is determined by comparing the result data, identifying the location of abnormal areas, and generating defect location data.
[0015] As a preferred embodiment of the vision-based measurement method for detecting the surface finish of 3D printed ceramic products according to the present invention, the specific steps for generating the visual inspection report are as follows: Based on the defect location data and surface spatial coordinates, anomaly areas are marked on a two-dimensional image to generate an anomaly area annotation map. A comprehensive analysis of geometric, textural, and roughness features is performed on the anomaly region annotation map to generate an anomaly region feature dataset; Based on the abnormal area feature dataset, combined with historical detection data and surface finish standard thresholds, a multi-index fusion judgment method is adopted to calculate the surface finish level and generate the surface finish judgment result. The surface finish assessment results, anomaly region annotation maps, and anomaly region feature datasets are integrated to generate a visual inspection report.
[0016] The beneficial effects of this invention are as follows: by projecting structured light onto the surface of 3D printed ceramic products and acquiring multi-view visual data, combined with phase demodulation and geometric distortion correction, high-contrast images from multiple angles are acquired and high-precision three-dimensional point cloud data is generated; spatial geometry and reflection information of complex curved surfaces are acquired under non-contact conditions, achieving higher spatial consistency and data continuity; through multi-view structured light superposition and phase fusion, the measurement difficulties of highly reflective or low diffuse reflection surfaces are effectively overcome, improving the accuracy of surface morphology restoration and feature fidelity. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of a vision-based measurement method for detecting the surface finish of 3D printed ceramic products.
[0019] Figure 2 A flowchart for generating high-contrast images from multiple angles.
[0020] Figure 3 A flowchart for generating 3D point cloud data.
[0021] Figure 4 A flowchart for generating a surface finish test report. Detailed Implementation
[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0025] Reference Figures 1-4 As one embodiment of the present invention, this embodiment provides a method for detecting the surface finish of 3D printed ceramic products based on visual measurement, including the following steps: S1. Project structured light stripes onto the surface of 3D printed ceramic products and collect visual data from different perspectives to generate multi-angle high-contrast images.
[0026] S1.1. Pre-scan the surface of the 3D printed ceramic product to estimate the reflectivity and curvature distribution, and form a light projection scheme.
[0027] Specifically, structured light stripes with a known phase distribution are projected onto the surface of a ceramic product using a structured light projection sensor. A visual acquisition sensor is used to acquire reflected light intensity image data from different areas. The acquired image data is processed using grayscale normalization and brightness compensation methods to generate a reflected light intensity distribution map. Based on the grayscale values of each pixel in the reflected light intensity distribution map, reflectivity distribution data for the corresponding area is obtained using reflectivity calculation methods. Simultaneously, phase extraction and curvature estimation methods are used to calculate the curvature value of the local surface based on the phase change information of the structured light stripes and the projection geometry, generating curvature distribution data. A spatial correspondence mapping method is used to fuse the reflectivity distribution data and curvature distribution data to form a reflectivity-curvature joint distribution matrix. Based on the reflectivity-curvature joint distribution matrix, an illumination planning method is used to determine the illumination direction, projection angle, and light intensity parameters, generating a light projection scheme.
[0028] S1.2. Based on the light projection scheme, structured light stripes are simultaneously projected from different angles and visual acquisition is performed to generate a multi-angle image set.
[0029] Specifically, based on the illumination direction, projection angle, and light intensity parameters determined in the light projection scheme, the position and projection parameters of the structured light projection sensor are adjusted; a synchronous triggering method is used to control the structured light projection sensor and the visual acquisition sensor, simultaneously initiating projection and acquisition from multiple viewpoints; at each viewpoint, structured light stripes with a known phase distribution are projected through the structured light projection sensor, and the reflected light intensity image is acquired using the visual acquisition sensor to generate a single-view image; a phase demodulation method and a geometric correction method are used to perform preliminary processing on the single-view image of each viewpoint to eliminate geometric distortion caused by changes in viewpoint, resulting in a high-contrast single-view image; the high-contrast single-view images from all viewpoints are summarized according to viewpoint identifiers to form a multi-angle image set.
[0030] For example, a three-step phase shift method is used to demodulate the grayscale changes of a single-view image and calculate the initial phase value corresponding to each pixel. Then, a geometric correction method is used to correct the distortion of the image, such as correcting perspective distortion and radial distortion based on the camera calibration parameter matrix, so that the spatial coordinates of the single-view image correspond to the actual physical coordinates, thus completing the preliminary processing.
[0031] S1.3 Perform phase demodulation and geometric distortion correction on the multi-angle image set to generate multi-angle high-contrast images.
[0032] Specifically, image data from each viewpoint in the multi-angle image set is read sequentially; a phase extraction method is used to extract the phase from the grayscale distribution of structured light fringes in each viewpoint image to obtain phase values; a phase unfolding method is used to process the phase values into a continuous shape to generate a phase distribution map; a phase difference inversion method is used to perform pixel-by-pixel difference operations on the phase distribution map to calculate the phase change at the same spatial position between adjacent viewpoints and record the coordinate information corresponding to the phase change to obtain phase offset data between viewpoints; based on the projection relationship between viewpoints and the phase continuity of overlapping areas, an offset correction method is used to correct the phase distribution to obtain a global phase map; a geometric correction method is used to perform a geometric transformation on the global phase map based on the camera's intrinsic and extrinsic parameters to eliminate perspective distortion and aberration, generating high-contrast images for each viewpoint; and the high-contrast images from all viewpoints are combined in viewpoint order to form a multi-angle high-contrast image.
[0033] It should also be noted that the phase unfolding method is a processing method that maintains the phase value in space by detecting phase abrupt changes between adjacent pixels and performing cumulative correction; the offset correction method is a method that eliminates errors by calculating the average phase of the reference area and offsetting the overall phase data.
[0034] S2. Perform phase demodulation and geometric distortion correction on multi-angle high-contrast images to generate depth imaging data, and calculate surface spatial coordinate points to generate three-dimensional point cloud data.
[0035] S2.1. Perform phase extraction and phase unfolding on the grayscale distribution of structured light stripes in multi-angle high-contrast images. Use sine curve fitting and phase difference inversion methods to calculate phase values and generate phase distribution maps.
[0036] Specifically, the grayscale values of each pixel in a multi-angle high-contrast image set are read sequentially to form grayscale distribution data. Using a phase extraction method, the grayscale distribution data is processed by Fourier transform or a three-step / four-step phase shift method to obtain initial phase values. A phase expansion method is used to eliminate phase jumps in the initial phase values, resulting in a continuous phase map. The phase values in the continuous phase map are then fitted with a sine curve to calculate the phase difference, expressed as: ; in, Indicates pixel position phase difference, Indicates pixel position At continuous phase values, Indicates pixel position Reference phase value at that location, This represents the horizontal pixel coordinates in a multi-angle high-contrast image. Represents the vertical pixel coordinates in a multi-angle high-contrast image; The precise phase value is calculated by combining the phase difference inversion method with the pixel position coordinates to form the phase distribution data of each viewpoint; the phase distribution data of all viewpoints, including the precise phase value of each pixel position, the corresponding spatial coordinate information and viewpoint identification information, are integrated to generate a phase distribution map.
[0037] S2.2. Based on the projection relationship between viewpoints and the phase continuity of overlapping areas, the phase distribution map is offset and corrected to generate a global phase map.
[0038] Specifically, in the phase distribution map of each viewpoint, a feature point detection and matching method (such as SIFT) is used to identify the pixel correspondence in the overlapping area and output the pixel pairs in the overlapping area. Using the pixel pairs in the overlapping area and the projection relationship between the viewpoints, the geometric transformation parameters between the viewpoints are calculated using the fundamental matrix estimation method to obtain the geometric transformation matrix between the viewpoints. The geometric transformation matrix between the viewpoints is applied to the phase distribution map of each viewpoint for pixel-level registration, and the registered phase distribution map is used as the input for offset estimation. The pixel-level phase difference is calculated in the registered overlapping area, and phase difference inversion combined with RANSAC is used to remove outliers to estimate the phase offset or phase offset field of each viewpoint. Phase offset compensation is applied to the phase distribution map of each viewpoint, and the corrected phase values are fused in the overlapping area according to the pixel position using a gradient-based consistency fusion method to generate a global phase map.
[0039] For example, for phase distribution data acquired from multiple perspectives, the relative pose transformation parameters between each perspective are calculated using the fundamental matrix estimation method. Then, the phase distribution data corresponding to each perspective are spatially registered and weighted fused in overlapping regions according to the coordinate mapping relationship. For example, the phase values in the overlapping regions are averaged or weighted averaged to output continuous phase information covering the entire ceramic surface, generating a global phase map.
[0040] It should also be noted that the interview projection relationship refers to the mapping relationship between the image coordinates of different cameras or shooting angles and the spatial coordinates of the surface of the measured ceramic product in multi-view structured light measurement. The interview projection relationship is usually described by the extrinsic parameter matrix (including rotation matrix and translation vector) to realize the correspondence between image pixels of multiple views to the same three-dimensional spatial position. The phase continuity of the overlapping area means that when there is a common visible range in the imaging areas of adjacent views, the phase value in the common area should remain continuously changing in space and should not have abrupt changes or discontinuities. By utilizing the phase continuity characteristic of the overlapping area, the phase alignment process can be constrained in the overlapping area to ensure that the multi-view phase map forms a globally consistent continuous phase distribution when stitching and fusing. The fundamental matrix estimation method is a calculation method for relative pose transformation by matching feature point pairs from different viewpoints and calculating the geometric constraint relationship between viewpoints.
[0041] S2.3 Perform geometric distortion correction on the global phase map, analyze the depth value of each pixel, and generate depth imaging data.
[0042] Specifically, the pixel phase values and pixel coordinates of the global phase map are read. Based on the camera's intrinsic and extrinsic parameters and camera distortion coefficients, the Brown-Conrady distortion correction method is used to reverse-map the pixel coordinates and calculate the distortion-free pixel coordinates to obtain the corrected phase map. Based on the structured light projection parameters and the phase-depth mapping relationship, the phase-to-distance inversion method is used to convert the corrected phase values into pixel depth values, forming a preliminary depth matrix. Bilinear interpolation is used to perform sub-pixel depth compensation on the preliminary depth matrix to obtain the interpolated depth matrix. Median filtering is used to denoise and preserve edges on the interpolated depth matrix to obtain the filtered depth matrix. Based on the camera's projection relationship and intrinsic and extrinsic parameters, the filtered depth matrix is mapped according to pixel coordinates to generate depth imaging data.
[0043] It should also be noted that the camera intrinsic parameters include focal length, principal point coordinates, and pixel scaling factor, which are used to describe the geometric mapping relationship between the image plane and the imaging coordinate system; the camera extrinsic parameters include rotation matrix and translation vector, which are used to describe the spatial position and orientation relationship between the camera coordinate system and the world coordinate system; the camera distortion coefficient is used to correct the radial and tangential distortion generated during lens imaging. Radial distortion is usually caused by lens curvature, resulting in a distortion of the ratio between the image center and the edges, while tangential distortion originates from the image offset caused by the non-parallelism between the lens and the imaging plane; by jointly calibrating the camera intrinsic and extrinsic parameters and the camera distortion coefficient, a precise projection mapping from world coordinates to pixel coordinates can be achieved; The phase-depth mapping relationship refers to the calculation of the actual height or depth information of an object's surface based on the mathematical correspondence between the phase value and the depth of the object's surface, using the amount of phase change.
[0044] S2.4. Based on the depth value of each pixel in the depth imaging data, combined with the camera's projection relationship and intrinsic and extrinsic parameters, calculate the three-dimensional position of each pixel and generate a preliminary set of surface space coordinate points.
[0045] Specifically, the position of each pixel in the multi-angle high-contrast image is read as pixel coordinates. The focal length, principal point coordinates, and pixel scaling factor in the camera's intrinsic parameters are read, and the pixel coordinates are normalized. The normalized coordinates are then proportionally calculated along the depth direction using the depth value to obtain the three-dimensional coordinates in the camera coordinate system, such as along the camera's optical axis. The rotation matrix and translation vector in the camera's extrinsic parameters are read, and the three-dimensional coordinates are spatially transformed to convert them from the camera coordinate system to the world coordinate system. The world coordinates corresponding to all pixels are then summarized and numbered to generate a preliminary set of surface space coordinate points.
[0046] S2.5 Match the initial set of surface spatial coordinate points, correct coordinate deviations, generate surface spatial coordinate points, and perform resampling and interpolation processing to generate three-dimensional point cloud data.
[0047] Specifically, a nearest neighbor search structure is constructed for the initial surface spatial coordinate point set and the search is performed to obtain candidate corresponding point pairs. A random sampling consistency method is used to select robust matches from the candidate corresponding point pairs. Based on the selected corresponding point pairs, the rotation and translation relationship is calculated, and the rotation and translation are applied to the corresponding initial surface spatial coordinate point set to correct the coordinate deviation and generate surface spatial coordinate points. The surface spatial coordinate points are uniformly resampled according to the preset spatial sampling interval, and the missing coordinate points are filled in using the bilinear interpolation method to generate three-dimensional point cloud data.
[0048] It should also be noted that the specific steps for setting the spatial sampling interval include: determining the target range of the sampling interval based on the detection accuracy requirements and the surface size of the 3D printed ceramic product, for example, setting it to between 0.1 mm and 1 mm; calculating the sampling interval value using a uniform sampling method based on the depth imaging data and the spatial distribution characteristics of the preliminary surface spatial coordinate point set; and recording the sampling interval value as a sampling parameter for use in resampling processing to ensure that the sampling interval remains consistent throughout the entire surface spatial coordinate range. The process of constructing the nearest neighbor search structure includes: organizing the three-dimensional coordinates of the initial surface spatial coordinate point set according to their spatial positional relationships; using a spatial partitioning algorithm, such as a kd-tree structure, recursively dividing the coordinate points into multiple levels of nodes according to their three-dimensional x, y, and z coordinate values, with each node storing the corresponding coordinate point index and boundary range; and establishing an index table in the constructed kd-tree for subsequent fast nearest neighbor search to improve the matching efficiency of corresponding point pairs.
[0049] It should be noted that by using structured light projection and multi-view synchronous acquisition, along with phase demodulation and distortion correction, multi-angle fusion three-dimensional reconstruction was achieved. This enables accurate acquisition of the spatial geometry and reflection information of complex curved surfaces on ceramic surfaces under non-contact conditions, effectively overcoming the measurement challenges of highly reflective or low diffuse reflective surfaces, improving the accuracy of surface morphology restoration and the fidelity of three-dimensional spatial features, and providing a high-precision geometric basis for subsequent surface finish analysis.
[0050] S3. Map the 3D point cloud data onto the 2D visual plane to form a 2D image, and perform multi-scale wavelet decomposition to extract texture features. At the same time, use the 3D point cloud data to calculate roughness parameters and generate a roughness parameter set.
[0051] S3.1. Using the camera's projection relationship and intrinsic and extrinsic parameters, perform projection calculations on the 3D point cloud data to generate preliminary 2D mapped coordinates.
[0052] Specifically, the process involves reading the camera's projection relationship and the focal length, principal point coordinates, and pixel scaling factor from the camera's intrinsic parameters; converting each surface spatial coordinate point in the 3D point cloud data into 3D coordinates in the camera coordinate system; calculating the 3D coordinates in the camera coordinate system into 2D pixel coordinates using perspective projection based on the camera's projection relationship; performing spatial transformations on the 2D pixel coordinates using the rotation matrix and translation vector from the camera's extrinsic parameters to obtain 2D mapped coordinates corresponding to different viewpoints; and summarizing all the 2D mapped coordinates to form a preliminary 2D mapped coordinate set.
[0053] It should also be noted that the rotation matrix is an orthogonal matrix used to describe the rotation relationship between three-dimensional coordinate systems. The rotation matrix can be used to transform three-dimensional coordinates in one coordinate system to another coordinate system according to a specified rotation angle and direction. The translation vector is a vector used to describe the translation relationship between coordinate systems. The translation vector can be used to move the rotated three-dimensional coordinates to the position in the target coordinate system along a specified direction. The rotation matrix and the translation vector together constitute the camera extrinsic parameters, which are used to convert the three-dimensional coordinates in the camera coordinate system to the three-dimensional coordinates in the world coordinate system, ensuring the accurate correspondence between spatial position and direction.
[0054] S3.2 Optimize the initial two-dimensional mapping coordinates from the perspective to eliminate perspective distortion error and generate an optimized two-dimensional mapping coordinate set.
[0055] Specifically, the process involves reading the camera's projection relationship and the rotation matrix and translation vector from the camera's extrinsic parameters; based on the geometric relationship between viewpoints, a stereo vision correction method is used to match the initial two-dimensional mapping coordinates, register feature points in overlapping areas, and obtain viewpoint deviation data; based on the viewpoint deviation data, bilinear interpolation is used to transform and adjust the initial two-dimensional mapping coordinates; the adjusted two-dimensional mapping coordinates are then verified for consistency, and abnormal coordinate points with excessive deviations are removed; finally, all corrected two-dimensional mapping coordinates are summarized to form an optimized two-dimensional mapping coordinate set.
[0056] It should also be noted that the geometric relationship between viewpoints refers to the relative position and orientation relationship of the imaging coordinate systems of different shooting viewpoints in three-dimensional space. By describing the rotation matrix and translation vector between cameras, the attitude changes and baseline distance of each viewpoint in space are reflected, thereby determining the geometric correspondence between the projected positions of the same object point under different viewpoints.
[0057] S3.3. Based on the optimized two-dimensional mapping coordinate set, the three-dimensional point cloud data is mapped to the two-dimensional visual plane to form a two-dimensional image.
[0058] Specifically, based on the optimized two-dimensional mapping coordinate set, the three-dimensional position of each surface spatial coordinate point in the three-dimensional point cloud data is matched with the corresponding two-dimensional mapping coordinate; according to the mapping relationship in the optimized two-dimensional mapping coordinate set, the corresponding three-dimensional point coordinates are projected onto the pixel position on the two-dimensional visual plane according to the pixel arrangement order; for missing pixels in the mapping, cubic interpolation is used to supplement the pixel value to generate a two-dimensional image.
[0059] S3.4 Perform multi-scale analysis on the two-dimensional image to generate decomposition scheme parameters.
[0060] Specifically, the wavelet transform method is used to decompose the two-dimensional image, with Haar wavelet as the analysis basis and a preset number of decomposition layers, for example, three layers. Based on the number of decomposition layers, low-frequency and high-frequency components are extracted from the two-dimensional image layer by layer to obtain sub-band coefficient matrices at different scales. At each decomposition layer, the energy distribution and frequency characteristics of the wavelet coefficients are calculated to form feature parameters for each scale. Based on the energy distribution and frequency characteristics of the sub-bands at each scale, a decomposition scheme parameter containing the number of decomposition layers, wavelet type, sub-band coefficient matrix, and feature parameters is generated.
[0061] It should also be noted that the specific steps for preset decomposition layers are as follows: determine the resolution and detail feature requirements of the two-dimensional image, and read the pixel size information of the image; select an appropriate range of decomposition layers based on the decomposition capability and analysis requirements of wavelet transform, such as selecting 2 to 4 layers; use existing wavelet decomposition criteria, such as energy preservation criteria or resolution requirements, to calculate the sub-band resolution and information retention ratio under different decomposition layers; compare the calculation results, select the decomposition layer number that meets the accuracy requirements and the computational load is acceptable, and form the preset decomposition layer value, such as setting it to three layers, as the parameter input for subsequent decomposition processing.
[0062] S3.5. Using the decomposition scheme parameters, perform multi-scale wavelet decomposition on the two-dimensional image to obtain the multi-scale decomposition coefficient matrix.
[0063] Specifically, the decomposition layer number and wavelet basis function type (e.g., Haar wavelet) are read from the decomposition scheme parameters. Based on the decomposition layer number, the decomposition direction and subband structure of each layer are determined. Discrete wavelet transforms are performed on the two-dimensional image in the horizontal and vertical directions to extract low-frequency and high-frequency components, generating the low-frequency coefficient matrix and high-frequency coefficient matrix of the first layer. The low-frequency coefficient matrix of the first layer is used as input, and multi-layer wavelet transforms are repeated until the preset decomposition layer number is reached. The coefficients of the low-frequency subband and high-frequency subband are recorded in each layer, and finally, the multi-scale decomposition coefficient matrix is obtained.
[0064] S3.6 Analyze texture changes from the multi-scale decomposition coefficient matrix and extract texture features.
[0065] Specifically, the coefficients of the low-frequency and high-frequency subbands of each decomposition layer in the multi-scale decomposition coefficient matrix are read; in each decomposition layer, based on the local energy and frequency distribution of the wavelet coefficients, texture feature parameters such as the gray-level co-occurrence matrix, energy matrix, contrast matrix, correlation matrix, and entropy matrix are calculated; the texture feature parameters of each decomposition layer are normalized; combined with the decomposition level information, the texture features of each layer are weighted and fused according to preset weights to generate a multi-scale texture feature vector; all weighted and fused texture feature vectors are summarized to form a texture feature set.
[0066] It should also be noted that the specific steps for setting the weights are as follows: determine the number of layers in the multi-scale wavelet decomposition; based on existing reference data, determine the relative importance of each decomposition layer in texture feature extraction, for example, high-frequency layers are more sensitive to detail changes and low-frequency layers are more sensitive to overall structure; assign initial weight values to each decomposition layer to ensure that the sum of the weights of all decomposition layers equals 1, for example, set the weight of the first layer to 0.5, the weight of the second layer to 0.3, and the weight of the third layer to 0.2; verify and adjust the initial weight values, conduct weighted tests using known sample data, and correct the weights using a normalization method to generate preset weights for use in the weighted fusion of multi-scale texture features; among them, existing reference data refers to the values and patterns in historical measurement data, experimental results, or publicly available datasets, which serve as the basis for determining parameters, weights, or judgment criteria. For example, using the energy distribution data of different layers in existing multi-scale wavelet decomposition experimental results, the relative importance of each decomposition layer in texture feature extraction is determined, thereby providing a basis for setting the parameters of the decomposition scheme.
[0067] S3.7 Perform roughness analysis on the 3D point cloud data to generate preliminary roughness description data.
[0068] Specifically, the three-dimensional position coordinates of each surface spatial coordinate point in the three-dimensional point cloud data are read, and the contour parameter method is used to calculate the height difference, curvature difference or surface normal vector change of each surface spatial coordinate point in the local neighborhood to form local roughness values. The local roughness values are summarized in the sampling order to generate preliminary roughness description data, such as a set of values including average roughness and root mean square roughness.
[0069] Among them, the profile parameter method is a method for quantifying the micro-undulation characteristics of a surface by extracting the height variation data of the surface profile curve and calculating statistical parameters such as average roughness, maximum height difference and profile waviness.
[0070] S3.8. Perform spatial scale decomposition on the preliminary roughness description data to obtain roughness feature sets at different scales.
[0071] Specifically, wavelet transform is used to determine the number of decomposition scales for the initial roughness description data, for example, decomposing it into three layers. Based on the number of decomposition scales, high-frequency and low-frequency components are extracted from the initial roughness description data layer by layer to form roughness feature subsets at different scales. In each scale layer, the local roughness energy distribution is calculated using wavelet coefficients, the corresponding roughness feature values are extracted, and these are summarized to form roughness feature sets at different scales, such as numerical sets containing low-scale roughness features and high-scale roughness features.
[0072] S3.9. Weighted fusion of roughness feature sets at different scales to generate a roughness parameter set.
[0073] Specifically, the fusion weights are determined based on existing data. For example, by analyzing the contribution rates of low-scale and high-scale roughness features in historical data, the example weight of low-scale roughness features is determined to be 0.4, and the example weight of high-scale roughness features is determined to be 0.6. The roughness features of different scales are weighted and combined according to the determined fusion weights to obtain the fused roughness feature values. All fused roughness feature values are collected to generate a roughness parameter set, and the fusion results are normalized, for example, the roughness parameter values are normalized to the range of 0 to 1 to form a roughness parameter set that can be used for subsequent processing.
[0074] S4. Calculate the comprehensive surface finish index using the roughness parameter set and texture features, compare it with the surface finish standard threshold, generate defect locations, mark abnormal areas using surface spatial coordinate points and perform feature analysis, and generate a visual inspection report.
[0075] S4.1 The surface finish standard threshold is obtained through statistical analysis and experimental calibration of historical test data, material performance indicators and process requirements.
[0076] Specifically, historical testing data for different material surfaces is collected, including parameters such as surface roughness measurements, light reflectivity, and surface texture direction distribution. Based on material performance indicators such as hardness, ductility, and surface treatment process requirements, the historical testing data is categorized and organized. Linear regression analysis is used to calculate the correlation between historical testing data and surface finish levels, generating statistical analysis results, including correlation coefficients, goodness of fit, and significance test results. Through experimental calibration, under controlled sample surface processing conditions, processing parameters are gradually adjusted, and corresponding surface finish values are measured. Critical change points under different conditions are recorded, generating experimental calibration results, including surface finish values under different processing conditions and corresponding critical change points. Combining the statistical analysis results and experimental calibration results, the numerical range of the surface finish standard threshold is determined. For example, the surface finish threshold is set between 0.01 μm and 0.2 μm, and the reflectivity threshold is set between 70% and 95%, forming the surface finish standard threshold.
[0077] It should also be noted that the reflectivity threshold range refers to the range of reflectivity values set according to the surface characteristics of the material in the surface finish test, which is used to determine whether the surface finish meets the standard. The reflectivity threshold range is usually obtained through historical test data analysis and experimental calibration. For example, it is set to 70% to 95%, which means that when the measured surface reflectivity is within the range, the surface finish can be considered to meet the requirements. Otherwise, the processing parameters or process need to be adjusted to improve the surface quality. By controlling the surface processing conditions of the samples, such as parameters including laser sintering temperature, layer thickness, scanning speed, photocuring exposure time, sintering atmosphere pressure and cooling rate, comparative measurements of different surface states can be achieved by adjusting the above conditions one by one.
[0078] S4.2. Weighted fusion of roughness parameter set and texture features to generate preliminary comprehensive surface finish data.
[0079] Specifically, the roughness indices in the roughness parameter set are normalized. For example, the range of values for parameters such as arithmetic mean roughness, root mean square roughness, and maximum height are unified to a certain value. The same normalization process is applied to the features such as orientation consistency, energy distribution, and gray-level variance contained in the texture features; the fusion weights are determined based on existing reference data and experimental calibration results, for example, the roughness parameter set weight is set to 0.6 and the texture feature weight is set to 0.4; the fused results are smoothed to eliminate local noise interference; the fusion results corresponding to all pixel positions are integrated to generate preliminary comprehensive smoothness data.
[0080] S4.3. Based on the surface finish standard threshold, perform comparative analysis on the preliminary comprehensive surface finish data to generate comparison result data.
[0081] Specifically, all surface finish values in the preliminary comprehensive surface finish data are read; based on the range of surface finish standard thresholds, the surface finish standard thresholds are divided into several level intervals, for example, the threshold range for surface finish level 1 is 0.8 to 1.0, the threshold range for surface finish level 2 is 0.6 to 0.8, and the threshold range for surface finish level 3 is 0.4 to 0.6; each surface finish value is compared with the threshold range of each level interval to determine its level; each surface finish value is labeled with a corresponding level identifier; the surface finish level identifiers are integrated to generate comparison result data.
[0082] S4.4. Based on the surface spatial coordinates, compare the result data to locate defects, identify the location of abnormal areas, and generate defect location data.
[0083] Specifically, the surface finish level identifiers corresponding to each detection point in the comparison result data are read; each detection point's surface finish level identifier is mapped one-to-one with its surface spatial coordinates to form a correspondence matrix between surface finish level and spatial coordinates; detection points with surface finish levels lower than a preset surface finish defect threshold, such as those with a surface finish level less than 0.6, are selected from the correspondence matrix; the spatial coordinates of the detection points with surface finish levels lower than the preset surface finish defect threshold are calculated to determine their location distribution range in the two-dimensional image, and adjacent coordinate points are aggregated using a region clustering method to form continuous abnormal regions; the center coordinates, boundary coordinates, and area information of each abnormal region are recorded to generate defect location data.
[0084] It should also be noted that the specific steps for setting the surface finish defect threshold include: collecting test data of samples with different surface finish grades, and statistically analyzing the average surface finish parameter value and standard deviation of each grade of samples; determining the boundary point between the normal area and the defect area based on the distribution range of the surface finish parameters; conducting experimental calibration in conjunction with material performance indicators and process requirements to verify the rationality of the boundary point; and after the verification results meet the requirements, setting the surface finish parameter value corresponding to the boundary point as the preset surface finish defect threshold, for example, a surface finish parameter value of 0.6 as the critical boundary.
[0085] It should also be noted that material performance indicators and process requirements refer to key parameters used to evaluate the molding quality of ceramic products, including the material's hardness, density, ductility, heat resistance, as well as process control conditions such as sintering temperature, layer thickness, photocuring time, and surface polishing process.
[0086] S4.5. Based on the defect location data and surface spatial coordinates, mark the abnormal areas on the two-dimensional image and generate an abnormal area annotation map.
[0087] Specifically, based on the surface spatial coordinates of each defect in the defect location data, the three-dimensional coordinates are converted into two-dimensional pixel coordinates according to the camera's projection relationship and intrinsic and extrinsic parameters. Pixel aggregation is performed on all converted two-dimensional pixel coordinates, merging pixels with a preset pixel distance as the same initial pixel defect point (e.g., a distance of five pixels). A morphological dilation method is used to expand the neighborhood of the initial pixel defect point set (e.g., a dilation radius of three pixels) to generate a binary anomaly mask. Connectivity analysis is performed on the binary anomaly mask to extract the boundary points, center coordinates, and pixel areas of each connected region. A polygon approximation method is used to approximate the polygon boundaries of each connected region and superimpose the approximate boundaries onto the original two-dimensional image with pixel-level coordinates to form an anomaly region annotation map.
[0088] S4.6 Perform a comprehensive analysis of the geometric features, texture features, and roughness features of the anomaly region annotation map to generate an anomaly region feature dataset.
[0089] Specifically, based on the boundary of each abnormal region in the anomaly region annotation map, a corresponding pixel sub-image is extracted from the 2D image. The pixel coordinates are then mapped to the 3D point cloud data index according to the camera's projection relationship and intrinsic / extrinsic parameters, extracting the corresponding 3D point cloud data subset. Geometric features are calculated for the pixel sub-image, including pixel area, perimeter, convex hull area, aspect ratio, shape compactness, and second-order invariant moments. Texture features, such as contrast, correlation, energy, and homogeneity, are calculated for the pixel sub-image using the gray-level co-occurrence matrix method. Texture parameters can be supplemented by statistically analyzing the energy of each sub-band based on multi-scale wavelet decomposition. Roughness features, such as arithmetic mean roughness, root mean square roughness, maximum height, and normal vector variance, are calculated for the 3D point cloud data subset using local height difference statistics, curvature estimation methods, and normal vector statistics. Geometric features, texture features, and roughness features are normalized and merged into anomaly region feature vectors according to a preset format. Simultaneously, region identifiers, center coordinates, and boundary point indices are recorded. All anomaly region feature vectors are then summarized to generate an anomaly region feature dataset.
[0090] It should also be noted that the preset format refers to the storage and organization specifications of the abnormal region feature dataset that are determined in advance, including the order of data items, data types, units and identification rules, to ensure consistency and parsability; Curvature estimation methods quantify the degree of curvature of a local shape by calculating the rate of change of the tangent or normal at various points on a surface or curve.
[0091] S4.7 Based on the abnormal area feature dataset, combined with historical detection data and surface finish standard thresholds, a multi-index fusion judgment method is used to calculate the surface finish level and generate the surface finish judgment result.
[0092] Specifically, historical detection data and surface roughness standard thresholds are obtained. The historical detection data is classified according to feature type and normalized. For each feature vector in the abnormal region feature dataset, it is compared with the corresponding feature in the historical detection data to calculate the matching degree index. For example, similarity calculation or distance measurement methods are used to obtain the judgment score of each feature. Based on the preset surface roughness standard threshold, the judgment scores of each feature are weighted and fused according to the weight ratio to form a comprehensive judgment score. For example, the weight ratio is 0.4 for geometric features, 0.3 for texture features, and 0.3 for roughness features. The comprehensive judgment score is compared with the preset surface roughness level classification standard. For example, level 1 is a comprehensive judgment score greater than 0.8, level 2 is 0.6 to 0.8, level 3 is 0.4 to 0.6, and level 4 is less than 0.4 to generate a surface roughness judgment result.
[0093] It should also be noted that historical testing data refers to various characteristic information and test results about the tested object collected and saved in previous testing processes, including geometric feature data, texture feature data, roughness feature data, and surface finish judgment results, etc., which are used for subsequent analysis and comparison. They usually include time stamps, testing conditions, feature values, and judgment levels, so as to provide reference and standard comparison for current testing.
[0094] S4.8 Integrate the surface finish judgment results, abnormal area annotation map, and abnormal area feature dataset to generate a visual inspection report.
[0095] Specifically, based on the surface finish assessment results, the anomaly area annotation map, and the anomaly area feature dataset, the surface finish assessment result values, the anomaly area annotation image file, and the anomaly area feature dataset are read sequentially. The surface finish assessment results are recorded in text form, and the corresponding areas are marked on a two-dimensional plane in conjunction with the anomaly area annotation map. The anomaly area feature data are listed in tabular form and integrated according to the preset report format to generate a visual inspection report containing text descriptions, image annotations, and feature data, such as a PDF file or a visual interface, for easy viewing and archiving later.
[0096] It should also be noted that the preset report format refers to the structure and content specifications of the visual testing report determined in advance based on the testing requirements, including the report layout, data presentation method, text description format, image annotation style, and table arrangement rules.
[0097] It should be noted that by combining multi-scale wavelet decomposition with roughness fusion analysis, the surface micro-undulations, texture directionality, and overall smoothness can be more comprehensively reflected, achieving objective quantification and automatic judgment of surface finish. Finally, a test report with visual display is generated, greatly improving the accuracy and interpretability of the test.
[0098] In summary, this invention achieves high-contrast image acquisition from multiple angles and generates high-precision 3D point cloud data by: projecting structured light onto the surface of 3D printed ceramic products and acquiring multi-view visual data, combined with phase demodulation and geometric distortion correction; acquiring spatial geometry and reflection information of complex curved surfaces under non-contact conditions, achieving higher spatial consistency and data continuity; and effectively overcoming the measurement challenges of highly reflective or low diffuse reflective surfaces through multi-view structured light superposition and phase fusion, thereby improving the accuracy of surface morphology restoration and feature fidelity.
[0099] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for detecting the surface finish of a 3D printed ceramic article based on visual measurement, characterized in that: The application relates to a 3D printing ceramic product surface defect detection method and device. A structured light stripe is projected on the surface of a 3D printing ceramic product, and multi-angle high-contrast images are generated through visual collection at different angles; Phase demodulation and geometric distortion correction are performed on the multi-angle high-contrast images to generate depth imaging data, and surface spatial coordinate points are calculated to generate three-dimensional point cloud data; The three-dimensional point cloud data is mapped to a two-dimensional visual plane to form a two-dimensional image, and multi-scale wavelet decomposition is performed to extract texture features; meanwhile, roughness parameters are calculated from the three-dimensional point cloud data to generate a roughness parameter set; The roughness parameter set and the texture features are used to calculate a comprehensive finish index, which is compared with a finish standard threshold to generate a defect position; the surface spatial coordinate points are used to mark an abnormal area and perform feature analysis to generate a visual detection report.
2. The method for detecting the surface finish of a 3D printed ceramic article based on visual measurement according to claim 1, characterized in that: The multi-angle high-contrast images are generated through the following steps, The surface of a 3D printing ceramic product is pre-scanned to estimate reflectivity and curvature distribution, and a light projection scheme is formed; According to the light projection scheme, a structured light stripe is synchronously projected at different angles and visual collection is performed to generate a multi-angle image set; Phase demodulation and geometric distortion correction are performed on the multi-angle image set to generate multi-angle high-contrast images.
3. The method for detecting the surface finish of a 3D printed ceramic article based on visual measurement according to claim 1, characterized in that: The depth imaging data are generated through the following steps, Phase extraction and phase unwrapping are performed on the structured light stripe gray scale distribution in the multi-angle high-contrast images, a phase value is calculated through a sinusoidal curve fitting and phase difference inversion method, and a phase distribution map is generated; According to the projection relationship between the angles and the phase continuity of the overlapping areas, the phase distribution map is offset corrected to generate a global phase map; Geometric distortion correction is performed on the global phase map to analyze the depth value of each pixel point and generate depth imaging data.
4. The method for detecting the surface finish of a 3D printed ceramic article based on visual measurement according to claim 1, characterized in that: The three-dimensional point cloud data are generated through the following steps, According to the depth value of each pixel point in the depth imaging data, the three-dimensional position of each pixel is calculated by combining the projection relationship and internal and external parameters of the camera to generate a preliminary surface spatial coordinate point set; The preliminary surface spatial coordinate point set is matched to correct the coordinate deviation, surface spatial coordinate points are generated, and resampling and interpolation processing are performed to generate three-dimensional point cloud data.
5. The method for detecting the surface finish of 3D printed ceramic articles based on visual measurement according to claim 1, characterized in that: The two-dimensional image is formed through the following steps, The three-dimensional point cloud data are projected and calculated by using the projection relationship and internal and external parameters of the camera to generate preliminary two-dimensional mapping coordinates; The preliminary two-dimensional mapping coordinates are optimized in terms of angles to eliminate angle deformation errors, and an optimized two-dimensional mapping coordinate set is generated; The three-dimensional point cloud data are mapped to a two-dimensional visual plane according to the optimized two-dimensional mapping coordinate set to form a two-dimensional image.
6. The method for detecting the surface finish of 3D printed ceramic articles based on visual measurement according to claim 1, characterized in that: The texture features are extracted through the following steps, Multi-scale analysis is performed on the two-dimensional image to generate decomposition scheme parameters; The two-dimensional image is subjected to multi-scale wavelet decomposition by using the decomposition scheme parameters to obtain a multi-scale decomposition coefficient matrix; Texture changes are analyzed from the multi-scale decomposition coefficient matrix to extract texture features.
7. The method for detecting the surface finish of 3D printed ceramic articles based on visual measurement according to claim 1, characterized in that: The roughness parameter set is generated through the following steps, Roughness analysis is performed on the three-dimensional point cloud data to generate preliminary roughness description data; The preliminary roughness description data are subjected to spatial scale decomposition to obtain roughness feature sets of different scales; The roughness feature sets of different scales are subjected to weighted fusion to generate a roughness parameter set.
8. The method for detecting the surface finish of 3D printed ceramic articles based on visual measurement according to claim 1, characterized in that: The surface roughness standard threshold is obtained by statistical analysis and experimental calibration of historical detection data, material performance indexes and process requirements.
9. The method for detecting the surface finish of 3D printed ceramic articles based on visual measurement according to claim 1, characterized in that: The specific steps of generating the defect position are as follows, The roughness parameter set and the texture feature are weighted and fused to generate preliminary comprehensive surface roughness data; The preliminary comprehensive surface roughness data is compared and analyzed according to the surface roughness standard threshold to generate comparison result data; According to the surface space coordinate points, the comparison result data is positioned, the abnormal area position is identified, and the defect position data is generated.
10. The method for detecting the surface finish of 3D printed ceramic articles based on visual measurement according to claim 1, characterized in that: The specific steps of generating the visual detection report are as follows, According to the defect position data and the surface space coordinate points, the abnormal area is labeled on a two-dimensional image to generate an abnormal area labeling diagram; The abnormal area labeling diagram is comprehensively analyzed in terms of geometric features, texture features and roughness features to generate abnormal area feature data set; According to the abnormal area feature data set, combined with historical detection data and surface roughness standard threshold, a multi-index fusion judgment method is adopted to calculate the surface roughness grade and generate a surface roughness judgment result; The surface roughness judgment result, the abnormal area labeling diagram and the abnormal area feature data set are integrated to generate a visual detection report.