A particle cutout method and related apparatus

By performing integral projection, weighted normalization, and local peak labeling in cell sorting scenarios, the problem of low cell sorting efficiency in existing technologies is solved, achieving efficient and accurate single cell screenshots that can adapt to varying cell states and environmental noise.

CN121095267BActive Publication Date: 2026-04-14GUANGZHOU NAT LAB
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies suffer from redundant time and space overhead in cell sorting scenarios, and common segmentation schemes have limited generalization ability, making it difficult to adapt to application scenarios with varying cell types and states, resulting in low efficiency in capturing individual cells.

Method used

By acquiring the particle image to be processed, the field of view area is cropped from the particle image based on the preset selection range, and integral projection and weighted normalization are performed. Combined with smoothing processing and local peak marking, the particle position is determined and a screenshot is taken.

Benefits of technology

It achieves efficient, accurate and robust single-cell localization and screenshotting, significantly improving the efficiency of particle screenshotting, and can handle multi-cell and environmental noise interference with low computational resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121095267B_ABST
    Figure CN121095267B_ABST
Patent Text Reader

Abstract

The application discloses a particle screenshot method and related equipment, the method comprises the following steps: acquiring a particle image to be processed, and cutting a field of view region from the particle image based on a preset frame selection range; performing integral projection on the field of view region to obtain a one-dimensional sequence group; performing weighted standardization on the initial one-dimensional sequence based on the field of view size of the field of view region in the projection direction to obtain a weighted one-dimensional sequence; performing smoothing processing on the weighted one-dimensional sequence to obtain a smoothed one-dimensional sequence; performing local peak marking based on the smoothed one-dimensional sequence to obtain a local peak position; converting the local peak positions corresponding to two projection directions of the horizontal direction and the vertical direction to obtain a particle position; and cutting a particle screenshot of a target particle from the field of view region based on the particle position. By introducing the weighted standardization link based on the field of view size, and combining the bidirectional integral projection, sequence smoothing and local peak detection, the particle positioning and screenshot can be efficiently and accurately realized. The application can be widely applied in the field of image processing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a particle screenshot method and related equipment. Background Technology

[0002] Image preprocessing is a crucial step in cell sorting based on fluorescence images. Cell images acquired in different sorting scenarios are not the same, requiring targeted preprocessing schemes to obtain suitable images as input for subsequent classification algorithms.

[0003] In general, the images captured in this type of scene contain single cells or multiple cells in uncertain areas within the field of view. The original image features that the algorithm needs to extract include: (1) the field of view is smaller than the acquisition area and the background brightness of the field of view is uncertain; (2) cells may appear in any area within the field of view; (3) in most cases, there is only one cell (or particle) in the field of view, and occasionally multiple scattered cells or cell clusters may appear; (4) ideally, there is only one cell in the extracted image.

[0004] A known solution to the above problem is to use segmentation algorithms to locate and count cells, thereby determining whether an image contains only one cell and can be cropped based on its location. However, this approach is primarily suitable for statistical analysis of a specific cell type. For cell sorting, which does not require multiple cells, it incurs redundant time and space overhead. Furthermore, common segmentation schemes have limited generalization capabilities, are data-driven, or developed for specific scenarios, making them unsuitable for applications like cell sorting where cell types and states vary significantly. Summary of the Invention

[0005] The main objective of this application is to provide a particle screenshot method, apparatus, electronic device, and storage medium, which aims to solve at least one problem of the prior art.

[0006] To achieve the above objectives, one aspect of this application proposes a particle screenshot method, the method comprising:

[0007] Obtain the particle image to be processed, extract the field of view area from the particle image based on the preset selection range, and perform integral projection on the field of view area to obtain a one-dimensional sequence group.

[0008] The field of view includes the target particle to be captured, and the one-dimensional sequence group includes the initial one-dimensional sequence in the horizontal and vertical projection directions of the field of view.

[0009] The initial one-dimensional sequence is weighted and normalized based on the field size of the field of view in the projection direction to obtain a weighted one-dimensional sequence.

[0010] Smoothing the weighted one-dimensional sequence yields a smoothed one-dimensional sequence.

[0011] Local peak locations are obtained by marking local peaks based on smooth one-dimensional sequences;

[0012] The particle position is obtained by converting the local peak positions corresponding to the horizontal and vertical projection directions.

[0013] A particle screenshot of the target particle obtained from the field of view based on the particle's position.

[0014] In some embodiments, cropping a field of view from a particle image based on a preset selection area includes the following steps:

[0015] In response to a selection command for a target object, a preset selection area is obtained;

[0016] The field of view is obtained by cropping the particle image based on a preset selection area.

[0017] In some embodiments, integral projection of the field of view region is performed to obtain a one-dimensional sequence group, including the following steps:

[0018] The gray values ​​of the pixels in each column along the horizontal axis of the field of view are summed and projected to obtain an initial one-dimensional sequence along the horizontal axis.

[0019] The grayscale values ​​of the pixels in each row along the vertical axis of the field of view are summed and projected to obtain the initial one-dimensional sequence along the vertical axis.

[0020] In some embodiments, the sequence values ​​of the initial one-dimensional sequence correspond sequentially to the integral values ​​at each position along the projection direction; the initial one-dimensional sequence is weighted and normalized based on the field of view size along the projection direction to obtain a weighted one-dimensional sequence, including the following steps:

[0021] Based on the total number of pixels in each column along the horizontal axis of the field of view, the first weight of each position along the horizontal axis is obtained.

[0022] The first standardized value of each position in the horizontal axis direction is obtained by dividing the integral value of each position by the first weight of the corresponding position, and then the weighted one-dimensional sequence in the horizontal axis direction is obtained by summing them up along the horizontal axis direction.

[0023] Based on the total number of pixels in each row along the vertical axis of the field of view, the second weight of each position along the vertical axis is obtained.

[0024] By dividing the integral value at each position along the vertical axis by the second weight of the corresponding position, the second standardized value at each position along the vertical axis is obtained, and then the weighted one-dimensional sequence along the vertical axis is obtained.

[0025] In some embodiments, local peak marking is performed based on a smoothed one-dimensional sequence to obtain the local peak positions, including the following steps:

[0026] Based on preset screening conditions, local peak detection is performed on a smooth one-dimensional sequence to obtain the target peak.

[0027] The screening criteria include one or more combinations of minimum peak height, minimum inter-peak distance, and minimum peak width;

[0028] The location of the target peak along the projection direction in the smooth one-dimensional sequence is taken as the local peak location.

[0029] In some embodiments, when the number of local peak positions corresponding to both the horizontal and vertical projection directions is 1, the particle position is obtained by converting the local peak positions corresponding to the two projection directions, including the following steps:

[0030] Use the local peak position along the horizontal axis as the horizontal coordinate;

[0031] Use the local peak position along the vertical axis as the vertical coordinate;

[0032] The particle positions are constructed based on the x-coordinate and y-coordinate.

[0033] In some embodiments, when the number of local peak positions corresponding to any horizontal or vertical projection direction is not 1, the particle position is obtained by converting the local peak positions corresponding to the two horizontal and vertical projection directions, including the following steps:

[0034] When the number of local peak positions corresponding to any horizontal or vertical projection direction is 0, the output particle position is empty.

[0035] When the number of local peak positions corresponding to any horizontal or vertical projection direction is not 0, all local peak positions in the horizontal direction are summarized as the first peak positions to obtain the first peak position set.

[0036] The set of second peak positions is obtained by summing up all local peak positions in the vertical direction as second peak positions.

[0037] All first peak positions in the first peak position set are combined with all second peak positions in the second peak position set to form multiple non-repeating peak position pairs;

[0038] By pairing the first and second peak positions of each group of peak positions and using them as the x and y coordinates respectively, the candidate particle positions are constructed.

[0039] Traverse all candidate particle positions and obtain the maximum gray value of the particle image within the preset area range where the candidate particle position is located as the position gray value.

[0040] Based on the candidate particle positions corresponding to the gray values, the particle positions are obtained by filtering using preset conditions.

[0041] When the preset conditions include a preset number of particles and a preset grayscale value, the particle positions are obtained by filtering using the preset conditions, including the following steps:

[0042] All candidate particle positions are sorted in descending order of their position grayscale values. From the sorted results, the positions of candidate particles whose number does not exceed the preset number of particles and whose position grayscale values ​​are greater than or equal to the preset grayscale values ​​are selected as particle positions.

[0043] When the preset conditions only include a preset number of particles, the particle positions are obtained by filtering using the preset conditions, including the following steps:

[0044] All candidate particle positions are sorted in descending order of their position grayscale values. The position of the candidate particle with the largest grayscale value among the sorted results is then selected as the particle position.

[0045] When the preset conditions only include preset grayscale values, the particle positions are obtained by filtering using the preset conditions, including the following steps:

[0046] The positions of candidate particles whose gray values ​​are greater than or equal to a preset gray value are taken as the particle positions.

[0047] In some embodiments, capturing a particle screenshot of a target particle from a view area based on the particle's position includes the following steps:

[0048] The particle position is used as the center of the screenshot, and the screenshot range is determined by the preset image size;

[0049] Detect whether there are particles other than the target particle within the screenshot area of ​​the field of view;

[0050] When other particles are detected within the screenshot area, perform at least one of the following adjustment steps on the screenshot area:

[0051] Adjust the center position of the screenshot within the preset movement range until there are no other particles besides the target particle within the screenshot range;

[0052] The image size is gradually reduced based on a preset step size until there are no particles other than the target particle within the screenshot area;

[0053] Based on the adjusted screenshot range, a particle screenshot of the target particle is captured from the field of view.

[0054] To achieve the above objectives, another aspect of this application provides a particle screenshot device, the device comprising:

[0055] The integral projection module is used to acquire the particle image to be processed, extract the field of view area from the particle image based on the preset selection range, and perform integral projection on the field of view area to obtain a one-dimensional sequence group.

[0056] The field of view includes the target particle to be captured, and the one-dimensional sequence group includes the initial one-dimensional sequence in the horizontal and vertical projection directions of the field of view.

[0057] The weighted standardization module is used to weight and standardize the initial one-dimensional sequence based on the field size of the field of view in the projection direction to obtain a weighted one-dimensional sequence.

[0058] The smoothing module is used to smooth the weighted one-dimensional sequence to obtain a smoothed one-dimensional sequence;

[0059] The peak marking module is used to mark local peaks based on a smooth one-dimensional sequence to obtain the local peak positions.

[0060] The position conversion module is used to convert the local peak positions corresponding to the horizontal and vertical projection directions to obtain the particle positions;

[0061] The particle screenshot module is used to capture particle screenshots of target particles from the field of view based on the particle position.

[0062] To achieve the above objectives, another aspect of the embodiments of this application proposes an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned method.

[0063] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method.

[0064] To achieve the above objectives, another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method.

[0065] The embodiments of this application include at least the following beneficial effects: This application provides a particle screenshot method, apparatus, electronic device, storage medium, and program product. This solution acquires a particle image to be processed, extracts a field of view from the particle image based on a preset selection range, and performs integral projection on the field of view to obtain a one-dimensional sequence group. The field of view includes the target particle to be screenshotted, and the one-dimensional sequence group includes initial one-dimensional sequences in the horizontal and vertical projection directions of the field of view. The initial one-dimensional sequence is weighted and normalized based on the field of view size in the projection directions to obtain a weighted one-dimensional sequence. The weighted one-dimensional sequence is smoothed to obtain a smoothed one-dimensional sequence. Local peaks are marked based on the smoothed one-dimensional sequence to obtain local peak positions. Particle positions are obtained by converting the local peak positions corresponding to the horizontal and vertical projection directions. A particle screenshot of the target particle is then extracted from the field of view based on the particle positions. This application, by introducing a weighted normalization step based on the field of view size and combining bidirectional integral projection, sequence smoothing, and local peak detection, provides an efficient, accurate, robust, and automated particle localization and screenshot method. This method addresses the problems of general particle screenshotting methods in a series of single-particle screenshotting scenarios, such as cell sorting. While ensuring the accuracy and reliability of particle screenshotting, it achieves relatively accurate determination of the position of individual cells and cell screenshotting in a large field of view, significantly improving the efficiency of particle screenshotting. It can also effectively handle the impact of multiple cells on analysis and a certain degree of environmental noise interference, while having the advantage of low computational resource consumption. Attached Figure Description

[0066] Figure 1 This is a schematic diagram of an implementation environment for the particle screenshot method provided in this application embodiment;

[0067] Figure 2 This is a schematic flowchart of a particle screenshot method provided in an embodiment of this application;

[0068] Figure 3 This is a schematic diagram of the original image and the principle of integral projection provided in the embodiments of this application;

[0069] Figure 4 This is a schematic diagram illustrating an example of chart data with weighted standardization, smoothing, and local peak marking provided in an embodiment of this application;

[0070] Figure 5 This is a schematic diagram illustrating a two-cell case example provided in the embodiments of this application;

[0071] Figure 6 This is a schematic diagram illustrating the application process of the particle screenshot method provided in the embodiments of this application;

[0072] Figure 7 This is a schematic diagram illustrating a partial screenshot result example of Example 1 provided in the embodiments of this application;

[0073] Figure 8 This is a schematic diagram of a partial screenshot result example of Comparative Example 1 provided in the embodiments of this application;

[0074] Figure 9 This is a schematic diagram of a partial screenshot result example of Comparative Example 2 provided in the embodiments of this application;

[0075] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0076] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0077] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”

[0078] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0079] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0080] In related technologies, segmentation algorithms locate and count cells to determine whether an image contains only one cell and can be cropped based on the cell's location. This is mainly suitable for statistical analysis of cells of a specific cell type. For cell sorting, which does not require multiple cells, there is redundant time and space overhead. At the same time, common segmentation schemes have limited generalization ability, are data-driven or developed for specific scenarios, and are not suitable for application scenarios such as cell sorting where cell types and states vary.

[0081] In view of this, this application provides a particle screenshot method. This method acquires a particle image to be processed, extracts a field of view from the particle image based on a preset selection range, and performs integral projection on the field of view to obtain a one-dimensional sequence group. The field of view includes the target particle to be screenshotted, and the one-dimensional sequence group includes initial one-dimensional sequences in the horizontal and vertical projection directions of the field of view. The initial one-dimensional sequences are weighted and normalized based on the field of view size in the projection directions to obtain a weighted one-dimensional sequence. The weighted one-dimensional sequence is then smoothed to obtain a smoothed one-dimensional sequence. Local peaks are marked based on the smoothed one-dimensional sequence to obtain local peak positions. Particle positions are obtained by converting the local peak positions corresponding to the horizontal and vertical projection directions. A particle screenshot of the target particle is then extracted from the field of view based on the particle positions. This application, by introducing a weighted normalization step based on the field of view size and combining bidirectional integral projection, sequence smoothing, and local peak detection, provides an efficient, accurate, robust, and automated particle localization and screenshot method. This method addresses the problems of general particle screenshotting methods in a series of single-particle screenshotting scenarios, such as cell sorting. While ensuring the accuracy and reliability of particle screenshotting, it achieves relatively accurate determination of the position of individual cells and cell screenshotting in a large field of view, significantly improving the efficiency of particle screenshotting. It can also effectively handle the impact of multiple cells on analysis and a certain degree of environmental noise interference, while having the advantage of low computational resource consumption.

[0082] It is understood that the particle screenshot method provided in this application can be applied to any computer device with data processing and computing capabilities, and this computer device can be various terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal can be a smartphone, tablet, laptop, desktop computer, development board, etc., but is not limited to these.

[0083] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided in an embodiment of this application. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.

[0084] Server 101 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0085] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.

[0086] Terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the application does not impose any limitations.

[0087] For example, based on Figure 1 The implementation environment shown in this application embodiment provides a particle screenshot method. The following description uses the application of this particle screenshot method in server 101 as an example. It can be understood that this particle screenshot method can also be applied in terminal 102.

[0088] Reference Figure 2 , Figure 2 This is an optional flowchart of the particle screenshot method provided in the embodiments of this application. The execution subject of the particle screenshot method can be any of the aforementioned computer devices (including servers or terminals). Figure 2 The method may include, but is not limited to, steps S100 to S600.

[0089] Step S100: Obtain the particle image to be processed, extract the field of view area from the particle image based on the preset selection range, and perform integral projection on the field of view area to obtain a one-dimensional sequence group.

[0090] The field of view includes the target particles to be captured, and the one-dimensional sequence group includes the initial one-dimensional sequence in the horizontal and vertical projection directions of the field of view. Specifically, the particle image includes a solid-color background and pre-labeled (e.g., fluorescently labeled) target particles. It is understood that the embodiments of this application can be applied to various types of particle screenshots, such as cell sorting, particle sorting, and single-cell screenshots of images in micropores. Specifically, the following examples of this application, using cell sorting with target particles as cells, will be used to illustrate the embodiments.

[0091] It should be noted that, in some embodiments, cropping the field of view from the particle image based on a preset selection range may include the following steps: obtaining a preset selection range in response to a selection command for the target object; and cropping the field of view from the particle image based on the preset selection range.

[0092] In some specific implementations, such as Figure 3 As shown, firstly, the field of view (POV) is obtained from the acquired cell image (i.e., the original image). The PVO can be circular or semi-circular (or other shapes, preferably semi-circular). The PVO is pre-defined by the user, and the requirement is that the internal grayscale is basically uniform when there are no target cells, and the grayscale variation should ideally not exceed 20% of the grayscale variation caused by the target cells to be observed. The specific proportion can be adjusted according to actual needs. It is understandable that this process chooses a semi-circular region because the imaging area of ​​general observation systems is often circular, and a semi-circle is one application scenario for the algorithm.

[0093] It should also be noted that in some embodiments, performing integral projection on the field of view to obtain a one-dimensional sequence group may include the following steps: summing the gray values ​​of the pixels in each column along the horizontal axis of the field of view and projecting them to obtain an initial one-dimensional sequence in the horizontal axis direction; summing the gray values ​​of the pixels in each row along the vertical axis of the field of view and projecting them to obtain an initial one-dimensional sequence in the vertical axis direction.

[0094] For example, in some specific embodiments, a semi-circular field of view is taken as an example, such as... Figure 3 The semicircle shown is implemented by preserving the grayscale values ​​of pixels inside the semicircle and setting the grayscale values ​​of pixels outside the semicircle to 0. Specifically, Figure 3 In the image labeled A, the original image from which cells need to be extracted is shown. In image B, the solid arrows represent the direction in which cells flow into the field of view, and the dashed semicircle represents the field of view. The size of the field of view determines the area where cells might fall. In actual calculations, the distribution of pixels that needs to be considered is generally a semicircle. A bright spot perpendicular to the direction of the arrow indicates a cell passing through this location, triggering a signal. The cell size determines the crop size, i.e., the size of the final image.

[0095] Optionally, only the portion of the image within the view area can be processed initially, without using the full image size for calculation, to improve efficiency. Then, as... Figure 3 As shown, integral projection is performed on the short and long sides of the field of view (where, when the field of view is a semicircle, these correspond to the short and long axes of the semicircle, respectively). This involves summing the gray values ​​of each pixel along the projection direction to project the two-dimensional image into a one-dimensional sequence. In the case of a circular projection, the long and short sides are the diameters of the circle along the horizontal axis.

[0096] Step S200: The initial one-dimensional sequence is weighted and normalized based on the field size of the field of view in the projection direction to obtain a weighted one-dimensional sequence.

[0097] It should be noted that the sequence values ​​of the initial one-dimensional sequence correspond sequentially to the integral values ​​at each position in the projection direction; in some embodiments, step S200 may include the following steps: based on the total number of pixels in each column along the horizontal axis of the field of view, a first weight is obtained for each position in the horizontal axis; by dividing the integral value of each position in the horizontal axis by the first weight of the corresponding position, a first standardized value is obtained for each position in the horizontal axis, and then the weighted one-dimensional sequence in the horizontal axis is obtained by summing along the horizontal axis; based on the total number of pixels in each row along the vertical axis of the field of view, a second weight is obtained for each position in the vertical axis; by dividing the integral value of each position in the vertical axis by the second weight of the corresponding position, a second standardized value is obtained for each position in the vertical axis, and then the weighted one-dimensional sequence in the vertical axis is obtained by summing along the vertical axis.

[0098] For example, in some specific implementations, weighted normalization can be implemented as follows: due to background noise, cell positions in a one-dimensional sequence are not prominent. Weighted normalization is used to process the sequence so that the cell positions have prominent mean values. The implementation logic is to pre-generate a weight for each position in the sequence based on the field of view size, and divide the sequence from the original image by the corresponding weight to obtain the normalized value for that position. Optionally, the weight for that position is the number of pixels within the field of view, such as... Figure 4 As shown, Figure 4 As shown in the charts corresponding to labels C and D, the weighted standardized sequence is represented by the dark curves in the charts corresponding to labels E and F.

[0099] Step S300: Smooth the weighted one-dimensional sequence to obtain a smoothed one-dimensional sequence;

[0100] Gaussian smoothing can be used for smoothing.

[0101] For example, in some specific implementations, smoothing processing: such as Figure 4As shown, the dark curves in the graphs corresponding to labels E and F highlight the cell locations, but the curves are not smooth, interfering with the identification of local peaks. Therefore, this application chooses to smooth the sequence curves before calculating local peaks. Optionally, Gaussian smoothing can be used, with the smoothing parameters chosen to ensure that desired peaks and noise do not disappear. Figure 4 The light-colored curves in the charts corresponding to labels E and F are examples of curves after Gaussian smoothing.

[0102] Step S400: Local peak marking is performed based on the smoothed one-dimensional sequence to obtain the local peak positions;

[0103] It should be noted that in some embodiments, step S400 may include the following steps: based on preset screening conditions, perform local peak detection on the smooth one-dimensional sequence to obtain the target peak; wherein, the screening conditions include one or more combinations of the lowest peak height, the minimum inter-peak distance and the minimum peak width; and take the position point of the target peak along the projection direction in the smooth one-dimensional sequence as the local peak position.

[0104] For example, in some specific implementations, local peak markers are used: such as Figure 4 As shown, Figure 4 The "|" marker in the light-colored curves of the graphs corresponding to labels E and F indicates the detected local peaks. Observation of actual data reveals that in most images, these peaks are located within cells, and their location can be used to describe cell position. When there is exactly one local peak on both the short and long sides, the image contains only one cell (or a cluster of cells), and the data is valid. Optionally, based on local peak detection, valid peaks can be filtered using multiple conditions (such as peak height, inter-peak distance, peak width, etc.), for example, by using the `scipy.signal.find_peaks` method to implement local peak detection.

[0105] Step S500: Based on the local peak positions corresponding to the horizontal and vertical projection directions, the particle positions are converted to obtain the particle positions.

[0106] It should be noted that in some embodiments, when the number of local peak positions corresponding to both the horizontal and vertical projection directions is 1, step S500 may include the following steps: taking the local peak position in the horizontal axis direction as the horizontal coordinate; taking the local peak position in the vertical axis direction as the vertical coordinate; and constructing the particle position based on the horizontal and vertical coordinates.

[0107] For example, in some specific implementations, when the number of local peak positions corresponding to both the horizontal and vertical projection directions is 1, the unique local peak positions on the short side and the long side are used as the two dimensions of the cell position, with the unit being pixels.

[0108] It should also be noted that in some embodiments, when the number of local peak positions corresponding to any horizontal or vertical projection direction is not 1, step S500 may include the following steps: when the number of local peak positions corresponding to any horizontal or vertical projection direction is 0, the output particle position is empty; when the number of local peak positions corresponding to any horizontal or vertical projection direction is not 0, all local peak positions in the horizontal direction are summarized as first peak positions to obtain a first peak position set; all local peak positions in the vertical direction are summarized as second peak positions to obtain a second peak position set; all first peak positions in the first peak position set and all second peak positions in the second peak position set are arranged and combined to form multiple non-repeating peak position pairs; the first peak position and the second peak position of each pair of peak positions are used as the horizontal and vertical coordinates respectively to construct candidate particle positions; all candidate particle positions are traversed to obtain the maximum gray value of the particle image in the preset area range where the candidate particle position is located. As the position grayscale value; based on the candidate particle positions corresponding to the position grayscale value, the particle positions are obtained by filtering using preset conditions; when the preset conditions include a preset number of particles and a preset grayscale value, the particle positions are obtained by filtering using the preset conditions, including the following steps: sorting all candidate particle positions in descending order of position grayscale value, and selecting the candidate particle positions whose number does not exceed the preset number of particles and whose position grayscale value is greater than or equal to the preset grayscale value as the particle positions; when the preset conditions only include a preset number of particles, the particle positions are obtained by filtering using the preset conditions, including the following steps: sorting all candidate particle positions in descending order of position grayscale value, and selecting the candidate particle position with the largest preset number of position grayscale values ​​as the particle positions; when the preset conditions only include a preset grayscale value, the particle positions are obtained by filtering using the preset conditions, including the following steps: selecting the candidate particle positions whose position grayscale value is greater than or equal to the preset grayscale value as the particle positions.

[0109] Specifically, for example, the two candidate particle positions with the largest gray values ​​(i.e., the preset number of particles, which can be adjusted according to actual needs) can be directly selected as particle positions. In addition, some preferred implementations can also combine the preset gray value threshold for comprehensive judgment. For example, if only one of the two selected position gray values ​​is greater than the preset gray value threshold, then only one particle position is determined, and the other one that does not meet the preset gray value threshold is directly discarded.

[0110] For example, in some specific embodiments, this application may accept more than one type of cell when calculating cell location using local peak markers. If multiple cells are meaningful in practical applications, it can be done as follows: Figure 5(Including three sets of examples, from left to right, the number of local peak positions corresponding to the horizontal and vertical projection directions are [2,2], [1,2], [2,1]) As shown, multiple cell positions are calculated. Figure 5 The calculation logic is demonstrated using two cells as an example. When both a preset number of particles and a preset grayscale value exist, all candidate particle positions are sorted according to their positional grayscale values, and candidate particle positions that simultaneously meet the following two conditions are selected:

[0111] a) The grayscale value at the location is greater than or equal to the preset grayscale value;

[0112] b) The number of particles selected in descending order shall not exceed the preset number of particles;

[0113] When only a preset grayscale value exists, filter out all candidate particle positions whose position grayscale value is greater than or equal to the preset grayscale value;

[0114] When there is only a preset number of particles, all candidate particle positions are sorted according to their gray values, and the top N candidate particle positions are selected, where N is equal to the preset number of particles.

[0115] The positions of the candidate particles obtained from the final screening are converted into particle position outputs.

[0116] It should also be noted that when the number of local peak positions corresponding to the horizontal or vertical projection direction is 0, there is no need to calculate the particle positions or screenshots.

[0117] Step S600: Capture a particle screenshot of the target particle from the field of view based on the particle position;

[0118] It should be noted that in some embodiments, step S600 may include the following steps: using the particle position as the center position of the screenshot, and determining the screenshot range by a preset image size; detecting whether there are other particles besides the target particle within the screenshot range in the field of view; when other particles are detected within the screenshot range, performing at least one of the following adjustment steps on the screenshot range: adjusting the center position of the screenshot within a preset movement range until there are no other particles besides the target particle within the screenshot range; gradually reducing the image size based on a preset step size until there are no other particles besides the target particle within the screenshot range; and capturing a particle screenshot of the target particle from the field of view based on the adjusted screenshot range.

[0119] When the number of particle positions is not 1, the nearest distance is defined as the distance between the two closest target particles among all target particles. In addition, the screenshot size or the center position of the screenshot can be adjusted according to the distance between cells to ensure that each small screenshot contains exactly one cell.

[0120] In some specific application scenarios, obtaining a particle screenshot of the target particle from the field of view based on the particle's position can include the following steps:

[0121] Use the particle position as the center of the screenshot, and determine the screenshot range by setting the image size;

[0122] Detect whether there are other particles interfering within the screenshot area;

[0123] When interference is detected (e.g., on the line connecting two particle centers, the distance from one particle center to the edge of the screenshot rectangle is greater than its distance to the other particle center), perform at least one of the following adjustment steps:

[0124] a) Adjust the center position of the screenshot within the preset movement range to minimize interference from other particles within the adjusted screenshot range;

[0125] b) Gradually reduce the image size by a preset step size until there are no other particles interfering within the screenshot area or the minimum size threshold is reached;

[0126] Based on the final determined screenshot center and image size, a particle screenshot of the target particle is captured from the field of view.

[0127] Preferably, the preset movement range does not exceed 1 / 2 of the distance between adjacent particles.

[0128] Preferably, the image size is reduced in increments of 5%-10% of the original size.

[0129] Preferably, the minimum size threshold is the smallest rectangular region that can completely contain the target particle.

[0130] For example, in some specific implementations, a square image can be cropped from the cell location as the center, with the top, bottom, left, and right halves of the image size as corner points, and this becomes the result. The image aspect ratio remains consistent with the original image. Generally, the cropping size is determined by the characteristics of the observed sample. By pre-calculating the range of pixels occupied by effective observation information (such as cells), a side length slightly larger than this range is selected as the cropping side length. Optionally, a square cropping is not necessarily used; the cropping shape is selected according to the needs of subsequent algorithm processes.

[0131] To explain in detail the principle of the technical solution of the present invention, the overall process of the present invention will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and should not be regarded as a limitation of the present invention.

[0132] First, it's important to note that existing cell sorting schemes typically use segmentation algorithms to locate and count cells, then determine if an image contains only one cell and can be cropped based on its location. However, these schemes are primarily suitable for statistical analysis of cells of a specific type. For cell sorting, which doesn't require multiple cells, they incur redundant time and space overhead. Furthermore, common segmentation schemes have limited generalization capabilities, being data-driven or applicable to specific scenarios. Currently, there is a lack of targeted solutions that can accurately and efficiently extract images of single cells from raw images captured in such scenarios.

[0133] Furthermore, the scenarios described above require downstream processing of single cells, but the captured cells are not all single cells. Besides single-cell sorting, scenarios such as microporous single-cell cloning based on cell concentration also require this type of image preprocessing solution.

[0134] Understandably, there is currently a lack of specific single-cell image capture algorithms to process images acquired by cell sorting devices based on fluorescence imaging (image characteristics are described in the background section). The technical problems to be solved can be summarized as follows:

[0135] 1. Capture single-cell images quickly at the millisecond level;

[0136] 2. Preliminary differentiation between single-cell and multi-celled organisms;

[0137] 3. Real-time capture and asynchronous saving make it suitable for integration with fluorescence image-based cell sorting devices.

[0138] In view of this, this application provides a particle screenshot method, such as... Figure 6 As shown, the core algorithm of this application embodiment includes: integral projection, weighted normalization, smoothing, local peak labeling, cell location calculation, and truncation. Figure 6 The algorithm consists of several parts. The hyperparameters required for its implementation include the field of view size and the cell size range.

[0139] (1) Integral projection: Obtaining the field of view from the acquired cell images, such as Figure 3 The semicircle shown is implemented by preserving the grayscale values ​​of pixels within the semicircle and setting the grayscale values ​​of pixels outside the semicircle to 0. Optionally, only the portion of the image within the view area can be processed initially, without using the full image size for calculation, to improve efficiency. Then, as... Figure 3 As shown, integral projection is performed on the short and long sides of the field of view, that is, the gray value of each pixel in the projection direction is summed, and the two-dimensional image is projected into a one-dimensional sequence.

[0140] (2) Weighted Standardization: Due to background noise, cell positions in a one-dimensional sequence are not prominent. Weighted standardization is used to process the sequence, resulting in more prominent mean values ​​at cell positions. The implementation logic is to pre-generate weights for each position in the sequence based on the field of view size, and then divide the sequence from the original image by the corresponding weights to obtain the standardized value for that position. Optionally, the weight for that position is the number of pixels within the field of view, such as... Figure 4 The graphs labeled C and D are shown. The weighted, standardized series is represented by the dark curves in the graphs labeled E and F.

[0141] (3) Smoothing: such as Figure 4 As shown, the dark curves in graphs E and F highlight cell locations, but the curves are not smooth, interfering with the identification of local peaks. Therefore, this application chooses to smooth the sequence curves before calculating local peaks. Optionally, Gaussian smoothing is used, with the smoothing parameters chosen to ensure that desired peaks and noise are not eliminated. The light curves in graphs E and F are examples of the Gaussian smoothed curves.

[0142] (4) Local peak marking: such as Figure 4 As shown in the graphs labeled E and F, the "|" marker at the top of the light-colored curve peaks indicates the detected local peaks. Observation of actual data reveals that in most images, these peaks are located within cells, and their location can be used to describe cell position. When there is exactly one local peak on both the short and long sides, the image contains only one cell (or a cluster of cells), and the data is valid. Optionally, based on local peak detection, valid peaks can be filtered using multiple conditions (such as peak height, inter-peak distance, peak width, etc.), for example, by using the `scipy.signal.find_peaks` method to implement local peak detection.

[0143] (5) Calculate cell position: In this application, the unique local peak positions of the short side and the long side are used as the two dimensions of cell position, and the unit is pixels.

[0144] (6) Screenshot: Using the cell location as the center, and taking half the image size on the top, bottom, left, and right as corner points, capture a square image as the result. The image ratio should be consistent with the original image. Generally, the screenshot size is determined by the characteristics of the observed sample. By pre-statistically calculating the range of pixels occupied by effective observation information (such as cells), a side length slightly larger than this range is selected as the screenshot side length. Optionally, a square screenshot is not necessarily used; the screenshot shape should be selected according to the needs of subsequent algorithm processes.

[0145] The captured image is stored in grayscale in memory. It first enters an optional process, which includes, but is not limited to, operations such as optimizing cell image quality, cell classification, and cell segmentation. For cell sorting applications, after classifying cells, cell images are saved to external storage according to category. Simultaneously, the device is controlled to sort cells, entering a waiting state for the next trigger. The image saving process and the cell sorting control process are independent to ensure sorting efficiency.

[0146] This application is not limited to cell sorting scenarios, but can be used for other scenarios with similar features to the original image in the background, including but not limited to particle sorting and single-cell screenshots of images in micropores.

[0147] The implementation of this application is not limited to using software control or embedded implementation. Because it follows a traditional algorithm process with low computational complexity, embedded implementation is supported. If conditions permit, embedded implementation is recommended to achieve high computational efficiency.

[0148] Optionally, this application may accept more than one type of cell when calculating cell location using local peak markers. If multiple cells are meaningful in practical applications, it can be used as follows: Figure 5 (Including three sets of examples, from left to right, the number of local peak positions corresponding to the horizontal and vertical projection directions are [2,2], [1,2], [2,1]) As shown, multiple cell positions are calculated. Figure 5 The calculation logic is demonstrated using a two-cell example. In the case of two discrete cells, the number of peaks on the short and long sides can vary. Multiple center points are calculated; only two center points represent the two cell positions. If more than two center points are used, the two largest are selected as the cell positions. Furthermore, the distance between the two positions can be relaxed based on the screenshot size to ensure that each screenshot contains exactly one cell. Specifically, this can be implemented as follows:

[0149] Use the particle position as the center of the screenshot, and determine the screenshot range by setting the image size;

[0150] Detect whether there are other particles interfering within the screenshot area;

[0151] When interference is detected (e.g., on the line connecting two particle centers, the distance from one particle center to the edge of the screenshot rectangle is greater than its distance to the other particle center), perform at least one of the following adjustment steps:

[0152] a) Adjust the center position of the screenshot within the preset movement range to minimize interference from other particles within the adjusted screenshot range;

[0153] b) Gradually reduce the image size by a preset step size until there are no other particles interfering within the screenshot area or the minimum size threshold is reached;

[0154] Based on the final determined screenshot center and image size, a particle screenshot of the target particle is captured from the field of view.

[0155] Preferably, the preset movement range does not exceed 1 / 2 of the distance between adjacent particles.

[0156] Preferably, the image size is reduced in increments of 5%-10% of the original size.

[0157] Preferably, the minimum size threshold is the smallest rectangular region that can completely contain the target particle.

[0158] In some specific application scenarios, the method of this application embodiment can be implemented as follows:

[0159] Example 1: This application can be applied to the image processing stage of cell sorting based on fluorescence images:

[0160] Take approximately 1000 original images and use Python to write the above algorithm to process the images, extract cells from the original images, and save them. Smoothing is performed using the `scipy.ndimage.gaussian_filter1d` method, and local peak detection is performed using the `scipy.signal.find_peaks` method. Figure 7 The image shown is a partial screenshot of Example 1.

[0161] Example 2: This application can be applied to the image processing stage (real-time) of cell sorting based on fluorescence images:

[0162] 1. Cell Preparation: Adherent HeLa cells at 80% density were cultured in 6cm culture dishes. After certain biological treatments, cells with intranuclear and extranuclear fluorescence were obtained separately. After trypsin digestion and centrifugation, 6ml of cell suspension was obtained. The suspension was filtered through a 30μm filter, and the supernatant was collected after brief settling. This supernatant was mixed with a density regulator to prevent cell settling for an extended period, serving as the experimental cell suspension. The intranuclear and extranuclear fluorescent cells were then mixed to obtain a cell suspension with an intranuclear to extranuclear ratio of approximately 1:9.

[0163] 2. Flow channel preparation: A flow channel structure made of PDMS-glass bonding was selected for the experiment. The flow channel structure is as follows: Figure 1 As shown, the flow channel layer and valve layer are fabricated and bonded together with the flow channel on top and the valve on the bottom. The valve diaphragm thickness is approximately 10 μm. The black area of ​​the flow channel is 30-40 μm high, the dark green area is 18-25 μm high, and the valve height is 15-30 μm.

[0164] 3. Pump: Use a pneumatic pump with a sample flow (cell suspension) pressure of approximately 20-100 mbar to pump the cell suspension into the chip through the inlet; the buffer solution pressure should be approximately 100-200 mbar. Keep the pump running at a relatively constant pressure throughout the sorting process.

[0165] 4. Detection device: PMT is used to detect the fluorescence signal generated by laser excitation. The laser wavelength is about 488nm and the fluorescence wavelength is about 510-530nm.

[0166] 5. Observation Apparatus: A 40x microscope lens is used for observation, employing a blue LED light source of approximately 488nm. Multiple optical components guide the images to the fluorescence camera. The fluorescence camera's exposure time is approximately 20ms. Once the detection device detects the arrival of cells, all valves close, triggering the fluorescence camera to take a picture (original image size 2048x2048 pixels).

[0167] 6. The equipment operates according to the sorting process described above. The original image obtained by the fluorescence camera is first processed by the algorithm of this application to extract single-cell images before entering the subsequent process to determine the cell category (field of view, a semicircle with a radius of 780 pixels from the center of the image, with a crop size of 400x400 pixels). A binary classification CNN model is used to determine whether it is an intranuclear cell. Intranuclear cells are exported through well C2, and cells that are not intranuclear (or have both intranuclear and intranuclear components) are exported through well C3. After sorting 100-200 intranuclear cells, the sorting ends and a comparison is taken of the sorted cells and the cells before sorting.

[0168] In some specific application scenarios, in order to demonstrate the processing effect of the embodiments of this application, the following comparative examples are also provided for comparison and explanation:

[0169] Comparative Example 1: Maximum value of the entire image:

[0170] Using the data from Example 1 above, the maximum value within the field of view is directly calculated to extract and save the cell location. For example... Figure 8 The image shown is a partial screenshot example of Comparative Example 1.

[0171] Comparison 2: The impact of not performing weighted standardization:

[0172] Using the data from Example 1 above, but skipping the weighted normalization process, we directly use the integral projection results to label local peaks, extract cells, and save the results. For example... Figure 9 The image shown is a partial screenshot example of Comparative Example 2.

[0173] like Figure 7As shown, under ideal conditions, the results of Example 1 show that cells were successfully captured, with only cells and clusters of connected cells present, and virtually no scattered cells. The captured area is also quite accurate, with very few incomplete cells. The capture time (from importing the image into memory to retrieving the thumbnail in memory) is approximately 2ms.

[0174] Ideally, the screenshot effect of Example 2 is not much different from that of Example 1, and the sorting accuracy is about 90%.

[0175] like Figure 8 As shown in Comparative Example 1, ideally, the algorithm captures normal cells in most cases. However, the maximum value cannot determine the number of cells in the field of view. For sorting applications, having more than one cell in the field of view is undesirable, and this screenshot cannot provide this information, making it unsuitable for independent sorting scenarios. Therefore, it is necessary to control parameters such as peak width to capture cell location and number information.

[0176] like Figure 9 As shown, in an ideal scenario, Comparative Example 2 struggles to capture local minima due to the lack of standardization and significant background noise. This makes it difficult to determine suitable parameters for capturing local minima, ultimately leading to screenshot failure.

[0177] Therefore, this application can perform a good cell screenshot function, especially suitable for scenarios with a mixture of different cell numbers but only a single cell is needed. The ablation experiment in Comparative Example 2 also reflects the importance of using weighted normalization in this application.

[0178] In summary, this application designs an algorithm processing flow for a specific scenario, extracts single-cell images, uses integral projection to convert two-dimensional images into one-dimensional images for high-speed processing, and employs weighted normalization combined with local peaking to reduce the influence of background noise while rapidly capturing cell positions. This application can accurately determine the position of a single cell and extract cells in a large field of view. Although designed for a specific scenario, theoretically this application is applicable to a series of scenarios similar to the above (as described in the foregoing embodiments, and will not be repeated here), quickly capturing single fluorescent cells in a large field of view. The technical solution of this application only requires determining the field of view, cell (sample) size, and other conditions. The algorithm logic is simple, and each part has relatively mature function methods available, making it easy to implement and readily embeddable into various systems for application.

[0179] This application embodiment also provides a particle screenshot device that can implement the above method. The device includes:

[0180] The integral projection module is used to acquire the particle image to be processed, extract the field of view area from the particle image based on the preset selection range, and perform integral projection on the field of view area to obtain a one-dimensional sequence group.

[0181] The field of view includes the target particle to be captured, and the one-dimensional sequence group includes the initial one-dimensional sequence in the horizontal and vertical projection directions of the field of view.

[0182] The weighted standardization module is used to weight and standardize the initial one-dimensional sequence based on the field size of the field of view in the projection direction to obtain a weighted one-dimensional sequence.

[0183] The smoothing module is used to smooth the weighted one-dimensional sequence to obtain a smoothed one-dimensional sequence;

[0184] The peak marking module is used to mark local peaks based on a smooth one-dimensional sequence to obtain the local peak positions.

[0185] The position conversion module is used to convert the local peak positions corresponding to the horizontal and vertical projection directions to obtain the particle positions;

[0186] The particle screenshot module is used to capture particle screenshots of target particles from the field of view based on the particle position.

[0187] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0188] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0189] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0190] like Figure 10 As shown, Figure 10 The hardware structure of an electronic device 1000 according to another embodiment is illustrated. The electronic device 1000 includes:

[0191] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (aSIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

[0192] The memory 1002 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RaM). The memory 1002 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001.

[0193] Input / output interface 1003 is used to implement information input and output;

[0194] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0195] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);

[0196] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0197] The electronic device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0198] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0199] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0200] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0201] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0202] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0203] The particle screenshotting method, apparatus, electronic device, storage medium, and program product provided in this application acquire a particle image to be processed, extracts a field of view from the particle image based on a preset selection range, and performs integral projection on the field of view to obtain a one-dimensional sequence group. The field of view includes the target particle to be screenshotted, and the one-dimensional sequence group includes initial one-dimensional sequences in the horizontal and vertical projection directions of the field of view. The initial one-dimensional sequences are weighted and normalized based on the field of view size in the projection directions to obtain a weighted one-dimensional sequence. The weighted one-dimensional sequence is smoothed to obtain a smoothed one-dimensional sequence. Local peaks are marked based on the smoothed one-dimensional sequence to obtain local peak positions. Particle positions are obtained by converting the local peak positions corresponding to the horizontal and vertical projection directions. A particle screenshot of the target particle is then extracted from the field of view based on the particle positions. This application provides an efficient, accurate, robust, and automated particle localization and screenshotting method by introducing a weighted normalization step based on the field of view size and combining bidirectional integral projection, sequence smoothing, and local peak detection. This method can effectively overcome the challenges posed by changes in field of view size, image noise, complex backgrounds, and weak contrast, significantly improving the accuracy, efficiency, and reliability of particle screenshots, laying a solid foundation for particle analysis, while also having the advantage of low computational resource consumption.

[0204] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0205] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0206] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0207] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0208] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0209] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0210] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0211] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0212] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0213] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0214] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A particle screenshot method, characterized in that, The method includes the following steps: A particle image to be processed is acquired, a field of view is extracted from the particle image based on a preset selection range, and an integral projection is performed on the field of view to obtain a one-dimensional sequence group. The field of view includes the target particle to be captured, and the one-dimensional sequence group includes the initial one-dimensional sequence of the field of view in two projection directions, horizontal and vertical. The initial one-dimensional sequence is weighted and normalized based on the field size of the field of view in the projection direction to obtain a weighted one-dimensional sequence. The weighted one-dimensional sequence is smoothed to obtain a smoothed one-dimensional sequence; Local peak positions are obtained by marking local peaks based on the smoothed one-dimensional sequence; The particle position is obtained by converting the local peak positions corresponding to the two projection directions (horizontal and vertical). A particle screenshot of the target particle is obtained from the field of view based on the particle's position; The sequence values ​​of the initial one-dimensional sequence correspond sequentially to the integral values ​​at each position along the projection direction. The weighted normalization of the initial one-dimensional sequence based on the field of view size along the projection direction to obtain a weighted one-dimensional sequence includes the following steps: Based on the total number of pixels in each column along the horizontal axis of the field of view, the first weight of each position along the horizontal axis is obtained. The first standardized value of each position in the horizontal axis direction is obtained by dividing the integral value of each position by the first weight of the corresponding position, and then the weighted one-dimensional sequence in the horizontal axis direction is obtained by summing along the horizontal axis direction. Based on the total number of pixels in each row along the vertical axis of the field of view, a second weight is obtained for each position along the vertical axis. The second standardized value for each position along the vertical axis is obtained by dividing the integral value at each position by the second weight at the corresponding position, and then the weighted one-dimensional sequence along the vertical axis is obtained by summing the values.

2. The method according to claim 1, characterized in that, The step of cropping the field of view from the particle image based on a preset selection range includes the following steps: In response to a selection command for a target object, the preset selection range is obtained; The field of view is obtained by cropping the particle image based on the preset selection range.

3. The method according to claim 1, characterized in that, The step of performing integral projection on the field of view to obtain a one-dimensional sequence group includes the following steps: The grayscale values ​​of the pixels in each column along the horizontal axis of the field of view are summed and projected to obtain the initial one-dimensional sequence along the horizontal axis. The grayscale values ​​of the pixels in each row along the vertical axis of the field of view are summed and projected to obtain the initial one-dimensional sequence along the vertical axis.

4. The method according to claim 1, characterized in that, The process of marking local peaks based on the smoothed one-dimensional sequence to obtain local peak positions includes the following steps: Based on preset screening conditions, local peak detection is performed on the smooth one-dimensional sequence to obtain the target peak. The screening criteria include one or more combinations of minimum peak height, minimum inter-peak distance, and minimum peak width; The position of the target peak along the projection direction in the smooth one-dimensional sequence is taken as the local peak position.

5. The method according to claim 1, characterized in that, When the number of local peak positions corresponding to both the horizontal and vertical projection directions is 1, the process of converting the local peak positions corresponding to the two horizontal and vertical projection directions to obtain the particle position includes the following steps: The location of the local peak along the horizontal axis is used as the horizontal coordinate; The location of the local peak along the vertical axis is used as the vertical coordinate; The particle position is constructed based on the horizontal and vertical coordinates.

6. The method according to claim 1, characterized in that, When the number of local peak positions corresponding to any of the horizontal and vertical projection directions is not 1, the process of converting the local peak positions corresponding to the two horizontal and vertical projection directions to obtain the particle position includes the following steps: When the number of local peak positions corresponding to any of the horizontal and vertical projection directions is 0, the output particle position is empty; When the number of local peak positions corresponding to any projection direction in the horizontal or vertical direction is not 0, all local peak positions in the horizontal direction are summarized as first peak positions to obtain the first peak position set. The set of second peak positions is obtained by summing all the local peak positions in the vertical direction as second peak positions. All the first peak positions in the first peak position set and all the second peak positions in the second peak position set are arranged and combined to form multiple non-repeating peak position pairs; By using the first peak position and the second peak position of each pair of peak positions as the horizontal and vertical coordinates respectively, the candidate particle positions are constructed. Traverse all candidate particle positions and obtain the maximum gray value of the particle image within the preset area range where the candidate particle position is located as the position gray value; Based on the candidate particle positions corresponding to the grayscale values ​​at the positions, the particle positions are obtained by filtering using preset conditions. When the preset conditions include a preset number of particles and a preset grayscale value, the step of using the preset conditions to filter and obtain the particle positions includes the following steps: All candidate particle positions are sorted in descending order of their position grayscale values. From the sorted results, the candidate particle positions whose number does not exceed the preset number of particles and whose position grayscale value is greater than or equal to the preset grayscale value are selected as the particle positions. When the preset condition only includes the preset number of particles, the step of using the preset condition to filter and obtain the particle position includes the following steps: All candidate particle positions are sorted in descending order of their position grayscale values, and the candidate particle position with the largest number of preset particles in the sorting results is taken as the particle position. When the preset conditions only include the preset grayscale value, the step of using the preset conditions to filter and obtain the particle position includes the following steps: The candidate particle position whose gray value is greater than or equal to the preset gray value is taken as the particle position.

7. The method according to any one of claims 1 to 6, characterized in that, The process of capturing a particle screenshot of the target particle from the field of view based on the particle's position includes the following steps: The particle position is used as the center position of the screenshot, and the screenshot range is determined by the preset image size; Detect whether there are any particles other than the target particle within the screenshot area of ​​the field of view; When other particles are detected within the screenshot area, at least one of the following adjustment steps is performed on the screenshot area: Adjust the center position of the screenshot within a preset movement range until there are no other particles besides the target particle within the screenshot range; The image size is gradually reduced based on a preset step size until there are no other particles besides the target particle within the screenshot area; Based on the adjusted screenshot range, a particle screenshot of the target particle is captured from the field of view.

8. A particle screenshot device, characterized in that, The device includes: The integral projection module is used to acquire the particle image to be processed, extract the field of view area from the particle image based on a preset selection range, and perform integral projection on the field of view area to obtain a one-dimensional sequence group. The field of view includes the target particle to be captured, and the one-dimensional sequence group includes the initial one-dimensional sequence of the field of view in two projection directions, horizontal and vertical. The weighting standard module is used to weight and standardize the initial one-dimensional sequence based on the field of view size of the field of view region in the projection direction to obtain a weighted one-dimensional sequence; A smoothing module is used to smooth the weighted one-dimensional sequence to obtain a smoothed one-dimensional sequence. The peak marking module is used to mark local peaks based on the smoothed one-dimensional sequence to obtain the local peak positions; The position conversion module is used to convert the local peak positions corresponding to the two projection directions (horizontal and vertical) to obtain the particle position. The particle screenshot module is used to capture a particle screenshot of the target particle from the field of view based on the particle position; The sequence values ​​of the initial one-dimensional sequence correspond sequentially to the integral values ​​at each position along the projection direction. The weighted normalization of the initial one-dimensional sequence based on the field of view size along the projection direction to obtain a weighted one-dimensional sequence includes the following steps: Based on the total number of pixels in each column along the horizontal axis of the field of view, the first weight of each position along the horizontal axis is obtained. The first standardized value of each position in the horizontal axis direction is obtained by dividing the integral value of each position by the first weight of the corresponding position, and then the weighted one-dimensional sequence in the horizontal axis direction is obtained by summing along the horizontal axis direction. Based on the total number of pixels in each row along the vertical axis of the field of view, a second weight is obtained for each position along the vertical axis. The second standardized value for each position along the vertical axis is obtained by dividing the integral value at each position by the second weight at the corresponding position, and then the weighted one-dimensional sequence along the vertical axis is obtained by summing the values.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Blood cell analyzer and blood cell analysis method

    CN119064351A

  • Method and system for automated analysis of cell images

    US20170091948A1