Digital pathology scanner color correction method and device based on multi-dimensional lut, and medium

CN122820519APending Publication Date: 2026-09-25SHENZHEN SHENGQIANG TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611307830.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0004](2)缺乏标准化的色彩校准方法

Benefits of technology

1.单机校正精度大幅提升。采用多维CLUT加四面体插值替代传统3×3色彩校正矩阵(CCM)映射,通过包含交叉项与高阶项的三阶多项式回归模型精确补偿扫描仪透射成像的非线性色度畸变。经实验验证,在288个标准色块上,校正后的平均CIELAB色差小于3.0,最大色差小于5.0,95百分位色差小于3.5,显著优于传统3×3色彩校正矩阵法的校正水平。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122820519A_ABST
    Figure CN122820519A_ABST
Patent Text Reader

Abstract

The application discloses a kind of digital pathological scanner color correction method, device and medium based on multidimensional LUT, for solving the problem of low pathological scanning image color precision, cross-scanner color inconsistency.The method is made into calibration standard by refractive index matching optical packaging adhesive between the slide and cover glass with transmission standard color card film piece, calibration image is collected under the condition of camera linear response, white balance reserved highlight margin, median RGB value of each color block center area is extracted and matched with reference value, after color adaptation transformation, N×N×N multidimensional regular grid lookup table is constructed using third-order polynomial regression model, target pathological image is corrected pixel by pixel with tetrahedron interpolation, and device characteristic file is generated according to ICC standard, which significantly improves single machine correction accuracy and cross-device color consistency, and can be used for pathological section digitization, remote pathological diagnosis and artificial intelligence assisted diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital pathology and medical image processing technology, and in particular to a color correction method, device and medium for a digital pathology scanner based on a multidimensional LUT. Background Technology

[0002] Whole-slide imaging (WSI) is a technique that uses high-resolution digital scanning of traditional pathological glass slides to generate digital images of the entire tissue section. This technology has become a core foundation of modern digital pathology and is widely used in clinical pathology diagnosis, medical education, research, and telemedicine. WSI scanners typically employ linear or area array sensors, acquiring images across multiple focal planes and fields of view. These images are then stitched together using image stitching algorithms to generate complete digital pathological slide images. Scanning resolution typically reaches 0.23–0.25 micrometers per pixel, supporting 20x to 40x optical magnification. A single whole-slide image can reach sizes exceeding 100,000 × 100,000 pixels.

[0003] Despite significant advancements in WSI technology regarding resolution, scanning speed, and image storage, color accuracy and reproducibility remain key bottlenecks hindering its widespread clinical application. Specifically, existing technologies suffer from the following major problems: (1) Significant color differences exist between scanners. Different brands, models, and even different batches of the same model of WSI scanner produce significantly different colors when scanning the same pathological slide due to the use of different lighting sources (such as LED and halogen lamps), different filter configurations, different image sensors (such as CCD and CMOS), and different image processing algorithms. This color inconsistency directly affects the pathologist's diagnostic judgment, especially for pathological types that rely on color features for differential diagnosis (such as immunohistochemical staining and special staining).

[0004] (2) Lack of standardized color calibration methods. Currently, color calibration of WSI scanners mostly relies on the default settings at the factory, lacking a unified and traceable standardized color calibration process. Each manufacturer uses its own color correction algorithm, and there is no unified color reference standard among them, resulting in inconsistent color of pathological images across platforms and institutions. Existing color calibration methods are mainly designed for ordinary digital cameras or document scanners, and do not fully consider the unique optical characteristics of pathological sections (such as tissue transmission imaging, staining spectral characteristics, etc.).

[0005] (3) Color reproduction is difficult to guarantee. Even with the same scanner, color reproduction may change under different times and environmental conditions. Factors such as aging of the lighting source, drift of sensor sensitivity, and changes in ambient temperature can all affect the color stability of scanned images. In addition, existing technologies lack effective color quality monitoring and automatic correction mechanisms, and cannot detect and compensate for color drift in real time.

[0006] (4) Insufficient application of ICC color management in pathology. The International Color Consortium (ICC) color management framework has been widely used in photography, printing, and display, but its application in digital pathology is still in its infancy. Most existing WSI scanners do not support embedding ICC color profiles, or the generated ICC profiles are not accurate enough to achieve accurate color space conversion. In addition, pathological images are usually stored in RGB format, lacking accurate mapping relationships between device-independent color spaces (such as CIELAB). Traditional scanners mostly use a 3×3 color correction matrix (CCM) for linear mapping. Due to the highly nonlinear characteristics of pathological transmission imaging, the color difference after matrix correction is large, making it difficult to establish a high-precision mapping between the device's RGB and device-independent color spaces. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide a color correction method and system for digital pathology scanners based on multidimensional LUTs, aiming to solve the following technical problems: Establish a standardized color calibration process for WSI scanners to achieve precise characterization of scanner color output; A high-precision nonlinear multidimensional lookup table (CLUT) covering the full color gamut of the device is constructed from the limited sampling points of the standard color chart, which makes the correction accuracy better than the traditional 3×3 color correction matrix method. A device characteristic file conforming to the ICC standard is also constructed to achieve accurate mapping from the device-dependent RGB color space to the device-independent CIELAB color space. Provides color quality monitoring and drift compensation mechanisms to ensure color stability during long-term operation of the scanner; Provide a standardized color benchmark for unifying the color of pathological images across scanners, platforms, and institutions.

[0008] The first aspect of this invention provides a color correction method for a digital pathology scanner based on a multidimensional LUT, comprising the following steps: A scanned image of a transmissive standard color chart is acquired. The transmissive standard color chart contains multiple grayscale patches and multiple color patches. The reference value of each patch in the device-independent color space is known. The color chart film of the transmissive standard color chart is sealed between the standard pathology slide and the coverslip with an optical encapsulating adhesive whose refractive index matches that of the slide and coverslip. The scanned image is acquired under the condition that the camera of the digital pathology scanner is in linear response mode and the white balance target value is set to a preset value below full scale to reserve high-light dynamic margin. Locate each color block in the scanned image, extract the pixel value of the effective area in the center of each color block, and take the median of each color channel to obtain the device RGB value of each color block. Normalize the device RGB value to a preset value range with full scale as the denominator. The normalized RGB values ​​of the device are registered with the corresponding reference values ​​by color blocks, and the white point of the medium is determined by the reference values ​​of the grayscale color blocks; a color adaptation transformation is performed on the reference values ​​to convert the reference values ​​under the calibrated reference light source to the target white point, and then converted to CIELAB color space values. A multidimensional regular grid lookup table of N×N×N is constructed in the device's RGB space, where N is the preset grid density; a third-order polynomial regression model containing first-order terms, second-order terms, third-order terms, and inter-channel cross terms is used to establish the mapping relationship between the device's RGB values ​​and CIELAB color space values, and values ​​are assigned to each node of the multidimensional regular grid lookup table accordingly. Acquire the target pathological image, read and normalize the device RGB value of each pixel, and use tetrahedral interpolation to convert each pixel from the device RGB space to the device-independent color space based on the multidimensional regular grid lookup table. The device characteristic file is generated according to the ICC standard specification. The device characteristic file includes a device-to-PCS lookup table formed by the multidimensional regular grid lookup table. The CIELAB color space values ​​are connected to the PCS through the CIELAB to CIEXYZ standard conversion.

[0009] In one optional embodiment, the transmissive standard color chart uses the IT8.7 / 2 transmissive standard color chart, which includes 24 grayscale color blocks and 264 color color blocks, for a total of 288 color blocks; the optical encapsulating adhesive uses the same encapsulating adhesive as biological sample slides, with a refractive index of 1.52; the thickness of the standard pathological slide is 1 mm, the thickness of the coverslip is 0.17 mm, and the size of the pathological calibration standard formed after encapsulation is consistent with the size of the standard pathological slide, which is 75 mm × 25 mm.

[0010] In one optional implementation, the camera is in a linear response state when the gamma value is 1 and the gain value is 0; the white balance target value is 240, the full scale is 255, and a dynamic margin of about 15 gray levels is reserved; the normalization to the preset value range is normalization to the [0,1] range; the color block positioning adopts an algorithm based on edge detection and perspective transformation, and the effective central area is 60% to 80% of the pixel area of ​​the center of the color block.

[0011] In one optional implementation, the third-order polynomial regression model is a complete third-order polynomial expansion containing 20 regression terms, including the intercept term, the first-order terms of each channel, the square terms of each channel, the pairwise cross terms between channels, the cubic terms of each channel, and the mixed cross terms between channels. , , The three color components have the same expansion structure and their regression coefficients are solved independently. The regression coefficients are solved using the least squares method, the polynomial order is selected through cross-validation, and a regularization term is introduced. The preset grid density N is 33 and can be adjusted within the range of 16 to 65.

[0012] In one optional implementation, for the residuals of the third-order polynomial regression model that lack accuracy in the color gamut edge region, local weighted regression or support vector regression is used for nonlinear correction; when support vector regression is used, a radial basis function kernel is adopted, and the penalty coefficient C ranges from [0.1, 1000], with insensitive loss. The value range is [0.001, 0.1], and the kernel width is... The value range is [0.001, 1], and the parameters are determined by grid search combined with cross-validation, with the minimum average color difference of the validation set as the criterion; the support vector regression constructs a residual model using the prediction residuals of multinomial regression as training samples, and the corrected output is the sum of the prediction value of multinomial regression and the prediction value of support vector regression residuals.

[0013] In one optional implementation, the device characteristic file includes media white points, media black points, a device-to-PCS direction lookup table, a PCS-to-device direction lookup table, and tags describing the device, and is generated in lut16Type encoding format. The PCS-to-device direction lookup table is constructed as follows: uniform sampling is performed in CIEXYZ space, and the RGB value corresponding to the grid node closest to the target sampling point or the RGB value corresponding to the media white point is used as the initial value for iteration. The objective function is minimized using the steepest descent method based on forward mapping. Convergence occurs when the objective function value is less than the convergence threshold or the maximum number of iterations is reached. The convergence threshold is... The maximum number of iterations is 100. For target sampling points located outside the device's color gamut, a hue-preserving color gamut mapping strategy is adopted, which compresses the sample to the color gamut boundary along the constant hue direction before iteratively solving the problem.

[0014] In an optional implementation, the method further includes a color quality monitoring and drift compensation step: repeatedly scanning the transmissive standard color chart at a preset monitoring cycle, extracting the device RGB values ​​of grayscale color block areas, and comparing them with the reference correction value to calculate the average color difference; when the average color difference exceeds a preset drift threshold, color drift is determined to have occurred and a compensation process is automatically triggered. The compensation process includes: re-acquiring the color chart image and extracting the device RGB values ​​of each color block, incrementally updating the node values ​​of the third-order polynomial regression model and the multidimensional regular grid lookup table, regenerating the device characteristic file and overwriting the old file, and simultaneously recording the drift log and compensation parameters, forming a "monitoring-determination-compensation" closed loop. Preferably, the preset monitoring cycle is every three months, and the preset drift threshold is the average CIE value. The color difference is 2.0.

[0015] A second aspect of the present invention provides a color correction device for a digital pathology scanner based on a multidimensional LUT, comprising a calibration image acquisition module, a color characterization module, a color correction module, a feature file generation module, and a color quality evaluation module. The calibration image acquisition module uses a transmissive standard color chart, which can be a calibration standard fixture sealed between a standard pathology slide and a coverslip as described in the optional embodiments of the first aspect of the present invention.

[0016] A third aspect of the present invention 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 method described in any one of the first aspects above.

[0017] A fourth aspect of the present invention provides a readable storage medium storing a computer program that, when executed by a processor, implements the method described in any one of the first aspects above.

[0018] Compared with the prior art, the present invention has the following beneficial effects: 1. Significantly improved single-machine calibration accuracy. A multi-dimensional CLUT with tetrahedral interpolation replaces the traditional 3×3 color correction matrix (CCM) mapping. A third-order polynomial regression model, incorporating cross-terms and higher-order terms, accurately compensates for the nonlinear chromatic aberration of the scanner's transmission imaging. Experimental results show that, on 288 standard color patches, the corrected average CIELAB color difference... Less than 3.0, maximum color difference Less than 5.0, 95th percentile color difference Less than 3.5, significantly better than the correction level of the traditional 3×3 color correction matrix method.

[0019] 2. Standardized mapping of device-independent color spaces and strong cross-device color consistency. The generated device profile conforms to ICC standards and includes a lookup table from device to PCS, allowing direct recognition and use by mainstream image processing software and medical image viewers that support ICC color management, achieving unified color transfer of pathological images across different platforms. In a cross-scanner consistency experiment, three digital pathology scanners with different light source and sensor configurations (5500K LED light source, 5000K LED light source, and 3200K halogen lamp light source) scanned the same pathological slides. After being corrected and mapped to the same color space using this method, the average color of the entire image between each pair of scanners was significantly improved. The color difference decreased from 7.93 before correction (7.8, 10.6, and 5.4 in pairs) to 2.53 after correction (2.2, 2.6, and 2.8 in pairs). The color difference after correction is difficult for the human eye to distinguish.

[0020] 3. Optical Consistency in Pathological Calibration. By sealing the color card film between the standard slide and the coverslip with an optical adhesive matching the refractive index of the biological sample mounting, the calibration color card and the pathological sample have consistent optical path and focal plane imaging characteristics. This overcomes the shortcomings of existing reflective calibration methods that do not consider the transmission optical characteristics of pathological sections. At the same time, the white balance target value is set to a preset value lower than the full scale, reserving dynamic margin for highlight areas and preventing highlight overflow in bright areas or highlight patches of tissue during scanning, thus ensuring the integrity of the lookup table input range.

[0021] 4. Long-term color stability assurance. By periodically monitoring the color difference in the grayscale area of ​​the calibration standard and setting a drift judgment threshold, incremental recalibration is automatically triggered and the device characteristic file is updated when color drift occurs, forming a "monitoring-judgment-compensation" closed loop. This solves the problem of color stability degradation caused by factors such as light source aging and sensor sensitivity drift, ensuring the color output quality of the scanner under long-term operation, and retaining drift logs and compensation parameters for quality traceability.

[0022] Details of one or more embodiments of the present invention are set forth in the following drawings and description, so that other features, objects and advantages of the invention will be more readily understood. Attached Figure Description

[0023] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart illustrating the overall architecture of the color calibration system of the present invention; Figure 2 This is a schematic diagram of the color calibration color card slice preparation structure of the present invention; Figure 3 A schematic diagram of a color chart image taken by a digital pathology scanner; Figure 4 This is a flowchart of the color correction file generation process of the present invention; Figure 5 Comparison images of HE biological samples before and after correction; Figure 6 This is a comparison image of TCT biological samples before and after correction; Figure 7 This is a comparison image of immunohistochemical biological samples before and after correction; Figures 8 to 10 The images shown are comparisons of the original images and color-corrected images of samples 1 to 3 taken on three different scanners. Detailed Implementation

[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0025] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.

[0026] Implementation Method 1: Preparation of Transmission Calibration Etretina See Figure 2This embodiment provides a transmissive standard color chart specifically designed for digital pathology scanners. It employs a transmissive design to simulate the transmissive optical imaging characteristics of pathological tissue sections. In a preferred embodiment, the transmissive standard color chart uses the IT8.7 / 2 transmissive standard color chart, containing 24 grayscale color patches and 264 color patches, totaling 288 color patches. The reference value of each color patch in the device-independent color space is known. The 288 color patches of the IT8.7 / 2 color chart cover a wide color range in the CIELAB three-dimensional color space, from dark to light areas and from low to high saturation. Its three-dimensional color gamut volume covers common staining areas in pathological sections, such as HE staining (pink-purple-red series), immunohistochemical staining (brownish-yellow series), and special staining, directly meeting the coverage requirements of the pathological color gamut.

[0027] The color chart film of the IT8.7 / 2 transmissive standard color chart is sealed between the standard pathology slide and the coverslip using an optical encapsulating adhesive with a matching refractive index. The refractive index of the optical encapsulating adhesive is... The refractive index of the encapsulating adhesive is matched to that of the slide and coverslip; in one specific embodiment, the refractive index of the encapsulating adhesive is 1.52. The standard pathological slide is 1 mm thick, and the coverslip is 0.17 mm thick. The resulting pathological calibration standard has the same dimensions as the standard pathological slide, which is 75 mm. 25mm, it can be directly mounted onto the stage of a digital pathology scanner for scanning.

[0028] In a preferred embodiment, the optical encapsulating adhesive is the same as that used in the preparation of the biological sample, to ensure that the color card film and the biological sample have the same optical properties and are located on the same focal plane.

[0029] It should be noted that, see Figure 2 This illustrates the correspondence between the color card membrane and the biological sample using the same encapsulation method in a stacked structure. The pathological calibration standard in this invention is a separately manufactured dedicated calibration tool used to establish device characteristic files for the scanner. In daily applications, the generated device characteristic files are directly reused for color correction when scanning clinical slides of the pathology to be tested, eliminating the need to integrate color card membranes onto each clinical slide.

[0030] Implementation Method 2: Scanning Parameter Setting and Calibration Image Acquisition See Figure 1 Before acquiring the scanned image of the transmissive standard color chart, the digital pathology scanner should be configured with the following parameters: The digital pathology scanner camera is configured with a gamma value of 1 and a gain of 0, ensuring a linear response where the sensor output is linearly related to the incident light intensity. Exposure and light source intensity are set according to the standard for photographing blank slides. White balance is set so that the RGB value of the captured blank background is 240. Setting the target white balance value to 240 (instead of the full-scale 255) allows for a dynamic margin of approximately 15 gray levels in highlight areas, preventing highlight clipping in bright areas or patches of tissue during scanning.

[0031] After setting the parameters, the transmissive standard color chart is mounted on the stage of the digital pathology scanner for scanning, obtaining a calibration image containing 288 color patch regions. In subsequent steps, all device RGB values ​​are normalized to the [0,1] interval using a full-scale value of 255 as the denominator, i.e., the normalized value. ( This ensures that the input range of the multidimensional lookup table is fully covered. .

[0032] Implementation Method 3: Color Block Positioning and Device RGB Extraction See Figure 3 On the calibration image obtained in Implementation Method 2, the position of each color block is automatically located using a color block localization algorithm based on edge detection and perspective transformation. For each color block, the pixel value of its central effective region is extracted. This central effective region is 60% to 80% of the pixel area at the center of the color block to eliminate the optical aliasing effect at the edge of the color block. The median of each color channel (R, G, B) is taken to suppress dust and dead pixel noise. This yields 288 sets of device RGB values, denoted as the device RGB value of the k-th color block. , .

[0033] Implementation Method 4: Reference Data Registration and White Point Normalization Read the color chart reference data file, which contains the CIEXYZ and CIELAB values ​​of each color patch measured under D50 lighting conditions and a 2-degree standard observer. Register the 288 sets of device RGB values ​​obtained in Implementation Method 3 with the reference data one by one according to the color patch number to form a training dataset, which consists of 288 sets of triples (device RGB value, CIELAB reference value, CIEXYZ reference value).

[0034] The reference XYZ values ​​corresponding to the 24 grayscale color blocks at the bottom of the color chart are used as the medium white point. All device RGB values ​​are normalized to the [0,1] range. It should be noted that the white point of a single medium is determined by the reference XYZ values ​​corresponding to the 24 grayscale color blocks. In one specific implementation, the XYZ value corresponding to the grayscale with the highest brightness among the 24 grayscale color blocks is taken as the white point of the medium.

[0035] This section clearly distinguishes between two white spot concepts: dielectric white spot and dielectric white spot. The white point chromaticity value defined for the color chart reference data under D50 calibration conditions, characterizing the white point baseline of the calibration environment, is written into the wtpt tag of the subsequent ICC device characteristic file; target reference white point. The standard reference white point (such as the D65 standard illuminator white point) is used for color adaptation transformation in Implementation Method 5 under the target display environment. These two terms have different meanings and should not be confused.

[0036] Implementation Method 5: Color Adaptation Transformation To eliminate the color temperature deviation between the color chart calibration reference light source (D50) and the target display environment reference white point (e.g., D65), a color adaptation transformation is performed on the reference XYZ values ​​in Implementation Method 4 to convert the reference values ​​under the calibration reference light source to the target white point. In a preferred embodiment, the Bradford color adaptation transformation is used:

[0037] in, This is the Bradford color adaptation matrix; The diagonal matrix of the cone response gain:

[0038] in, For the source white spot (D50) The transformed cone response value, For the target white point (D65) via The transformed cone response value.

[0039] The XYZ values ​​after color adaptation transformation are then converted to CIELAB color space values ​​under the target white point:

[0040] Implementation Method Six: Construction of a Third-Order Polynomial Regression Model and a Multidimensional Regular Grid Lookup Table See Figure 4 In the device's linear RGB space Definition in Chinese A regular mesh, where N is a preset mesh density. In a preferred embodiment, N is 33, and the total number of nodes is... The value of N can be adjusted between 16 and 65 to adapt to different accuracy and performance requirements.

[0041] A third-order polynomial regression model was established to connect the device's RGB values ​​to the CIELAB color space values. This model includes first-order, second-order, and third-order terms for each channel, as well as inter-channel cross terms. For example, the complete third-order polynomial expansion has a total of 20 regression terms:

[0042] That is: the third-order part contains cubic terms. , , and mixed items , , , , , , There are 10 terms in total; the second-order part contains square terms. , , and cross terms , , There are 6 terms in total; together with the intercept and first-order terms, there are a total of 20 terms, along with the regression coefficients. One-to-one correspondence.

[0043] Color Components and The unfolded structure and They are completely identical, differing only in their regression coefficients, and are denoted as follows: and ;Right now , , The expansion structures of the three color components are the same, and the regression coefficients are solved independently.

[0044] The regression coefficients are solved using the least squares method, and the optimal polynomial order is selected through cross-validation to avoid overfitting. At the same time, a regularization term is introduced to improve the generalization ability of the model.

[0045] For residuals in the polynomial regression model that lack accuracy in the color gamut edge regions, local weighted regression or support vector regression (SVR) is used for nonlinear correction. When using SVR, a radial basis function (RBF) kernel is used, and the penalty coefficient C ranges from [0.1, 1000], with insensitive loss. The value range is [0.001, 0.1], and the kernel width is... The value range is [0.001, 1]. The parameters are determined by grid search combined with cross-validation, with the minimum average color difference of the validation set as the selection criterion. The correction method of SVR is as follows: first, use multinomial regression to predict training samples and calculate the prediction residuals; then, use (RGB input, residual) as samples to train the SVR residual model; the final output is the sum of the multinomial regression prediction value and the SVR residual prediction value.

[0046] The selection criteria for Locally Weighted Regression (SVR) and SVR are as follows: when the training sample size is small (e.g., less than 5000) or when online rapid calibration is required, Locally Weighted Regression is preferred; when the sample size is large, the nonlinearity is strong, or a stronger generalization ability is required, SVR is preferred.

[0047] It should be noted that the above support vector regression correction applies to all nodes of the N×N×N regular grid. That is, a polynomial regression prediction value is calculated for each node, and then a residual model is trained with RGB input and prediction residuals. Finally, the sum of the polynomial prediction value and the residual prediction value is used as the corrected value for that node.

[0048] Using the above mapping relationship as Each node in the regular grid calculates its corresponding CIELAB value, forming a multidimensional regular grid lookup table (A2BCLUT) in the A2B direction.

[0049] Implementation Method Seven: Pixel-by-Pixel Color Correction of Target Pathological Images For any target pathological whole-slice digital image acquired by this digital pathology scanner, perform the following pixel-by-pixel color correction steps: (1) Read the RGB values ​​of the pixel device Normalize to the interval [0,1] with full-scale value 255 as the denominator.

[0050] (2) Linearization is performed using the Tone Reproduction Curve (TRC) in the ICC file. It should be noted that the TRC linearization process and the rTRC / gTRC / bTRC tags in the ICC file retained in this step are designed for compatibility with other nonlinear scanners that do not guarantee a gamma value of 1. When the camera gamma value is 1 (the sensor output is already a linear response), the TRC linearization is equivalent to an identity transformation, which can be omitted in the actual process and does not affect the implementation of this invention.

[0051] (3) Perform tetrahedral interpolation lookup in A2BCLUT. Locate the enclosing cube cell containing the input value and calculate the relative coordinates within the cell along the R, G, and B channels. :

[0052] in, , , This is the grid start value along the corresponding channel for the cube element. , , This is the grid endpoint value, and the grid step size is... .

[0053] according to , , The size relationship determines the tetrahedron (6 cases in total, as shown in Table 1 below). The centroid coordinates of the four vertices of the tetrahedron are then taken according to the vertex path order. Perform weighted interpolation: Table 1

[0054] Interpolation output It is obtained by weighted summation of the CIELAB values ​​of the four vertices:

[0055] and .in The values ​​are the CIELAB values ​​of the four vertices in the vertex path order in the table. That is, the interpolation output is the device-independent color space (CIELAB) value, which is then cascaded to the PCS via a standard CIELAB to CIEXYZ conversion (see Implementation Method 8).

[0056] (4) If it is necessary to convert to RGB (such as sRGB) of the target display device, the B2A table of the target display device ICC file is embedded for secondary conversion.

[0057] Implementation Method 8: ICC Device Profile Generation See Figure 4 The device characteristic file is generated according to the ICC standard specifications. The device characteristic file includes the following tags: Medium White Point (wtpt), Medium Black Point (bkpt), Device to PCS Direction Lookup Table (A2B0), PCS to Device Direction Lookup Table (B2A0), and Device Description (desc), generated in LUT16Type encoding format. The Medium Black Point can be the XYZ value corresponding to the sensor's dark response value under no-light conditions, typically (0,0,0) or a minimum value. Construction of the A2B0 table (device-to-PCS lookup table): Uniform sampling is performed in the device's RGB space (e.g., The color feature model established in Implementation Method 6 is used to calculate the CIELAB value of each sampling point, and the PCS value of the sampling point is obtained through the standard conversion formula from CIELAB to CIEXYZ. A lookup table from device RGB to CIEXYZ is then constructed. This forms a consistent conversion link: device RGB → (third-order polynomial model) → CIELAB → (CIELAB to CIEXYZ standard conversion) → CIEXYZ (PCS).

[0058] Construction of the B2A0 table (PCS to device direction lookup table): Uniform sampling is performed in the CIEXYZ space (the sampling density can use the same grid density as the A2B table, as used in Example 1). For each sampling point, a numerical optimization iterative algorithm is used to invert the corresponding device RGB value: the RGB value corresponding to the grid node closest to the target point (or the RGB value corresponding to the white point of the medium) is used as the initial value for iteration, and a forward mapping is used. Based on this, the steepest descent method is used to minimize the objective function. When the objective function value is less than the convergence threshold The algorithm may converge after reaching a maximum of 100 iterations. For target sampling points located outside the device's color gamut, a hue-preserving color gamut mapping strategy is adopted, compressing the sample along a constant hue direction to the color gamut boundary before iteratively solving. The mapping intention employs a compromise strategy that prioritizes relative chromaticity while also considering perception. The color gamut boundary descriptor can use a convex hull algorithm to extract the coordinates of the device's RGB space boundary points in the CIEXYZ / CIELAB space.

[0059] The device profile also embeds device metadata, including information such as the scanner's light source color temperature, white point chromaticity coordinates, and gamut volume, generating a configuration file in standard ICC format that can be recognized and used by mainstream image processing software and medical image viewers.

[0060] Implementation Method Nine: Cross-Scanner Color Consistency Correction To achieve color consistency among different models of digital pathology scanners, the color spaces of each scanner are uniformly mapped to the CIEXYZ common color exchange space through their respective independent ICC device profiles. For any two scanners A and B, color consistency is achieved through the following color conversion chain: Scanner A's RGB → (A's ICC) → CIEXYZ standard space → Monitor's sRGB color space; Scanner B's RGB → (B's ICC) → CIEXYZ standard space → Monitor's sRGB color space.

[0061] The images scanned in A and B scans were converted to the CIEXYZ standard color space, and then mapped to the sRGB color space of the same monitor. This was done using CIE. The color difference formula calculates the color difference between the color reference image and the output images of each scanner, and quantitatively evaluates color consistency.

[0062] In a preferred embodiment, the selection criteria for the reference scanner are as follows: priority is given to selecting a light source with a color temperature closest to the standard illuminant D65, and with the highest color accuracy (average) after calibration using a color chart. The smallest scanner is used as the reference scanner. If the reference scanner itself has residual color deviation, each scanner is first calibrated to the same reference standard (media white point) using the standard color chart calibration process of this invention, ensuring that all scanners are calibrated to the same unbiased reference.

[0063] Implementation Method 10: Color Quality Monitoring and Drift Compensation To ensure color stability during long-term scanner operation, color quality monitoring and automatic drift compensation steps are provided. The transmissive standard color chart is repeatedly scanned at a preset monitoring cycle to extract the device's RGB values ​​for grayscale color patches. These values ​​are then compared with the reference calibration values ​​using CIE (Color, Color, and Equalization) standards. The color difference formula calculates the average color difference. In a preferred embodiment, the preset monitoring period is every three months, and the preset drift threshold is the average... The color difference is 2.0.

[0064] When the average color difference exceeds the preset drift threshold, the scanner is determined to have experienced color drift, and the system automatically triggers a compensation process, including: re-acquiring the color chart image and extracting the device RGB values ​​for each color block according to Implementation Method 3; incrementally updating the node values ​​of the third-order polynomial regression model and multidimensional regular grid lookup table established in Implementation Method 6 based on the latest sampled data; regenerating the device characteristic file and overwriting the old file, while recording the drift log and compensation parameters for quality traceability. Incremental updates involve adding new data to the training set, resolving the regression coefficients using the least squares method, and recalculating the node values.

[0065] Through the aforementioned "monitoring-judgment-compensation" closed-loop mechanism, the long-term stability of the scanner's color output is achieved.

[0066] Example 1: Color calibration of a single WSI scanner This embodiment uses a typical linear CCD WSI scanner as an example to illustrate the specific implementation of color calibration.

[0067] Experimental equipment and materials: The digital pathology scanner uses a CCD sensor and is equipped with an LED illumination source (color temperature of about 5000K), supporting 20x and 40x objectives; the transmissive color calibration chart contains 288 standard color patches, and standard slide samples are prepared using the mounting adhesive for pathological slides as described in Embodiment 1; the computing device is a workstation equipped with color management software for color correction and ICC profile generation.

[0068] Implementation steps: (1) Load the transmissive color chart onto the scanner stage and perform a fully automatic scan using a 20x objective lens. Scanning parameter settings: illumination intensity 70%, exposure time automatically optimized, gamma correction off, gain off. After scanning, a digital image containing 288 color patch areas is obtained.

[0069] (2) Perform dark field correction (subtract dark current noise), flat field correction (compensate for uneven illumination), and illumination uniformity correction on the scanned image. Convert the corrected image to the linear RGB color space (remove any built-in tone curves or gamma corrections). The above preprocessing is the image preprocessing method used in this embodiment.

[0070] (3) An automatic color block detection algorithm is adopted: First, the image is converted to grayscale and denoised by wavelet. Then, adaptive threshold segmentation and morphological operations are used to locate the boundary of each color block. For each color block, the central 70% region is extracted as an effective ROI (within the range of 60% to 80% in Implementation Method 3), and the median R, G, and B values ​​of all pixels in the region are calculated as the device response value of the color block.

[0071] (4) Color feature model is performed using a third-order polynomial regression model. The RGB values ​​of 288 color blocks are used as input, and the corresponding CIELAB reference values ​​(obtained from the reference XYZ values ​​through Bradford color adaptation and CIELAB conversion) are used as the target output. The regression coefficients are solved by the least squares method.

[0072] (5) Based on the color feature model obtained in step (4), generate a standard ICC configuration file. Specifically, this includes: performing color feature modeling in the RGB space. Uniform sampling is performed, and the CIELAB value of each sampling point is calculated using a color feature model. The PCS value of that sampling point is then obtained through a standard CIELAB-to-CIEXYZ conversion, and an A2B lookup table is constructed. The process is then performed in the CIEXYZ space. Uniform sampling is performed, and an iterative optimization algorithm is used to calculate the B2A lookup table; device metadata (white point, gamut descriptor, etc.) is embedded; and a configuration file in ICCv2 format is output.

[0073] (6) Evaluate the color calibration accuracy using an independent set of validation color patches (or using cross-validation). Calculate the CIELAB color difference for each color patch. The average color difference, maximum color difference, and 95th percentile color difference were obtained. Results: Average ,maximum 95th percentile .

[0074] (7) Perform color correction on images of different samples. Figure 5 For comparison of HE biological samples before correction (a) and after correction (b), Figure 6 Comparison of TCT biological samples before (a) and after (b) correction. Figure 7 Comparison of immunohistochemical biological samples before (a) and after (b) correction.

[0075] Example 2: Cross-scanner color consistency verification This embodiment uses three different models of digital pathology scanners to verify the effectiveness of the cross-scanner color reproduction assurance method.

[0076] Experimental design: Scanner A is a camera from brand A, with an LED light source and a color temperature of 5500K; Scanner B is a camera from brand B, with an LED light source and a color temperature of 5000K; Scanner C is a camera from brand C, with a halogen lamp light source and a color temperature of 3200K. The test samples were three pathological sections of different tissue types.

[0077] Implementation steps: (1) Following the method in Example 1, each scanner is color-calibrated to generate its own ICC profile.

[0078] (2) Scan all test samples using a reference scanner and convert the images to the standard sRGB color space using their ICC profiles as color reference images. The reference scanner is selected according to the rules of Implementation Method Nine; in this embodiment, scanner A with a color temperature of 5500K (closest to D65) and the smallest calibration error is selected as the reference scanner.

[0079] (3) Use three scanners to scan all test samples respectively, and convert the images to sRGB color space through their respective ICC profiles.

[0080] (4) Human visual judgment shows that there is a slight color difference in the scanned images of the same biological sample before color calibration by the three scanners, and the color difference after calibration is difficult for the human eye to distinguish. The output images of each scanner are compared pixel by pixel, and the CIE is calculated. Color difference and results before and after color calibration are shown in Tables 2 and 3: Table 2 Scanner before color calibration Average color difference

[0081] Table 3 Scanners after color calibration Average color difference

[0082] The average of each pair of the three scanners before color calibration The color difference was 7.93, which was reduced to 2.53 after color calibration. Figure 8 The images (a), (b), (c) and (d), (e), and (f) after color correction are the original images (a), (b), (c) and the images (d), (e), and (f) taken by three scanners for sample 1. Figure 9 For the corresponding comparison of sample 2; Figure 10 This is a comparison of the corresponding sample 3.

[0083] Implementation Method Eleven: Color Correction Device See Figure 1The present invention also provides a color correction device for a digital pathology scanner based on a multidimensional LUT, comprising: The calibration image acquisition module is used to acquire scanned images of a transmissive standard color chart under the conditions that the camera is in linear response mode and the white balance target value is set to a preset value lower than full scale to reserve dynamic margin for highlights. The transmissive standard color chart contains multiple grayscale color patches and multiple color color patches, and the reference value of each color patch in the device-independent color space is known. This module can adopt a calibration standard connected between a standard pathological slide and a coverslip as described in the embodiment.

[0084] The color characterization module is used to locate color patches in the scanned image, extract the pixel values ​​of the effective central area of ​​each color patch, and obtain the device RGB value by taking the median of each color channel; register the device RGB value with the corresponding reference value according to the color patch, and determine the medium white point using the reference value of the grayscale color patch; perform color adaptation transformation on the reference value and convert it to CIELAB color space values, then use a third-order polynomial regression model containing first-order, second-order, third-order, and third-order terms of each channel, as well as inter-channel cross terms, to construct the device RGB value in the device RGB space. A multidimensional regular grid lookup table is used, and values ​​are assigned to each node, where N is the preset grid density.

[0085] Color correction module: Used to read and normalize the device RGB values ​​of each pixel in the target pathological image. Based on a multidimensional regular grid lookup table, tetrahedral interpolation is used to convert each pixel from the device RGB space to the device-independent color space.

[0086] Feature file generation module: Used to generate device feature files according to ICC standard specifications. The device feature file contains a device-to-PCS lookup table formed by a multi-dimensional regular grid lookup table.

[0087] Color quality assessment module: Used to quantitatively assess the color accuracy of the corrected image based on the color difference evaluation formula.

[0088] In one embodiment, the device further includes a drift monitoring and automatic compensation module, which is used to repeatedly scan the grayscale color block area of ​​the calibration etalon at a preset monitoring cycle and calculate the average color difference with the reference correction value. When the average color difference exceeds a preset drift threshold, incremental recalibration is triggered, the node values ​​of the third-order polynomial regression model and the multidimensional regular grid lookup table are updated, and the device characteristic file is regenerated.

[0089] Implementation Method Twelve: Electronic Devices and Readable Storage Media The present invention also 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 color correction method for a digital pathology scanner based on a multidimensional LUT according to any of the above embodiments.

[0090] The present invention also provides a readable storage medium storing a computer program that, when executed by a processor, implements the color correction method for a digital pathology scanner based on a multidimensional LUT according to any of the above embodiments.

[0091] Table 4. Explanation of Symbols and Variables

[0092] 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.

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

Claims

1. A color correction method for a digital pathology scanner based on a multidimensional LUT, characterized in that, Includes the following steps: A scanned image of a transmissive standard color chart is acquired. The transmissive standard color chart contains multiple grayscale patches and multiple color patches. The reference value of each patch in the device-independent color space is known. The color chart film of the transmissive standard color chart is sealed between the standard pathology slide and the coverslip with an optical encapsulating adhesive whose refractive index matches that of the slide and coverslip. The scanned image is acquired under the condition that the camera of the digital pathology scanner is in linear response mode and the white balance target value is set to a preset value below full scale to reserve high-light dynamic margin. Locate each color block in the scanned image, extract the pixel value of the effective area in the center of each color block, and take the median of each color channel to obtain the device RGB value of each color block. Normalize the device RGB value to a preset value range with full scale as the denominator. The normalized RGB values ​​of the device are registered with the corresponding reference values ​​by color blocks, and the white point of the medium is determined by the reference values ​​of the grayscale color blocks; a color adaptation transformation is performed on the reference values ​​to convert the reference values ​​under the calibrated reference light source to the target white point, and then converted to CIELAB color space values. A multidimensional regular grid lookup table of N×N×N is constructed in the device's RGB space, where N is the preset grid density; a third-order polynomial regression model containing first-order terms, second-order terms, third-order terms, and inter-channel cross terms is used to establish the mapping relationship between the device's RGB values ​​and CIELAB color space values, and values ​​are assigned to each node of the multidimensional regular grid lookup table accordingly. Acquire the target pathological image, read and normalize the device RGB value of each pixel, and use tetrahedral interpolation to convert each pixel from the device RGB space to the device-independent color space based on the multidimensional regular grid lookup table. The device characteristic file is generated according to the ICC standard specification. The device characteristic file includes a device-to-PCS lookup table formed by the multidimensional regular grid lookup table. The CIELAB color space values ​​are connected to the PCS through the CIELAB to CIEXYZ standard conversion.

2. The color correction method for a digital pathology scanner based on a multidimensional LUT as described in claim 1, characterized in that, The transmissive standard color chart uses the IT8.7 / 2 transmissive standard color chart, which contains 24 grayscale color blocks and 264 color color blocks, for a total of 288 color blocks; The optical encapsulating adhesive used is the same as that used for biological sample encapsulation, with a refractive index of 1.52; The standard pathological slide has a thickness of 1 mm, the coverslip has a thickness of 0.17 mm, and the size of the pathological calibration standard formed after encapsulation is consistent with the 75 mm × 25 mm of the standard pathological slide.

3. The color correction method for a digital pathology scanner based on a multidimensional LUT as described in claim 1, characterized in that, The camera is in a linear response state when the gamma value is 1 and the gain value is 0. The white balance target value is 240, the full scale is 255, and a dynamic margin of about 15 gray levels is reserved; the normalization to the preset value range is normalization to the [0,1] range; The color block positioning uses an algorithm based on edge detection and perspective transformation, and the effective central area is 60% to 80% of the pixel area of ​​the color block center.

4. The color correction method for a digital pathology scanner based on a multidimensional LUT as described in claim 1, characterized in that, The third-order polynomial regression model is a complete third-order polynomial expansion containing 20 regression terms, including the intercept term, the first-order terms of each channel, the square terms of each channel, the pairwise cross terms between channels, the cube terms of each channel, and the mixed cross terms between channels. , , The expansion structures of the three color components are the same, and the regression coefficients are solved independently. The regression coefficients are solved using the least squares method, the order of the polynomial is selected through cross-validation, and a regularization term is introduced. The preset grid density N is 33 and can be adjusted within the range of 16 to 65.

5. The color correction method for a digital pathology scanner based on a multidimensional LUT as described in claim 1, characterized in that, For the residuals of the third-order polynomial regression model that are not accurate enough in the color gamut edge region, local weighted regression or support vector regression is used for nonlinear correction. When using support vector regression, the kernel function is a radial basis function kernel, and the penalty coefficient C ranges from [0.1, 1000], with insensitive loss. The value range is [0.001, 0.1], and the kernel width is... The value range is [0.001, 1], and the parameter is determined by combining grid search with cross-validation, with the minimum average color difference of the validation set as the criterion. The support vector regression constructs a residual model using the prediction residuals of multinomial regression as training samples, and the corrected output is the sum of the multinomial regression prediction value and the support vector regression residual prediction value.

6. The color correction method for a digital pathology scanner based on a multidimensional LUT as described in claim 1, characterized in that, The device characteristic file includes media white dots, media black dots, device-to-PCS lookup table, PCS-to-device lookup table, and device description tags, and is generated in lut16Type encoding format; The PCS-to-device lookup table is constructed as follows: Uniform sampling is performed in the CIEXYZ space. The initial iteration value is the RGB value corresponding to the grid node closest to the target sampling point or the RGB value corresponding to the medium white point. Based on forward mapping, the steepest descent method is used to minimize the objective function. Convergence occurs when the objective function value is less than a convergence threshold or when the maximum number of iterations is reached. The convergence threshold is... The maximum number of iterations is 100. For target sampling points located outside the device's color gamut, a hue-preserving color gamut mapping strategy is adopted, which compresses the sample points along the constant hue direction to the color gamut boundary before iteratively solving the problem.

7. The color correction method for a digital pathology scanner based on a multidimensional LUT as described in claim 1, characterized in that, It also includes color quality monitoring and drift compensation steps: The transmissive standard color chart is repeatedly scanned at a preset monitoring cycle to extract the device RGB values ​​of the grayscale color block area and compare them with the reference correction value to calculate the average color difference. When the average color difference exceeds a preset drift threshold, color drift is determined to have occurred and a compensation process is automatically triggered. The compensation process includes: The color chart image is re-acquired and the device RGB values ​​of each color block are extracted. The node values ​​of the third-order polynomial regression model and the multidimensional regular grid lookup table are incrementally updated. The device characteristic file is regenerated and the old file is overwritten. At the same time, the drift log and compensation parameters are recorded.

8. A color correction device for a digital pathology scanner based on a multidimensional LUT, characterized in that, include: The calibration image acquisition module is used to acquire a scanned image of a transmissive standard color chart under the conditions that the camera is in a linear response state and the white balance target value is set to a preset value lower than the full scale to reserve dynamic margin for highlights. The transmissive standard color chart includes multiple grayscale color blocks and multiple color color blocks, and the reference value of each color block in the device-independent color space is a known value. The color feature module is used to locate each color block in the scanned image, extract the pixel value of the effective area in the center of each color block, and take the median of each color channel to obtain the device RGB value. The device RGB value and the corresponding reference value are registered according to the color block, and the reference value of the grayscale color block is used to determine the medium white point. After performing color adaptation transformation on the reference value and converting it into CIELAB color space value, a third-order polynomial regression model containing first-order, second-order, third-order, and third-order terms of each channel and inter-channel cross terms is used to construct an N×N×N multidimensional regular grid lookup table in the device RGB space and assign values ​​to each node, where N is the preset grid density. The color correction module is used to read and normalize the device RGB values ​​of each pixel in the target pathological image. Based on the multidimensional regular grid lookup table, tetrahedral interpolation is used to convert each pixel from the device RGB space to the device-independent color space. The feature file generation module is used to generate a device feature file according to the ICC standard specification. The device feature file includes a device-to-PCS direction lookup table formed by the multi-dimensional regular grid lookup table. The color quality assessment module is used to quantitatively assess the color accuracy of the corrected image based on the color difference evaluation formula.

9. 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 color correction method for a digital pathology scanner based on a multidimensional LUT as described in any one of claims 1 to 7.

10. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the color correction method for a digital pathology scanner based on a multidimensional LUT as described in any one of claims 1 to 7.