Cell image automatic exposure method and device

By segmenting cell images according to different grayscale values ​​and pixel numbers in cell image processing, identifying cells and calculating exposure parameters, the overexposure problem caused by overall brightness is solved, a moderate exposure effect is achieved, and the cell image is promoted. further processing.

CN112233082BActive Publication Date: 2024-09-27RWD LIFE SCI CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202011090251.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-13
Publication Date
2024-09-27
Estimated Expiration
2040-10-13

AI Technical Summary

Technical Problem

When taking and processing cell images, the existing technology uses the overall brightness of the cell image as the exposure parameter, leading to the problem of overexposure.

Method used

By obtaining the grayscale image of the cell image, segment the cell image according to different grayscale values ​​and the number of pixels corresponding to each grayscale value, identify the background and target, and calculate the grayscale value of the pixel where the cell is located to adjust the exposure parameters and avoid exposure. over.

Benefits of technology

This achieves moderate brightness of the captured cell image, avoids overexposure, and facilitates subsequent cell image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112233082B
    Figure CN112233082B
Patent Text Reader

Abstract

The embodiment of the present invention provides a method for automatic exposure of a cell image, comprising: obtaining a grayscale image of a cell image; identifying cells in the cell image according to different grayscale values ​​in the cell image and the number of pixels corresponding to each grayscale value; calculating a current exposure parameter according to the grayscale value of the pixel where the cell is located; and comparing the current exposure parameter with a preset exposure parameter to adjust the exposure time. The embodiment of the present invention segments the cell image according to different grayscale values ​​in the cell image and the number of pixels corresponding to each grayscale value to obtain a background and a target, the target being identified as a cell, and then calculating the current exposure parameter according to the grayscale value of the pixel where the cell is located to adjust the exposure time. The cell image captured according to the exposure time has a moderate brightness, avoids the problem of overexposure, and is conducive to the subsequent further processing of the cell image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method and a device for automatic exposure of cell images. Background Art

[0002] Cell counting is a commonly used function in biological research, and accurate counting results are very important for the evaluation of experiments. Currently, cell counting based on microscope cell images is one of the mainstream methods. How to capture and process cell images under a microscope is the prerequisite for ensuring accurate cell counting.

[0003] Automatic exposure is the process of the camera automatically adjusting the exposure according to the intensity of light to prevent overexposure or underexposure. The automatic exposure methods used in the prior art when shooting and processing cell images mainly include the average brightness method, the weighted mean method, the brightness histogram, etc. The average brightness method is to average the grayscale values ​​of all pixels in the cell image, and adjust the exposure time according to the mean to achieve the target brightness. The weighted mean method is to set different weights for different areas of the cell image to calculate the overall brightness of the cell image, and adjust the exposure time according to the overall brightness to achieve the target brightness. The histogram method is to set different weights for different peaks in the histogram of the grayscale values ​​of the cell image to calculate the overall brightness of the cell image, and adjust the exposure time according to the overall brightness to achieve the target brightness.

[0004] The above automatic exposure methods all select the overall brightness of the cell image as the exposure parameter for automatic exposure. However, for cell images, since the cells are small and occupy a small proportion of the entire cell image, if the overall brightness of the cell image is used as the exposure parameter for automatic exposure, the cell image will often be overexposed. Summary of the invention

[0005] The embodiment of the present invention provides a method for automatic exposure of cell images, aiming to solve the problem of overexposure of cell images in the prior art.

[0006] In a first aspect, a method for automatic exposure of a cell image is provided, comprising:

[0007] Get the grayscale image of the cell image;

[0008] Identify cells in the cell image according to different gray values ​​in the cell image and the number of pixels corresponding to each gray value;

[0009] Calculate the current exposure parameter according to the gray value of the pixel where the cell is located;

[0010] Compare the current exposure parameters with the preset exposure parameters to adjust the exposure time.

[0011] In a second aspect, a cell image automatic exposure device is provided, comprising:

[0012] An acquisition unit, used for acquiring a grayscale image of a cell image;

[0013] A segmentation unit, used for identifying cells in the cell image according to different gray values ​​in the cell image and the number of pixels corresponding to each gray value;

[0014] A calculation unit, used for calculating the current exposure parameter according to the gray value of the pixel where the cell is located;

[0015] The adjustment unit is used to compare the current exposure parameter with the preset exposure parameter to adjust the exposure time.

[0016] The embodiment of the present invention segments the cell image according to different grayscale values ​​in the cell image and the number of pixels corresponding to each grayscale value to obtain the background and the target, that is, the target is identified as a cell, and then calculates the current exposure parameter according to the grayscale value of the pixel where the cell is located to adjust the exposure time. The cell image captured according to the exposure time has moderate brightness, avoids the problem of overexposure, and is conducive to the subsequent further processing of the cell image. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0018] Figure 1 is a flow chart of a method for automatic exposure of cell images provided in Embodiment 1 of the present invention;

[0019] Figure 2 is a subdivided flow chart of step S102 provided in the first embodiment of the present invention;

[0020] Figure 3 is a subdivision flow chart of step S203 provided in the first embodiment of the present invention;

[0021] Figure 4 is another subdivided flow chart of step S203 provided in the first embodiment of the present invention;

[0022] Figure 5 It is a structural block diagram of a cell image automatic exposure device provided in the second embodiment of the present invention. DETAILED DESCRIPTION

[0023] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar modules or modules with the same or similar functions. The embodiments described below by reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limitations of the present invention. On the contrary, embodiments of the present invention include all changes, modifications and equivalents that fall within the spirit and connotation of the appended claims.

[0024] The embodiment of the present invention segments the cell image according to different grayscale values ​​in the cell image and the number of pixels corresponding to each grayscale value to obtain the background and the target, that is, the target is identified as a cell, and then calculates the current exposure parameter according to the grayscale value of the pixel where the cell is located to adjust the exposure time. The cell image captured according to the exposure time has moderate brightness, avoids the problem of overexposure, and is conducive to the subsequent further processing of the cell image.

[0025] Embodiment 1

[0026] Figure 1 : is a flow chart of the cell image automatic exposure method provided by the first embodiment of the present invention. Figure 1 As shown, the method includes:

[0027] Step S101: Obtain a grayscale image of a cell image.

[0028] In the embodiment of the present invention, a grayscale camera or a color camera is used to capture the cell image. The cell image captured by the grayscale camera is a grayscale image. The cell is fluorescently labeled and the cell image captured by the color camera is a fluorescent image.

[0029] As an embodiment of the present invention, cells are fluorescently labeled and a color camera is used to obtain a fluorescence image, each pixel of which contains three channels of RGB. One of the channel images is extracted, such as a green channel image of all pixels, and the green channel image is converted into a grayscale image.

[0030] Step S102: identifying cells in the cell image according to different grayscale values ​​in the cell image and the number of pixels corresponding to each grayscale value.

[0031] The content contained in the cell image is relatively simple, and the proportion of cells in the entire image is relatively small. Based on these characteristics, in the embodiment of the present invention, the cell image is segmented to obtain the background and the target, and the target is regarded as the cell.

[0032] As an embodiment of the present invention, the process of segmenting the cell image to obtain the background and the target is as follows: Figure 2 As shown, the method includes:

[0033] Step S201: Count the number of pixels corresponding to different gray values ​​of all pixels in the cell image.

[0034] Step S202: accumulating the number of pixels in order of grayscale value from small to large, and recording the current grayscale value when the accumulated value is greater than or equal to a first preset threshold.

[0035] In an embodiment of the present invention, all pixels in a cell image contain a plurality of different grayscale values, and the number of pixels corresponding to the same grayscale value is counted, that is, the number of pixels corresponding to each grayscale value. Then, the number of pixels is accumulated in the order of grayscale value from small to large, and the accumulation is stopped when the accumulated value is greater than the first preset threshold value, and the corresponding grayscale value is recorded as the current grayscale value. According to the characteristics of the cell image, the proportion of cells in the entire image is small, and the first preset threshold value can be set to X, and the ratio of X to the total number of pixels in the cell image is 99%. The first preset threshold value can also be set to other values ​​according to the characteristics of different cell images, which is not limited here.

[0036] As long as the relationship between different grayscale values ​​and the corresponding number of pixels can be established, the counting and sorting steps can be interchanged and are not limited here.

[0037] Step S203: Identify pixels with grayscale values ​​greater than the current grayscale value as cells.

[0038] In the embodiment of the present invention, pixels with grayscale values ​​less than or equal to the current grayscale value are considered as background, and pixels with grayscale values ​​greater than the current grayscale value are considered as targets. The ratio of the first preset threshold value X to the total number of pixels in the cell image is 99%, and 99% of the pixels in the cell image are considered as background, and 1% of the pixels are considered as targets, i.e., cells.

[0039] As an embodiment of the present invention, the process of identifying pixels with gray values ​​greater than the current gray value as cells is as follows: Figure 3 As shown, the method includes:

[0040] Step S301: setting the grayscale values ​​of pixels whose grayscale values ​​are less than or equal to the current grayscale value to zero.

[0041] Step S302: Pixels with non-zero grayscale values ​​are identified as cells.

[0042] In the embodiment of the present invention, the grayscale values ​​of pixels whose grayscale values ​​are less than or equal to the current grayscale value are set to zero. In subsequent processing, pixels whose grayscale values ​​are non-zero are identified as cells.

[0043] As another embodiment of the present invention, the process of identifying pixels with gray values ​​greater than the current gray value as cells is as follows: Figure 4 As shown, the method includes:

[0044] Step S401: Record the positions of pixels whose grayscale values ​​are greater than the current grayscale value.

[0045] Step S402: The pixel at the position is identified as a cell.

[0046] In the embodiment of the present invention, the positions of pixels whose grayscale values ​​are greater than the current grayscale value are recorded, and in subsequent processing, the pixels at these positions are identified as cells.

[0047] Step S103: Calculate the current exposure parameter according to the gray value of the pixel where the cell is located.

[0048] Step S104: Compare the current exposure parameter with the preset exposure parameter to adjust the exposure time.

[0049] Different from the prior art that uses the overall brightness of the cell image to calculate the exposure parameter, in an embodiment of the present invention, the current exposure parameter is calculated based on the grayscale value of the pixel where the cell is located. Since the content contained in the cell image is relatively simple, except for the background, most of it is cells. Therefore, the targets identified in the above steps can be considered as cells, and the exposure parameters are calculated using a unified cell model. Preferably, for the pixels where the cells are located, the ratio of the number of pixels with a grayscale value of non-0 to the number of pixels with a grayscale value of 255 is calculated as the current exposure parameter. Pixels with a grayscale value of 255 are considered to be the center of the cell, and pixels with a grayscale value of non-255 are considered to be the part other than the center of the cell. The current exposure parameter is compared with the preset exposure parameter, and the preset exposure parameter is set according to the situation, such as set to 10:1. If the current exposure parameter is greater than the preset exposure parameter, the exposure time is increased; if the current exposure parameter is less than the preset exposure parameter, the exposure time is reduced.

[0050] After adjusting the exposure time, the above steps S101-S104 are repeated until the difference between the two is less than or equal to a specific threshold, or the maximum number of iterations is reached, then the loop is stopped to obtain the optimal exposure time.

[0051] Since in applications of cell counting or cell image analysis, it is often necessary to complete the capture and analysis of multiple cell images within a few seconds, the embodiments of the present invention utilize a unified cell model and calculate the current exposure parameters only based on the grayscale value of the pixel where the cell is located. This has low computational complexity and is suitable for applications in the cell field.

[0052] The embodiment of the present invention segments the cell image according to different grayscale values ​​in the cell image and the number of pixels corresponding to each grayscale value to obtain the background and the target, that is, the target is identified as a cell, and then calculates the current exposure parameter according to the grayscale value of the pixel where the cell is located to adjust the exposure time. The cell image captured according to the exposure time has moderate brightness, avoids the problem of overexposure, and is conducive to the subsequent further processing of the cell image.

[0053] Embodiment 2

[0054] Figure 5 The structure block diagram of the cell image automatic exposure device provided in the second embodiment of the present invention is as follows: Figure 5 As shown, the device includes an acquisition unit 51, a segmentation unit 52, a calculation unit 53 and an adjustment unit 54.

[0055] The acquisition unit 51 is used to acquire a grayscale image of a cell image.

[0056] The segmentation unit 52 is used to identify cells in the cell image according to different gray values ​​in the cell image and the number of pixels corresponding to each gray value.

[0057] The calculation unit 53 is used to calculate the current exposure parameter according to the gray value of the pixel where the cell is located.

[0058] The adjustment unit 54 is used to compare the current exposure parameter with the preset exposure parameter to adjust the exposure time.

[0059] Preferably, the segmentation unit 52 comprises:

[0060] The statistics subunit is used to count the number of pixels corresponding to different gray values ​​of all pixels in the cell image.

[0061] The accumulation subunit is used to accumulate the number of pixels in the order of grayscale value from small to large, and record the current grayscale value when the accumulated value is greater than or equal to the first preset threshold.

[0062] The recognition subunit is used to recognize pixels whose grayscale values ​​are greater than the current grayscale value as cells.

[0063] As an embodiment of the present invention, the identification subunit includes:

[0064] The zeroing subunit is used to set the grayscale value of pixels whose grayscale value is less than or equal to the current grayscale value to zero.

[0065] The first identification subunit is used to identify pixels with non-zero grayscale values ​​as cells.

[0066] As another embodiment of the present invention, the identification subunit includes:

[0067] The recording subunit is used to record the positions of pixels whose grayscale values ​​are greater than the current grayscale value.

[0068] The second recognition subunit is used to recognize the pixel at the position as a cell.

[0069] Preferably, the calculation unit 53 specifically calculates, for the pixels where the cells are located, a ratio of the number of pixels with a grayscale value other than 0 to the number of pixels with a grayscale value of 255 as the current exposure parameter.

[0070] The cell image automatic exposure method executed in the cell image automatic exposure device corresponds one to one with the method described in the first embodiment, and will not be described in detail here.

[0071] The embodiment of the present invention segments the cell image according to different grayscale values ​​in the cell image and the number of pixels corresponding to each grayscale value to obtain the background and the target, that is, the target is identified as a cell, and then calculates the current exposure parameter according to the grayscale value of the pixel where the cell is located to adjust the exposure time. The cell image captured according to the exposure time has moderate brightness, avoids the problem of overexposure, and is conducive to the subsequent further processing of the cell image.

[0072] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for automatic exposure of cell images, characterized in that: The method comprises: Acquire a grayscale image of the cell image; Identify cells in the cell image according to different grayscale values ​​of all pixels in the cell image and the number of pixels corresponding to each grayscale value; Calculating a current exposure parameter according to the grayscale value of the pixel where the cell is located; Comparing the current exposure parameter with a preset exposure parameter to adjust the exposure time; Identifying cells in the cell image according to different grayscale values ​​of all pixels in the cell image and the number of pixels corresponding to each grayscale value comprises: Counting the number of pixels corresponding to different gray values ​​of all pixels in the cell image; Accumulate the number of pixels in ascending order of grayscale value, and record the current grayscale value when the accumulated value is greater than or equal to a first preset threshold; Identify pixels whose grayscale values ​​are greater than the current grayscale value as cells; The current exposure parameter is calculated according to the gray value of the pixel where the cell is located: For the pixel where the cell is located, the ratio of the number of pixels with a gray value other than 0 to the number of pixels with a gray value of 255 is calculated as the current exposure parameter; Pixels with a grayscale value of 255 are considered to be the cell center, and pixels with a grayscale value other than 255 are considered to be parts other than the cell center.

2. The method according to claim 1, characterized in that Identifying pixels with grayscale values ​​greater than the current grayscale value as cells includes: Setting the grayscale values ​​of pixels whose grayscale values ​​are less than or equal to the current grayscale value to zero; Pixels with non-zero grayscale values ​​are identified as cells.

3. The method according to claim 1, characterized in that Identifying pixels with grayscale values ​​greater than the current grayscale value as cells includes: Record the position of the pixel whose grayscale value is greater than the current grayscale value; Pixels at said locations are identified as cells.

4. A cell image automatic exposure device, characterized in that: The device comprises: An acquisition unit, used for acquiring a grayscale image of the cell image; A segmentation unit, used for identifying cells in the cell image according to different gray values ​​of all pixels in the cell image and the number of pixels corresponding to each gray value; A calculation unit, used for calculating a current exposure parameter according to the gray value of the pixel where the cell is located; an adjustment unit, configured to compare the current exposure parameter with a preset exposure parameter to adjust the exposure time; The segmentation unit comprises: A statistical subunit, used for counting the number of pixels corresponding to different gray values ​​of all pixels in the cell image; An accumulation subunit, used for accumulating the number of pixels in ascending order of grayscale value, and recording the current grayscale value when the accumulated value is greater than or equal to a first preset threshold; an identification subunit, used for identifying pixels whose grayscale values ​​are greater than the current grayscale value as cells; The calculation unit is specifically: For the pixel where the cell is located, the ratio of the number of pixels with a gray value other than 0 to the number of pixels with a gray value of 255 is calculated as the current exposure parameter; Pixels with a grayscale value of 255 are considered to be the cell center, and pixels with a grayscale value other than 255 are considered to be parts other than the cell center.

5. The device according to claim 4, characterized in that The identification subunit comprises: A zeroing subunit, used to set the grayscale value of pixels whose grayscale value is less than or equal to the current grayscale value to zero; The first identification subunit is used to identify pixels with non-zero grayscale values ​​as cells.

6. The device according to claim 4, characterized in that The identification subunit comprises: A recording subunit, used for recording the position of pixels whose grayscale values ​​are greater than the current grayscale value; The second recognition subunit is used to recognize the pixel at the position as a cell.

Citation Information

Patent Citations

  • Method for processing microscope video image

    CN102438107A

  • Blood type result recognition algorithm based on grey level analysis and type recognition

    CN103543277A

  • Image processing method and device

    CN104794711A

  • Image processing method and mobile terminal

    CN105227858A

  • Image sensor detection method and apparatus thereof

    CN106341685A