Video stability determination method and apparatus
By acquiring the characteristic parameter values of optical flow feature points and motion feature curves, video stability is automatically analyzed, solving the problems of inaccurate evaluation results and low efficiency in existing technologies, and realizing efficient and accurate video stability evaluation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2026-04-10
AI Technical Summary
Existing methods for evaluating the quality of video stabilization cannot cover real-world user scenarios, resulting in inaccurate and inefficient evaluations that are easily influenced by human factors.
By acquiring optical flow feature points of the target video, determining the motion feature curve, and using the target model to analyze the feature parameter values of the motion feature curve, the stability of the video is automatically evaluated.
It improves the efficiency and accuracy of video stability evaluation, reduces the impact of human factors, and meets the needs of large-scale evaluation.
Smart Images

Figure CN115866240B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of video processing, and particularly relates to a video stability determination method and device. BACKGROUND
[0002] At present, with the increasingly wide use of mobile phones as camera equipment, the functions of the camera systems in mobile phones are also more perfect. For example, in order to achieve better shooting effects, most mobile phones have an anti-shake function when shooting videos. On this basis, the quality evaluation of the video anti-shake effect plays an important role in the research of the camera functions of mobile phones.
[0003] However, in the current quality evaluation method of the video anti-shake effect, that is, the current video stability determination scheme, the simulated shaking scenes are limited and cannot cover the real use scenarios of users, so that the evaluation results are one-sided, a large amount of manpower is required, the evaluation efficiency is low and is easily affected by human factors, and finally the evaluation results are not accurate enough. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide a video stability determination method and device, which can improve the evaluation efficiency and the accuracy of the evaluation results of the video stability.
[0005] In a first aspect, the embodiments of the present application provide a video stability determination method, which comprises: acquiring optical flow feature points of a target video; determining a motion feature curve of the target video according to the pixel positions of the optical flow feature points in each frame image of the target video; determining a feature parameter value of the motion feature curve according to a target model and the motion feature curve, the feature parameter value being used to indicate the fluctuation degree of the motion feature curve; and determining the stability of the target video according to the feature parameter value.
[0006] In a second aspect, the embodiments of the present application provide a video stability determination device, which comprises: an acquisition unit configured to acquire optical flow feature points of a target video; a first processing unit configured to determine a motion feature curve of the target video according to the pixel positions of the optical flow feature points in each frame image of the target video; a second processing unit configured to determine a feature parameter value of the motion feature curve according to a target model and the motion feature curve, the feature parameter value being used to indicate the fluctuation degree of the motion feature curve; and a third processing unit configured to determine the stability of the target video according to the feature parameter value.
[0007] In a third aspect, the embodiments of the present application provide an electronic device, which comprises a processor and a memory, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the video stability determination method of the first aspect.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, which stores a program or instructions, and the program or instructions are executed by a processor to implement the steps of the video stability determination method according to the first aspect.
[0009] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or instructions to implement the steps of the video stability determination method according to the first aspect.
[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the video stability determination method according to the first aspect.
[0011] In the video stability determination method provided by the embodiment of the present application, the optical flow feature points of the target video are obtained, and the motion feature curve of the target video is determined according to the pixel positions of the optical flow feature points in each frame image of the target video. On this basis, the feature parameter value of the motion feature curve is determined according to the target model and the motion feature curve, and then the stability of the target video is determined according to the feature parameter value. The feature parameter value is used to indicate the fluctuation degree of the motion feature curve.
[0012] Through the above-mentioned video stability determination method, when evaluating the stability of the target video, the motion path of the target video is determined based on the pixel positions of the optical flow feature points in each frame image of the target video to obtain the motion feature curve of the target video, and then the feature parameter value indicating the fluctuation degree of the motion feature curve is determined according to the motion feature curve of the target video and the target model, and the stability of the target video is evaluated according to the feature parameter value. In this way, without manual review, the stability of the video can be automatically analyzed based on the motion feature information of the video, that is, based on the feature parameter value indicating the fluctuation degree or the shaking degree of the video, the evaluation efficiency is guaranteed, the comprehensiveness and accuracy of the evaluation result are improved, and the requirement of evaluating the stability of a large number of videos is met. BRIEF DESCRIPTION OF DRAWINGS
[0013] Figure 1 A flowchart of the video stability determination method provided by the embodiment of the present application is shown in the figure;
[0014] Figure 2 One of the principle diagrams of the video stability determination method provided by the embodiment of the present application is shown in the figure;
[0015] Figure 3 The second principle diagram of the video stability determination method provided by the embodiment of the present application is shown in the figure;
[0016] Figure 4 Figure 3 is a schematic diagram of a third principle of a video stability determination method according to an embodiment of the present application;
[0017] Figure 5 Figure 4 is a structural block diagram of a video stability determination apparatus according to an embodiment of the present application;
[0018] Figure 6 Figure 5 is a structural block diagram of an electronic device according to an embodiment of the present application;
[0019] Figure 7 Figure 6 is a hardware structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some, but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.
[0021] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally a category, not limited to the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / ", generally represents a "or" relationship between the front and rear associated objects.
[0022] The embodiments of the first aspect of the present application propose a video stability determination method. The execution subject of the technical solution of the video stability determination method provided by the embodiments of the present application can be a video stability determination apparatus, which can be determined according to actual use requirements, and the embodiments of the present application do not make any limitation. In order to more clearly describe the video stability determination method provided by the embodiments of the present application, the execution subject of the video stability determination method in the following method embodiments is exemplarily illustrated as a video stability determination apparatus.
[0023] The video stability determination method provided by the embodiments of the present application will be described in detail below in combination with the drawings, through specific embodiments and application scenarios.
[0024] As shown in FIG. 1, the embodiments of the present application provide a video stability determination method, which can include the following S102-S108: Figure 1
[0025] S102: Obtain optical flow feature points of the target video.
[0026] It can be understood that when a video is shot, objects in a three-dimensional space become one or more determined points in a two-dimensional space, and the video is obtained by continuous displacement of the innumerable points in the shot picture. The shaking degree of the video affects the displacement intensity of the points in the video.
[0027] The optical flow feature points are pixel points of relatively static objects in the target video. By analyzing the motion characteristics of the optical flow feature points in the target video, the overall motion characteristics of the target video can be determined. That is, the displacement change of the optical flow feature points in the target video can represent the shaking degree of the target video.
[0028] In actual application, the optical flow feature points in the target video can be extracted by an LK (Lucas-Kanade) optical flow algorithm, so that the overall motion of the target video can be determined according to the motion characteristics of the optical flow feature points.
[0029] S104: Determine the motion characteristic curve of the target video according to the pixel positions of the optical flow feature points in each frame of the target video.
[0030] It can be understood that the overall motion characteristics of the optical flow feature points in the target video can be determined according to the pixel positions of the optical flow feature points in each frame of the target video. Further, the instantaneous change rate of the gray scale of a pixel point on a two-dimensional image is defined as an optical flow vector. When the time interval is small, such as between two consecutive frames of the target video, the optical flow vector of the optical flow feature points between the two consecutive frames is equivalent to the displacement amount of the optical flow feature points between the two consecutive frames. For example, when the optical flow vector of the optical flow feature points between the two consecutive frames is (u, v), u represents the displacement amount of the optical flow feature points in the x direction, and also represents the instantaneous change amount of the displacement of the optical flow feature points in the x direction, and v represents the displacement amount of the optical flow feature points in the y direction, and also represents the instantaneous change amount of the displacement of the optical flow feature points in the y direction.
[0031] Therefore, in the video stability determination method proposed in the embodiments of the present application, the optical flow information of the optical flow feature points can be determined by the target optical flow algorithm, that is, the optical flow vector of the optical flow feature points between each two consecutive frames is determined, and then the motion characteristic curve of the target video is determined according to the optical flow information of the optical flow feature points.
[0032] Specifically, in the actual application process, the above-mentioned target optical flow algorithm can specifically adopt an LK optical flow algorithm to determine the optical flow information of the optical flow feature point. The LK optical flow algorithm is a method for finding the corresponding relationship between the previous frame image and the current frame image by using the change of the pixels in the time domain and the correlation between adjacent frames, so as to calculate the motion information of the object between adjacent frame images.
[0033] The LK optical flow algorithm has the following three assumptions:
[0034] The gray invariance assumption: that is, a certain point in the real world, when reflected to the pixel level, its gray is invariable.
[0035] The perturbation invariance assumption: that is, a small perturbation of time will not cause a drastic change of the pixel.
[0036] The space consistency assumption: adjacent points of the same surface have similar motion, and they are also relatively close at the pixel level.
[0037] On this basis, when calculating the optical flow vector (u, v) of the optical flow feature point between each two consecutive frames of images, based on the gray invariance assumption of the LK optical flow algorithm, the gray value or the brightness value of the optical flow feature point in the two consecutive frames of images is equal. In the case that the pixel position of the optical flow feature point in the current frame image is (x, y), and the pixel position of the optical flow feature point in the next frame image is (x+δx, y+δy), the following formula (1) can be obtained:
[0038] I(x+δx, y+δy, t+δt) = I(x, y, t), (1)
[0039] Wherein, xδ=uδt, δy=vδt, δt represents a small time interval, I(x, y, t) represents the gray value of the optical flow feature point at (x, y) at time t, and I(x+δx, y+δy, t+δt) represents the gray value of the optical flow feature point at (x+δx, y+δy) at time (t+δt).
[0040] On this basis, the left side of the above formula (1) is expanded by Taylor series, and the following formula (2) is obtained:
[0041]
[0042] Wherein, is the partial derivative of I(x, y, t) with respect to x, is the partial derivative of I(x, y, t) with respect to y, is the partial derivative of I(x, y, t) with respect to t, e is the second order term and the high order term of the Taylor expansion of I(x+δx, y+δy, t+δt), and e is a small number value and can be omitted.
[0043] On this basis, the same terms on both sides of formula (2) are eliminated, and e is omitted, and meanwhile, formula (2) is divided by δt on both sides, formula (3) shown below can be obtained:
[0044]
[0045] Further, let u(x, y) = δx / δt, v(x, y) = δy / δt, formula (3) above can be converted into formula (4) shown below:
[0046] u(x, y)I x +v(x, y)I y +I t = 0, (4)
[0047] wherein, I x , I y , I t are the differences of the current frame image in x, y, t directions respectively, that is, I x , I y , I t are the partial derivatives of I(x, y, t) with respect to x, y, t respectively.
[0048] On this basis, based on the gradient method, formula (4) above can be converted into formula (5) shown below:
[0049] I x V x +I y V y = -I t , (5)
[0050] wherein, V x is equivalent to u above, V y is equivalent to v above, that is, formula (5) above is equivalent to formula (6) shown below:
[0051] I x u+I y v = -I t , (6)
[0052] wherein, (u, v) is the optical flow vector of the optical flow feature point between every two consecutive frames of images.
[0053] On this basis, based on the spatial consistency assumption of LK algorithm, adjacent pixels in the image have similar motion, that is, the pixels in a neighborhood in the image all satisfy the above formula (6). That is, the motion of the pixels around the optical flow feature point (x, y) and the optical flow feature point (x, y) is consistent, that is, they have the same u and v. At this time, assuming that there are n pixels around the optical flow feature point (x, y), the following n equations can be obtained:
[0054] I x1 u+I y1 v=-I t1 ,
[0055] I x2 u+I y2 v=-I t2 ,
[0056] …
[0057] I xn u+I yn v=-I tn ,
[0058] Further, the above n equations can be written in matrix form, that is, the following formula (7) can be obtained:
[0059]
[0060] Simplifying the above formula (7) can obtain the following formula (8):
[0061] I xy V=I t , (8)
[0062] Where V is the optical flow information to be solved. On this basis, the transpose matrix of matrix I xy is multiplied on the left side of the above formula (8) simultaneously, that is, The following formula (9) is obtained:
[0063]
[0064] Further, the inverse matrix of matrix is multiplied on the left side of the above formula (9) simultaneously, that is, The following formula (10) can be obtained:
[0065]
[0066] Further, expanding the above formula (10) can obtain the following formula (11), and the values of u and v can be obtained, that is, the optical flow vector of the optical flow feature point is obtained:
[0067]
[0068] On this basis, it can be understood that the optical flow vector (u, v) of the optical flow feature point represents the displacement rate of change of the optical flow feature point between two consecutive frames of images, and the optical flow vector (u, v) of the optical flow feature point only represents the motion change rule of the optical flow feature point, that is, the motion feature. After obtaining the optical flow information of the optical flow feature point, spatial conversion needs to be performed on the optical flow feature point to determine the motion feature of the target video as a whole according to the motion feature of the optical flow feature point, that is, to determine the motion feature curve of the target video.
[0069] In actual application, the commonly used mathematical models for describing the relative motion between frames of a video image sequence mainly include a translation model, a similarity transformation model, and an affine transformation model. In the video stability determination method proposed in the embodiments of the present application, after obtaining the optical flow information of the optical flow feature point, that is, after determining the motion feature of the optical flow feature point, the motion feature of the target video as a whole is analyzed according to the target transformation model and the motion feature of the optical flow feature point, so as to obtain the motion feature curve representing the motion path of the target video, so as to analyze the shaking degree of the target video according to the motion feature curve subsequently.
[0070] In addition, in actual application, after obtaining the motion feature curve of the motion path of the target video, the motion feature curve can also be decomposed to obtain the motion feature curve component of the target video in a first direction, such as the x direction, and to obtain the motion feature curve component of the target video in a second direction, such as the y direction. For example, as shown in FIG. 1, Figure 2 Figure 2 (a) of FIG. 1 shows the motion feature curve component of the target video in the x direction, wherein the longitudinal coordinate x represents the displacement of the target video in the x direction; Figure 2 (b) of FIG. 1 shows the motion feature curve component of the target video in the y direction, wherein the longitudinal coordinate y represents the displacement of the target video in the y direction.
[0071] S106: determining a feature parameter value of the motion feature curve according to the target model and the motion feature curve.
[0072] The above feature parameter value is used to indicate the fluctuation degree of the motion feature curve.
[0073] Further, the above target model is used to analyze and process the motion feature curve of the target video, so as to determine the feature parameter value of the motion feature curve. That is, when analyzing the stability of the target video, the motion feature curve of the target video is the input object of the target model, and the feature parameter value of the motion feature curve is the output object of the target model.
[0074] Specifically, after obtaining the motion feature curve of the target video by analyzing the optical flow information of the optical flow feature points of the target video, the motion feature curve is input into the target model, and the motion feature curve of the target video is analyzed and processed by the target model to output a feature parameter value indicating the fluctuation degree of the motion feature curve, so that the stability of the target video is evaluated according to the feature parameter value subsequently.
[0075] S108: determining the stability of the target video according to the feature parameter value.
[0076] The feature parameter value is used to indicate the fluctuation degree of the motion feature curve.
[0077] It can be understood that the motion feature curve represents the motion change rule of the target video as a whole, and the fluctuation degree of the motion feature curve represents the shaking degree of the target video.
[0078] Therefore, in the video stability determination method provided in the embodiments of the present application, after obtaining the feature parameter value of the motion feature curve of the target video, the shaking degree of the target video can be analyzed by analyzing the feature parameter value, so that the stability degree of the target video is determined.
[0079] By the above-mentioned video stability determination method provided in the embodiments of the present application, the optical flow feature points of the target video are obtained, and the motion feature curve of the target video is determined according to the pixel positions of the optical flow feature points in each frame of image of the target video. On this basis, the feature parameter value of the motion feature curve is determined according to the target model and the motion feature curve, and then the stability of the target video is determined according to the feature parameter value. The feature parameter value is used to indicate the fluctuation degree of the motion feature curve. That is, by the above-mentioned video stability determination method, when evaluating the stability of the target video, the motion path of the target video is determined based on the pixel positions of the optical flow feature points in each frame of image of the target video to obtain the motion feature curve of the target video, and then the feature parameter value indicating the fluctuation degree of the motion feature curve is determined according to the motion feature curve of the target video and the target model, and the stability of the target video is evaluated according to the feature parameter value. In this way, without manual review, the stability of the video can be automatically analyzed based on the motion feature information of the video, that is, based on the feature parameter value representing the motion fluctuation degree or shaking degree of the video, the evaluation efficiency is guaranteed, the comprehensiveness and accuracy of the evaluation result are improved, and the requirement of evaluating the stability of a large number of videos is met.
[0080] In the embodiments of the present application, after S104, the video stability determination method further includes the following S110:
[0081] S110: smoothing the motion feature curve to remove noise information in the motion feature curve.
[0082] Specifically, in the video stability determination method provided in the embodiments of the present application, after obtaining the motion feature curve of the target video, the motion feature curve is further smoothed to filter part of the motion noise in the motion feature curve, so that in the subsequent process of evaluating the stability of the target video according to the motion feature curve, the noise information in the motion feature curve is avoided to interfere with the evaluation result, and the accuracy of evaluating the stability of the target video is ensured.
[0083] The motion feature curve represents the motion change rule of the target video between its multiple frames of images. Therefore, in actual application, the motion feature curve can be smoothed by weighting the curve coordinate values of the motion feature curve corresponding to each two consecutive frames of images, so as to remove the noise information in the motion feature curve.
[0084] In addition, the motion feature curve can include a first feature curve component of the target video in a first direction, such as the x direction, and a second feature curve component of the target video in a second direction, such as the y direction. The first feature curve component represents the motion change rule of the target video in the first direction between its multiple frames of images, and the second feature curve component represents the motion change rule of the target video in the second direction between its multiple frames of images.
[0085] In actual application, the first feature curve component and the second feature curve component can be smoothed respectively to further ensure the accuracy of evaluating the stability of the target video.
[0086] For example, the second feature curve component of the target video in the second direction, such as the y direction, is shown in (b) of FIG. 6. By smoothing the second feature curve component, the noise information in the second feature curve component is removed, and the smoothed second feature curve component is shown in (c) of FIG. 6. Figure 2 Figure 3
[0087] The above embodiments provided in the present application determine the motion feature curve of the target video, and then smooth the motion feature curve to remove the noise information in the motion feature curve. In this way, in the subsequent process of evaluating the stability of the target video according to the motion feature curve, the noise information in the motion feature curve is avoided to interfere with the evaluation result, and the accuracy of evaluating the stability of the target video is ensured.
[0088] In the embodiments of the present application, S110 can specifically include S110a-S110c as follows:
[0089] S110a: Obtain the feature coordinate value corresponding to each frame of image in the motion feature curve.
[0090] wherein the motion feature curve represents the motion change rule of the target video between its multiple frames of image.
[0091] Further, the feature coordinate value is the curve coordinate value (x, y) of the motion feature curve corresponding to each frame of image, wherein x is the coordinate component of the motion feature curve in the first direction such as x direction corresponding to each frame of image, and y is the coordinate component of the motion feature curve in the second direction such as y direction corresponding to each frame of image.
[0092] S110b: Perform weighted processing on the feature coordinate values corresponding to the adjacent two frames of image to obtain the target coordinate value.
[0093] Specifically, after obtaining the feature coordinate value corresponding to each frame of image in the motion feature curve, the feature coordinate values corresponding to each adjacent two frames of image are weighted processed to obtain the target coordinate value corresponding to each adjacent two frames of image.
[0094] In actual application process, for each adjacent two frames of image, the target coordinate values of the adjacent two frames of image in the first direction and the second direction can be respectively determined through the following formula (12) and formula (13):
[0095] x = 0.05x1 + 0.95x2, (12)
[0096] y = 0.05y1 + 0.95y2, (13)
[0097] wherein x is the target coordinate value of the adjacent two frames of image in the first direction such as x direction, x1 is the coordinate component corresponding to the previous frame of image in the first direction such as x direction in the adjacent two frames of image, x2 is the coordinate component corresponding to the next frame of image in the first direction such as x direction in the adjacent two frames of image, y is the target coordinate value of the adjacent two frames of image in the second direction such as y direction, y1 is the coordinate component corresponding to the previous frame of image in the second direction such as y direction in the adjacent two frames of image, and y2 is the coordinate component corresponding to the next frame of image in the second direction such as y direction in the adjacent two frames of image.
[0098] S110c: Take the target coordinate value as the feature coordinate value corresponding to the next frame of image in the adjacent two frames of image.
[0099] Specifically, after determining the target coordinate value of each adjacent two frames of image, for each adjacent two frames of image, the obtained target coordinate value is taken as the feature coordinate value corresponding to the next frame of image in the adjacent two frames of image, so as to realize the smoothing processing of the motion feature curve, thereby filtering the noise information in the motion feature curve.
[0100] According to the above embodiments provided in the application, the feature coordinate values corresponding to each frame of image in the motion feature curve are obtained, then the feature coordinate values corresponding to two adjacent frames of image are weighted to obtain the target coordinate values, and the target coordinate values are taken as the feature coordinate values corresponding to the latter frame of image in the two adjacent frames of image, so as to realize the smoothing processing of the motion feature curve. In this way, the motion feature curve is smoothed by weighting the curve coordinate values of the motion feature curve corresponding to each two continuous frames of image, so as to remove the noise information in the motion feature curve, avoid the noise information in the motion feature curve from interfering with the evaluation result of the target video stability, and ensure the accuracy of the evaluation of the target video stability.
[0101] In the embodiments of the application, the S104 can specifically include the following S104a and S104b:
[0102] S104a: determining the target transformation matrix and the target offset between each two adjacent frames of image in the target video according to the pixel positions of the optical flow feature points in each frame of image in the target video.
[0103] It can be understood that, between two continuous frames of image in the target video, the optical flow vector of the optical flow feature point between the two continuous frames of image is equivalent to the displacement amount of the optical flow feature point between the two continuous frames of image. The optical flow vector of the optical flow feature point represents the displacement change rate of the optical flow feature point between the two continuous frames of image.
[0104] However, the optical flow vector of the optical flow feature point can only represent the motion change rule of the optical flow feature point, that is, the motion feature. Therefore, in the video stability determination method proposed in the embodiments of the application, after the optical flow feature points in the target video are determined, the instantaneous displacement change rate of the optical flow feature points between each two adjacent frames of image is determined, that is, the optical flow vector of the optical flow feature points between each two adjacent frames of image is determined, according to the pixel positions of the optical flow feature points in each frame of image in the target video.
[0105] On this basis, after the optical flow information of the optical flow feature points is obtained, that is, after the motion features of the optical flow feature points are determined, the motion features of the target video as a whole are analyzed according to the target transformation model and the motion features of the optical flow feature points, so as to determine the target transformation matrix and the target offset between each two adjacent frames of image in the target video relative to the target transformation model, so as to subsequently determine the motion path, that is, the motion feature curve, of the target video according to the determined target transformation matrix and target offset.
[0106] S104b: determining the motion feature curve according to the target transformation matrix and the target offset.
[0107] Specifically, in the video stability determination method provided in the embodiments of the present application, the target transformation model can specifically adopt an affine transformation model.
[0108] The affine transformation is also referred to as affine mapping. The affine transformation refers to that a vector space is subjected to a linear transformation and then a translation, and is transformed into another vector space. That is, the affine transformation is a composite of two functions: translation and linear mapping.
[0109] On this basis, the target transformation matrix is a linear mapping matrix in the affine transformation, and the target offset is a translation in the affine transformation. According to the determined linear mapping matrix and translation, the affine mapping function of the optical flow feature point can be obtained, that is, the motion feature curve of the target video can be obtained.
[0110] For example, in the case where the target transformation matrix is A and the target offset is b, the motion feature curve of the target video can be represented by the following formula (14):
[0111]
[0112] wherein, represents the affine mapping function of the optical flow feature point , that is, represents the motion feature curve of the target video.
[0113] On this basis, by decomposing the formula (14), the motion feature curve component of the target video in the first direction, such as the x direction, and the motion feature curve component of the target video in the second direction, such as the y direction, can be obtained.
[0114] According to the embodiments provided in the present application, the target transformation matrix and the target offset between each two adjacent frames of images in the target video are determined according to the pixel position of the optical flow feature point in each frame of images of the target video, and then the motion feature curve is determined according to the determined target transformation matrix and target offset. In this way, the affine mapping function of the optical flow feature point based on the affine transformation model, that is, the motion feature curve of the target video, is determined, so as to represent the motion feature of the target video, so that the stability degree of the target video can be analyzed by analyzing the motion feature of the target video.
[0115] In the embodiments of the present application, the motion feature curve includes a first feature curve and a second feature curve, the first feature curve is a feature curve component of the target video in the first direction, and the second feature curve is a feature curve component of the target video in the second direction. On this basis, the S106 can specifically include the following S106a to S106c:
[0116] S106a: Obtain the first angle value between three coordinate points corresponding to every three adjacent frames in the first feature curve through the target model.
[0117] Among them, the first feature curve is the feature curve component of the target video in the first direction, such as the x-direction, and the first feature curve represents the motion change law of the target video in the first direction, such as the x-direction.
[0118] Furthermore, each first angle value is used to indicate the degree of undulation between the corresponding three coordinate points in the first feature curve, that is, the first angle value is used to indicate the motion change pattern in the first direction between every three adjacent images.
[0119] Furthermore, the aforementioned feature parameter value can specifically be a feature angle value, which is used to indicate the degree of undulation of the motion feature curve, that is, to indicate the degree of jitter in the target video.
[0120] Specifically, after obtaining the first feature curve of the target video, the first feature curve is input into the target model. The target model extracts three coordinate points corresponding to every three adjacent frames of the first feature curve and determines the first angle value formed by every three coordinate points, so as to determine the feature angle value of the motion feature curve based on the first angle value.
[0121] Additionally, it should be noted that the aforementioned first angle value is the supplementary angle value of the interior angle formed between the three coordinate points corresponding to every three adjacent frames of the first feature curve. A larger supplementary angle value indicates a steeper first feature curve between the three coordinate points, meaning a greater degree of jitter in the first direction for the three adjacent frames of the target video; a smaller supplementary angle value indicates a flatter first feature curve between the three coordinate points, meaning a smaller degree of jitter in the first direction for the three adjacent frames of the target video.
[0122] For example, the first feature curve of the target video is as follows: Figure 4 As shown, after inputting the first feature curve into the target model, the target model extracts three coordinate points B, C and D corresponding to three adjacent frames of the first feature curve, and determines the angle value of the supplementary angle β of the interior angle α formed by coordinate points B, C and D as the first angle value corresponding to these three adjacent frames.
[0123] S106b: Obtain the second angle value between three coordinate points corresponding to every three adjacent images in the second feature curve through the target model.
[0124] Among them, the second feature curve is the feature curve component of the target video in the second direction, such as the y-direction. The second feature curve represents the motion change law of the target video in the second direction, such as the y-direction.
[0125] Further, the second angle value is used to indicate the fluctuation degree between the corresponding three coordinate points in the second feature curve, that is, the second angle value is used to indicate the motion change rule in the second direction between every three adjacent images.
[0126] Specifically, after obtaining the second feature curve of the target video, the second feature curve is input into the target model, the target model extracts the three coordinate points corresponding to every three adjacent images in the second feature curve, and determines the second angle value formed by every three coordinate points, so as to subsequently determine the feature angle value of the motion feature curve according to the second angle value.
[0127] In addition, it should be noted that the second angle value is the supplementary angle value of the internal angle formed between the three coordinate points corresponding to every three adjacent images in the second feature curve. The larger the supplementary angle value is, the steeper the second feature curve between the three coordinate points is, that is, the greater the shaking degree of the three adjacent images corresponding to the target video in the second direction is; the smaller the supplementary angle value is, the flatter the second feature curve between the three coordinate points is, that is, the smaller the shaking degree of the three adjacent images corresponding to the target video in the second direction is.
[0128] S106c: determining the feature parameter value according to the first angle value and the second angle value.
[0129] The first angle value is used to indicate the motion change rule in the first direction between every three adjacent images, and the second angle value is used to indicate the motion change rule in the second direction between every three adjacent images.
[0130] Specifically, after the target model determines the first angle value between the three coordinate points corresponding to every three adjacent images in the first feature curve, and determines the second angle value between the three coordinate points corresponding to every three adjacent images in the second feature curve, the target model determines the feature angle value of the motion feature curve according to the determined plurality of first angle values and plurality of second angle values.
[0131] In actual application, the target model can be provided with the following formula (15) to determine the feature angle value of the motion feature curve by the formula (15):
[0132]
[0133] wherein, T is the feature angle value, n is the number of the first angle values, m is the number of the second angle values, T xi is the i th first angle value, T yi is the i th second angle value.
[0134] In the above embodiments provided in the present application, the motion feature curve includes a first feature curve and a second feature curve, the first feature curve is a feature curve component of the target video in a first direction, and the second feature curve is a feature curve component of the target video in a second direction. On this basis, the target audio is generated according to the first intermediate signal, the second intermediate signal, and the third intermediate signal. In this way, the first angle value between three coordinate points corresponding to every three adjacent images in the first feature curve is obtained through the target model, and each first angle value is used to indicate the fluctuation degree between the corresponding three coordinate points in the first feature curve. The second angle value between three coordinate points corresponding to every three adjacent images in the second feature curve is obtained through the target model, and the second angle value is used to indicate the fluctuation degree between the corresponding three coordinate points in the second feature curve. Then, the feature parameter value is determined according to the first angle value and the second angle value. In this way, the fluctuation degree of the motion feature curve of the target video is analyzed based on the angle change rule of the motion path of the target video in the first direction and the second direction, that is, the motion change rule of the target video is analyzed, and the accuracy of the stability analysis of the target video is ensured.
[0135] In addition, it also needs to be explained that there is no specific execution order between S106a and S106b, S106b can be executed after S106a is executed, S106a can be executed after S106b is executed, and S106a and S106b can also be executed at the same time. The execution order of S106a and S106b is not limited here.
[0136] In the embodiments of the present application, S108 can specifically include the following S108a and S108b:
[0137] S108a: comparing the feature parameter value with at least one target threshold value.
[0138] The feature parameter value can be a feature angle value, and the unit of the feature angle value is angle.
[0139] Further, the at least one target threshold value is used to divide the stability level of the target video.
[0140] In actual application process, the at least one target threshold value can specifically include a first threshold value and a second threshold value. The first threshold value is less than the second threshold value, the range from zero to the first threshold value is divided into one stability level, the range from the first threshold value to the second threshold value is divided into one stability level, and the range from the second threshold value to infinity is divided into one stability level.
[0141] Specifically, after determining the feature angle value of the target video, the feature angle value is compared with the first threshold and the second threshold to determine the numerical range in which the feature angle value is located, so as to determine the stability level of the target video and determine the stability degree of the target video.
[0142] S108b: determining the stability degree of the target video according to the comparison result.
[0143] The feature parameter value is negatively correlated with the stability degree, that is, the greater the feature parameter value, the worse the stability of the target video.
[0144] Specifically, after determining the feature angle value of the target video, if the feature angle value is less than the first threshold, it is considered that the stability of the target video is good, if the feature angle value is greater than or equal to the first threshold and less than the second threshold, it is considered that the stability of the target video is poor, and if the feature angle value is greater than or equal to the second threshold, it is considered that the stability of the target video is extremely poor.
[0145] The first threshold can be specifically 1.5, and the second threshold can be specifically 3. In actual application, a person skilled in the art can set the specific values of the first threshold and the second threshold according to actual conditions, which are not limited here.
[0146] In addition, in actual application, a plurality of target thresholds can be set to further divide the stability level of the target video, so as to improve the accuracy of the video stability determination result.
[0147] The above embodiments provided in the application, when determining the stability of the target video according to the feature parameter value, specifically, the feature parameter value is compared with at least one target threshold, and then the stability degree of the target video is determined according to the comparison result, wherein the feature parameter value is negatively correlated with the stability degree. In this way, without manual review, the stability of the video is automatically analyzed based on the feature parameter value that can represent the motion fluctuation degree or the shaking degree of the video, which guarantees the evaluation efficiency while improving the comprehensiveness and accuracy of the evaluation result, and meets the requirement of evaluating the stability of a large number of videos.
[0148] The video stability determination method provided in the first aspect of the application can be executed by a video stability determination device. In the embodiments of the application, the video stability determination method is executed by the video stability determination device, and the video stability determination device provided in the second aspect of the application is described.
[0149] As Figure 5As shown, the embodiment of the present application provides a video stability determination apparatus 500, which can include the following acquisition unit 502, first processing unit 504, second processing unit 506 and third processing unit 508.
[0150] The acquisition unit 502 is configured to acquire optical flow feature points of a target video.
[0151] The first processing unit 504 is configured to determine a motion feature curve of the target video according to pixel positions of the optical flow feature points in each frame image of the target video.
[0152] The second processing unit 506 is configured to determine a feature parameter value of the motion feature curve according to the target model and the motion feature curve, the feature parameter value being used to indicate a fluctuation degree of the motion feature curve.
[0153] The third processing unit 508 is configured to determine the stability of the target video according to the feature parameter value.
[0154] Through the video stability determination apparatus provided by the embodiment of the present application, the optical flow feature points of the target video are acquired, and the motion feature curve of the target video is determined according to the pixel positions of the optical flow feature points in each frame image of the target video. On this basis, the feature parameter value of the motion feature curve is determined according to the target model and the motion feature curve, and then the stability of the target video is determined according to the feature parameter value. The feature parameter value is used to indicate the fluctuation degree of the motion feature curve. That is, through the above-mentioned video stability determination method, when evaluating the stability of the target video, the motion path of the target video is determined based on the pixel positions of the optical flow feature points in each frame image of the target video to obtain the motion feature curve of the target video, and then the feature parameter value indicating the fluctuation degree of the motion feature curve is determined according to the motion feature curve of the target video and the target model, and the stability of the target video is evaluated according to the feature parameter value. In this way, without manual review, the motion feature information of the video, that is, the feature parameter value indicating the fluctuation degree or the shaking degree of the video, can be used to automatically analyze the stability of the video, which guarantees the evaluation efficiency, improves the comprehensiveness and accuracy of the evaluation result, and meets the requirement of evaluating the stability of a large number of videos.
[0155] In the embodiment of the present application, the video stability determination apparatus 500 further includes a fourth processing unit 510 configured to perform smoothing processing on the motion feature curve to remove noise information in the motion feature curve.
[0156] The above embodiments provided in the present application further perform smoothing processing on the motion feature curve after determining the motion feature curve of the target video, so as to remove the noise information in the motion feature curve. In this way, in the subsequent process of evaluating the stability of the target video according to the motion feature curve, the noise information in the motion feature curve is avoided to interfere with the evaluation result, and the accuracy of evaluating the stability of the target video is ensured.
[0157] In the embodiments of the present application, the fourth processing unit 510 is specifically configured to: acquire the feature coordinate value corresponding to each frame of image in the motion feature curve; perform weighted processing on the feature coordinate values corresponding to the adjacent two frames of images to obtain a target coordinate value; and take the target coordinate value as the feature coordinate value corresponding to the latter frame of image in the adjacent two frames of images.
[0158] The above embodiments provided in the present application acquire the feature coordinate value corresponding to each frame of image in the motion feature curve, and then perform weighted processing on the feature coordinate values corresponding to the adjacent two frames of images to obtain a target coordinate value, and take the target coordinate value as the feature coordinate value corresponding to the latter frame of image in the adjacent two frames of images, so as to realize the smoothing processing on the motion feature curve. In this way, the motion feature curve is smoothed by performing weighted processing on the curve coordinate values of the motion feature curve corresponding to each continuous two frames of images, so as to remove the noise information in the motion feature curve, avoid the noise information in the motion feature curve to interfere with the evaluation result of the stability of the target video, and ensure the accuracy of evaluating the stability of the target video.
[0159] In the embodiments of the present application, the first processing unit 504 is specifically configured to: determine the target transformation matrix and the target offset between each adjacent two frames of images in the target video according to the pixel position of the optical flow feature point in each frame of image of the target video; and determine the motion feature curve according to the target transformation matrix and the target offset.
[0160] The above embodiments provided in the present application determine the target transformation matrix and the target offset between each adjacent two frames of images in the target video according to the pixel position of the optical flow feature point in each frame of image of the target video, and then determine the motion feature curve according to the determined target transformation matrix and target offset. In this way, the affine mapping function of the optical flow feature point based on the affine transformation model is determined, that is, the motion feature curve of the target video is determined, so as to represent the motion feature of the target video, so as to analyze the stability degree of the target video by analyzing the motion feature of the target video subsequently.
[0161] In the embodiments of the present application, the motion feature curve includes a first feature curve and a second feature curve, the first feature curve is a feature curve component of the target video in a first direction, and the second feature curve is a feature curve component of the target video in a second direction. The second processing unit 506 is specifically configured to: obtain, through the target model, a first angle value between three coordinate points corresponding to every three adjacent images in the first feature curve, the first angle value being used to indicate a fluctuation degree between the three coordinate points in the first feature curve; obtain, through the target model, a second angle value between three coordinate points corresponding to every three adjacent images in the second feature curve, the second angle value being used to indicate a fluctuation degree between the three coordinate points in the second feature curve; and determine the feature parameter value according to the first angle value and the second angle value.
[0162] In the above embodiments provided by the present application, the motion feature curve includes a first feature curve and a second feature curve, the first feature curve is a feature curve component of the target video in a first direction, and the second feature curve is a feature curve component of the target video in a second direction. On this basis, the target audio is generated according to the first intermediate signal, the second intermediate signal and the third intermediate signal. In this way, the first angle value between three coordinate points corresponding to every three adjacent images in the first feature curve is obtained through the target model, each first angle value is used to indicate a fluctuation degree between the three coordinate points in the first feature curve, the second angle value between three coordinate points corresponding to every three adjacent images in the second feature curve is obtained through the target model, the second angle value is used to indicate a fluctuation degree between the three coordinate points in the second feature curve, and then the feature parameter value is determined according to the first angle value and the second angle value. In this way, the fluctuation degree of the motion feature curve of the target video is analyzed based on the angle change law of the motion path of the target video in the first direction and the second direction, that is, the motion change law of the target video is analyzed, and the accuracy of the stability analysis of the target video is ensured.
[0163] In the embodiments of the present application, the third processing unit 508 is specifically configured to: compare the feature parameter value with at least one target threshold value; and determine the stability degree of the target video according to a comparison result, wherein the feature parameter value is negatively related to the stability degree.
[0164] In the above embodiments provided by the present application, when the stability of the target video is determined according to the feature parameter value, the feature parameter value is compared with at least one target threshold value, and then the stability degree of the target video is determined according to a comparison result, wherein the feature parameter value is negatively related to the stability degree. In this way, without manual review, the stability of the video is automatically analyzed based on the feature parameter value capable of representing the motion fluctuation degree or the shaking degree of the video, the evaluation efficiency is ensured, the comprehensiveness and accuracy of the evaluation result are improved, and the requirement of evaluating the stability of a large number of videos is met.
[0165] The video stability determination apparatus 500 in the embodiments of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than the terminal. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The electronic device can also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a kiosk, or a self-service machine, etc. The embodiments of the present application are not limited in this regard.
[0166] The video stability determination apparatus 500 in the embodiments of the present application can be an apparatus with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, and the embodiments of the present application are not limited in this regard.
[0167] The video stability determination apparatus 500 provided by the second aspect of the embodiments of the present application can implement the method embodiments of the above method, and each process of the method embodiments is not repeated here. Figure 1 The video stability determination apparatus 500 provided by the second aspect of the embodiments of the present application can implement the method embodiments of the above method, and each process of the method embodiments is not repeated here.
[0168] Optionally, as shown in Figure 6 The embodiments of the present application also provide an electronic device 600, which includes a processor 602 and a memory 604. The memory 604 stores programs or instructions executable on the processor 602. When the programs or instructions are executed by the processor 602, each step of the video stability determination method embodiments of the first aspect described above is implemented, and the same technical effects are achieved. Each step is not repeated here to avoid repetition.
[0169] It should be noted that the electronic device in the embodiments of the present application includes the mobile electronic device and the non-mobile electronic device described above.
[0170] Figure 7 A hardware structure schematic diagram of an electronic device for implementing the embodiments of the present application.
[0171] The electronic device 700 includes, but is not limited to, a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710, and the like.
[0172] Those skilled in the art can understand that the electronic device 700 can further include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 710 through a power management system, so that the power management system can realize functions such as management of charging, discharging, and power consumption management. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than those shown, or combine certain components, or different component arrangements, which will not be described here.
[0173] The electronic device 700 of the embodiments of the present application can be used to implement each step of the above-mentioned first aspect video stability determination method embodiment.
[0174] The processor 710 is configured to obtain an optical flow feature point of a target video.
[0175] The processor 710 is further configured to determine a motion feature curve of the target video according to a pixel position of the optical flow feature point in each frame image of the target video.
[0176] The processor 710 is further configured to determine a feature parameter value of the motion feature curve according to the target model and the motion feature curve, the feature parameter value being used to indicate a fluctuation degree of the motion feature curve.
[0177] The processor 710 is further configured to determine a stability of the target video according to the feature parameter value.
[0178] In the embodiments of the present application, the optical flow feature points of the target video are acquired, and the motion feature curve of the target video is determined according to the pixel positions of the optical flow feature points in each frame image of the target video. On this basis, the feature parameter value of the motion feature curve is determined according to the target model and the motion feature curve, and then the stability of the target video is determined according to the feature parameter value. The feature parameter value is used to indicate the fluctuation degree of the motion feature curve. That is, when evaluating the stability of the target video, the motion path of the target video is determined based on the pixel positions of the optical flow feature points in each frame image of the target video to obtain the motion feature curve of the target video, and then the feature parameter value indicating the fluctuation degree of the motion feature curve is determined according to the motion feature curve of the target video and the target model, and the stability of the target video is evaluated according to the feature parameter value. In this way, without manual review, the motion feature information of the video, that is, the feature parameter value indicating the fluctuation degree or the shaking degree of the video, can be used to automatically analyze the stability of the video, ensuring the evaluation efficiency, improving the comprehensiveness and accuracy of the evaluation results, and meeting the requirement of evaluating the stability of a large number of videos.
[0179] Optionally, the processor 710 is further configured to perform smoothing processing on the motion feature curve to remove noise information in the motion feature curve.
[0180] The above embodiments provided in the present application will perform smoothing processing on the motion feature curve to remove noise information in the motion feature curve after determining the motion feature curve of the target video. In this way, in the subsequent process of evaluating the stability of the target video according to the motion feature curve, the noise information in the motion feature curve is avoided to interfere with the evaluation result, and the accuracy of evaluating the stability of the target video is ensured.
[0181] Optionally, the processor 710 is specifically configured to acquire the feature coordinate value corresponding to each frame image in the motion feature curve; perform weighted processing on the feature coordinate values corresponding to adjacent two frame images to obtain a target coordinate value; and take the target coordinate value as the feature coordinate value corresponding to the latter one of the adjacent two frame images.
[0182] The above embodiments provided in the application obtain the feature coordinate values corresponding to each frame of image in the motion feature curve, and then perform weighted processing on the feature coordinate values corresponding to the adjacent two frames of image to obtain the target coordinate value, and take the target coordinate value as the feature coordinate value corresponding to the latter frame of image in the adjacent two frames of image, so as to realize the smoothing processing of the motion feature curve. In this way, the motion feature curve is smoothed by performing weighted processing on the curve coordinate values of the motion feature curve corresponding to each continuous two frames of image, so as to remove the noise information in the motion feature curve, avoid the noise information in the motion feature curve from interfering with the evaluation result of the stability of the target video, and ensure the accuracy of the evaluation of the stability of the target video.
[0183] Optionally, the processor 710 is specifically configured to: determine the target transformation matrix and the target offset between each adjacent two frames of image in the target video according to the pixel position of the optical flow feature point in each frame of image in the target video; and determine the motion feature curve according to the target transformation matrix and the target offset.
[0184] The above embodiments provided in the application determine the target transformation matrix and the target offset between each adjacent two frames of image in the target video according to the pixel position of the optical flow feature point in each frame of image in the target video, and then determine the motion feature curve according to the determined target transformation matrix and target offset. In this way, the affine mapping function of the optical flow feature point based on the affine transformation model is determined, that is, the motion feature curve of the target video is determined, so as to represent the motion feature of the target video, so that the stability degree of the target video is analyzed by analyzing the motion feature of the target video subsequently.
[0185] Optionally, the motion feature curve includes a first feature curve and a second feature curve, the first feature curve is a feature curve component of the target video in a first direction, and the second feature curve is a feature curve component of the target video in a second direction. The processor 710 is specifically configured to: obtain a first angle value between three coordinate points corresponding to each three adjacent frames of image in the first feature curve through the target model, the first angle value being used to indicate the fluctuation degree between the corresponding three coordinate points in the first feature curve; obtain a second angle value between three coordinate points corresponding to each three adjacent frames of image in the second feature curve through the target model, the second angle value being used to indicate the fluctuation degree between the corresponding three coordinate points in the second feature curve; and determine the feature parameter value according to the first angle value and the second angle value.
[0186] In the above embodiments provided in the present application, the motion feature curve includes a first feature curve and a second feature curve, the first feature curve is a feature curve component of the target video in a first direction, and the second feature curve is a feature curve component of the target video in a second direction. On this basis, the target audio is generated according to the first intermediate signal, the second intermediate signal and the third intermediate signal. In this way, the first angle value between three coordinate points corresponding to every three adjacent images in the first feature curve is obtained through the target model, each first angle value is used to indicate the fluctuation degree between the corresponding three coordinate points in the first feature curve, and the second angle value between three coordinate points corresponding to every three adjacent images in the second feature curve is obtained through the target model, the second angle value is used to indicate the fluctuation degree between the corresponding three coordinate points in the second feature curve, and then the feature parameter value is determined according to the first angle value and the second angle value. In this way, the fluctuation degree of the motion feature curve of the target video is analyzed based on the angle change rule of the motion path of the target video in the first direction and the second direction, that is, the motion change rule of the target video is analyzed, and the accuracy of the stability analysis of the target video is ensured.
[0187] Optionally, the processor 710 is specifically configured to: compare the feature parameter value with at least one target threshold value; determine the stability degree of the target video according to a comparison result; and the feature parameter value is negatively correlated with the stability degree.
[0188] In the above embodiments provided in the present application, when the stability of the target video is determined according to the feature parameter value, the feature parameter value is compared with at least one target threshold value, and then the stability degree of the target video is determined according to a comparison result, and the feature parameter value is negatively correlated with the stability degree. In this way, without manual review, the stability of the video is automatically analyzed based on the feature parameter value capable of representing the motion fluctuation degree or the shaking degree of the video, the evaluation efficiency is ensured, the comprehensiveness and accuracy of the evaluation result are improved, and the requirement of evaluating the stability of a large number of videos is met.
[0189] It should be understood that in the embodiments of the present application, the input unit 704 can include a graphics processor (GPU) 7041 and a microphone 7042. The graphics processor 7041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 706 can include a display panel 7061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 707 includes at least one of a touch panel 7071 and other input devices 7072. The touch panel 7071 is also referred to as a touch screen. The touch panel 7071 can include two parts of a touch detection device and a touch controller. The other input devices 7072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, and the like), a trackball, a mouse, a joystick, and the like, which will not be described here.
[0190] The memory 709 can be used to store software programs and various data. The memory 709 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, and the like), and the like. In addition, the memory 709 can include a volatile memory or a non-volatile memory, or the memory 709 can include both volatile and non-volatile memories. The non-volatile memory can 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 can be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory 709 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.
[0191] The processor 710 can include one or more processing units; alternatively, the processor 710 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 710.
[0192] The embodiment of the present application further provides a readable storage medium, and the readable storage medium stores a program or instructions, the program or instructions are executed by a processor to realize each process of the video stability determination method embodiment of the first aspect, and the same technical effects can be achieved, and details are not repeated here.
[0193] The processor is a processor in the electronic device in the above-mentioned embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0194] The embodiment of the present application further provides a chip, and the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used to run a program or instructions to realize each process of the video stability determination method embodiment of the first aspect, and the same technical effects can be achieved, and details are not repeated here.
[0195] It should be understood that the chip mentioned in the embodiment of the present application can also be referred to as a system level chip, a system chip, a chip system, or a system on chip, etc.
[0196] The embodiment of the present application provides a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to realize each process of the video stability determination method embodiment of the first aspect, and the same technical effects can be achieved, and details are not repeated here.
[0197] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element. Furthermore, it is to be understood that the method and apparatus of the present application can be carried out by more than one process, method, article, or apparatus either simultaneously, concurrently, or with intermediate steps missing or added. Also, the features described in relation to one example can be combined with features described in relation to other examples.
[0198] From the above description of the embodiments, it is apparent that the above-described method of the embodiments can be implemented by means of software and the requisite general- purpose hardware platform, of course, but in many cases the former is the preferred implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product stored in a storage medium (such as a ROM / RAM, a magnetic disk, an optical disk), including a number of instructions for causing a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the method of each embodiment of the present application.
[0199] The embodiments of the present application are described above in conjunction with the drawings, but the present application is not limited to the specific embodiments described above, which are merely illustrative rather than restrictive, and a person of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the protection scope of the claims.
Claims
1. A method of video stability determination, characterized by, The method comprises the following steps: obtaining optical flow feature points of a target video; determining a motion feature curve of the target video according to pixel positions of the optical flow feature points in each frame image of the target video; the motion feature curve comprises a first feature curve and a second feature curve, the first feature curve is a feature curve component of the target video in a first direction, the second feature curve is a feature curve component of the target video in a second direction, and a feature parameter value of the motion feature curve is a feature angle value; obtaining a first angle value between three coordinate points corresponding to every three adjacent images in the first feature curve through a target model, each first angle value being used to indicate a fluctuation degree between the corresponding three coordinate points in the first feature curve, and the first angle value being a supplementary angle value of an internal angle formed between the three coordinate points corresponding to every three adjacent images in the first feature curve; obtaining a second angle value between three coordinate points corresponding to every three adjacent images in the second feature curve through the target model, the second angle value being used to indicate a fluctuation degree between the corresponding three coordinate points in the second feature curve, and the second angle value being a supplementary angle value of an internal angle formed between the three coordinate points corresponding to every three adjacent images in the second feature curve; determining a feature parameter value of the motion feature curve according to the first angle value and the second angle value, the feature parameter value being used to indicate a fluctuation degree of the motion feature curve; determining a stability of the target video according to the feature parameter value.
2. The video stability determination method of claim 1, wherein, After the motion feature curve of the target video is determined, the method further comprises the following steps: performing smoothing processing on the motion feature curve to remove noise information in the motion feature curve; the smoothing processing on the motion feature curve comprises the following steps: obtaining a feature coordinate value corresponding to each frame image in the motion feature curve; performing weighted processing on feature coordinate values corresponding to adjacent two frame images to obtain a target coordinate value; taking the target coordinate value as a feature coordinate value corresponding to a later frame image in the adjacent two frame images.
3. The video stability determination method of claim 1, wherein, The determination of the motion feature curve of the target video according to the pixel positions of the optical flow feature points in each frame image of the target video comprises the following steps: determining a target transformation matrix and a target offset between every adjacent two frame images in the target video according to the pixel positions of the optical flow feature points in each frame image of the target video; determining the motion feature curve according to the target transformation matrix and the target offset.
4. The video stability determination method of any of claims 1 to 3, wherein, The determination of the stability of the target video according to the feature parameter value comprises the following steps: comparing the feature parameter value with at least one target threshold value; determining a stability degree of the target video according to a comparison result; wherein the feature parameter value and the stability degree are negatively correlated.
5. A video stability determination apparatus characterized by comprising: The method comprises the following steps: an obtaining unit is configured to obtain optical flow feature points of a target video; The first processing unit is configured to determine a motion feature curve of the target video according to pixel positions of the optical flow feature points in each frame image of the target video, the motion feature curve comprising a first feature curve and a second feature curve, the first feature curve being a feature curve component of the target video in a first direction, the second feature curve being a feature curve component of the target video in a second direction, and a feature parameter value of the motion feature curve being a feature angle value. The second processing unit is configured to: obtain, by using a target model, a first angle value between three coordinate points corresponding to every three adjacent images in the first feature curve, the first angle value being used to indicate a fluctuation degree between the three coordinate points in the first feature curve, and the first angle value being a supplementary angle value of an internal angle formed between the three coordinate points corresponding to every three adjacent images in the first feature curve; obtain, by using the target model, a second angle value between three coordinate points corresponding to every three adjacent images in the second feature curve, the second angle value being used to indicate a fluctuation degree between the three coordinate points in the second feature curve, and the second angle value being a supplementary angle value of an internal angle formed between the three coordinate points corresponding to every three adjacent images in the second feature curve; and determine the feature parameter value of the motion feature curve according to the first angle value and the second angle value, the feature parameter value being used to indicate the fluctuation degree of the motion feature curve. The third processing unit is configured to determine the stability of the target video according to the feature parameter value.
6. The video stability determination apparatus of claim 5, wherein, The video stability determination apparatus further comprises: A fourth processing unit configured to perform smoothing processing on the motion feature curve to remove noise information in the motion feature curve. The fourth processing unit is specifically configured to: Obtain a feature coordinate value corresponding to each frame image in the motion feature curve. Perform weighted processing on feature coordinate values corresponding to adjacent two frame images to obtain a target coordinate value. Take the target coordinate value as a feature coordinate value corresponding to a later frame image in the adjacent two frame images.
7. The video stability determination apparatus of claim 5, wherein, The first processing unit is specifically configured to: Determine a target transformation matrix and a target offset between every adjacent two frame images in the target video according to pixel positions of the optical flow feature points in each frame image of the target video. Determine the motion feature curve according to the target transformation matrix and the target offset.
8. The video stability determination apparatus of any of claims 5 to 7, wherein, The third processing unit is specifically configured to: Compare the feature parameter value with at least one target threshold value. Determine a stability degree of the target video according to a comparison result. The feature parameter value is negatively correlated with the stability degree.
Citation Information
Patent Citations
Video stability quality assessment method based on interframe motion amplitude statistics
CN105812788A