Method for simultaneously tracking position and orientation angle of moving particle based on image recognition

Through an image recognition method, images of moving particles are collected using a microscope or video recorder, color mark recognition and pixel point cluster positioning, and the position and orientation angle of moving particles are determined, which solves the problem of difficulty in tracking the position and orientation angle of moving particles in the prior art, and effectively studies the collective behavior of active rotors.

CN119941779AActive Publication Date: 2025-05-06SHENZHEN MSU-BIT UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510433487.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-05-06
Estimated Expiration
2045-04-08

AI Technical Summary

Technical Problem

The prior art is difficult to track the position and orientation angle of moving particles simultaneously, especially the lack of effective methods for motion video analysis of active particles that can rotate.

Method used

Through an image recognition-based method, images of moving particles are collected using a microscope or a video recorder, color mark recognition and pixel point cluster positioning, and the position and orientation angle of moving particles are determined. Specific steps include confirming the trajectory of moving particles and determining the orientation angle, and using MATLAB or Python development algorithms for image processing and analysis.

Benefits of technology

Simultaneous tracking of moving particles is realized, and a practical algorithm is provided to study the collective behavior of active rotors, providing new image and video analysis methods for studying particle models that can perform translation, rotation and composite motion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941779A_ABST
    Figure CN119941779A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of particle motion recognition, and particularly relates to a method for simultaneously tracking the position and orientation angle of a moving particle based on image recognition, which is suitable for tracking an active rotor and comprises the following steps of: acquiring image information of the moving particle through image acquisition equipment; the method comprises the following steps: determining a motion track by tracking the position change of a remarkable color mark on a moving particle, selecting two symmetrical clusters on the color mark, taking an included angle between a vector determined by geometric centers of the two clusters and a fixed direction as an orientation angle of the moving particle, and taking orientation angles of multiple time points in a time period, according to the method, the relation between the orientation angle and the time is obtained by removing abrupt change, linear fitting and monotone processing, so that the position and the orientation angle of the moving particles are determined at the same time, a new method is developed based on the image recognition technology, and a practical algorithm is provided for studying the collective behavior of the active rotor; and a new image and video analysis method is provided for researching a particle model capable of performing translation, rotation and compound motion thereof.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of particle motion recognition, and in particular relates to a method for simultaneously tracking the position and orientation angle of moving particles based on image recognition. Background Art

[0002] Active rotors are active particles that rotate around one of their own axes while moving randomly in an in vitro environment. Together with active particles with a fixed movement rate (such as active Brownian particles), they constitute an important model for studying the dynamic properties and collective behavior of living matter. The additional power of active rotors in the rotational degree of freedom can induce many novel collective phenomena, such as boundary flows, chiral separation, and rotating crystals. Studying these collective phenomena of active rotors can help discover and understand the guiding principles of the behavior of living matter, which can be used in fields such as smart material development and device design.

[0003] However, the study of the collective behavior of active rotors is mainly based on theoretical calculations, and experimental models are relatively lacking. For example, particles with tilted support legs will continue to rotate on a vertically vibrating platform while randomly moving in the horizontal orientation; these active rotors provide a powerful experimental model for studying collective behavior.

[0004] Efficient particle tracking and image analysis techniques are the basis for experimental studies of active particle motion. Existing image analysis algorithms are only applicable to particles with certain specific structural characteristics, while algorithms for particles that can perform translation, rotation, and their combined motion need to be further developed. For particles that perform translational motion, their motion parameters can be obtained by tracking the position coordinates of a point on the particle (usually the center of mass) at different times, but current technology still lacks protection for the analysis method of motion videos of active particles that can rotate, that is, it is difficult to track changes in particle orientation. Summary of the invention

[0005] In order to solve the above-mentioned problems existing in the prior art, the present invention provides a method for simultaneously tracking the position and orientation angle of moving particles based on image recognition, aiming to solve the technical problem in the prior art that the position coordinates and orientation angles of moving and marked particles at different time points are difficult to be tracked simultaneously.

[0006] To achieve the above object, the present invention provides the following technical solution: a method for simultaneously tracking the position and orientation angle of moving particles based on image recognition, the method is applicable to moving particles that do not flip, do not overlap, undergo active Brownian motion, and rotate around one of their own axes, the method uses a microscope or a video recorder as an image acquisition device, and the method comprises the following steps: Step 1: Confirmation of moving particle trajectory: 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.

[0007] 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 geometric center of the moving particle; According to the position data of the geometric center of the color mark on the moving particle, the movement trajectory of each moving particle over a period of time is determined.

[0008] Step 2: Confirmation of the orientation angle of moving particles: 1. Make a circular area with the geometric center of the pixel cluster as the center. The pixel cluster in the circular area is the central cluster A (the number of pixels in the central cluster A should be less than the total number of pixels in the pixel cluster). Excluding the central cluster A, the remaining clusters are located at the two ends, namely, the two end clusters B and the two end clusters C. 2. According to the position data of clusters B and C at both ends, determine the position of all pixels in the cluster, and take the pixel corresponding to the average position of all position data in each cluster as the position of the geometric center of the cluster; 3. Define vector α with the geometric centers of clusters B and C (vector α can be defined as the geometric center of cluster B pointing to the geometric center of cluster C, or the geometric center of cluster C pointing to the geometric center of cluster B), and take the angle φ between vector α and any fixed direction, such as the angle between vector α and the X-axis, as the orientation angle of the moving particle; 4. Obtain the orientation angle of each moving particle within a period of time, and perform linear fitting and monotonic processing to obtain the relationship between the orientation angle of each moving particle and time; Among them, within a period of time, the orientation angles of the moving particles are taken at multiple time points, and any two adjacent time points a and b need to satisfy: when the moving particles rotate counterclockwise, 0≤φa≤π, 0≤φb≤π; when the moving particles rotate clockwise, -π≤φa≤0, -π≤φb≤0; During the image recognition process, φ can be calculated as the angle between the vector from the geometric center of cluster B at both ends to the geometric center of cluster C at both ends and the X-axis (i.e., φ1), or it can be calculated as the angle between the vector from the geometric center of cluster C at both ends to the geometric center of cluster B at both ends and the X-axis (φ2). The two vectors are in opposite directions, i.e., |φ2-φ1|=π. Therefore, the particle orientation angles obtained at different time points will mutate. The mutation value that defines the mutation is related to the rotation speed v of the moving particle around one of its own axes and the time interval t, i.e., v*t<mutation value<π. When |φb-φa|>mutation value, it is considered that a mutation has occurred, and π is subtracted from φb (when the moving particle rotates clockwise, π is added to φb).

[0009] At the same time, the moving particles protected by this method are also applicable to randomly rotating particles, except that the orientation angle and time are no longer in a linear relationship.

[0010] Compared with the prior art, the present invention has the following beneficial effects: In the existing technology, image analysis algorithms are only applicable to particles with certain specific structural characteristics, while algorithms for particles that can perform translation, rotation, and their combined motion need to be further developed. For particles that perform translational motion, their motion parameters can be obtained by tracking the position coordinates of a point on the particle (usually the center of mass) at different times, but the current technology still lacks protection for the analysis method of motion video of active particles that can rotate, that is, it is difficult to track changes in particle orientation. Therefore, in the present invention, the movement trajectory of the moving particles is determined by tracking the position changes of significant color marks on the moving particles, and two symmetrical clusters are selected on the color marks, and the two clusters are located at the two ends of the color marks, and the angle between the vector determined by the geometric centers of the two clusters and a fixed direction (such as the X-coordinate axis) is used as the orientation angle of the moving particles. The orientation angles at multiple time points are taken over a period of time, and the orientation angles are subjected to mutation removal, linear fitting and monotonic processing, so that the relationship between the orientation angle and time of each moving particle over a period of time can be obtained, thereby simultaneously determining the position trajectory of the moving particles and the orientation angle. Based on image recognition technology, a new method has been developed, which provides a practical algorithm for studying the collective behavior of active rotors, and provides a new image and video analysis method for studying particle models that can perform translation, rotation and their combined motions. 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 Schematic diagram of a method for simultaneously tracking the position and orientation angle of a moving particle in the present invention; Figure 2 A schematic diagram of image-based identification of a single moving particle in the present invention; Figure 3 A schematic diagram of the confirmation of the orientation angle of a single moving particle in the present invention; Figure 4 It is a schematic diagram of the trajectory of a single moving particle and the relationship between the orientation angle and time at different time points in the present invention; Figure 5 A schematic diagram of the definition and determination of the orientation angle of two moving particles with different rotation directions in the present invention; Figure 6 It is a schematic diagram of the relationship between the motion trajectory and orientation angle of two particles with different rotation directions within 15 seconds in the present invention and time; Figure 7 Schematic diagram of the determination of the position and orientation of each particle in the rotating particle group 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. In this embodiment, a method for simultaneously tracking the position and orientation angle 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, undergo active Brownian motion, and rotate around one of their own axes. The method uses a microscope or a video recorder as an image acquisition device. The method comprises the following steps: Step 1: Confirmation of moving particle trajectory: 1. Mark each moving particle with a colored tape of the same shape, size and color, 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; 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 correspond to the colored tape marks on the moving particles; Specifically, an algorithm is developed based on MATLAB or Python, and any pixel point is selected in the pixel cluster corresponding to any colored tape mark, and its two-dimensional coordinates are recorded, and all the pixels adjacent to it in the horizontal and vertical directions are found, and so on, the two-dimensional coordinates of all the pixels in the pixel cluster are located; then, in the pixel cluster corresponding to any colored tape 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 cluster, that is, the position of the moving particles corresponding to the pixel cluster.

[0015] 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 geometric center of the moving particle; 5. Based on the position data of the geometric center marked by the colored tape on the moving particles, determine the movement trajectory of each moving particle over a period of time.

[0016] Step 2: Confirmation of the orientation angle of moving particles: 1. Make a circular area with the geometric center of the pixel cluster as the center. The pixel cluster in the circular area is the central cluster A. The number of pixels in the central cluster A is 40% of the total number of pixel clusters. Excluding the central cluster A, the remaining clusters are located at the two ends, namely, the two end clusters B and the two end clusters C. 2. According to the position data of clusters B and C at both ends, determine the position of all pixels in the cluster, and take the pixel corresponding to the average position of all position data in each cluster as the position of the geometric center of the cluster; 3. Define vector α with the geometric centers of the two end clusters B and C, that is, define vector α with the geometric center of the two end clusters B pointing to the geometric center of the two end clusters C, and take the angle φ between vector α and the X coordinate axis as the orientation angle of the moving particle; 4. Obtain the orientation angle of each moving particle within a period of time, and perform linear fitting and monotonic processing to obtain the relationship between the orientation angle of each moving particle and time; Among them, within a period of time, the orientation angles of the moving particles are taken at multiple time points, and any two adjacent time points a and b need to satisfy: when the moving particles rotate counterclockwise, 0≤φa≤π, 0≤φb≤π; when the moving particles rotate clockwise, -π≤φa≤0, -π≤φb≤0; In the image recognition process, since φ can be calculated as the angle between the vector from the geometric center of cluster B to the geometric center of cluster C and the X-axis (i.e., φ1), and can also be calculated as the angle between the vector from the geometric center of cluster C to the geometric center of cluster B and the X-axis (φ2), these two vectors are in opposite directions, i.e., |φ2-φ1|=π. Therefore, the particle orientation angles obtained at different time points will mutate. The mutation value that defines the mutation is related to the rotation speed v of the moving particle around one of its own axes and the time interval t, i.e., v*t<mutation value<π. When |φb-φa|>mutation value, it is considered that a mutation has occurred, and π is subtracted from φb (when the moving particle rotates clockwise, π is added to φb).

[0017] At the same time, the moving particles protected by this embodiment are also applicable to randomly rotating particles, except that the orientation angle and time are no longer in a linear relationship.

[0018] Example 2, based on the method for simultaneously tracking the position and orientation angle of a moving particle based on image recognition in Example 1, this example provides an application of the method to the motion trajectory recognition and orientation angle determination of a single counterclockwise moving particle, including the following steps: Step 1: If Figure 2 As shown, the MATLAB algorithm is developed as in Example 1, the RGB values ​​are set, and the pixel points (yellow) corresponding to the colored tape marks on the moving particles are identified; In this step, the 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.

[0019] Step 2: 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.

[0020] Specifically, a pixel point is randomly 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 the two-dimensional coordinates of all the pixel points in the pixel point cluster are located by analogy; then, in the pixel point cluster corresponding to any color mark, the two-dimensional coordinates of all the pixel points 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; Step 3: 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 geometric center of the moving particle. In this embodiment, the position of the moving particle is the geometric center of the marked pixel cluster (solid blue dot); determine the movement trajectory of each moving particle over a period of time based on the position data of the geometric center of the colored tape mark on the moving particle.

[0021] Step 4: (1) If Figure 3 As shown, 40% of the clusters near the geometric center of the pixel cluster are taken as the central cluster A. The remaining clusters excluding the central cluster A are located at the two ends, namely, the two-end cluster B and the two-end cluster C, that is, the clusters corresponding to the green and cyan circles; (2) Calculate the geometric centers of the two small clusters (hollow blue circles 1 and 2) respectively. The angle between the vector defined by the two centers (i.e., blue circle 1 points to blue circle 2) and the X-coordinate is the orientation angle φ of the particle, and the calculated orientation angle is limited to the range of 0 to 180°, i.e., [0,π]; (3) The mutation value is defined as 2π / 3. To prevent the orientation of moving particles from randomly jumping between two opposite orientations, when the orientation angle has a mutation, that is, the change is greater than 2π / 3, its value will be deducted by 180°; (4) If Figure 4 As shown, the orientation angle of the moving particles within a period of time is obtained, and linear fitting and monotonic processing are performed to obtain the relationship between the orientation angle of the moving particles and time.

[0022] In this embodiment, the calculation of the orientation angle φ and the removal of mutations can be based on MATLAB or Python development algorithms, and the specific steps are as follows: (i) Assuming that the center coordinates of the small clusters of green and cyan pixels are marked as center_1 and center_2, the calculation code for the orientation angle (phi) is as follows: Step 1: Calculate the vector vector = center_1-center_2; Step 2: Calculate the phi value for each case.

[0023] (1) Case 1: The x value of the vector is greater than 0, the y value is not less than 0, and phi is in the interval [0,π / 2); if (vector(1))>0&&(vector(2))>=0 phi = atan((vector(2)) / (vector(1))); (2) Case 2: The x value of the vector is less than 0, the y value is not less than 0, and phi is in the interval (π / 2,π]; elseif (vector(1))<0&&(vector(2))>=0 phi = atan((vector(2)) / (vector(1)))+pi; (3) Case 3: The x value of the vector is less than 0, and the y value is less than 0. Theoretically, phi is in the interval (π, 3π / 2), but it is forced to be adjusted to (0, π / 2); elseif (vector(1))<0&&(vector(2))<0 phi = atan((vector(2)) / (vector(1))); (4) Case 4: The x value of the vector is greater than 0, and the y value is less than 0. Theoretically, phi is in the interval (3π / 2, 2π), but it is forced to be adjusted to (π / 2, π). elseif (vector(1))>0&&(vector(2))<0 phi = atan((vector(2)) / (vector(1)))+pi; (5) Case 5: The x value of the vector is 0 and phi is equal to π / 2.

[0024] elseif (vector(1))==0 phi = pi / 2; end (ii) When removing mutations: Assume that the number of images (i.e. time points) is n_t, the number of rotating particles is n_P, and all orientation angles are Phi; the code for correcting the orientation angle and removing the mutation is as follows.

[0025] for j=1:n_P for i=3:n_t Case 1: The orientation angle at time point i is smaller than the orientation angle at time point i-1, and the absolute value of the difference is greater than 2π / 3, which means that the orientation angle at time point i is mistakenly subtracted by π; therefore, the orientation angles corresponding to all time points after time point i-1 are added with π; if Phi(i,j)<Phi(i-1,j)&&Phi(i-1,j)-Phi(i,j)> (2*pi / 3) Phi(i:end,j) = Phi(i:end,j)+pi; Case 2: The orientation angle at time point i is greater than the orientation angle at time point i-1, and the absolute value of the difference is greater than 2π / 3, which means that the orientation angle at time point i is mistakenly added with π; therefore, the orientation angles corresponding to all time points after time point i-1 are subtracted with π; elseif Phi(i,j)>Phi(i-1,j)&&Phi(i,j)-Phi(i-1,j)>(2*pi / 3) Phi(i:end,j) = Phi(i:end,j)-pi; end end End Figure 4 The data were linearly fitted and the particle rotation speed was found to be 7.4 rad / s.

[0026] Example 3, based on the method for simultaneously tracking the position and orientation angle of moving particles based on image recognition in Example 1, this example further provides an application of the method to the motion trajectory recognition and orientation angle determination of moving particles in different rotation directions, including the following steps: Step 1: If Figure 5 As shown, a MATLAB algorithm is developed as in Example 2, the steps for confirming the motion trajectory in Example 1 are repeated, the RGB values ​​are set, the pixel points (red) corresponding to the colored tape marks (black) on the two moving particles are identified, and the positions of the two moving particles are identified as the geometric centers of the marked pixel clusters (solid blue dots); the motion trajectories of the two moving particles over a period of time are determined based on the position data of the geometric centers of the colored tape marks on the moving particles.

[0027] Step 2: like Figure 5 As shown, the steps for confirming the orientation angle in Example 1 are continued to be repeated to respectively determine the positions and orientation angles of the circular rotor and the triangular rotor in the two moving particles, wherein the circular rotor rotates counterclockwise and the triangular rotor rotates clockwise; Among them, the orientation angle of the circular rotor rotating counterclockwise is positive, and the orientation angle is limited to the range of 0 to 180°, that is, [0,π]; the orientation angle of the triangular rotor rotating clockwise is negative, and the orientation angle is limited to the range of -180° to 0°, that is, [-π,0]; Similarly, the orientation angles of two moving particles within 15 seconds are obtained, and linear fitting and monotonic processing are performed to obtain the relationship between the orientation angles of the moving particles and time; Among them, Figure 6 As shown, after linear fitting of the data, the rotation speeds of the circular rotor rotating counterclockwise and the triangular rotor rotating clockwise are 23.9 and 22.7 rad / s, respectively.

[0028] Example 4, based on the method for simultaneously tracking the position and orientation angle of moving particles based on image recognition in Example 1, this example further provides an application of the method to the motion trajectory identification and orientation angle determination of each moving particle in a rotating particle group, including the following steps: Step 1: If Figure 5 As shown, a MATLAB algorithm is developed as in Example 2, the steps for confirming the motion trajectory in Example 1 are repeated, the RGB values ​​are set, the pixel points (red) corresponding to the colored tape marks (black) on the two moving particles are identified, and the positions of the two moving particles are identified as the geometric centers of the marked pixel clusters (solid blue dots); based on the position data of the geometric centers of the colored tape marks on the moving particles, the motion trajectories of the two moving particles over a period of time are determined.

[0029] Step 2: like Figure 7 As shown, continue to repeat the steps of confirming the orientation angle in Example 1 to determine the position and orientation angle of each moving particle; Among them, the orientation angle of counterclockwise rotation takes a positive value, and the orientation angle is limited to the range of 0 to 180°, that is, [0,π]; the orientation angle of clockwise rotation takes a negative value, and the orientation angle is limited to the range of -180° to 0°, that is, [-π,0]; Similarly, the orientation angle of each moving particle within 15 seconds is obtained, and linear fitting and monotonic processing are performed to obtain the relationship between the orientation angle of the moving particles and time; Among them, Figure 7 As shown, the positions (solid blue dots) and orientations (blue arrows) of all particles are available.

[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 simultaneously tracking the position and orientation angle of moving particles based on image recognition, wherein the method is applicable to moving particles that do not flip, do not overlap, undergo active Brownian motion, and rotate around one of their own axes, and is characterized by: The method collects image information of moving particles by an image acquisition device, and the method comprises the following steps: Sp1: Identification of moving particles: Make the same color mark on each moving particle, and collect image information of the moving particles through an image acquisition device, then import the collected image information into a computer, set the RGB value, and identify the pixel cluster corresponding to the color mark on the moving particle; Sp2: Confirmation of moving particle trajectories: Sp2-1: Confirmation of geometric center: Determine the geometric center of the color mark on the moving particle based on the position data of the pixel cluster corresponding to the color mark on the moving particle; Sp2-2: Determine the movement trajectory of each moving particle over a period of time based on the position data of the geometric center of the color mark on the moving particle; Sp3: Confirmation of orientation angle: Sp3-1: A circular area is determined with the geometric center of the pixel cluster as the center, and the pixel cluster within the circular area is the central cluster A. Among the pixel clusters corresponding to the color mark, the remaining clusters excluding the central cluster A are located at the two ends, namely, the two end clusters B and the two end clusters C; Sp3-2: Determine the geometric centers of the two end clusters B and the two end clusters C according to the position data of the two end clusters B and the two end clusters C; Sp3-3: Define vector α with the geometric centers of the two end clusters B and C, and take the angle φ between vector α and any fixed direction, such as the angle between vector α and the X-axis, as the orientation angle of the moving particle; Sp4: Obtain the orientation angle of each moving particle within a period of time, and perform linear fitting and monotonic processing to obtain the relationship between the orientation angle of each moving particle and time.

2. The method for simultaneously tracking position and orientation angle according to claim 1, characterized in that: In the step Sp1, when identifying moving particles, it is necessary to exclude pixel clusters that are not related to color markings, which includes the following steps: Sp1-1: 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.

3. The method for simultaneously tracking position and orientation angle according to claim 1, characterized in that: In the step Sp2-1 and the step Sp3-2, the confirmation of the geometric center of the moving particle and the confirmation of the geometric center of the two-end cluster B and the two-end cluster C include the following steps: In the cluster whose geometric center needs to be determined, including the pixel cluster corresponding to the color mark, as well as the two end clusters B and C, the positions of all pixel points in the cluster are determined, and the pixel point corresponding to the average position of all position data is taken as the position of the geometric center of the cluster.

4. The method for simultaneously tracking position and orientation angle according to claim 1, characterized in that: In the step Sp3-1, in the same color mark, the number of pixels in a circular area determined with the geometric center of the pixel cluster as the center is less than the total number of pixels in the pixel cluster corresponding to the color mark.

5. The method for simultaneously tracking position and orientation angle according to claim 1, characterized in that: In the step Sp3-3, the vector α is defined as the geometric center of the two end clusters B pointing to the geometric center of the two end clusters C, or the geometric center of the two end clusters C pointing to the geometric center of the two end clusters B.

6. The method for simultaneously tracking position and orientation angle according to claim 5, characterized in that: In the step Sp4, when obtaining the orientation angle of each moving particle within a period of time, the following steps are included: Sp4-1: Determine the time interval t according to the rotation speed v of the moving particle around one of its own axes. The time interval t is the time from time point a to time point b. The orientation angle φ of the moving particle is obtained once every time interval t. Sp4-2: The orientation angle φa of the moving particle at time point a, after a time interval t, the orientation angle φb of the moving particle at time point b. When the orientation angle φb suddenly changes compared with the orientation angle φa, the orientation angle φb is subtracted or increased by π.

7. The method for simultaneously tracking position and orientation angle according to claim 6, characterized in that: When the moving particle rotates counterclockwise, in the time interval t, |φb-φa|<π, and 0≤φ≤π.

8. The method for simultaneously tracking position and orientation angle according to claim 7, characterized in that: In the step Sp4-2, when the orientation angle φb changes suddenly compared with the orientation angle φa, the sudden change value is defined to be related to the rotation speed v of the moving particle around one axis thereof and the time interval t, that is: v*t<mutation value<π; When |φb-φa|>mutation value, it is considered that a mutation has occurred, and φb is subtracted from π.

9. The method for simultaneously tracking position and orientation angle according to claim 8, characterized in that: When the moving particle rotates clockwise, in the time interval t, |φb-φa|<π, and -π≤φ≤0.

10. The method for simultaneously tracking position and orientation angle according to claim 1, characterized in that: The moving particle rotates around one of its own axes in a uniform rotation or non-uniform rotation; Among them, for the moving particles rotating at a uniform speed, the orientation angle has a linear relationship with time, while for the moving particles rotating at a non-uniform speed, the orientation angle has a non-linear relationship with time.

Citation Information

Patent Citations

  • Particle material motion trail acquisition method and device, electronic equipment and storage medium

    CN117456451A

  • Tracking method for massive moving particles based on image recognition

    CN119559214A

  • Particle diameter distribution measurement device, particle diameter distribution measurement method, and particle diameter distribution measurement program

    WO2024166705A1