Motion state detection method and related equipment and storage medium
By automatically identifying the target area and calculating the motion displacement of the optical flow tracking point, the problem of high complexity of the motion state detection method of traditional equipment is solved, and efficient and automated motion state detection is achieved.
Patent Information
- Application Number
- CN202510157870.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-02-13
AI Technical Summary
Traditional equipment motion state detection methods rely on external sensors, increase development costs and limit the applicability and flexibility of the solution, and require manual settings of detection areas, resulting in high configuration complexity.
By obtaining prompt information and original images, the target area is automatically determined, and the optical flow tracking point is determined in the target area, the motion displacement of the optical flow tracking point is calculated, and the motion state of the detection object is determined.
Automatically determine the target area without manual configuration, reducing the complexity of the detection area configuration and improving the efficiency and accuracy of motion state detection.
Smart Images

Figure CN119625032B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a motion state detection method and related equipment and storage medium. Background Art
[0002] In today's industrial production processes, there is a growing demand for intelligent identification of equipment motion status. Traditional solutions usually rely on external sensors to collect equipment operation data, which not only increases development costs but also limits the applicability and flexibility of the solution.
[0003] Therefore, a solution is proposed: using video analysis technology to directly identify the operation data of the equipment from the collected images. However, when analyzing the images, it is usually necessary to manually set the detection area, which makes the configuration of the detection area more complicated. Summary of the invention
[0004] The present application at least provides a motion state detection method and related equipment and storage medium to at least reduce the complexity of the detection area configuration.
[0005] The first aspect of the present application provides a motion state detection method, comprising: obtaining prompt information and an original image; wherein the prompt information is used to indicate a detection object; performing detection based on the prompt information and the original image to obtain a target area in the original image; wherein the target area is the image area in the original image where the detection object is located; determining at least one pixel point in the target area as an optical flow tracking point, and determining the motion displacement of the optical flow tracking point in the original image of the current frame relative to the same optical flow tracking point in the original image of the reference frame; wherein the reference frame is an adjacent frame of the current frame; determining the motion state of the detection object according to the motion displacement of the optical flow tracking point.
[0006] A second aspect of the present application provides an electronic device, comprising a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the motion state detection method in the first aspect.
[0007] A third aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the motion state detection method in the first aspect described above is implemented.
[0008] The above scheme obtains the target area in the original image based on the prompt information and the original image, and determines the motion state of the detection object in the target area according to the obtained target area, so that the target area can be automatically determined without manual configuration of the target area, thereby reducing the complexity of the target area configuration.
[0009] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0011] Figure 1 It is a flow chart of an embodiment of a motion state detection method of the present application;
[0012] Figure 2 is a schematic diagram of an original image in an embodiment of the present application;
[0013] Figure 3 is a schematic diagram of a target indication line in one embodiment of the present application;
[0014] Figure 4 is a schematic diagram of a target indication line selected in a target area in an embodiment of the present application;
[0015] Figure 5 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;
[0016] Figure 6 A schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0017] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0018] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0019] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0020] See also Figure 1 , the motion state detection method includes:
[0021] Step S20: Obtain prompt information and an original image; wherein the prompt information is used to indicate the detection object.
[0022] Step S40: Perform detection based on the prompt information and the original image to obtain a target area in the original image; wherein the target area is an image area where the detection object is located in the original image.
[0023] Step S60: Determine at least one pixel point in the target area as an optical flow tracking point, and determine the motion displacement of the optical flow tracking point in the original image of the current frame relative to the same optical flow tracking point in the original image of the reference frame; wherein the reference frame is an adjacent frame of the current frame.
[0024] Step S80: Determine the motion state of the detection object according to the motion displacement of the optical flow tracking point.
[0025] The original image is an image acquired by a camera device, and the original image includes the detection object. Figure 2 As shown, the original image may be an image taken of a conveyor belt, and the original image may include other irrelevant debris in addition to the conveyor belt. The purpose of detecting the target area based on the prompt information and the original image is to remove information in the original image that is irrelevant to the target area, so that when the motion state of the detection object is determined for the target area later, only the target area in the original image is analyzed, which is conducive to reducing the computing power requirements and improving the accuracy of motion state detection.
[0026] The prompt information may include image-based prompt information, text-based prompt information, or both image-based and text-based prompt information. For example, when the detection object is a conveyor belt, the prompt information may be an image of the conveyor belt, or text related to the conveyor belt (such as the three words "conveyor belt"), or an image of the conveyor belt and text related to the conveyor belt. This application does not limit the type and quantity of prompt information.
[0027] The target area is the image area where the detection object is located in the original image, so the target area can be an image area that is close to the outer contour surrounding the detection object, that is, the target area does not include any other debris except the detection object; the target area can also be the circumscribed rectangle of the outer contour of the detection object, that is, in addition to the detection object, there can be some other debris in the target area. In short, the determination of the target area is to exclude information in the original image that is irrelevant to the detection object as much as possible, so as to reduce the computing power required for analysis and improve efficiency when the motion state of the detection object is subsequently analyzed, and the degree of exclusion of irrelevant information is not limited in this application.
[0028] It can be understood that the motion state of the detection object can be determined based on multiple frames of original images of the detection object acquired successively. And when determining the motion state, it is necessary to compare the original image of the current frame with the original image acquired previously, and the original image acquired previously for comparison is the reference frame original image. The reference frame original image can be an original image acquired at a certain time before the current frame, such as an original image acquired 1 second before the current frame; or an original image of a certain number of frames before the current frame, such as the original image of the 3rd frame or the 1st frame before the current frame.
[0029] The motion state detection method provided in this application can be applied to the field of industrial product transportation, such as ore transportation, etc. Figure 2 , Figure 2 The figure shows a scene of using a conveyor belt to transport ore during ore screening. Cameras and other image acquisition devices can be used to capture images of the area near the conveyor belt, and the movement state of the conveyor belt (such as stopped, running, etc.) can be analyzed based on the images. Since the captured images include a lot of redundant information (such as Figure 2 In order to reduce the impact of redundant information on motion state detection, the target area can be delineated, and only the target area in the original image needs to be analyzed for motion state later. However, traditional solutions usually rely on manual target selection, such as setting coordinate points, etc., and for different image acquisition positions or different image acquisition devices, the target area needs to be selected separately. This reduces work efficiency.
[0030] The above scheme obtains the target area in the original image based on the prompt information and the original image, and determines the motion state of the detection object in the target area according to the obtained target area, so that the target area can be automatically determined without manual configuration of the target area, thereby reducing the complexity of the target area configuration.
[0031] In addition, there is no need to repeat the target area configuration for different image acquisition devices or inspection objects in different areas, which significantly reduces the need for repetitive development work and manual configuration, and improves the efficiency and automation level of the inspection process.
[0032] In some embodiments, the target area in the original image is obtained by detecting based on the prompt information and the original image, including:
[0033] Step S41: input the prompt information and the original image into the target area detection model, encode the prompt information into prompt embedding, and extract multi-scale features from the original image.
[0034] Step S42: Fuse multi-scale features and hint embedding to obtain fused features.
[0035] Step S43: Predict based on the fused features to obtain the target area in the original image, and the target area includes the detection object.
[0036] In some embodiments, the target area detection model can be a YOLO-world detection model, which can be composed of a YOLO detector, an independent visual encoder and a global-local visual feature fusion module. When given image type prompt information (such as an image related to a conveyor belt), the visual encoder in YOLO-world encodes the image prompt information into a visual prompt embedding. The image encoder in the YOLO detector extracts multi-scale features from the original image, and uses the global-local visual feature fusion module to fuse the multi-scale features and visual prompt embedding of the original image to obtain the detection module provided by the YOLO detector, thereby making a prediction based on the fused features to obtain the target area in the original image.
[0037] The target area detection model may also be other detection models, such as a SAM model, etc., which is not limited in this application.
[0038] The above scheme obtains the target area in the original image based on the prompt information and the original image, and determines the motion state of the detection object in the target area according to the obtained target area, so that the target area can be automatically determined without manual configuration of the target area, thereby reducing the complexity of the target area configuration. In addition, for different image acquisition devices or detection objects in different areas, high-precision real-time detection of various target areas can be achieved by externally registering the target to be identified, and the target area is automatically generated using the target area detection model without repeated target area configuration, thereby significantly reducing the need for repetitive development work and manual configuration, and improving the efficiency and automation level of the detection process.
[0039] In some embodiments, determining at least one pixel point in the target area as an optical flow tracking point comprises:
[0040] At least one pixel point on the detection object is determined in the target area as an optical flow tracking point.
[0041] Combination Figure 2 , assuming the detection object is Figure 2 If there is a conveyor belt in the image, at least one pixel point on the conveyor belt can be used as an optical flow tracking point. For example, 1, 2, or 3 pixel points on the conveyor belt can be used as optical flow tracking points. This application does not limit the number of optical flow tracking points.
[0042] The selection of optical flow tracking points can be random or according to a predetermined rule, such as selecting a pixel point as an optical flow tracking point at a predetermined distance in the conveyor belt area, etc. This application does not impose any restrictions.
[0043] In some embodiments, determining at least one pixel point in the target area as an optical flow tracking point comprises:
[0044] Step S61: determining a target indication line on the detection object in the target area, wherein the target indication line is parallel to a moving direction of the detection object.
[0045] Step S62: determining a plurality of pixel points on the target indication line as the optical flow tracking points.
[0046] like Figure 3 As shown, Figure 3 The dotted line in the figure represents the target indicator line. Figure 3 The conveyor belt in the image moves from the bottom to the top of the image, and the target indicator line is selected in the direction of the conveyor belt movement, so the target indicator line only involves the conveyor belt, and does not involve other debris (such as the ground on both sides of the conveyor belt). Compared with the embodiment of using the diagonal corner of the target area as the target indicator line, this embodiment can determine that the optical flow tracking point is a pixel on the detection object, and prevent the pixel points on other debris from being used as optical flow tracking points, resulting in motion state analysis errors (because other debris, such as the ground, etc., its motion state itself is static, if it is used as an optical flow tracking point, it will affect the motion state analysis effect of the conveyor belt).
[0047] In addition, due to the distortion effect of the image captured by the image acquisition device (for example, the position close to the image acquisition device and the position far away from the image acquisition device in the image will be distorted to a certain extent), the target indication line is configured to be parallel to the movement direction of the detection object, such as Figure 3 The target indicator line extends from the bottom of the image to the top of the image. Therefore, when several pixels are selected on the target indicator line as optical flow tracking points, it is beneficial for the optical flow tracking points to cover pixels whose distances from the image acquisition device range from far to near, thereby improving the accuracy of motion state detection.
[0048] In some embodiments, a number of pixel points may be uniformly selected at predetermined intervals on the target indication line as optical flow tracking points.
[0049] In some embodiments, please refer to Figure 4 The black box area is the target area, and the dotted line represents the target indicator line. The target indicator line can be determined in the middle of the target area along the motion direction of the detection object, which is conducive to avoiding the contact between the target indicator line and other debris, resulting in the optical flow tracking point selected on the target indicator line not being on the detection object. Therefore, it is conducive to further improving the accuracy of motion state detection.
[0050] In some embodiments, a plurality of optical flow tracking points are determined in the target area; and determining the motion state of the detection object according to the motion displacement of the optical flow tracking points includes:
[0051] Step S81: Determine the average motion displacement of the optical flow tracking points based on the motion displacement of multiple optical flow tracking points in the original image of the current frame relative to the same optical flow tracking points in the original image of the adjacent frame.
[0052] Step S82: Determine the motion state of the detection object according to the average motion displacement and the displacement threshold.
[0053] In some embodiments, determining the motion state of the detection object based on the average motion displacement and the displacement threshold includes determining that the motion state of the detection object is a first motion state in response to the average motion displacement of the optical flow tracking points being greater than the displacement threshold; and determining that the motion state of the detection object is a second motion state in response to the average displacement of the optical flow tracking points not exceeding the displacement threshold; wherein the first motion state and the second motion state respectively represent different degrees of motion.
[0054] Exemplarily, the first motion state may be a moving state, the second motion state may be a stationary state, etc. When the average motion displacement is greater than the displacement threshold, it can be determined that the detection object is in a moving state, and conversely, when the average motion displacement is less than the displacement threshold, it can be determined that the detection object is in a stationary state. The value of the displacement threshold can be selected according to the actual scenario, and this application does not limit it.
[0055] For example, N pixels may be uniformly selected from the target indication line as optical flow tracking points, and the average moving distance of the optical flow tracking points between two adjacent frames of original images may be calculated using the LK optical flow method:
[0056] ;
[0057] Among them, dist is the average moving distance, , is the coordinate value of the i-th optical flow tracking point in the original image of the current frame, , is the coordinate value of the i-th optical flow tracking point in the original image of the adjacent frame.
[0058] In the above embodiment, the motion state of the detected object is determined by comparing the average motion displacement of multiple optical flow tracking points with a displacement threshold. Compared with the embodiment in which the motion state is determined based on the motion displacement of a single optical flow tracking point, this is beneficial to reducing the impact of the motion displacement detection error of a certain optical flow tracking point on the motion state analysis, thereby helping to improve the accuracy of the motion state analysis.
[0059] In other embodiments, after determining multiple optical flow tracking points in the target area and obtaining the motion displacement of each optical flow tracking point, the average motion displacement of each optical flow tracking point may not be calculated, but the number of optical flow tracking points whose motion displacement is greater than the displacement threshold among the optical flow tracking points may be determined, and the proportion of the number of optical flow tracking points greater than the displacement threshold to the number of all optical flow tracking points may be determined. When the proportion is greater than a preset threshold, it is determined that the detected object is in a moving state. For example, if 20 optical flow tracking points are determined in the target area, and the motion displacement of 18 optical flow tracking points is greater than the displacement threshold, and the preset threshold is 75%, it can be determined that the detected object is in a moving state.
[0060] In some embodiments, determining the motion state of the detected object according to the displacement of the optical flow tracking point includes:
[0061] Step S91: Determine the candidate motion state of the detection object in the original image of the current frame according to the motion displacement of the optical flow tracking point; the candidate motion state includes a first motion state and a second motion state, wherein the first motion state and the second motion state represent different degrees of motion respectively.
[0062] For example, the average displacement can be calculated based on the motion displacements of multiple optical flow tracking points, and the candidate motion state can be determined based on the relationship between the average displacement and the displacement threshold; or the number of optical flow tracking points whose motion displacement is greater than the displacement threshold can be determined based on the relationship between the motion displacement of each optical flow tracking point and the displacement threshold, thereby determining the candidate motion state, etc. For details, please refer to the aforementioned embodiments, which will not be repeated here.
[0063] Step S92: Determine the motion state of the detection object according to the candidate motion states of the detection object in several frames of the original images.
[0064] Exemplarily, the motion state of the detected object can be determined according to the ratio of the number of candidate motion states corresponding to several frames of original images that are in the static state to the total number of original images. For example, if motion state detection is performed on 20 frames of original images, and 18 frames (accounting for 90%) indicate that the candidate motion state is in the static state, then the motion state of the detected object is determined to be in the static state.
[0065] In the previous embodiment, the motion state of the detection object is determined by a certain frame of original image and its adjacent original images. However, if the motion state is determined only by a certain frame of original image, the detection of the motion state may be inaccurate due to some unexpected conditions, such as some ores on the conveyor belt rolling unexpectedly. In this embodiment, the motion state of the detection object is determined by the candidate states of several frames of original images, which is conducive to reducing the impact of inaccurate detection results of one or several frames on the final result, thereby helping to improve the accuracy of motion state detection.
[0066] In some embodiments, determining the motion state of the detection object according to the candidate motion states of the detection object in several frames of the original image includes:
[0067] Step S921: Determine the frame number of the first original image indicating that the candidate motion state of the detection object is the first motion state.
[0068] Step S922: when the number of frames of the first original image and a preset frame number threshold satisfy a preset condition, determining that the motion state of the detection object is the first motion state.
[0069] Exemplarily, in step S91, the original image corresponding to the motion displacement of the optical flow tracking point being greater than the displacement threshold can be recorded as the original image indicating that the motion state is a moving state, and when the original image indicating that the motion state is a moving state is obtained, a value can be assigned to the original image (for example, a value of 1, 2, etc.); and when the original image indicating that the motion state is a stationary state is obtained, another value can be assigned to the original image (for example, a value of 0, 1, etc.). At the same time, an array queue of length M can be set, and the results obtained in step S91 can be continuously pushed into the array queue, first in first out.
[0070] After the array queue is pushed into the results of M steps S91, the advanced voting mechanism performs a comprehensive analysis on the motion state of the detection object, such as calculating the number of 1s in the array queue or calculating the sum of the values assigned to each original image in the array queue. When the number of 1s in the array queue or the sum of the values assigned to each original image is greater than the first threshold, the detection object is determined to be in a moving state, otherwise it is determined to be stationary.
[0071] This embodiment is helpful to reduce state fluctuations caused by environmental noise or rapid movement of the detection object, and is helpful to ensure that the output motion state information is both continuous and stable.
[0072] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0073] See also Figure 5 , Figure 5 : is a schematic diagram of a framework of an embodiment of an electronic device 50 of the present application. The electronic device 50 includes a memory 51 and a processor 52 coupled to each other, and the processor 52 is used to execute program instructions stored in the memory 51 to implement the steps in any of the above-mentioned motion state detection method embodiments. In a specific implementation scenario, the electronic device 50 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 50 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.
[0074] Specifically, the processor 52 is used to control itself and the memory 51 to implement the steps in any of the above-mentioned motion state detection method embodiments. The processor 52 can also be called a CPU (Central Processing Unit). The processor 52 may be an integrated circuit chip with signal processing capabilities. The processor 52 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 52 can be implemented by an integrated circuit chip.
[0075] The above scheme obtains the target area in the original image based on the prompt information and the original image, and determines the motion state of the detection object in the target area according to the obtained target area, so that the target area can be automatically determined without manual configuration of the target area, thereby reducing the complexity of the target area configuration.
[0076] See also Figure 6 , Figure 6 The schematic diagram of the framework of an embodiment of a computer-readable storage medium 60 of the present application. The computer-readable storage medium 60 stores program instructions 601 that can be executed by a processor, and the program instructions 601 are used to implement the steps in any of the above-mentioned motion state detection method embodiments.
[0077] The above scheme obtains the target area in the original image based on the prompt information and the original image, and determines the motion state of the detection object in the target area according to the obtained target area, so that the target area can be automatically determined without manual configuration of the target area, thereby reducing the complexity of the target area configuration.
[0078] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0079] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0080] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0081] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0082] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0083] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
Claims
1. A motion state detection method, characterized in that: include: Acquire prompt information and an original image; wherein the prompt information is used to indicate a detection object; the detection object is a conveyor belt; Performing detection based on the prompt information and the original image to obtain a target area in the original image; wherein the target area is an image area in the original image where the detection object is located; Determine at least one pixel point in the target area as an optical flow tracking point, and determine the motion displacement of the optical flow tracking point in the original image of the current frame relative to the same optical flow tracking point in the original image of the reference frame; wherein the reference frame is an adjacent frame of the current frame; Determining the motion state of the detection object according to the motion displacement of the optical flow tracking point; Determining at least one pixel point in the target area as an optical flow tracking point comprises: Determining a target indication line on the detection object in the target area, wherein the target indication line is parallel to a movement direction of the detection object; A plurality of pixel points are determined on the target indication line as the optical flow tracking points.
2. The motion state detection method according to claim 1, characterized in that: The detecting based on the prompt information and the original image to obtain the target area in the original image includes: Inputting the prompt information and the original image into a target region detection model, encoding the prompt information into a prompt embedding, and extracting multi-scale features from the original image; fusing the multi-scale features and the hint embedding to obtain a fused feature; Prediction is performed based on the fusion features to obtain a target area in the original image, and the target area includes the detection object.
3. The motion state detection method according to claim 1, characterized in that: Determining at least one pixel point in the target area as an optical flow tracking point comprises: At least one pixel point on the detection object is determined in the target area as the optical flow tracking point.
4. The motion state detection method according to claim 1, characterized in that: Determining that a plurality of optical flow tracking points are present in the target area; and determining the motion state of the detection object according to the motion displacement of the optical flow tracking points comprises: Determine an average motion displacement of the optical flow tracking points based on the motion displacement of a plurality of the optical flow tracking points in the original image of the current frame relative to the same optical flow tracking points in the original image of the adjacent frame; The motion state of the detection object is determined according to the average motion displacement and the displacement threshold.
5. The motion state detection method according to claim 4, characterized in that: Determining the motion state of the detection object according to the average motion displacement and the displacement threshold comprises: In response to the average motion displacement of the optical flow tracking point being greater than the displacement threshold, determining that the motion state of the detection object is a first motion state; In response to the average displacement of the optical flow tracking points not exceeding the displacement threshold, determining that the motion state of the detection object is a second motion state; wherein the first motion state and the second motion state represent different degrees of motion respectively.
6. The motion state detection method according to claim 1, characterized in that: Determining the motion state of the detection object according to the displacement of the optical flow tracking point includes: Determine, according to the motion displacement of the optical flow tracking point, a candidate motion state of the detection object in the current frame original image; the candidate motion state includes a first motion state and a second motion state, wherein the first motion state and the second motion state represent different degrees of motion respectively; The motion state of the detection object is determined according to the candidate motion states of the detection object in several frames of the original images.
7. The motion state detection method according to claim 6, characterized in that: The determining the motion state of the detection object according to the candidate motion states of the detection object in the original images of the plurality of frames comprises: determining a frame number of a first original image indicating that the candidate motion state of the detection object is the first motion state; When the number of frames of the first original image and a preset frame number threshold satisfy a preset condition, it is determined that the motion state of the detection object is the first motion state.
8. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the motion state detection method according to any one of claims 1 to 7.
9. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the motion state detection method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and system for recognizing abnormal operation state of escalator
CN103699878A
Real-time visual target tracking method based on light streams
CN104200494A
Image processing method and device
CN107610108A