Color calibration method, device, storage medium and program product for microscope-mounted camera
By using the color calibration method of the microscope's camera, white balance correction and parameter calculation are employed, and images of standard 24-color cards are individually photographed and stitched together to generate exclusive calibration parameters. This solves the problem of inconsistent color response characteristics at different magnifications of the microscope and achieves consistent color reproduction across the entire magnification range.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING MUMUSILI TECH CO LTD
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-31
AI Technical Summary
The existing color calibration technology for microscope cameras cannot adapt to the imaging differences at different magnifications, resulting in inconsistent color response characteristics and failing to meet color reproduction requirements across the full magnification range.
By selecting the target magnification, adjusting the microscope parameters for white balance correction, calculating the shooting parameters, individually shooting and stitching together color patch images of the standard 24-color chart, generating exclusive calibration parameters, and constructing a multi-magnification calibration parameter library.
It achieves uniformity in camera color calibration under different microscope magnifications, ensures consistent color reproduction across the entire magnification range, and solves the problem of narrow field of view at high magnifications making it impossible to capture a complete color chart in a single frame.
Smart Images

Figure CN122492837A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of microscopic imaging and image processing, and specifically relates to a color calibration technology for a microscope-compatible camera. Background Technology
[0002] In the field of microscopic imaging, the accuracy of color reproduction of the camera paired with the microscope directly determines the sample observation results, image acquisition quality, and the reliability of subsequent data analysis. Color calibration is a core preliminary step for the camera to accurately reproduce the true color of the sample.
[0003] Current conventional color calibration techniques generally employ the method of capturing a full frame of a standard 24-color chart. By acquiring a complete image of the color chart, the measured color data is compared with the standard color values to generate a color correction matrix for calibration. This approach cannot adapt to the special scenarios of microscope imaging: First, microscopes have a wide magnification range, with a relatively wide field of view at low magnification and an extremely narrow field of view at high magnification. Furthermore, the optical path conditions, illumination range, and imaging optical characteristics corresponding to different magnifications differ significantly, and the camera's color response characteristics change significantly with magnification. A single magnification calibration parameter cannot be adapted to use across all magnifications. Second, the overall size of the standard 24-color chart is fixed. The field of view of high-magnification microscopes is much smaller than the overall area of the color chart. A single frame image cannot cover all 24 color patches. Forcibly reducing the size of the color chart will result in insufficient color patch accuracy and excessive color value deviation, failing to meet the standard calibration requirements. Summary of the Invention
[0004] To address the technical problems mentioned in the background section, this invention proposes a color calibration method, device, storage medium, and program product for microscope-compatible cameras.
[0005] To achieve the above-mentioned technical objectives, the technical solution of the present invention is as follows: A method for color calibration of a microscope camera includes the following steps: (1) Select the magnification of the target to be calibrated on the microscope, place the standard gray card flat on the microscope stage, adjust the focus and illumination parameters of the microscope so that the standard gray card is clearly imaged in the camera screen and the brightness of the central area is uniform. At this time, use the standard gray card to perform a white balance correction to determine the basic values of the R / G / B three channels to correct the overall color tone. (2) Obtain the current target magnification of the microscope, combine the physical size of the image sensor of the camera, calculate the actual size of the effective imaging field of view of a single frame, and then determine the shooting point, shooting order and horizontal and vertical moving shooting step distance of each color block on the standard 24 color card according to the size and row and column layout of the standard 24 color card, and take individual shots of each color block on the 24 color card in sequence accordingly. (3) For each monochrome block image obtained in step (2), a small area at its center is cropped as the effective color image of the block; (4) Based on the row and column layout of the standard color card and the shooting points and shooting order in step (2), the effective color images of each color block obtained in step (3) are stitched together in an orderly manner to form a complete standard 24 color card image. (5) Match and compare the standard 24 color card image formed in step (4) with the standard color value data of the standard 24 color card used in step (2), calculate the deviation parameter between the measured color of each color block and the standard color value, and correct the camera color parameters based on the deviation parameter to generate the exclusive calibration parameter under the current target magnification.
[0006] Further, in step (2), the current target magnification of the microscope is defined. The actual length of the effective imaging field of view in a single frame. Actual width ,in w , h , p These are the number of pixels in the length, the number of pixels in the width, and the pixel size of the camera image sensor, respectively.
[0007] Further, in step (2), let the side length of a single color block on the standard 24-color chart be... l The spacing between adjacent color blocks is l 1. The horizontal and vertical movement shooting step distances are: l + l 1. Place the standard 24-color chart on the microscope stage, keeping the magnification, illumination, and camera parameters constant. Starting from the first color patch in the first row of the standard 24-color chart, take the upper left corner of the first color patch as the (0,0) coordinate of the standard 24-color chart. Position yourself at the top left corner of the camera, and after taking a picture of the first color block, move horizontally. l + l 1. Continue shooting the second color patch in the row, and so on, shooting all the color patches in the row. Then move to the standard 24-color chart. Continue photographing the first color block in the second row, and so on, until all 24 color blocks on the standard 24-color chart have been photographed.
[0008] Further, in step (3), a block is cut out at the center of the monochrome block image as the effective color image, with a side length of 0.6 times the short side length of the monochrome block image.
[0009] Furthermore, in step (5), the deviation parameters between the measured color and the standard color value of each color patch are calculated using the CIEDE2000 standard.
[0010] Furthermore, the specific calibration parameters for each target magnification are saved, and a multi-magnification calibration parameter library is constructed. Based on this multi-magnification calibration parameter library, the calibration parameters can be quickly called after the magnification is switched.
[0011] Secondly, the present invention also designs a computer device, which includes a processor and a memory, the memory storing a computer program, and the processor being used to execute the color calibration method of the microscope-compatible camera described above.
[0012] Furthermore, the present invention also provides a computer storage medium storing a computer program, which, when executed on a processor, implements the aforementioned color calibration method for a microscope-compatible camera.
[0013] Finally, the present invention also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the aforementioned color calibration method for a microscope-compatible camera.
[0014] The beneficial effects of adopting the above technical solution are as follows: This invention links the target magnification with the color calibration of the microscope's accompanying camera, using the magnification to determine the shooting parameters of the standard 24-color chart, ultimately generating exclusive calibration parameters for a specific magnification. Furthermore, a multi-magnification calibration parameter library can be built based on this, enabling rapid retrieval of calibration parameters when switching magnifications. This solves the problem of incompatible camera color calibration parameters across different microscope magnifications, ensuring consistent color reproduction across the entire magnification range. This invention determines the shooting parameters based on magnification and camera parameters, forming a complete and effective calibration reference standard through a method of first shooting single-color blocks and then stitching them together. This overcomes the limitation of narrow field of view in high-magnification microscopy, which makes it impossible to shoot the complete standard 24-color chart in a single frame, breaking the scene limitations of conventional full-frame color chart calibration. Attached Figure Description
[0015] Figure 1 This is a flowchart of the method in an embodiment; Figure 2 This is a comparative diagram of white balance calibration before and after the implementation example; Figure 3 This is a schematic diagram of the shooting sequence of the standard 24-color card in the embodiment; Figure 4 This is the stitched image of a standard 24-color card in the embodiment. Detailed Implementation
[0016] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
[0017] This embodiment proposes a color calibration method for a microscope-compatible camera, such as... Figure 1 As shown, the process of this embodiment is as follows.
[0018] S1. White Balance Calibration: Select the magnification of the target to be calibrated on the microscope. Place the standard gray card flat on the microscope stage and adjust the microscope's focus and illumination parameters to ensure the gray card appears clear and the central area is brightly uniform in the camera image. Since the camera's default colors may deviate under different light sources, a white balance correction is performed using the standard gray card to determine the basic values of the R / G / B channels to correct the overall color tone. This lays the foundation for subsequent color patch adjustments using a standard 24-color chart. Figure 2 This is a diagram showing the comparison before and after white balance calibration.
[0019] S2. Parameter Calculation and Imaging: Obtain the current target magnification of the microscope. Combined with the physical size of the camera's image sensor, calculate the actual size of the effective imaging field of view per frame. Then, based on the size and row / column layout (e.g., 4 rows and 6 columns) of the standard 24-color chart, determine the shooting points, shooting order, and horizontal and vertical movement steps corresponding to each color block on the standard 24-color chart. Based on this, each color block on the 24-color chart is photographed individually. Specifically, define the current target magnification of the microscope. The actual length of the effective imaging field of view in a single frame. Actual width ,in w , h , p These represent the number of pixels in length, the number of pixels in width, and the pixel size of the camera image sensor, respectively. Let the side length of a single color patch on the standard 24-color chart be... l (When selecting a standard 24-color chart, ensure that...) W , H < l The spacing between adjacent color blocks is l 1. The horizontal and vertical movement shooting step distances are: l + l 1. Place the standard 24-color chart on the microscope stage, keeping the magnification, illumination, and camera parameters constant. Starting from the first color patch in the first row of the standard 24-color chart, take the upper left corner of the first color patch as the (0,0) coordinate of the standard 24-color chart. Position yourself at the top left corner of the camera, and after taking a picture of the first color block, move horizontally. l + l 1. Continue shooting the second color patch in the row, and so on, shooting all the color patches in the row. Then move to the standard 24-color chart. Continue photographing the first color block in the second row, and so on, until all 24 color blocks on the standard 24-color chart have been photographed. Figure 3 This is a diagram illustrating the shooting sequence of the aforementioned standard 24-color chart.
[0020] S3. Effective Color Extraction: To avoid the effects of optical distortion at the edge of the field of view and uneven local illumination, a small central area is extracted from each monochrome block image as the effective color image. Preferably, the area is extracted by taking a square at the center of the image, which is 0.6 times the length of the shorter side of the image, to ensure that the sampling value of a single color block is without deviation, and the selected area will not exceed 36% of the full area.
[0021] S4. Image stitching: According to the original row and column layout of the standard 24 color chart, combined with the order and positional correspondence of the shooting points, the effective color images of all color blocks are stitched together in an orderly manner to form a complete standard 24 color chart image. This image is the reference benchmark for camera color calibration at the current magnification. Figure 4 This is the stitched image of a standard 24-color chart.
[0022] S5. Color Calibration: Since white balance correction was performed before image acquisition, the resulting color chart is close to the standard 24-color chart. However, some colors and hues still require color adjustment using a color mapping matrix. The stitched image is matched and compared with the standard color values of the standard 24-color chart. Color deviation is evaluated according to the CIEDE2000 standard. Theoretically, the smaller the deviation, the more accurate the color. If the average deviation of the actual calibrated 24 color patches is ≤10, the overall color performance is considered good. If the maximum deviation is ≤20, the worst color patch is considered not severely off-color. Meeting these standards meets the basic requirements for color calibration. Based on the deviation parameters, the camera color parameters are corrected, generating exclusive calibration parameters for the current magnification. To adapt to other magnifications, repeat all the above steps to establish a multi-magnification calibration parameter library, enabling quick calibration calls after magnification switching.
[0023] This embodiment also relates to a computer device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the computer program to implement the above-described contents. This embodiment also relates to a computer storage medium storing a computer program, which, when executed on a processor, implements the above-described contents. This embodiment also relates to a computer program product, including a computer program or instructions, which, when executed by a processor, implements the above-described contents.
[0024] The embodiments are merely illustrative of the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of this invention.
Claims
1. A color calibration method for a microscope-compatible camera, characterized in that, Includes the following steps: (1) Select the magnification of the target to be calibrated on the microscope, place the standard gray card flat on the microscope stage, adjust the focus and illumination parameters of the microscope so that the standard gray card is clearly imaged in the camera screen and the brightness of the central area is uniform. At this time, use the standard gray card to perform a white balance correction to determine the basic values of the R / G / B three channels to correct the overall color tone. (2) Obtain the current target magnification of the microscope, combine the physical size of the image sensor of the camera, calculate the actual size of the effective imaging field of view of a single frame, and then determine the shooting point, shooting order and horizontal and vertical moving shooting step distance of each color block on the standard 24 color card according to the size and row and column layout of the standard 24 color card, and take individual shots of each color block on the 24 color card in sequence accordingly. (3) For each monochrome block image obtained in step (2), a small area at its center is cropped as the effective color image of the block; (4) Based on the row and column layout of the standard color card and the shooting points and shooting order in step (2), the effective color images of each color block obtained in step (3) are stitched together in an orderly manner to form a complete standard 24 color card image. (5) Match and compare the standard 24 color card image formed in step (4) with the standard color value data of the standard 24 color card used in step (2), calculate the deviation parameter between the measured color of each color block and the standard color value, and correct the camera color parameters based on the deviation parameter to generate the exclusive calibration parameter under the current target magnification.
2. The color calibration method for a microscope-equipped camera according to claim 1, characterized in that, In step (2), the current target magnification of the microscope is defined. The actual length of the effective imaging field of view in a single frame. Actual width ,in w , h , p These are the number of pixels in the length, the number of pixels in the width, and the pixel size of the camera image sensor, respectively.
3. The color calibration method for a microscope-equipped camera according to claim 2, characterized in that, In step (2), let the side length of a single color block on the standard 24-color card be... l The spacing between adjacent color blocks is l 1. The horizontal and vertical movement shooting step distances are: l + l 1. Place the standard 24-color chart on the microscope stage, keeping the magnification, illumination, and camera parameters constant. Starting from the first color patch in the first row of the standard 24-color chart, take the upper left corner of the first color patch as the (0,0) coordinate of the standard 24-color chart. Position yourself at the top left corner of the camera, and after taking a picture of the first color block, move horizontally. l + l 1. Continue shooting the second color patch in the row, and so on, shooting all the color patches in the row. Then move to the standard 24-color chart. Continue photographing the first color block in the second row, and so on, until all 24 color blocks on the standard 24-color chart have been photographed.
4. The color calibration method for a microscope-equipped camera according to claim 1, characterized in that, In step (3), a block is cut out at the center of the monochrome block image as the effective color image, with a side length of 0.6 times the short side length of the monochrome block image.
5. The color calibration method for a microscope-equipped camera according to claim 1, characterized in that, In step (5), the deviation parameters between the measured color and the standard color value of each color patch are calculated using the CIEDE2000 standard.
6. The color calibration method for a microscope-equipped camera according to claim 1, characterized in that, Save the exclusive calibration parameters for each target magnification, build a multi-magnification calibration parameter library, and realize the quick call of calibration parameters after magnification switching based on this multi-magnification calibration parameter library.
7. A computer device comprising a processor and a memory, wherein the memory stores a computer program, characterized in that: The processor is used to execute the computer program to implement the color calibration method for the microscope-compatible camera as described in any one of claims 1-6.
8. A computer storage medium storing a computer program, characterized in that: When the computer program is executed on the processor, it implements the color calibration method for the microscope-compatible camera as described in any one of claims 1-6.
9. A computer program product, comprising a computer program or instructions, characterized in that: When the computer program or instructions are executed by the processor, they implement the color calibration method for the microscope-compatible camera as described in any one of claims 1-6.