Test image synthesis method for ocr function of slide scanner and application thereof

By building a domain knowledge-driven image synthesis engine, high-fidelity virtual slide label test images are generated, solving the problems of insufficient test data and incomplete scene coverage in existing technologies, and realizing efficient and automated OCR testing.

CN122049923BActive Publication Date: 2026-07-24SHENZHEN SHENGQIANG TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN SHENGQIANG TECH
Filing Date
2026-04-17
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies rely on manually preparing physical glass slide samples for OCR function testing, resulting in a lack of test data, incomplete scene coverage, and low efficiency. Furthermore, general image synthesis technologies cannot generate high-fidelity, multi-scene glass slide label test images.

Method used

A domain knowledge-driven image synthesis engine is built to generate high-fidelity virtual slide label test images by layering and combining the visual styles and physical perturbation models of slide labels, and outputs ground truth information.

Benefits of technology

Significantly improves testing efficiency, expands test scenario coverage, enables automated testing pipelines, and generates images that can be used for the correctness and robustness testing of OCR functions, reducing costs and improving the relevance and coverage of test data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122049923B_ABST
    Figure CN122049923B_ABST
Patent Text Reader

Abstract

The application provides a test image synthesis method for a slide scanner OCR function and application thereof, and belongs to the fields of medical image processing and computer vision. In view of the problems of low test data generation efficiency, high cost and incomplete complex scene coverage caused by the existing dependence on physical slide samples, the application receives a synthesis request containing a test strategy, extracts a target style template from a template library, and renders text into a base image; based on the strategy, a target disturbance model is selected from a pre-constructed disturbance model library specially simulating physical imaging defects of a slide label; the selected model is used for multi-layer mask fusion disturbance processing on the base image, a virtual test image is generated, and matched structured true value information is output. The application is mainly used for automatically and low-costly generating targeted high-fidelity test data in batches, so as to assist in directional evaluation and quality assurance of an embedded OCR function of a slide scanning software.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of embedded software testing, medical image processing, and computer vision technology, specifically to a test image synthesis method for OCR function of slide scanners and its application, which is suitable for generating high-fidelity, multi-scene virtual slide label test images to carry out full-dimensional testing of OCR function. Background Technology

[0002] The rapid development of digital pathology has made fully automated slide scanners a key device for pathological sample analysis. Their accompanying Linux embedded control software integrates optical character recognition (OCR) functionality, which can automatically identify key information such as patient ID and sample number on slide labels. This is a core component for realizing pathological sample tracking and automated testing processes. Therefore, ensuring the accuracy and robustness of OCR functionality in various real and complex scenarios is crucial.

[0003] Currently, testing of the OCR function of slide scanners mainly relies on manually prepared physical slide samples. This testing method has significant drawbacks: First, test data is scarce and preparation costs are high. Creating physical samples that cover variations in font, dirt, lighting, tilt angle, and other conditions is time-consuming and labor-intensive, making it difficult to systematically cover various edge cases. Second, the coverage of test scenarios is low. Limited physical samples cannot simulate complex scenarios in actual use, such as extreme uneven lighting, partial occlusion, and rare low-quality printing, resulting in insufficient test sufficiency and the software being prone to recognition failures in special scenarios. Third, the testing efficiency is low. Manual testing processes are cumbersome, while automated testing is difficult to implement due to the lack of sufficient and diverse test images.

[0004] Existing general image synthesis and data augmentation techniques are mostly used for deep learning model training. The image perturbations generated by these techniques are random and do not model the domain characteristics of glass slide labels. They cannot simulate the unique defects of glass slide scanning, such as the reflection of the slide material, the wrinkles of the label paper, the ink bleeding, and the Newton's rings on the edge of the cover glass. Therefore, it is difficult to generate high-fidelity test images that meet the requirements of OCR testing.

[0005] In summary, there is an urgent need in this field for a technical solution that can efficiently and cost-effectively generate high-coverage and highly targeted glass slide label test images to address the many drawbacks of existing testing methods. Summary of the Invention

[0006] This application provides a test image synthesis method for OCR function of slide scanners and its application. It addresses the problems of existing technologies that rely too much on limited physical slide samples or lack domain-specific general image enhancement methods, resulting in low efficiency, high cost and incomplete coverage of complex scenarios in OCR test data generation.

[0007] The core technology of this invention is to build a domain knowledge-driven and configurable image synthesis engine. By layering and combining the visual style of the glass slide label with physical perturbations (optical, material, and mechanical properties) and merging them with a masked pixel level, high-fidelity directional OCR test images and associated ground truth values ​​are dynamically generated.

[0008] In a first aspect, this application provides a method for synthesizing test images for the OCR function of a slide scanner, the method comprising the following steps:

[0009] Receive a synthesis request containing the test strategy; Based on the testing strategy, the target style template is determined from the pre-built style template library, and the target text content is rendered to generate a base image according to the target style template. Based on the testing strategy, at least one target perturbation model is determined from a pre-built perturbation model library, which is used to simulate the physical imaging defects of the slide label; The base image is perturbed using at least one target perturbation model to generate a virtual slide label test image; Output the test image of the virtual glass slide label and the corresponding ground truth information.

[0010] Furthermore, the perturbation model library includes models for simulating at least one of the following physical imaging defects: optical feature deviation, material contamination deformation, and mechanical operation displacement.

[0011] Furthermore, optical characteristic deviations include defocus blur, uneven illumination, and light transmission interference. Material contamination and deformation include paper surface wrinkles, liquid stains, fingerprints, and ink bleeding or fading; Mechanical displacement includes perspective changes caused by the tilting of the slide and slight motion blur caused by the movement of the stage.

[0012] Furthermore, the testing strategy is used to configure the key defect types to be evaluated, the target text content sequence, the target style filtering conditions, and the value range of the corresponding perturbation parameters.

[0013] Furthermore, perturbating the base image using at least one target perturbation model includes: The test strategy is analyzed to determine the stacking priority order of each target perturbation model. The stacking priority order is either a preset execution order based on the physical imaging evolution logic or a custom order set according to the test target. Based on the determined stacking priority order, the base image or the intermediate image after the previous perturbation is processed sequentially through matrix mapping transformation or pixel value modulation operation to generate an intermediate image sequence with progressive perturbation features.

[0014] Furthermore, after sequentially generating the intermediate image sequence with progressive perturbation features, the method further includes a pixel-level layered mask fusion step for the intermediate image sequence, specifically including: Obtain the effective region mask and fusion weight parameters corresponding to each intermediate image; Within the effective region mask, the pixel matrix is ​​updated by weighting the pixel values ​​of the base layer image and the intermediate image. The boundary regions of each perturbation feature in the fused image are smoothed to output the final fused virtual slide label test image.

[0015] Furthermore, the truth information includes a structured record file, which maps and stores the original text content corresponding to the virtual slide label test image, the selected style template parameters, the type and parameters of the applied perturbation model, and the annotation data used to locate the perturbation-affected area of ​​the target character.

[0016] Secondly, this application provides a test image synthesis device for the OCR function of a slide scanner, comprising: Configure the interface module to receive synthesis requests containing test strategies; The strategy parsing module is used to parse the test strategy in the synthetic request to obtain the test intent and related parameter configuration; The style and content management module is used to retrieve the target style template based on the parsed test strategy and render the target text content to generate a basic image; The perturbation model execution engine manages the perturbation model library and schedules target perturbation models that match the test intent according to the test strategy. The image synthesis module is used to perform perturbation processing and fusion processing on the base image using the scheduled target perturbation model, generate an intermediate image sequence with progressive perturbation features, and fuse them to obtain a virtual slide label test image. The output module is used to output the generated virtual slide label test image and its corresponding mapping truth information file.

[0017] Thirdly, this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the above-described test image synthesis method for the OCR function of a slide scanner.

[0018] Fourthly, this application provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the test image synthesis method according to the above-described method for OCR function of a slide scanner.

[0019] The main contributions and innovations of this invention are as follows: 1. Significantly improves testing efficiency and reduces testing costs: It can generate massive amounts of test images in minutes, completely replacing or significantly reducing the reliance on physical glass slide samples, significantly reducing the time, material and labor costs of test data preparation, and adapting to the rapid iteration development pace of software.

[0020] 2. Significantly expands the coverage of test scenarios: Through parameterized physical perturbation models, test edge case images that are difficult to produce or rare in the physical world can be systematically generated, enabling extreme testing of the robustness of OCR algorithms and improving the sufficiency of testing.

[0021] 3. Enhance the targeting and purpose of testing: Supports the generation of test images based on testing strategies, enabling precise testing of specific weaknesses in OCR algorithms, making the testing objectives clearer and increasing the utility density of test data.

[0022] 4. Seamless support for automated test pipelines: The generated test images and structured truth files can be directly integrated into the automated testing framework of embedded software, realizing full-process automation of test case generation, execution, and result verification, and helping DevOps continuous integration.

[0023] 5. Excellent scalability and iterativeness: The style template library and physical perturbation model library can learn from real slide images through machine learning and be continuously updated and expanded to continuously improve the realism of the synthesized images and the effectiveness of the test; at the same time, the system is decoupled from the embedded device, which facilitates the implementation of left shift test.

[0024] 6. Achieve multi-dimensional coverage of testing: The generated test images can not only be used for the correctness testing of OCR function, but also for performance testing of recognition time and robustness testing under continuous interference, providing a high-quality data foundation for the quantitative evaluation and optimization of OCR algorithm.

[0025] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0026] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a system architecture diagram of a test image synthesis apparatus according to an embodiment of this application; Figure 2 These are example diagrams illustrating the composite image effect according to embodiments of this application; Figure 3This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0027] The following is in conjunction with the appendix Figure 1 To be continued Figure 2 This document provides a detailed description of the specific implementation of the test image synthesis method and apparatus for the OCR function of a slide scanner according to the present invention. This embodiment is a preferred solution for implementing the present invention, and its description is intended to explain the present invention, rather than to limit the present invention.

[0028] The technical solution of this invention is applicable to automated testing scenarios of optical character recognition (OCR) functions in Linux embedded slide scanning software. By constructing a domain knowledge-driven configurable slide label test image synthesis engine, it achieves automated and batch generation of virtual slide label test images and simultaneously outputs structured truth information. This solves the problems of insufficient test data, incomplete scene coverage, and low testing efficiency caused by the reliance on manual preparation of physical slide samples in existing technologies. Those skilled in the art can fully implement all the technical solutions of this invention without creative effort based on the description of this embodiment.

[0029] Example 1: Module Composition and Functions of a Test Image Synthesis Device The test image synthesis apparatus of the present invention is a hardware carrier for implementing the above-described test image synthesis method, as shown in the attached figure. Figure 1 As shown, the device includes a configuration interface module, a strategy parsing module, a style and content management module, a perturbation model execution engine, an image synthesis module, and an output module. These modules work together via a preset data stream to complete the entire process from receiving the synthesis request to outputting the test image and truth information. The overall execution flow of the corresponding test image synthesis method includes four core steps: S1 receiving the synthesis request, S2 generating the base image, S3 applying multi-layer perturbations, and S4 image fusion and output. The same target text, after being combined with different style templates and perturbation models, can generate images as shown in the attached diagram. Figure 2 The differentiated test images shown include clear, ideal images, images with paper wrinkles and shadows, images obscured by light stains, and images with tilted perspective transformations, which accurately simulate various physical imaging defects during the glass slide scanning process.

[0030] As attached Figure 1 As shown, the test image synthesis device of the present invention has a modular architecture, with each module performing its own function and data flow linked in a unidirectional manner. Requests are input from the configuration interface module, instructions are issued by the strategy parsing module, basic templates and model support are provided by the style and content management module and the perturbation model execution engine, the image synthesis module completes the core image generation and processing, and finally the output module outputs the results. The detailed functions and core configurations of each module are as follows: (a) Configure the interface module Configure interface module ( Figure 1 The user configuration interface (in the module) serves as the user's interaction point with the device, supporting user input of synthesis requests containing test strategies via configuration files or a graphical interface. This module features format validation for synthesis requests, automatically verifying the completeness and format compliance of test strategy parameters within the request. It provides prompts for requests with missing parameters or incorrect formats, ensuring smooth subsequent parsing and execution processes.

[0031] (II) Strategy Analysis Module Strategy parsing module ( Figure 1 The test strategy parser (connected to the configuration interface module) has the core function of parsing the test strategy in the synthetic request, extracting the structured test intent and parameter configuration, and sending the parsing results to subsequent execution modules. The parsed and extracted content strictly matches the synthetic request configuration items, including: target text content or text content generation rules, expected test style type, perturbation categories that need to be verified and their parameter ranges, perturbation model stacking order configuration, output format requirements, etc. This module will standardize and store the parsed parameters to provide a basis for the accurate execution of subsequent modules.

[0032] (III) Style and Content Management Module The style and content management module has a built-in domain-specific style template library and also manages the target text content, making it the core module for generating basic images. The style template library is a pre-built collection of parameterized templates, with all defined core template features integrated, including four main categories: layout, background color / texture, font type and size, and text color. Specifically: 1. Layout: Includes typical layouts such as single-row horizontal, multi-row vertical, and tabular (e.g., 3 rows 2 columns, 2 rows 2 columns); 2. Background: There are two types: solid color background and textured background. Textured background supports overlaying different label paper textures and configuring the transparency. 3. Font: Includes commonly used font types, pixel-level font size ranges, and text color parameters for slide label printing equipment; 4. Template Examples: The library pre-stores various standardized parameter templates, including standard single-line label templates (single-line horizontal layout, #FFFFFF solid color background, Arial font, 24-28 pixel font size, #000000 text color), table-type label templates (2-row 2-column layout, #F2F2F2 solid color background, Courier New font, 16-18 pixel font size, #2C3E50 text color), and multi-line handwritten style templates (two-line layout, light yellow textured background, Segoe Print font, 20-22 pixel font size, #1A5276 text color), etc.

[0033] Based on the style type filtering conditions issued by the strategy parsing module, this module matches and determines the target style template from the style template library, and then renders the target text content onto the specified background canvas according to the template parameters to generate an "ideal" base image without any disturbance. The pixel format and resolution of the base image are consistent with the actual output image of the slide scanner.

[0034] (iv) Perturbation Model Execution Engine The perturbation model execution engine has a built-in physical property-driven parameterized perturbation model library, which is the core module for simulating defects in slide imaging. The core function of this engine is to manage the perturbation model library and, according to the instructions of the strategy parsing module, schedule the target perturbation model that matches the test intent, while outputting the perturbation parameters corresponding to the model.

[0035] This module categorizes the disturbance model library into three types: optical feature deviation, material and contamination disturbance, and mechanical and operational disturbance. Each type of model is parametrically designed, and different intensities and morphologies of defects can be simulated by adjusting the parameters. The specific models and their modified classifications are as follows: 1. Optical Feature Deviation Model: Simulates optical defects in the scanner imaging process, including defocusing blur, uneven illumination (gradual changes in brightness, light spots), lens distortion, and Newton's rings (optical interference at the edge of the coverslip). Each model is designed through optical imaging-related algorithms to accurately reproduce optical imaging deviations. 2. Material and Contamination Disturbance Model: Simulates the physical defects of the slide label itself, including shadows and highlights caused by paper wrinkles, water droplets / reagent stains, fingerprints, ink bleeding or fading. The model design fits the actual contamination scenario of medical slide labels, and the parameters can be adjusted to the size, location, transparency and other characteristics of the contamination. 3. Mechanical and Operational Disturbances Model: This model simulates physical deviations caused by slide placement and equipment operation, including perspective distortion due to slide tilting, slight motion blur caused by stage movement, and shadows generated by the cover glass edge. The model is designed based on the physical laws of mechanical motion to reproduce imaging deviations during equipment operation.

[0036] In addition, the engine supports sequential and parallel application of perturbation models. It can issue timing instructions for model invocation to the image synthesis module according to the stacking order configured in the test strategy. It also supports range configuration and gradient configuration of perturbation parameters to meet different testing needs such as batch testing and directional gradient testing.

[0037] (v) Image synthesis module Image synthesis module ( Figure 1The image rendering and compositing module is the core processing module of this device. It interfaces with the style and content management module and the perturbation model execution engine, and undertakes three core functions: basic image reception, multi-layer perturbation application, and image fusion post-processing. It strictly follows the step logic of S2-S4 to carry out processing: First, it receives the basic image generated by the style and content management module. Then, according to the instructions of the perturbation model execution engine, it selects the target perturbation model to perform single-layer or multi-layer perturbation processing on the basic image to generate a perturbated intermediate image. If it is a multi-perturbation model combination scenario, this module will execute a priority-driven masked pixel-level layered fusion algorithm to fuse the intermediate image sequence and finally generate a virtual slide label test image that matches the real slide scanning imaging effect.

[0038] The image processing algorithms built into this module are all dedicated algorithms designed for the field of slide scanning, including geometric transformation, filtering, pixel blending, noise addition, matrix mapping, pixel value modulation, etc. Each algorithm is precisely matched with the physical characteristics of the corresponding perturbation model to ensure that the simulated imaging defects are realistic and effective, and can meet the OCR test requirements for the restoration of defect scenes.

[0039] (vi) Output module Output module ( Figure 1 The metadata output module (in the module) interfaces with the image synthesis module. Its core function is to synchronously output the virtual slide label test image and the corresponding structured truth information. The output content and format are designed for OCR automated testing. The specific output requirements are as follows: 1. Test Images: Supports mainstream lossless image formats such as PNG. The resolution and pixel format are consistent with the actual output of the slide scanner. They can be directly input into the OCR module for testing without additional format conversion. 2. Truth information: This is a structured record file in JSON format, corresponding one-to-one with the test image. It contains full traceability information of image synthesis and can be directly integrated into an automated testing framework to achieve automatic verification and traceability analysis of test results.

[0040] Example 2: Overall Execution Steps of the Test Image Synthesis Method The test image synthesis method of the present invention is implemented based on the above-mentioned device. The core execution steps of the method are: S1 receiving the synthesis request, S2 generating the basic image, S3 applying multi-layer perturbation, and S4 image fusion and output. The four steps are sequentially connected according to business logic to form a standardized and reusable image synthesis pipeline. The detailed execution process and operation details of each step are designed around the actual needs of OCR testing of slide scanners, as follows: S1. Receive Synthesis Request: The module receives synthesis requests from the user via the configuration interface. These requests must contain complete test strategy configurations. Requests without a test strategy will be considered invalid and will not proceed to the next parsing stage. The core configuration items for the test strategy include: The target text content (or text content generation rules, such as randomly generating sample IDs in a specified format), the desired test style type (e.g., single-line horizontal layout, solid color background), the perturbation categories that need to be verified and their parameter ranges (e.g., reagent stains, radius 20-50 pixels), the configuration of the perturbation model stacking order (default order or custom order), the image output format, and the requirements for truth information output, etc. After the configuration interface module completes the format verification of the request, it will transmit the valid request to the strategy parsing module for structured parsing.

[0041] The synthesis strategy can be defined in a structured manner using JSON format, as shown in the code example below: { "test_objective": "stain_occlusion", / / Focuses on testing the impact of stain occlusion on various fonts. "style_filter": { "layout": ["single_line_horizontal"], / / Single-line horizontal "background_type": ["solid_color"] / / Solid color background }, "content": { "type": "list", / / List type "values": ["ID:001", "ID:002A", "Sample-A1B2"] / / Target text }, "perturbation_plan": [ { "model": "liquid_stain", / / Liquid stain model "priority": 1, / / Priority is 1 "params": { "stain_color": "#FFFACD80", / / Stain color "radius_range": [20, 50], / / Radius range "num_stains": [1, 3] / / Number of stains }, "position_strategy": "over_text_sequence" / / Move along the text sequence }, { "model": "defocus_blur", / / Defocus blur model "priority": 2, / / Priority is 2 "params": { "kernel_size": [3, 5] / / Size of the blur kernel }, "apply_probability": 0.5 / / 50% probability of application } ], "output": { "format": "png", / / Output format "include_ground_truth": true / / Include the truth file } } S2. Generating the Base Image: After the strategy parsing module completes the analysis of the test strategy, it sends style filtering conditions and target text content execution instructions to the style and content management module. Based on the style filtering conditions, the style and content management module accurately matches and determines a unique target style template from its built-in style template library. Then, strictly following the template's layout, background, font, text color, and other parameters, it renders the target text content onto the background canvas, generating an "ideal" label image without any disturbances or imaging defects—the base image. The base image serves as the benchmark for all subsequent disturbance processing; its resolution, pixel format, and color mode are consistent with the actual output image of the slide scanner, ensuring the compatibility between the test image and the actual scanned image from the source.

[0042] For example, the specific template parameters are shown below: 1. Standard single-line label template: The layout is a single horizontal line, the background is pure white, the font is Arial, the font size ranges from 24 to 28 pixels, and the color is black.

[0043] 2. Multi-line handwritten style template: The layout consists of two lines, one above the other, with a yellow paper texture overlaid on the background (transparency 1.0). The font used is Segoe Print, with a font size range of 20 to 22 pixels and a dark blue color.

[0044] 3. Table-style label template: The layout consists of two rows and two columns, with a light gray background, using the Courier New font, a font size range of 16 to 18 pixels, and a dark gray color.

[0045] The system renders the target text onto the corresponding background based on the selected template, generating a clear and ideal base image.

[0046] S3. Perturbation Processing: The strategy parsing module sends execution instructions, including perturbation type, parameter range, and stacking order, to the perturbation model execution engine. The perturbation model execution engine selects at least one target perturbation model from the built-in perturbation model library and transmits the model and its associated parameters to the image synthesis module. The image synthesis module takes the base image generated in S2 as input and calls the target perturbation models sequentially or in parallel according to a preset or custom stacking order. It then performs corresponding image processing algorithms (such as geometric transformation, filtering, pixel blending, etc.) on the base image. Each time a perturbation model is called, an intermediate image with a single perturbation is generated. After applying multiple perturbations, a sequence of intermediate images with progressive perturbation features is generated.

[0047] In this step, the stacking order of the perturbation models supports two configuration methods to adapt to different test target requirements: 1. Preset default order: Based on the physical logic of slide scanning imaging, the execution order is optical feature deviation → mechanical and operational disturbance → material and contamination disturbance → post-processing fine adjustment. This order conforms to the imaging defect generation rules of real slide labels, requiring no additional configuration by the user and can directly meet the needs of routine batch testing. 2. Custom order: Users can manually configure the order in the test strategy according to the specific test target. It supports the layered and parallel application of perturbations. For example, when testing the OCR algorithm's ability to recognize "dirty and then blurred" scenes, it can be configured to apply reagent stain perturbation first and then apply defocus blur perturbation. The perturbation model execution engine will strictly schedule the model according to the user-defined order to accurately generate scene images that fit the test target.

[0048] In this embodiment, to achieve realistic physical simulation, the underlying algorithm logic of each core perturbation model is as follows: 1. Liquid Stain Occlusion Model: Irregular shapes are simulated by overlaying multiple circular regions with variable transparency and radius, and Berlin noise is introduced to perturb the boundaries. The preset stain color is alpha-blended with the base image pixels.

[0049] 2. Light transmission interference phenomenon (Newton's rings) model: The intensity I of the interference fringes is calculated based on the distance d from the pixel to the center of the preset ring. The calculation formula is as follows: ,in Control the stripe spacing. Multiply the intensity map as a modulation factor by the pixel brightness.

[0050] 3. Uneven Illumination Model: Generates a gradient mask of the same size as the image. Taking center illumination as an example, the formula for the pixel brightness coefficient is:

[0051] Where c is the luminance coefficient; This refers to the physical spatial distance (usually calculated using Euclidean distance) between the coordinates of the pixel currently being calculated and the coordinates of the preset illumination center point. falloff The set attenuation base is used to control the rate at which brightness decreases from the center to the edge; It refers to the effective radius of influence of the preset light spot, or the maximum spatial distance from the center point of the light source within the image area (e.g., the distance from the center point to the four corners of the image).

[0052] Subsequently, the calculated luminance coefficient c is modulated with the original pixel values ​​of the base image, using the following formula: .in, It is the original pixel value of the base image at the current pixel coordinates; These are the new pixel values ​​generated after processing for uneven lighting.

[0053] 4. Slide Perspective Transformation (Tilt) Model: Calculate the perspective transformation matrix H. For small tilt angles θ, use the affine transformation matrix. ,in dx and dy are the translation amounts used for centering. Image pixels are remapped using bilinear interpolation.

[0054] S4. Image Fusion and Output: This step is the final step in test image synthesis, completed collaboratively by the image synthesis module and the output module. Its core is to perform post-fusion processing on the intermediate image sequence generated in S3 and output the final test image and ground truth information. The fusion algorithm is a dedicated algorithm designed for OCR test image synthesis using a slide scanner, specifically divided into two sub-steps: image fusion post-processing and result output. Sub-step 1: Image fusion post-processing For the intermediate image sequence generated by the multi-perturbation model, a priority-driven masked pixel-level hierarchical fusion algorithm is used for processing. The core design logic of this algorithm is physical image restoration, perturbation feature fidelity, pixel-level accurate fusion, and strategy-based weight adaptation. It can achieve natural superposition of multiple perturbation features while preserving the core features of each perturbation, ensuring the validity of the test image. The algorithm execution consists of four core steps: preprocessing, perturbation priority sorting, hierarchical masking fusion, and post-processing optimization. The detailed operation of each step is as follows: 1. Preprocessing: Pixel values ​​are normalized for the base image and all intermediate images, mapping them uniformly to the [0, 255] range. For RGB images, normalization is performed on the R, G, and B channels to eliminate the scale differences in pixel values ​​after processing by different perturbation models. The size and format of the effective region mask (binary pixel matrix, where pixel value 1 represents the effective perturbation region and pixel value 0 represents the unperturbed region) for each perturbation are verified to ensure that the mask is consistent with the image resolution and is in pure binary format. Invalid masks are automatically corrected. If an intermediate image contains geometric transformation perturbations, it is confirmed that they have been applied as a base layer to the base image. If they have not been applied, they are used as the new fusion benchmark, and all subsequent fusion operations are performed based on this new benchmark.

[0055] 2. Perturbation Priority Sorting: Based on the predefined perturbation overlay priority table (occlusion perturbation → optical modulation perturbation → color / contrast perturbation → geometric transformation perturbation), perturbations in the intermediate image are grouped by type according to priority; within the same priority group, a secondary sorting is performed according to the fusion weight configured by the test strategy, with higher weight values ​​indicating earlier fusion order; finally, a standardized fusion order list is generated, and the fusion process is strictly executed in descending order according to this list.

[0056] 3. Layered Masking Fusion: Using the normalized reference image as the initial fusion image, masked pixel fusion calculations are performed sequentially for each perturbation according to the fusion order list. Let k perturbations be applied currently, with their fusion weights as follows: The effective region mask is The pixel value of the intermediate image in the kth layer is The result of the fusion at the previous layer is .

[0057] When mask When the current pixel value is updated, the formula is:

[0058] When mask At that time, the pixel value remains at Unchanged. The weight of occlusion-type perturbations is usually set to 1 (complete coverage), and the weight of semi-transparent perturbations is set between 0 and 1.

[0059] Specifically, the integration process follows specific rules: Opaque occlusion perturbations have a blending weight of 1 to achieve a complete occlusion physical effect; semi-transparent perturbations are configured with a weight of 0 < 0. A fusion weight of <1 is used to achieve a gradual fusion effect for partial occlusion; global perturbation sets the effective region mask to an all-1 matrix and performs fusion calculations on the entire image. After each perturbation fusion is completed, the initial fused image is updated immediately until all perturbations are fused, resulting in the initial fused image.

[0060] 4. Post-processing optimization: The initial fused image is cropped and normalized to remove pixel values ​​outside the [0,255] range, avoiding visual distortions such as excessive brightness, darkness, or pixel value overflow. The edge areas of the perturbation mask are subjected to Gaussian blurring with a 3×3 kernel to eliminate pixel jaggedness caused by mask fusion, making the edges of the perturbation features more natural and conforming to the gradient effect of real slide imaging. According to the requirements of the test strategy, the fused image is converted to a specified format (such as PNG). If it is a grayscale OCR test, the RGB image is converted to an 8-bit grayscale image, and finally a virtual slide label test image that conforms to the real imaging effect is generated.

[0061] Sub-step 2: Output the result The image synthesis module transmits the final virtual slide label test image to the output module, which outputs the test image in the format required by the test strategy. At the same time, the output module generates a structured truth information file in JSON format based on the full information of this image synthesis, which corresponds one-to-one with the test image. The truth information contains all the key parameters of the synthesis process, which can provide a complete basis for the verification and traceability analysis of subsequent OCR test results.

[0062] In this embodiment, the truth information output by the present invention is a structured record file in JSON format, which is the core traceability data for OCR automated testing. Designed specifically for the needs of OCR testing of slide scanners, it includes full information such as image synthesis, perturbation application, and test benchmark. Each field is accurately mapped to the test image, and it also supports expanding fields such as defect annotation and affected area according to specific test targets. The specific structure is as follows: 1. Basic Image Information: Includes image ID, image name, image format, resolution, color mode, generation time, generation host, etc., used for the unique identification and management of test images; 2. Style Template Information: Includes the selected template ID, template type, background parameters, text style parameters (content, font, font size, color, layout), etc., fully recording the basis for the generation of the basic image; 3. Perturbation information: Includes the total number of perturbations, a list of perturbations (ID, type, specific parameters, fusion weight, and effective region for each perturbation), fusion order, fusion strategy, etc., recording all the details of the perturbation application; 4. Defect annotation information (optional extension): Includes annotation type, characters / areas affected by disturbance, impact level, etc., which can be configured for targeted testing scenarios. For example, in the local stain occlusion test, it can accurately annotate the occluded characters and their coordinates. 5. OCR test benchmark information (optional extension): Includes standard text, key recognition areas, number of allowed error characters, test targets, etc., providing a clear benchmark for verifying OCR test results; 6. Version Information: Includes truth value version and generated system version, used for version management and compatibility adaptation after system iteration.

[0063] The field structure of the truth information is designed with an open approach, allowing technical personnel in the relevant technical field to add, delete, or adjust optional extended fields according to actual testing needs without changing the core field structure, thus adapting to diverse OCR testing scenarios.

[0064] The truth file structure is shown below: { "image_basic_info": { "image_id": "patient_P2024001_015" / / Image ID }, "style_template_info": { "template_id": "style_01", / / Style number "template_type": "clinical_dual_field_label" / / Clinical dual-field label }, "disturbance_info": { "disturbance_total_num": 1, / / Total number of disturbances "disturbance_list": [ { "disturbance_id": "dis_11", / / Disturbance number "disturbance_type": "material_stain_occlusion", / / Material and stain disturbance - circular stain occlusion "fusion_weight": 1.0, / / Fusion weight "effective_area": ​​[[590, 510], [650, 570]] / / Effective mask coordinate area } ] }, "defect_annotation": { "covered_char": ["4"], / / The character that is covered "covered_char_coordinate": [[605, 520], [645, 560]] / / Coordinates of the covered area } } Example 3: Specific Application Case To further illustrate the technical solution of the present invention, the following three application examples are given in combination with different OCR testing requirements, respectively covering batch routine testing, directional single perturbation testing, and multi-perturbation combination complex scenario testing. Each embodiment can be executed independently or combined according to actual testing requirements. The generated test images can be directly applied to the functional testing, performance testing, and robustness testing of the OCR function of the slide scanner.

[0065] Application Example 1: Batch generation of routine test images based on preset templates and random perturbations This embodiment is used to generate a large-scale test set covering common imaging defect scenarios. It is suitable for performing regression testing and stress testing on the OCR module to evaluate its average recognition performance under different combinations of random perturbations. The specific execution process is as follows: 1. Configuration: Users input synthesis requests to the configuration interface module through configuration files. The test strategy is configured as follows: the target text content consists of 1000 different pathological sample IDs; the style type is one of five commonly used clinical label style templates from the style template library; the perturbation mode is "random perturbation"; four types of perturbations are enabled: defocus blur, noise, brightness and contrast adjustment, and slight tilt; and the parameters of each perturbation are set to a random range. The perturbation stacking order adopts the preset default order; the image output format is PNG; and complete ground truth information is required to be generated.

[0066] 2. Execution: After the strategy parsing module parses the test strategy, the style and content management module iterates through all combinations of 1000 sample IDs and 5 style templates, generating corresponding basic images one by one; the perturbation model execution engine randomly selects 1-3 from the four enabled perturbation models and generates specific parameters within the random parameter range, and issues scheduling instructions to the image synthesis module in a preset default order; the image synthesis module performs corresponding random perturbation processing on each basic image. Since this embodiment mainly uses single-type or small-scale perturbation combinations, there is no need to execute complex fusion algorithms. Only simple smoothing processing is performed on the perturbation edges to retain the core perturbation features.

[0067] 3. Output: The output module ultimately generates 1000 (text) × 5 (style) = 5000 virtual slide label test images. Each image is in PNG format and can be directly input into the OCR module for testing. At the same time, a corresponding JSON format truth information file is generated for each image. The file fully records the original sample ID, all parameters of the style template used, the type of perturbation applied and the specific random parameters, the perturbation fusion order, and other information.

[0068] 4. Application: Integrate 5,000 test images and their corresponding ground truth files into the automated testing framework for the OCR function of the slide scanner, conduct large-scale regression testing and stress testing, statistically analyze the overall recognition accuracy and average recognition time of the OCR algorithm, evaluate its average recognition performance in common imaging defect scenarios, and provide data support for the routine performance verification of the algorithm.

[0069] Application Example 2: Generation of directional single-perturbation test images for localized liquid stain occlusion This embodiment is used to verify the OCR algorithm's resistance to "partial smudge occlusion". It is suitable for accurately testing the OCR algorithm's recognition ability when characters are occluded to different degrees, and provides accurate test basis for optimizing image restoration or contextual reasoning algorithms. The specific execution process is as follows: 1. Configuration: Users input a synthesis request to the configuration interface module through a graphical interface. The test strategy is configured as follows: the style type is the clinical double-field label template in the style template library, the target text content is "Patient:Li Si ID:P2024001", the perturbation category to be verified is "circular stain perturbation model", the perturbation parameters are set as follows: stain radius and transparency are fixed values, the stain center position is linearly scanned along the text line direction; the perturbation stacking order is customized to apply the perturbation separately, the image output format is PNG, and the requirement is to generate ground truth information that includes defect annotations and OCR test benchmarks.

[0070] 2. Execution: The style and content management module generates a clear base image of the target text according to the configuration; the perturbation model execution engine schedules the circular stain perturbation model and sends corresponding parameter instructions to the image synthesis module; the image synthesis module moves the stain center along the text line from left to right with a fixed step size according to the scanning path set by the test strategy, and performs circular stain occlusion perturbation processing on the base image at each step size position to generate an intermediate image sequence; since this embodiment is a single perturbation model, only the stain edges of each intermediate image are smoothed, and there is no need to perform multi-perturbation fusion operation to ensure that the stain occlusion features are clear and accurate.

[0071] 3. Output: The output module generates 20 virtual slide label test images in sequence. Each image corresponds to a stain at a specific position in the text line, respectively achieving the occlusion of different characters / fields such as "Li", "Li Si", and "ID:". In addition to recording the basic image, style, and perturbation parameters, the corresponding truth information file also annotates the character area covered by the stain in each image, its coordinates, the level of influence, as well as the standard text, key recognition areas, and test targets of the OCR test.

[0072] 4. Application: Input the 20 test images into the OCR module one by one to verify the recognition results and count the recognition accuracy under different character occlusion scenarios; for scenarios where recognition fails, conduct in-depth analysis of the shortcomings of the OCR algorithm to provide accurate test basis for optimizing the algorithm logic of the image restoration and context reasoning sub-modules, and improve the algorithm's ability to recognize smudged scenes.

[0073] Application Example 3: Generation of Orientation Test Images for Complex Scenes with Multiple Perturbations This embodiment is used to verify the recognition performance of the OCR algorithm in real-world complex scenarios with multiple types of defects superimposed. Taking the combination of uneven low illumination and tilted slide as an example, it covers the superimposed scenario of optical feature deviations and mechanical and operational disturbances, adapting to the situation where multiple defects occur simultaneously in actual clinical scanning. The specific execution process is as follows: 1. Configuration: Users input synthesis requests to the configuration interface module through configuration files. The test strategy is configured as follows: the style type is the clinical double-line style template in the style template library, the target text content is "Sample:BL202405Type:Histology", and the perturbation categories to be verified are "low illumination unevenness" and "slide tilt". The specific parameters are set as follows: the illumination unevenness is a global linear gradient with the left side dark and the right side bright, the basic brightness difference is 0.6, the slide tilt is 6° clockwise, and the perspective distortion intensity is 0.3. At the same time, the fusion weights (illumination perturbation 0.8, tilt perturbation 1.0) and the stacking order are set (mechanical and operational perturbations <tilt> first, then optical feature deviations <illumination>). The gradient range for the illumination difference is set to 0.3-0.8, and the gradient range for the slide tilt angle is set to 3°-9°. The image output format is PNG, and ground truth information containing fusion details is required to be generated.

[0074] 2. Execution: The style and content management module generates a clear base image of the target text based on the configuration; the perturbation model execution engine sequentially schedules the slide tilt model and the low-light unevenness model, and sends gradient perturbation parameters to the image synthesis module; the image synthesis module first calls the slide tilt model, and performs perspective transformation at different angles on the base image through matrix mapping transformation to generate a sequence of intermediate images with tilt; then, based on this sequence, it calls the low-light unevenness model, and performs illumination gradient processing with different brightness differences on each image through pixel value modulation operation to generate a secondary intermediate image sequence; subsequently, it executes a priority-driven masked pixel-level layered fusion algorithm on the secondary intermediate image sequence. Since both types of perturbation are global perturbations, the effective area mask is set to an all-1 matrix, and the pixel values ​​are weighted according to the configured fusion weights. Finally, the image edges are smoothed to ensure that the two types of perturbation features are naturally superimposed without distortion.

[0075] 3. Output: The output module generates 40 virtual slide label test images with multiple perturbation combinations, each with 6 gradients of illumination difference × 5 gradients of tilt angle. Each image closely matches the complex imaging scenario in clinical practice. The corresponding truth information file fully records the text, style parameters, specific gradient parameters of the two types of perturbations, fusion weights, superposition order, and key algorithm parameters of geometric transformation and pixel modulation. It also marks the key recognition areas of the OCR test.

[0076] 4. Application: Input the 40 test images into the OCR module to verify the algorithm's recognition ability under the dual interference of geometric deformation and optical modulation. Test the collaborative working effect of the tilt correction and illumination equalization preprocessing sub-modules of the OCR algorithm. Based on the recognition performance decay law under gradient parameters, jointly optimize the two sub-modules to improve the robustness of the OCR algorithm in complex real-world scenarios and ensure its recognition accuracy in clinical applications.

[0077] The technical solution of this invention has good scalability, iterability, and engineering adaptability. It is designed for software development models that involve rapid iteration and continuous integration, and can be flexibly adjusted and extended according to actual engineering needs. Specific extensions are described below: 1. Library updates and expansions: The style template library and perturbation model library of this invention are both open parameterized library structures. They can learn typical visual styles and imaging defect features from a large number of real glass slide scan images through machine learning, continuously update and expand the types of templates and models, optimize parameter configurations, and continuously improve the realism and test effectiveness of the synthesized test images. 2. System Deployment Method: The test image synthesis device / system of the present invention is implemented in software form and can be flexibly deployed on the test server or the PC of the developer. It is completely decoupled from the embedded device of the slide scanner, which facilitates the "test left shift", adapts to the development mode of modern software rapid iteration and continuous integration, and improves test efficiency. 3. Multi-dimensional test adaptation: The test images generated by this invention can be used not only for functional testing of OCR functions (judging the correctness of recognition results), but also for performance testing (statistical analysis of recognition time under different perturbation scenarios) and robustness testing (verifying the recognition stability of the algorithm under continuous gradient perturbation), providing a high-quality data foundation for the quantitative evaluation and precise optimization of OCR algorithms; 4. Complete Solution Integration: The test image synthesis method and device of the present invention can be combined with an automated testing framework based on a hardware abstraction layer, in-situ evaluation and parameter optimization methods to form a complete embedded slide scanning software OCR quality assurance solution. This achieves a closed-loop process from test case generation and automated test execution to algorithm performance evaluation and parameter optimization, thereby comprehensively improving the testing quality and development efficiency of the slide scanner's OCR function.

[0078] Example 4 This embodiment also provides an electronic device, see reference. Figure 3 It includes a memory 404 and a processor 402, wherein the memory 404 stores a computer program and the processor 402 is configured to run the computer program to perform the steps in any of the above method embodiments.

[0079] Specifically, the processor 402 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0080] Memory 404 may include a mass storage device for data or instructions. For example, and not limitingly, memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), 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, memory 404 may include removable or non-removable (or fixed) media. Where appropriate, memory 404 may be internal or external to a data processing device. In a particular embodiment, memory 404 is non-volatile memory. In a particular embodiment, memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.

[0081] The memory 404 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.

[0082] The processor 402 reads and executes computer program instructions stored in the memory 404 to implement any of the test image synthesis methods for the OCR function of the slide scanner in the above embodiments.

[0083] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.

[0084] The transmission device 406 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 406 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0085] Input / output device 408 is used to input or output information.

[0086] Example 5 This embodiment also provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including a test image synthesis method for the OCR function of a slide scanner according to Embodiment 2.

[0087] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0088] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.

[0089] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product may include one or more computer-executable components configured to perform the embodiments when the program is run. The one or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted in this respect that, as Figure 1 Any box in the logical flow can represent a program step, or interconnected logic circuits, boxes and functions, or a combination of program steps and logic circuits, boxes and functions. Software can be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.

[0090] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0091] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for synthesizing test images for OCR functions of slide scanners, characterized in that, Includes the following steps: Receive a synthesis request containing the test strategy; Based on the test strategy, a target style template is determined from a pre-built style template library, and the target text content is rendered to generate a basic image according to the target style template. Based on the test strategy, at least one target perturbation model is determined from a pre-built perturbation model library, wherein the models in the perturbation model library are used to simulate the physical imaging defects of the slide label; The test strategy is analyzed to determine the stacking priority order of each target perturbation model. The stacking priority order is either a preset execution order based on the physical imaging evolution logic or a custom order set according to the test target. Based on the determined stacking priority order, the base image or the intermediate image after the previous perturbation is processed sequentially through matrix mapping transformation or pixel value modulation operation to generate an intermediate image sequence with progressive perturbation features. Obtain the effective region mask and fusion weight parameters corresponding to each intermediate image; Within the range defined by the effective region mask, the pixel matrix is ​​updated by performing a weighted numerical calculation on the pixel values ​​of the base layer image and the pixel values ​​of the intermediate image; The boundary regions of each perturbation feature in the fused image are smoothed to output the final fused virtual slide label test image. Output the test image of the virtual slide label and the corresponding ground truth information.

2. The test image synthesis method as described in claim 1, characterized in that, The perturbation model library includes models for simulating at least one of the following physical imaging defects: optical feature deviation, material contamination deformation, and mechanical operation displacement.

3. The test image synthesis method as described in claim 2, characterized in that, The optical characteristic deviations include defocusing blur, uneven illumination, and light transmission interference. The material contamination and deformation include paper surface wrinkles, liquid stains, fingerprints, and ink bleeding or fading; The mechanical displacements include perspective changes caused by the tilting of the slide space and slight motion blur caused by the movement of the stage.

4. The test image synthesis method as described in claim 1, characterized in that, The testing strategy is used to configure the key defect types to be evaluated, the target text content sequence, the target style filtering conditions, and the value range of the corresponding perturbation parameters.

5. The test image synthesis method as described in claim 1, characterized in that, The truth information includes a structured record file, which maps and stores the original text content corresponding to the virtual slide label test image, the selected style template parameters, the type and parameters of the applied perturbation model, and the annotation data used to locate the perturbation-affected area of ​​the target character.

6. A test image synthesis device for the OCR function of a slide scanner, characterized in that, include: Configure the interface module to receive synthesis requests containing test strategies; The strategy parsing module is used to parse the test strategy in the synthetic request to obtain the test intent and related parameter configuration; The style and content management module is used to retrieve the target style template based on the parsed test strategy and render the target text content to generate a basic image; The perturbation model execution engine is used to manage the perturbation model library and schedule target perturbation models that match the test intent according to the test strategy. The image synthesis module is used to parse the test strategy to determine the stacking priority order of each target perturbation model. The stacking priority order is either a preset execution order based on the physical imaging evolution logic or a custom order set according to the test target. Based on the determined stacking priority order, the base image or the intermediate image after the previous perturbation is processed sequentially through matrix mapping transformation or pixel value modulation operation to generate an intermediate image sequence with progressive perturbation features. Obtain the effective region mask and fusion weight parameters corresponding to each intermediate image; Within the range defined by the effective region mask, the pixel matrix is ​​updated by performing a weighted numerical calculation on the pixel values ​​of the base layer image and the pixel values ​​of the intermediate image; The boundary regions of each perturbation feature in the fused image are smoothed to output the final fused virtual slide label test image. The output module is used to output the generated virtual slide label test image and its corresponding mapping truth information file to the external system.

7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the test image synthesis method according to any one of claims 1 to 5.

8. A readable storage medium, characterized in that, The readable storage medium stores a computer program, the computer program including program code for controlling a process to execute the process, the process including the test image synthesis method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image processing method, related device and storage medium

    CN117975388A

  • Simulation image generation method for simulating scanning electron microscope and related equipment

    CN120747328A