Method and system for detecting surface topography defects of a card based on a relief effect

By combining dual-frequency structured light and variational level set algorithm, the problem of 3D morphology acquisition and segmentation in relief defect detection was solved, achieving high-precision relief defect detection and batch stability monitoring, thus improving detection efficiency and accuracy.

CN122156165APending Publication Date: 2026-06-05GUANGDONG WANGJING CARD TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG WANGJING CARD TECH CO LTD
Filing Date
2026-03-10
Publication Date
2026-06-05

Smart Images

  • Figure CN122156165A_ABST
    Figure CN122156165A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image detection, and discloses a card surface topography defect detection method and system based on a relief effect, which comprises the following steps: double-frequency structured light adaptive projection of a laminated card, relief three-dimensional height map reconstruction based on phase deflection, automatic segmentation of a relief area based on a variational level set, analysis of relief profile curvature continuity and defect detection, and relief depth statistical process control. The present application eliminates mirror reflection interference of a laminated layer through a double-frequency phase shift algorithm, and the measurement accuracy of the relief depth reaches ±5 microns, and the detection accuracy reaches 99.5%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image detection technology, and in particular to a method and system for detecting surface morphology defects on cards based on embossed effects. Background Technology

[0002] Embossing is a key process in high-end card manufacturing to achieve a three-dimensional visual effect. It involves applying pressure to the card substrate using a raised or recessed mold, creating a three-dimensional embossed pattern with specific contours and depth on the card surface. The embossing process utilizes the curvature and deflection of curves to highlight specific contours, giving the card a layered, three-dimensional feel. In high-end collectible cards, financial cards, and security documents, the integrity and precision of the embossing directly affect the product's appearance, anti-counterfeiting performance, and market value. However, in actual production, due to the combined effects of mold wear, pressure fluctuations, uneven substrate thickness, and drift in lamination process parameters, embossing often suffers from defects such as insufficient depth, blurred edges, incomplete contours, and localized collapse, severely impacting the appearance quality and market value of the card products. Especially during large-scale continuous production, the gradual wear of the mold causes a slow, systematic shift in the embossing depth. This shift is difficult to detect visually in the short term and often only becomes apparent after it has accumulated to a certain extent, by which time a large number of defective products have already been produced.

[0003] Existing card quality inspection methods primarily rely on planar imaging technology, using industrial cameras to capture two-dimensional images of the card surface and employing image processing algorithms to detect planar defects such as color differences, stains, and printing defects. Some improved solutions introduce multi-angle illumination or dark-field imaging technology, attempting to indirectly perceive surface unevenness through changes in light and shadow. However, these methods can only qualitatively determine the presence or absence of embossing, failing to quantitatively measure the three-dimensional height variations and unevenness distribution of the embossing, resulting in a persistently high rate of missed detection for embossing defects. Furthermore, existing inspection systems typically lack specialized processing methods for laminated cards; the specular reflection of the lamination layer severely interferes with optical imaging quality, further reducing the reliability of embossing defect detection. In terms of batch quality control, existing inspection systems mostly employ an isolated inspection mode, judging each card individually, lacking the ability to statistically monitor the batch stability of embossing depth, and failing to achieve early warning and closed-loop adjustment of process deviations.

[0004] Structured light 3D measurement technology, as a non-contact precision surface topography acquisition method, has been widely used in industrial inspection. However, its application to the quality inspection of coated embossed cards still faces many challenges. The high specular reflection characteristics of the coating layer cause severe loss of modulation information of the projected stripes in the reflection area. The single-frequency stripe projection scheme has an inherent contradiction between measurement range and accuracy. Furthermore, existing structured light inspection systems lack segmentation algorithms and defect evaluation indicators adapted to the characteristics of embossed patterns.

[0005] Chinese patent CN111951386A discloses a method and system for modeling high-relief portraits. This method uses a 3D portrait model as input and achieves geometric modeling of the high-relief portrait by extracting background points, enhancing normal details and linear compression, and optimizing the height field of the energy equation to ensure close integration between the relief model and the background surface. The technical solution in this prior art focuses on the digital modeling process of relief, optimizing the height field of the 3D model through the energy equation of gradient and depth constraints to ensure a close fit between the relief model and the background surface. However, this solution has the following shortcomings: First, this method is a virtual modeling technique for reliefs, not for the morphological detection of physical reliefs, and cannot obtain the three-dimensional morphological data of the actual card surface relief; second, this method lacks structured light projection and phase measurement mechanisms, and therefore lacks the ability to extract three-dimensional height information from the physical surface; third, this method does not involve the automatic identification and classification of relief defects, and cannot be applied to online quality inspection scenarios on production lines; fourth, this method does not consider the unique specular reflection problem of laminated cards and the statistical process control requirements for relief depth between batches.

[0006] Therefore, there is an urgent need for a method and system for detecting surface morphology defects on cards that can acquire three-dimensional morphological information of reliefs, accurately segment relief areas, quantitatively evaluate the quality of relief outlines, and achieve batch process control. Summary of the Invention

[0007] To address the technical problems of existing planar imaging methods being unable to effectively acquire three-dimensional morphological information of reliefs and having a high rate of missed detection of relief defects, this invention provides a method and system for detecting surface morphological defects on cards based on relief effects.

[0008] In a first aspect, the present invention provides a method for detecting surface morphology defects on cards based on embossed effects, comprising the following steps: a dual-frequency structured light adaptive projection step for coated cards, wherein sinusoidal fringe structured light with a first frequency and a second frequency is projected onto the surface of the card to be inspected, and a low-frequency fringe image sequence and a high-frequency fringe image sequence are acquired respectively through a dual-frequency phase-shift acquisition strategy, and the intensity of the projected light is adaptively adjusted according to the specular reflection intensity of the card coating layer to suppress the interference of the specular reflection of the coating layer on the fringe modulation, thereby obtaining a dual-frequency modulated fringe image with the specular reflection component eliminated; a three-dimensional height map reconstruction step for embossed effects based on phase deflection, wherein the dual-frequency modulated fringe images are subjected to multi-step phase-shift demodulation, the low-frequency wrapping phase and the high-frequency wrapping phase are extracted, and the low-frequency phase is used to assist the high-frequency phase in performing time phase unfolding to obtain the continuous absolute phase distribution on the card surface, and the method is converted into a three-dimensional height map of the embossed region based on the phase-height mapping relationship; and a variational level set-based reconstruction step. The automatic segmentation step for the relief area uses a 3D height map as input to construct a variational level set energy functional that integrates height gradient information and regional grayscale statistical features. Through iterative evolution of the level set function, the zero level set curve is driven to converge towards the boundary of the relief pattern, automatically segmenting the precise boundary of the relief imprinted area from a complex background. The relief contour curvature continuity analysis and defect detection step extracts the boundary curve of the relief contour within the relief imprinted area and calculates a discrete curvature sequence. A curvature continuity evaluation index is established to quantify the sharpness and smoothness of the relief edge. Simultaneously, the measured 3D morphology of the relief is registered and compared with the design standard template, and defects are identified based on the height deviation distribution and curvature anomalies. The relief depth statistical process control step establishes a statistical process control model for the relief depth data of continuous batch inspections. When the batch depth statistics exceed the control limit, a process deviation warning signal is generated and fed back to the projection step to adjust the projection parameters.

[0009] Secondly, this invention provides a card surface morphology defect detection system based on embossed effects, comprising: a dual-frequency structured light adaptive projection module, an embossed 3D height map reconstruction module, a variational level set embossed segmentation module, a curvature analysis and defect detection module, and a depth statistics process control module. Each module corresponds one-to-one with the steps of the above method, collaboratively completing the entire detection process from structured light projection, 3D morphology reconstruction, embossed region segmentation, defect identification to batch process control. Specifically, the dual-frequency structured light adaptive projection module and the embossed 3D height map reconstruction module are data-coupled via dual-frequency stripe images; the embossed 3D height map reconstruction module and the variational level set embossed segmentation module are data-coupled via 3D height maps; the variational level set embossed segmentation module and the curvature analysis and defect detection module are data-coupled via embossed region segmentation boundaries; the curvature analysis and defect detection module and the depth statistics process control module are data-coupled via depth measurement data; and the depth statistics process control module and the dual-frequency structured light adaptive projection module form a closed-loop control coupling via early warning feedback signals. The deep coupling and collaboration of the above five modules makes the overall detection effect of the system far exceed the sum of the effects of each module operating independently.

[0010] The beneficial effects of this invention include: effectively eliminating specular reflection interference from the coating layer through a dual-frequency phase-shift algorithm, achieving an embossing depth measurement accuracy of ±5μm; accurately extracting the embossed pattern boundary from a complex background through a variational level set algorithm, achieving pixel-level segmentation accuracy; quantifying the embossed contour quality through a curvature continuity evaluation index, achieving an embossed contour integrity detection accuracy of 99.5%; and real-time monitoring of batch stability of embossed imprinting depth through a statistical process control module, supporting embossing detection with a depth of 0.5mm or more, and a detection speed of 150 sheets / min. Attached Figure Description

[0011] Figure 1 This is a flowchart of a card surface morphology defect detection method based on embossed effect provided in an embodiment of the present invention.

[0012] Figure 2 This is an architecture diagram of a card surface morphology defect detection system based on embossed effect provided in an embodiment of the present invention. Detailed Implementation

[0013] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0014] It should be noted that the terms "first" and "second" used in the embodiments of the present invention are only used for distinguishing descriptions and do not indicate a specific order or sequential relationship.

[0015] This embodiment provides a method for detecting surface morphology defects on cards based on embossed effects, such as... Figure 1 As shown, this method combines structured light 3D measurement with digital image processing technology to automate the detection of surface morphology defects on high-end cards with embossed printing. In this embodiment, the object to be inspected is an embossed card with a coated surface, measuring 85.6mm × 54mm, and the designed embossing depth of the embossed area ranges from 0.5mm to 2.0mm. The method includes the following steps:

[0016] Step S1: Adaptive projection of dual-frequency structured light onto the coated card. The purpose of this step is to project an optimized dual-frequency sinusoidal fringe structured light onto the surface of the card to be inspected, and to eliminate the adverse effects of specular reflection from the coating layer on subsequent phase measurements through an adaptive light intensity modulation strategy. In a specific implementation scenario, the hardware platform of the inspection system includes one DLP digital micromirror projector, two industrial area array cameras, and one card transmission and positioning device. The baseline distance between the projector and the camera is set to 120mm, the measurement working distance is 350mm, and the corresponding measurement field of view covers the entire card surface. The projector resolution is 1920×1080 pixels, and the projection light source is a blue LED with a center wavelength of 460nm. Blue light source is chosen because its scattering characteristics on the coated card surface are superior to red and green light sources, which helps to improve the fringe modulation.

[0017] Regarding the parameter design of the dual-frequency stripes, this invention determines two projection frequencies based on the geometric dimensions of the relief pattern to be inspected. Preferably, the first frequency is a low-frequency stripe, with its spatial period set to 2 to 4 times the maximum size of the relief pattern. In this embodiment, the maximum size of the relief pattern is approximately 30 mm, therefore the spatial period of the low-frequency stripe is set to 80 mm, corresponding to approximately 160 pixels on the projector image plane. The second frequency is a high-frequency stripe, with its spatial period set to 3 to 8 times the minimum feature size of the relief pattern. In this embodiment, the minimum feature size of the relief is approximately 0.8 mm, therefore the spatial period of the high-frequency stripe is set to 4 mm, corresponding to approximately 8 pixels on the projector image plane. The low-frequency stripe provides an unambiguous coarse phase reference, while the high-frequency stripe provides high-resolution fine phase information. Both work together to achieve high-precision three-dimensional measurement over a large range. It is worth noting that the ratio between the two frequencies... Choosing a ratio of 20 ensures that the low-frequency fringes contain only one or two complete cycles across the entire field of view, thus avoiding phase unfolding ambiguity, while also providing sufficient spatial resolution for the high-frequency fringes to capture the subtle features of the relief. If the ratio is too small, the high-frequency phase resolution will be insufficient; if the ratio is too large, the low-frequency phase accuracy required for high-frequency phase unfolding will be too high, easily introducing unfolding errors.

[0018] Regarding the dual-frequency phase-shift acquisition strategy, each frequency is acquired using a 4-step equal-step phase shift method. Specifically, for the low-frequency fringes of the first frequency, phase shifts of 0, 0, 0, and 0 are projected sequentially. , , Four sinusoidal fringe patterns were captured by the camera, and a low-frequency fringe image sequence was obtained simultaneously. Similarly, for the high-frequency stripes of the second frequency, the phase shift is successively projected as 0, , , Four sinusoidal stripe patterns were simultaneously captured by the camera to obtain a high-frequency stripe image sequence. The entire dual-frequency phase-shift acquisition process requires the projection of 8 stripe patterns. With a projector refresh rate of 120Hz, the stripe acquisition time for a single card is approximately 67ms.

[0019] In one embodiment of this invention, an adaptive light intensity modulation strategy is designed to address the specular reflection problem unique to laminated cards. The core idea of ​​this strategy is that specular reflection from the lamination layer can cause localized overexposure areas in the striped image, leading to a sharp decrease in stripe modulation intensity, even approaching zero, thus causing complete phase demodulation failure in that area. To solve this problem, a pre-scan is performed before the actual image acquisition: a striped pattern is projected with medium light intensity (projector grayscale value set to 128). After acquiring the pre-scanned image, the stripe modulation intensity at each pixel position is calculated. The formula for calculating the stripe tone intensity is:

[0020] ,

[0021] in: pixel coordinates The fringe tone at the location has a value range of 0 to 1 and is dimensionless; This is the maximum grayscale value of the pixel in the stripe bright striate area, in grayscale levels (0-255). This is the minimum grayscale value of the pixel in the stripe / dark striate region, expressed in gray levels. When the modulation index... The closer the value is to 1, the higher the fringe contrast and the better the phase measurement accuracy; when... Value below preset threshold When the threshold value is set, it indicates that the area is severely affected by specular reflection. In this embodiment, the modulation threshold will be used. The value was set to 0.15. This value was determined through statistical analysis of 100 laminated card samples and can effectively distinguish between specular reflection areas and normal diffuse reflection areas.

[0022] For high-reflectivity areas with a modulation index below the threshold, the system reduces the projected light intensity to 30% to 60% of the initial light intensity; in this embodiment, it is specifically reduced to 40% of the initial light intensity, meaning the projector's grayscale value is reduced from 128 to 51. After reducing the light intensity, the fringe image of this area is re-acquired. At this point, the intensity of the specular reflection component is significantly reduced, and the fringe modulation index is significantly improved. Subsequently, the fringe image acquired under low light intensity in the high-reflectivity area is fused with the fringe image acquired under standard light intensity in the normal diffuse reflection area. During fusion, the image grayscale value of the high-reflectivity area is linearly compensated according to the light intensity reduction ratio, ultimately obtaining a uniformly modulated dual-frequency fringe image across the entire surface. After this adaptive light intensity modulation processing, the fringe modulation index of each area on the surface of the coated card can be improved to above 0.3, meeting the accuracy requirements of subsequent phase demodulation.

[0023] Step S2: Reconstruction of the 3D height map of the relief based on phase deflection. The purpose of this step is to demodulate the continuous absolute phase distribution of the relief region from the dual-frequency modulated stripe image obtained in step S1 and convert it into a 3D height map. The dual-frequency modulated stripe image output in step S1 is the direct input to step S2, forming a tight data coupling relationship between the two steps.

[0024] First, a four-step phase-shift demodulation process is performed on both the low-frequency and high-frequency fringe image sequences. In one embodiment of the invention, a least-squares fitting method is used to extract the wrapping phase at each pixel position from the four phase-shifted fringe images. For the low-frequency fringe sequence... , pixels Low-frequency wrap phase Calculated using the following formula:

[0025] ,

[0026] in: pixel coordinates The low-frequency wrapping phase at that location has a value range of 100. The unit is rad; For the first Frame low-frequency stripe image in pixels grayscale value at that location The unit is gray level; numerator term The imaginary component corresponding to sinusoidal modulation, the denominator term This corresponds to the real component of the sinusoidal modulation. Similarly, for a high-frequency fringe sequence, the high-frequency wrapping phase can be obtained. Due to the range limitation of the arctangent function, the demodulated wrapped phase contains... The periodic jumps require the use of a phase expansion algorithm to recover the continuous phase.

[0027] Preferably, this invention employs a time-phase unfolding strategy, utilizing low-frequency phase to assist high-frequency phase unfolding. The basic principle of time-phase unfolding is that the phase change of low-frequency fringes across the entire field of view does not exceed [a certain value]. It may contain only a few periods, thus unambiguous low-frequency continuous phase can be achieved through spatial expansion or direct discrimination. Subsequently, the integer order of the high-frequency phase was determined by utilizing the frequency ratio between the low-frequency continuous phase and the high-frequency wrapped phase. :

[0028] ,

[0029] in: For high-frequency phase in pixels The order of expansion at is a non-negative integer and dimensionless; The spatial frequency of the high-frequency stripe is expressed in units of 1 / mm. In this embodiment... 1 / mm; The spatial frequency of the low-frequency stripes is expressed in units of 1 / mm. In this embodiment... 1 / mm; This is a rounding function. This invention requires that the difference in expansion order does not exceed 1, that is, the difference between adjacent pixels... The value variation does not exceed one integer to ensure the continuity and accuracy of phase expansion. When this condition is not met, the system will perform local re-acquisition or interpolation correction for that region. High-frequency continuous phase. Obtained from the following formula:

[0030] ,

[0031] in: The high-frequency continuous absolute phase after unfolding is expressed in rad; this phase value reflects the height variation information of each point on the card surface relative to the reference plane.

[0032] After obtaining the continuous absolute phase distribution, the phase information needs to be converted into three-dimensional height information. This invention performs the conversion based on the mapping relationship between phase and height, which is pre-established through system calibration. In the cross-optical path structure, there is a certain baseline distance between the projector and the camera. The projection angle of the projector and the shooting angle of the camera together determine the phase-to-height conversion coefficient. This embodiment employs a calibration method based on polynomial fitting. By measuring the phase of a set of standard steps with known heights, a third-order polynomial mapping relationship between phase and height is established:

[0033] ,

[0034] in: For pixels The corresponding surface height value, in μm; The coefficients of the polynomial obtained from calibration are , where This is the reference offset, in μm. This is the first-order phase-height sensitivity coefficient, in μm / rad. These are second-order correction coefficients, with units of μm / rad². This is a third-order correction factor, with units of μm / rad³. Higher-order correction terms are introduced to compensate for systematic errors such as lens distortion and projection angle nonlinearity. In this embodiment, the coefficient value obtained through calibration is... μm, μm / rad, μm / rad², μm / rad³. After calibration, the system has a height resolution better than 5μm and a measurement repeatability better than 3μm, which can meet the accurate measurement requirements of relief depth in the range of 0.5mm to 2.0mm.

[0035] In one embodiment of the present invention, the reconstructed 3D height map is further preprocessed with denoising and flatness correction. Denoising employs median filtering with a 5×5 pixel filter window to eliminate random noise introduced during phase demodulation. Flatness correction is achieved by performing least-squares plane fitting on the non-embossed area (background plane) of the card, and then subtracting the fitted plane from the entire height map, thereby eliminating systematic biases caused by card warping and installation tilt. Preferably, during plane fitting, the present invention automatically excludes data points from embossed areas, using only the height data of the background plane area for fitting. Specifically, a preliminary threshold screening is performed on the height map, marking pixels with height values ​​exceeding the average background height plus 30 μm as potential embossed areas and excluding them from the fitting dataset. After this preprocessing, the standard deviation of the height residual of the background plane can be controlled within 2 μm, ensuring the baseline accuracy for subsequent embossed depth measurements. Furthermore, in this embodiment, spatial interpolation is performed to repair the areas in the height map where phase demodulation failure is caused by specular reflection residue. A bilinear interpolation method with effective pixels as anchor points is used to fill the missing areas. When the area of ​​the missing area exceeds 5% of the total area of ​​the relief region, it is marked as a reconstruction failure and a re-acquisition is triggered. The preprocessed 3D height map will be used as input data for relief region segmentation in step S3.

[0036] Step S3: Automatic Relief Region Segmentation Based on Variational Level Sets. The purpose of this step is to accurately extract the boundary of the relief embossed area from the 3D height map output in Step S2, automatically segmenting the relief pattern from the card background. The surface structure of a relief card typically includes a raised relief area, a flat background area, and a transition area between the two. The shape of the relief pattern is often complex and varied, with gradual transitions between it and the background. Traditional threshold segmentation methods struggle to accurately define the relief boundary. Therefore, this invention introduces a segmentation algorithm based on variational level sets. This algorithm can handle boundary contours with complex topological changes and exhibits good noise resistance and boundary smoothness.

[0037] In one embodiment of the present invention, the constructed variational level set energy functional It consists of three components, namely the boundary driving energy term. Region fitting energy term and level set regularization term Its overall form is:

[0038] ,

[0039] in: is the total energy functional, and its unit is a dimensionless energy value; A level set function, defined in the image domain. A continuous scalar field on, with its zero level set Indicates the dividing boundary curve; The boundary-driven weight coefficient has a value range of 0.5 to 5.0 and is dimensionless; in this embodiment, it is set to 2.0. The region fitting weight coefficient has a value range of 0.1 to 2.0, is dimensionless, and is set to 1.0 in this embodiment; This is the regularization weight coefficient, ranging from 0.001 to 0.1, dimensionless. In this embodiment, it is set to 0.01. The selection of this value needs to strike a balance between boundary accuracy and evolutionary stability; a larger value will result in a lower weight. A value that promotes numerical stability may lead to overly smooth boundaries.

[0040] Among them, the boundary driving energy term Constructing an edge indicator function based on the gradient magnitude of a 3D height map To guide the level set curve toward a region of high abrupt change, its expression is:

[0041] ,

[0042] in: The gradient of the Heaviside function is used to identify the boundary bandwidth near the zero level set; it is dimensionless. The edge indicator function is defined as follows: ,in This is the gradient vector of the heightmap, in μm / pixel. This is the gradient response sensitivity coefficient, ranging from 0.01 to 1.0, with units of pixel² / μm². In this embodiment, it is set to 0.1 pixel² / μm². This is used when the heightmap gradient is large (i.e., at the embossed edge). When the gradient approaches 0, the boundary driving energy is low, and the level set curve tends to stay at this position; when the height map gradient is small (i.e., in a flat region). As the value approaches 1, the boundary driving energy is relatively high, causing the level set curve to continue to shift.

[0043] Region Fitting Energy Term This method uses a region segmentation approach driven by the difference in height mean between the embossed and background regions. It employs the Chan-Vese model to divide the image domain into an interior (embossed region) and an exterior (background region) of the horizontal set function, and calculates the variance between the height value and the region mean within each region.

[0044] ,

[0045] in: The average height of the relief region (within the horizontal set), in μm, is dynamically updated in each iteration based on the current segmentation result; The average height of the background region (outside the level set), in μm, is also dynamically updated; This is a regularized Heaviside function used to smooth the transition and ensure the differentiability of the energy functional. The physical meaning of this energy term is: when the segmentation boundary lies precisely at the true boundary between the relief and the background, the height value inside the relief region is related to... The difference and the height value within the background area The differences between them all reach their minimum values, thereby minimizing the total region fitting energy.

[0046] Level set regularization term By penalizing the level set function The deviation from the sign distance function is used to maintain the numerical stability of the evolution process and avoid the level set function from becoming excessively steep or excessively flat during iteration. Its expression is:

[0047] ,

[0048] in: Let be the magnitude of the gradient of the level set function, which is dimensionless; when At this point, the level set function exactly satisfies the property of the signed distance function, and the regularization energy is zero. The introduction of this regularization term eliminates the need for frequent re-initialization of the level set function during iteration, significantly improving the computational efficiency of the algorithm.

[0049] In the specific iterative solution process, by applying the total energy functional... Seeking information about The Euler-Lagrange equations are used to derive the evolution equations for the level set functions, and a time step of is adopted. Numerical solutions are obtained using a semi-implicit finite difference scheme. The initial value of the level set function is set to a value in the height map that exceeds a preset height threshold. The signed distance function centered on the centroid of the region, in this embodiment The height is set to the average height of the background plane plus 50μm. The iteration termination condition is that the maximum displacement of the zero-level set curve between two adjacent iterations is less than 0.5 pixels, or the maximum number of iterations of 300 is reached. In this embodiment, the segmentation process of a typical embossed card converges within 150 to 200 iterations, and the segmentation processing time for a single card is approximately 35ms.

[0050] Preferably, after the level set evolution converges, the present invention further performs post-processing optimization on the boundary of the segmented relief region. Post-processing includes two steps: first, morphological opening operations (structuring element is a disk with a radius of 3 pixels) are used to remove burrs and isolated noise points on the boundary; second, B-spline curves are used to parametrically fit the boundary pixels, converting the discrete boundary pixel sequence into a continuous and smooth parametric curve, providing an accurate curve representation for the curvature calculation in step S4. During the B-spline fitting process, the number of control points is adaptively determined according to the complexity of the boundary curve. In this embodiment, the number of control points for a typical relief contour is between 80 and 200, and the fitting order is chosen as 3rd order (i.e., cubic B-spline), ensuring that the fitted curve has second-order continuous differentiability in the parameter domain. This is crucial for the accurate calculation of curvature in the subsequent step S4. The fitting residual is controlled within 0.5 pixels to ensure that the parametric curve faithfully reflects the original boundary morphology.

[0051] Step S4: Relief Contour Curvature Continuity Analysis and Defect Detection. This step receives the relief region segmentation results output from Step S3 and performs two key analyses within the segmented relief imprint area: first, the curvature continuity analysis of the relief contour; and second, defect detection through registration comparison between the measured morphology and the design standard. These two analyses evaluate the relief quality from different dimensions: the former focuses on the geometric accuracy of the relief edges, while the latter focuses on the overall depth accuracy of the relief.

[0052] Regarding the analysis of the curvature continuity of the relief contour, this invention first performs equal-arc-length sampling along the boundary curve of the relief contour output in step S3. Preferably, the sampling interval is set to 1 / 500 to 1 / 200 of the total arc length of the curve. In this embodiment, for a typical relief contour (circumference approximately 120 mm), the sampling interval is set to 0.3 mm, thus obtaining approximately 400 sampling points. At each sampling point, samples are taken from the area before and after it. Adjacent sampling points (in this embodiment) The coordinates of a total of 7 points Based on these 7 points, the least squares method is used to fit the local quadratic curve. Therefore, the first... Discrete curvature values ​​at each sampling point :

[0053] ,

[0054] in: For the first Discrete curvature values ​​at each sampling point, in units of 1 / mm; The quadratic coefficient of the conic section is expressed in units of 1 / mm. The coefficient is a first-order coefficient, dimensionless; For the first The x-coordinate of each sampling point is in mm. The curvature value reflects the degree of curvature of the relief contour at that point; the greater the curvature, the more severe the curvature, and zero curvature indicates that the point is a straight line.

[0055] Obtaining the discrete curvature sequence along the entire relief contour Subsequently, this invention establishes two curvature continuity evaluation indices. The first index is global curvature volatility. , defined as the standard deviation of the curvature sequence:

[0056] ,

[0057] in: This represents the global curvature fluctuation, expressed in 1 / mm. In this embodiment, the total number of sampling points is [number]. ; The first indicator is the mean of the curvature sequence, expressed in 1 / mm. This indicator reflects the overall curvature consistency of the relief contour. Higher global curvature fluctuations indicate irregular bending changes in the contour, suggesting potential defects such as blurred edges or incomplete contours. The second indicator is the degree of abrupt change in local curvature. , defined as the maximum absolute value of the curvature difference between adjacent sampling points:

[0058] ,

[0059] in: The local curvature abrupt change is expressed in 1 / mm. This index reflects the most drastic curvature change on the relief contour; excessively large local curvature abrupt changes indicate the presence of sharp corners, cracks, or break points on the contour. In this embodiment, a threshold for judging global curvature fluctuation is set. The threshold for determining the degree of abrupt change in local curvature is 0.15 1 / mm. The values ​​were 0.81 / mm, and these two thresholds were determined through statistical analysis of 500 acceptable samples and 100 samples with known defects. When or When the system determines that there are blurry or broken defects on the edge of the relief, it marks the specific abnormal location in the defect report.

[0060] In terms of registration and comparison between measured topography and design standard, this invention employs a layered registration strategy to achieve high-precision topography alignment. In the coarse registration stage, the centroid coordinates and principal axis directions of the relief segmentation boundary output in step S3 are used as initial registration parameters. Translation and rotation are used to initially align the measured height map with the pre-stored design standard template. In the fine registration stage, the Iterative Closest Point (ICP) algorithm is used to iteratively optimize the two sets of 3D point cloud data. In each iteration, the nearest corresponding point in the standard template point cloud is found for each point in the measured point cloud, and the optimal rigid body transformation matrix is ​​calculated through singular value decomposition. In this embodiment, the convergence condition of the ICP algorithm is that the change in the root mean square registration error between two adjacent iterations is less than 0.1 μm, or the maximum number of iterations (50) is reached.

[0061] After registration, the pixel-by-pixel height deviation between the measured height map and the standard template is calculated. :

[0062] ,

[0063] in: For pixels The height deviation at the location, in μm; This is the measured height value, in μm; This represents the standard template height value, in μm. A positive deviation indicates that the measured height is higher than the standard value (excessive embossing), while a negative deviation indicates that the measured height is lower than the standard value (insufficient embossing depth or collapse). In this embodiment, the depth tolerance is set to ±30μm, i.e., when... When the depth deviation is less than μm, the pixel is marked as an anomaly. The connected regions formed by these anomalies are then analyzed, and the defects are classified into four types based on their area, shape factor, and positional relationship: Negative deviation connected regions with an area greater than 2 mm² and located in the center of the relief are classified as incomplete imprinting defects; connected regions with an area greater than 1 mm² and a mean depth deviation less than -50 μm are classified as insufficient depth defects; connected regions located at the edge of the relief and coinciding with curvature anomalies are classified as edge blurring defects; and concentrated collapse regions with an area greater than 0.5 mm² and a mean depth deviation less than -100 μm are classified as surface collapse defects.

[0064] Preferably, after classifying the defects as described above, the present invention further grades and assesses the severity of each type of defect. The severity assessment criteria include the area percentage of the defective region, the mean and peak values ​​of the depth deviation, and whether the defect is located in a critical visual area of ​​the embossed pattern. In this embodiment, the severity of defects is divided into three levels: minor defects (area percentage less than 1% and mean depth deviation between 30 and 50 μm), moderate defects (area percentage between 1% and 5% or mean depth deviation between 50 and 100 μm), and severe defects (area percentage exceeding 5% or mean depth deviation exceeding 100 μm). For minor defects, the system only records the defect information and marks it in the inspection report; for moderate and above defects, the system classifies the card as a non-conforming product and removes it. This grading assessment mechanism helps reduce production losses caused by excessive rejection while ensuring product quality. Furthermore, the location, area, depth deviation, and other characteristic data of each defect are stored in a database, providing data support for subsequent process optimization and quality traceability.

[0065] Step S5: Statistical Process Control of Embossing Depth. This step receives the defect detection results and embossing depth measurement data of each card from Step S4, and performs statistical process control (SPC) analysis on the embossing depth of consecutive batches. The core value of this step lies in its ability not only to detect morphological defects on individual cards, but also to monitor the batch stability of the embossing process, achieving an upgrade in quality management from post-detection to process control. Simultaneously, the control results are fed back to Step S1 to form a closed-loop adjustment.

[0066] In one embodiment of the present invention, the statistical process control model adopts... -R control chart method. Specifically, the cards being tested consecutively are grouped into groups of 5 to 10 cards (subgroup size in this embodiment). For each subgroup, calculate the following statistic: subgroup mean. range of subgroups Subgroup mean The calculation formula is:

[0067] ,

[0068] in: For the first The average embossing depth of each subgroup, in μm; For the size of the subgroup, in this embodiment ; For the first The first in the subgroup The representative value of the embossed depth of the card, in μm, is taken as the median of all height measurements within the embossed area to enhance robustness against outliers. Subgroup range The calculation formula is:

[0069] ,

[0070] in: For the first The relief depth variation of each subgroup is expressed in μm; this value reflects the dispersion of the relief depth of each card within the subgroup.

[0071] Before creating a control chart, it is necessary to determine the center line and control limits of the control chart using historical data from a period of stable production. Preferably, the present invention uses the preceding... The data of each subgroup is used as the base period data (in this embodiment) (corresponding to 125 cards), calculate the total average of the base period. and mean range :

[0072] ,

[0073] in: The total mean is expressed in μm. The center line of the control chart; The mean range, in μm, is used as the center line of the R control chart. The upper control limit (UCL) and lower control limit (LCL) are set according to the following formulas:

[0074] ,

[0075] ,

[0076] in: , , For SPC control chart constants, when the subgroup size hour, , , These constants originate from the statistical theory of the normal distribution; and These are the upper and lower control limits of the mean control plot, in μm. and These are the upper and lower control limits of the range control chart, respectively, in μm. When a new subgroup... Exceeding When the mean deviation falls within the specified range, the system generates a mean offset warning signal; when... Exceeding When the range is reached, the system generates an extreme abnormality warning signal.

[0077] One of the key innovations of this invention lies in forming a closed-loop feedback between the warning signal of the SPC module and the projection parameters in step S1. Specifically, when a mean offset warning is detected (indicating a systematic shift in the embossing depth), the system automatically increases the projected light intensity in step S1 by 15% to 25% to improve the stripe contrast in the weak embossing area, thereby improving the depth measurement sensitivity and ensuring accurate capture of subtle height changes even when the embossing depth tends to become shallower. When a polarity anomaly warning is detected (indicating a deterioration in the consistency of the embossing depth), the system automatically increases the number of phase shift steps for the high-frequency stripes in step S1 from the standard 4 steps to 6 steps (the phase shift amount increases from...). Reduce to By increasing the sampling density, the signal-to-noise ratio of phase demodulation is improved, thereby enhancing the repeatability accuracy of depth measurement. Furthermore, this embodiment includes an emergency stop signal for three consecutive subgroups exceeding control limits. When this signal is triggered, the system will pause the detection process and send a process anomaly alarm to the operator, indicating that mold wear may need to be checked or the imprinting process parameters adjusted.

[0078] Preferably, the present invention also introduces a trend determination rule into the SPC control chart. That is, when the mean of seven consecutive subgroups shows a monotonically increasing or monotonically decreasing trend, the system will generate a trend deviation warning signal even if the mean of each subgroup has not yet exceeded the control limit, thus enabling early prediction of process deviations. This trend determination rule helps to detect slow drifts in process parameters before the relief depth exceeds the tolerance range, providing a basis for preventative maintenance decisions.

[0079] This embodiment provides a card surface morphology defect detection system based on embossed effects, such as... Figure 2 As shown, the system corresponds one-to-one with each step of the method described in Example 1, including a dual-frequency structured light adaptive projection module 1, a relief three-dimensional height map reconstruction module 2, a variational level set relief segmentation module 3, a curvature analysis and defect detection module 4, and a depth statistical process control module 5.

[0080] The dual-frequency structured light adaptive projection module 1 is used to perform the dual-frequency structured light adaptive projection operation on the coated card described in step S1 of Embodiment 1. At the hardware level, this module includes a DLP digital micromirror projector, an industrial area array camera, and a card transmission and positioning device. The projector is responsible for generating and projecting a dual-frequency sinusoidal stripe pattern, and the industrial area array camera is responsible for synchronously acquiring the modulated deformed image of the stripes on the card surface. At the functional level, this module has a built-in stripe generation subunit and a light intensity adaptive adjustment subunit. The stripe generation subunit generates a four-step phase-shifted sinusoidal stripe pattern sequence according to preset first and second frequency parameters and drives the projector to project the pattern. The light intensity adaptive adjustment subunit identifies high-reflection areas of the coated layer through modulation analysis of the pre-scanned stripe image and adaptively reduces the projected light intensity in these areas according to the strategy described in Embodiment 1. The output of this module is a dual-frequency modulated stripe image with specular reflection components eliminated, which is directly transmitted to the relief 3D height map reconstruction module 2.

[0081] The relief 3D height map reconstruction module 2 is used to perform the relief 3D height map reconstruction operation described in step S2 of Embodiment 1. This module receives the dual-frequency modulated stripe image output from the dual-frequency structured light adaptive projection module 1 as input, and internally includes a phase-shift demodulation subunit, a time-phase expansion subunit, and a phase-to-height conversion subunit. The phase-shift demodulation subunit uses the least-squares fitting method described in Embodiment 1 to perform phase demodulation on the low-frequency and high-frequency stripe image sequences respectively, outputting low-frequency wrapped phase and high-frequency wrapped phase. The time-phase expansion subunit uses the low-frequency continuous phase to assist the high-frequency phase in expansion, obtaining an unambiguous high-frequency continuous absolute phase distribution. The phase-to-height conversion subunit converts the absolute phase distribution into a 3D height map based on a pre-calibrated 3rd-order polynomial mapping relationship, and outputs it after median filtering denoising and flatness correction preprocessing. The output of this module is a 3D height map of the relief region, which is transmitted to the variational level set relief segmentation module 3.

[0082] The variational level set relief segmentation module 3 is used to perform the automatic relief region segmentation operation described in step S3 of Embodiment 1. This module takes the 3D height map output by the relief 3D height map reconstruction module 2 as input and includes a variational level set energy functional construction subunit and an iterative solution subunit. The energy functional construction subunit automatically constructs a total energy functional containing boundary-driven energy terms, region-fitting energy terms, and regularization terms based on the gradient characteristics and regional statistical characteristics of the 3D height map. The iterative solution subunit uses a semi-implicit finite difference scheme to numerically solve the level set evolution equation, driving the zero level set curve to converge to the true boundary of the relief pattern. Preferably, this module also includes a boundary post-processing subunit for smoothing the segmentation boundary through morphological operations and B-spline curve fitting. This module outputs the precise boundary of the relief imprinted area and transmits it to the curvature analysis and defect detection module 4.

[0083] The curvature analysis and defect detection module 4 is used to perform the relief contour curvature continuity analysis and defect detection operation described in step S4 of Example 1. This module receives the relief region boundary output by the variational level set relief segmentation module 3 and the 3D height map output by the relief 3D height map reconstruction module 2. Internally, it includes a curvature analysis subunit and a registration and comparison defect detection subunit. The curvature analysis subunit performs equal-arc sampling along the relief contour boundary curve, calculates the discrete curvature sequence through local quadratic curve fitting, and calculates two evaluation indicators: global curvature fluctuation and local curvature abrupt change. The registration and comparison defect detection subunit performs ICP registration between the measured 3D relief shape and a pre-stored design standard template, generating a pixel-by-pixel height deviation distribution map, and marking and classifying connected abnormal regions exceeding the depth tolerance. This module outputs defect detection results and relief depth measurement data, which are transmitted to the depth statistics process control module 5.

[0084] The depth statistics process control module 5 is used to execute the relief depth statistics process control operation described in step S5 of Embodiment 1. This module receives continuous batches of relief depth data output by the curvature analysis and defect detection module 4, and has a built-in SPC control chart calculation subunit and early warning feedback subunit. The SPC control chart calculation subunit groups the continuous detection data according to the set subgroup size, calculates the subgroup mean and range, and maintains... The system generates a control chart and updates it in real time. The early warning feedback subunit generates a process deviation early warning signal when the subgroup statistics exceed the control limits, and feeds this signal back to the dual-frequency structured light adaptive projection module 1 via the system's internal communication interface to automatically adjust parameters such as the projected light intensity and phase shift step number. This closed-loop feedback mechanism from the detection end to the projection front end enables the entire system to have process adaptive capabilities, automatically optimizing detection parameters to maintain detection accuracy when production conditions change slowly.

[0085] In this embodiment, the data flow among the five modules forms a deeply coupled collaborative architecture: the output of projection module 1 serves as the direct input of reconstruction module 2, the output of reconstruction module 2 serves as the direct input of segmentation module 3, the output of segmentation module 3 and the output of reconstruction module 2 together serve as the input of detection module 4, the output of detection module 4 serves as the input of control module 5, and the warning output of control module 5 is fed back to projection module 1, forming a complete closed-loop control link. The detection effect produced by the collaborative work of each module far exceeds the sum of the effects of each module running independently. For example, the high-precision boundary of segmentation module 3 provides a reliable basis for the curvature analysis of detection module 4, while the closed-loop feedback of control module 5 enables projection module 1 to maintain optimal stripe quality even during process drift.

[0086] In this embodiment, the overall data processing of the system adopts a pipelined parallel architecture to achieve high-throughput detection. Specifically, when the... When the th card is performing data processing in steps S3 to S5, the th card has entered the stripe acquisition and phase reconstruction stage of steps S1 to S2. Through this pipeline parallel mechanism, the effective detection beat of the system is equal to the time-consuming of the step with the longest execution time among all steps, rather than the sum of the time-consuming of all steps, thus greatly improving the detection efficiency. The human-machine interaction interface of the system real-time displays the three-dimensional height map, relief segmentation result, curvature distribution curve and control chart trend of the current card, and the operator can view the detection details and historical statistical data at any time. When the system detects a non-conforming product, the interface marks the defect type and location information in red, and at the same time drives the rejection device to automatically divert the non-conforming product to the non-conforming product collection tank.

[0087] To verify the technical effects of the method and system described in this invention, a detection platform including a DLP projector (resolution 1920×1080 pixels, refresh rate 120Hz), 2 industrial cameras with 5 million pixels (frame rate 200fps) and a supporting transmission device was built. The test samples included 2000 cards with 3 different relief designs, of which 1600 were qualified products confirmed manually and 400 were non-conforming products with various relief defects. The relief design depths of the test cards covered three levels of 0.5mm, 1.0mm and 1.5mm, and the surfaces of the cards were all covered with films, and the film materials included two types of glossy film and matte film.

[0088] In terms of the measurement accuracy of the relief depth, a high-precision white light interferometer (axial resolution 0.1nm) was used as the reference measurement device to compare and measure the relief depths of 50 film-covered relief cards. The results show that the maximum deviation between the depth measurement value of the method of this invention and that of the white light interferometer is 4.8μm, and the root mean square deviation is 2.7μm, meeting the design index of the relief depth measurement accuracy of ±5μm. In the scenario of film-covered cards, after the dual-frequency phase-shifting adaptive light intensity adjustment, the fringe modulation degree in the high-reflection area is increased from 0.05 to 0.12 before processing to 0.35 to 0.55 after processing, and the phase demodulation success rate is increased from 72% to 99.2%. It is worth noting that the specular reflection problem of the glossy film-covered cards is particularly serious. Without the adaptive light intensity adjustment, about 28% of the card surface area cannot complete the phase demodulation due to overexposure, while after using the method of this invention, this proportion is reduced to less than 0.8%.

[0089] Regarding the segmentation accuracy of the relief region, the manually annotated relief boundary was used as the gold standard, and the Dice coefficient and Hausdorff distance between the variational level set segmentation method of this invention and the gold standard were calculated. The average Dice coefficient on 2000 test samples was 0.973, and the average Hausdorff distance was 1.2 pixels (approximately 0.06 mm), indicating that the segmentation result is highly consistent with the actual relief boundary. Compared with the traditional Otsu thresholding method (average Dice coefficient 0.841) and the Canny edge detection method (average Dice coefficient 0.892), the segmentation accuracy of this invention is improved by 15.7% and 9.1%, respectively. Furthermore, for complex topological structures containing multiple independent relief patterns or relief patterns with hollow areas within them, the variational level set method of this invention can correctly handle topological changes and achieve accurate segmentation, while the segmentation performance of the traditional thresholding method drops sharply in these scenarios.

[0090] Regarding the detection of relief outline integrity, among 400 known defect samples, 126 were incompletely imprinted, 98 had insufficient depth, 107 had blurred edges, and 69 had surface collapse. The detection accuracy of the method of this invention for the above four types of defects was 99.2%, 100%, 99.1%, and 100%, respectively, with an overall detection accuracy of 99.5%, a false negative rate of 0.3%, and a false positive rate of 0.8%. Compared with the traditional method based solely on two-dimensional image grayscale analysis (overall accuracy of 83.2%), the detection accuracy of this invention is improved by 16.3 percentage points. Analysis of the false negative cases shows that the two undetected cards both had extremely slight edge blurring defects, with their curvature abnormality only slightly below the detection threshold.

[0091] In terms of detection speed, the complete detection process for a single card includes stripe acquisition (67ms), phase demodulation and height reconstruction (45ms), level set segmentation (35ms), curvature analysis and defect detection (28ms), and SPC statistical update (5ms), totaling approximately 180ms, corresponding to a detection speed of approximately 333 cards / min. Considering the mechanical latency of card transmission and positioning (approximately 220ms), the overall system detection speed is approximately 150 cards / min, meeting the online detection requirements of high-speed production lines. By adopting a GPU parallel acceleration strategy (NVIDIA RTX 3060 graphics card), the calculation time of the phase demodulation stage is reduced from 45ms to 18ms, and the calculation time of the level set segmentation stage is reduced from 35ms to 12ms, allowing for further improvements in system detection speed in the future.

[0092] In terms of statistical process control, batch stability monitoring tests were conducted on 5000 cards produced continuously. During the tests, two simulated die wear events were introduced (by gradually reducing the imprinting depth by 5μm / 100 cards). The SPC control module successfully triggered mean offset warnings at the 12th subgroup (60 cards) and 15th subgroup (75 cards) after the offset occurred, with an average warning lag of approximately 65 cards. Compared to scenarios without SPC control, the closed-loop feedback mechanism controlled the depth measurement error of the detection system from ±8μm to within ±5μm during process drift. The trend judgment rule triggered early warnings before the offset reached 60% of the control limit in all three gradual offset tests, confirming the rule's sensitive detection capability for slow process drift.

[0093] In summary, the card surface morphology defect detection method and system based on embossed effects provided by this invention achieves fully automated detection of coated embossed cards from three-dimensional morphology acquisition to defect identification and batch process control through the deep coupling and synergy of five steps: dual-frequency structured light adaptive projection, phase-deflection three-dimensional height map reconstruction, variational level set embossed region segmentation, curvature continuity analysis and defect detection, and depth statistical process control. This method is particularly suitable for product quality control scenarios with strict requirements for embossed printing quality, such as high-end collectible cards, financial cards, and security documents. It can effectively replace traditional manual visual inspection and two-dimensional image detection methods, significantly improving the detection rate and efficiency of embossed defects, and has good industrial application and promotion value.

[0094] The embodiments of the present invention are not limited to the specific embodiments described above. Those skilled in the art can make various equivalent changes or substitutions based on the technical solutions of the present invention, and all such changes or substitutions should be included within the protection scope of the present invention.

Claims

1. A method for detecting surface morphology defects on cards based on embossed effects, characterized in that, Includes the following steps: Adaptive projection steps of dual-frequency structured light on coated cards: Sinusoidal striped structured light with a first frequency and a second frequency is projected onto the surface of the card to be inspected. Low-frequency striped image sequence and high-frequency striped image sequence are acquired respectively through a dual-frequency phase-shift acquisition strategy. The intensity of the projected light is adaptively adjusted according to the specular reflection intensity of the card coating layer to suppress the interference of the specular reflection of the coating layer on the stripe modulation, thereby obtaining a dual-frequency modulated striped image with the specular reflection component eliminated. The steps for reconstructing the 3D height map of the relief based on phase deflection are as follows: multi-step phase shift demodulation is performed on the dual-frequency modulated stripe image to extract the low-frequency wrapping phase and the high-frequency wrapping phase. The low-frequency phase is used to assist the high-frequency phase in time phase unfolding to obtain the continuous absolute phase distribution on the card surface. Based on the mapping relationship between phase and height, the absolute phase distribution is converted into a 3D height map of the relief area. The automatic segmentation steps of the relief region based on variational level set are as follows: taking the three-dimensional height map as input, a variational level set energy functional that integrates height gradient information and regional gray-scale statistical features is constructed. The zero level set curve is driven to converge to the boundary of the relief pattern through the iterative evolution of the level set function, and the precise boundary of the relief imprinting area is automatically segmented from the complex background. The steps for analyzing the curvature continuity of the relief contour and detecting defects are as follows: Within the relief imprinting area, the boundary curve of the relief contour is extracted and the discrete curvature sequence along the boundary curve is calculated. A curvature continuity evaluation index is established to quantify the sharpness and smoothness of the relief edge. At the same time, the measured three-dimensional shape of the relief is registered and compared with the pre-stored design standard template. Based on the height deviation distribution and curvature anomaly, defects such as incomplete relief imprinting, insufficient depth, blurred edges, and surface collapse are identified.

2. The method for detecting surface morphology defects of cards based on embossed effects according to claim 1, characterized in that, In the dual-frequency structured light adaptive projection step of the coated card, the stripe period of the first frequency is 2-4 times the maximum size of the embossed pattern to be inspected, and the stripe period of the second frequency is 3-8 times the minimum feature size of the embossed pattern. In the dual-frequency phase shift acquisition strategy, each frequency adopts a 4-step equal-step phase shift, and the phase shift amount between adjacent frames is π / 2.

3. The method for detecting surface morphology defects of cards based on embossed effects according to claim 1, characterized in that, In the adaptive projection step of dual-frequency structured light on the coated card, the method of adaptively adjusting the projected light intensity according to the specular reflection intensity of the card coating layer includes: acquiring a pre-scanned stripe image and calculating the stripe modulation degree at each pixel position; reducing the projected light intensity to 30%-60% of the initial light intensity for high-reflection areas with modulation degrees lower than a preset threshold; keeping the initial light intensity unchanged for diffuse reflection areas with normal modulation degrees; and fusing the stripe images acquired from the high-reflection areas and the diffuse reflection areas respectively to obtain a stripe image with uniform modulation across the entire surface.

4. The method for detecting surface morphology defects of cards based on embossed effects according to claim 1, characterized in that, In the phase-deflection-based relief 3D height map reconstruction step, the multi-step phase-shift demodulation uses the least squares fitting method to extract the wrapping phase of each pixel position from 4 phase-shift fringe images. The difference in the unfolding order of the time phase unfolding does not exceed 1, and the height resolution of the 3D height map is better than 5μm.

5. The method for detecting surface morphology defects of cards based on embossed effects according to claim 1, characterized in that, In the automatic relief region segmentation step based on variational level sets, the variational level set energy functional includes a boundary-driven energy term, a region-fitting energy term, and a level set regularization term. The boundary-driven energy term constructs an edge indicator function based on the gradient magnitude of the 3D height map to guide the level set curve toward regions with abrupt height changes. The region-fitting energy term drives region segmentation based on the difference in the mean height between the relief region and the background region. The level set regularization term maintains the numerical stability of the level set evolution by penalizing the deviation between the level set function and the signed distance function.

6. The method for detecting surface morphology defects of cards based on embossed effects according to claim 1, characterized in that, In the step of analyzing the curvature continuity of the relief contour and detecting defects, the method for establishing the curvature continuity evaluation index includes: sampling along the boundary curve of the relief contour at equal arc length intervals; fitting a local quadratic curve at each sampling point based on the coordinates of adjacent sampling points to calculate the discrete curvature value; using the standard deviation of the curvature sequence as the global curvature fluctuation index; using the maximum absolute value of the curvature difference between adjacent sampling points as the local curvature abrupt change index; and determining that there is a blurry or broken defect at the edge of the relief when the global curvature fluctuation exceeds the first threshold or the local curvature abrupt change exceeds the second threshold.

7. The method for detecting surface morphology defects of cards based on embossed effects according to claim 1, characterized in that, In the step of analyzing the continuity of the relief contour curvature and detecting defects, the method of registering and comparing the measured three-dimensional shape of the relief with the pre-stored design standard template includes: using the centroid and principal axis direction of the relief segmentation boundary as the initial registration parameters, using the iterative nearest point algorithm to perform fine registration of the measured height map and the standard template, calculating the pixel-by-pixel height deviation after registration and generating a deviation distribution map, marking the connected regions in the deviation distribution map where the absolute value of the height deviation exceeds the set depth tolerance, and classifying defects into incomplete imprinting, insufficient depth, or surface collapse according to the area, shape, and location of the connected regions.

8. The method for detecting surface morphology defects of cards based on embossed effects according to claim 1, characterized in that, It also includes a statistical process control step for relief depth: establishing a statistical process control model for relief depth data from continuous batch testing, calculating the mean and range of relief imprinting depth within the batch, drawing a mean-range control chart and setting upper and lower control limits, generating a process deviation warning signal when the batch depth statistics exceed the control limits, and feeding the warning signal back to the dual-frequency structured light adaptive projection step of the laminated card to adjust the projection parameters. The statistical process control model uses an XR control chart, with a subgroup size of 5-10 cards continuously tested. The upper and lower control limits are set based on the mean and three times the standard deviation of the relief process design depth. The warning signals include mean deviation warning and range abnormality warning.

9. The method for detecting surface morphology defects of cards based on embossed effects according to claim 8, characterized in that, The method of feeding back the warning signal to the dual-frequency structured light adaptive projection step of the coated card to adjust the projection parameters includes: when a mean offset warning is detected, increasing the projection light intensity by a preset ratio to improve the stripe contrast of the weak relief area; when an extreme difference warning is detected, increasing the phase shift step of the high-frequency stripes from 4 steps to 6 steps to improve the phase demodulation accuracy.

10. A card surface morphology defect detection system based on embossed effect, used to implement the card surface morphology defect detection method based on embossed effect as described in any one of claims 1-9, characterized in that, include: The dual-frequency structured light adaptive projection module is used to project sinusoidal striped structured light with a first frequency and a second frequency onto the surface of the card to be inspected. It acquires low-frequency striped image sequences and high-frequency striped image sequences through a dual-frequency phase-shift acquisition strategy, and adaptively adjusts the projection light intensity according to the specular reflection intensity of the card coating layer to suppress specular reflection interference. The relief 3D height map reconstruction module is used to perform multi-step phase-shift demodulation and time-phase unfolding on the dual-frequency modulated stripe image to obtain a continuous absolute phase distribution, and convert the absolute phase distribution into a 3D height map of the relief area based on the mapping relationship between phase and height. The variational level set relief segmentation module is used to take the three-dimensional height map as input and drive the zero level set curve to converge toward the relief pattern boundary by a variational level set energy functional that integrates height gradient information and regional grayscale statistical features, thereby automatically segmenting the relief imprinting area from the complex background. The curvature analysis and defect detection module is used to extract the discrete curvature sequence of the relief contour boundary curve, establish a curvature continuity evaluation index, and register and compare the measured three-dimensional shape of the relief with the design standard template to identify relief embossing defects. The depth statistics process control module is used to establish a mean-range control chart for continuous batches of relief depth data. When the batch depth statistics exceed the control limit, a process deviation warning signal is generated and fed back to the dual-frequency structured light adaptive projection module to adjust the projection parameters.