A real-time motion analysis method for linear array ultrasonic image based on pure vision

By employing a purely visual real-time motion analysis method for linear ultrasound images, utilizing preprocessing and background separation techniques, and combining pixel statistics and state discrimination models, the problem of high false alarm rates in ultrasound images under drastic motion is solved. This achieves efficient and accurate scanning motion state analysis, reduces the false alarm rate, and improves diagnostic efficiency.

CN122156260APending Publication Date: 2026-06-05TEND.AI MEDICAL TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TEND.AI MEDICAL TECHNOLOGY (SHANGHAI) CO LTD
Filing Date
2026-03-19
Publication Date
2026-06-05

Smart Images

  • Figure CN122156260A_ABST
    Figure CN122156260A_ABST
Patent Text Reader

Abstract

The application relates to a real-time motion analysis method of a linear array ultrasonic image based on pure vision, which comprises the following steps: collecting an ultrasonic dynamic image through an ultrasonic linear array probe, and pre-processing the ultrasonic dynamic image; performing dynamic analysis on an image sequence of the pre-processed ultrasonic dynamic image in a background separation mode, extracting motion-related visual features, and obtaining a foreground mask image; and classifying the motion state of ultrasonic scanning in a pixel statistical mode based on the foreground mask image. The application can accurately distinguish different scanning motion states, and effectively reduces false positives of real-time scanning from the perspective of motion analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing technology, and in particular to a real-time motion analysis method for linear ultrasound images based on pure vision. Background Technology

[0002] Ultrasound scanning is a crucial tool in physical examinations, and its non-invasive, real-time, and cost-effective advantages make it a vital clinical tool with widespread use. Linear array probes are the most common device for scanning superficial organs. With the development of AI technology, real-time scanning diagnosis has been increasingly applied in clinical practice, assisting doctors in their judgments. However, the dynamic process of ultrasound imaging is quite intense, and false alarms are frequently encountered during real-time detection. Excessive alerts can be very confusing for doctors. On the one hand, AI assistance can help doctors identify lesion areas, providing convenience; on the other hand, excessive alerts can be cumbersome. Maintaining sensitivity while reducing false alarms is a key challenge in AI-assisted ultrasound diagnosis.

[0003] Currently, in most scenarios, data-driven approaches, through continuous learning and supplementation, can effectively reduce false alarms. However, in ultrasound imaging, numerous false alarms are not solely due to data gaps. If false alarms occur during vigorous movement, the lesion areas presented on the ultrasound image cannot be visually distinguished. The root cause of these false alarms is largely the algorithm's failure to adjust to the motion state; the false alarm rate varies with movement. Currently, there is no effective solution for real-time automated motion analysis (judging stillness, displacement, switching, etc.) during ultrasound scanning using purely visual methods. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a real-time motion analysis method for linear ultrasound images based on pure vision, which can accurately distinguish different scanning motion states and effectively reduce false alarms in real-time scanning from the perspective of motion analysis.

[0005] The technical solution adopted by this invention to solve its technical problem is: to provide a real-time motion analysis method for linear ultrasound images based on pure vision, comprising the following steps:

[0006] Ultrasonic dynamic images are acquired using an ultrasonic machine linear array probe, and the ultrasonic dynamic images are preprocessed.

[0007] The image sequence of the preprocessed ultrasound dynamic image was dynamically analyzed by background separation to extract motion-related visual features and obtain a foreground mask image.

[0008] The motion state of ultrasonic scanning is classified based on the foreground mask image using pixel statistics.

[0009] The preprocessing of the ultrasound dynamic image specifically includes:

[0010] Extract the working area of ​​the ultrasound dynamic image;

[0011] The extracted working area is divided into shallow region of interest and central region of interest.

[0012] Histogram equalization is performed on the shallow region of interest and the central region of interest to obtain an ultrasound dynamic image with an approximately uniform distribution of grayscale histograms.

[0013] The step of performing histogram equalization on the shallow region of interest and the central region of interest to obtain an ultrasound dynamic image with an approximately uniformly distributed grayscale histogram specifically includes:

[0014] Count the number of pixels at each gray level in the shallow region of interest and the central region of interest, respectively;

[0015] Calculate the probability density of each gray level based on the number of pixels at each gray level;

[0016] The cumulative distribution function is calculated based on the probability density of each gray level;

[0017] Based on the gray levels output by the cumulative distribution function, an ultrasound dynamic image with an approximately uniformly distributed gray-level histogram is obtained.

[0018] The image sequence of the preprocessed ultrasound dynamic image is dynamically analyzed using a background separation method to extract motion-related visual features and obtain a foreground mask image, specifically including:

[0019] For the observation values ​​of each pixel in a frame of the preprocessed ultrasound dynamic image sequence, a mixture model consisting of K Gaussian distributions is constructed.

[0020] When a new frame arrives, if the observed pixel value of the new frame is different from that of the previous frame... The mean of the Gaussian distribution is less than a preset multiple at the previous time step. If the variance of a Gaussian distribution is less than or equal to the variance of the pixel in the new frame, no update is performed. The mean of the Gaussian distribution is not less than a preset multiple of the value of the previous time step. The variance of the Gaussian distribution is used to update the parameters of the mixture model online to match the first Gaussian distribution. A Gaussian distribution;

[0021] After updating the parameters of the hybrid model, the K Gaussian distributions of each pixel are filtered to determine the background and foreground distributions, and the foreground mask is output.

[0022] The parameters of the hybrid model are updated online to match the first... When the distribution is Gaussian, the weight update formula is: The mean update formula is: The variance update formula is: ;in, and They are respectively Time and Time of the first The weights of a Gaussian distribution and They are respectively Time and Time of the first The mean of a Gaussian distribution, and They are respectively Time and Time of the first The variance of a Gaussian distribution For learning rate, For adaptive learning factors, for The observed value of the pixel at time t.

[0023] After updating the parameters of the hybrid model, the K Gaussian distributions of each pixel are filtered to clarify the background distribution, and a foreground mask image is output. Specifically, this includes:

[0024] Arrange the K Gaussian distributions of each pixel in descending order of weight from high to low;

[0025] From the sorted Gaussian distribution, take the first B weights and sum them up. If the sum is greater than the background threshold, then the pixel is determined to be part of the background distribution.

[0026] Output the foreground mask image based on the background distribution determination result.

[0027] The step of classifying the motion state of ultrasonic scanning based on the foreground mask image using pixel statistics specifically includes:

[0028] The ratio of the number of moving pixels to the total number of pixels in the foreground mask image of each frame is calculated, and the feature value is determined based on the ratio.

[0029] Using a preset number of frames as a sliding window, calculate the average and variance of the feature values ​​within the sliding window, as well as the difference in feature values ​​between adjacent frames;

[0030] Based on the average value, variance, and difference of feature values ​​between adjacent frames, a state discrimination model is used to classify the motion state of ultrasonic scanning.

[0031] The state discrimination model is as follows: ,in, The variance of the eigenvalues The feature value difference between adjacent frames. The average of the eigenvalues. For a preset threshold, and , Indicates a frozen state, used for image capture and analysis of lesions; Indicates a static state, used for measuring lesions; This indicates a fine-tuning state, used for focusing and adjusting the target lesion; Indicates movement status, used to locate lesions; This indicates a state switch, used for scanning organs.

[0032] The technical solution adopted by the present invention to solve its technical problem is: to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the steps of the above-mentioned real-time motion analysis method based on pure vision linear ultrasound images.

[0033] The technical solution adopted by the present invention to solve its technical problem is: to provide a computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the above-mentioned real-time motion analysis method based on pure vision linear ultrasound images are implemented.

[0034] Beneficial effects

[0035] By adopting the above-mentioned technical solution, this invention has the following advantages and positive effects compared with the prior art: This invention does not require deep learning or data learning; it completes motion analysis only through preprocessing, background separation for feature extraction, and pixel statistical grading. It does not rely on neural networks or external sensors, does not consume large amounts of GPU resources, is compatible with different brands of ultrasound machines and doctors' scanning techniques, has strong generalization and excellent real-time performance, and its processing efficiency meets the needs of real-time clinical scanning. By accurately extracting motion visual features through background separation and combining pixel statistics to achieve grading of ultrasound scanning motion states, it can accurately distinguish different scanning motion states, providing precise motion range prompts for ultrasound AI-assisted diagnosis. From the perspective of motion analysis, it effectively reduces false alarms in real-time scanning and enhances sensitivity to stable ranges of interest to doctors, reducing the risk of missed alarms. This invention can also reproduce the actual operating techniques of doctors, helping them quickly locate effective operating ranges for image recording and measurement, improving diagnostic and follow-up efficiency, providing important motion state support for subsequent ultrasound AI image analysis, and promoting the implementation and development of AI medical technology in the field of ultrasound diagnosis. Attached Figure Description

[0036] Figure 1 This is a flowchart of the real-time motion analysis method for linear ultrasound images based on pure vision, according to the first embodiment of the present invention.

[0037] Figure 2 This is a dynamic ultrasound image acquired by the linear array probe of an ultrasound machine in the first embodiment of the present invention;

[0038] Figure 3 This is a process diagram of extracting the working area in the first embodiment of the present invention;

[0039] Figure 4 This is a schematic diagram of the working area of ​​the ultrasonic dynamic image in the first embodiment of the present invention;

[0040] Figure 5 This is a schematic diagram of the region of interest in the ultrasound dynamic image in the first embodiment of the present invention;

[0041] Figure 6 This is a comparison chart of the effects of histogram equalization processing on different models before and after the first embodiment of the present invention;

[0042] Figure 7 These are the intermediate frames and the obtained foreground mask image during uniform movement in the first embodiment of the present invention;

[0043] Figure 8 These are intermediate frames and the obtained foreground mask image during rapid movement in the first embodiment of the present invention;

[0044] Figure 9 These are the intermediate frames and the obtained foreground mask image during static micro-motion in the first embodiment of the present invention. Detailed Implementation

[0045] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.

[0046] The first embodiment of the present invention relates to a real-time motion analysis method for linear ultrasound images based on pure vision, such as... Figure 1 As shown, it includes the following steps:

[0047] Step 1: Acquire dynamic ultrasound images using an ultrasonic linear array probe (see...) Figure 2 The ultrasound dynamic images are then preprocessed. The specific preprocessing steps are as follows:

[0048] First, the working area of ​​the ultrasound dynamic image is extracted. Since ultrasound images contain many black borders, these areas are not the actual working area of ​​the ultrasound image and will affect subsequent algorithms. This step extracts the working area using conventional image processing methods, including image grayscale conversion and opening operations. The process diagram obtained after this image processing is shown below. Figure 3 As shown. Then, for the white pixels in the process diagram, find the minimum bounding rectangle of the largest connected region to obtain the working area, as shown. Figure 4 As shown in the green box.

[0049] Then, the extracted working area is divided into a shallow region of interest (ROI) and a central region of interest (ROI). In this step, two ROIs are defined: the shallow ROI is located vertically from the top of the working area to one-fifth of its height, and horizontally from the leftmost to the rightmost edge; the central ROI is located vertically at one-fifth to two-fifths to four-fifths of the working area's height, and horizontally at one-fifth to four-fifths of its width. The final positions of the shallow and central ROIs within the working area are as follows: Figure 5 As shown, the superficial region of interest mainly focuses on the movement trends of subcutaneous and muscle tissues, while the central region of interest mainly focuses on the movement trends of the object in focus.

[0050] Finally, histogram equalization is performed on the shallow region of interest and the central region of interest to obtain an ultrasound dynamic image with an approximately uniform distribution of grayscale histograms.

[0051] Since the ultrasound dynamic images come from different brands and models of ultrasound equipment with varying gain settings, the grayscale distributions presented are significantly different. In order to unify the input metric standard for subsequent algorithms and enhance cross-device generalization ability, this implementation method uses histogram equalization for standardization processing. Figure 6 The comparison of processing performance between Brand A and Brand B models is shown.

[0052] Histogram equalization is an image enhancement method that expands the brightness range of the original image by transforming its grayscale histogram into an approximately uniform distribution through a cumulative integral function. This allows for the adjustment of ultrasound image brightness to a reasonable range under different conditions. The histogram equalization process in this embodiment is as follows:

[0053] Count the number of pixels at each gray level in the shallow region of interest and the central region of interest, respectively. ,in, The number of gray levels;

[0054] Calculate the probability density of each gray level based on the number of pixels at each gray level. The calculation method is as follows: , This represents the total number of pixels.

[0055] The cumulative distribution function is calculated based on the probability density of each gray level. The calculation method is as follows: ;

[0056] The gray level output based on the cumulative distribution function This yields an ultrasound dynamic image with an approximately uniformly distributed grayscale histogram, in which... .

[0057] Step 2: The image sequence of the preprocessed ultrasound dynamic image is dynamically analyzed using the background separation method to extract motion-related visual features and obtain a foreground mask.

[0058] This step performs motion analysis on the processed image sequence, employing a Mixture of Gaussians (MOG2) model. MOG2 characterizes the statistical properties of the background in dynamic video by establishing a mixture model consisting of K Gaussian distributions for each pixel. This algorithm models the temporal grayscale distribution of each pixel in the ROI image sequence as a weighted sum of multiple Gaussian distributions and adaptively updates the model parameters using an online Expectation-Maximization (EM) algorithm, thereby distinguishing between stable backgrounds and moving foregrounds. This step specifically includes:

[0059] Parameter initialization: For each pixel of a frame in the image sequence of the preprocessed ultrasound dynamic image, Observations at time A mixture model consisting of K Gaussian distributions can be constructed, which can be expressed as:

[0060] ;

[0061] in, for Time of the first The weights are distributed in a Gaussian manner, satisfying... , for Time of the first The mean of a Gaussian distribution, for Time of the first The variance of a Gaussian distribution Let be the Gaussian probability density function, expressed as:

[0062] ;

[0063] Observations from the first frame During initialization, the mean ,variance Weight .

[0064] Parameter update: When a new frame arrives, if the observed pixel value of the new frame is different from the previous time step... The mean of each Gaussian distribution is less than a threshold, i.e. If the observed pixel value of the new frame is different from that of the previous frame, then no update will be performed. The mean of each Gaussian distribution is not less than a threshold, i.e. Then, the parameters of the hybrid model are updated online to match the first... A Gaussian distribution.

[0065] When updating, the weight update formula is:

[0066] ;

[0067] The mean update formula is:

[0068] ;

[0069] The variance update formula is:

[0070] ;

[0071] in, The learning rate is set to 0.01 in this implementation. The adaptive learning factor is expressed as: .

[0072] Background determination: After updating the parameters of the hybrid model, the K Gaussian distributions of each pixel are filtered to determine the background and foreground distributions, and a foreground mask image is output. Specifically, this includes:

[0073] Arrange the K Gaussian distributions of each pixel in descending order of weight from high to low;

[0074] From the sorted Gaussian distribution, take the first B weights and sum them up. If the sum is greater than the background threshold... ,Right now If the background threshold is specified, then the pixel is determined to be part of the background distribution; where the background threshold is specified. It can be set to 0.7.

[0075] Based on the determination result of the background distribution, a foreground mask image is output. That is, the gray value of pixels that are determined to be background distribution is set to 0 in the output foreground mask image, and the gray value of pixels that are not determined to be background distribution (i.e., foreground moving pixels) is set to 255 in the output foreground mask image. Figures 7-9 The intermediate frames and the resulting foreground mask images are shown for uniform movement, rapid movement, and stationary micro-motion, respectively.

[0076] Step 3: Based on the foreground mask image, the motion state of the ultrasonic scan is classified using pixel statistics.

[0077] This step involves classifying the scanning motion by analyzing the extracted foreground mask and combining it with multiple frames of images. The motion is categorized into frame freeze, stillness, fine-tuning, movement, and switching. The doctor's movement within these zones is observed in real-time using a purely visual method. This implementation uses a 5-frame sequence to classify the moving ultrasound images, updating the motion state every 5 frames. The foreground mask is used for multi-frame integration processing to obtain five categories of results, specifically including:

[0078] The ratio of moving pixels to the total number of pixels in the foreground mask image of each frame is calculated, and the feature value is determined based on the ratio. The ratio is calculated as follows:

[0079] ;

[0080] in, This represents the number of moving pixels in the foreground mask image. This represents the total number of pixels in the ROI region. and Let represent the feature values ​​of the shallow region of interest and the central region of interest, respectively. The feature values ​​are obtained by weighted summation, i.e.:

[0081] ;

[0082] Using a sliding window of 5 frames, the average and variance of the feature values ​​within the sliding window, as well as the difference in feature values ​​between adjacent frames, are calculated. The sliding window is updated using a first-in, first-out (FIFO) method; for each new frame of data received, the oldest frame is discarded and the most recent frame is included.

[0083] The average of the eigenvalues ​​is used as a baseline estimate, and it is calculated as follows: ;

[0084] The variance of eigenvalues ​​is used to measure the degree of time series fluctuation, and it is calculated as follows: .

[0085] Based on the average value of the eigenvalues ,variance and the feature value difference between adjacent frames A state discrimination model is used to classify the motion state of ultrasonic scanning. The state discrimination model in this embodiment is expressed as follows:

[0086] ;

[0087] in, For a preset threshold, and In this embodiment In actual use, it can be fine-tuned according to the model. Indicates a frozen state, used for image capture and analysis of lesions; Indicates a static state, used for measuring lesions; This indicates a fine-tuning state, used for focusing and adjusting the target lesion; Indicates movement status, used to locate lesions; This indicates a state switch, used for scanning organs.

[0088] It is easy to see that this invention does not require deep learning or data learning. It completes motion analysis solely through preprocessing, background separation for feature extraction, and pixel statistical grading. It does not rely on neural networks or external sensors, does not consume large amounts of GPU resources, is compatible with different brands of ultrasound machines and doctors' scanning techniques, exhibits strong generalization and excellent real-time performance, and its processing efficiency meets the needs of real-time clinical scanning. By accurately extracting motion visual features through background separation and combining pixel statistics to achieve grading of ultrasound scanning motion states, it can accurately distinguish different scanning motion states, providing precise motion range prompts for ultrasound AI-assisted diagnosis. From a motion analysis perspective, it effectively reduces false alarms in real-time scanning and enhances sensitivity to stable regions of interest to doctors, reducing the risk of missed alarms.

[0089] The second embodiment of the present invention relates to an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the real-time motion analysis method for linear ultrasound images based on pure vision of the first embodiment.

[0090] The third embodiment of the present invention relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the real-time motion analysis method for linear array ultrasound images based on pure vision of the first embodiment.

[0091] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0092] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction methods implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0095] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A real-time motion analysis method based on purely visual linear ultrasound images, characterized in that, Includes the following steps: Ultrasonic dynamic images are acquired using an ultrasonic machine linear array probe, and the ultrasonic dynamic images are preprocessed. The image sequence of the preprocessed ultrasound dynamic image was dynamically analyzed by background separation to extract motion-related visual features and obtain a foreground mask image. The motion state of ultrasonic scanning is classified based on the foreground mask image using pixel statistics.

2. The real-time motion analysis method for linear ultrasound images based on pure vision according to claim 1, characterized in that, The preprocessing of the ultrasound dynamic image specifically includes: Extract the working area of ​​the ultrasound dynamic image; The extracted working area is divided into shallow region of interest and central region of interest. Histogram equalization is performed on the shallow region of interest and the central region of interest to obtain an ultrasound dynamic image with an approximately uniform distribution of grayscale histograms.

3. The real-time motion analysis method for linear ultrasound images based on pure vision according to claim 2, characterized in that, The step of performing histogram equalization on the shallow region of interest and the central region of interest to obtain an ultrasound dynamic image with an approximately uniformly distributed grayscale histogram specifically includes: Count the number of pixels at each gray level in the shallow region of interest and the central region of interest, respectively; Calculate the probability density of each gray level based on the number of pixels at each gray level; The cumulative distribution function is calculated based on the probability density of each gray level; Based on the gray levels output by the cumulative distribution function, an ultrasound dynamic image with an approximately uniformly distributed gray-level histogram is obtained.

4. The real-time motion analysis method for linear ultrasound images based on pure vision according to claim 1, characterized in that, The image sequence of the preprocessed ultrasound dynamic image is dynamically analyzed using a background separation method to extract motion-related visual features and obtain a foreground mask image, specifically including: For the observation values ​​of each pixel in a frame of the preprocessed ultrasound dynamic image sequence, a mixture model consisting of K Gaussian distributions is constructed. When a new frame arrives, if the observed pixel value of the new frame is different from that of the previous frame... The mean of the Gaussian distribution is less than a preset multiple at the previous time step. If the variance of a Gaussian distribution is less than or equal to the variance of the pixel in the new frame, no update is performed. The mean of the Gaussian distribution is not less than a preset multiple of the value of the previous time step. The variance of the Gaussian distribution is used to update the parameters of the mixture model online to match the first Gaussian distribution. A Gaussian distribution; After updating the parameters of the hybrid model, the K Gaussian distributions of each pixel are filtered to determine the background and foreground distributions, and the foreground mask is output.

5. The real-time motion analysis method for linear ultrasound images based on pure vision according to claim 4, characterized in that, The parameters of the hybrid model are updated online to match the first... When the distribution is Gaussian, the weight update formula is: The mean update formula is: The variance update formula is: ;in, and They are respectively Time and Time of the first The weights of a Gaussian distribution and They are respectively Time and Time of the first The mean of a Gaussian distribution, and They are respectively Time and Time of the first The variance of a Gaussian distribution For learning rate, For adaptive learning factors, for The observed value of the pixel at time t.

6. The real-time motion analysis method for linear ultrasound images based on pure vision according to claim 4, characterized in that, After updating the parameters of the hybrid model, the K Gaussian distributions of each pixel are filtered to clarify the background distribution, and a foreground mask image is output. Specifically, this includes: Arrange the K Gaussian distributions of each pixel in descending order of weight from high to low; From the sorted Gaussian distribution, take the first B weights and sum them up. If the sum is greater than the background threshold, then the pixel is determined to be part of the background distribution. Output the foreground mask image based on the background distribution determination result.

7. The real-time motion analysis method for linear ultrasound images based on pure vision according to claim 1, characterized in that, The step of classifying the motion state of ultrasonic scanning based on the foreground mask image using pixel statistics specifically includes: The ratio of moving pixels to the total number of pixels in the foreground mask image of each frame is calculated, and the feature value is determined based on the ratio. Using a preset number of frames as a sliding window, calculate the average and variance of the feature values ​​within the sliding window, as well as the difference in feature values ​​between adjacent frames; Based on the average value, variance, and difference of feature values ​​between adjacent frames, a state discrimination model is used to classify the motion state of ultrasonic scanning.

8. The real-time motion analysis method for linear ultrasound images based on pure vision according to claim 7, characterized in that, The state discrimination model is as follows: ,in, The variance of the eigenvalues The feature value difference between adjacent frames. The average of the eigenvalues. For a preset threshold, and , Indicates a frozen state, used for image capture and analysis of lesions; Indicates a static state, used for measuring lesions; This indicates a fine-tuning state, used for focusing and adjusting the target lesion; Indicates movement status, used to locate lesions; This indicates a state switch, used for scanning organs.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the real-time motion analysis method for linear ultrasound images based on pure vision as described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the real-time motion analysis method for linear ultrasound images based on pure vision as described in any one of claims 1-8.