A method for compensating for nail stamping pattern edge definition
By using a learnable direction-sensitive kernel set and an entropy-driven method based on the direction probability distribution, the problems of poor direction adaptability and edge distortion in nail sticker hot stamping are solved. This achieves efficient and real-time pattern edge sharpness compensation, improving hot stamping quality and computational efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU ZHENGXIANG PRINTING CO LTD
- Filing Date
- 2026-03-24
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies struggle to achieve high-precision edge enhancement and orientation fidelity in nail sticker hot stamping, leading to quality issues such as edge distortion and pattern "distortion." Real-time adaptive adjustment is particularly difficult in resource-constrained embedded hot stamping control terminals.
A learnable orientation-sensitive kernel group is used for multi-scale orientation response pre-extraction. Combined with the orientation statistics of significant edge pixels in the 7x7 spatial neighborhood, an orientation probability distribution is constructed and the Shannon entropy value is calculated to generate an orientation stability parameter. The gradient enhancement process is dynamically adjusted, and edge sharpness compensation is achieved through a dual-channel weighted gradient amplification mechanism.
It significantly improves edge preservation and detail reproduction accuracy in complex texture scenes, reduces computational overhead, meets the real-time and resource-constrained equipment requirements of nail sticker production lines, and ensures the integrity of pattern structure and visual naturalness.
Smart Images

Figure CN122265092A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing and edge enhancement technology, and in particular to a method for compensating the edge sharpness of nail sticker heat-printed patterns. Background Technology
[0002] With the increasing demand for personalized and refined production of nail stickers and manicure stickers, the edge sharpness and structural fidelity of hot stamping patterns have become core performance indicators in industrial pattern processing. Existing image processing technologies for pattern edge enhancement are developing rapidly, with mainstream methods focusing on global or local edge enhancement based on gradient operators (such as Sobel, Prewitt, and Laplacian), or using traditional sharpening filters to highlight the edges of the overall pattern. These methods typically enhance grayscale transitions in edge regions by performing first- or second-order differential operations on the image, thereby improving overall sharpness.
[0003] In recent years, with the improvement of machine vision technology and embedded computing capabilities, some studies have proposed using multi-scale, multi-directional analysis methods, leveraging Gabor kernels, wavelet transforms, and directional filter banks to achieve deeper analysis of pattern textures and edges. These technologies improve the ability to capture edge details to some extent by broadening the directional space and increasing response resolution. However, in actual production, most products still rely on preset templates or enhancement operators with fixed parameters, and there is often a conflict between enhancement intensity and the fidelity of edge geometry. When the enhancement weight is increased, oversharpening, boundary breaks, or "jagged" distortion problems can easily occur; while if the enhancement amplitude is strictly limited, the improvement of edge details is limited, and the pattern is prone to blurring and loss of detail after transfer. Some existing adaptive algorithms attempt to control the enhancement coefficient using local texture complexity (such as grayscale variance), but ignore the distribution characteristics of the edge directional space. For areas with multiple intersecting directions and complex textures, enhancement out of control and artifact generation are common.
[0004] In precision applications such as hot stamping of nail art stickers and transfer printing of miniature artworks, achieving high-precision pattern reproduction often requires image processing algorithms to not only enhance edge sharpness but also maximize the preservation of the original structural directional continuity. Existing solutions generally lack quantitative measurement and dynamic adjustment mechanisms for the consistency of multi-directional edges in patterns. Currently, the industry lacks an efficient algorithm that can simultaneously balance enhancement strength and directional fidelity. Especially in resource-constrained embedded hot stamping control systems, related technologies struggle to achieve real-time adaptive adjustment, often resulting in slow configuration iterations and quality issues such as edge distortion and pattern "distortion" during mass production. For example, in textured areas with cluttered edges or multiple intersecting directions, existing enhancement algorithms cannot distinguish between spaces with high directional consistency and high directional mixing. Blindly enhancing these areas often leads to solid breakage and noise diffusion, failing to meet the stringent edge quality requirements of high-end customized products like nail art stickers. Summary of the Invention
[0005] This application provides a method for compensating for the edge clarity of a nail sticker heat-printed pattern, aiming to solve one of the problems or issues of the prior art mentioned in the background art above.
[0006] This application provides a method for compensating for the edge clarity of a nail sticker heat-printed pattern, specifically including: S1: Obtain the original image data of the hot stamping pattern to be processed, and perform convolution operation on the original image data at forty-eight uniformly distributed angles based on the learnable orientation sensitive kernel group to generate an initial orientation response map set containing multi-scale orientation response information.
[0007] S2: For each target pixel in the initial direction response map set, construct a 7x7 spatial neighborhood centered on the target pixel, and filter out significant edge pixels in the 7x7 spatial neighborhood according to a local adaptive threshold to generate a significant edge pixel subset.
[0008] S3: Extract the main orientation angles corresponding to each pixel in the significant edge pixel subset and map them to the zero to π interval. Statistically calculate the distribution frequency of the main orientation angles and perform normalization processing to generate a direction probability distribution that represents the consistency of edge orientations within the neighborhood.
[0009] S4: Calculate the Shannon entropy value based on the directional probability distribution to quantify the dispersion of the edge direction, define the Shannon entropy value as a directional stability index, and generate a directional stability parameter for subsequent dynamic adjustment.
[0010] S5: Based on the directional stability parameter, query the preset dynamic coefficient mapping table to obtain the principal direction gradient enhancement ratio coefficient and the orthogonal direction gradient suppression ratio coefficient, which decrease monotonically with the directional stability parameter, and generate a pair of direction-aware dynamic adjustment factors.
[0011] S6: Extract the dual-channel gradient magnitude along the main direction and its orthogonal direction based on the main direction of the target pixel, and use the direction-aware dynamic adjustment factor to weight and synthesize the dual-channel gradient magnitude respectively to generate a direction-aligned enhanced gradient vector.
[0012] S7: Combining the gray-level variance of the seven-by-seven spatial neighborhood with the directional stability parameter to jointly constrain the mapping slope, the directional aligned enhanced gradient vector is projected back to the original pixel gray-level space to perform local contrast recalibration, generating intermediate image data after edge sharpness compensation.
[0013] S8: Output the intermediate image data after edge sharpness compensation as the final hot stamping control command source to complete the adaptive gradient enhancement processing flow based on edge direction entropy stability.
[0014] The method for compensating the edge clarity of a nail sticker heat-printed pattern provided in this application has the following beneficial effects: (1) The orientation-aware gradient enhancement method proposed in this application effectively overcomes the problems of poor orientation adaptability and artifacts and edge blurring in complex texture scenes compared with traditional image sharpening techniques based on fixed orientation operators or preset filter templates. Existing methods usually rely on Laplacian operators or multi-directional Gabor filter groups for response superposition, which makes it difficult to dynamically match the true orientation of local structures. Especially when the hot stamping pattern has multi-directional intersections, gradual transitions or weak edges, it often leads to over-enhancement or orientation misjudgment. This scheme realizes multi-scale orientation response pre-extraction through a learnable 48-angle uniformly distributed orientation-sensitive kernel group, and constructs a continuous angle probability distribution P(θ) by combining the orientation statistics of significant edge pixels in the 7×7 neighborhood. Then, Shannon entropy H(P) is introduced as a quantitative index to measure the consistency of local orientation, so that the system can accurately identify structurally coherent areas and orientationally chaotic areas. This entropy value is not used for hard threshold segmentation, but participates in subsequent gradient control as a continuous adjustment factor, realizing a paradigm shift from "whether to enhance" to "how to enhance", which significantly improves the edge preservation ability and detail restoration accuracy of complex hot stamping textures.
[0015] (2) Furthermore, this scheme innovatively constructs an entropy-driven dual-channel dynamic weighted gradient amplification mechanism, breaking through the limitations of fixed-weight fusion or isotropic amplification in traditional gradient enhancement. Unlike previous methods that use the maximum value of the principal gradient to roughly estimate the direction or rely on covariance matrix decomposition to solve the principal components, this scheme separates the gradient components along the principal direction and orthogonal directions based on the principal direction θ0, and obtains two complementary dynamic coefficients α(H) and β(H) by looking up the entropy H(P) of the neighborhood direction. α(H) increases as the entropy decreases to strengthen the principal direction response, while β(H) decreases accordingly to suppress stray direction interference. Both satisfy the normalization constraint and decrease monotonically, ensuring that the enhancement process focuses on the same direction in structurally clear regions and maintains a smooth transition in blurred or intersecting regions. Finally, pixel updates are completed through local contrast recalibration with directional alignment. The mapping slope is modulated by the neighborhood gray-level variance and entropy value, effectively avoiding step distortion and noise amplification while improving edge contrast. The entire process requires no global iteration, deep network inference, or multi-stage serial processing. It is based entirely on local neighborhood operations, which greatly reduces computational overhead and memory usage. It is particularly suitable for the stringent requirements of embedded image processing equipment in nail sticker production lines for real-time performance, low latency, and resource constraints.
[0016] The aforementioned technical methods work together to construct a fully adaptive gradient enhancement system that does not require manual setting of orientation templates, does not rely on feature point detection, and does not perform orientation interpolation reconstruction. This not only significantly improves the visibility and structural integrity of fine lines and complex patterns in hot stamping images, but also ensures the stability and visual naturalness of the enhancement process, and has good engineering feasibility and scalability potential. Attached Figure Description
[0017] Figure 1 This is the main flowchart of a method for compensating for the edge sharpness of nail sticker heat-printed patterns.
[0018] Figure 2 This is a sub-flowchart of a method for compensating for the edge sharpness of a nail sticker heat-printed pattern.
[0019] Figure 3 This is another sub-flowchart of a method for compensating for the edge sharpness of a nail sticker heat-printed pattern. Detailed Implementation
[0020] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0021] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0022] like Figure 1 As shown, this application provides a method for compensating for the edge sharpness of a nail sticker heat-printed pattern, specifically including: S1: Obtain the original image data of the hot stamping pattern to be processed, and perform convolution operation on the original image data at forty-eight uniformly distributed angles based on the learnable orientation sensitive kernel group to generate an initial orientation response map set containing multi-scale orientation response information.
[0023] S2: For each target pixel in the initial direction response map set, construct a 7x7 spatial neighborhood centered on the target pixel, and filter out significant edge pixels in the 7x7 spatial neighborhood according to a local adaptive threshold to generate a significant edge pixel subset.
[0024] S3: Extract the main orientation angles corresponding to each pixel in the significant edge pixel subset and map them to the zero to π interval. Statistically calculate the distribution frequency of the main orientation angles and perform normalization processing to generate a direction probability distribution that represents the consistency of edge orientations within the neighborhood.
[0025] S4: Calculate the Shannon entropy value based on the directional probability distribution to quantify the dispersion of the edge direction, define the Shannon entropy value as a directional stability index, and generate a directional stability parameter for subsequent dynamic adjustment.
[0026] S5: Based on the directional stability parameter, query the preset dynamic coefficient mapping table to obtain the principal direction gradient enhancement ratio coefficient and the orthogonal direction gradient suppression ratio coefficient, which decrease monotonically with the directional stability parameter, and generate a pair of direction-aware dynamic adjustment factors.
[0027] S6: Extract the dual-channel gradient magnitude along the main direction and its orthogonal direction based on the main direction of the target pixel, and use the direction-aware dynamic adjustment factor to weight and synthesize the dual-channel gradient magnitude respectively to generate a direction-aligned enhanced gradient vector.
[0028] S7: Combining the gray-level variance of the seven-by-seven spatial neighborhood with the directional stability parameter to jointly constrain the mapping slope, the directional aligned enhanced gradient vector is projected back to the original pixel gray-level space to perform local contrast recalibration, generating intermediate image data after edge sharpness compensation.
[0029] S8: Output the intermediate image data after edge sharpness compensation as the final hot stamping control command source to complete the adaptive gradient enhancement processing flow based on edge direction entropy stability.
[0030] Step S1: Acquire the original image data of the hot stamping pattern to be processed, and perform convolution operations on the original image data at forty-eight uniformly distributed angles based on a learnable orientation-sensitive kernel set to generate an initial orientation response map set containing multi-scale orientation response information. Specifically, this includes: S1.1: Perform grayscale normalization on the original image data of the hot stamping pattern collected from the nail patch production line to eliminate pixel value fluctuations caused by uneven lighting, and generate a standardized grayscale matrix as the input benchmark for subsequent directional feature extraction.
[0031] The original image data of the hot stamping pattern collected from the nail patch production line is processed using grayscale normalization technology (parameters: data acquisition matrix, target grayscale range [0,255]). This process converts the multi-channel color information into a grayscale matrix and removes the interference of color redundancy on the extraction of directional features.
[0032] By using a dynamic range compression method (parameters: minimum gray value, maximum gray value), gray values are mapped to a unified standardized range to obtain preliminary normalized matrix data, ensuring the consistency of gray distribution among different batches of image input.
[0033] A local brightness adjustment method (parameters: local window size is 5×5, brightness gain coefficient is calculated based on local mean) is used to achieve local brightness equalization of the normalized matrix and obtain an intermediate grayscale matrix that eliminates uneven illumination, thereby enhancing the stability of edge detail rendering.
[0034] By using a global contrast adjustment method (parameters: global grayscale variance, target variance value), the contrast of the intermediate grayscale matrix is linearly amplified or compressed on a global scale to reduce the impact of ambient light fluctuations on pixel values and generate an optimized grayscale matrix.
[0035] A noise suppression filtering technique (parameter: Gaussian kernel size σ=1.0) is used to perform low-amplitude noise removal on the optimized grayscale matrix, ensuring that the response of subsequent orientation-sensitive convolution operations is not affected by subtle noise, and outputting a standardized grayscale matrix as the input benchmark for subsequent orientation feature extraction.
[0036] By using grayscale normalization, the results of the previous step are transformed into highly stable standardized grayscale matrix technical indicators, thereby achieving consistency and reliability in the extraction of directional features from the original image under different lighting conditions.
[0037] For example, in the nail sticker hot stamping production process, the production line camera acquires RGB hot stamping pattern image data with a resolution of 1920×1080. This data is directly input into the grayscale normalization processing module, using the grayscale conversion formula: Where R, G, and B are the pixel values of the red, green, and blue channels of the original image, respectively. After calculating the grayscale matrix using this formula, dynamic range compression is performed to map the minimum grayscale value of 37 and the maximum grayscale value of 212 to the intervals of 0 and 255, resulting in a preliminary normalized matrix. Subsequently, the local brightness mean is calculated within a 5×5 window, and the brightness gain is adjusted to significantly reduce the illumination difference at the edges. The global contrast adjustment step is based on the current grayscale variance (…). ) and target variance ( Linear amplification is performed to enhance overall perceptible details. Finally, a Gaussian filter kernel with σ=1.0 is used to remove minor noise, resulting in a normalized grayscale matrix. In this scenario, the normalized grayscale matrix exhibits significantly improved stability of directional response amplitude in subsequent direction-sensitive convolution operations, effectively supporting the multi-scale directional feature extraction module in completing high-quality edge enhancement tasks.
[0038] S1.2: Based on the standardized gray-scale matrix, construct learnable orientation-sensitive kernel group initialization parameters, and use the stochastic gradient descent algorithm to pre-train and optimize the convolution kernel weights corresponding to forty-eight uniformly distributed angles to generate an orientation-sensitive kernel group parameter set with multi-angle feature capture capability.
[0039] The input condition is the standardized grayscale matrix generated after grayscale normalization in step S1.1. This matrix expresses the light intensity distribution of each pixel of the hot stamping pattern in the form of a two-dimensional numerical array, which serves as the reference data for the initialization and optimization of the orientation-sensitive kernel group.
[0040] A learnable convolutional kernel construction technique (parameters: kernel size, initialization strategy, angle distribution setting) is adopted to initialize the orientation-sensitive kernel group, where each convolutional kernel corresponds to forty-eight uniformly distributed angles to capture edge features in different directions.
[0041] By using the stochastic gradient descent technique (parameters: learning rate, momentum factor, number of iterations, loss function type), the pre-training optimization of convolutional kernel weights is achieved, and the dynamically adjusted weight matrix data results are obtained.
[0042] The weight update is calculated using a loss function calculation method based on minimizing the directional response error, and the weight update amount is calculated using the following formula: in, The change in weight. For learning rate, Let directional response loss function be used. These are the kernel weights.
[0043] By using the direction-sensitive kernel group weight normalization technique (parameters: normalization range, regularization coefficient), the numerical stability of the weight matrix is achieved, and a direction-sensitive kernel group parameter set with multi-angle feature capture capability is generated.
[0044] A convolution kernel performance verification technique (parameters: verification dataset, orientation response judgment threshold) is used to evaluate the response performance of the optimized orientation-sensitive kernel group on a standardized grayscale matrix and generate a performance verification report.
[0045] Through the above processing method, the standardized grayscale matrix of the previous step is transformed into a pre-trained and optimized set of direction-sensitive kernel parameters, thereby realizing the establishment and output of multi-angle feature capture capability.
[0046] For example, for standardized grayscale matrix data collected during the production of hot stamping patterns for nail art stickers, the convolutional kernel size is set to 5×5, the initial weights are generated using a Gaussian random distribution, and the angle distribution is set to take values every 3.75° to form forty-eight direction-sensitive convolutional kernels. The learning rate is set to... The momentum factor is The number of iterations is Next, the loss function is in the form of the sum of squared directional response errors, and is calculated as follows: in, For the sample size, This represents the response value of the convolution kernel in the current direction. This represents the response value in the target direction. During training, the convolutional kernel weights are calculated and adjusted according to the weight update formula in each iteration, using normalized coefficients. The weight values are limited to the range of [-1.0, 1.0]. After optimization, the orientation-sensitive kernel group shows a significant improvement in capturing the gradient of the main direction in the orientation response evaluation of the test set. The normalized response amplitude of each direction in the performance verification report is above 0.85, which meets the accuracy requirements of the convolution operation in the subsequent S1.3 step.
[0047] S1.3: Generate forty-eight directional convolution operators with specific angles based on the parameter set of the directional sensitive kernel group, and perform point-by-point convolution operation on the normalized gray matrix with the forty-eight directional convolution operators with specific angles to generate a basic directional response feature map with forty-eight channels.
[0048] The input conditions are the set of learnable direction-sensitive kernel parameters generated in the previous step S1.2 and the standardized gray matrix generated in S1.1.
[0049] A method for constructing directional convolution operators (parameters: direction-sensitive kernel set, angle distribution range 0 to π, stride π / 48) is adopted to realize the function of generating convolution operators based on forty-eight specific angles.
[0050] By using the directional operator matrix mapping method (parameters: convolution kernel weight matrix, normalized grayscale matrix size), the size of the convolution operator is aligned with the pixels of the normalized grayscale matrix, and a set of operators that can perform pointwise convolution is obtained.
[0051] A point-by-point directional convolution technique (parameters: single-channel grayscale matrix, directional convolution operator, stride of 1 pixel) is used to achieve direction-sensitive convolution operation and generate a response value matrix corresponding to the direction at each pixel.
[0052] By using a multi-angle channel assembly method (parameters: response value matrix group, angle index), the response value matrix of each specific angle is independently stored in the corresponding channel position, and forty-eight channels of basic directional response feature data are generated.
[0053] The channel feature encapsulation processing method (parameters: number of channels 48, data precision float32) is adopted to transform the basic directional response feature data of 48 channels into a unified tensor structure, thereby achieving data consistency and adjustability for subsequent multi-scale fusion.
[0054] By using the directional convolution operator and the pointwise convolution processing of the standardized grayscale matrix, the kernel weight mapping result of the previous step is transformed into a basic directional response feature map with 48 channels, thereby achieving the expected technical effect of capturing multi-angle directional features of hot stamping patterns.
[0055] For example, in a nail sticker production scenario, the orientation-sensitive kernel parameter set contains 48 convolutional kernels, each with a size of 7×7. The weights are optimized using stochastic gradient descent in step S1.2 to adapt to local texture differences. The normalized grayscale matrix size is 512×512 pixels, and the grayscale value range is mapped to [0,1]. Based on the directional convolution operator construction method, the π range is divided into 48 specific angles, and a corresponding 7×7 convolution operator is generated for each angle. When performing pointwise directional convolution, the convolution stride is set to 1 pixel, and the convolution padding method is "same" to ensure that the output response matrix is consistent with the input grayscale matrix size. After convolution at each angle, the output response matrix is assigned to the corresponding channel, forming a basic orientation response feature map tensor containing 48 512×512 matrices. After data encapsulation processing, each element in the resulting tensor is of type float32, which facilitates subsequent multi-scale spatial pyramid pooling strategy fusion operations in step S1.4. Performance verification results show that the basic directional response feature map generated in this scenario can significantly improve the ability to recognize multi-directional edge details, especially in the generation of high-precision hot stamping control instructions, which has a significant effect on improving edge sharpness and maintaining directional consistency.
[0056] S1.4: Apply a multi-scale spatial pyramid pooling strategy to the basic directional response feature map of the forty-eight channels to fuse the directional response amplitudes at different resolutions and generate an intermediate directional response tensor containing multi-scale directional response information.
[0057] S1.5: Perform channel stacking and dimension reorganization operations on the intermediate direction response tensor to integrate the response data of the forty-eight angle channels into a unified data structure and generate an initial direction response map set containing multi-scale direction response information as the final output result.
[0058] The input conditions of the intermediate direction response tensor are analyzed, and it is found that it contains forty-eight different directional channels and corresponding multi-scale response amplitude matrices, which serve as the only data object for performing channel stacking and dimension reorganization operations in this step.
[0059] The channel stacking technique (parameters: channel index sequence 0-47, multi-scale fusion coefficient matrix) is adopted to arrange the channels of each direction in the tensor depth dimension in a preset order, and maintain the consistency of the spatial coordinates of each channel during the stacking process to ensure the global retrieval of subsequent directional features.
[0060] By reorganizing dimensions (parameters: target dimension structure [H, W, D], where H is height, W is width, and D is the total number of directional channels), the stacked multi-channel data is mapped into a unified three-dimensional tensor structure, resulting in an initial multi-directional response matrix data of the form H×W×48.
[0061] By using the index mapping and metadata binding method (parameters: channel orientation angle index table, scale level identifier matrix), the corresponding orientation angle metadata and scale identifier are added to each channel of the initial multi-directional response matrix, generating a response data set with orientation readability and scale discernibility.
[0062] A numerical normalization method (parameters: global maximum value, global minimum value, normalization interval [0,1]) is adopted to normalize the amplitude of the recombined response data in all directional channels and generate a uniform amplitude scale, so as to eliminate the algorithm deviation caused by the imbalance of response amplitude between directions.
[0063] By using data structure encapsulation techniques, response data that has undergone channel stacking, dimension reorganization, metadata binding, and amplitude normalization is transformed into a nominal "initial directional response map set" object, thereby achieving centralized expression and global accessibility of multi-scale directional response information.
[0064] For example, in the embedded processing module of a nail sticker hot stamping device, the intermediate directional response tensor contains forty-eight directional channels, each with a resolution of 256×256 pixels. The number of rows and columns of the fusion coefficient matrix correspond to three scale levels and forty-eight directional channels, respectively. When performing channel stacking, the direction index sequence is arranged in ascending order from 0 to 47 to form a tensor structure with a depth of 48. During dimension reorganization, the target dimension structure is set to [256, 256, 48], and the initial multi-directional response matrix is output. When binding metadata, the direction information of each channel in the direction angle index table is appended to the meta-label of the third dimension of the matrix in the form of angle values, and scale level identifiers (such as 1, 2, 3) are appended to distinguish the multi-scale sources. Amplitude normalization uses the global maximum value of 112.5 and the minimum value of 3.2 to perform mapping, scaling all response values to the interval [0, 1] to ensure that the response amplitudes in different directions are comparable. In this scenario, the encapsulated initial orientation response map set can be directly used as the input source for constructing a 7x7 spatial neighborhood in step S2, significantly improving the accuracy and stability of orientation feature extraction and subsequent edge consistency calculation.
[0065] Step S2: For each target pixel in the initial directional response map set, a 7x7 spatial neighborhood centered on the target pixel is constructed, and significant edge pixels within the 7x7 spatial neighborhood are selected based on a local adaptive threshold to generate a significant edge pixel subset. Specifically, this includes: S2.1: Obtain the target pixel coordinate information in the initial orientation response map set, and perform spatial mapping processing on the target pixel coordinate information based on the seven-by-seven window size parameter to generate a seven-by-seven spatial neighborhood data block containing forty-nine pixels.
[0066] The matrix index parsing method (parameters: image width and height, target pixel row and column index) is used to extract the two-dimensional absolute coordinates of the target pixel position from the target pixel coordinate data in the initial orientation response map set.
[0067] By using a neighborhood mapping method based on a 7x7 window size parameter (parameters: window radius of 3, center coordinates of the target pixel), spatial transformation processing from the full image coordinate system to the local neighborhood coordinate system is achieved, and the neighborhood boundary row and column index matrix is obtained.
[0068] A boundary constraint mapping method (parameter: image size constraint) is used to verify the validity of the neighborhood coordinate matrix and generate a complete list of neighborhood pixel coordinates, thus avoiding data anomalies caused by out-of-bounds values.
[0069] By calling the multi-channel data access interface of the initial orientation response map set through the neighborhood pixel coordinate list (parameter: channel index range 0 to 47), the batch acquisition of seven-by-seven neighborhood multi-angle orientation response data is realized, and a spatial neighborhood raw data block containing forty-nine pixels is generated.
[0070] A structured encapsulation processing method (parameters: data block size 7×7, multi-channel response value type is floating point) is adopted to construct the acquired multi-channel neighborhood response data into a matrix data structure, which enables direct input for subsequent local threshold calculation and significant edge filtering.
[0071] By using spatial mapping and data block construction, the target pixel coordinates from the previous step are transformed into a seven-by-seven spatial neighborhood data block containing a fixed number of pixels, thus enabling the complete capture and analysis of the directional response features of the local area.
[0072] For example, for the initial orientation response map set of a hot stamping pattern with a resolution of 1920×1080 collected from a nail patch production line, with the target pixel's row and column coordinates being 600 and 800 respectively, the absolute coordinates of the pixel's center position are extracted using a matrix index parsing method. Based on a spatial mapping parameter with a window radius of 3, the full image coordinate system is mapped to a 7×7 local neighborhood coordinate system, resulting in a valid neighborhood boundary matrix with row indices ranging from 597 to 603 and column indices ranging from 797 to 803. The boundary constraint mapping method confirms that all coordinates within this range are within the valid image size, generating a neighborhood pixel list containing 49 coordinate elements. The orientation response values corresponding to channel indices 0 to 47 are extracted in batches using a multi-channel data access interface, forming a raw data block of size 7×7×48, which is then encapsulated in a floating-point matrix structure as direct input for subsequent local adaptive threshold calculation. This processing ensures complete real-time capture of the target pixel's neighborhood orientation response information, significantly improving the accuracy of threshold calculation under different texture complexity and orientation distribution conditions.
[0073] S2.2: Sort and statistically process the response amplitudes of all pixels in the seven-by-seven spatial neighborhood data block, extract the median of the response amplitude based on the median filtering algorithm and multiply it by a preset dynamic gain coefficient to generate a local adaptive threshold scalar characterizing the current neighborhood noise level.
[0074] S2.3: The local adaptive threshold scalar is used to perform binarization comparison processing on the response amplitude of each pixel in the seven-by-seven spatial neighborhood data block, and pixels with response amplitude greater than the local adaptive threshold scalar are marked as valid candidate points to generate a preliminary significant edge pixel mask matrix.
[0075] S2.4: Based on the preliminary salient edge pixel mask matrix, perform a logical AND operation to filter the 7x7 spatial neighborhood data block, and remove background noise pixels with response amplitudes lower than the local adaptive threshold scalar, so as to generate a subset of salient edge pixels that only contain high-confidence edge information.
[0076] For the initial significant edge pixel mask matrix and the 7x7 spatial neighborhood data block, a logical AND operation method (parameters: mask matrix, response amplitude matrix) is used to realize the pixel-by-pixel comparison and corresponding element cross-determination function.
[0077] By using a threshold comparison technique (parameter: local adaptive threshold scalar), a background noise marker matrix is generated for pixels with response amplitudes below the threshold, and background noise pixel position index data is obtained.
[0078] By using the position index matching and mask inversion technique (parameters: background noise position index data, mask matrix), the zeroing operation of the corresponding background noise position in the mask matrix is realized, and a denoised high-confidence mask matrix is generated.
[0079] A matrix subset extraction technique (parameters: denoised high-confidence mask matrix, 7x7 spatial neighborhood data block) is used to map the denoised mask matrix to the actual response amplitude matrix and generate a pixel data subset containing only high-confidence edge pixels.
[0080] By using a data subset encapsulation process, the results of the previous step are transformed into a structured subset of significant edge pixels, which serves as the input data required for subsequent main orientation angle extraction and orientation consistency analysis.
[0081] For example, in the processing of hot stamping patterns for nail art stickers, the input conditions are a preliminary salient edge pixel mask matrix and the corresponding 7x7 spatial neighborhood response amplitude matrix. The local adaptive threshold scalar is set to a dynamic gain coefficient of the median multiplied by 1.2. When the response amplitude of a pixel in the mask matrix is lower than... At that time, among them If the median value is used, the pixel is marked as a noise point in the background noise pixel position index. After performing a logical AND operation, the number of pixels retained in the resulting denoising mask matrix is more than 0.6 times that of the original mask matrix, and all these pixels are extracted into the high-confidence edge pixel subset through mapping. This subset shows a concentrated directional distribution and no artifact interference in subsequent orientation angle extraction, significantly improving the integrity of the edge structure. The final output salient edge pixel subset can effectively improve the visual effect and structural fidelity after edge sharpening in the pattern hot stamping preprocessing stage.
[0082] S2.5: Associate each pixel element in the significant edge pixel subset with its corresponding initial direction response map index information, extract the maximum response direction identifier of each pixel at forty-eight uniformly distributed angles, and generate a structured significant edge pixel subset carrying the main direction angle information as the final output.
[0083] like Figure 2 As shown, step S3 involves: extracting the main orientation angles corresponding to each pixel in the significant edge pixel subset and mapping them to the zero-to-π interval; statistically analyzing the distribution frequency of the main orientation angles and performing normalization processing to generate a direction probability distribution representing the consistency of edge orientations within the neighborhood. Specifically, this includes: S3.1: For each salient edge pixel in the salient edge pixel subset, perform principal orientation angle retrieval processing based on the convolution response values of the forty-eight uniformly distributed angles in the initial orientation response map set to obtain the original principal orientation angle data corresponding to each salient edge pixel.
[0084] S3.2: Perform periodic mapping transformation on the acquired original principal direction angle data, subtract π from the angle values greater than or equal to π, so as to uniformly map all the original principal direction angle data to the half-open interval from zero to π, and generate a standardized principal direction angle set.
[0085] S3.3: Based on the standardized principal direction angle set, a discrete angle histogram statistical model is constructed in the interval from zero to π. Frequency counting processing is performed to count the occurrence frequency of the standardized principal direction angle in each angle interval and generate the original direction frequency distribution data.
[0086] S3.4: Perform a summation normalization operation on the original directional frequency distribution data, dividing the occurrence frequency of each angle interval by the total number of pixels in the significant edge pixel subset to eliminate the influence of differences in the number of neighboring pixels and generate normalized directional probability distribution data.
[0087] S3.5: Based on the normalized directional probability distribution data, a directional probability distribution object representing the consistency of edge directions within a 7x7 spatial neighborhood is encapsulated to serve as the direct input source for calculating the Shannon entropy value, thus completing the structured expression of directional features.
[0088] like Figure 3 As shown, step S4 involves calculating the Shannon entropy value based on the directional probability distribution to quantify the dispersion of the edge direction, defining the Shannon entropy value as a directional stability index, and generating a directional stability parameter for subsequent dynamic adjustment. Specifically, this includes: S4.1: Perform logarithmic operations on each probability component in the directional probability distribution to obtain a set of negative logarithmic weight values corresponding to each major directional angle, providing basic data units for subsequent weighted summation.
[0089] Logarithmic operations are performed on each probability component of the directional probability distribution object, using the natural logarithm calculation method (parameter: probability component P(θ), numerical range [0,1]) to achieve the basic transformation of the directional component information.
[0090] Numerical boundary detection technique (parameter: threshold ε = 1 × 10) - ¹²), which enables safe truncation of probability components close to zero and obtains stable probability component correction values.
[0091] Using the negative multiplication method (parameter: unit coefficient) 1) Implement sign reversal of the logarithmic values of the corrected probability components and generate negative logarithmic weight values corresponding to each principal direction angle.
[0092] By employing a data structured encapsulation technique (parameter: key-value mapping to direction angle-negative logarithmic weight value pairs), the indexed storage of negative logarithmic weight values is achieved, resulting in a set of negative logarithmic weight values.
[0093] Error correction algorithm (parameter: floating-point precision truncated to 1×10⁻⁶) is used. -6 This achieves numerical consistency constraints on the set of negative logarithmic weight values and generates the basic data units for subsequent weighted summation.
[0094] By using the above technical methods, the directional probability distribution results of the previous step are transformed into negative logarithmic weighted value data, thus establishing a stable data foundation for subsequent weighted summation calculations of information.
[0095] For example, in a 7x7 spatial neighborhood directional probability distribution, there are six principal directional angles with probability components of 0.65, 0.15, 0.10, 0.05, 0.03, and 0.02. The natural logarithm is applied to each probability component, and probability components close to zero are truncated (e.g., 0.02 is adjusted to 0.020000 in floating-point calculations), and then multiplied by... 1. Obtain the negative logarithmic weight value. After floating-point error truncation and structured encapsulation, a set of six-element negative logarithmic weight values is formed. This set is input into the subsequent information calculation stage. In performance verification, it significantly improves the directional stability quantification index during edge enhancement. The output result can avoid edge direction distortion in high-precision pattern processing scenarios of hot stamping equipment.
[0096] S4.2: Perform element-wise multiplication operations using the set of negative logarithmic weight values and the original probability components in the directional probability distribution to generate a local information sequence that represents the contribution of each directional angle information.
[0097] S4.3: Perform a full summation operation based on the local information sequence to calculate the initial Shannon entropy value, which reflects the overall disorder of the edge directions within the seven-by-seven spatial neighborhood.
[0098] The local information sequence is input to the cumulative summation module, and the sequential accumulation technique (parameter: the sequence is arranged in ascending order of the main direction angle index) is used to realize the element-by-element accumulation of the full information.
[0099] By using the cumulative summation and technical methods (parameter: the cumulative precision is double-precision floating-point to prevent numerical approximation errors), the numerical values of all elements in the local information sequence are completely aggregated, and a temporary cumulative sum result is obtained.
[0100] A numerical stability enhancement technique (parameter: Kahan compensated summation algorithm) is adopted to compensate for the calculation accuracy of the temporary cumulative sum result and generate corrected cumulative sum data with minimized numerical error.
[0101] By using entropy quantification calculation techniques (parameter: based on the Shannon information entropy principle), the corrected cumulative sum data is mapped to the initial Shannon entropy value, forming a quantitative indicator that reflects the overall disorder of the edge direction within the 7x7 spatial neighborhood.
[0102] in, Let i be the probability component corresponding to the i-th orientation angle. This represents the initial Shannon entropy value.
[0103] By using the Shannon entropy calculation formula, the total summation result of the local information sequence is transformed into quantitative data on directional stability, enabling a calculable representation of edge directional consistency and disorder.
[0104] For example, in the nail art patch production scenario, for a target pixel's 7x7 spatial neighborhood, the directional probability distribution extracted through previous steps is {0.4, 0.3, 0.2, 0.1}. Using a full accumulation technique with ascending sequence arrangement, the accumulation result is 1.0. After Kahan compensation and summation correction, the cumulative sum still maintains an accurate value of 1.0. In the Shannon entropy calculation stage, the logarithm of each probability component is calculated: for 0.4, the calculation... We get -1.3219; for 0.3, we calculate... We get -1.73697; for 0.2, we calculate... We get -2.3219; for 0.1, we calculate... The result is -3.3219. Multiplying each probability component by its logarithmic term and summing the negative values yields the initial Shannon entropy. This value represents the moderate disorder level of the neighborhood edge direction in the directional stability quantification index. Subsequent steps will dynamically adjust the gradient enhancement intensity based on this value to achieve a balance between enhancement and structural fidelity.
[0105] S4.4: Perform normalization mapping processing based on the initial Shannon entropy value to eliminate the influence of dimensions and generate a standardized directional stability index, ensuring that the index changes continuously in the interval from zero to one.
[0106] S4.5: Encapsulate the directional stability index into a directional stability parameter and output it as the sole control variable driving the dynamic changes of the subsequent principal directional gradient enhancement ratio coefficient and the orthogonal directional gradient suppression ratio coefficient.
[0107] Using the normalized directional stability index as the input object, the parameter encapsulation technique (parameters: index value, parameter structure definition) is called to map and embed the index into a preset directional stability parameter data structure.
[0108] By using a data tagging method (parameters: unique identifier for the parameter, control purpose label), the encapsulated directional stability parameter is given a purpose label that drives the dynamic change of the gradient enhancement ratio coefficient in the main direction and the gradient suppression ratio coefficient in the orthogonal direction, thus obtaining a parameter object with control semantics.
[0109] By using a precise encoding processing method (parameters: high-precision floating-point format, zero-to-one legal closed interval constraint), the index values inside the parameter object are encoded into a binary representation that conforms to the execution environment of the embedded device, and directional stability parameter encoding data that can be directly read by the hardware is generated.
[0110] By using an interface adaptation method (parameters: output data interface protocol, memory address mapping table), the directional stability parameter encoding data is bound to the input port of the subsequent dynamic coefficient mapping query module, and a parameter interface handle that can be directly called is generated.
[0111] By using structured output processing, the results of the previous step are transformed into directional stability parameter data with unique control variable attributes, thereby providing a continuously adjustable dynamic driving signal for the subsequent gradient enhancement process.
[0112] For example, in the application of edge enhancement for hot stamping patterns on nail art stickers, the normalized directional stability index is set to [value missing]. A parameter encapsulation technique is used to construct a parameter object containing the fields {value:0.35,type:"stability",unit:"normalized"}; a "gradient" tag is added to control the usage through data tagging. adjust The 0.35 is encoded into IEEE-754 single-precision format using a precise encoding method, which is represented in binary as 00111101001100110011001100110011; this encoded data is then mapped to the embedded processor's RAM address using an interface adaptation method. The parameter is bound to the input port of the dynamic coefficient mapping table query module. During execution, this parameter drives the reduction of the gradient enhancement ratio in the main direction and the increase of the gradient suppression ratio in the orthogonal direction in regions with high directional stability, significantly improving the enhancement effect. At the same time, it maintains the edge direction fidelity in high-entropy regions, resulting in a hot stamping pattern with uniform edge sharpness and no structural deformation.
[0113] Step S5: Based on the directional stability parameter, query a preset dynamic coefficient mapping table to obtain the principal direction gradient enhancement ratio coefficient and the orthogonal direction gradient suppression ratio coefficient, which monotonically decrease with the directional stability parameter, respectively, and generate a direction-aware dynamic adjustment factor pair. Specifically, this includes: S5.1: Based on the directional stability parameter generated in the previous steps as input conditions, call the dynamic coefficient mapping table data resource pre-stored in the embedded device's read-only memory, and perform a key-value retrieval operation to obtain the original mapping index data that matches the numerical range of the directional stability parameter.
[0114] Using the directional stability parameter output from the preceding steps as input, read-only memory access technology (parameter: embedded device ROM address mapping table) is employed to realize the access of dynamic coefficient mapping table data resources.
[0115] By using a key-value retrieval method (parameters: directional stability parameter value, mapping table key-value pair set), the matching relationship between the directional stability parameter and the preset value range in the mapping table is calculated, and index positioning data is obtained.
[0116] An interval matching determination method (parameters: upper and lower limits of the mapping table interval, directional stability parameter) is adopted to confirm that the directional stability parameter falls into the target interval and generate the corresponding interval label.
[0117] By using the original mapping index extraction method (parameters: interval label, mapping table entry set), the original mapping index data bound to the matching interval is obtained, and index records containing function relationship descriptions and initial coefficient values are obtained.
[0118] By employing a data structure loading processing method (parameter: original mapping index data), the index records from the previous step are transformed into structured data entries that can be accessed by subsequent nonlinear transformations, thereby achieving the technical effect of dynamic coefficient initialization.
[0119] For example, in the nail art patch pattern enhancement task, the ROM of the embedded image processing device pre-stores a dynamic coefficient mapping table. The table contains 50 consecutive intervals divided according to the directional stability parameter from 0.00 to 1.00, with each interval corresponding to a set of original mapping index data. The directional stability parameter is output from the preceding step S4.5, and its value in this embodiment is... When accessing the ROM, the key-value pair set of the mapping table is directly read using address mapping technology. An interval matching method is then used to compare the directional stability parameter with the upper and lower limits of each interval in the mapping table to find the range that falls within the specified interval. The interval labels are then extracted from the mapping table entry set, along with the original mapping index record bound to that interval label. This record contains a functional relationship defining the monotonically decreasing gradient enhancement coefficient in the principal direction and the gradient suppression coefficient in the orthogonal direction as a function of the parameters. This record is loaded as a structured index data entry and provided to the subsequent nonlinear mapping operation in S5.2 to ensure the correctness and real-time performance of the coefficient calculation. In the experiment, enhancement processing was performed according to this index data. The generated direction-aware dynamic adjustment factor significantly improved sharpness in edge regions with high directional consistency and effectively avoided edge deformation in high-entropy, cluttered regions.
[0120] S5.2: Using the monotonically decreasing function relationship defined in the original mapping index data, perform nonlinear transformation processing on the directional stability parameter to calculate the initial value of the principal direction gradient enhancement ratio coefficient, which decreases in value as the directional stability parameter increases.
[0121] S5.3: Based on the initial value of the main direction gradient enhancement ratio coefficient and the unit total constraint, perform complementary difference operation to derive the initial value of the orthogonal direction gradient suppression ratio coefficient, which is always equal to one when summed with the initial value of the main direction gradient enhancement ratio coefficient.
[0122] S5.4: For the initial values of the main direction gradient enhancement ratio coefficient and the orthogonal direction gradient suppression ratio coefficient, the boundary truncation method is applied to perform numerical range verification to ensure that both coefficients are within the legal closed interval of zero to one and to eliminate floating-point operation errors, thereby generating the calibrated main direction gradient enhancement ratio coefficient and the calibrated orthogonal direction gradient suppression ratio coefficient.
[0123] For the initial values of the main direction gradient enhancement scaling coefficient and the orthogonal direction gradient suppression scaling coefficient derived from the preceding sub-step S5.3, a numerical boundary truncation method (parameters: set of initial scaling coefficient values, legal interval [0,1]) is adopted to realize the range verification function of each scaling coefficient.
[0124] By using an interval comparison method (parameters: lower limit of zero, upper limit of one), the validity of the initial value of the gradient enhancement ratio coefficient in the main direction is checked, and the result of the coefficient value exceeding the boundary is obtained.
[0125] By using an interval comparison method (parameters: lower limit of zero, upper limit of one), the validity of the initial value of the gradient suppression ratio coefficient in the orthogonal direction is detected, and the result of the coefficient value judgment that exceeds the boundary is generated.
[0126] By performing boundary truncation processing (parameters: coefficient value determination result, initial value of scaling factor), coefficients below zero are set to zero, and coefficients above one are set to one, thus obtaining the main direction gradient enhancement scaling factor after floating-point error correction.
[0127] By performing boundary truncation (parameters: coefficient value determination result, initial value of proportional coefficient), coefficients below zero are set to zero, and coefficients above one are set to one, thus obtaining the orthogonal direction gradient suppression proportional coefficient after floating-point error correction.
[0128] By using boundary correction processing, the initial value of the scaling factor from the previous step is transformed into calibrated scaling factor data, thereby achieving the expected technical effect of continuous and legal variation of the scaling factor within the normalization interval.
[0129] S5.5: The calibrated principal direction gradient enhancement ratio and the calibrated orthogonal direction gradient suppression ratio are structurally encapsulated to generate a direction-aware dynamic adjustment factor pair containing dual-channel weight information, which serves as the direct control input for subsequent gradient vector weighted synthesis.
[0130] The gradient enhancement ratio coefficient and the gradient suppression ratio coefficient in the orthogonal direction, after calibration in step S5.4, are associatedly stored using a data structure encapsulation method (parameters: dual-channel coefficient values, channel identifiers).
[0131] By using metadata association methods (parameters: coefficient source identifier, directional stability parameter index), the binding relationship between coefficients and their generation conditions is realized, and encapsulated data units with condition traceability capabilities are obtained.
[0132] By using a dual-channel weight mapping method (parameters: principal direction coefficient, orthogonal direction coefficient), the channel weight attributes are explicitly encoded, and a readable and computable dual-channel weight entity is generated.
[0133] By using a serialization storage method (parameters: byte order scheme, length identifier), the dual-channel weight entity can be portablely saved and transformed into a unified data structure format so that it can be directly called by the subsequent gradient processing module.
[0134] By using an interface adaptation method (parameter: gradient vector weighting interface specification), the dual-channel weight data structure is seamlessly adapted to the subsequent gradient vector weighting synthesis processing link, enabling direct control of the input.
[0135] By using a structured encapsulation process, the calibration coefficient results from the previous step are transformed into direction-aware dynamic adjustment factor pairs, achieving the expected technical effect of weighted allocation of dual-channel gradient magnitudes.
[0136] For example, in a nail sticker pattern edge enhancement system, the principal direction gradient enhancement ratio obtained through step S5.4 is: The gradient suppression ratio in the orthogonal direction is When using data structure encapsulation, the principal direction coefficient is stored in a field. Orthogonal direction coefficients are stored in the field Using metadata association methods, the two are linked to the directional stability parameter. An index mapping relationship is established to ensure that subsequent modules can retrieve the corresponding weights based on parameters. A key-value pair {"main":0.68, "orth":0.32} is constructed using a dual-channel weight mapping method and serialized for storage. Little-endian byte order is used, with a length identifier of 4 bytes per field, enabling cross-platform calls. During the interface adaptation phase, this weight entity is directly transmitted to the gradient vector weighting module. The module calls the weights in the main direction and orthogonal direction in steps S6.2 and S6.3 respectively, performing amplitude amplification and attenuation. Verification results show that the enhanced gradient vector strictly follows the local edge direction, with significantly reduced noise levels and a substantial improvement in edge detail in the output image.
[0137] Step S6: Based on the main direction of the target pixel, extract the dual-channel gradient magnitudes along the main direction and its orthogonal directions. Use the direction-aware dynamic adjustment factor to weight and synthesize the dual-channel gradient magnitudes respectively, generating a direction-aligned enhanced gradient vector. Specifically, this includes: S6.1: Based on the orientation stability parameter generated in the previous steps and the main orientation angle of the target pixel, call the pre-constructed orientation-sensitive differential operator group to perform directional convolution operation on the original image grayscale data in the seven-by-seven spatial neighborhood, so as to separate the original gradient magnitude component extending along the main direction and the original gradient magnitude component extending along the orthogonal direction, forming a set of dual-channel original gradient magnitudes containing dual-channel orientation features.
[0138] Based on the orientation stability parameter generated in the previous steps and the principal orientation angle of the target pixel, the orientation-sensitive differential operator group calling method (parameters: orientation stability parameter value, principal orientation angle value, operator group index) is used to realize the directional convolution processing of the original image grayscale matrix in the 7x7 spatial neighborhood.
[0139] By performing directional convolution operations (parameters: convolution stride of 1, convolution kernel size of 3×3, and convolution kernel coefficients calculated according to the main direction rotation matrix), gradient components extending along the main direction are separated, and the original gradient magnitude matrix in the main direction is obtained. A scalar of the gradient magnitude in the main direction is output for the center position of each pixel.
[0140] By calling the same direction sensitive differential operator group to perform convolution operation in the orthogonal direction (parameter: convolution kernel coefficients are calculated by adding a π / 2 rotation matrix in the main direction), the gradient components extending along the orthogonal direction are separated, and the original gradient magnitude matrix in the orthogonal direction is obtained. An orthogonal gradient magnitude scalar is output for the center position of each pixel.
[0141] A dual-channel component integration technique (parameters: original gradient magnitude matrix in the main direction and original gradient magnitude matrix in the orthogonal direction) is adopted to achieve structured pairing of gradient components in the main direction and orthogonal direction, generating an original gradient magnitude set containing dual-channel directional features.
[0142] By structurally encapsulating the dual-channel directional feature data, the dual-channel directional features, along with the corresponding pixel coordinates and main direction angle metadata, are output together, thus providing a complete set of original dual-channel gradient magnitudes for subsequent direction-aware dynamic adjustment.
[0143] By integrating directional convolution with dual-channel components, the directional stability parameters and principal orientation angles from the previous step are transformed into quantifiable dual-channel raw gradient magnitude data, enabling precise separation and pairing of local directional gradients and providing high-precision input for adaptive weighted synthesis.
[0144] For example, in the nail sticker production process, for a grayscale image of a hot stamping pattern with a resolution of 640×480, the principal orientation angle of the target pixel is selected as... Degree, directional stability parameter value The 3×3 convolution kernel corresponding to index 5 of the direction-sensitive differential operator group is invoked, and the kernel coefficients in the principal direction are calculated using the rotation matrix. The original gradient magnitude matrix of the principal direction is generated by scanning within a 7x7 spatial neighborhood. The convolution kernel is then rotated using the same method. Degrees, to obtain the convolution kernel coefficients in orthogonal directions. This generates the original gradient magnitude matrix in orthogonal directions. Within different texture regions, the gradient magnitude in the principal direction can reach... The gradient magnitude in the orthogonal direction is only The paired output of dual-channel directional features enables the subsequent dynamic adjustment of S6.2 and S6.3 to significantly improve edge direction fidelity and control noise interference.
[0145] S6.2: For the original gradient magnitude components in the main direction of the dual-channel original gradient magnitude set, read the main direction gradient enhancement ratio coefficient obtained from the direction stability parameter index, perform linear gain mapping processing, and amplify the original gradient magnitude components in the main direction into main direction enhanced gradient magnitudes with high response characteristics to highlight the contrast of significant edge structures.
[0146] For the principal direction original gradient magnitude components in the dual-channel original gradient magnitude set, a proportional coefficient index retrieval technique (parameter: directional stability parameter) is used to extract the principal direction gradient enhancement proportional coefficient from a preset dynamic coefficient mapping table.
[0147] By using the linear gain mapping technique (parameters: principal direction gradient enhancement ratio coefficient, principal direction original gradient magnitude component), the gradient magnitude is amplified, and principal direction enhanced gradient magnitude data with directional weights is obtained.
[0148] A method for constructing an amplitude scaling function (parameters: principal direction gradient enhancement ratio coefficient, amplitude reference) is adopted to realize the numerical mapping of the original gradient amplitude components in the principal direction.
[0149] By using the amplitude contrast recalibration technique (parameters: neighborhood grayscale statistics, enhanced amplitude data), the contrast of the main direction enhancement gradient after numerical amplification is optimized, and directional feature data that meets the expected edge saliency is generated.
[0150] By enhancing the magnitude of the main direction, the original dual-channel gradient data from the previous step is transformed into a main direction enhanced gradient magnitude with significantly improved contrast and prominent directional structure, thereby achieving high response characteristics with prominent edge structures.
[0151] For example, in the nail sticker heat transfer pattern processing scenario, the input principal direction original gradient magnitude component is 0.35, the principal direction gradient enhancement ratio obtained by the previous step indexing is 0.72, and the linear gain mapping calculation result is 0.252. This enhanced gradient magnitude is recalibrated after direction alignment using a neighborhood grayscale variance of 0.18 to ensure a significant increase in magnitude in low texture complexity regions while preventing overshoot in high-entropy regions. Performance verification shows that the principal direction gradient processed in this step significantly improves edge sharpness in the output image, resulting in continuous and complete edge direction without local artifacts.
[0152] S6.3: For the orthogonal direction original gradient magnitude components in the dual-channel original gradient magnitude set, read the orthogonal direction gradient suppression ratio coefficient obtained from the direction stability parameter index, perform attenuation constraint processing, and compress the orthogonal direction original gradient magnitude components into orthogonal direction suppressed gradient magnitudes with low noise characteristics to eliminate artifact interference caused by direction clutter.
[0153] For the orthogonal gradient magnitude components in the dual-channel original gradient magnitude set, an index retrieval method (parameter: mapping table of directional stability parameters and dynamic coefficients) is used to read the orthogonal gradient suppression ratio coefficient.
[0154] By using the attenuation constraint technique (parameters: suppression ratio coefficient and original gradient magnitude component in the orthogonal direction), the magnitude of the gradient in the orthogonal direction is compressed, and low-noise orthogonal direction suppressed gradient data is obtained.
[0155] A noise feature analysis method (parameters: compressed orthogonal direction suppressed gradient and edge direction feature data) is used to effectively identify artifact interference and generate the corresponding noise suppression weight matrix.
[0156] By using a weight matrix modulation method (parameters: noise suppression weight matrix and compressed orthogonal direction gradient magnitude data), the interference components are further attenuated, and orthogonal direction suppressed gradient components that meet the edge direction consistency constraints are obtained.
[0157] An amplitude calibration technique (parameters: orthogonal direction suppressed gradient component and dynamic range constraint parameter) is used to adjust the legal range of gradient amplitude and generate the final orthogonal direction suppressed gradient output that can be used for vector fusion.
[0158] By using orthogonal direction suppression processing, the original orthogonal direction gradient magnitude from the previous step is transformed into suppressed gradient data with low noise characteristics, thereby eliminating artifact interference and maintaining structural integrity in regions with cluttered orientations.
[0159] For example, in the edge enhancement processing of hot stamping patterns on nail art patches, the input original gradient amplitude component in the orthogonal direction is in grayscale units of 128. The orthogonal direction gradient suppression ratio coefficient is obtained as 0.35 through the directional stability parameter index. Using attenuation constraints, the following calculations are performed: The suppressed gradient value is then modulated with the corresponding weight coefficient of 0.82 in the weight matrix generated by noise feature analysis to obtain the adjusted amplitude. Amplitude calibration is used to constrain the results to the legal grayscale gradient range [0, 255], resulting in the final orthogonal direction suppressed gradient value. This value significantly improves directional consistency in subsequent fusion with the main direction enhancement gradient, reduces blurring and artifacts in edge intersection areas, and the output enhancement gradient vector provides a stable and repeatable improvement in the edge sharpness of the hot stamping pattern when running in real time on an embedded image processing device.
[0160] S6.4: Based on the enhancement of gradient magnitude in the main direction and the suppression of gradient magnitude in the orthogonal direction, a vector synthesis matrix is constructed, and a weighted vector superposition operation is performed to fuse the differentially adjusted dual-channel gradient components into a single direction-aligned synthesized gradient vector, ensuring that the output vector strictly follows the local edge direction and the magnitude meets the adaptive enhancement requirements.
[0161] S6.5: Perform magnitude normalization and phase verification on the direction-aligned synthesized gradient vector, remove abnormal gradient extrema that exceed the dynamic range and correct the direction deviation, and finally generate a standard direction-aligned enhanced gradient vector for subsequent local contrast recalibration, completing the end-to-end transformation from the original grayscale data to the high-precision edge enhancement vector.
[0162] Step S7: Combining the gray-level variance of the 7x7 neighborhood with the directional stability parameter to constrain the mapping slope, the directional aligned enhanced gradient vector is projected back into the original pixel gray-level space to perform local contrast recalibration, generating intermediate image data after edge sharpness compensation. Specifically, this includes: S7.1: Perform variance statistical analysis on the original pixel gray values in the 7x7 spatial neighborhood, calculate the neighborhood gray variance parameter that characterizes the local texture complexity, and use the neighborhood gray variance parameter as the basic input condition for subsequent mapping slope constraints.
[0163] S7.2: Based on the directional stability parameter generated in the previous step and the neighborhood gray-level variance parameter obtained in the current step, perform a two-factor coupling operation to construct a dynamic constraint function and generate an adaptive mapping slope control coefficient to limit the enhancement amplitude.
[0164] S7.3: The adaptive mapping slope control coefficient is used to linearly scale the direction-aligned enhancement gradient vector to generate a modified enhancement gradient vector that has been amplitude suppressed and conforms to the local structural characteristics, so as to eliminate the risk of overshoot in the high-entropy region.
[0165] A direct correspondence is established between the direction-aligned enhancement gradient vector and the adaptive mapping slope control coefficient, clarifying the input object and constraints of the scaling process.
[0166] A scaling technique (parameters: adaptive mapping slope control coefficient, direction-aligned enhanced gradient vector) is used to achieve linear adjustment of the gradient vector magnitude and obtain pre-scaled enhanced gradient vector data.
[0167] By using the amplitude constraint technique (parameters: neighborhood gray-level variance parameter, directional stability parameter), the amplitude boundary of the initial scaling gradient vector is restricted, and an amplitude-corrected gradient vector that conforms to the local texture complexity is generated.
[0168] An abnormal amplitude removal technique (parameter: high-entropy region threshold) is used to detect and remove high-amplitude components in the corrected gradient vector that may cause overshoot risk, and obtain the gradient vector after overshoot risk elimination.
[0169] By using a local structural feature matching technique (parameters: modified gradient vector, unmodified gradient vector), the consistency between the scaling effect and the original directional features is verified, and finally, a modified and enhanced gradient vector with amplitude suppression and conforming to local structural features is generated.
[0170] Enhanced gradient vectors with orientation alignment Perform linear scaling.
[0171] By using amplitude suppression processing, the result of the previous step is transformed into a corrected and enhanced gradient vector that conforms to local structural features and has no overshoot risk, thereby achieving the safety and orientation fidelity of image enhancement in high-entropy regions.
[0172] For example, in the scenario of hot stamping patterns on nail art stickers, the measured value of the neighborhood grayscale variance parameter is: The directional stability parameter is The two-factor coupling function generates the adaptive mapping slope control coefficient. The mean magnitude of the enhanced gradient vector with aligned directions. Substituting the scaling formula, we obtain the mean magnitude of the corrected enhanced gradient vector as follows: The calculation result is In high-entropy regions (Shannon entropy greater than...), The pixel position is further constrained by amplitude boundary, and the magnitude exceeds the limit. Reduce the amount to Ultimately, the modulus distribution of the enhanced gradient vector is stable across the entire image without any local overshoot. The application results are as follows: in the edge areas of multi-directional intersecting hot stamping patterns, the sharpness of the enhanced pattern is significantly improved, the original edge direction structure remains intact, and there is no step distortion or artifact generation caused by over-enhancement.
[0173] S7.4: Project the modified and enhanced gradient vector back into the original pixel grayscale space and perform an algebraic superposition operation with the reference grayscale value of the center pixel to generate an intermediate pixel grayscale update value containing local contrast enhancement information.
[0174] S7.5: Perform global integration and boundary smoothing on the grayscale update values of the intermediate pixels corresponding to all target pixels in the entire image to generate intermediate image data after edge sharpness compensation, which serves as the direct input to the final hot stamping control command source.
[0175] For the intermediate pixel grayscale update value matrix generated after local contrast recalibration, a global integration processing method (parameter: global pixel index range) is adopted to achieve the convergence and consistency correction of update values across the entire image.
[0176] By using a multi-kernel weighted synthesis method (parameters: brightness weight kernel, edge weight kernel), the weighted fusion of grayscale updates in different regions is achieved, and the fused global grayscale update matrix is obtained.
[0177] A boundary smoothing convolution technique (parameters: Gaussian kernel radius 3, weight decay factor 0.5) is used to smooth the transition region at the edge of the fusion matrix and generate smooth grayscale boundary data that eliminates abrupt changes.
[0178] By using the gradient consistency verification method (parameter: directional stability threshold 0.6), the directional structural consistency of smooth gray-level boundary data is verified, and tiny noise points that do not meet the directional consistency condition are removed, resulting in a structurally stable global gray-level mapping matrix.
[0179] A pixel value normalization method (parameter: normalization interval [0,255]) is adopted to achieve standardized adjustment of the value range of the global grayscale mapping matrix and form intermediate image data after edge sharpness compensation to adapt to hot stamping control instructions.
[0180] By integrating the entire domain and smoothing the boundaries, the local update values from the previous step are transformed into intermediate image data that are consistent across the entire domain and have natural edge transitions, thereby achieving the expected technical effects of improving the overall sharpness of the intermediate image and suppressing artifacts.
[0181] For example, in a high-precision nail sticker hot stamping production scenario, for a 1920×1080 resolution grayscale image of the hot stamping pattern, a 5×5 mean kernel is set for the brightness weight kernel and a 5×5 Laplacian enhancement kernel is set for the edge weight kernel during global integration processing. A global grayscale update matrix is obtained through fusion calculation. A Gaussian kernel radius of 3 and a weight decay factor of 0.5 are applied for boundary smoothing convolution to ensure smooth brightness gradient changes in the edge transition area. A gradient consistency check is performed using a directional stability threshold of 0.6 to remove noise points with amplitudes less than 5, thereby maintaining edge structure consistency. Pixel values are normalized to the range [0, 255] to obtain the final intermediate image data adapted to the hot stamping equipment. In this embodiment, the intermediate image after global integration significantly improves edge sharpness and maintains edge direction consistency during the hot stamping process. The nail sticker pattern boundary after hot stamping exhibits no step distortion and high fidelity.
[0182] Step S8: Output the intermediate image data after edge sharpness compensation as the final hot stamping control command source, completing the adaptive gradient enhancement processing flow based on edge direction entropy stability. Specifically, it includes: S8.1: Obtain the direction-aligned enhanced gradient vector and the corresponding 7x7 spatial neighborhood original pixel data, and perform gray-level variance statistical operation on the 7x7 spatial neighborhood original pixel data to generate a neighborhood gray-level variance parameter that characterizes the local texture complexity.
[0183] The input conditions include the orientation-aligned enhancement gradient vector generated in the previous step and its corresponding 7x7 spatial neighborhood original pixel grayscale matrix.
[0184] A matrix indexing positioning method (parameters: center pixel coordinates, window size = 7×7) is used to achieve the association retrieval between the enhanced gradient vector and the original neighborhood grayscale data.
[0185] The average gray level of the original neighborhood is obtained by using a gray-level statistical calculation method (parameter: pixel gray-level matrix), and the local center gray-level reference value is obtained.
[0186] A variance calculation method (parameters: neighborhood grayscale matrix, local center grayscale reference value) is used to quantify the intensity of neighborhood grayscale fluctuations.
[0187] The variance parameter of the neighborhood gray level is calculated using the above variance calculation method.
[0188] The calculated gray-scale variance parameter is used to transform the results of the previous step into a data index characterizing the local texture complexity, thus preparing the input for the dynamic constraint of the subsequent mapping slope.
[0189] For example, in the production of nail sticker hot stamping, a 7x7 pixel neighborhood grayscale matrix is calculated for the edge of the pattern. The grayscale value of the center pixel is 128, and the neighborhood average value μ is calculated to be 126.4 using a mean calculation method. The total number of neighborhood pixels n is set to 49. The sum of the squared differences between each pixel's grayscale value and μ yields a cumulative value of 2450. The calculated variance parameter is approximately 7.12. This value is used as an input factor for the nonlinear mapping function in subsequent steps, imposing a strong mapping slope constraint on areas with high texture complexity. This significantly improves the stability of the edge enhancement process and avoids step distortion in complex backgrounds.
[0190] S8.2: Read the directional stability parameter generated in the previous step, and input the neighborhood gray-level variance parameter and the directional stability parameter as two factors into the nonlinear mapping function. Perform dynamic solution processing of the mapping slope to generate an adaptive recalibration slope coefficient for controlling the contrast adjustment amplitude.
[0191] S8.3: Based on the adaptive recalibration slope coefficient, the enhanced gradient vector aligned to the direction is scaled to generate a local contrast increment vector corrected by slope constraint, ensuring that the enhancement intensity adapts to the consistency of edge direction and texture complexity.
[0192] S8.4: Project the slope-constrained local contrast increment vector back into the original pixel grayscale space, and perform a superposition and fusion operation with the grayscale value of the corresponding target pixel in the original image data of the hot stamping pattern to be processed, so as to generate intermediate image data after edge clarity compensation with the elimination of step distortion and edge sharpening.
[0193] Using the slope-constrained local contrast increment vector as input data, the pixel grayscale space projection technique (parameters: local contrast increment vector, directional stability parameter, grayscale variance parameter) is employed to map the enhanced information back to the original pixel grayscale domain, thereby preserving local structural features.
[0194] By using a grayscale domain overlay fusion method (parameters: target pixel grayscale value, correction increment vector), the enhanced information and the original grayscale reference are algebraically synthesized to obtain the fused pixel grayscale update value.
[0195] By using the neighborhood consistency constraint method (parameters: 7x7 spatial neighborhood data block, fused grayscale update value), the local fusion result is matched with the neighborhood statistical characteristics, generating pixel grayscale values that are continuous in the edge direction and do not introduce step distortion.
[0196] A boundary smoothing method (parameters: fused image matrix, edge pixel identifier mask) is used to eliminate sharpness abrupt changes in transition regions and obtain an edge sharpness compensation image matrix with artifacts eliminated.
[0197] By performing a global integration operation (parameter: fusion result of all target pixels), the pixel update values from the previous step are transformed into intermediate image data, achieving the desired technical effect of balancing edge sharpening and orientation fidelity.
[0198] For example, in the nail sticker hot stamping control scenario, the adaptive recalibration slope coefficient is set to 0.65, the original grayscale value of the target pixel is 124, the correction enhancement gradient magnitude is 21, and the algebraic superposition formula is used: in, The resulting grayscale value. The original grayscale value. The slope coefficient, To correct and enhance the gradient magnitude, substituting the parameters, we calculate: The result is The value is cropped to an integer range to obtain 138 as the target pixel update value. After neighborhood mean filtering, the edge sharpness at this pixel is significantly improved, the structural orientation remains intact, and the edge lines of the hot stamping output pattern exhibit a smooth and high-contrast visual effect, avoiding step distortion and artifacts. In actual pattern production testing, the directional consistency is significantly improved.
[0199] S8.5: Output the intermediate image data after edge sharpness compensation as the final hot stamping control command source, complete the adaptive gradient enhancement processing flow based on edge direction entropy stability, and provide a high-fidelity pattern driving signal for subsequent nail sticker hot stamping equipment.
[0200] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.
[0201] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.
[0202] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for compensating for the edge clarity of a nail sticker heat-pressed pattern, specifically including: S1: Obtain the original image data of the hot stamping pattern to be processed, and perform convolution operation on the original image data at forty-eight uniformly distributed angles based on the learnable orientation sensitive kernel group to generate an initial orientation response map set; S2: For each target pixel in the initial orientation response map set, construct a 7x7 spatial neighborhood centered on it, filter out the significant edge pixels in the 7x7 spatial neighborhood, and generate a significant edge pixel subset; S3: Extract the main orientation angles corresponding to each pixel in the significant edge pixel subset and map them to the interval from zero to π. Statistically calculate the distribution frequency of the main orientation angles and normalize them to generate an orientation probability distribution. S4: Calculate the Shannon entropy value based on the directional probability distribution, define it as a directional stability index, and generate directional stability parameters; S5: Based on the directional stability parameter, query the dynamic coefficient mapping table to obtain the main direction gradient enhancement ratio coefficient and the orthogonal direction gradient suppression ratio coefficient, and generate a direction-aware dynamic adjustment factor pair. S6: Extract the dual-channel gradient magnitude along the main direction and its orthogonal direction based on the main direction of the target pixel, and use the direction-aware dynamic adjustment factor to weight and synthesize them to generate a direction-aligned enhanced gradient vector. S7: Combine the gray-level variance and directional stability parameter of the seven-by-seven spatial neighborhood to constrain the mapping slope, project the enhanced gradient vector back to the original pixel gray-level space to perform local contrast recalibration, and generate intermediate image data after edge sharpness compensation. S8: Output intermediate image data as the source of final hot stamping control instructions.
2. The method for compensating for the edge clarity of a nail sticker heat-printed pattern according to claim 1, characterized in that, The initial directional response map set contains multi-scale directional response information.
3. The method for compensating for the edge clarity of a nail sticker heat-printed pattern according to claim 1, characterized in that, The directional probability distribution characterizes the consistency of edge directions within the neighborhood.
4. The method for compensating for the edge clarity of a nail sticker heat-printed pattern according to claim 1, characterized in that, The gradient enhancement ratio in the main direction and the gradient suppression ratio in the orthogonal direction decrease monotonically with the directional stability parameter.
5. The method for compensating for the edge clarity of a nail sticker heat-printed pattern according to claim 1, characterized in that, Step S3 specifically includes: Perform principal direction angle retrieval for each salient edge pixel in the salient edge pixel subset to obtain the original principal direction angle data corresponding to each salient edge pixel; The acquired raw principal orientation angle data is subjected to periodic mapping transformation processing, and angle values greater than or equal to π are subtracted from π, so as to uniformly map all raw principal orientation angle data to a half-open interval from zero to π, generating a standardized set of principal orientation angles; Based on the standardized principal orientation angle set, a discrete angle histogram statistical model is constructed in the interval from zero to π. Frequency counting processing is performed to count the occurrence frequency of the standardized principal orientation angle in each angle interval and generate the original orientation frequency distribution data. Perform a summation normalization operation on the original directional frequency distribution data, divide the occurrence frequency of each angle interval by the total number of pixels in the significant edge pixel subset, eliminate the influence of differences in the number of neighboring pixels, and generate normalized directional probability distribution data; Based on the normalized directional probability distribution data, a directional probability distribution object representing the consistency of edge directions within a 7x7 spatial neighborhood is encapsulated.
6. The method for compensating for the edge clarity of a nail sticker heat-printed pattern according to claim 5, characterized in that, The main direction angle retrieval for each salient edge pixel in the salient edge pixel subset is based on the convolution response values of forty-eight uniformly distributed angles in the initial direction response map set.
7. The method for compensating for the edge clarity of a nail sticker heat-printed pattern according to claim 1, characterized in that, Step S4 specifically includes: Logarithmic operations are performed on each probability component in the directional probability distribution to obtain a set of negative logarithmic weight values corresponding to each major directional angle, providing basic data units for subsequent weighted summation; The negative logarithmic weight value set is used to perform element-wise multiplication with the original probability components in the directional probability distribution to generate a local information sequence that represents the contribution of each directional angle information. The initial Shannon entropy value, reflecting the overall disorder of the edge directions within the seven-by-seven spatial neighborhood, is calculated based on the local information sequence. Normalization mapping is performed based on the initial Shannon entropy value to eliminate the influence of dimensions and generate a standardized directional stability index, ensuring that the index changes continuously in the interval from zero to one. The directional stability index is encapsulated as a directional stability parameter and output as the sole control variable driving the dynamic changes of the subsequent principal directional gradient enhancement ratio and the orthogonal directional gradient suppression ratio.
8. The method for compensating for the edge clarity of a nail sticker heat-printed pattern according to claim 7, characterized in that, The initial Shannon entropy value, which reflects the overall disorder of the edge direction within the seven-by-seven spatial neighborhood, is calculated based on the local information sequence. Specifically, this is achieved by performing a full summation operation based on the local information sequence.
9. The method for compensating for the edge clarity of a nail sticker heat-printed pattern according to claim 1, characterized in that, Step S5 specifically includes: Input the directional stability parameter, call the dynamic coefficient mapping table of the embedded device's read-only memory, and obtain the original mapping index data that matches the numerical range of the directional stability parameter; Using the monotonically decreasing function relationship defined in the original mapping index data, a nonlinear transformation is performed on the directional stability parameter to calculate the initial value of the principal direction gradient enhancement ratio coefficient, which decreases in value as the directional stability parameter increases. Based on the initial value of the gradient enhancement ratio coefficient in the main direction and the unit total amount constraint, complementary difference operation is performed to derive the initial value of the gradient suppression ratio coefficient in the orthogonal direction, which is always equal to one when summed with the initial value of the gradient enhancement ratio coefficient in the main direction. For the initial values of the gradient enhancement ratio coefficient in the main direction and the gradient suppression ratio coefficient in the orthogonal direction, the numerical range is verified, and the calibrated gradient enhancement ratio coefficient in the main direction and the calibrated gradient suppression ratio coefficient in the orthogonal direction are generated. The gradient enhancement ratio in the main direction and the gradient suppression ratio in the orthogonal direction are structurally encapsulated to generate a pair of direction-aware dynamic adjustment factors containing dual-channel weight information.
10. The method for compensating for the edge clarity of a nail sticker heat-printed pattern according to claim 9, characterized in that, The main direction gradient enhancement ratio and the calibrated orthogonal direction gradient suppression ratio are both within a legal closed interval of zero to one, thus eliminating floating-point operation errors.