Counting box counting-oriented phytoplankton rapid scanning microscopic high-definition imaging method
By fusing grayscale texture and color saturation characteristics for focus evaluation, and using bilinear interpolation to calculate the focus distance, the problems of slow scanning speed and low autofocus sensitivity during the microscopic image acquisition of phytoplankton counting frames are solved, and the rapid acquisition of phytoplankton microscopic images is achieved.
Patent Information
- Application Number
- CN202411872943.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The prior art, when obtaining clear microscopic images of phytoplankton counting frame samples, the scanning speed is slow and the sensitivity of autofocus is low, resulting in a longer scanning time for counting frame samples.
By fusing the grayscale texture features and color saturation of the microscopic image, focusing evaluation is performed to improve the sensitivity of autofocus, and the focus distance is calculated by bilinear interpolation to achieve rapid acquisition of phytoplankton microscopic images.
It greatly reduces the scanning time, improves the sensitivity of autofocus, and realizes rapid acquisition of clear microscopic images of phytoplankton counting frame samples.
Smart Images

Figure CN119603552A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of resources and environment, and in particular relates to a phytoplankton rapid scanning microscopic high-definition imaging method oriented to counting frame counting. Background Art
[0002] Phytoplankton is an important part of water quality biological assessment. The national ecological environment standard "Determination of Phytoplankton in Water Quality 0.1ml Counting Frame-Microscope Counting Method" (HJ1216-2021) stipulates the determination method of phytoplankton in water. Professional microscopy personnel need to drop the water sample into the counting frame (taking the 0.1mL standard counting frame as an example, a total of 10 10 = 100 counting squares, the number of microscopic fields in each square is related to the magnification and camera), and the slide microscopic field is moved to the corresponding counting square according to the diagonal method, row grid method, full slide method or random field method, and the number of phytoplankton species in each microscopic field is recorded. The operation process is cumbersome.
[0003] In recent years, image recognition technology based on deep learning has developed rapidly in the field of automatic phytoplankton identification. Combined with the optical path structure, hardware and host computer operating procedures of microscopic imaging, it can replace traditional manual microscopic inspection. High recognition accuracy depends on clear phytoplankton microscopic images with high magnification. The depth of field of high-magnification microscopes is as small as micrometers, requiring the focus distance of all counting frame scanning fields to be consistent. Therefore, in the process of computer programs driving stepper motors to move the slide to obtain microscopic images of different fields of view, it is necessary to focus the phytoplankton microscopic field of view multiple times through automatic focus technology, resulting in a longer scanning time for counting frame samples. At the same time, the autofocus technology uses motor control to obtain microscopic images of different focal lengths. After determining the target area through the focus window selection method, the image focus evaluation method is used to calculate the clarity of the target area in microscopic images of different focal lengths to obtain a clear microscopic image. However, the position of phytoplankton in the microscopic image is random, and the focus window is easy to deviate from the target area. When the focus evaluation is performed by calculating the clarity of the entire microscopic image, the calculation result is seriously interfered by the background area, and it is difficult to accurately measure the clarity of the phytoplankton target area, resulting in low sensitivity of the focus evaluation curve and weak ability to resolve the degree of defocus. Summary of the invention
[0004] In order to solve the problems of slow scanning speed and low focus sensitivity in the process of acquiring clear microscopic images of phytoplankton counting frame samples, the color characteristics of phytoplankton are obvious and the color characteristics of the target area become more and more obvious in the process of microscopic field of view from defocus to focus. The focusing of phytoplankton microscopic images is evaluated by fusing the grayscale texture characteristics and color saturation of the microscopic image to improve the sensitivity of autofocus. Then, the discrete focus distances of different microscopic fields of view of the counting frame samples are randomly obtained, and the focus distance interpolation operation is performed through bilinear interpolation, so as to realize the rapid acquisition of clear phytoplankton microscopic images.
[0005] The technical solution of the present invention is as follows:
[0006] A fast scanning microscopic high-definition imaging method for phytoplankton counting by counting frame includes the following steps:
[0007] Step 1: Sample scanning
[0008] Scan the counting frame samples by diagonal method, row grid method, whole slide method or random field of view method;
[0009] Step 2: Scan path optimization
[0010] The position coordinates of the scanned field of view are used as vertices, and the connections between fields of view are used as edges between vertices to construct an undirected complete graph of the scanned field of view. :
[0011] ,
[0012] in, is the set of scan field coordinates, For the edges connecting different views, in the constructed undirected complete graph All coordinates in are connected;
[0013] The greedy algorithm is used to determine the optimal scanning path, and the distance between any two fields of view is defined as the sum of the X-axis distance and the Y-axis distance:
[0014] ,
[0015] Calculate the distances between all unscanned field of view coordinates and the current field of view coordinates, determine the coordinate with the shortest distance as the next scanning position, and iterate and calculate the optimal scanning path of the selected scanning method in sequence;
[0016] Step 3: Select discrete focus points
[0017] Randomly select from all microscopic fields A discrete focus point that needs to be automatically focused is set, and then the counting frame is moved to the microscopic field of view to be focused;
[0018] Step 4: Extract grayscale texture features
[0019] Phytoplankton microscopic grayscale image by bilateral filtering To perform noise reduction:
[0020] ,
[0021] in, Center point The neighboring pixels of is a microscopic grayscale image of phytoplankton. If the adjacent point is , the standard deviation of the Gaussian kernel in the spatial domain is , the Gaussian kernel standard deviation on the pixel value domain is ,but is the weight function;
[0022] ,
[0023] Extraction using Laplace operator The grayscale characteristics of phytoplankton are obtained by using the edge information of :
[0024] ,
[0025] Step 5: Extract color features
[0026] The phytoplankton microscopic image format is converted from RGB to HSV color space, and the color saturation S component feature is extracted as the color feature information of phytoplankton. The color saturation difference of phytoplankton microscopic images is characterized by variance:
[0027] ,
[0028] ,
[0029] in, For point The saturation value at is the average saturation value, For point The difference between the saturation at the pixel and the average saturation of the entire image;
[0030] Step 6: Focus on evaluation
[0031] Fusion of grayscale gradient features and color features of phytoplankton microscopic images for focus evaluation:
[0032] ,
[0033] In the formula, The midpoint of the phytoplankton microscopic image The grayscale features at The midpoint of the phytoplankton microscopic image The color characteristics of The midpoint of the phytoplankton microscopic image The saturation value at ;
[0034] Step 7: Switch the microscope field of view
[0035] Move the counting frame sample to the next microscopic field of view, and follow steps 4, 5, and 6 in sequence, recording the horizontal position coordinates and vertical focus distance of each microscopic field of view. , thereby obtaining the focusing surface of the counting frame sample discrete values;
[0036] Step 8: Focus surface interpolation
[0037] Make the target point The minimum rectangle distances to the four vertices are , , , . First, perform linear interpolation in the horizontal X direction:
[0038] ,
[0039] ,
[0040] Then perform linear interpolation in the Y direction to get the focus distance of the target point:
[0041] .
[0042] Beneficial effects:
[0043] The method for rapid scanning microscopic high-definition imaging of phytoplankton for counting frame counting of the present invention first determines the shortest scanning path of all fields of view through the above steps, then calculates the focusing distances of all microscopic fields of view of the phytoplankton counting frame sample, and drives the motor counting frame to move to the focusing distance of the corresponding microscopic field of view through a computer program, thereby avoiding the need to perform automatic focusing operation on each microscopic field of view, greatly reducing the scanning time, and thus realizing the rapid acquisition of clear microscopic images of the phytoplankton counting frame sample. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 Flow chart of the method for rapid scanning of clear microscopic images of frame samples for phytoplankton counting.
[0045] Figure 2 This is an example of the optimal route scanned by the random field of view method.
[0046] Figure 3This is an example diagram of the comparison of normalized focusing evaluation curves.
[0047] Figure 4 This is an example of the average offset distance.
[0048] Figure 5 This is an example of focus offset distance.
[0049] Figure 6 An example of a scan of a sample row grid method for phytoplankton counting frames. DETAILED DESCRIPTION
[0050] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. However, the following embodiments are limited to explaining the present invention, and the protection scope of the present invention should include the entire contents of the claims, and through the description of the following embodiments, those skilled in the art can fully implement the entire contents of the claims of the present invention.
[0051] Example
[0052] like Figure 1 As shown, the method for rapid scanning microscopic high-definition imaging of phytoplankton for counting frame counting is as follows:
[0053] (1) Select scanning method
[0054] According to the national environmental standard HJ1216-2021, the counting frame samples can be scanned by the diagonal method, row grid method, full film method or random field of view method. The 0.1ml standard counting frame contains a total of 10 10 = 100 counting squares, with the number of microscopic fields per square being 2 Taking 4=8 as an example (related to the imaging optical path, camera configuration, etc.), the diagonal method scans 10 counting squares along the diagonal for a total of 80 microscopic fields, the row method scans the 2nd, 5th, and 8th rows for a total of 240 microscopic fields, the full-film method scans 100 counting squares for a total of 800 microscopic fields, and the random field method randomly selects microscopic fields of a specified number of fields. Users can select the scanning method through the software interface.
[0055] (2) Scanning path optimization
[0056] In order to quickly complete the scanning of the counting frame samples, the present invention uses the position coordinates of the scanning field of view as vertices and the connections between fields of view as edges between vertices to construct an undirected complete graph of the scanning field of view. As shown in the following formula.
[0057] ,
[0058] In this example, is the set of scan field coordinates, For the edges connecting different views, in the constructed undirected complete graph All coordinates in are connected.
[0059] Then, a greedy algorithm is used to determine the optimal scanning path. Since the motor can only move in the X-axis and Y-axis directions, the present invention defines the distance between any two fields of view as the sum of the X-axis distance and the Y-axis distance, as shown in the following formula.
[0060] ,
[0061] The distances between all unscanned field of view coordinates and the current field of view coordinates are calculated, and the coordinate with the shortest distance is determined as the next scanning position. The optimal scanning path of the selected scanning method is calculated iteratively in sequence.
[0062] (3) Selecting discrete focus points
[0063] Randomly select from all microscopic fields A discrete focus point that needs to be automatically focused is determined, and then a computer program is used to drive the motor to move the counting frame to the microscopic field of view to be focused.
[0064] (4) Extracting grayscale texture features
[0065] Compared with the out-of-focus image, the edge details of the focused image are clearer. Existing research results show that in scenes with less noise, the Laplacian operator can evaluate the focus of the image with high quality. Bilateral filtering achieves image noise reduction while maintaining image edge details by nonlinearly combining image grayscale information and spatial information. As shown in the following formula, firstly, bilateral filtering is used to filter the grayscale image of phytoplankton microscopy. Perform noise reduction to reduce the impact of noise on focus evaluation.
[0066] ,
[0067] in, Center point The bilateral filter constructs a weight function through the Euclidean distance and gray value difference between pixels. , which can achieve image noise reduction while preserving image edges.
[0068] ,
[0069] Phytoplankton microscopic grayscale image After bilateral filtering and denoising, the Laplace operator is used to extract The grayscale characteristics of phytoplankton can be obtained by using the edge information of :
[0070] ,
[0071] (5) Extracting color features
[0072] Phytoplankton microscopic images usually consist of a background area and a target area of phytoplankton cells, and the target area has obvious color features, such as blue algae appearing blue and green algae appearing green. In the focused state, the color saturation of phytoplankton is relatively bright, and as the microscope defocuses to varying degrees, its color saturation information gradually weakens. Therefore, the focus of the microscopic image can be evaluated by extracting the color feature information of phytoplankton. The experiment converts the phytoplankton microscopic image format from RGB to HSV color space, and extracts the color saturation S component feature as the color feature information of phytoplankton. For the background area, since the color feature is not obvious, its color saturation value is always low; for the phytoplankton target area, when in the defocus state, the color information of the microscopic image is weak and the color saturation value is relatively low; when in the focused state, the microscopic image is bright in color and the color saturation value is relatively high. Therefore, compared with the defocused blurred image, the phytoplankton microscopic focused image has a greater saturation difference. This embodiment characterizes the color saturation difference of the phytoplankton microscopic image by variance:
[0073] ,
[0074] ,
[0075] in, For point The saturation value at is the average saturation value, For point The difference between the saturation at that location and the average saturation of the entire image.
[0076] (6) Focus on evaluation methods
[0077] The background area in the phytoplankton microscopic image is easy to interfere with the focus evaluation result. When the microscope is in the focus state, the saturation of the background area is slightly different from the average saturation of the whole image, while the saturation of the phytoplankton target area is significantly different from the average saturation of the whole image. Based on this, the present invention proposes to fuse the grayscale gradient features and color features of the phytoplankton microscopic image for focus evaluation to improve the resolution of the clarity evaluation for different defocus levels, as shown in the following formula.
[0078] ,
[0079] In the formula , , are the midpoints of the phytoplankton microscopic images. The grayscale features, color features and saturation values at the
[0080] (7) Switch the microscopic field of view
[0081] Use a computer program to drive the motor to move the counting frame sample to the next microscopic field of view, and follow the above steps (4-6) in sequence, recording the horizontal position coordinates and vertical focus distance of each microscopic field of view. , thereby obtaining the focusing surface of the counting frame sample discrete values.
[0082] (8) Focus surface interpolation
[0083] Make the target point The minimum rectangle distances to the four vertices are , , , First, linear interpolation is performed in the horizontal X direction, as shown in the following formula:
[0084] ,
[0085] ,
[0086] Then perform linear interpolation in the Y direction to obtain the focus distance of the target point, as shown in the following formula.
[0087] ,
[0088] Through the above steps, the shortest scanning path of all fields of view is first determined, and then the focusing distances of all microscopic fields of view of the phytoplankton counting frame sample are calculated. The motor counting frame is driven by a computer program to move to the focusing distance of the corresponding microscopic field of view, thereby avoiding the need to perform automatic focusing operation on each microscopic field of view, greatly reducing the scanning time, and thus realizing the rapid acquisition of clear microscopic images of the phytoplankton counting frame sample.
[0089] The present invention discloses a method for quickly scanning clear microscopic images of phytoplankton counting frame samples, and demonstrates the discovery effect from two aspects: optimal path selection, phytoplankton microscopic image clarity evaluation and focus surface interpolation.
[0090] In terms of optimal path selection, taking the random horizon method as an example, the coordinates and Euclidean distance information of the undirected complete graph of 10 random horizons are selected as shown in Table 1.
[0091] Table 1 Random field of view position coordinates and distance examples
[0092]
[0093] The scanning path obtained by the greedy algorithm is as follows Figure 2 As shown, there are Figure 2 It can be seen that the optimal path scanning method provided by the present invention can obtain a scanning route with the optimal distance.
[0094] In terms of clarity evaluation, a microscopic image of phytoplankton was collected every 2 μm movement of the precision displacement stage in the depth of field direction, and Pediastrum sp., Coelastrum sphaericum, Selenastrum capricornutum, and Phaeodactylum were selected as research objects. Among them, Pediastrum sp. and Coelastrum sphaericum have the morphological characteristics of relatively large volume of group cells; Phaeodactylum capricornutum and Phaeodactylum are small single-cell algae. 31 frames of phytoplankton microscopic image sequences were continuously acquired in the depth of field direction. Figure 3 Comparison chart of normalized focusing evaluation curves of the proposed method and Tenengrad, variance method, Brenner, Laplacian and Roberts.
[0095] The traditional focus evaluation method performs focus evaluation by calculating the gradient information of the entire phytoplankton microscopic image. However, the background area of the phytoplankton microscopic image is large, and the evaluation value of the normalized focus evaluation curve in the flat area is higher. The present invention effectively improves the resolution of images with different degrees of defocus by integrating the edge gradient characteristics and color saturation characteristics of the phytoplankton microscopic image.
[0096] In terms of focus surface interpolation, Figure 4 The average offset distance corresponding to each specified number of steps along the horizontal and vertical directions is given by Figure 4 It can be seen that the average offset distance is linearly related to the focus interval. The larger the focus interval, the larger the average offset distance. Moreover, the same focus interval has different effects on the focus distance in the horizontal and vertical directions. The average offset distance in the horizontal direction is higher than that in the vertical direction. Therefore, when selecting the focus interval, the focus interval in the vertical direction should be larger than the focus interval in the horizontal direction.
[0097] Figure 5 The vertical focus interval was set to 3 and the horizontal focus interval was set to 2, and an example diagram of the focus offset distance of 800 microscopic fields was drawn. At a magnification of 20 times, it can be approximately considered that the focal length range of a clear microscopic image of phytoplankton is within 8 microns. It can be seen that the probability of accurately obtaining a clear microscopic image in 800 microscopic fields is 95.13%. The experimental results show that by automatically focusing on discrete sampling points in all microscopic fields and using interpolation technology to interpolate the focus surface, the focus surface can be effectively obtained, which greatly reduces the number of automatic focusing times in the process of scanning the phytoplankton counting frame, thereby achieving the purpose of quickly scanning the counting frame sample.
[0098] The method for rapid scanning of clear microscopic images of phytoplankton counting frame samples was integrated into the automatic recognition system of phytoplankton microscopic images. Diagonal scanning, row grid scanning and full-film scanning were performed on 0.1mL phytoplankton counting frame samples, realizing the rapid acquisition and automatic identification of clear microscopic images of phytoplankton. Figure 6 The following is an example of the scanning process of the counting frame sample using the row grid method. 10 The table shows 100 counting squares in a 0.1 mL standard counting frame, and the value is the number of cells in each counting square; 4 2 The table shows the 8 microscopic fields in each counting grid, and the values are the number of cells in each microscopic field.
[0099] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A method for rapid scanning microscopic high-definition imaging of phytoplankton for counting frame counting, characterized in that: The steps include: Step 1: Sample scanning; Step 2: Scan the path to find the best solution; Step 3: Select discrete focus points; Step 4: Extract grayscale texture features; Step 5: Extract color features; Step 6: Focus on evaluation; Step 7: Switch the microscopic field of view; Step 8: Focus surface interpolation.
2. The method for rapid scanning microscopic high-definition imaging of phytoplankton for counting frame counting according to claim 1, characterized in that: In step 1, the counting frame sample is scanned by the diagonal method, the row grid method, the whole slide method, or the random field of view method.
3. The method for rapid scanning microscopic high-definition imaging of phytoplankton for counting frame counting according to claim 1, characterized in that: In step 2, the position coordinates of the scanned view are used as vertices and the connections between views are used as edges between vertices to construct an undirected complete graph of the scanned view. : , in, is the set of scan field coordinates, For the edges connecting different views, in the constructed undirected complete graph All coordinates in are connected; The greedy algorithm is used to determine the optimal scanning path, and the distance between any two fields of view is defined as the sum of the X-axis distance and the Y-axis distance: , The distances between all unscanned field of view coordinates and the current field of view coordinates are calculated, and the coordinate with the shortest distance is determined as the next scanning position. The optimal scanning path of the selected scanning method is calculated iteratively in sequence.
4. The method for rapid scanning microscopic high-definition imaging of phytoplankton for counting frame counting according to claim 1, characterized in that: In step 3, randomly select The counting frame is moved to the microscopic field of view to be focused.
5. The method for rapid scanning microscopic high-definition imaging of phytoplankton for counting frame counting according to claim 1, characterized in that: In step 4, the phytoplankton microscopic grayscale image is filtered by bilateral filtering. To perform noise reduction: , in, Center point The neighboring pixels of is a microscopic grayscale image of phytoplankton. If the adjacent point is , the standard deviation of the Gaussian kernel in the spatial domain is , the standard deviation of the Gaussian kernel on the pixel value domain is ,but is the weight function; , Extraction using Laplace operator The grayscale characteristics of phytoplankton are obtained by using the edge information of : 。 6. The method for rapid scanning microscopic high-definition imaging of phytoplankton for counting frame counting according to claim 1, characterized in that: In step 5, the phytoplankton microscopic image format is converted from RGB to HSV color space, and the color saturation S component feature is extracted as the color feature information of phytoplankton. The color saturation difference of phytoplankton microscopic images is characterized by variance: , , in, For point The saturation value at is the average saturation value, For point The difference between the saturation at that location and the average saturation of the entire image.
7. The method for rapid scanning microscopic high-definition imaging of phytoplankton for counting frame counting according to claim 1, characterized in that: In step 6, the grayscale gradient features and color features of the phytoplankton microscopic image are fused for focus evaluation: , In the formula, The midpoint of the phytoplankton microscopic image The grayscale features at The midpoint of the phytoplankton microscopic image The color characteristics of The midpoint of the phytoplankton microscopic image The saturation value at .
8. The method for rapid scanning microscopic high-definition imaging of phytoplankton for counting frame counting according to claim 1, characterized in that: In step 7, move the counting frame sample to the next microscopic field of view, and perform steps 4, 5, and 6 in sequence to record the horizontal position coordinates and vertical focus distance of each microscopic field of view. , thereby obtaining the focusing surface of the counting frame sample discrete values.
9. The method for rapid scanning microscopic high-definition imaging of phytoplankton for counting frame counting according to claim 1, characterized in that: In step 8, let the target point The minimum rectangle distances to the four vertices are , , , , first perform linear interpolation in the horizontal X direction: , , Then perform linear interpolation in the Y direction to get the focus distance of the target point: 。
Citation Information
Patent Citations
Fully-automatic fast focusing method used for large-field-of-view collection of microscopic digital image
CN109239900A
Equipment and method for automatically monitoring planktonic algae based on AI technology
CN111443028A
Brightness correction method and system for microscopic image, and computer equipment
CN112381896A
Microimaging scanning method and scanning system
CN113344958A
Microimaging detection equipment and method for microalgae in ballast water
CN115078231A