Intelligent printing control methods, devices, equipment and media
By using a deep learning model to preprocess and transform the substrate image, the printing accuracy problem of traditional template matching under changes in lighting, scale, and rotation is solved, achieving efficient and stable printing results.
Patent Information
- Application Number
- CN202510615265.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2026-11-17
AI Technical Summary
Existing industrial printing technologies struggle to maintain high-precision printing under real-world conditions such as changes in lighting, scale, and rotation. Traditional template matching methods involve large computational loads and require manual intervention, making them unsuitable for diverse printing tasks.
A deep learning model is used to preprocess and extract features from the substrate image. By combining the coordinate transformation matrix between the image coordinates and the nozzle control coordinates, the target printing information is calculated, reducing manual intervention and errors.
It improves printing accuracy and stability, adapts to different lighting, scale and rotation variations, reduces computational load, and meets the needs of high-efficiency printing.
Smart Images

Figure CN123104259A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial printing technology, and in particular to an intelligent printing control method, apparatus, equipment, and medium. Background Technology
[0002] The industrial printing industry demands extremely high image positioning accuracy during production, especially in large-scale mass production. Precise image positioning and coordinate transformation are crucial for ensuring print quality and improving production efficiency. Currently, machine vision technology is widely used in industrial printing, employing visual algorithms for image recognition, positioning, and alignment to achieve automated, high-precision printing control. In industrial printing applications, a common method involves acquiring images of the substrate (such as paper, packaging materials, and metal sheets) using a camera, preprocessing them with image processing algorithms, and then combining this with the motion control system of the printing equipment for position compensation and image correction to ensure accurate alignment of the printed content.
[0003] Traditional image matching methods primarily rely on template matching technology. The template matching technology commonly used in the current industrial printing industry has the following basic process: Image acquisition: Acquiring an image of the substrate using an industrial camera; Image preprocessing: Performing grayscale conversion, noise reduction, and edge detection on the acquired image to improve matching accuracy; Template matching: Matching a sliding template with various regions in the image, calculating similarity, and finding the optimal matching position; Coordinate transformation: Calculating the relative positional change between the template and the target region, and generating a coordinate transformation matrix (including X, Y coordinates and rotation angle); Printing execution: Adjusting the control parameters of the printing equipment based on the coordinate transformation results, so that the printhead completes printing according to the calculated coordinate position. Because template matching is based on pixel-level features, it is suitable for matching relatively regular target objects. Under ideal conditions (fixed lighting, stable substrate shape), it can achieve good matching results, and therefore it has been widely used in industrial production lines.
[0004] While template matching technology can achieve good results in certain specific scenarios, it still has many limitations in practical industrial printing applications. These limitations include: Firstly, template matching is extremely sensitive to changes in lighting. When the substrate is under different lighting conditions, the grayscale values of the image may change significantly, leading to deviations in similarity calculations. For example, in a workshop environment where natural and artificial light alternate, even if the substrate itself remains unchanged, template matching may fail due to different lighting conditions, affecting printing accuracy. Secondly, template matching technology assumes that the size of the target object is constant. However, in actual industrial printing, the substrate may change in scale due to material expansion and contraction, printing equipment errors, camera angle changes, etc. Traditional template matching struggles to adapt to scale changes, easily leading to missed detections or mismatches. Thirdly, the substrate may rotate in the printing process (e.g., paper angle shift), but traditional template matching, based on a fixed-direction template, cannot effectively adapt to rotational changes. If the target image rotates, the matching accuracy will drop significantly, and it may even fail to match at all. Finally, traditional template matching only performs matching based on pixel-level similarity and cannot understand the semantic information of the image content. For example, in the printing industry, if two images have similar edge features but different content, template matching may misidentify the wrong area as the target area, leading to incorrect printing placement. Template matching algorithms need to slide across the entire image to search for the template position and calculate similarity scores, which incurs a huge computational burden when processing large images, causing a decrease in matching speed and making it difficult to meet the real-time processing requirements of efficient printing. Finally, when printing tasks change or the target object changes, traditional template matching requires redesigning and updating the template and adjusting the matching parameters. This process is time-consuming and relies on manual intervention, making it difficult to adapt to diverse printing task requirements.
[0005] Therefore, improving printing accuracy in industrial printing scenarios is an urgent problem to be solved. Summary of the Invention
[0006] In view of this, the present invention provides an intelligent printing control method, apparatus, equipment and medium to solve the problem of low printing accuracy in existing industrial printing technology.
[0007] The technical solution adopted in this invention is:
[0008] In a first aspect, the present invention provides an intelligent printing control method, the method comprising:
[0009] Acquire images of the substrate in an industrial printing scenario;
[0010] The image of the substrate is preprocessed to obtain a preprocessed image of the substrate;
[0011] The preprocessed substrate image is input into a pre-trained deep learning model for model processing to obtain the target image;
[0012] Based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, and combined with the coordinates of each pixel in the target image, the target printing information is calculated.
[0013] Based on the target printing information, the printing of the substrate is completed.
[0014] Preferably, the preprocessing of the substrate image to obtain the preprocessed substrate image includes:
[0015] The invalid regions of the substrate image are cropped to obtain the substrate image after removing the invalid regions.
[0016] The image of the substrate after removing invalid areas is scaled to obtain a size-adjusted image of the substrate.
[0017] The image of the substrate after size adjustment is converted to grayscale to obtain a grayscale image;
[0018] The grayscale image is normalized to obtain the preprocessed image of the substrate.
[0019] Preferably, if the substrate image includes multiple frames of target camera images captured at several preset camera positions, then the target image corresponds to each of the target camera images after model inference;
[0020] If the image of the substrate includes a target camera image captured at a preset camera position, then the target image corresponds to several local region images after model inference, wherein the local region images include region images obtained by segmenting the preprocessed target camera image.
[0021] Preferably, before calculating the target printing information based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, combined with the coordinates of each pixel in the target image, the method further includes:
[0022] Multiple calibration points are printed on the substrate using a printhead that is on the same plane as the substrate, and the printhead control coordinates of each calibration point are obtained.
[0023] Based on the preset camera position, acquire at least one frame of calibration image corresponding to the substrate with each calibration point printed on it.
[0024] The calibration image is processed to obtain the global image coordinates of each calibration point, wherein the image processing includes edge detection, corner detection and template matching;
[0025] The coordinate transformation matrix is calculated based on the global image coordinates of each calibration point and the nozzle control coordinates of each calibration point;
[0026] If there is only one calibration image, then the calibration image is segmented to obtain images of each calibration region;
[0027] The calibration points in each calibration region image and each calibration point in each calibration image are matched, and the image stitching matrix is calculated based on the global image coordinates and local image coordinates of the matched points.
[0028] If there are at least two calibration images, then each calibration point in each calibration image is matched, and the image stitching matrix is calculated based on the global image coordinates of the matched points.
[0029] Preferably, the step of calculating the target printing information based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, combined with the coordinates of each pixel in the target image, includes:
[0030] Based on the image stitching matrix, the coordinates of each pixel in each target camera image after model inference or the coordinates of each pixel in each local region image after model inference are processed to obtain the initial printing coordinates;
[0031] Based on the initial print coordinates, obtain the print color information corresponding to the initial print coordinates;
[0032] The initial printing coordinates are processed according to the coordinate transformation matrix to obtain the target printing coordinates;
[0033] The target printing information is determined based on the printed color information and the target printing coordinates.
[0034] Preferably, before inputting the preprocessed substrate image into a pre-trained deep learning model for model processing to obtain the target image, the method further includes:
[0035] Based on the preset model inference task corresponding to the printing scenario, obtain the generative deep learning model architecture corresponding to the model inference task as the initial model;
[0036] Based on the initial model, the training parameters in the initial model are obtained, and based on the training parameters, the hyperparameters used for training data processing are determined, wherein the hyperparameters include at least one of the following parameters: learning rate, batch size, and number of iterations;
[0037] Based on the hyperparameters, the training data is preprocessed to obtain standardized data that meets the model input requirements;
[0038] The standardized data is input into the initial model for training, and the initial model is optimized based on the key performance indicators during the training process to obtain the deep learning model.
[0039] Preferably, before preprocessing the training data according to the hyperparameters to obtain standardized data that meets the model input requirements, the method further includes:
[0040] Acquire substrate image data in industrial printing scenarios;
[0041] The substrate image data is cropped to remove invalid feature areas and determine key feature areas;
[0042] Based on the annotation category and number of annotations corresponding to the preset printing task requirements in the printing scenario, the key feature regions are annotated to obtain annotated image data;
[0043] The labeled image data is converted and classified to obtain the training data.
[0044] Secondly, the present invention provides an intelligent printing control device, the device comprising:
[0045] The substrate image acquisition module is used to acquire images of the substrate in the printing scenario;
[0046] The preprocessing module is used to preprocess the substrate image to obtain a preprocessed substrate image.
[0047] The model inference module is used to input the preprocessed substrate image into a pre-trained deep learning model for model processing to obtain the target image;
[0048] The target printing information determination module is used to calculate the target printing information based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, combined with the coordinates of each pixel in the target image.
[0049] The printing module is used to complete the printing of the substrate according to the target printing information.
[0050] Thirdly, embodiments of the present invention also provide a printing device, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of the first aspect described above.
[0051] Fourthly, embodiments of the present invention also provide a storage medium storing computer program instructions thereon, which, when executed by a processor, implement the method of the first aspect described above.
[0052] In summary, the beneficial effects of the present invention are as follows:
[0053] This invention provides an intelligent printing control method, apparatus, device, and medium. The method includes: acquiring an image of a substrate in a printing scenario; preprocessing the substrate image to obtain a preprocessed substrate image; inputting the preprocessed substrate image into a pre-trained deep learning model for model processing to obtain a target image; calculating target printing information based on the coordinate transformation matrix between image coordinates and printhead control coordinates, combined with the coordinates of each pixel in the target image; and completing the printing of the substrate based on the target printing information. This invention enhances the feature extraction and matching capabilities of substrate images through deep learning technology, thereby significantly improving printing accuracy in industrial printing scenarios. First, the pre-trained deep learning model can accurately extract key features on the substrate, possessing stronger semantic understanding capabilities. Even in complex backgrounds or with interference, it can accurately identify target areas, ensuring precise positioning of printed content. Second, during the matching process, the coordinate transformation matrix between image coordinates and printhead control coordinates achieves a precise correspondence between the substrate image coordinates and printhead control coordinates. Compared to traditional methods, this reduces error accumulation and ensures that the printhead prints according to the high-precision calculation results. Furthermore, due to the robustness of deep learning models, they can adapt to different lighting, scale, and rotation variations. Therefore, even if the substrate experiences slight displacement or deformation in the actual production environment, the target area can still be correctly identified, avoiding misaligned printing and improving printing accuracy. Finally, the entire process eliminates the need for manual template creation and adjustment, reducing human error and further enhancing the stability and consistency of printing, thus maintaining high-precision printing quality even in complex industrial environments. Attached Figure Description
[0054] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, and these are all within the protection scope of the present invention.
[0055] Figure 1 This is a schematic diagram illustrating the overall operation of the intelligent printing control method in Embodiment 1 of the present invention;
[0056] Figure 2 This is a schematic diagram of the process for preprocessing the image of the printing substrate in Embodiment 1 of the present invention;
[0057] Figure 3 This is a schematic diagram of the process of obtaining the deep learning model in Embodiment 1 of the present invention;
[0058] Figure 4This is a schematic diagram of the process for obtaining the training data in Embodiment 1 of the present invention;
[0059] Figure 5 This is a schematic diagram illustrating the process of determining the image stitching matrix and coordinate transformation matrix in Embodiment 1 of the present invention;
[0060] Figure 6 This is a schematic diagram of the process for calculating the target printing information in Embodiment 1 of the present invention;
[0061] Figure 7 This is a structural block diagram of the intelligent printing control device in Embodiment 2 of the present invention;
[0062] Figure 8 This is a schematic diagram of the printing device in Embodiment 3 of the present invention. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. In the description of the present invention, it should be understood that the terms "center," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, the element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Where there is no conflict, embodiments of the present invention and the various features thereof can be combined with each other, all of which are within the scope of protection of the present invention.
[0064] Example 1
[0065] Please see Figure 1 Embodiment 1 of the present invention discloses an intelligent printing control method, the method comprising:
[0066] Acquire images of the substrate in a printing scenario;
[0067] Specifically, in the printing scenario, the printing scenario includes industrial printing scenario, office printing scenario, commercial printing scenario, medical printing scenario, and home printing scenario. The substrate refers to the material used to carry the printed content, including paper, plastic film, metal plate, or textiles. The images of the substrate in the printing scenario are captured by optical equipment for subsequent quality analysis, color matching, or defect detection. In order to ensure high-quality image acquisition, industrial cameras are usually equipped, that is, high-resolution, low-noise professional camera equipment that can operate stably in high-speed production environments. The working mode of the camera can be divided into line scan imaging (suitable for wide continuous media, such as printed rolls) and area scan imaging (suitable for fine inspection of single sheets of material). When acquiring images, it is also necessary to provide equipment with uniform light source to reduce shadows and reflections and improve image quality.
[0068] In one embodiment, acquiring the image of the substrate in the printing scenario includes:
[0069] Based on the preset camera shooting position, the image of the substrate in the printing scene is acquired to obtain the initial image of the substrate, wherein the substrate is placed in the same plane as the printing nozzle;
[0070] Specifically, an industrial camera is used to acquire images from a preset position fixed above the printhead mounting plane to ensure consistency between the image acquisition area and the printing area. The substrate is placed on a work platform with a known height and orientation, ensuring a spatial reference frame consistent with the printhead trajectory. The camera's focal length, shooting angle, and shooting distance are all pre-calibrated to avoid affecting the geometric accuracy of the image due to perspective distortion or viewing angle deviation. This method ensures geometric consistency and stability during image acquisition, providing high-quality and accurate initial image input for subsequent illumination analysis and image processing. This step ensures the repeatability and stability of image acquisition, avoids image quality fluctuations caused by changes in camera position, and provides highly consistent and precisely aligned input images for subsequent image analysis, thus enhancing the reliability of the algorithm.
[0071] The initial image of the substrate is subjected to pixel-level statistical processing to obtain brightness histogram information, which is used to reflect the pixel distribution characteristics under different brightness levels.
[0072] Specifically, image processing algorithms are used to separate the luminance channels of the initial image of the substrate, such as extracting grayscale from the RGB space or converting it to the HSV space to extract the V channel. The number of pixels in the entire initial image at different luminance levels is then counted to generate a luminance histogram. The histogram is typically divided into 256 luminance intervals, and analysis of its distribution pattern (e.g., too dark, too bright, or concentrated distribution) helps determine the overall exposure state of the current image. This step quickly obtains the image's luminance distribution pattern, providing a basis for determining whether subsequent illumination compensation is needed. Evaluating image quality through statistical information is more objective and automated than simply relying on visual observation, contributing to intelligent decision-making in subsequent processing.
[0073] The initial image of the substrate is divided into image regions. The average brightness value and standard deviation of each local region are calculated to obtain the regional contrast index and the overall illumination non-uniformity index.
[0074] Specifically, the initial image of the substrate is divided into multiple equally sized image regions (e.g., a grid-like division into 3×3 or 5×5 regions). The average brightness and standard deviation of brightness are calculated for each region to obtain local contrast. Simultaneously, the difference between the maximum and minimum average brightness values of all regions is calculated as an indicator of overall image illumination non-uniformity. This processing can be used to identify areas with localized shadows, reflections, or exposure anomalies. Through spatial partitioning and local statistical methods, local illumination changes in the image can be captured more precisely. This not only identifies images that are generally dark or bright but also determines whether there are locally overexposed or occluded areas, thereby improving the accuracy and robustness of illumination assessment.
[0075] Based on the brightness histogram information, regional contrast index, and illumination non-uniformity index, determine whether the initial image of the substrate meets the preset illumination imbalance condition.
[0076] Specifically, based on the brightness histogram information, regional contrast index, and illumination non-uniformity index, a multi-threshold judgment strategy is used to determine whether there are obvious illumination problems in the initial image of the substrate. For example, if the brightness histogram is too dark (low grayscale concentration) or too bright (high grayscale concentration), or the brightness difference between regions exceeds a set threshold (e.g., more than 30%), then the initial image of the substrate is considered to have illumination imbalance. Machine learning models can also be used to learn the distribution characteristics of normally illuminated images based on training data, achieving more intelligent judgment. By comprehensively considering multi-dimensional illumination indicators, a more scientific illumination assessment is achieved, avoiding misjudgments that may arise from a single indicator. Reasonable judgment of imbalance can avoid unnecessary enhancement processing of normal images, improve system processing efficiency, and maintain the authenticity of the initial image of the substrate.
[0077] If the initial image of the substrate is determined to meet the preset illumination imbalance condition, then illumination compensation processing is performed on the initial image of the substrate to obtain the image of the substrate.
[0078] Specifically, a suitable illumination compensation algorithm is selected based on the judgment result. If multiple acquisitions are supported, the camera is automatically controlled to capture image sequences under different exposure values, and the images are fused using a high dynamic range (HDR) image synthesis algorithm based on weighted exposure fusion to effectively improve detail retention and brightness balance. If only a single frame image is acquired, an image enhancement algorithm is applied to separate and process the image's brightness and reflection components, resulting in a more natural contrast and brightness distribution. The compensated image is used for subsequent calibration point detection and image stitching, improving overall processing accuracy. This step, by intelligently selecting a suitable compensation path, significantly improves the image's brightness balance and detail restoration capabilities, providing a clearer and more realistic image foundation for subsequent visual processing modules, fundamentally avoiding calibration errors or feature point recognition failures caused by poor illumination quality.
[0079] In one embodiment, the step of performing illumination compensation processing on the initial image of the substrate to obtain the substrate image if a preset illumination imbalance condition is met includes:
[0080] If it is determined that the initial image of the substrate meets the illumination imbalance condition, a preset illumination compensation strategy is obtained. The illumination compensation strategy includes fusing multiple initial images of the substrate with different exposures to generate an image, or using an illumination equalization algorithm based on a brightness and reflection separation model to enhance a single frame of the initial image of the substrate.
[0081] Specifically, based on the evaluation results of the image's brightness histogram distribution, regional contrast differences, and illumination non-uniformity indicators, it is determined that the initial image of the current substrate has obvious exposure problems or local illumination unevenness. If illumination imbalance is identified, a preset illumination compensation strategy decision module is invoked. Depending on the current scene's imaging conditions, whether the camera has the capability for multiple acquisitions, and the severity of the illumination problem, two compensation methods are automatically selected: one is a high dynamic range image construction method based on multi-frame exposure fusion, suitable for scenes with adjustable exposure shooting conditions; the other is an image enhancement algorithm based on a brightness and reflection separation model, suitable for situations where only a single frame image can be acquired. By automatically matching the compensation algorithm most suitable for the current imaging conditions through the strategy module, the system effectively balances image enhancement effects with system resource constraints, improving the system's intelligence and processing flexibility while ensuring image quality.
[0082] If the illumination compensation strategy is to fuse multiple initial images of the substrate with different exposures, then the camera is controlled to acquire multiple initial images of the substrate under different exposure parameters, and each initial image of the substrate is used to construct an image set with dynamic range information.
[0083] Specifically, when a multi-frame exposure fusion strategy is selected, several initial images of the substrate covering low, medium, and high brightness areas are automatically acquired by controlling key imaging parameters such as exposure time, gain parameters, or shutter speed of the camera. These initial images of the substrate retain effective detail information in different brightness areas; for example, details in dark areas come from low-exposure frames, while details in bright areas come from high-exposure frames. The acquired images form a high dynamic range image candidate set, containing a wider range of brightness information distribution, providing rich input data for subsequent fusion processing. This method effectively solves the problem of limited brightness range in a single image, enabling the final image to retain detail information in both strong and weak light areas, improving the overall visual appeal and analyzability of the image, making it highly suitable for high-contrast printing scenarios.
[0084] The initial images of the multi-frame substrate are aligned. Then, the aligned initial images of the substrate are processed according to an image fusion algorithm based on exposure weight, local contrast and color saturation weighting strategy to obtain the substrate image.
[0085] Specifically, to ensure pixel consistency between images from different exposures, pixel-level alignment is first performed on all initial images of the substrate. This alignment can be achieved through feature point registration and image interpolation, ensuring no spatial offset error. Subsequently, a fusion algorithm calculates weighting coefficients based on the exposure adaptation, local image contrast, and color saturation distribution of each frame, performing multi-channel fusion processing to ultimately generate a high dynamic range substrate image with balanced brightness and rich detail. The fused image not only retains the highlights and details of each exposure image but also possesses extremely high image naturalness and local contrast, making subsequent image detection and content analysis more accurate, especially suitable for reflective materials or substrates with strong occlusion.
[0086] If the illumination compensation strategy is to use an illumination equalization algorithm based on a brightness and reflection separation model to enhance the initial image of a single-frame substrate, then the initial image of the substrate is subjected to image enhancement processing based on a brightness and reflection separation model. The reflection component and illumination component in the initial image of the substrate are extracted and the illumination component is normalized and adjusted to obtain the image of the substrate.
[0087] Specifically, when only a single frame image can be acquired, an image enhancement algorithm based on Retinex theory is applied. Assuming the initial image of the substrate consists of reflection and illumination components, this method extracts the illumination component by performing a logarithmic transformation on the initial image and combining it with the relationship between surrounding pixels. Then, normalization is applied to make the illumination component distribution more uniform, while preserving details in the reflection component related to the image's intrinsic information. The final image maintains its original color characteristics while exhibiting a smoother brightness distribution, enhanced dark areas without overexposure, and preserved details in bright areas. This method requires no additional image acquisition, making it suitable for scenarios with limited image acquisition or high real-time requirements. It effectively suppresses illumination interference from strong light and shadows, providing a clear and reliable image foundation for image analysis and quality assessment.
[0088] The image of the substrate is preprocessed to obtain a preprocessed image of the substrate;
[0089] Specifically, the substrate image undergoes preprocessing to obtain a preprocessed substrate image. The substrate image refers to the raw image data acquired through an industrial camera. However, due to factors such as changes in ambient lighting, camera noise, or surface reflection of the substrate, the raw image may suffer from uneven brightness, noise interference, or color distortion. Therefore, preprocessing involves the application of a series of image processing techniques aimed at optimizing image quality and improving the accuracy of subsequent analysis. Preprocessing includes: denoising, resizing, grayscale conversion and color equalization, distortion correction, background separation, alignment, and perspective transformation. Through these preprocessing techniques, the preprocessed substrate image—an optimized, high-quality image—is finally obtained, providing accurate input for subsequent image analysis tasks and improving the accuracy and reliability of industrial printing inspection.
[0090] In one embodiment, please refer to Figure 2 The preprocessing of the substrate image to obtain the preprocessed substrate image includes:
[0091] The invalid regions of the substrate image are cropped to obtain the substrate image after removing the invalid regions.
[0092] Specifically, the substrate image may contain irrelevant background regions, such as conveyor belt edges, printer guides, and positioning marks. These regions can affect the efficiency of subsequent analysis and model computation. Therefore, invalid regions of the substrate image are cropped to retain only the valid parts containing the printed content, resulting in a substrate image after removing invalid regions. Cropping methods can be based on edge detection (such as Canny and Sobel operators) or color feature-based segmentation algorithms, such as Otsu thresholding and K-means clustering. Furthermore, if the printed area of the substrate image has clear boundaries, morphological operations (such as erosion and dilation) can be used to remove noise and obtain connected regions, thereby automatically determining the cropping range. In deep learning methods, object detection models (such as YOLO and Faster R-CNN) can be used to identify valid regions and perform cropping. The cropped substrate image reduces redundant information, improving the accuracy and speed of subsequent calculations.
[0093] The image of the substrate after removing invalid areas is scaled to obtain a size-adjusted image of the substrate.
[0094] Specifically, since images captured by industrial cameras typically have high resolution, and different substrate sizes can lead to inconsistent image sizes, while computer vision models usually require a fixed input size, image scaling is necessary. For example, normalized scaling using a preset size of (1024, 1024, 3) ensures that all input images are the same size, which is beneficial for the stability of model training and inference. Scaling methods can include nearest neighbor interpolation, bilinear interpolation, or bicubic interpolation. To avoid image distortion, a proportional scaling + padding approach can be used: first, scale proportionally to the maximum fit size, then add zero padding (such as black or neutral gray pixels) to the shorter side to ensure the image retains its square format. This step standardizes the data input, avoids model inference errors caused by inconsistent sizes, and improves computational efficiency.
[0095] The image of the substrate after size adjustment is converted to grayscale to obtain a grayscale image;
[0096] Specifically, while color information is important in some tasks, such as color matching, it is not essential for tasks like texture detection, edge analysis, and defect detection. To reduce data redundancy and improve computational efficiency, the resized color image of the printed substrate is converted to a grayscale image, retaining only luminance information (i.e., the grayscale values of pixels). Common grayscale conversion methods include weighted averaging, which aligns with the human eye's color sensitivity, making the converted grayscale image closer to human perception. Grayscale conversion not only reduces the number of data channels and speeds up processing but also enhances the highlighting of features such as edges, shapes, and contrast, providing a more concise image representation for subsequent analysis.
[0097] The grayscale image is normalized to obtain the preprocessed image of the substrate.
[0098] Specifically, in deep learning and computer vision tasks, the range of pixel values in the input image often affects the training performance of the model. Grayscale images have a grayscale value range of 0-255, and directly inputting them into a neural network may lead to unstable gradient updates. Therefore, grayscale images are normalized to convert pixel values to a fixed range, such as [0,1] or [-1,1], thereby reducing the impact of numerical fluctuations on model training. Common methods include dividing pixel values by 255 to normalize them to [0,1]; or using mean-standard deviation normalization to obtain the preprocessed substrate image.
[0099] The preprocessed substrate image is input into a pre-trained deep learning model for model processing to obtain the target image;
[0100] Specifically, the pre-processed image of the substrate is input into a pre-trained deep learning model, which is a generative model. The generative model's capabilities are used for inference to ultimately obtain the target image. First, the pre-trained deep learning model refers to a neural network that has already undergone preliminary training on a large amount of data, possessing powerful feature extraction and transformation capabilities. It can be used directly or with minor adjustments in specific tasks. Generative models are models capable of generating new images or transforming image styles based on input data. Deep learning models include pixel-to-pixel transformation models, recurrent adversarial generative models, and fast neural style transfer models. Pixel-to-pixel transformation models are deep learning-based image transformation methods that map input images to target images; for example, they can be used to repair defects in printed images, convert low-quality prints into high-quality versions, or enhance edges and details to improve readability. Recurrent adversarial generative models are adversarial learning frameworks that can transform an image of one style into another without paired data; for example, they can be used for color adjustment between different printing materials to make printing effects more consistent across different media. Fast neural style transfer models are models capable of transferring specific styles to input images. They can be used to simulate specific printing effects, such as hand-drawn styles, oil painting textures, or the printing characteristics of a specific brand, so that the output image meets specific artistic or commercial requirements. When the pre-processed substrate image is input into these generative models, the model will perform specific style transformations, quality enhancements, or defect repairs on the image based on its existing learning experience, ultimately obtaining the target image.
[0101] In one embodiment, if the substrate image includes multiple frames of target camera images captured at several preset camera positions, then the target image corresponds to each of the target camera images after model inference;
[0102] Specifically, when the substrate image comprises multiple target camera images acquired from multiple preset camera positions, each image represents details of the substrate under different angles or lighting conditions. To ensure overall detection or optimization performance, these images need to be independently inferred, ultimately yielding multiple target images. Specifically, all target camera images first undergo preprocessing, including removing invalid regions, resizing, and grayscale conversion, to meet the input requirements of the deep learning model. Then, each target camera image is input into the deep learning model for inference, ultimately outputting the corresponding target image. Because this process is parallel—meaning each image can be processed by a separate computational unit—the overall inference speed is improved, while ensuring optimized results are obtained for substrate images under different angles or lighting conditions.
[0103] If the image of the substrate includes a target camera image captured at a preset camera position, then the target image corresponds to several local region images after model inference, wherein the local region images include region images obtained by segmenting the preprocessed target camera image.
[0104] Specifically, when the substrate image is obtained from a single target camera image acquired from a preset camera position, to improve the accuracy of inference and avoid excessive computational burden due to a large single image, region segmentation and parallel inference are employed. First, the preprocessed target camera image is segmented into multiple local regions. This segmentation is typically based on image content features, such as uniform division. The segmented local regions not only reduce the complexity of a single computation but also ensure that the deep learning model can focus on the details of the image, improving the accuracy of the inference results. After region segmentation, each local region image is individually input into the deep learning model for parallel inference. Since deep learning models typically possess contextual semantic understanding capabilities, i.e., they can analyze the correlation between adjacent regions, even using local inference, the overall image coherence can be maintained by synthesizing the final result. Finally, each of the local region images inferred by the model is used as the target image. Each local region image retains the overall structure of the substrate while enhancing the detail representation of key areas.
[0105] In one embodiment, please refer to Figure 3 Before inputting the preprocessed substrate image into a pre-trained deep learning model for model processing to obtain the target image, the method further includes:
[0106] Based on the preset model inference task corresponding to the printing scenario, obtain the generative deep learning model architecture corresponding to the model inference task as the initial model;
[0107] Specifically, in model inference tasks, generative deep learning models are mainly used for style transfer, defect repair, or quality optimization of printed images. To ensure the model can effectively complete a specific task, a suitable model architecture is first selected as the initial model based on the model inference task. Generative models include various architectures, such as pixel-to-pixel translation models, recurrent adversarial generative networks, and fast neural style transfer models, each with different characteristics. For example, pixel-to-pixel translation models are suitable for structured image transformation tasks, such as image inpainting and quality enhancement; recurrent adversarial generative networks can perform style transfer under unsupervised learning conditions; and fast neural style transfer models are suitable for real-time optimization tasks. The selection of an appropriate model architecture determines the efficiency, effectiveness, and computational requirements of the subsequent training process.
[0108] Based on the initial model, the training parameters in the initial model are obtained, and based on the training parameters, the hyperparameters used for training data processing are determined, wherein the hyperparameters include at least one of the following parameters: learning rate, batch size, and number of iterations;
[0109] Specifically, after determining the initial model, a series of hyperparameters are set for the training process to optimize the model's training performance and improve its generalization ability. These hyperparameters include: Batch size: the number of data samples input to the model during a single training iteration, typically set to 32, but adjusted according to hardware resources; batch size affects training speed and model stability—too large a batch size consumes excessive memory, while too small a batch size may lead to unstable gradient updates. Iteration count: the number of times the entire dataset is traversed during training, usually set to 100 to ensure the model fully learns the data features but avoids overfitting. Learning rate: controls the step size for updating model parameters, typically set to 0.001; an excessively large learning rate can lead to unstable convergence, while an excessively small learning rate can result in slow training speed or getting stuck in local optima. These hyperparameters can be flexibly adjusted according to specific hardware configurations to improve training efficiency and model performance.
[0110] Based on the hyperparameters, the training data is preprocessed to obtain standardized data that meets the model input requirements;
[0111] Specifically, before training the deep learning model, the training data is preprocessed according to the hyperparameters to ensure that the data meets the input requirements of the model, thereby improving training stability and the model's learning ability. Data preprocessing includes: invalid region cropping: removing regions in the image that do not contain effective information, such as background or edge noise, to reduce computational burden and improve model learning efficiency; normalization: adjusting pixel values to the range of [0,1] or [-1,1] to prevent excessively large data values from affecting gradient calculation and to improve the stability of model training; channel conversion: adjusting the channel format of the input image according to model requirements, such as converting from RGB three-channel to grayscale single-channel (reducing computational complexity) or from BGR to RGB, to match the input format of the pre-trained model. After these processes, the training data can meet the standardization requirements, ensuring that the data input to the model is within the same distribution range, reducing anomalies during training, and improving the model's learning effect and inference accuracy.
[0112] In one embodiment, please refer to Figure 4 Before preprocessing the training data according to the hyperparameters to obtain standardized data that meets the model input requirements, the method further includes:
[0113] Acquire substrate image data in industrial printing scenarios;
[0114] Specifically, images of the substrate are acquired to obtain substrate base image data. High-precision industrial cameras are used, which, compared to ordinary camera equipment, have higher resolution, more accurate color reproduction, and stronger environmental adaptability. For example, multiple industrial cameras are installed on the production line to acquire substrate base images from different angles and under different lighting conditions, ensuring comprehensive acquisition of image information. This base image data is used for subsequent analysis.
[0115] The substrate image data is cropped to remove invalid feature areas and determine key feature areas;
[0116] Specifically, the acquired substrate image data contains a large amount of background information or irrelevant regions, which can affect the model training effect. Therefore, cropping is necessary to remove invalid feature regions and retain key feature regions. For example, for substrates with repeating printing patterns, if there are many identical feature regions in the entire image, only one unit feature needs to be cropped instead of using the entire image. Cropping can be done manually or based on automatic edge detection algorithms, such as Canny edge detection or morphological processing, to automatically identify and extract effective regions. In addition, if there is distortion or angular deviation in the image, it can be adjusted by combining perspective transformation, affine transformation, and other methods to ensure that key feature regions are accurately represented.
[0117] Based on the annotation category and number of annotations corresponding to the preset printing task requirements in the printing scenario, the key feature regions are annotated to obtain annotated image data;
[0118] Specifically, the key feature regions are labeled according to the labeling categories and number of labels required by the printing task. The purpose of labeling is to clarify which regions are the target features that the model needs to learn, so that the model can accurately identify and infer in the future. Labeling categories include object detection (bounded boxes), segmentation (pixel-level segmentation), and key point detection (specific location points). For example, in industrial printing inspection, it is necessary to label features such as printing alignment points, barcodes, QR codes, text regions, and color blocks. During the labeling process, manual quality assessment is conducted to ensure the accuracy and consistency of the labeled data. In addition, professional labeling tools (such as Labelme, VIA, CVAT, etc.) can be used for labeling, and manual review and automatic labeling verification are adopted to improve labeling efficiency and accuracy.
[0119] The labeled image data is converted and classified to obtain the training data.
[0120] Specifically, after annotation, the annotated image data undergoes format conversion and data partitioning to meet the input requirements of model training. Format conversion typically involves exporting the annotated data to a standard format (such as JSON, XML, or TXT), which can be directly read by deep learning frameworks (such as TensorFlow, PyTorch, and YOLO). For example, in object detection tasks, the annotated image data can be converted to YOLO format (category number + normalized coordinates), while in image segmentation tasks, it can be converted to a mask image or COCO format. Subsequently, the annotated data is divided into training, testing, and validation sets to obtain the training data. A common ratio is 7:2:1, meaning 70% is used for model training, 20% for testing, and 10% for validation. Reasonable data partitioning improves the model's generalization ability and ensures that the finally trained model can run stably in practical applications.
[0121] The standardized data is input into the initial model for training, and the initial model is optimized based on the key performance indicators during the training process to obtain the deep learning model.
[0122] Specifically, the standardized data is input into the initial model for training, and key performance indicators are continuously monitored during the training process to ensure that the model can effectively learn data features and avoid overfitting or underfitting. First, the convergence of the model is judged by monitoring the training loss and validation loss. If the training loss continuously decreases while the validation loss increases, it indicates that the model may be overfitting, i.e., it performs well on the training set but has poor generalization ability on unseen data. In this case, optimization is performed by increasing training data, using data augmentation, and adding regularization (such as L2 regularization or Dropout). On the other hand, if both the training loss and validation loss are high, it indicates that the model may be underfitting, i.e., its learning ability is insufficient. Improvement is achieved by increasing model complexity, adjusting the learning rate, and extending the training epochs. In addition, it is also necessary to monitor the model's accuracy and intersection-over-union (IoU) ratio, especially IoU. IoU is calculated by dividing the area of the intersection between the predicted region and the real region by the area of the union. Its value ranges from 0 to 1, with a higher value indicating more accurate model prediction. If the IoU is low, the performance can be improved by adjusting the loss function, optimizing the network structure, or enhancing data quality. Once training reaches its optimal state, the best-performing model is selected and saved. Typically, the model with the lowest validation loss and strongest generalization ability is stored for use in subsequent inference stages, resulting in the deep learning model. The model can be saved in various formats, such as weight files (e.g., HDF5 or Checkpoint), and supports subsequent loading, fine-tuning, and deployment, ensuring efficient operation in industrial applications.
[0123] Based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, and combined with the coordinates of each pixel in the target image, the target printing information is calculated.
[0124] Specifically, to achieve precise printing control, a coordinate transformation matrix is constructed between the image coordinate system and the printhead control coordinate system based on the spatial mapping relationship between the image acquisition system and the printhead control system. This coordinate transformation matrix can be pre-established through methods such as calibration board imaging, perspective transformation modeling, or laser rangefinder registration, and includes geometric relationships such as affine transformation, rotation, and scaling between image pixel coordinates and physical printing plane coordinates. In practical applications, the pixel coordinates of the area to be printed in the target image can be traversed, and accurately mapped to the actual control coordinates of the printhead through the coordinate transformation matrix. Combined with the pixel coordinates in the target image, the target printing information is calculated, thereby generating the printing path or dot matrix instructions. This method ensures that the pattern corresponding to each pixel in the image can be accurately printed on the substrate, making it particularly suitable for printing applications requiring high alignment accuracy, effectively improving print quality and consistency.
[0125] In one embodiment, please refer to Figure 5Before calculating the target printing information based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, combined with the coordinates of each pixel in the target image, the following steps are also included:
[0126] Multiple calibration points are printed on the substrate using a printhead that is on the same plane as the substrate, and the printhead control coordinates of each calibration point are obtained.
[0127] Specifically, with the printer nozzle and the substrate on the same plane, the nozzle precisely prints multiple calibration points on the substrate surface according to the set control parameters. The purpose of these calibration points is to provide a reference for subsequent coordinate transformation. The nozzle control coordinates (i.e., the coordinate values in the printing equipment control system) of each calibration point are recorded. These coordinates are usually represented in a mechanical coordinate system to ensure that they correspond to the printer's control system and achieve precise positioning.
[0128] Based on the preset camera position, acquire at least one frame of calibration image corresponding to the substrate with each calibration point printed on it.
[0129] Specifically, after the calibration points are printed, the substrate is photographed using industrial cameras positioned at different locations to obtain calibration images containing the calibration points. The shooting angles, focal lengths, and resolutions of these cameras are precisely calibrated to ensure that the images clearly show the distribution of all calibration points. When using only one camera, it must cover the entire effective area of the substrate; if multiple cameras are used, the shooting range of each camera needs to be planned to ensure that all calibration points are complete and without omissions.
[0130] The calibration image is processed to obtain the global image coordinates of each calibration point, wherein the image processing includes edge detection, corner detection and template matching;
[0131] Specifically, after acquiring the calibration image, image processing is performed to accurately identify the position of each calibration point in the image and obtain its global image coordinates. Image processing includes the following steps: using algorithms such as Canny edge detection to identify the boundary contours of the calibration points; using Harris corner detection or FAST corner detection to accurately locate the center of the calibration points; if the calibration points have specific shape or texture features, template matching algorithms (such as normalized cross-correlation matching) can be used to further improve the recognition accuracy. Finally, the global image coordinates of the center of each calibration point are extracted, serving as key data for subsequent coordinate transformation.
[0132] The coordinate transformation matrix is calculated based on the global image coordinates of each calibration point and the nozzle control coordinates of each calibration point;
[0133] Specifically, a mapping relationship is established between the nozzle control coordinates (mechanical coordinates) and the corresponding global image coordinates (pixel coordinates), and a coordinate transformation matrix is calculated. This process typically involves affine or perspective transformations to ensure accurate conversion between different coordinate systems. The specific methods are as follows: a least-squares-based transformation model is constructed to reduce errors; a homography matrix is calculated for perspective projection transformation; and the RANSAC algorithm is used to eliminate outlier matching points, improving the stability of the matrix calculation. This coordinate transformation matrix will be used in subsequent steps to accurately map the image coordinates to the actual mechanical printing coordinate system.
[0134] If there is only one calibration image, then the calibration image is segmented to obtain images of each calibration region;
[0135] Specifically, when only one calibration image is available, to improve computational accuracy, the calibration image needs to be segmented to extract different calibration point regions separately. The region segmentation methods employed include: segmentation based on color or grayscale histograms to distinguish calibration points from background regions; noise removal based on morphological processing (such as dilation and erosion) to improve the clarity of calibration points; and connected component analysis to ensure the integrity of the calibration point regions. Finally, each calibration region will be extracted separately and used for subsequent image stitching matrix calculations.
[0136] The calibration points in each calibration region image and each calibration point in each calibration image are matched, and the image stitching matrix is calculated based on the global image coordinates and local image coordinates of the matched points.
[0137] Specifically, after acquiring the segmented images of each calibration region, it is necessary to find and match the calibration points in each calibration region image that are identical to those in the original calibration image in order to calculate the image stitching matrix. This process includes: Feature point extraction: using feature detection algorithms such as SIFT, ORB, or SURF to extract the local features of the calibration points; Feature matching: using FLANN or KNN matching algorithms to find the correspondence between identical calibration points; Stitching matrix calculation: using RANSAC to remove incorrect matching points, and calculating the final image stitching matrix based on the global and local image coordinates of the matching points, so as to achieve accurate stitching in the subsequent process.
[0138] If there are at least two calibration images, then each calibration point in each calibration image is matched, and the image stitching matrix is calculated based on the global image coordinates of the matched points.
[0139] Specifically, when at least two calibration images exist, a multi-view image matching algorithm is used to calculate the image stitching matrix for more accurate stitching. Perspective transformations from different viewpoints are performed using homography to align the images; geometric consistency between calibration points is matched using optical flow or feature point matching algorithms across images; stitching error optimization is achieved through weighted mean fusion or local deformation techniques to reduce stitching edge errors and improve stitching accuracy. Finally, the calculated image stitching matrix is used to seamlessly stitch all calibration images, providing a reference for subsequent coordinate transformation and accurate printing.
[0140] In one embodiment, please refer to Figure 6 The step of calculating the target printing information based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, combined with the coordinates of each pixel in the target image, includes:
[0141] Based on the image stitching matrix, the coordinates of each pixel in each target camera image after model inference or the coordinates of each pixel in each local region image after model inference are processed to obtain the initial printing coordinates;
[0142] Specifically, an image stitching matrix is used to uniformly process the coordinates of each pixel in the target camera images or the local region images after model inference, ensuring that pixels from different camera perspectives or pixels in different regions from the same camera perspective can accurately correspond within a global coordinate system. By transforming the pixel coordinates in each target camera image to a unified reference coordinate system, the complete target region is obtained. Based on this, the pixel coordinates in the local region images are further extracted and transformed using the image stitching matrix to generate initial printing coordinates relative to the printer's motion system. These coordinates will serve as the basis for subsequent calculations and printing execution, ensuring accurate positioning of the printed content.
[0143] Based on the initial print coordinates, obtain the print color information corresponding to the initial print coordinates;
[0144] Specifically, after obtaining the initial print coordinates, it is necessary to further determine the print color information corresponding to each initial print coordinate to ensure the color accuracy of the printed output. First, the color data of the area to be printed is extracted from the target camera image and mapped to the pixels corresponding to the initial print coordinates. Since the image may have variations in lighting, color distortion, or camera white balance deviations, color correction is required, such as using gamma correction, white balance adjustment, or color space conversion, to ensure the accuracy of the color data. Subsequently, the colors are matched and optimized according to the color management system or printer color profile to ensure the correct output of the target color information. Finally, all print color information corresponds one-to-one with the initial print coordinates, providing complete input data for subsequent coordinate transformation and actual printing.
[0145] The initial printing coordinates are processed according to the coordinate transformation matrix to obtain the target printing coordinates;
[0146] Specifically, after obtaining the initial printing coordinates, a coordinate transformation matrix is used to convert them into target printing coordinates to ensure the accuracy of the printing position. First, based on the coordinate transformation matrix obtained from the previous calibration calculation—that is, the mapping relationship from image coordinates to motion system coordinates—an affine transformation is performed on the initial printing coordinates to adapt them to the motion coordinate system of the actual printing equipment. The transformed target printing coordinates ensure that the printing position precisely corresponds to the design position on the image. After completing the coordinate transformation of all points, the target printing coordinates will serve as the final control command, guiding the printing equipment to execute precise pattern printing.
[0147] The target printing information is determined based on the printed color information and the target printing coordinates.
[0148] Based on the target printing information, the printing of the substrate is completed.
[0149] Example 2
[0150] Please see Figure 7 Based on Embodiment 1, Embodiment 2 of the present invention further provides an intelligent printing control device, the device comprising:
[0151] The substrate image acquisition module is used to acquire images of the substrate in the printing scenario;
[0152] The preprocessing module is used to preprocess the substrate image to obtain a preprocessed substrate image.
[0153] The model inference module is used to input the preprocessed substrate image into a pre-trained deep learning model for model processing to obtain the target image;
[0154] The target printing information determination module is used to calculate the target printing information based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, combined with the coordinates of each pixel in the target image.
[0155] The printing module is used to complete the printing of the substrate according to the target printing information.
[0156] Specifically, the intelligent printing control device according to an embodiment of the present invention includes: a substrate image acquisition module for acquiring an image of the substrate in a printing scenario; a preprocessing module for preprocessing the substrate image to obtain a preprocessed substrate image; a model inference module for inputting the preprocessed substrate image into a pre-trained deep learning model for model processing to obtain a target image; a target printing information determination module for calculating target printing information based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, combined with the coordinates of each pixel in the target image; and a printing module for completing the printing of the substrate according to the target printing information. This device enhances the feature extraction and matching capabilities of substrate images through deep learning technology, thereby significantly improving printing accuracy in industrial printing scenarios. First, it employs a pre-trained deep learning model to accurately extract key features from the substrate, demonstrating stronger semantic understanding capabilities. Even in complex backgrounds or with interference, it can accurately identify target areas, ensuring precise positioning of the printed content. Second, during the matching process, a coordinate transformation matrix between image coordinates and printhead control coordinates achieves a precise correspondence between the substrate image coordinates and printhead control coordinates. Compared to traditional methods, this reduces error accumulation and ensures the printhead prints according to high-precision calculations. Furthermore, due to the robustness of the deep learning model, it can adapt to different lighting, scale, and rotation variations. Therefore, even if the substrate experiences slight displacement or deformation in the actual production environment, it can still ensure correct identification of the target area, avoiding misaligned printing and improving printing accuracy. Finally, the entire process eliminates the need for manual template creation and adjustment, reducing human error and further enhancing printing stability and consistency, thus maintaining high-precision printing quality even in complex industrial environments.
[0157] Example 3
[0158] In addition, combined Figure 1 The intelligent printing control method of Embodiment 1 of the present invention described herein can be implemented by a printing device. Figure 8 A schematic diagram of the hardware structure of the printing device provided in Embodiment 3 of the present invention is shown.
[0159] Printing equipment may include a processor and a memory storing computer program instructions.
[0160] Specifically, the processor may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement embodiments of the present invention.
[0161] The memory may include a large-capacity storage device for data or instructions. For example, and not limitingly, the memory may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory may include removable or non-removable (or fixed) media. Where appropriate, the memory may be internal or external to a data processing device. In a particular embodiment, the memory is a non-volatile solid-state memory. In a particular embodiment, the memory includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0162] The processor reads and executes computer program instructions stored in memory to implement any of the intelligent printing control methods in the above embodiments.
[0163] In one example, the printing device may also include a communication interface and a bus. For example, Figure 8 As shown, the processor, memory, and communication interface are connected via a bus and communicate with each other.
[0164] The communication interface is mainly used to enable communication between various modules, devices, units and / or equipment in the embodiments of the present invention.
[0165] A bus, including hardware, software, or both, couples components of the device together. For example, and not limitingly, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, a bus may include one or more buses. While specific buses are described and illustrated in embodiments of the invention, the invention contemplates any suitable bus or interconnect.
[0166] Example 4
[0167] In addition, in conjunction with the intelligent printing control method in Embodiment 1 above, Embodiment 4 of the present invention can also provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the intelligent printing control methods in the above embodiments.
[0168] In summary, the embodiments of the present invention provide an intelligent printing control method, apparatus, device, and medium.
[0169] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0170] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the required tasks. The programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0171] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant locality, and corresponding operation entry points shall be provided for the user to choose to authorize or refuse.
[0172] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0173] The above description is merely a specific embodiment of the present invention. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention 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 the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. An intelligent printing control method, characterized in that, The method includes: Acquire images of the substrate in a printing scenario; The image of the substrate is preprocessed to obtain a preprocessed image of the substrate; The preprocessed substrate image is input into a pre-trained deep learning model for model processing to obtain the target image; Based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, and combined with the coordinates of each pixel in the target image, the target printing information is calculated. Based on the target printing information, the printing of the substrate is completed.
2. The intelligent printing control method according to claim 1, characterized in that, The preprocessing of the substrate image to obtain the preprocessed substrate image includes: The invalid regions of the substrate image are cropped to obtain the substrate image after removing the invalid regions. The image of the substrate after removing invalid areas is scaled to obtain a size-adjusted image of the substrate. The image of the substrate after size adjustment is converted to grayscale to obtain a grayscale image; The grayscale image is normalized to obtain the preprocessed image of the substrate.
3. The intelligent printing control method according to claim 1, characterized in that, If the substrate image includes multiple frames of target camera images captured at several preset camera positions, then the target image corresponds to each of the target camera images after model inference; If the image of the substrate includes a target camera image captured at a preset camera position, then the target image corresponds to several local region images after model inference, wherein the local region images include region images obtained by segmenting the preprocessed target camera image.
4. The intelligent printing control method according to claim 3, characterized in that, Before calculating the target printing information based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, combined with the coordinates of each pixel in the target image, the following steps are also included: Multiple calibration points are printed on the substrate using a printhead that is on the same plane as the substrate, and the printhead control coordinates of each calibration point are obtained. Based on the preset camera position, acquire at least one frame of calibration image corresponding to the substrate with each calibration point printed on it. The calibration image is processed to obtain the global image coordinates of each calibration point, wherein the image processing includes edge detection, corner detection and template matching; The coordinate transformation matrix is calculated based on the global image coordinates of each calibration point and the nozzle control coordinates of each calibration point; If there is only one calibration image, then the calibration image is segmented to obtain images of each calibration region; The calibration points in each calibration region image and each calibration point in each calibration image are matched, and the image stitching matrix is calculated based on the global image coordinates and local image coordinates of the matched points. If there are at least two calibration images, then each calibration point in each calibration image is matched, and the image stitching matrix is calculated based on the global image coordinates of the matched points.
5. The intelligent printing control method according to claim 4, characterized in that, The calculation of the target printing information based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, combined with the coordinates of each pixel in the target image, includes: Based on the image stitching matrix, the coordinates of each pixel in each target camera image after model inference or the coordinates of each pixel in each local region image after model inference are processed to obtain the initial printing coordinates; Based on the initial print coordinates, obtain the print color information corresponding to the initial print coordinates; The initial printing coordinates are processed according to the coordinate transformation matrix to obtain the target printing coordinates; The target printing information is determined based on the printed color information and the target printing coordinates.
6. The intelligent printing control method according to any one of claims 1 to 5, characterized in that, Before inputting the preprocessed substrate image into a pre-trained deep learning model for model processing to obtain the target image, the process further includes: Based on the preset model inference task corresponding to the printing scenario, obtain the generative deep learning model architecture corresponding to the model inference task as the initial model; Based on the initial model, the training parameters in the initial model are obtained, and based on the training parameters, the hyperparameters used for training data processing are determined, wherein the hyperparameters include at least one of the following parameters: learning rate, batch size, and number of iterations; Based on the hyperparameters, the training data is preprocessed to obtain standardized data that meets the model input requirements; The standardized data is input into the initial model for training, and the initial model is optimized based on the key performance indicators during the training process to obtain the deep learning model.
7. The intelligent printing control method according to claim 6, characterized in that, Before preprocessing the training data according to the hyperparameters to obtain standardized data that meets the model input requirements, the method further includes: Acquire substrate image data in industrial printing scenarios; The substrate image data is cropped to remove invalid feature areas and determine key feature areas; Based on the annotation category and number of annotations corresponding to the preset printing task requirements in the printing scenario, the key feature regions are annotated to obtain annotated image data; The labeled image data is converted and classified to obtain the training data.
8. An intelligent printing control device, characterized in that, The device includes: The substrate image acquisition module is used to acquire images of the substrate in the printing scenario; The preprocessing module is used to preprocess the substrate image to obtain a preprocessed substrate image. The model inference module is used to input the preprocessed substrate image into a pre-trained deep learning model for model processing to obtain the target image; The target printing information determination module is used to calculate the target printing information based on the coordinate transformation matrix between image coordinates and nozzle control coordinates, combined with the coordinates of each pixel in the target image. The printing module is used to print the substrate according to the target printing information.
9. A printing device, characterized in that, include: At least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method as described in any one of claims 1-7.
10. A storage medium storing computer program instructions thereon, characterized in that, The method as described in any one of claims 1-7 is implemented when the computer program instructions are executed by the processor.
