Industrial character foreground data generation method and related device

By generating industrial character foreground data through rendering, distance transformation, and normal calculation, the problem of single character geometry and poor scalability in existing technologies is solved, and character recognition adaptable to diverse industrial scenarios is realized.

CN122492869APending Publication Date: 2026-07-31CENT SOUTH UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CENT SOUTH UNIV
Filing Date
2026-04-27
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing industrial character data generation methods rely on real image acquisition, resulting in simple character geometry, poor scalability, and an inability to simulate the diversity of character geometric deformation in real-world scenarios, leading to insufficient generalization ability of recognition models.

Method used

By setting font parameters to render characters, a binary mask image is generated. A distance transformation is performed to obtain a normalized distance map. The height map is determined using the cross-section function and depth parameters. The surface normal vector is calculated, and the character normal map is generated as foreground image data for industrial characters.

Benefits of technology

It realizes the mapping from two-dimensional vector contours to three-dimensional normal vector fields, generating character data with real three-dimensional lighting and shadow features, improving the diversity and scalability of data, and adapting to the character recognition needs of different industrial scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492869A_ABST
    Figure CN122492869A_ABST
Patent Text Reader

Abstract

This invention provides a method and related equipment for generating industrial character foreground data. The method involves rendering all characters in a target character set using set font parameters to obtain a binary mask image; performing a distance transformation on the binary mask image to obtain a normalized distance map; setting a cross-section function using the normalized distance map; and determining a height map based on the normalized distance map, the cross-section function, and set depth parameters; calculating surface normal vectors based on the height map; and generating character normal maps as industrial character foreground image data based on these surface normal vectors. Compared with existing technologies, the core of this invention lies in establishing a mapping from a two-dimensional vector contour to a three-dimensional normal vector field, solving the problems of existing industrial character data generation methods that rely on real image acquisition, have limited character geometry, and poor scalability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial character recognition technology, and in particular to a method and related equipment for generating industrial character foreground data. Background Technology

[0002] In modern industrial production, character markings on the surface of metal parts are typically formed directly through processes such as stamping, engraving, or embossing. These industrial characters usually exhibit a three-dimensional structure with raised or recessed surfaces, possessing characteristics such as wear resistance, corrosion resistance, and adaptability to harsh environments. Therefore, they are widely used in important scenarios such as product batch identification, production date recording, and product traceability. However, in actual production management, the reading of this character information still largely relies on manual methods, which is not only inefficient but also susceptible to errors due to human factors. To improve the automation level and information management capabilities of industrial production, developing an automatic industrial character detection and recognition system based on computer vision technology has become an important direction for the development of intelligent industry.

[0003] Deep learning-based text recognition technology offers a feasible technical path for the automated reading of industrial characters, but its performance heavily relies on large-scale, high-quality labeled data. However, acquiring such data in real-world industrial scenarios faces numerous challenges: firstly, publicly available industrial text datasets are scarce, and different manufacturers exhibit significant differences in character fonts, sizes, layouts, and labeling methods, making general datasets difficult to adapt to specific production environments; secondly, the text content of products from the same batch is often highly similar, with only a few characters varying, resulting in insufficient diversity in the collected data. Furthermore, unlike ordinary planar text, which relies primarily on the contrast between foreground and background colors for visibility, industrial characters typically create visual contrast through shadows and highlights generated by their surface geometry under illumination. This reliance on illumination variations makes the visual appearance of characters susceptible to factors such as light source direction, surface roughness, and workpiece shape, further increasing the complexity and cost of data acquisition and labeling. Therefore, generating industrial character image data through synthesis has become an effective way to address the lack of training data.

[0004] Existing industrial text image synthesis methods, while partially incorporating normal maps to simulate the 3D structure of characters, often rely on the extraction and reuse of character normal information from real industrial images for character foreground generation. This approach has significant limitations: First, the construction of a character normal map library depends on the acquisition and processing of real industrial images, requiring the acquisition of high-quality images covering all character categories. When new character categories or font styles need to be supported, the image acquisition and normal extraction process must be repeated, resulting in high data preparation costs and long cycles. Second, the extracted character surface geometry is fixed to the state at the time of acquisition, lacking the ability to simulate character geometric deformation. In real industrial scenarios, the same character may exhibit different depths of concavity and edge shapes due to factors such as stamping pressure, wear, and process differences. For example, excessive stamping may cause edge collapse, or wear may cause smoothing of corners. Basic methods based on real-world extraction struggle to simulate this diversity of text foreground morphology. Furthermore, conventional planar text synthesis methods cannot reflect the unique three-dimensional geometric features of industrial characters, resulting in differences in the distribution between synthesized data and real data, which affects the generalization ability of the recognition model. Moreover, existing synthesis methods mostly focus on color space transformation or simple texture fusion, failing to flexibly control the three-dimensional surface contours of characters from a geometric perspective. Summary of the Invention

[0005] This invention provides a method and related equipment for generating industrial character foreground data, which aims to solve the problems of existing industrial character data generation methods, such as reliance on real image acquisition, limited character geometry, and poor scalability.

[0006] To achieve the above objectives, the present invention provides a method for generating industrial character foreground data, comprising: Step 1: Render all characters in the target character set using the set font parameters to obtain a binary mask image; Step 2: Perform a distance transform on the binary mask image to obtain a normalized distance map; Step 3: Use the normalized distance map to set the cross-section function, and determine the height map based on the normalized distance map, the cross-section function, and the set depth parameters; Step 4: Calculate the surface normal vector based on the height map, and generate a character normal map based on the surface normal vector as foreground image data for industrial characters.

[0007] Furthermore, font parameters include: The font type parameter determines the basic shape and style of the character; Font scaling factor, used to control the overall size of characters; The thickness of the strokes controls the width of the character lines.

[0008] Furthermore, step 2 includes: Perform a distance transform on each pixel of the binary mask image to generate a distance field; The distance field is normalized to obtain a normalized distance map.

[0009] Furthermore, the expression for generating the range field by performing a distance transformation on each pixel in the binary mask image is: ; in, Represents foreground pixels The distance field, Represents the set of background pixels. Represents background pixels.

[0010] Furthermore, the section function includes: Conical section function, flat-top section function, sinusoidal section function.

[0011] Furthermore, calculating the surface normal vector based on the height map includes: The Sobel operator is used to calculate the height map to obtain the gradient components in the horizontal and vertical directions; The initial normal vector of each foreground pixel is obtained by calculating the gradient components in the horizontal and vertical directions on the foreground pixels in the height map. Normalize the initial normal vector of each foreground pixel to obtain the surface normal vector.

[0012] Furthermore, by using the gradient components in the horizontal and vertical directions to calculate the foreground pixels in the height map, the formula for calculating the initial normal vector of each foreground pixel is as follows: ; in, Represents foreground pixels The initial normal vector, Represents foreground pixels The gradient component in the horizontal direction, Represents foreground pixels The gradient component in the vertical direction, This represents the depth parameter.

[0013] The present invention also provides an industrial character foreground data generation device, comprising: The rendering module is used to render all characters in the target character set using the set font parameters to obtain a binary mask image; The transformation module is used to perform distance transformation on the binary mask image to obtain a normalized distance map. The determination module is used to set the cross-section function using the normalized distance map, and to determine the height map based on the normalized distance map, the cross-section function, and the set depth parameters; The calculation module is used to calculate the surface normal vector based on the height map, and generate a character normal map as foreground image data for industrial characters based on the surface normal vector.

[0014] The present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement an industrial character foreground data generation method.

[0015] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a method for generating industrial character foreground data.

[0016] The above-described solution of the present invention has the following beneficial effects: This invention renders all characters in a target character set using set font parameters to obtain a binary mask image; performs a distance transformation on the binary mask image to obtain a normalized distance map; sets a cross-section function using the normalized distance map, and determines a height map based on the normalized distance map, the cross-section function, and set depth parameters; calculates surface normal vectors based on the height map, and generates character normal maps as foreground image data for industrial characters based on the surface normal vectors; compared with the prior art, the core of this invention lies in establishing a mapping from a two-dimensional vector contour to a three-dimensional normal vector field, solving the problems of existing industrial character data generation methods that rely on real image acquisition, have simple character geometry, and poor scalability.

[0017] Other beneficial effects of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the industrial character foreground data generation device in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the terminal device in an embodiment of the present invention. Detailed Implementation

[0019] To make the technical problems, solutions, and advantages of this invention clearer, a detailed description will be provided below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0020] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0021] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a locking connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0022] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0023] This invention addresses existing problems by providing a method and related equipment for generating industrial character foreground data.

[0024] like Figure 1 As shown, an embodiment of the present invention provides a method for generating industrial character foreground data, including: Step 1: Render all characters in the target character set using the set font parameters to obtain a binary mask image; Step 2: Perform a distance transform on the binary mask image to obtain a normalized distance map; Step 3: Use the normalized distance map to set the cross-section function, and determine the height map based on the normalized distance map, the cross-section function, and the set depth parameters; Step 4: Calculate the surface normal vector based on the height map, and generate a character normal map based on the surface normal vector as foreground image data for industrial characters.

[0025] Specifically, the font parameters include: The font type parameter determines the basic shape and style of the character; Font scaling factor, used to control the overall size of characters; The thickness of the strokes controls the width of the character lines.

[0026] The font parameters in this embodiment of the invention have the characteristic of being resolution-independent, and can adapt to the generation requirements of different sizes.

[0027] In this embodiment of the invention, the characters in the target character set are characters used in industrial scenarios, such as product batch identifiers, production date records, and product traceability.

[0028] In this embodiment of the invention, all characters in the target character set are rendered one by one using the set font parameters, resulting in a binary mask image. The character foreground pixel value is 255, and the background pixel value is 0.

[0029] Specifically, step 2 includes: For binary masked images Each pixel in the array undergoes a distance transformation to generate a distance field; The distance field is normalized to obtain a normalized distance map.

[0030] Specifically, the distance transformation is performed on each pixel in the binary mask image, and the expression for generating the distance field is as follows: ; in, Represents foreground pixels The distance field, Represents the set of background pixels. , Represents background pixels.

[0031] Specifically, the distance field is normalized to obtain the expression for the normalized distance map: ; in, Represents a normalized distance plot. This represents the maximum value of the distance field. .

[0032] In this embodiment of the invention, the normalized distance map is distributed in The interval is defined as follows: 0 corresponds to the edge of a character, and 1 corresponds to the highest point of the character's center.

[0033] Specifically, step 3 includes: The cross-section function is defined using a normalized distance plot. The cross-section function includes a conical cross-section function, a flat-top cross-section function, and a sinusoidal cross-section function. Set the depth parameter, which controls the maximum depth of the character indentation; A height map is obtained by using a normalized distance map, depth parameters, and cross-section functions.

[0034] Specifically, the cross-sectional function is defined using a normalized distance plot, including: A linear mapping is applied to the normalized distance map so that its height values ​​decrease linearly with distance, resulting in a conical cross-section function. This cross-section function can produce a uniformly gradually changing concave surface, expressed as: ; ; in, Represents a normalized distance plot. Represents the section function; By segmenting the normalized distance map to ensure a constant height in the central region and a linear transition in the edge regions, a flat-topped cross-section function is obtained. This cross-section function has a consistent height in the central region and distinct steps at the edges, expressed as: ; By mapping the normalized distance map using a sine function, a sinusoidal cross-sectional function is obtained. This cross-sectional function has a gentle slope at the center of the character strokes, and the slope increases at the edges. Its expression is: .

[0035] The section function in this embodiment of the invention defines the height variation curve from the edge of the character to the center, which determines the geometric shape of the character surface.

[0036] Specifically, the expression for the height map is obtained by using the normalized distance map, depth parameters, and cross-section functions: ; ; in, Represents a height map. Represents pixels The height value, This represents the depth parameter.

[0037] Specifically, calculating the surface normal vector based on the height map includes: The Sobel operator is used to calculate the height map to obtain the gradient components in the horizontal and vertical directions; The initial normal vector of each foreground pixel is obtained by calculating the gradient components in the horizontal and vertical directions on the foreground pixels in the height map. Normalize the initial normal vector of each foreground pixel to obtain the surface normal vector.

[0038] Specifically, by using the Sobel operator to calculate the height map, the expressions for the gradient components in the horizontal and vertical directions are obtained as follows: ; ; in, , Both represent Sobel convolution kernels. This represents the convolution operation. This represents the gradient component in the horizontal direction. The gradient component in the vertical direction is represented in this embodiment of the invention, where the gradient vector points in the direction of the fastest height increase.

[0039] Specifically, the initial normal vector of each foreground pixel is calculated using the gradient components in the horizontal and vertical directions on the foreground pixels in the height map. The formula for this calculation is as follows: ; in, Represents foreground pixels The initial normal vector, Represents foreground pixels The gradient component in the horizontal direction, Represents foreground pixels The gradient component in the vertical direction, This represents the depth parameter.

[0040] In this embodiment of the invention, the x-component in the initial normal vector takes the negative value of the gradient vector because the surface normal tilts inward in the direction of height increase. The sign of the y-component depends on the coordinate system convention. The z-component is set to a constant 1, indicating that the normal mainly faces the vertical direction (following the OpenGL coordinate system convention, the z-axis points out of the screen). The depth parameter adjusts the tilt of the normal. The larger the depth parameter, the more obvious the deviation of the normal from the vertical direction, and the steeper the surface looks. The smaller the depth parameter, the closer the normal is to the vertical, and the flatter the surface tends to be.

[0041] Specifically, the initial normal vector of each foreground pixel is normalized to obtain the surface normal vector, calculated using the following formula: ; The purpose of normalizing the initial normal vector of each foreground pixel in this embodiment of the invention is to ensure that all normal vectors have a unit length, thus meeting the definition requirements of the standard normal map.

[0042] Specifically, character normal maps are generated based on surface normal vectors, that is, the normal vectors are encoded into RGB format to obtain industrial character foreground image data. The calculation formula is as follows: ; ; ; By linearly mapping the surface normal vector in the [-1,1] interval to the pixel value interval [0,255] using the above formula, we obtain the foreground image data of industrial characters.

[0043] The industrial character foreground image data obtained in this embodiment of the invention can be used as foreground combination information, combined with a background texture map, and input into a lighting rendering device. By simulating the lighting conditions of a real industrial environment (including light source direction, intensity, ambient light, etc.), pixel-level lighting response is calculated to generate the final industrial character sequence image. This industrial character sequence image retains the clarity of the characters and possesses the three-dimensional light and shadow features of real industrial characters, and can be directly used for training industrial character recognition networks.

[0044] This invention utilizes set font parameters to render all characters in a target character set, obtaining a binary mask image; performs a distance transformation on the binary mask image to obtain a normalized distance map; sets a cross-section function using the normalized distance map, and determines a height map based on the normalized distance map, the cross-section function, and set depth parameters; calculates surface normal vectors based on the height map, and generates character normal maps as foreground image data for industrial characters based on the surface normal vectors; compared with the prior art, the core of this invention lies in establishing a mapping from a two-dimensional vector contour to a three-dimensional normal vector field, solving the problems of existing industrial character data generation methods that rely on real image acquisition, have simple character geometric shapes, and poor scalability.

[0045] Corresponding to the industrial character foreground data generation method described in the above embodiments, such as Figure 2 As shown, this embodiment of the invention also provides an industrial character foreground data generation device 100, which includes: The rendering module 101 is used to render all characters in the target character set using the set font parameters to obtain a binary mask image; Transformation module 102 is used to perform distance transformation on the binary mask image to obtain a normalized distance map; The module 103 is used to set the cross-section function using the normalized distance map, and to determine the height map based on the normalized distance map, the cross-section function, and the set depth parameters. The calculation module 104 is used to calculate the surface normal vector based on the height map, and generate a character normal map as industrial character foreground image data based on the surface normal vector.

[0046] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0047] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0048] This invention also provides a terminal device, such as... Figure 3 As shown, the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 3 The diagram shows only one processor, a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100. When the processor D100 executes the computer program D102, it implements the above-described industrial character foreground data generation method.

[0049] The terminal device D10 can be a desktop computer, laptop, handheld computer, server, server cluster, or cloud server, etc. This terminal device may include, but is not limited to, a processor D100 and a memory D101. Those skilled in the art will understand that... Figure 3 This is merely an example of terminal device D10 and does not constitute a limitation on terminal device D10. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0050] The processor D100 can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0051] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may be an external storage device of the terminal device D10, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device D10. Furthermore, the memory D101 may include both internal and external storage units of the terminal device D10. The memory D101 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory D101 can also be used to temporarily store data that has been output or will be output.

[0052] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0053] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0054] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a method for generating industrial character foreground data.

[0055] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a building device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0056] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for generating industrial character foreground data, characterized in that, include: Step 1: Render all characters in the target character set using the set font parameters to obtain a binary mask image; Step 2: Perform a distance transformation on the binary mask image to obtain a normalized distance map; Step 3: Use the normalized distance map to set the cross-section function, and determine the height map based on the normalized distance map, the cross-section function, and the set depth parameters; Step 4: Calculate the surface normal vector based on the height map, and generate a character normal map based on the surface normal vector as industrial character foreground image data.

2. The method for generating industrial character foreground data according to claim 1, characterized in that, The font parameters include: The font type parameter determines the basic shape and style of the character; Font scaling factor, used to control the overall size of characters; The thickness of the strokes controls the width of the character lines.

3. The method for generating industrial character foreground data according to claim 1, characterized in that, Step 2 includes: Perform a distance transformation on each pixel in the binary mask image to generate a distance field; The distance field is normalized to obtain a normalized distance map.

4. The method for generating industrial character foreground data according to claim 3, characterized in that, The distance field is generated by performing a distance transform on each pixel in the binary mask image, and the expression is as follows: ; in, Represents foreground pixels The distance field, Represents the set of background pixels. Represents background pixels.

5. The method for generating industrial character foreground data according to claim 1, characterized in that, The cross-sectional function includes: Conical section function, flat-top section function, sinusoidal section function.

6. The method for generating industrial character foreground data according to claim 1, characterized in that, Calculating the surface normal vector based on the height map includes: The Sobel operator is used to calculate the height map to obtain the gradient components in the horizontal and vertical directions; The initial normal vector of each foreground pixel is obtained by calculating the gradient components in the horizontal and vertical directions on the foreground pixels in the height map. Normalize the initial normal vector of each foreground pixel to obtain the surface normal vector.

7. The method for generating industrial character foreground data according to claim 6, characterized in that, The initial normal vector of each foreground pixel is calculated using the gradient components in the horizontal and vertical directions. ; in, Represents foreground pixels The initial normal vector, Represents foreground pixels The gradient component in the horizontal direction, Represents foreground pixels The gradient component in the vertical direction, This represents the depth parameter.

8. An industrial character foreground data generation device, characterized in that, include: The rendering module is used to render all characters in the target character set using the set font parameters to obtain a binary mask image; The transformation module is used to perform a distance transformation on the binary mask image to obtain a normalized distance map. The determination module is used to set a cross-section function using the normalized distance map, and to determine a height map based on the normalized distance map, the cross-section function, and the set depth parameters; The calculation module is used to calculate the surface normal vector based on the height map, and generate a character normal map as industrial character foreground image data based on the surface normal vector.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the industrial character foreground data generation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the industrial character foreground data generation method as described in any one of claims 1 to 7.