Tracking method for massive moving particles based on image recognition
By introducing color marks on moving particles and using image recognition technology, the problem of low stability and repeatability of particle motion trajectory tracking in the prior art is solved, and the stability and high repeatability of a large number of moving particles are achieved.
Patent Information
- Application Number
- CN202510116732.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2045-01-24
AI Technical Summary
The tracking stability and repeatability of particles undergoing Brownian motion in the prior art is not high, especially when processing large amounts of particles, fluorescent labeling increases preparation complexity and cost and affects the stability and repeatability of the method.
By introducing stable and significantly existing color marks (such as color tape) on the moving particles, combined with image recognition technology, using a microscope or a video recorder to acquire images, developing algorithms to identify pixel dot clusters corresponding to the color marks, calculate and record their average positions, thereby achieving stable tracking of a large number of moving particles.
The stability and high repeatability of particles undergoing active Brownian motion are achieved, reducing preparation complexity and cost, and improving the stability and repeatability of the method.
Smart Images

Figure CN119559214A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of particle motion trajectory recognition, and in particular relates to a method for tracking a large number of moving particles based on image recognition. Background Art
[0002] Living matter is composed of a large number of monomers with continuous motion. It is a typical representative of non-equilibrium systems and a hot research subject at the international forefront. The study of living matter has had an impact on traditional statistical physics, thus deriving new thermodynamic concepts including active pressure and effective temperature; moreover, the study of living matter also helps us understand basic scientific issues such as the evolution of topological defects in active nematic phases, bacterial aggregation, and cell chemotaxis, and provides valuable ideas for the design and manufacture of intelligent living materials and micro-nano machines with important applications in the field of engineering materials.
[0003] For a long time, particles undergoing active Brownian motion have been an important tool for studying living matter. The research method is mainly based on computer simulation, but the research and development of experimental methods have lagged behind. At the same time, efficient particle tracking and image analysis technology are the premise and foundation for studying the motion and collective behavior of active particles from an experimental level.
[0004] For the movement of a single active particle, simple fluorescent labeling and particle tracking can be achieved using a microscope. However, for a large number of particles, fluorescent labeling will significantly increase the complexity of particle preparation, resulting in additional time and economic costs; at the same time, fluorescence quenching will also affect the stability and repeatability of the method.
[0005] Therefore, a stable and reproducible method to track the trajectories of a large number of particles is necessary. Summary of the invention
[0006] In order to solve the above problems existing in the prior art, the present invention provides a method for tracking a large number of moving particles based on image recognition, aiming to solve the technical problems in the prior art of low stability and repeatability in tracking the motion trajectories of particles undergoing Brownian motion.
[0007] To achieve the above object, the present invention provides the following technical solution: a method for tracking a large number of moving particles based on image recognition, the moving particles applicable to the method are particles that do not flip, do not overlap, and undergo active Brownian motion, the method uses a microscope or a video recorder as an image acquisition device, and the method comprises the following steps: Step 1: Identification of moving particles; 1. Mark each moving particle with the same shape, size and color (such as colored tape marks or marks based on the stable structural features on the surface of the moving particles), and use an image acquisition device to capture images of the moving particles; 2. Import the collected images of moving particles into the computer, set the RGB values, and identify the pixel clusters corresponding to the color marks on each moving particle; 3. Set the upper and lower thresholds of the size of the pixel clusters, determine the pixel clusters whose number of pixels is between the upper and lower thresholds, exclude other pixel clusters, and the pixel clusters between the upper and lower thresholds are the color marks on the corresponding moving particles; Specifically, an algorithm is developed based on MATLAB or Python, and any pixel point is selected in the pixel point cluster corresponding to any color mark, its two-dimensional coordinates are recorded, and all the pixel points adjacent to it in the horizontal and vertical directions are found, and so on, the two-dimensional coordinates of all the pixel points in the pixel point cluster are located; then, in the pixel point cluster corresponding to any color mark, the two-dimensional coordinates of all the pixels are averaged to obtain a unique two-dimensional coordinate, which is the position of the pixel point cluster, that is, the position of the moving particles corresponding to the pixel point cluster.
[0008] 4. Determine the positions of the pixels corresponding to all color marks, and take the pixel corresponding to the average position of all position data as the position of the moving particle; Step 2: Identification of moving particle trajectories: Locate the position of each moving particle at different time points and record the movement trajectories of all moving particles over a period of time.
[0009] The resolution of the image acquisition device is negatively correlated with the particle size of the moving particles and the size of the color mark.
[0010] Compared with the prior art, the present invention has the following beneficial effects: In the prior art, the study of the movement of active particles undergoing Brownian motion is still relatively basic. The movement of a single active particle can be achieved by simple fluorescent labeling and particle tracking using a microscope. For a large number of particles, fluorescent labeling will significantly increase the complexity of particle preparation, which will result in additional time and economic costs. At the same time, fluorescence quenching will also affect the stability and repeatability of the method. In the present invention, by introducing a stable and significant color mark (such as a colored tape, etc.) on the moving particles, an algorithm is developed to recognize the color mark, calculate and record the average position of the pixel corresponding to the color mark, thereby achieving stable tracking of particles undergoing active Brownian motion. More importantly, the color mark can be stable and does not interfere with each other, thereby ensuring that a large number of moving particles can be tracked for a long time. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0012] In the attached picture: Figure 1 A schematic diagram of the identification of a single moving particle in the present invention; Figure 2 is a schematic diagram of five moving particles being identified simultaneously in the present invention; Figure 3 A schematic diagram of a pixel cluster on a particle and the positioning of its geometric center in the present invention; Figure 4 It is a schematic diagram of the simultaneous positioning of multiple moving particles in the present invention; Figure 5 A schematic diagram of the trajectories of five moving particles in the present invention in 20 seconds; Figure 6 A schematic diagram of different particles in a particle mixture being identified simultaneously in the present invention; Figure 7 is a schematic diagram of the motion trajectories of all moving particles in the particle mixture of the present invention; Figure 8 Schematic diagram of the steps of identifying a large number of moving particles in the present invention. DETAILED DESCRIPTION
[0013] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0014] Embodiment 1:
[0015] In this embodiment, a method for tracking a large number of moving particles based on image recognition is disclosed. The moving particles applicable to the method are particles that do not flip, do not overlap, and undergo active Brownian motion. The method uses a video recorder as an image acquisition device. The method includes the following steps: Step 1: Identification of moving particles; 1. Mark each moving particle with colored tape and collect images of the moving particles through a video recorder; 2. Import the collected images of moving particles into the computer, set the RGB values, and identify the pixel clusters corresponding to the colored tape marks on each moving particle; Specifically, in this embodiment, an algorithm is developed based on MATLAB: The specific steps are as follows: (1) Set RGB threshold R_limit = 80; G_limit = 80; B_limit = 80; (2) Reading an image image = imread('your_image_file.jpg'); (3) Extract the RGB values of all pixels in the image R = image(:, :, 1); G = image(:, :, 2); B = image(:, :, 3); (4) Determine the coordinates of the pixel points that meet the RGB threshold mask_black = R<= R_limit&G<= G_limit&B<= B_limit; [x_black, y_black] = find(mask_black); (5) Visualization results result_image = zeros(size(image)); creates a completely black image result_image(mask_black) = image(mask_black); Only pixels that meet the conditions are retained imshow(uint8(result_image)); Display the result image title('Filtered Image'); (6) Statistical quantity num_black_pixels = length(x_black); Count the number of pixels that meet the conditions fprintf('Number of black pixels: %d\n', num_black_pixels); (7) Save the result image (optional) imwrite(uint8(result_image), 'filtered_image.jpg'); saves the result image.
[0016] Thus, the pixel points corresponding to the black color marks on the moving particles are identified; Set the upper and lower thresholds of the size of the pixel clusters, determine the pixel clusters whose number of pixels is between the upper and lower thresholds, exclude other pixel clusters, and the pixel clusters between the upper and lower thresholds correspond to the colored tape marks on the moving particles; Also based on MATLAB development algorithm: (1) Determine all relevant pixels (such as black_pixels_remain), set the minimum (num_pixel_min) and maximum (num_pixel_max) values of the number of pixels in a pixel cluster (such as particle), and exclude clusters outside the threshold. if size(particle,1)<num_pixel_min || size(particle,1)> num_pixel_max black_pixels_remain = setdiff(black_pixels_remain, particle,'rows', 'stable'); (2) Keep pixels within the threshold (pixels_on_particles) elseif size(particle,1)>= num_pixel_min&size(particle,1)<= num_pixel_max pixels_on_particles = [pixels_on_particles; particle]; End.
[0017] Select any pixel in the pixel cluster corresponding to any colored tape mark, record its two-dimensional coordinates, find all the pixels adjacent to it in the horizontal and vertical directions, and so on, locate the two-dimensional coordinates of all the pixels in the pixel cluster; Then, in any pixel cluster corresponding to a colored tape mark, the two-dimensional coordinates of all pixels are averaged to obtain a unique two-dimensional coordinate, which is the position of the pixel cluster, that is, the position of the moving particle corresponding to the pixel cluster.
[0018] 4. Determine the positions of the pixels corresponding to all the colored tape marks, and take the pixel corresponding to the average position of all the position data as the position of the moving particle; Step 2: Identification of moving particle trajectories: Locate the position of each moving particle at different time points and record the movement trajectories of all moving particles over a period of time.
[0019] Embodiment 2:
[0020] Based on the tracking method of a large number of moving particles based on image recognition in Example 1, this embodiment also provides a method for identifying a single moving particle in an image acquisition device (video recorder), as shown in the attached Figure 1 As shown, the following steps are included: Step 1: Develop a MATLAB algorithm as in Example 1, set the RGB value, and identify the pixel point (red circle) corresponding to the mark (black) on the particle; Step 2: Determine the positions of the pixels corresponding to all the markers and take the average value as the position of the particle (blue dot); The position of the blue dot is the corresponding position of the moving particle.
[0021] Therefore, based on the method disclosed in Example 1, a single moving particle can be accurately identified and located by a video recorder.
[0022] Embodiment 3:
[0023] Based on the tracking method of a large number of moving particles based on image recognition in Example 1, and the identification method of a single moving particle in an image acquisition device (video recorder) in Example 2, this embodiment also provides a method for identifying five moving particles at the same time, as shown in the attached Figure 2-Figure 4 As shown, the following steps are included: Step 1: Set the RGB value and use it to identify all relevant pixels (red areas), such as Figure 2 ; Step 2: Set a threshold for the size of pixel clusters (i.e., the number of pixels), determine the pixel clusters whose number of pixels is less than the threshold, exclude them, and the remaining pixel clusters correspond to the marks on the particles; Step 3: Select a pixel point (such as the pixel point where the yellow circle is located), and then find all the pixel points adjacent to it in the horizontal and vertical directions (the pixel point where the green circle is located); and so on, until all the pixel points in the cluster are found; calculate the average value of the positions of these pixel points as the position of the particle, such as Figure 3 ; Step 4: Repeat the method in step 3 to identify all moving particles until the positions of all particles are found. Figure 4 .
[0024] Therefore, based on the method disclosed in Example 1, multiple moving particles can be accurately identified and located by the video recorder.
[0025] Embodiment 4:
[0026] Based on the method for tracking a large number of moving particles based on image recognition in Example 1 and the method for simultaneously identifying five moving particles in Example 3, this embodiment further provides a method for tracking the trajectories of five moving particles in 20 seconds, locating the positions of the five moving particles at different time points, and obtaining their trajectories, such as Figure 5 .
[0027] Embodiment 5:
[0028] Based on the method for tracking a large number of moving particles based on image recognition in Example 1, the method for simultaneously identifying five moving particles in Example 3, and the method for tracking the trajectories of five moving particles in 20 seconds in Example 4, this embodiment also provides a method for simultaneously identifying different particles in a particle mixture, such as Figure 6-7 As shown, the following steps are included: Step 1: Develop a MATLAB algorithm as in Example 1, set multiple sets of RGB values, and identify all relevant pixels (such as black and green) in the particle mixture. Figure 6 ; Step 2: Set the pixel cluster size threshold to exclude pixel clusters that are not related to particle markings, such as Figure 6 ; Step 3: Determine the positions of all moving particles in the particle mixture and record their trajectories within 20 seconds, such as Figure 7 .
[0029] Therefore, based on the method disclosed in this embodiment, different particles in a particle mixture can also be identified simultaneously, and their movement trajectories over a period of time can be accurately tracked.
[0030] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for tracking a large number of moving particles based on image recognition, the method is applicable to moving particles that do not flip, do not overlap, and undergo active Brownian motion, and is characterized by: The method uses a microscope or a video recorder as an image acquisition device, and the method comprises the following steps: Sp1: identification of moving particles; Sp1-1: Mark each moving particle with the same color and collect images of the moving particles through an image acquisition device; Sp1-2: Import the collected images of moving particles into the computer, set the RGB values, and identify the pixel clusters corresponding to the color marks on each moving particle; Sp1-3: Set the upper and lower thresholds of the size of the pixel clusters, determine the pixel clusters whose number of pixels is between the upper and lower thresholds, exclude other pixel clusters, and the pixel clusters between the upper and lower thresholds are the color marks on the corresponding moving particles; Sp1-4: Determine the positions of the pixels corresponding to all color markers, and take the pixel corresponding to the average position of all position data as the position of the moving particle; Sp2: Identification of moving particle trajectories: Locate the position of each moving particle at different time points and record the movement trajectories of all moving particles over a period of time.
2. The tracking method according to claim 1, characterized in that: The color marks of each of the moving particles are of the same shape, size and color.
3. The tracking method according to claim 2, characterized in that: The color of each of the moving particles is marked with a colored tape of the same length.
4. The tracking method according to claim 1, characterized in that: The color marking of each of the moving particles can also adopt the stable structural characteristics of the moving particle surface, that is, the inherent color of the moving particle surface and the brightness difference of different parts of the moving particle surface.
5. The tracking method according to claim 1, characterized in that: In the step Sp1-4, Determining the positions of the pixels corresponding to all the color marks includes: selecting any pixel in the pixel cluster corresponding to any color mark, recording its two-dimensional coordinates, finding all the pixels adjacent to it in the horizontal and vertical directions, and locating the two-dimensional coordinates of all the pixels in the pixel cluster by analogy; The pixel point corresponding to the average position of all position data is taken as the position of the moving particle, including: in the pixel point cluster corresponding to any color mark, the two-dimensional coordinates of all the pixels are averaged to obtain a unique two-dimensional coordinate, which is the position of the pixel point cluster, that is, the position of the moving particle corresponding to the pixel point cluster.
6. The tracking method according to claim 1, characterized in that: In the step Sp1-3, a shape matching degree threshold of the pixel cluster needs to be set. When the shape matching degree of the pixel cluster is less than the shape matching degree threshold of the pixel cluster, the pixel cluster is excluded.
7. The tracking method according to claim 1, characterized in that: In the step Sp1-2, the collected image of the moving particles is imported into a computer, the RGB value is set, and the pixel cluster corresponding to the color mark on each moving particle is identified, including: Step 1: Set RGB threshold; Step 2: Extract the RGB values of all pixels in the pixel cluster; Step 3: Determine the coordinates of the pixels that meet the RGB threshold.
8. The tracking method according to claim 7, characterized in that: In the step Sp1-3, an upper threshold and a lower threshold of the size of the pixel cluster are set, and a pixel cluster with the number of pixels between the upper threshold and the lower threshold is determined, and other pixel clusters are excluded. The pixel cluster between the upper threshold and the lower threshold corresponds to the color mark on the moving particle, including: Step 1: Determine all relevant pixels, set the minimum and maximum values of the number of pixels in the pixel cluster, and exclude the pixel clusters outside the minimum and maximum thresholds; Step 2: Keep the pixels within the minimum and maximum thresholds.
9. The tracking method according to claim 1, characterized in that: The resolution of the image acquisition device is negatively correlated with the particle size of the moving particles and the size of the color mark.
10. The tracking method according to claim 7 or 8, characterized in that: The method for identifying pixels in pixel clusters and excluding pixel clusters is run based on MATLAB or Python.
Citation Information
Patent Citations
Color coding method capable of automatically identifying variegated particles
CN107016699A
Bed surface particle identification tracking method based on motion image backtracking
CN112967313A
Flying dust particulate matter drift trajectory model and modeling method thereof
CN114841066A
Particle system three-dimensional image segmentation and tracking method and storage medium
CN119228823A
Cited By
Method for simultaneously tracking position and orientation angle of moving particle based on image recognition
CN119941779A
Method for Simultaneously Tracking Position and Orientation Angle of Moving Particles Based on Image Recognition
CN119941779B
Track processing method and device of active particles, electronic equipment and storage medium
CN121725025A
Intelligent identification and classification method for TAP condensate microscopic image based on deep learning
CN122049898A