Image brightness adjusting method and device and storage medium

Through the image analysis of the brightness channel of the microscopic image and the calculation of the brightness adjustment coefficient, the problem of poor brightness uniformity of the microscopic image is solved, and the brightness uniformity and splicing quality of the microscopic image are improved.

CN118691689APending Publication Date: 2024-09-24SHENZHEN REETOO BIOTECHNOLOGY CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202310304141.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

In the existing technology, the brightness uniformity of microscopic images is poor, resulting in uneven brightness of the spliced ​​microscopic images and the existence of splicing traces.

Method used

Through the brightness channel image analysis of the microscopic image, the brightness distribution feature vector of each pixel is determined, and the reference feature vector is determined from multiple brightness distribution feature vectors, and calculated based on the reference feature vector and the brightness distribution feature vector of each pixel. The brightness adjustment coefficient adjusts the brightness of the microscopic image to ensure the brightness uniformity of the target microscopic image.

Benefits of technology

It significantly improves the brightness uniformity of microscopic images, reduces the problem of uneven brightness of microscopic images after stitching, and ensures the image quality after stitching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The embodiment of the invention provides an image brightness adjusting method and device and a storage medium, and belongs to the field of image processing. The method comprises the following steps: acquiring a plurality of microscopic images to be spliced; performing brightness segmentation on the microscopic image to obtain a brightness channel image corresponding to the microscopic image; determining a brightness distribution feature vector of each pixel point in the brightness channel image according to the brightness channel image, and determining a reference feature vector from the plurality of brightness distribution feature vectors; determining a brightness adjustment coefficient of each pixel point according to the reference feature vector and the brightness distribution feature vector of each pixel point; and adjusting the brightness of the microscopic image according to the brightness adjustment coefficient of each pixel point to obtain a target microscopic image, and splicing a plurality of target microscopic images. According to the method, the brightness uniformity of the spliced microscopic image is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to an image brightness adjustment method, device and storage medium. Background Art

[0002] At present, in order to assist doctors in diagnosing patients, testers are required to prepare in vitro biological samples such as body fluids, semen, blood, secretions, excretions, organ tissues, etc. of patients into glass slide samples, and the slide reader takes multiple photos of the slide samples to obtain multiple microscopic images, and then splices the multiple microscopic images. However, when the slide reader takes photos of the slide samples, due to the influence of factors such as light source, glass slide, and immersion oil, the brightness uniformity of the microscopic images taken is poor. Therefore, when splicing multiple microscopic images, the brightness of the spliced ​​microscopic images is uneven, and there are splicing marks. Therefore, how to improve the brightness uniformity of microscopic images is a problem that needs to be solved urgently. Summary of the invention

[0003] The embodiments of the present invention provide an image brightness adjustment method, a film reader and a storage medium, aiming to improve the brightness uniformity of a microscopic image.

[0004] In a first aspect, an embodiment of the present invention provides an image brightness adjustment method, comprising:

[0005] Acquire multiple microscopic images to be stitched;

[0006] For each of the microscopic images, performing brightness segmentation on the microscopic image to obtain a brightness channel image corresponding to the microscopic image;

[0007] Determine, according to the brightness channel image, a brightness distribution feature vector of each pixel in the brightness channel image, and determine a reference feature vector from a plurality of the brightness distribution feature vectors;

[0008] Determining a brightness adjustment coefficient of each pixel point according to the reference feature vector and the brightness distribution feature vector of each pixel point;

[0009] According to the brightness adjustment coefficient of each pixel point, the brightness of the microscopic image is adjusted to obtain a target microscopic image, and a plurality of the target microscopic images are spliced.

[0010] In a second aspect, an embodiment of the present invention further provides an image brightness adjustment device, which includes a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the image brightness adjustment method described in the first aspect is realized.

[0011] In a third aspect, an embodiment of the present invention further provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the image brightness adjustment method as described in the first aspect.

[0012] The embodiment of the present invention provides an image brightness adjustment method, a film reader and a storage medium. The embodiment of the present invention analyzes and determines the brightness distribution feature vector of each pixel through a brightness channel image corresponding to a microscopic image, and determines a reference feature vector from multiple brightness distribution feature vectors, and then determines the brightness adjustment coefficient of each pixel according to the reference feature vector and the brightness distribution feature vector of each pixel. Finally, according to the brightness adjustment coefficient of each pixel, the brightness of the microscopic image is adjusted to obtain a target microscopic image, so that the brightness uniformity of the target microscopic image can be guaranteed, so that after splicing multiple target microscopic images with uniform brightness, the brightness of the spliced ​​microscopic image can be made uniform, which greatly improves the brightness uniformity of the microscopic image. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0014] Figure 1 is a flow chart of an image brightness adjustment method provided by an embodiment of the present invention;

[0015] Figure 2 is a schematic diagram of a microscopic image and a brightness channel image in an embodiment of the present invention;

[0016] Figure 3 is a schematic diagram of a local image region including pixels of a brightness channel image in an embodiment of the present invention;

[0017] Figure 4 is a schematic diagram of a first brightness histogram of a local image area in an embodiment of the present invention;

[0018] Figure 5 is a schematic diagram of a first cumulative histogram of a first brightness histogram in an embodiment of the present invention;

[0019] Figure 6 is a comparative schematic diagram of brightness adjustment of a microscopic image in an embodiment of the present invention;

[0020] Figure 7is a comparative schematic diagram of the spliced ​​microscopic images in an embodiment of the present invention;

[0021] Figure 8 The present invention is a block diagram showing the structure of an image brightness adjustment device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0024] It should be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0025] At present, in order to assist doctors in diagnosing patients, testers need to prepare in vitro biological samples such as body fluids, semen, blood, secretions, excretions, organ tissues, etc. of patients into glass slide samples, and the slide reader takes multiple photos of the slide samples to obtain multiple microscopic images, and then splices the multiple microscopic images. However, when the slide reader takes photos of the slide samples, due to the influence of factors such as light source, glass slide, and immersion oil, the brightness uniformity of the microscopic images taken is poor. Therefore, when splicing multiple microscopic images, the brightness of the spliced ​​microscopic images is uneven, and there are splicing marks.

[0026] To solve the above problems, the embodiments of the present invention provide an image brightness adjustment method, device and storage medium. Through the brightness channel image corresponding to the microscopic image, the brightness distribution feature vector of each pixel is analyzed and determined, and a reference feature vector is determined from multiple brightness distribution feature vectors, and then the brightness adjustment coefficient of each pixel is determined according to the reference feature vector and the brightness distribution feature vector of each pixel, and finally the brightness of the microscopic image is adjusted according to the brightness adjustment coefficient of each pixel to obtain a target microscopic image, so that the brightness uniformity of the target microscopic image can be guaranteed, so that after splicing multiple target microscopic images with uniform brightness, the brightness of the spliced ​​microscopic image can be made uniform, which greatly improves the brightness uniformity of the microscopic image.

[0027] Among them, the image brightness adjustment method provided by the embodiment of the present invention can be applied to a film reader, a terminal device or a server. The film reader includes a microscope device, a loading platform and a motion mechanism, the loading platform is used to carry a glass slide, and the motion mechanism is used to drive the loading platform or the microscope device to move, so that the microscope device and the glass slide can move relative to each other, so that the microscope device can scan the sample area on the glass slide, thereby obtaining multiple microscopic images. Among them, the terminal device may include a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0028] In one embodiment, a film reader controls a microscope device to scan a sample area on a glass slide to obtain multiple microscopic images; for each microscopic image, the microscopic image is brightness segmented to obtain a brightness channel image corresponding to the microscopic image; based on the brightness channel image, a brightness distribution feature vector of each pixel in the brightness channel image is determined, and a reference feature vector is determined from multiple brightness distribution feature vectors; based on the reference feature vector and the brightness distribution feature vector of each pixel, a brightness adjustment coefficient of each pixel is determined; based on the brightness adjustment coefficient of each pixel, the brightness of the microscopic image is adjusted to obtain a target microscopic image, and the multiple target microscopic images are spliced.

[0029] In one embodiment, a film reader or a microscope device establishes a communication connection with a terminal device via a wired or wireless method. After the microscope device collects multiple microscopic images, the film reader or the microscope device sends the multiple microscopic images to the terminal device. The terminal device performs brightness segmentation on each microscopic image to obtain a brightness channel image corresponding to the microscopic image; determines a brightness distribution feature vector of each pixel in the brightness channel image based on the brightness channel image, and determines a reference feature vector from multiple brightness distribution feature vectors; determines a brightness adjustment coefficient of each pixel based on the reference feature vector and the brightness distribution feature vector of each pixel; adjusts the brightness of the microscopic image based on the brightness adjustment coefficient of each pixel to obtain a target microscopic image, and splices multiple target microscopic images.

[0030] In one embodiment, a film reader or a microscope device is connected to a server in a wired or wireless manner. After the microscope device collects multiple microscopic images, the film reader or the microscope device sends the multiple microscopic images to the server. The server performs brightness segmentation on each microscopic image to obtain a brightness channel image corresponding to the microscopic image; determines a brightness distribution feature vector of each pixel in the brightness channel image based on the brightness channel image, and determines a reference feature vector from multiple brightness distribution feature vectors; determines a brightness adjustment coefficient of each pixel based on the reference feature vector and the brightness distribution feature vector of each pixel; adjusts the brightness of the microscopic image based on the brightness adjustment coefficient of each pixel to obtain a target microscopic image, and splices multiple target microscopic images.

[0031] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0032] See also Figure 1 , Figure 1 The present invention provides a flow chart of an image brightness adjustment method provided in an embodiment of the present invention. The image brightness adjustment method can be applied to a film reader, a terminal device or a server to improve the brightness uniformity of a microscopic image.

[0033] like Figure 1 As shown, the image brightness adjustment method includes steps S101 to S105.

[0034] Step S101, obtaining a plurality of microscopic images to be stitched.

[0035] In the embodiment of the present invention, the multiple microscopic images to be stitched are obtained by scanning the region where the in vitro biological sample is located on the glass slide by a microscope device. The in vitro biological sample may be body fluid, semen, blood, secretions, excretions or organ tissue of a human or animal, or may be plant tissue, which is not specifically limited in the embodiment of the present invention.

[0036] In one embodiment, the method for obtaining the multiple microscopic images to be stitched may be: controlling the microscope device to scan the region where the in vitro biological sample is located on the glass slide based on a preset magnification to obtain the multiple microscopic images to be stitched. The glass slide is placed on a loading platform, and the loading platform or the microscope device is connected to a motion mechanism, and the motion mechanism is used to drive the microscope device or the loading platform to move so that the microscope device and the glass slide move relative to each other, so that the microscope device can scan the region where the in vitro biological sample is located on the glass slide, thereby obtaining multiple microscopic images of the region where the in vitro biological sample is located.

[0037] Step S102: perform brightness segmentation on the microscopic image to obtain a brightness channel image corresponding to the microscopic image.

[0038] In the embodiment of the present invention, the color space of the microscopic image can be converted from the RGB color space to the HSV color space, and the V channel image is used as the brightness channel image corresponding to the microscopic image. Figure 2 As shown, the microscopic image in the RGB color space is Figure 2 By converting the color space of the microscopic image 11 from the RGB color space to the HSV color space, the brightness channel image corresponding to the microscopic image 11 is Figure 2 V channel image 12 in.

[0039] Step S103: determining a brightness distribution feature vector of each pixel in the brightness channel image according to the brightness channel image, and determining a reference feature vector from the plurality of brightness distribution feature vectors.

[0040] In an embodiment of the present invention, the brightness distribution feature vector of a pixel point is used to describe the brightness distribution characteristics of the local image area where the pixel point is located. The brightness distribution feature vector of the pixel point is determined based on the brightness histogram of the local image area containing the pixel point. The brightness distribution feature vector of the pixel point includes multiple brightness values.

[0041] In one embodiment, according to the brightness channel image, the brightness distribution feature vector of each pixel in the brightness channel image can be determined by: for each pixel in the brightness channel image, determining a local image area containing the pixel in the brightness channel image; generating a first brightness histogram corresponding to the local image area, and calculating a cumulative histogram of the first brightness histogram; determining the brightness values ​​of multiple preset quantiles in the cumulative histogram, and using the determined multiple brightness values ​​as the brightness distribution feature vector of the pixel, one preset quantile corresponding to one brightness value.

[0042] In one embodiment, the method of determining the local image area containing the pixel point in the brightness channel image can be: taking the pixel point as the center and the preset distance as the radius to determine the local image area containing the pixel point in the brightness channel image. The local image area can be a circular area or a rectangular area, and the preset distance can be set based on actual conditions, which is not specifically limited in the embodiment of the present invention. For example, the preset distance is 10 pixels, 20 pixels, or 30 pixels.

[0043] For example, Figure 3 As shown, the local image region containing pixel A in the brightness channel image 13 is the local image region 14. By counting the brightness value of each pixel in the local image region 14, the following can be generated: Figure 4 The first brightness histogram shown in FIG. 1 can be obtained by calculation as follows: Figure 5 Assume that multiple preset quantiles include 0.2, 0.4, 0.5, 0.6 and 0.8. Figure 5 The brightness value of the quantile 0.2, the brightness value of the quantile 0.4, the brightness value of the quantile 0.5, the brightness value of the quantile 0.6 and the brightness value of the quantile 0.8 are obtained in the cumulative histogram shown, and the five brightness values ​​obtained are determined as the brightness distribution feature vector of the pixel A. In the same way, the brightness distribution feature vector of each pixel in the brightness channel image 13 can be determined.

[0044] In one embodiment, the method of determining the reference feature vector from multiple brightness distribution feature vectors can be: determining the first brightness evaluation score of each brightness distribution feature vector; determining the brightness distribution feature vector corresponding to the highest first brightness evaluation score as the reference feature vector. The first brightness evaluation score is used to describe the brightness uniformity of the brightness distribution feature vector. The higher the first brightness evaluation score, the better the brightness uniformity of the brightness distribution feature vector, and the lower the first brightness evaluation score, the worse the brightness uniformity of the brightness distribution feature vector. By selecting the brightness distribution feature vector with the highest first brightness evaluation score, that is, the brightness uniformity is the best, as the reference feature vector, the brightness adjustment coefficient of the pixel point can be accurately determined based on the reference feature vector with the best brightness uniformity.

[0045] In one embodiment, the first brightness evaluation score of the brightness distribution feature vector may be determined by: calculating the mean and standard deviation of multiple brightness values ​​in the brightness distribution feature vector; calculating the difference between the mean and the standard deviation, and determining the difference as the first brightness evaluation score of the brightness distribution feature vector, or querying the mapping relationship between the pre-stored difference and the brightness evaluation score to obtain the brightness evaluation score corresponding to the difference between the mean and the standard deviation, and determining the queried brightness evaluation score as the first brightness evaluation score of the brightness distribution feature vector. The mapping relationship between the pre-stored difference and the brightness evaluation score may be set based on actual conditions, and the embodiment of the present invention does not specifically limit this.

[0046] Step S104: Determine a brightness adjustment coefficient for each pixel according to the reference feature vector and the brightness distribution feature vector of each pixel.

[0047] In an embodiment of the present invention, the brightness adjustment coefficient of the pixel point is the adjustment coefficient of mapping the brightness distribution feature vector of the pixel point to the reference feature vector, that is, after the brightness value of the pixel point is adjusted by the brightness adjustment coefficient of the pixel point, the adjusted brightness distribution feature vector of the pixel point is roughly the same as the reference feature vector, so that it can be ensured that the brightness values ​​of each pixel point after the brightness value is adjusted tend to be consistent.

[0048] In one embodiment, the brightness adjustment coefficient of the pixel point can be determined according to the reference feature vector and the brightness distribution feature vector of the pixel point by: performing a multiplication operation on the reference feature vector and the brightness distribution feature vector of the pixel point to obtain a first brightness feature vector; and determining the brightness adjustment coefficient of the pixel point according to the first brightness feature vector, the reference feature vector and the brightness distribution feature vector of the pixel point. The adjustment coefficient of the brightness distribution feature vector of the pixel point mapped to the reference feature vector can be accurately determined by merging the first brightness feature vector, the reference feature vector and the brightness distribution feature vector of the pixel point.

[0049] In one embodiment, the brightness adjustment coefficient of the pixel point can be determined according to the first brightness feature vector, the reference feature vector and the brightness distribution feature vector of the pixel point by: summing all the brightness values ​​in the first brightness feature vector to obtain a first brightness value; squaring the brightness distribution feature vector of the pixel point to obtain a second brightness feature vector, and summing all the brightness values ​​in the second brightness feature vector to obtain a second brightness value; calculating the mean of all the brightness values ​​in the reference feature vector to obtain a first brightness mean, and calculating the mean of all the brightness values ​​in the brightness distribution feature vector to obtain a second brightness mean; summing all the brightness values ​​in the brightness distribution feature vector of the pixel point to obtain a third brightness value; and calculating the brightness adjustment coefficient of the pixel point according to the first brightness value, the second brightness value, the third brightness value, the first brightness mean and the second brightness mean.

[0050] In one embodiment, according to the first brightness value, the second brightness value, the third brightness value, the first brightness average and the second brightness average, the brightness adjustment coefficient of the pixel point can be calculated by: multiplying the first brightness average and the third brightness value to obtain a first multiplication result; subtracting the first operation result from the first brightness value to obtain a first subtraction result; multiplying the second brightness average and the third brightness value to obtain a second multiplication result; subtracting the second operation result from the second brightness value to obtain a second subtraction result; dividing the first subtraction result by the second subtraction result to obtain the brightness adjustment coefficient of the pixel point.

[0051] For example, assuming that the brightness distribution feature vector of the pixel point (i, j) is X(i, j), and the reference feature vector is Y, the brightness adjustment coefficient a(i, j) of the pixel point can be calculated according to the following brightness adjustment coefficient calculation formula:

[0052]

[0053] , where sum{} represents summation, and mean{} represents mean. It can be understood that the above formula is only an exemplary description of calculating the brightness adjustment coefficient a(i, j), and other brightness adjustment coefficient calculation formulas can also be used to calculate the brightness adjustment coefficient a(i, j) of the pixel point, and the embodiment of the present invention does not make specific limitations on this. For example, the other brightness adjustment coefficient calculation formulas are:

[0054]

[0055] In one embodiment, the brightness adjustment coefficient of the pixel point includes a first brightness adjustment coefficient and a second brightness adjustment coefficient. According to the first brightness feature vector, the reference feature vector and the brightness distribution feature vector of the pixel point, the brightness adjustment coefficient of the pixel point can be determined by: performing a square operation on the brightness distribution feature vector of the pixel point to obtain the second brightness feature vector; determining the first brightness adjustment coefficient of the pixel point according to the first brightness feature vector, the second brightness feature vector, the reference feature vector and the brightness distribution feature vector of the pixel point; determining the second brightness adjustment coefficient of the pixel point according to the first brightness adjustment coefficient, the reference feature vector and the brightness distribution feature vector of the pixel point.

[0056] For example, assuming that the brightness distribution feature vector of the pixel point (i, j) is X(i, j), and the reference feature vector is Y, the first brightness adjustment coefficient a1(i, j) of the pixel point can be calculated according to the following brightness adjustment coefficient calculation formula:

[0057]

[0058] , and the second brightness adjustment coefficient a2(i,j) of the pixel point can be calculated according to the following brightness adjustment coefficient calculation formula:

[0059] a2(i,j)=mean{Y}-a0(i,j)*mean{X(i,j)}.

[0060] It is understandable that the above formula is only an exemplary description of calculating the first brightness adjustment coefficient a1(i, j) and the second brightness adjustment coefficient a2(i, j), and other brightness adjustment coefficient calculation formulas can also be used to calculate the first brightness adjustment coefficient a1(i, j) and the second brightness adjustment coefficient a2(i, j) of the pixel point, and the embodiment of the present invention does not specifically limit this. For example, the other brightness adjustment coefficient calculation formula for calculating the second brightness adjustment coefficient a2(i, j) can be:

[0061] a2(i,j)=mean{X(i,j)}-a0(i,j)*mean{Y}.

[0062] Step S105 , adjusting the brightness of the microscopic image according to the brightness adjustment coefficient of each pixel point to obtain a target microscopic image, and splicing multiple target microscopic images.

[0063] In the embodiment of the present invention, after the brightness value of the pixel point is adjusted by the brightness adjustment coefficient of the pixel point, the brightness distribution feature vector of the adjusted pixel point is substantially the same as the reference feature vector, so that the brightness values ​​of each pixel point in the target microscopic image obtained by adjusting the brightness value tend to be consistent, so that when multiple target microscopic images are spliced, the problem of uneven brightness of the spliced ​​microscopic images due to uneven brightness values ​​can be reduced.

[0064] In one embodiment, the brightness of the microscopic image is adjusted according to the brightness adjustment coefficient of each pixel, and the method for obtaining the target microscopic image can be: according to the brightness adjustment coefficient of each pixel, the brightness of each pixel in the brightness channel image is adjusted; according to the adjusted brightness channel image, the brightness of the microscopic image is adjusted to obtain the target microscopic image, that is, the adjusted brightness channel image is merged with the H channel image and the S channel image in the microscopic image to obtain a microscopic image in the HSV color space, and then the microscopic image in the HSV color space is converted into a microscopic image in the RGB color space, so as to obtain the target microscopic image.

[0065] For example, Figure 6 As shown, by adjusting the brightness adjustment coefficient of each pixel in the brightness channel image 12 corresponding to the microscopic image, the brightness of each pixel in the brightness channel image 12 can be obtained. Figure 6 The brightness channel image 15 after adjusting the brightness is obtained, the brightness channel image 15 is merged with the H channel image and the S channel image in the microscopic image to obtain a microscopic image in the HSV color space, and then the microscopic image in the HSV color space is converted into a microscopic image in the RGB color space, thereby obtaining Figure 6 Objective microscopic image 16.

[0066] In one embodiment, according to the brightness adjustment coefficient of each pixel, the brightness of each pixel in the brightness channel image can be adjusted in the following manner: for each pixel, the product of the brightness adjustment coefficient and the current brightness of the pixel is calculated to obtain the brightness adjustment value of the pixel; the brightness adjustment value of the pixel and the current brightness of the pixel are summed to obtain the target brightness of the pixel; the brightness of each pixel in the brightness channel image is adjusted to the corresponding target brightness. For example, if the current brightness of the pixel (i, j) is x0(i, j), the target brightness of the pixel (i, j) can be expressed as x1(i, j) = x0(i, j) + x0(i, j) * a(i, j), where a(i, j) is the brightness adjustment coefficient of the pixel (i, j).

[0067] In one embodiment, the brightness adjustment coefficient includes a first brightness adjustment coefficient and a second brightness adjustment coefficient. According to the brightness adjustment coefficient of each pixel, the brightness of each pixel in the brightness channel image can be adjusted in the following manner: for each pixel, the product of the first brightness adjustment coefficient and the current brightness of the pixel is calculated to obtain a brightness adjustment value; the brightness adjustment value and the second brightness adjustment coefficient are summed to obtain a target brightness of the pixel; and the brightness of each pixel in the brightness channel image is adjusted to the corresponding target brightness. For example, assuming that the brightness adjustment coefficient of the pixel (i, j) includes a first brightness adjustment coefficient a1(i, j) and a second brightness adjustment coefficient a2(i, j), and the current brightness of the pixel (i, j) is x0(i, j), then the target brightness of the pixel (i, j) can be expressed as x1(i, j)=a2(i, j)+x0(i, j)*a1(i, j).

[0068] In one embodiment, the method for stitching multiple target microscopic images can be: for each target microscopic image, obtain a first brightness channel image corresponding to the target microscopic image; generate a second brightness histogram of the first brightness channel image, and determine a reference brightness histogram from multiple second brightness histograms; perform brightness registration on the first brightness channel image according to the reference brightness histogram and the second brightness histogram to obtain a second brightness channel image; adjust the brightness of the target microscopic image according to the second brightness channel image, and stitch the multiple target microscopic images after the brightness adjustment. By determining the reference brightness histogram and adjusting the brightness channel image of the target microscopic image based on the reference brightness histogram, the brightness histogram of each target microscopic image can be close to the reference brightness histogram, thereby ensuring that the brightness of each target microscopic image is close to the same, so that after stitching the multiple target microscopic images after the brightness adjustment, the brightness uniformity of the stitched microscopic images can be greatly improved.

[0069] For example, Figure 7 As shown, instead of adjusting the brightness of multiple microscopic images, multiple microscopic images are directly stitched together to obtain Figure 7 The first spliced ​​microscopic image 21 in the image, according to the image brightness adjustment method provided by the embodiment of the present invention, firstly adjusts the brightness of the microscopic image based on the reference feature vector in the microscopic image to obtain the target microscopic image, thereby ensuring the consistency of the brightness of each pixel in the target microscopic image, and then further selects a brightness histogram of a target microscopic image from multiple target microscopic images as a reference brightness histogram, and adjusts the brightness channel image of the target microscopic image based on the reference brightness histogram, so that the brightness histogram of each target microscopic image can tend to the reference brightness histogram, thereby ensuring that the brightness of each target microscopic image tends to be consistent, and then splices the multiple microscopic images after adjusting the brightness, and obtains Figure 7A second stitched microscopic image 22 with uniform brightness.

[0070] In one embodiment, the method of determining the reference brightness histogram from multiple second brightness histograms can be: determining the second brightness evaluation score of each second brightness histogram; and determining the second brightness histogram corresponding to the highest second brightness evaluation score among the multiple second brightness histograms as the reference brightness histogram. The second brightness evaluation score is used to describe the brightness uniformity of the second brightness histogram. The higher the second brightness evaluation score, the better the brightness uniformity of the second brightness histogram, and the lower the second brightness evaluation score, the worse the brightness uniformity of the second brightness histogram. By selecting the highest second brightness evaluation score, that is, the second brightness histogram corresponding to the best brightness uniformity as the reference brightness histogram, the brightness of the target microscopic image can be accurately adjusted based on the reference brightness histogram with the best brightness uniformity, thereby ensuring the brightness uniformity of the stitched microscopic image.

[0071] In one embodiment, the second brightness evaluation score of the second brightness histogram may be determined by: calculating the mean and standard deviation of the second brightness histogram; calculating the difference between the mean and the standard deviation, and determining the difference as the second brightness evaluation score of the second brightness histogram, or querying the mapping relationship between the pre-stored difference and the brightness evaluation score to obtain the brightness evaluation score corresponding to the difference between the mean and the standard deviation, and determining the queried brightness evaluation score as the second brightness evaluation score of the second brightness histogram. The mapping relationship between the pre-stored difference and the brightness evaluation score may be set based on actual conditions, and the embodiment of the present invention does not specifically limit this.

[0072] In one embodiment, brightness alignment is performed on the first brightness channel image according to a reference brightness histogram and a second brightness histogram to obtain the second brightness channel image by: calculating a first cumulative histogram of the reference brightness histogram and calculating a second cumulative histogram of the second brightness histogram; for each grayscale level, calculating the probability difference between the probability value of the grayscale level in the first cumulative histogram and the probability value of the grayscale level in the second cumulative histogram; determining the grayscale level corresponding to the minimum probability difference as the target grayscale level; and adjusting the brightness of each pixel value in the first brightness channel image to the brightness corresponding to the target grayscale level to obtain the second brightness channel image.

[0073] The image brightness adjustment method provided in the above embodiment analyzes and determines the brightness distribution feature vector of each pixel through the brightness channel image corresponding to the microscopic image, and determines the reference feature vector from multiple brightness distribution feature vectors, and then determines the brightness adjustment coefficient of each pixel according to the reference feature vector and the brightness distribution feature vector of each pixel. Finally, according to the brightness adjustment coefficient of each pixel, the brightness of the microscopic image is adjusted to obtain the target microscopic image, so that the brightness uniformity of the target microscopic image can be ensured, so that after splicing multiple target microscopic images with uniform brightness, the brightness of the spliced ​​microscopic image can be made uniform, which greatly improves the brightness uniformity of the microscopic image.

[0074] See also Figure 8 , Figure 8 The present invention provides a schematic block diagram of an image brightness adjustment device provided in an embodiment of the present invention. The image brightness adjustment device can be applied to a film reader, a terminal device or a server.

[0075] like Figure 8 As shown, the image brightness adjustment device 300 includes a processor 301 and a memory 302 , and the processor 301 and the memory 302 are connected via a bus 303 , such as an I2C (Inter-integrated Circuit) bus.

[0076] Specifically, the processor 301 is used to provide computing and control capabilities to support the operation of the entire image brightness adjustment device. The processor 301 can be a central processing unit (CPU), and the processor 301 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0077] Specifically, the memory 302 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.

[0078] Those skilled in the art will understand that Figure 8The structure shown in the figure is only a block diagram of a part of the structure related to the embodiment of the present invention, and does not constitute a limitation on the image brightness adjustment device to which the embodiment of the present invention is applied. The specific image brightness adjustment device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0079] The processor 301 is used to run the computer program stored in the memory 302, and implement any one of the image brightness adjustment methods provided by the embodiments of the present invention when executing the computer program.

[0080] In one embodiment, the processor 301 is used to run a computer program stored in the memory 302, and implement the following steps when executing the computer program:

[0081] Acquire multiple microscopic images to be stitched;

[0082] Performing brightness segmentation on the microscopic image to obtain a brightness channel image corresponding to the microscopic image;

[0083] Determine, according to the brightness channel image, a brightness distribution feature vector of each pixel in the brightness channel image, and determine a reference feature vector from a plurality of the brightness distribution feature vectors;

[0084] Determining a brightness adjustment coefficient of each pixel point according to the reference feature vector and the brightness distribution feature vector of each pixel point;

[0085] According to the brightness adjustment coefficient of each pixel point, the brightness of the microscopic image is adjusted to obtain a target microscopic image, and a plurality of the target microscopic images are spliced.

[0086] In one embodiment, when determining the brightness distribution feature vector of each pixel in the brightness channel image according to the brightness channel image, the processor 301 is used to implement:

[0087] For each pixel in the brightness channel image, determining a local image region containing the pixel in the brightness channel image;

[0088] Generate a first brightness histogram corresponding to the local image area, and calculate a cumulative histogram of the first brightness histogram;

[0089] The brightness values ​​of a plurality of preset quantiles in the cumulative histogram are determined, and the determined plurality of brightness values ​​are used as brightness distribution feature vectors of the pixel points, wherein one preset quantile corresponds to one brightness value.

[0090] In one embodiment, when determining a reference feature vector from a plurality of brightness distribution feature vectors, the processor 301 is configured to implement:

[0091] Determining a first brightness evaluation score for each of the brightness distribution feature vectors;

[0092] The brightness distribution feature vector corresponding to the highest first brightness evaluation score is determined as a reference feature vector.

[0093] In one embodiment, when determining the brightness adjustment coefficient of each pixel point according to the reference feature vector and the brightness distribution feature vector of each pixel point, the processor 301 is used to implement:

[0094] For each of the pixel points, multiplying the reference feature vector and the brightness distribution feature vector of the pixel point to obtain a first brightness feature vector;

[0095] A brightness adjustment coefficient of the pixel is determined according to the first brightness feature vector, the reference feature vector, and the brightness distribution feature vector of the pixel.

[0096] In one embodiment, when determining the brightness adjustment coefficient of the pixel point according to the first brightness feature vector, the reference feature vector and the brightness distribution feature vector of the pixel point, the processor 301 is used to implement:

[0097] Performing a square operation on the brightness distribution feature vector of the pixel point to obtain a second brightness feature vector;

[0098] Determine a first brightness adjustment coefficient of the pixel point according to the first brightness feature vector, the second brightness feature vector, the reference feature vector, and the brightness distribution feature vector of the pixel point;

[0099] A second brightness adjustment coefficient of the pixel is determined according to the first brightness adjustment coefficient, the reference feature vector, and the brightness distribution feature vector of the pixel.

[0100] In one embodiment, when the processor 301 adjusts the brightness of the microscopic image according to the brightness adjustment coefficient of each pixel point to obtain the target microscopic image, it is used to implement:

[0101] Adjusting the brightness of each pixel in the brightness channel image according to the brightness adjustment coefficient of each pixel;

[0102] The brightness of the microscopic image is adjusted according to the adjusted brightness channel image to obtain a target microscopic image.

[0103] In one embodiment, the brightness adjustment coefficient includes a first brightness adjustment coefficient and a second brightness adjustment coefficient. When the processor 301 adjusts the brightness of each pixel in the brightness channel image according to the brightness adjustment coefficient of each pixel, it is used to implement:

[0104] For each of the pixels, calculating the product of the first brightness adjustment coefficient and the current brightness of the pixel to obtain a brightness adjustment value;

[0105] Summing the brightness adjustment value and the second brightness adjustment coefficient to obtain a target brightness of the pixel;

[0106] The brightness of each pixel in the brightness channel image is adjusted to the corresponding target brightness.

[0107] In one embodiment, when the processor 301 stitches a plurality of target microscopic images, it is used to implement:

[0108] For each of the target microscopic images, acquiring a first brightness channel image corresponding to the target microscopic image;

[0109] generating a second brightness histogram of the first brightness channel image, and determining a reference brightness histogram from a plurality of the second brightness histograms;

[0110] Performing brightness registration on the first brightness channel image according to the reference brightness histogram and the second brightness histogram to obtain a second brightness channel image;

[0111] The brightness of the target microscopic image is adjusted according to the second brightness channel image, and the multiple target microscopic images after the brightness adjustment are spliced.

[0112] In one embodiment, when the processor 301 performs brightness registration on the first brightness channel image according to the reference brightness histogram and the second brightness histogram to obtain the second brightness channel image, it is used to implement:

[0113] Calculating a first cumulative histogram of the reference brightness histogram, and calculating a second cumulative histogram of the second brightness histogram;

[0114] For each grayscale, calculating a probability difference between a probability value of the grayscale in the first cumulative histogram and a probability value of the grayscale in the second cumulative histogram;

[0115] Determine the grayscale corresponding to the minimum probability difference as the target grayscale;

[0116] The brightness of each pixel value in the first brightness channel image is adjusted to the brightness corresponding to the target grayscale to obtain a second brightness channel image.

[0117] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the image brightness adjustment device described above can refer to the corresponding process in the aforementioned image brightness adjustment method embodiment, and will not be repeated here.

[0118] The present invention also provides an image reader, which includes a microscope device, a processor and a memory, wherein the microscope device, the processor and the memory are connected via a bus, such as an I2C (Inter-integrated Circuit) bus. The processor is used to run a computer program stored in the memory, and implements any one of the image brightness adjustment methods provided in the present invention when executing the computer program.

[0119] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described film viewing instrument can refer to the corresponding process in the aforementioned image brightness adjustment method embodiment, and will not be repeated here.

[0120] An embodiment of the present invention further provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement any image brightness adjustment method provided in the description of the embodiment of the present invention.

[0121] The storage medium may be an internal storage unit of the image reader described in the above embodiments, such as a hard disk or memory of the image reader. The storage medium may also be an external storage device of the image reader, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the image reader.

[0122] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0123] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0124] The serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for adjusting image brightness, characterized in that: include: Acquire multiple microscopic images to be stitched; Performing brightness segmentation on the microscopic image to obtain a brightness channel image corresponding to the microscopic image; Determine, according to the brightness channel image, a brightness distribution feature vector of each pixel in the brightness channel image, and determine a reference feature vector from a plurality of the brightness distribution feature vectors; Determining a brightness adjustment coefficient for each of the pixels according to the reference feature vector and the brightness distribution feature vector of each of the pixels; According to the brightness adjustment coefficient of each pixel point, the brightness of the microscopic image is adjusted to obtain a target microscopic image, and a plurality of the target microscopic images are spliced.

2. The image brightness adjustment method according to claim 1, characterized in that: The step of determining the brightness distribution feature vector of each pixel in the brightness channel image according to the brightness channel image includes: For each pixel in the brightness channel image, determining a local image region containing the pixel in the brightness channel image; Generate a first brightness histogram corresponding to the local image area, and calculate a cumulative histogram of the first brightness histogram; The brightness values ​​of a plurality of preset quantiles in the cumulative histogram are determined, and the determined plurality of brightness values ​​are used as brightness distribution feature vectors of the pixel points, wherein one preset quantile corresponds to one brightness value.

3. The image brightness adjustment method according to claim 1, characterized in that: The step of determining a reference feature vector from a plurality of the brightness distribution feature vectors comprises: Determining a first brightness evaluation score for each of the brightness distribution feature vectors; The brightness distribution feature vector corresponding to the highest first brightness evaluation score is determined as a reference feature vector.

4. The image brightness adjustment method according to claim 1, characterized in that: The step of determining the brightness adjustment coefficient of each pixel point according to the reference feature vector and the brightness distribution feature vector of each pixel point comprises: For each of the pixel points, multiplying the reference feature vector and the brightness distribution feature vector of the pixel point to obtain a first brightness feature vector; A brightness adjustment coefficient of the pixel is determined according to the first brightness feature vector, the reference feature vector, and the brightness distribution feature vector of the pixel.

5. The image brightness adjustment method according to claim 4, characterized in that: The step of determining the brightness adjustment coefficient of the pixel point according to the first brightness feature vector, the reference feature vector and the brightness distribution feature vector of the pixel point comprises: Performing a square operation on the brightness distribution feature vector of the pixel point to obtain a second brightness feature vector; Determine a first brightness adjustment coefficient of the pixel point according to the first brightness feature vector, the second brightness feature vector, the reference feature vector, and the brightness distribution feature vector of the pixel point; A second brightness adjustment coefficient of the pixel is determined according to the first brightness adjustment coefficient, the reference feature vector, and the brightness distribution feature vector of the pixel.

6. The image brightness adjustment method according to claim 1, characterized in that: The step of adjusting the brightness of the microscopic image according to the brightness adjustment coefficient of each pixel point to obtain a target microscopic image includes: Adjusting the brightness of each pixel in the brightness channel image according to the brightness adjustment coefficient of each pixel; The brightness of the microscopic image is adjusted according to the adjusted brightness channel image to obtain a target microscopic image.

7. The image brightness adjustment method according to claim 6, characterized in that: The brightness adjustment coefficient includes a first brightness adjustment coefficient and a second brightness adjustment coefficient, and adjusting the brightness of each pixel in the brightness channel image according to the brightness adjustment coefficient of each pixel includes: For each of the pixels, calculating the product of the first brightness adjustment coefficient and the current brightness of the pixel to obtain a brightness adjustment value; Summing the brightness adjustment value and the second brightness adjustment coefficient to obtain a target brightness of the pixel; The brightness of each pixel in the brightness channel image is adjusted to the corresponding target brightness.

8. The image brightness adjustment method according to any one of claims 1 to 7, characterized in that: The step of stitching the plurality of target microscopic images comprises: For each of the target microscopic images, acquiring a first brightness channel image corresponding to the target microscopic image; generating a second brightness histogram of the first brightness channel image, and determining a reference brightness histogram from a plurality of the second brightness histograms; Performing brightness registration on the first brightness channel image according to the reference brightness histogram and the second brightness histogram to obtain a second brightness channel image; The brightness of the target microscopic image is adjusted according to the second brightness channel image, and the multiple target microscopic images after the brightness adjustment are spliced.

9. The image brightness adjustment method according to claim 8, characterized in that: The step of performing brightness registration on the first brightness channel image according to the reference brightness histogram and the second brightness histogram to obtain the second brightness channel image includes: Calculating a first cumulative histogram of the reference brightness histogram, and calculating a second cumulative histogram of the second brightness histogram; For each grayscale, calculating a probability difference between a probability value of the grayscale in the first cumulative histogram and a probability value of the grayscale in the second cumulative histogram; Determine the grayscale corresponding to the minimum probability difference as the target grayscale; The brightness of each pixel value in the first brightness channel image is adjusted to the brightness corresponding to the target grayscale to obtain a second brightness channel image.

10. An image brightness adjustment device, characterized in that: The image brightness adjustment device includes a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the image brightness adjustment method according to any one of claims 1 to 9 is realized.

11. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the image brightness adjustment method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Image brightness adjusting method, image brightness adjusting device, computer equipment and storage medium

    CN108924525A

  • Panoramic image brightness correction method and splicing method and device

    CN109978765A

  • Image brightness adjustment method and device, storage medium and electronic device

    CN110120021A

  • Image brightness adjustment method, electronic equipment and storage medium

    CN113014825A

  • Method for correcting image brightness, image analysis device and analysis system

    CN114092384A