A video image feature tracking method and device based on artificial intelligence
Through the video image feature tracking method based on the neural network model, combining the features of the M-Nth frame image and the M+Nth frame image, the problem of high computational power consumption of feature tracking in high frame rate videos is solved, and faster processing speed is achieved. .
Patent Information
- Application Number
- CN202410827859.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-06-25
AI Technical Summary
Existing video image feature tracking technology consumes a lot of computing power in videos with high frame rates, and the processing speed is slow, making it difficult to achieve efficient feature tracking.
Using the video image feature tracking method based on the neural network model, the target image is determined by obtaining the Mth frame image in the target video section, and based on the target image in the M-Nth frame image and M+Nth frame image, the moving speed and direction, and then predict the target image in the M+Nth frame image and the M-Nth frame image, reducing the need for recognition of all video frames and saving computing power.
In video image processing, by performing target recognition on the M-th frame image, the M-N-th frame image and the M+N-th frame image can be displayed. Compared with target recognition on all video frames, it saves computing power and improves the processing speed. .
Smart Images

Figure CN118397517B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a method and device for tracking video image features based on artificial intelligence. Background Art
[0002] With the rapid development of information technology, artificial intelligence (AI) has gradually penetrated into all aspects of our lives, especially in the field of video image processing, where its application is becoming increasingly widespread. Video image feature tracking technology, as an important branch of artificial intelligence in the field of video processing, has become a research hotspot and cutting-edge technology.
[0003] The core of video image feature tracking technology is to realize automatic recognition and continuous tracking of specific targets in video images through computer vision and machine learning algorithms. This technology involves knowledge from multiple disciplines, including image processing, pattern recognition, machine learning, artificial intelligence, etc. By using these technologies, we can accurately and efficiently locate and track targets in video images, thereby providing important support for subsequent intelligent analysis, decision-making and control.
[0004] The continuous tracking of features in a video image is generally carried out by extracting features from each frame of the video image. However, for videos with a high frame rate, extracting features from each frame will consume a lot of computing power and the processing speed will be slow. Summary of the invention
[0005] The embodiments of the present application provide a video image feature tracking method and device based on artificial intelligence to improve the above-mentioned problems.
[0006] In order to achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, an embodiment of the present application proposes a video image feature tracking method based on artificial intelligence, the method comprising:
[0008] Obtain the target video section, and obtain the Mth frame image based on the target video section;
[0009] Determine and display the target image in the Mth frame image based on the neural network model, wherein the target image is an image of the tracked feature;
[0010] Obtain the MNth frame image and the M+Nth frame image, and determine the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, where M and N are natural numbers greater than 0, and MN≥1;
[0011] Determine the moving speed and moving direction of the tracked feature based on the target image in the M+Nth frame image and the target image in the MNth frame image;
[0012] The predicted target image is displayed in the M+Nth frame image and the MNth frame image based on the moving speed and the moving direction.
[0013] In combination with the first aspect, in some embodiments, obtaining the MNth frame image and the M+Nth frame image, and determining the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, wherein M and N are natural numbers greater than 0, and MN≥1, includes:
[0014] Determine a first target contour based on the target image in the Mth frame image;
[0015] Determine a second target contour of the target image in the MN-th frame image based on the MN-th frame image;
[0016] Correcting the second target contour shape based on the first target contour shape to obtain a third target contour shape;
[0017] The target image in the MNth frame image is determined based on the third target contour shape.
[0018] In combination with the first aspect, in some embodiments, obtaining the MNth frame image and the M+Nth frame image, and determining the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, wherein M and N are natural numbers greater than 0, and MN≥1, includes:
[0019] Determine a first target contour based on the target image in the Mth frame image;
[0020] Determine a fourth target contour of the target image in the M+Nth frame image based on the M+Nth frame image;
[0021] Correcting the fourth target contour shape based on the first target contour shape to obtain a fifth target contour shape;
[0022] The target image in the M+Nth frame image is determined based on the fifth target contour shape.
[0023] In combination with the first aspect, in some implementations, determining a second target contour of a target image in the MN-th frame image based on the MN-th frame image includes:
[0024] Segmenting the M-th frame image to form a plurality of first sub-images;
[0025] Determine a first boundary sub-image among a plurality of first sub-images, where the first boundary sub-image is a first sub-image that forms a contour of a target image in an MN-th frame image;
[0026] The plurality of first boundary sub-images are connected to form a second object contour.
[0027] In combination with the first aspect, in some embodiments, determining a first boundary sub-image among a plurality of first sub-images, where the first boundary sub-image is a first sub-image that forms a contour of a target image in an MN-th frame image, includes:
[0028] Determine a visual feature parameter of each first sub-image, where the feature parameter is used to characterize a visual feature of the first sub-image;
[0029] The visual feature parameters of each first sub-image are compared with the visual feature parameters of the four adjacent first sub-images. If, among the four adjacent first sub-images, the visual feature parameters of one and only one first sub-image are different from the visual feature parameters of the other three first sub-images, the first sub-image is determined to be a first boundary sub-image.
[0030] In combination with the first aspect, in some implementations, determining a visual feature parameter of each first sub-image, where the feature parameter is used to characterize a visual feature of the first sub-image, includes:
[0031] Determine the brightness value, gray value and color temperature value of each first sub-image;
[0032] Determine the visual feature parameters of each first sub-image based on the brightness value, gray value and color temperature value of each first sub-image , and satisfy:
[0033] in, is the first weight corresponding to the brightness value, is the second weight corresponding to the gray value, is the third weight corresponding to the color temperature value, is the brightness value, is the gray value, is the color temperature value.
[0034] In combination with the first aspect, in some embodiments, determining the moving speed and moving direction of the tracked feature based on the target image in the M+Nth frame image and the target image in the MNth frame image includes:
[0035] Segmenting the target image in the MN-th frame image to form a plurality of first target sub-images of the same size, wherein each first target sub-image has a first positioning point, and the plurality of first positioning points are located at the same geometric position on the plurality of first target sub-images;
[0036] Segmenting the target image in the M+Nth frame image to form a plurality of second target sub-images of the same size, wherein each second target sub-image has a second positioning point, the plurality of second positioning points are located at the same geometric position on the plurality of first target sub-images, and the plurality of first target sub-images correspond to the plurality of second target sub-images one by one;
[0037] Determine a plurality of motion vectors based on the plurality of first positioning points and the plurality of second positioning points, and determine a target vector based on the plurality of motion vectors;
[0038] Obtaining the shooting time interval between the MN-th frame image and the M+N-th frame image;
[0039] Based on the target vector and the time interval, the moving speed and direction of the tracked feature are determined.
[0040] In combination with the first aspect, in some implementations, displaying the predicted target image in the M+Nth frame image and the MNth frame image based on the moving speed and the moving direction includes:
[0041] Segmenting the target image in the M-th frame image to form a plurality of actual sub-images of the same size, wherein each actual sub-image has a third positioning point, and the plurality of third positioning points are located at the same geometric position on the plurality of actual sub-images;
[0042] Determine a plurality of fourth positioning points based on the target vector and the plurality of third positioning points, wherein the fourth positioning points are points after the third positioning points and the loading along the target vector;
[0043] A plurality of predicted sub-images are determined based on the plurality of fourth positioning points, and a predicted target image is determined based on the plurality of predicted sub-images.
[0044] A second aspect of an embodiment of the present invention provides a video image feature tracking device based on artificial intelligence, wherein the device is configured as follows:
[0045] Obtain the target video section, and obtain the Mth frame image based on the target video section;
[0046] Determine and display the target image in the Mth frame image based on the neural network model, wherein the target image is an image of the tracked feature;
[0047] Obtain the MNth frame image and the M+Nth frame image, and determine the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, where M and N are natural numbers greater than 0, and MN≥1;
[0048] Determine the moving speed and moving direction of the tracked feature based on the target image in the M+Nth frame image and the target image in the MNth frame image;
[0049] The predicted target image is displayed in the M+Nth frame image and the MNth frame image based on the moving speed and the moving direction.
[0050] In conjunction with the second aspect, the apparatus is configured as follows:
[0051] Obtain the MNth frame image and the M+Nth frame image, and determine the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, where M and N are natural numbers greater than 0, and MN≥1, including:
[0052] Determine a first target contour based on the target image in the Mth frame image;
[0053] Determine a second target contour of the target image in the MN-th frame image based on the MN-th frame image;
[0054] Correcting the second target contour shape based on the first target contour shape to obtain a third target contour shape;
[0055] The target image in the MNth frame image is determined based on the third target contour shape.
[0056] In conjunction with the second aspect, the apparatus is configured as follows:
[0057] Obtain the MNth frame image and the M+Nth frame image, and determine the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, where M and N are natural numbers greater than 0, and MN≥1, including:
[0058] Determine a first target contour based on the target image in the Mth frame image;
[0059] Determine a fourth target contour of the target image in the M+Nth frame image based on the M+Nth frame image;
[0060] Correcting the fourth target contour shape based on the first target contour shape to obtain a fifth target contour shape;
[0061] The target image in the M+Nth frame image is determined based on the fifth target contour shape.
[0062] In conjunction with the second aspect, the apparatus is configured as follows:
[0063] Determining a second target contour of the target image in the MN-th frame image based on the MN-th frame image includes:
[0064] Segmenting the M-th frame image to form a plurality of first sub-images;
[0065] Determine a first boundary sub-image among a plurality of first sub-images, where the first boundary sub-image is a first sub-image that forms a contour of a target image in an MN-th frame image;
[0066] The plurality of first boundary sub-images are connected to form a second object contour.
[0067] In conjunction with the second aspect, the apparatus is configured as follows:
[0068] Determining a first boundary sub-image among a plurality of first sub-images, where the first boundary sub-image is a first sub-image that forms a contour of a target image in an MN-th frame image, includes:
[0069] Determine a visual feature parameter of each first sub-image, where the feature parameter is used to characterize a visual feature of the first sub-image;
[0070] The visual feature parameters of each first sub-image are compared with the visual feature parameters of the four adjacent first sub-images. If, among the four adjacent first sub-images, the visual feature parameters of one and only one first sub-image are different from the visual feature parameters of the other three first sub-images, the first sub-image is determined to be a first boundary sub-image.
[0071] In conjunction with the second aspect, the apparatus is configured as follows:
[0072] Determine a visual feature parameter of each first sub-image, where the feature parameter is used to characterize a visual feature of the first sub-image, including:
[0073] Determine the brightness value, gray value and color temperature value of each first sub-image;
[0074] Determine the visual feature parameters of each first sub-image based on the brightness value, gray value and color temperature value of each first sub-image , and satisfy: and satisfy:
[0075] in, is the first weight corresponding to the brightness value, is the second weight corresponding to the gray value, is the third weight corresponding to the color temperature value, is the brightness value, is the gray value, is the color temperature value.
[0076] In conjunction with the second aspect, the apparatus is configured as follows:
[0077] Determining the moving speed and moving direction of the tracked feature based on the target image in the M+Nth frame image and the target image in the MNth frame image, including:
[0078] Segmenting the target image in the MN-th frame image to form a plurality of first target sub-images of the same size, wherein each first target sub-image has a first positioning point, and the plurality of first positioning points are located at the same geometric position on the plurality of first target sub-images;
[0079] Segmenting the target image in the M+Nth frame image to form a plurality of second target sub-images of the same size, wherein each second target sub-image has a second positioning point, the plurality of second positioning points are located at the same geometric position on the plurality of first target sub-images, and the plurality of first target sub-images correspond to the plurality of second target sub-images one by one;
[0080] Determine a plurality of motion vectors based on the plurality of first positioning points and the plurality of second positioning points, and determine a target vector based on the plurality of motion vectors;
[0081] Obtaining the shooting time interval between the MN-th frame image and the M+N-th frame image;
[0082] Based on the target vector and the time interval, the moving speed and direction of the tracked feature are determined.
[0083] In conjunction with the second aspect, the apparatus is configured as follows:
[0084] Displaying the predicted target image in the M+Nth frame image and the MNth frame image based on the moving speed and the moving direction includes:
[0085] Segmenting the target image in the M-th frame image to form a plurality of actual sub-images of the same size, wherein each actual sub-image has a third positioning point, and the plurality of third positioning points are located at the same geometric position on the plurality of actual sub-images;
[0086] Determine a plurality of fourth positioning points based on the target vector and the plurality of third positioning points, wherein the fourth positioning points are points after the third positioning points and the loading along the target vector;
[0087] A plurality of predicted sub-images are determined based on the plurality of fourth positioning points, and a predicted target image is determined based on the plurality of predicted sub-images.
[0088] A third aspect of an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0089] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method proposed in the first aspect of the embodiment of the present invention.
[0090] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect of the embodiment of the present invention.
[0091] In summary, the above method and device have the following technical effects:
[0092] The present application proposes a method for tracking video image features based on artificial intelligence. First, a target video section is obtained, and the Mth frame image is obtained based on the target video section. Then, the target image in the Mth frame image is determined and displayed based on a neural network model, wherein the target image is an image of the tracked feature. Then, the MNth frame image and the M+Nth frame image are obtained. Based on the target image in the Mth frame image, the target images in the MNth frame image and the M+Nth frame image are determined respectively. Then, based on the target image in the M+Nth frame image and the target image in the MNth frame image, the moving speed and moving direction of the tracked feature are determined. Then, based on the moving speed and moving direction, the predicted target image is displayed in the M+Nth frame image and the MNth frame image. The present application proposes a method for tracking video image features based on artificial intelligence. In a video section, by using a neural network model to perform target recognition on an Mth frame image, three frames of images, namely, the MNth frame image, the Mth frame image, and the M+Nth frame image, can be displayed. This saves more computing power than performing target recognition on all video frames, and makes the processing faster. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 A flowchart of a video image feature tracking method based on artificial intelligence proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0094] 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 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.
[0095] This application embodiment proposes a video image feature tracking method based on artificial intelligence, see Figure 1 , including the following steps:
[0096] S101: Obtain a target video section, and obtain the Mth frame image based on the target video section.
[0097] It is understandable that in video processing, a video section usually refers to a specific paragraph or segment in a video. This video segment is composed of multiple video frames. For a video section, it is usually composed of multiple video frames. When processing a video image, the video section needs to be split into multiple video frames, and any video frame that is not a beginning frame or an ending frame is represented by the Mth frame image in this embodiment.
[0098] S102: Determine and display the target image in the Mth frame image based on the neural network model, wherein the target image is the image of the tracked feature.
[0099] In the field of modern image processing and computer vision, neural network models have become a powerful tool for identifying, classifying, and tracking targets in images. A neural network model is a computational model that simulates the structure of neurons in the human brain and is composed of a large number of interconnected neuron nodes. Each node receives an input signal and calculates an output signal based on certain weights and activation functions. By adjusting the weights, neural networks can learn and adapt to various tasks. In the field of image processing, convolutional neural networks (CNNs) are one of the most commonly used models. CNNs can extract features from images and classify or identify them through structures such as convolutional layers and pooling layers. For target tracking tasks, a pre-trained CNN model can be used to extract features from an image, and then these features can be used to determine the position and shape of the tracked features.
[0100] Specifically, the Mth frame image can be input into the neural network model, and the model will output a feature map, in which each position corresponds to the feature of a certain area in the image. By analyzing this feature map, the position and shape of the tracked feature can be determined. For example, a threshold can be set, and only when the feature value of a certain area in the feature map exceeds this threshold, the area is considered to contain the tracked feature.
[0101] Regarding how to determine the target image in the Mth frame image based on the neural network model, in some other embodiments, other public technologies can also be used. Therefore, the specific process is not limited in this application.
[0102] S103: Obtain the MNth frame image and the M+Nth frame image, and determine the target images in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, wherein M and N are natural numbers greater than 0, and MN≥1.
[0103] In the process of image processing on multiple video frames, if a neural network model is used to extract features and determine the target image for each video frame, it will inevitably cause the processing device to consume a lot of computing power. Therefore, in this embodiment, for the target image in the MN frame image and the M+N frame image, the following steps can be used to determine it.
[0104] S1031: Determine a first target contour based on the target image in the Mth frame image.
[0105] It can be understood that for the Mth frame image, the target image in the Mth frame image can be determined by using the neural network model calculation method. The shape and contour of the target image determined by the neural network model calculation method are relatively accurate, and a relatively accurate contour image can be obtained by extracting its contour.
[0106] S1032: Determine a second target contour of the target image in the MNth frame image based on the MNth frame image.
[0107] It can be understood that the target image in the MN frame image can be extracted by an edge algorithm. Specifically, first, the M frame image can be segmented to form multiple first sub-images, and then the first boundary sub-image in the multiple first sub-images is determined, and the first boundary sub-image is the first sub-image that forms the contour of the target image in the MN frame image. Finally, the multiple first boundary sub-images are connected to form the second target contour. The edge contour of the target image in the MN frame image extracted by the edge algorithm has a lower accuracy than the method of calculating with a neural network model, but because of its low number of data calculation layers, it can save a lot of computing power compared to the method of calculating with a neural network model. For example, the process can be calculated using the CPU (central processing unit) in a home computer, while the neural network calculation process uses a GPU (image processor) for calculation.
[0108] In some embodiments, as to how to determine the second contour, the Mth frame image can be segmented to form a plurality of first sub-images, and then a first boundary sub-image among the plurality of first sub-images is determined, the first boundary sub-image being the first sub-image that forms the contour of the target image in the MNth frame image, and finally the plurality of first boundary sub-images are connected to form the second target contour.
[0109] As for how to determine the boundary sub-image, it can be determined by the boundary effect, specifically, it can be determined by color gradient, brightness gradient, grayscale gradient, etc. Specifically, the visual feature parameters of each first sub-image can be determined first, and the feature parameters are used to characterize the visual features of the first sub-image, and then the visual feature parameters of each first sub-image are compared with the visual feature parameters of the four adjacent first sub-images. If there is a difference between the visual feature parameters of one and only one first sub-image and the visual feature parameters of the other three first sub-images among the four adjacent first sub-images of a first sub-image, then the first sub-image is determined to be a first boundary sub-image.
[0110] As for the characteristic parameters, as an implementation method, in order to improve its accuracy, the comprehensive visual data of each first sub-image can be quantified. Specifically, the brightness value, gray value and color temperature value of each first sub-image are first determined, and then the visual characteristic parameters of each first sub-image are determined based on the brightness value, gray value and color temperature value of each first sub-image. , and satisfy:
[0111] in, is the first weight corresponding to the brightness value, is the second weight corresponding to the gray value, is the third weight corresponding to the color temperature value, is the brightness value, is the gray value, is the color temperature value.
[0112] It can be understood that the characteristic parameters determined in the above manner integrate the brightness value, grayscale value and color temperature value, and therefore have a high degree of accuracy.
[0113] S1033: Correcting the second target contour shape based on the first target contour shape to obtain a third target contour shape.
[0114] It is understandable that, since the first target contour is calculated by a neural network, its accuracy is relatively high, therefore, the third target contour shape can be obtained by correcting the second target contour with the first target contour. The specific correction process can be performed by shape fitting and other methods, which are not limited here.
[0115] S1034: Determine the target image in the MNth frame image based on the third target contour shape.
[0116] It can be understood that after the third target contour shape, the target image in the MNth frame image can be determined by filling the contour and the like.
[0117] The target image in the MNth frame image may be determined in the following manner.
[0118] S1035: Determine a first target contour based on the target image in the Mth frame image;
[0119] S1036: Determine a fourth object contour of the object image in the M+Nth frame image based on the M+Nth frame image;
[0120] S1037: Correcting the fourth target contour shape based on the first target contour shape to obtain a fifth target contour shape;
[0121] S1038: Determine the target image in the M+Nth frame image based on the fifth target contour shape.
[0122] For steps S1035 to S1038, please refer to steps S1031 to S1034, and the specific process is not repeated here.
[0123] S104: Determine the moving speed and moving direction of the tracked feature based on the target image in the M+Nth frame image and the target image in the MNth frame image.
[0124] It can be understood that after determining the target image in the M+Nth frame image and the target image in the MNth frame image, the moving speed and direction of the tracked feature can be determined based on the change in the position of the target image in the M+Nth frame image and the MNth frame image.
[0125] Specifically, as an implementation method, first, the target image in the MNth frame image can be segmented to form a plurality of first target sub-images of the same size, wherein each first target sub-image has a first positioning point, and the plurality of first positioning points are located at the same geometric position on the plurality of first target sub-images. Then, the target image in the M+Nth frame image is segmented to form a plurality of second target sub-images of the same size, wherein each second target sub-image has a second positioning point, the plurality of second positioning points are located at the same geometric position on the plurality of first target sub-images, and the plurality of first target sub-images correspond one-to-one to the plurality of second target sub-images. Finally, a plurality of moving vectors are determined based on the plurality of first positioning points and the plurality of second positioning points, and a target vector is determined based on the plurality of moving vectors. When obtaining the target vector, the moving speed can be obtained by combining the moving time. Therefore, the shooting time interval between the MNth frame image and the M+Nth frame image can be directly obtained.
[0126] Of course, in other embodiments, the moving time can be obtained by other methods, which are not limited here. Finally, the moving speed and moving direction of the tracked feature can be determined based on the target vector and the time interval. The calculation process has been disclosed in the relevant technology and is not limited here.
[0127] S105: Display the predicted target image in the M+Nth frame image and the MNth frame image based on the moving speed and the moving direction.
[0128] It can be understood that as an implementation method, the target image in the Mth frame image can be first segmented to form multiple actual sub-images of the same size, wherein each actual sub-image has a third positioning point, and the multiple third positioning points are located at the same geometric position on the multiple actual sub-images, and then multiple fourth positioning points are determined based on the target vector and the multiple third positioning points, wherein the fourth positioning point is the point after the third positioning point and the loading along the target vector, and finally multiple predicted sub-images are determined based on the multiple fourth positioning points, and the predicted target image is determined based on the multiple predicted sub-images.
[0129] The present application proposes a method for tracking video image features based on artificial intelligence. First, a target video section is obtained, and the Mth frame image is obtained based on the target video section. Then, the target image in the Mth frame image is determined and displayed based on a neural network model, wherein the target image is an image of the tracked feature. Then, the MNth frame image and the M+Nth frame image are obtained. Based on the target image in the Mth frame image, the target images in the MNth frame image and the M+Nth frame image are determined respectively. Then, based on the target image in the M+Nth frame image and the target image in the MNth frame image, the moving speed and moving direction of the tracked feature are determined. Then, based on the moving speed and moving direction, the predicted target image is displayed in the M+Nth frame image and the MNth frame image. The present application proposes a method for tracking video image features based on artificial intelligence. In a video section, by using a neural network model to perform target recognition on an Mth frame image, three frames of images, namely, the MNth frame image, the Mth frame image, and the M+Nth frame image, can be displayed. This saves more computing power than performing target recognition on all video frames, and makes the processing faster.
[0130] Based on the same inventive concept, the embodiment of the present application also proposes a video image feature tracking device based on artificial intelligence, which is configured as follows:
[0131] Obtain the target video section, and obtain the Mth frame image based on the target video section;
[0132] Determine and display the target image in the Mth frame image based on the neural network model, wherein the target image is an image of the tracked feature;
[0133] Obtain the MNth frame image and the M+Nth frame image, and determine the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, where M and N are natural numbers greater than 0, and MN≥1;
[0134] Determine the moving speed and moving direction of the tracked feature based on the target image in the M+Nth frame image and the target image in the MNth frame image;
[0135] The predicted target image is displayed in the M+Nth frame image and the MNth frame image based on the moving speed and the moving direction.
[0136] Optionally, the device is configured to:
[0137] Obtain the MNth frame image and the M+Nth frame image, and determine the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, where M and N are natural numbers greater than 0, and MN≥1, including:
[0138] Determine a first target contour based on the target image in the Mth frame image;
[0139] Determine a second target contour of the target image in the MN-th frame image based on the MN-th frame image;
[0140] Correcting the second target contour shape based on the first target contour shape to obtain a third target contour shape;
[0141] The target image in the MNth frame image is determined based on the third target contour shape.
[0142] Optionally, the device is configured to:
[0143] Obtain the MNth frame image and the M+Nth frame image, and determine the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, where M and N are natural numbers greater than 0, and MN≥1, including:
[0144] Determine a first target contour based on the target image in the Mth frame image;
[0145] Determine a fourth target contour of the target image in the M+Nth frame image based on the M+Nth frame image;
[0146] Correcting the fourth target contour shape based on the first target contour shape to obtain a fifth target contour shape;
[0147] The target image in the M+Nth frame image is determined based on the fifth target contour shape.
[0148] Optionally, the device is configured to:
[0149] Determining a second target contour of the target image in the MN-th frame image based on the MN-th frame image includes:
[0150] Segmenting the M-th frame image to form a plurality of first sub-images;
[0151] Determine a first boundary sub-image among a plurality of first sub-images, where the first boundary sub-image is a first sub-image that forms a contour of a target image in an MN-th frame image;
[0152] The plurality of first boundary sub-images are connected to form a second object contour.
[0153] Optionally, the device is configured to:
[0154] Determining a first boundary sub-image among a plurality of first sub-images, where the first boundary sub-image is a first sub-image that forms a contour of a target image in an MN-th frame image, includes:
[0155] Determine a visual feature parameter of each first sub-image, where the feature parameter is used to characterize a visual feature of the first sub-image;
[0156] The visual feature parameters of each first sub-image are compared with the visual feature parameters of the four adjacent first sub-images. If, among the four adjacent first sub-images, the visual feature parameters of one and only one first sub-image are different from the visual feature parameters of the other three first sub-images, the first sub-image is determined to be a first boundary sub-image.
[0157] Optionally, the device is configured to:
[0158] Determine a visual feature parameter of each first sub-image, where the feature parameter is used to characterize a visual feature of the first sub-image, including:
[0159] Determine the brightness value, gray value and color temperature value of each first sub-image;
[0160] Determine the visual feature parameters of each first sub-image based on the brightness value, gray value and color temperature value of each first sub-image , and satisfy: and satisfy:
[0161] in, is the first weight corresponding to the brightness value, is the second weight corresponding to the gray value, is the third weight corresponding to the color temperature value, is the brightness value, is the gray value, is the color temperature value.
[0162] Optionally, the device is configured to:
[0163] Determining the moving speed and moving direction of the tracked feature based on the target image in the M+Nth frame image and the target image in the MNth frame image, including:
[0164] Segmenting the target image in the MN-th frame image to form a plurality of first target sub-images of the same size, wherein each first target sub-image has a first positioning point, and the plurality of first positioning points are located at the same geometric position on the plurality of first target sub-images;
[0165] Segmenting the target image in the M+Nth frame image to form a plurality of second target sub-images of the same size, wherein each second target sub-image has a second positioning point, the plurality of second positioning points are located at the same geometric position on the plurality of first target sub-images, and the plurality of first target sub-images correspond to the plurality of second target sub-images one by one;
[0166] Determine a plurality of motion vectors based on the plurality of first positioning points and the plurality of second positioning points, and determine a target vector based on the plurality of motion vectors;
[0167] Obtaining the shooting time interval between the MN-th frame image and the M+N-th frame image;
[0168] Based on the target vector and the time interval, the moving speed and direction of the tracked feature are determined.
[0169] Optionally, the device is configured to:
[0170] Displaying the predicted target image in the M+Nth frame image and the MNth frame image based on the moving speed and the moving direction includes:
[0171] Segmenting the target image in the M-th frame image to form a plurality of actual sub-images of the same size, wherein each actual sub-image has a third positioning point, and the plurality of third positioning points are located at the same geometric position on the plurality of actual sub-images;
[0172] Determine a plurality of fourth positioning points based on the target vector and the plurality of third positioning points, wherein the fourth positioning points are points after the third positioning points and the loading along the target vector;
[0173] A plurality of predicted sub-images are determined based on the plurality of fourth positioning points, and a predicted target image is determined based on the plurality of predicted sub-images.
[0174] The present application proposes a video image feature tracking device based on artificial intelligence. First, a target video section is obtained, and the Mth frame image is obtained based on the target video section. Then, the target image in the Mth frame image is determined and displayed based on the neural network model, wherein the target image is the image of the tracked feature. Then, the MNth frame image and the M+Nth frame image are obtained. Based on the target image in the Mth frame image, the target images in the MNth frame image and the M+Nth frame image are determined respectively. Then, based on the target image in the M+Nth frame image and the target image in the MNth frame image, the moving speed and moving direction of the tracked feature are determined. Then, based on the moving speed and moving direction, the predicted target image is displayed in the M+Nth frame image and the MNth frame image. The present application proposes a video image feature tracking device based on artificial intelligence. In a video section, by using a neural network model to perform target recognition on an Mth frame image, three frames of images, namely, the MNth frame image, the Mth frame image, and the M+Nth frame image, can be displayed. This saves more computing power than performing target recognition on all video frames, and makes the processing speed faster.
[0175] Based on the same inventive concept, an embodiment of the present application further proposes an electronic device, the electronic device comprising:
[0176] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the artificial intelligence-based video image feature tracking method of an embodiment of the present application.
[0177] In addition, to achieve the above-mentioned purpose, an embodiment of the present application also proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the video image feature tracking method based on artificial intelligence of the embodiment of the present application is implemented.
[0178] The following is a detailed introduction to the various components of electronic equipment:
[0179] The processor is the control center of the electronic device, which can be a processor or a general term for multiple processing elements. For example, the processor is one or more central processing units (CPUs), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs).
[0180] Optionally, the processor can perform various functions of the electronic device by running or executing a software program stored in the memory, and calling data stored in the memory.
[0181] The memory is used to store the software program for executing the solution of the present invention, and the execution is controlled by the processor. The specific implementation method can refer to the above method embodiment and will not be repeated here.
[0182] Optionally, the memory may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may be integrated with the processor, or may exist independently and be coupled to the processor through an interface circuit of the electronic device, which is not specifically limited in the embodiments of the present invention.
[0183] A transceiver is used to communicate with a network device or a terminal device.
[0184] Optionally, the transceiver may include a receiver and a transmitter, wherein the receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0185] Optionally, the transceiver may be integrated with the processor, or may exist independently and be coupled to the processor via an interface circuit of the router, which is not specifically limited in the embodiment of the present invention.
[0186] In addition, the technical effects of the electronic device can refer to the technical effects of the data transmission method in the above method embodiment, which will not be repeated here.
[0187] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0188] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0189] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When a computer instruction or computer program is loaded or executed on a computer, a process or function according to an embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0190] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can 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. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0191] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0192] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0193] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
Claims
1. A video image feature tracking method based on artificial intelligence, characterized in that: The method comprises: Acquire a target video section, and acquire an M-th frame image based on the target video section; Determine and display a target image in the Mth frame image based on a neural network model, wherein the target image is an image of a tracked feature; Acquire the MNth frame image and the M+Nth frame image, and determine the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, wherein N is a natural number greater than 0, and MN≥1; Determining the moving speed and moving direction of the tracked feature based on the target image in the M+Nth frame image and the target image in the MNth frame image specifically includes: Segmenting the target image in the MN-th frame image to form a plurality of first target sub-images of the same size, wherein each of the first target sub-images has a first positioning point, and the plurality of first positioning points are located at the same geometric position on the plurality of first target sub-images; Segmenting the target image in the M+Nth frame image to form a plurality of second target sub-images of the same size, wherein each of the second target sub-images has a second positioning point, the plurality of second positioning points are located at the same geometric position on the plurality of first target sub-images, and the plurality of first target sub-images correspond to the plurality of second target sub-images one by one; Determine a plurality of motion vectors based on a plurality of the first positioning points and a plurality of the second positioning points, and determine a target vector based on the plurality of the motion vectors; Obtaining a shooting time interval between the MNth frame image and the M+Nth frame image; Determining a moving speed and a moving direction of the tracked feature based on the target vector and the time interval; Displaying the predicted target image in the M+Nth frame image and the MNth frame image based on the moving speed and the moving direction specifically includes: Segmenting the target image in the M-th frame image to form a plurality of actual sub-images of the same size, wherein each of the actual sub-images has a third positioning point, and the plurality of third positioning points are located at the same geometric position on the plurality of actual sub-images; Determine a plurality of fourth positioning points based on the target vector and the plurality of third positioning points, wherein the fourth positioning points are points after the third positioning points and loading along the target vector; A plurality of predicted sub-images are determined based on the plurality of fourth positioning points, and a predicted target image is determined based on the plurality of predicted sub-images.
2. The video image feature tracking method based on artificial intelligence according to claim 1, characterized in that: Acquire the MNth frame image and the M+Nth frame image, and determine the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, wherein M and N are natural numbers greater than 0, and MN≥1, including: Determine a first target contour based on the target image in the Mth frame image; Determine a second target contour of the target image in the MN-th frame image based on the MN-th frame image; Correcting the second target contour shape based on the first target contour shape to obtain a third target contour shape; The target image in the MNth frame image is determined based on the third target contour shape.
3. The video image feature tracking method based on artificial intelligence according to claim 2 is characterized in that: Acquire the MNth frame image and the M+Nth frame image, and determine the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, wherein M and N are natural numbers greater than 0, and MN≥1, including: Determine a first target contour based on the target image in the Mth frame image; Determine a fourth target contour of the target image in the M+Nth frame image based on the M+Nth frame image; Correcting the fourth target contour shape based on the first target contour shape to obtain a fifth target contour shape; The target image in the M+Nth frame image is determined based on the fifth target contour shape.
4. The video image feature tracking method based on artificial intelligence according to claim 3 is characterized in that: The determining, based on the MN-th frame image, a second target contour of the target image in the MN-th frame image comprises: Segmenting the M-th frame image to form a plurality of first sub-images; Determine a first boundary sub-image among the plurality of first sub-images, where the first boundary sub-image is the first sub-image that forms the contour of the target image in the MN-th frame image; A plurality of the first boundary sub-images are connected to form the second object contour.
5. The video image feature tracking method based on artificial intelligence according to claim 4 is characterized in that: Determining a first boundary sub-image among the plurality of first sub-images, where the first boundary sub-image is the first sub-image that forms the contour of the target image in the MN-th frame image, comprises: Determine a visual feature parameter of each of the first sub-images, where the feature parameter is used to characterize a visual feature of the first sub-image; The visual feature parameters of each first sub-image are compared with the visual feature parameters of the four adjacent first sub-images. If, among the four adjacent first sub-images of a first sub-image, there is a difference between the visual feature parameters of one and only one first sub-image and the visual feature parameters of the other three first sub-images, then the first sub-image is determined to be a first boundary sub-image.
6. The video image feature tracking method based on artificial intelligence according to claim 5, characterized in that: Determining a visual feature parameter of each of the first sub-images, where the feature parameter is used to characterize a visual feature of the first sub-image, includes: Determine a brightness value, a grayscale value, and a color temperature value of each of the first sub-images; The visual feature parameter G of each of the first sub-images is determined based on the brightness value, the gray value and the color temperature value of each of the first sub-images. D , and satisfy: Among them, e1 is the first weight corresponding to the brightness value, e2 is the second weight corresponding to the gray value, e3 is the third weight corresponding to the color temperature value, s1 is the brightness value, c1 is the gray value, and k1 is the color temperature value.
7. A video image feature tracking device based on artificial intelligence, characterized in that: The device is configured to: Acquire a target video section, and acquire an M-th frame image based on the target video section; Determine and display a target image in the Mth frame image based on a neural network model, wherein the target image is an image of a tracked feature; Acquire the MNth frame image and the M+Nth frame image, and determine the target image in the MNth frame image and the M+Nth frame image respectively based on the target image in the Mth frame image, wherein M and N are natural numbers greater than 0, and MN≥1; Determining the moving speed and moving direction of the tracked feature based on the target image in the M+Nth frame image and the target image in the MNth frame image specifically includes: Segmenting the target image in the MN-th frame image to form a plurality of first target sub-images of the same size, wherein each of the first target sub-images has a first positioning point, and the plurality of first positioning points are located at the same geometric position on the plurality of first target sub-images; Segmenting the target image in the M+Nth frame image to form a plurality of second target sub-images of the same size, wherein each of the second target sub-images has a second positioning point, the plurality of second positioning points are located at the same geometric position on the plurality of first target sub-images, and the plurality of first target sub-images correspond to the plurality of second target sub-images one by one; Determine a plurality of motion vectors based on a plurality of the first positioning points and a plurality of the second positioning points, and determine a target vector based on the plurality of the motion vectors; Obtaining a shooting time interval between the MNth frame image and the M+Nth frame image; Determining a moving speed and a moving direction of the tracked feature based on the target vector and the time interval; Displaying the predicted target image in the M+Nth frame image and the MNth frame image based on the moving speed and the moving direction specifically includes: Segmenting the target image in the M-th frame image to form a plurality of actual sub-images of the same size, wherein each of the actual sub-images has a third positioning point, and the plurality of third positioning points are located at the same geometric position on the plurality of actual sub-images; Determine a plurality of fourth positioning points based on the target vector and the plurality of third positioning points, wherein the fourth positioning points are points after the third positioning points and loading along the target vector; A plurality of predicted sub-images are determined based on the plurality of fourth positioning points, and a predicted target image is determined based on the plurality of predicted sub-images.
8. An electronic device, characterized in that: include: at least one processor; And, a memory communicatively connected to at least one of the processors; wherein the memory stores instructions executable by at least one of the processors, and the instructions are executed by at least one of the processors so that at least one of the processors can execute the method proposed in any one of claims 1-6.
