CN115714911A - Zoom effect determination method and device, electronic equipment and storage medium - Google Patents

Zoom effect determination method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115714911A
CN115714911A CN202110961045.5A CN202110961045A CN115714911A CN 115714911 A CN115714911 A CN 115714911A CN 202110961045 A CN202110961045 A CN 202110961045A CN 115714911 A CN115714911 A CN 115714911A
Authority
CN
China
Prior art keywords
determining
preset
curve
zoom
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110961045.5A
Other languages
Chinese (zh)
Inventor
柳炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110961045.5A priority Critical patent/CN115714911A/en
Publication of CN115714911A publication Critical patent/CN115714911A/en
Pending legal-status Critical Current

Links

Images

Abstract

The disclosure relates to a method and a device for determining zoom effect, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring a target video containing a zooming process, wherein the target video is provided with a plurality of video frames; determining position information of preset feature points in a plurality of video frames; and determining a zoom evaluation result of the target video according to the position information of the preset feature points in each video frame. By using the method disclosed by the invention, the position information of the preset characteristic point in each video frame is obtained in a refining way by taking the preset characteristic point as a reference for the target video related to the zooming operation. Therefore, a zooming evaluation result is obtained according to the position change of the preset feature points in each video frame. The zooming effect is automatically determined in an algorithm mode, so that the labor cost is reduced more objectively and accurately.

Description

Zoom effect determination method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of image processing, and in particular, to a method and an apparatus for determining a zoom effect, an electronic device, and a storage medium.
Background
With the development of the technology, the shooting function of electronic equipment such as a mobile phone is more and more perfect, and the shooting effect is better and better. When shooting with an electronic device, a user usually needs to zoom (zoom) to adjust an object in a scene. Smoothness of the zooming process is an important evaluation criterion for the shooting performance of the electronic device.
In the related art, the zooming effect of the electronic equipment is often judged in a manual mode, the subjectivity is strong, and the zooming performance of the electronic equipment cannot be accurately known.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method and an apparatus for determining a zoom effect, an electronic device, and a storage medium.
According to a first aspect of the embodiments of the present disclosure, a method for determining a zoom effect is provided, including:
acquiring a target video containing a zooming process, wherein the target video is provided with a plurality of video frames;
determining position information of preset feature points in a plurality of video frames;
and determining a zoom evaluation result of the target video according to the position information of the preset feature points in each video frame.
In some embodiments, the determining the position information of the preset feature points in a plurality of video frames includes:
determining coordinates of the preset feature points in each video frame, and obtaining a coordinate set comprising a plurality of coordinates, wherein the arrangement sequence of the plurality of coordinates in the coordinate set corresponds to the arrangement sequence of the plurality of video frames in the target video;
the determining the zoom evaluation result of the target video according to the position information of the preset feature point in each video frame includes:
determining a plurality of preset coordinates according to the coordinate set;
determining an evaluation curve according to the preset coordinates;
and determining the zoom evaluation result according to the coordinate set and the evaluation curve.
In some embodiments, the zoom evaluation result includes a zoom smoothness, and the determining the zoom evaluation result according to the coordinate set and the evaluation curve includes:
determining an operation parameter according to the distance between the preset coordinate and the evaluation curve;
and characterizing the zoom smoothing degree by the operation parameter.
In some embodiments, said characterizing said zoom smoothing level by said operational parameter comprises:
acquiring configuration information, wherein the configuration information is used for representing the corresponding relation between a threshold range and a smoothness degree grade;
and determining the smoothness degree grade corresponding to the threshold range of the operation parameter according to the operation parameter and the configuration information.
In some embodiments, the evaluation curve is a reference fit curve;
determining a plurality of preset coordinates according to the coordinate set includes:
selecting part or all of the coordinates in the coordinate set as a plurality of preset coordinates;
determining an operation parameter according to the distance between the preset coordinate and the evaluation curve, wherein the determining comprises:
determining the distance between each preset coordinate and the reference fitting curve to obtain a plurality of distances;
and determining the operation parameters by adopting a preset operation mode according to the plurality of distances.
In some embodiments, the evaluation curve is a displacement variation curve;
determining a plurality of preset coordinates according to the coordinate set, including:
taking the coordinate difference of every two adjacent coordinates in the coordinate set as the preset coordinate;
determining an operation parameter according to the distance between the preset coordinate and the evaluation curve, wherein the determining comprises:
determining the distance between each preset coordinate and the displacement change curve to obtain a plurality of distances;
and determining the operation parameters by adopting a preset operation mode according to the plurality of distances.
In some embodiments, the evaluation curve is a displacement variation curve;
determining a plurality of preset coordinates according to the coordinate set, including:
taking the coordinate difference of every two adjacent coordinates in the coordinate set as the preset coordinate;
the determining the zoom evaluation result according to the coordinate set and the evaluation curve further includes:
in response to that the displacement change curve is a smooth curve, determining that the zoom evaluation result of the target video is smooth;
responding to the fact that the displacement change curve is a non-smooth curve, and determining that the zoom evaluation result of the target video is non-smooth;
and outputting the displacement change curve and the zooming evaluation result.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for determining a zoom effect, including:
the device comprises an acquisition module, a display module and a control module, wherein the acquisition module is used for acquiring a target video containing a zooming process, and the target video is provided with a plurality of video frames;
the first determining module is used for determining the position information of preset feature points in a plurality of video frames;
and the second determining module is used for determining the zoom evaluation result of the target video according to the position information of the preset feature point in each video frame.
In some embodiments, the location information comprises coordinates, the first determination module is to:
determining coordinates of the preset feature points in each video frame, and obtaining a coordinate set comprising a plurality of coordinates, wherein the arrangement sequence of the plurality of coordinates in the coordinate set corresponds to the arrangement sequence of the plurality of video frames in the target video;
the second determination module is to:
determining a plurality of preset coordinates according to the coordinate set;
determining an evaluation curve according to a plurality of preset coordinates;
and determining the zoom evaluation result according to the coordinate set and the evaluation curve.
In some embodiments, the zoom evaluation result comprises a zoom smoothing degree, and the second determination module is further configured to:
determining an operation parameter according to the distance between the preset coordinate and the evaluation curve;
and characterizing the zoom smoothing degree by the operation parameter.
In some embodiments, the second determination module is further configured to:
acquiring configuration information, wherein the configuration information is used for representing the corresponding relation between a threshold range and a smoothness degree grade;
and determining the smoothness degree grade corresponding to the threshold range of the operation parameter according to the operation parameter and the configuration information.
In some embodiments, the evaluation curve is a reference fit curve;
the second determination module is further to: selecting part or all of the coordinates in the coordinate set as a plurality of preset coordinates;
the second determination module is further to:
determining the distance between each preset coordinate and the reference fitting curve to obtain a plurality of distances;
and determining the operation parameters by adopting a preset operation mode according to the plurality of distances.
In some embodiments, the evaluation curve is a displacement variation curve;
the second determination module is to:
taking the coordinate difference of every two adjacent coordinates in the coordinate set as the preset coordinate;
the second determination module is further to:
determining the distance between each preset coordinate and the displacement change curve to obtain a plurality of distances;
and determining the operation parameters by adopting a preset operation mode according to the plurality of distances.
In some embodiments, the evaluation curve is a displacement variation curve;
the second determination module is to: taking the coordinate difference of every two adjacent coordinates in the coordinate set as the preset coordinate;
the second determining module is further configured to: in response to that the displacement change curve is a smooth curve, determining that the zoom evaluation result of the target video is smooth;
in response to the fact that the displacement change curve is a non-smooth curve, determining that the zoom evaluation result of the target video is non-smooth;
and outputting the displacement change curve and the zooming evaluation result.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of determining zoom effect as defined in any one of the above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method of determining a zoom effect as described in any one of the above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: by using the method disclosed by the invention, the position information of the preset characteristic point in each video frame is obtained in a refining way by taking the preset characteristic point as a reference for the target video related to the zooming operation. Therefore, whether the zooming effect is smooth or not is determined according to the position change of the preset characteristic points in each video frame. The zooming effect is automatically determined in an algorithm mode, so that the labor cost is reduced more objectively and accurately.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart illustrating a method according to an example embodiment.
FIG. 2 is a flowchart illustrating a method according to an example embodiment.
FIG. 3 is a flow chart illustrating a method according to an example embodiment.
FIG. 4 is a flowchart illustrating a method in accordance with an example embodiment.
Fig. 5 is a block diagram illustrating an apparatus according to an example embodiment.
FIG. 6 is a block diagram of an electronic device shown in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
With the development of the technology, the shooting function of electronic equipment such as a mobile phone is more and more perfect, and the shooting effect is better and better. When shooting with an electronic device, a user usually needs to zoom (zoom) to adjust an object in a scene. Smoothness of the zooming process is an important evaluation criterion for the shooting performance of the electronic device.
In the related art, the zooming effect of the electronic device is often determined by a human way, and this way has at least the following technical problems:
firstly, the subjectivity is strong, and the zooming performance of the electronic equipment cannot be accurately known.
Second, the zoom performance contrast between multiple electronic devices cannot be accurately known.
Thirdly, the shaking situation during zooming cannot be accurately known.
In an embodiment of the present disclosure, a method for determining a zoom effect is provided, including: a target video including a zooming process is acquired, wherein the target video has a plurality of video frames. And determining the position information of the preset feature points in the plurality of video frames. And determining a zoom evaluation result of the target video according to the position information of the preset feature points in each video frame. By using the method disclosed by the invention, the position information of the preset characteristic points in each video frame is obtained in a refining way by taking the preset characteristic points as references for the target video related to the zooming operation. Therefore, a zooming evaluation result is obtained according to the position change of the preset feature points in each video frame. The zooming effect is automatically determined in an algorithm mode, so that the labor cost is reduced more objectively and accurately.
In an exemplary embodiment, the method for determining the zoom effect of the present embodiment is applied to an electronic device. Wherein, electronic equipment for example can be electronic equipment such as cell-phone, panel computer, notebook computer, intelligent wearing equipment.
As shown in fig. 1, the method of this embodiment may include the following steps:
and S110, acquiring a target video containing a zooming process.
And S120, determining the position information of the preset feature points in the plurality of video frames.
And S130, determining a zoom evaluation result of the target video according to the position information of the preset feature points in each video frame.
In step S110, according to the operation instruction, the video recording interface may be entered in the camera program of the electronic device. In the video recording interface, a user can manually zoom and continuously adjust the scenery in the viewing interface, and the target video comprises the zooming process.
For example, in the process of adjusting the view interface by zooming, the electronic device records the zooming adjustment process in real time through a screen recording program to obtain a target video. The target video recorded by the screen can be stored in a set position, and the processor acquires the target video from the set position.
Or, in the process of recording the video in the camera program, the zoom adjustment operation is kept until the recording is finished, and the target video containing the zoom adjustment process is obtained. The processor of the electronic device may obtain the target video with the end of recording, or the target video with the end of recording may be stored in the electronic device, and the processor obtains the target video from the storage location.
In this step, the target video has a plurality of video frames. After the target video is obtained, the processor may control framing of the target video. The framing process may be performed according to a preset unit duration (e.g., 1S), so as to obtain a plurality of consecutive video frames.
In step S120, the preset feature points may be, for example, corner points in a video frame or key points of five sense organs of a person, and the preset feature points may be manually selected or automatically identified by the system during the processing.
In this step, the automatic identification of the preset feature points is taken as an example for description, and the preset feature points are, for example, corner points. Various image processing algorithms, such as recognition algorithms, tracking algorithms (e.g., optical flow methods), etc., may be integrated into the chip of the electronic device. The processor or application may invoke an image processing algorithm, identify and track the predetermined feature points in each video frame, and determine location information of the predetermined feature points in each video frame. In this embodiment, the number of the preset feature points is not limited, and the position information of the same preset feature point in each video frame may be obtained.
The position information may be, for example, coordinates or depth of a preset feature point.
In step S130, a zoom evaluation result of the target video may be determined according to the position information of the preset feature point in each video frame. The zoom evaluation result may represent whether or not the zoom effect of the target video is smooth, or the degree of smoothness.
According to the sequence of the video frames after the target video is framed, each two adjacent video frames are recorded as a group of video frame groups, and the target video can comprise a plurality of groups of video frame groups. The zoom effect smoothing may refer to: in the zooming process, the multiplying power change of a plurality of groups of video frame groups not less than the group number threshold value is in a preset range. For example, the change of the magnification of each group of video frames is within a preset range, that is, the change of the magnification of any two adjacent video frames is within a preset range. Alternatively, the group number threshold may be set to, for example: n/2 m, n represents the number of video frames and m represents the percentage. For example, m may be 70%, and in n/2 groups of video frames formed by n video frames, the change of the magnification of more than or equal to 70% of the groups of video frames is within a preset range. When zooming is smooth, in the video playing process, the change of adjacent video frames is smooth, and the picture or the focusing point cannot shake excessively.
The non-smooth zoom effect may refer to: in the zooming process, the multiplying power of the multiple groups of video frames which are larger than the group number threshold value is changed outside a preset range. When zooming is not smooth, in the video playing process, the image or focus jitter is large, and the user experience is not good.
In this embodiment, for example, whether the zooming effect is smooth or not may be represented or determined by judging the coordinate change of the preset feature point.
In an exemplary embodiment, after step S130, the following steps may be further included: outputting a zoom evaluation result; for example, the zoom evaluation result may be displayed via a screen and/or the zoom evaluation result may be broadcast via an audio component.
In an exemplary embodiment, the position information includes coordinates, and as shown in fig. 2, step S120 of the present embodiment may include the following steps:
s1201, determining the coordinates of the preset feature points in each video frame, and obtaining a coordinate set containing a plurality of coordinates.
On this basis, step S130 in this embodiment may include the following steps:
and S131, determining an evaluation curve according to the coordinate set.
And S132, determining a zoom evaluation result according to the coordinate set and the evaluation curve.
In step S1201, the arrangement order of the plurality of coordinates in the coordinate set corresponds to the arrangement order of the plurality of video frames in the target video.
In this step, after the target video is framed, according to the arrangement sequence (time sequence) of the plurality of video frames after framing, each video frame can obtain the coordinates of the preset feature points, so as to obtain a plurality of coordinates corresponding to the plurality of video frames one by one, and a point set formed by the plurality of coordinates is recorded as a coordinate set.
In step S131, step S131 may include the steps of:
s1311, determining a plurality of preset coordinates according to the coordinate set. In this step, the preset coordinates may be part or all of the coordinates selected from the plurality of coordinates; the preset coordinates may also be coordinates obtained by performing corresponding operations according to a plurality of coordinates, for example, the preset coordinates are coordinate differences between every two adjacent coordinates in the coordinate set.
And S1312, determining an evaluation curve according to a plurality of preset coordinates. In this step, the evaluation curve may be used to represent a reference curve when the target video has good smoothness.
In an exemplary embodiment, the evaluation curve may include a reference fitting curve or a displacement variation curve, and the evaluation curve may reflect the variation between video frames in the target video frame. The reference fitting curve may be obtained by fitting a plurality of coordinates, and the displacement variation curve may be obtained by fitting the coordinate variation information of adjacent video frames.
In step S132, the processor may determine whether the zoom effect is smooth according to the plurality of coordinates in the coordinate set and the evaluation curve.
In an exemplary embodiment, as shown in fig. 3, step S132 in this embodiment may include the following steps:
s1321, determining an operation parameter according to the distance between the preset coordinate and the evaluation curve.
And S1322, representing the zooming smoothness degree by the operation parameter.
In step S1321, the operation parameter may be an average value, a maximum value, a minimum value, or the like obtained according to the distance. The evaluation curve represents a reference curve when the zooming effect is good, the processor calculates the distance between each budget coordinate and the evaluation curve according to the distance between the preset coordinate and the evaluation curve, and then determines the operation parameters according to a plurality of distances.
In step S1322, the processor may calculate a difference between the parameter representing the target video zooming effect and the better effect represented by the reference curve. For example, the operation parameter is an average value of a plurality of distances, and the average value is equivalent to the zoom level score to represent the zoom evaluation result of the target video.
In an exemplary embodiment, as shown in fig. 4, step S1322 in this embodiment may include the following steps:
s1322-1, obtaining configuration information.
S1322-2, determining the smoothness degree grade corresponding to the threshold range where the operation parameter is located according to the operation parameter and the configuration information.
In step S1322-1, the configuration information is used to represent a corresponding relationship between the threshold range and the smoothness level. The configuration information may be predetermined and stored in the electronic device. The processor may retrieve the configuration information from the storage location.
In step S1322-2, the processor may determine, according to the operation parameter and the configuration information, a smoothness level corresponding to the operation parameter in the configuration information in a manner of table lookup or query traversal.
For example, the operation parameter is within a first threshold range, and the corresponding level of the degree of smoothness is a first level. The operation parameter is in the second threshold range, and the corresponding smoothness degree grade is a second grade. The operation parameter is in a third threshold range, and the corresponding smoothness degree grade is a third grade. Wherein the first threshold range > the second threshold range > the third threshold range, the first ranking is better than the second ranking, and the second ranking is better than the third ranking.
In combination with the form of the evaluation curve, the disclosed embodiments may include the following two examples. When the evaluation curve may be a reference fitting curve, see the first example below; when the evaluation curve may be a displacement curve, see the second example below.
In a first example:
in this example, the evaluation curve may be a reference fitting curve. The reference fitted curve may be generated based on all or part of the coordinate fit in the coordinate set.
Step S1311 in this example may include the following steps:
s1311-1, selecting a part or all of the coordinates in the coordinate set as a plurality of preset coordinates.
In this example, step S1321 may include the steps of:
s1321-1, determining the distance between each preset coordinate and the reference fitting curve to obtain a plurality of distances.
S1321-2, determining an operation parameter by adopting a preset operation mode according to the plurality of distances.
In step S1311-1, the processor may select all coordinates in the coordinate set as preset coordinates, that is, the number of the preset coordinates may be the same as the number of the coordinates in the coordinate set, and the preset coordinates correspond to the coordinates in the coordinate set one to one. Or selecting a part of coordinates in the coordinate set as preset coordinates, wherein the number of the preset coordinates is less than that of the coordinates in the coordinate set.
In the step, the processor can control the calling algorithm to be fitted to obtain a reference fitting curve by taking a plurality of preset coordinates as sample data. For example, coordinates are preset with (x) i ,y i ) Denotes, where i =1,2,3. The function or curve form is, for example, the following polynomial: y is θ (x)=θ 01 x+θ 2 x 2 +...θ n x n Wherein n is a natural number; the abscissa in the reference fitted curve may be x and the ordinate may be y.
Calculating the coefficient theta in the polynomial by using a plurality of preset coordinates as test data pairs and combining an MATLAB least square method 0 、θ 1 、θ 2 ……θ n . In the step, when the least square method is used for solving the coefficient, the coefficient can be derived, the partial derivative is 0, and the coefficient is solved; the coefficients are determined such that the scalar function is minimized. Wherein, the standard function number = ∑ (sample data-reference data) 2 The reference data is, for example, a reference fitted curve.
In step S1321-1, the reference fitted curve is a theoretical curve that is algorithmically determined and may represent an ideal smooth state of the zooming process. The deviation of the preset coordinates from the curve may reflect the zooming effect in the target video.
In this step, there are a plurality of preset coordinates (x) on the reference fitting curve i ,y i ) Point (X) on a plurality of curves in one-to-one correspondence i ,Y i ). The processor may control the calling algorithm to calculate the distance l between each preset coordinate and the corresponding point,
Figure BDA0003222072520000091
Figure BDA0003222072520000092
and obtaining a plurality of distances as the distance between each preset coordinate and the reference fitting curve.
In step S1321-2, the preset operation manner may be, for example, an algorithm such as an average, a variance, an extreme value, and the like. The processor can determine corresponding operation parameters by adopting a preset operation mode according to the plurality of distances.
In this step, a preset operation mode is taken as an average value algorithm, and an operation parameter is taken as an average value.
After the processor determines the distance between each preset coordinate and the reference fitting curve, the average distance laverage can be determined according to the distance between each preset coordinate and the reference fitting curve. The average value laverage indicates the average smoothness throughout the zooming. The smaller the coverage is, the closer the whole preset coordinate and the reference fitting curve are, and the closer the zooming effect of the target video is to the ideal state represented by the reference fitting curve.
In this example, the zoom smoothness of the target video may be directly characterized by the average value, and the average value determined by the processor is output to the interface and displayed to the user. If the average value is laverage, the zoom smoothness is denoted laverage. Therefore, when the zooming effects of different products are compared, the zooming effects of the different products can be directly compared according to the average value, and the comparison is more visual and convenient.
Or the processor determines the threshold range of the average value according to the configuration information, so as to determine the smoothness degree grade corresponding to the average value. The processor outputs the determined smoothness level to an interface display.
In addition, in this step, the preset operation mode may further include an extremum or a maximum value algorithm, and the operation parameter may further include a maximum value and a minimum value.
For example, the distance function l is derived to obtain an extreme point (the extreme point corresponds to when the derivation is zero), and the maximum point can be further determined according to the obtained extreme point. It can be understood that the extreme point may be the most significant point, or may not be the most significant point, and needs to be determined by combining the variation conditions of the extreme point on both sides of the interval. From the extreme points, the minimum distance lmin and the maximum distance lmax of the coordinate points to the reference fitted curve distance can be determined.
The minimum distance lmin indicates the optimal smooth state during zooming, and the maximum distance lmax indicates the worst smooth state during zooming. The zoom effect can be evaluated more accurately by combining the maximum distance and the average value. For example, when the average value and the maximum distance are both within a first threshold range, indicating that the zoom effect approaches the ideal state represented by the reference fitting curve, the zoom effect of the target video is at a first level.
In the example, the zoom effect of the target video can be quantitatively evaluated according to the relation between each preset coordinate and the reference fitting curve, and the evaluation mode is more visual and convenient.
In a second example:
in this example, the evaluation curve may be a displacement variation curve. The displacement variation curve can be generated by fitting based on a plurality of new coordinates obtained by corresponding operations on all or part of the coordinates in the coordinate set.
For example, the preset coordinates may be a coordinate difference between every two adjacent coordinates in the coordinate set, and the displacement variation curve is determined according to a plurality of coordinate differences.
With reference to the foregoing embodiment, each coordinate in the coordinate set corresponds to a preset feature point in a corresponding video frame. Therefore, according to the sequence of the video frames, the coordinate difference of every two adjacent coordinates, that is, the displacement information of the preset feature point in every two adjacent video frames. According to the coordinate set, the processor can call a fitting algorithm to determine the displacement information of the preset feature points in every two adjacent frames.
The coordinate difference represents displacement information, and the displacement information can reflect the zooming change in the zooming process. Based on the determined displacement information, the processor may determine a displacement variation curve to simulate a zooming process in the target video. The abscissa of the displacement change curve is the frame number, the ordinate is the coordinate difference or displacement information, and the displacement change curve reflects the zoom change degree of every two adjacent frames in the zooming process.
Thus, in this example, step S1311 may include the steps of:
s1311-2, and setting the coordinate difference of every two adjacent coordinates in the coordinate set as a preset coordinate. In this step, the coordinate difference between every two adjacent coordinates is used as a preset coordinate, and the total number of the preset coordinates may be less than the total number of the coordinates in the coordinate set.
In this example, step S1321 may include the steps of:
s1321-3, determining the distance between each preset coordinate and the displacement change curve to obtain a plurality of distances.
S1321-4, determining an operation parameter by adopting a preset operation mode according to the plurality of distances.
In step S1321-3, the displacement variation curve is a theoretical curve determined by fitting, and each preset coordinate has a corresponding point on the displacement variation curve. The processor may determine a distance between each preset coordinate and the displacement variation curve according to the preset coordinate and the displacement variation curve, and the determination manner may refer to the distance formula l. Thus, a plurality of distances are obtained.
In step S1321-4, the preset operation manner may be an algorithm such as an average, a variance, and an extremum. The processor can determine corresponding operation parameters by adopting a preset operation mode according to the plurality of distances. For example, the operation parameter is an average distance.
In this example, the operation parameter may directly represent the zoom smoothness of the target video, for example, the processor records the determined average distance as the zoom smoothness and outputs the average distance.
Or the processor determines the threshold range in which the average distance is located according to the configuration information, so as to determine the smoothness degree grade corresponding to the average distance. The processor controls the display of the smoothness level.
In addition, the following evaluation method may be adopted in this example. Step S132 may include the steps of:
and S1323-1, responding to the fact that the displacement change curve is a smooth curve, and determining that the zoom evaluation result of the target video is smooth.
In this step, after the displacement variation curve is determined, it may be determined whether the displacement variation curve is smooth. For example, it is determined whether the tangent of the displacement variation curve continuously rotates with the movement of the tangent point, or whether the displacement variation curve has a first continuous derivative within a set interval. When the first derivative of the displacement curve is continuous, the displacement curve is smooth.
When the displacement change curve is smooth, the displacement information change in the zooming process is also smooth, and the zooming evaluation result of the target video is smooth.
And S1323-2, in response to the displacement change curve being a non-smooth curve, determining that the zoom evaluation result of the target video is non-smooth.
In this step, when the displacement change curve is not smooth, it indicates that the variation difference of the displacement information in the zooming process is also large, and the zooming evaluation result of the target video is not smooth.
And S1323-3, outputting the displacement change curve and the zooming evaluation result.
In this step, the processor can control to directly output the displacement change curve and whether the evaluation result is smooth or not. Therefore, the zoom flat price structure is displayed in a graphic mode and is more visual and intuitive.
The method for judging whether the displacement change curve is smooth may further include: and dividing the interval corresponding to the displacement change curve into a plurality of groups. From the derivative of each set of intervals, it is determined whether the portion of the curve within each set of intervals is smooth. When the proportion of the interval group number of the curve part which is smooth to the total group number reaches a threshold value, the curve is determined to be smooth.
In this example, it is also possible to determine whether or not a shake occurs during zooming, according to a change in the displacement information. For example, when the displacement information of two adjacent frames changes abruptly, there may be a sudden change caused by jitter in the process of shooting a video. And by combining the displacement change curve, the frame number corresponding to the displacement information mutation can be effectively positioned, and timely adjustment is facilitated.
In an exemplary embodiment, the embodiment of the present disclosure further provides a zoom effect determination apparatus. As shown in fig. 5, the apparatus of the present embodiment may include: an acquisition module 110, a first determination module 120, and a second determination module 130. The apparatus of the present embodiment is used to implement the method as shown in fig. 1. The obtaining module 110 is configured to obtain a target video including a zooming process, where the target video has a plurality of video frames. The first determining module 120 is configured to determine position information of preset feature points in a plurality of video frames. The second determining module 130 is configured to determine a zoom evaluation result according to the position information of the preset feature point in each video frame.
In an exemplary embodiment, still referring to fig. 5, the apparatus of the present embodiment may comprise: an acquisition module 110, a first determination module 120, and a second determination module 130. The apparatus of the present embodiment is used to implement the method as shown in fig. 2. Wherein the position information may include coordinates, the first determining module 120 is configured to: and determining coordinates of preset feature points in each video frame, and obtaining a coordinate set comprising a plurality of coordinates, wherein the arrangement sequence of the plurality of coordinates in the coordinate set corresponds to the arrangement sequence of the plurality of video frames in the target video. The second determining module 130 is configured to: determining a plurality of preset coordinates according to the coordinate set; determining an evaluation curve according to a plurality of preset coordinates; and determining a zoom evaluation result according to the coordinate set and the evaluation curve.
In an exemplary embodiment, still referring to fig. 5, the apparatus of the present embodiment may comprise: an acquisition module 110, a first determination module 120, and a second determination module 130. The apparatus of the present embodiment is used to implement the method as shown in fig. 3 and 4. The zoom evaluation result may include a zoom smoothing degree, and the second determining module 130 may be further configured to: determining an operation parameter according to the distance between the preset coordinate and the evaluation curve; and characterizing the zooming smoothness degree by an operation parameter.
In this embodiment, the second determining module 130 is further configured to: acquiring configuration information, wherein the configuration information is used for representing the corresponding relation between a threshold range and a smoothness degree grade; and determining the smoothness degree grade corresponding to the threshold range of the operation parameter according to the operation parameter and the configuration information.
In an exemplary embodiment, still referring to fig. 5, the apparatus of the present embodiment may comprise: an acquisition module 110, a first determination module 120, and a second determination module 130. Wherein, the evaluation curve can be a reference fitting curve; the second determining module 130 is further configured to: selecting part or all coordinates in the coordinate set as a plurality of preset coordinates; the second determining module 130 is further configured to: determining the distance between each preset coordinate and the reference fitting curve to obtain a plurality of distances; and determining the operation parameters by adopting a preset operation mode according to the plurality of distances.
In an exemplary embodiment, still referring to fig. 5, the apparatus of the present embodiment may comprise: an acquisition module 110, a first determination module 120, and a second determination module 130. Wherein the evaluation curve is a displacement change curve; the second determining module 130 is further configured to: taking the coordinate difference of every two adjacent coordinates in the coordinate set as a preset coordinate; the second determining module 130 is further configured to: determining the distance between each preset coordinate and the displacement change curve to obtain a plurality of distances; and determining the operation parameters by adopting a preset operation mode according to the plurality of distances.
In this embodiment, the second determining module 130 is further configured to: responding to the fact that the displacement change curve is a smooth curve, and determining that the zoom evaluation result of the target video is smooth; responding to the fact that the displacement change curve is a non-smooth curve, and determining that the zoom evaluation result of the target video is non-smooth; and outputting the displacement change curve and the zooming evaluation result.
Fig. 6 is a block diagram of an electronic device. The present disclosure also provides an electronic device for performing the method for determining the zoom effect provided by the exemplary embodiments of the present disclosure, for example, the device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, etc.
Device 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input/output (I/O) interface 512, a sensor component 514, and a communication component 516.
The processing component 502 generally controls overall operation of the device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operation at the device 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 506 provides power to the various components of device 500. The power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the apparatus 500.
The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, the audio component 510 includes a Microphone (MIC) configured to receive external audio signals when the device 500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 may detect an open/closed state of the device 500, the relative positioning of the components, such as a display and keypad of the device 500, the sensor assembly 514 may also detect a change in the position of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, orientation or acceleration/deceleration of the device 500, and a change in the temperature of the apparatus 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communications between the device 500 and other devices in a wired or wireless manner. The device 500 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the device 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
A non-transitory computer readable storage medium, such as the memory 504 including instructions executable by the processor 520 of the device 500 to perform the method, is provided in another exemplary embodiment of the present disclosure. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The instructions in the storage medium, when executed by a processor of the electronic device, enable the electronic device to perform the above-described method.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (16)

1. A method for determining zoom effects, comprising:
acquiring a target video containing a zooming process, wherein the target video is provided with a plurality of video frames;
determining position information of preset feature points in a plurality of video frames;
and determining a zoom evaluation result of the target video according to the position information of the preset feature points in each video frame.
2. The method according to claim 1, wherein the position information includes coordinates, and the determining the position information of the preset feature points in the plurality of video frames includes:
determining coordinates of the preset feature points in each video frame, and obtaining a coordinate set comprising a plurality of coordinates, wherein the arrangement sequence of the plurality of coordinates in the coordinate set corresponds to the arrangement sequence of the plurality of video frames in the target video;
the determining the zoom evaluation result of the target video according to the position information of the preset feature point in each video frame includes:
determining a plurality of preset coordinates according to the coordinate set;
determining an evaluation curve according to the preset coordinates;
and determining the zoom evaluation result according to the coordinate set and the evaluation curve.
3. The determination method according to claim 2, the zoom evaluation result including a zoom smoothing degree, the determining the zoom evaluation result from the coordinate set and the evaluation curve including:
determining an operation parameter according to the distance between the preset coordinate and the evaluation curve;
and characterizing the zoom smoothing degree by the operation parameter.
4. The determination method of claim 3, said characterizing the zoom smoothing degree with the operational parameter, comprising:
acquiring configuration information, wherein the configuration information is used for representing the corresponding relation between a threshold range and a smoothness degree grade;
and determining the smoothness degree grade corresponding to the threshold range of the operation parameter according to the operation parameter and the configuration information.
5. The determination method according to claim 3, wherein the evaluation curve is a reference fitting curve;
determining a plurality of preset coordinates according to the coordinate set, including:
selecting part or all of the coordinates in the coordinate set as a plurality of preset coordinates;
determining an operation parameter according to the distance between the preset coordinate and the evaluation curve, wherein the determining comprises:
determining the distance between each preset coordinate and the reference fitting curve to obtain a plurality of distances;
and determining the operation parameters by adopting a preset operation mode according to the plurality of distances.
6. The determination method according to claim 3, characterized in that the evaluation curve is a displacement variation curve;
determining a plurality of preset coordinates according to the coordinate set, including:
taking the coordinate difference of every two adjacent coordinates in the coordinate set as the preset coordinate;
the determining an operation parameter according to the distance between the preset coordinate and the evaluation curve includes:
determining the distance between each preset coordinate and the displacement change curve to obtain a plurality of distances;
and determining the operation parameters by adopting a preset operation mode according to the plurality of distances.
7. The determination method according to claim 2, characterized in that the evaluation curve is a displacement variation curve;
determining a plurality of preset coordinates according to the coordinate set, including:
taking the coordinate difference of every two adjacent coordinates in the coordinate set as the preset coordinate;
the determining the zoom evaluation result according to the coordinate set and the evaluation curve further includes:
in response to that the displacement change curve is a smooth curve, determining that the zoom evaluation result of the target video is smooth;
responding to the fact that the displacement change curve is a non-smooth curve, and determining that the zoom evaluation result of the target video is non-smooth;
and outputting the displacement change curve and the zooming evaluation result.
8. An apparatus for determining a zoom effect, comprising:
the device comprises an acquisition module, a display module and a control module, wherein the acquisition module is used for acquiring a target video containing a zooming process, and the target video is provided with a plurality of video frames;
the first determining module is used for determining the position information of preset feature points in a plurality of video frames;
and the second determining module is used for determining the zoom evaluation result of the target video according to the position information of the preset feature point in each video frame.
9. The determination apparatus of claim 8, wherein the location information comprises coordinates, and wherein the first determination module is configured to:
determining coordinates of the preset feature points in each video frame, and obtaining a coordinate set comprising a plurality of coordinates, wherein the arrangement sequence of the plurality of coordinates in the coordinate set corresponds to the arrangement sequence of the plurality of video frames in the target video;
the second determination module is to:
determining a plurality of preset coordinates according to the coordinate set;
determining an evaluation curve according to the preset coordinates;
and determining the zoom evaluation result according to the coordinate set and the evaluation curve.
10. The apparatus of claim 9, wherein the zoom evaluation result comprises a zoom smoothness level, and wherein the second determination module is further configured to:
determining an operation parameter according to the distance between the preset coordinate and the evaluation curve;
and characterizing the zoom smoothing degree by the operation parameter.
11. The apparatus of claim 10, wherein the second determining module is further configured to:
acquiring configuration information, wherein the configuration information is used for representing the corresponding relation between a threshold range and a smoothness degree grade;
and determining the smoothness degree grade corresponding to the threshold range of the operation parameter according to the operation parameter and the configuration information.
12. The determination apparatus according to claim 10, wherein the evaluation curve is a reference fitting curve;
the second determination module is further to: selecting part or all of the coordinates in the coordinate set as a plurality of preset coordinates;
the second determination module is further to:
determining the distance between each preset coordinate and the reference fitting curve to obtain a plurality of distances;
and determining the operation parameters by adopting a preset operation mode according to the plurality of distances.
13. The determination device according to claim 10, wherein the evaluation curve is a displacement variation curve;
the second determination module is to:
taking the coordinate difference of every two adjacent coordinates in the coordinate set as the preset coordinate;
the second determination module is further to:
determining the distance between each preset coordinate and the displacement change curve to obtain a plurality of distances;
and determining the operation parameters by adopting a preset operation mode according to the plurality of distances.
14. The determination device according to claim 9, wherein the evaluation curve is a displacement variation curve;
the second determination module is to: taking the coordinate difference of every two adjacent coordinates in the coordinate set as the preset coordinate;
the second determination module is further to: in response to that the displacement change curve is a smooth curve, determining that the zoom evaluation result of the target video is smooth;
responding to the fact that the displacement change curve is a non-smooth curve, and determining that the zoom evaluation result of the target video is non-smooth;
and outputting the displacement change curve and the zooming evaluation result.
15. An electronic device, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of determining zoom effect of any of claims 1 to 7.
16. A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of determining zoom effect of any of claims 1 to 7.
CN202110961045.5A 2021-08-20 2021-08-20 Zoom effect determination method and device, electronic equipment and storage medium Pending CN115714911A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110961045.5A CN115714911A (en) 2021-08-20 2021-08-20 Zoom effect determination method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110961045.5A CN115714911A (en) 2021-08-20 2021-08-20 Zoom effect determination method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115714911A true CN115714911A (en) 2023-02-24

Family

ID=85230220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110961045.5A Pending CN115714911A (en) 2021-08-20 2021-08-20 Zoom effect determination method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115714911A (en)

Similar Documents

Publication Publication Date Title
CN107105314B (en) Video playing method and device
CN109361865B (en) Shooting method and terminal
EP3173970A1 (en) Image processing method and apparatus
EP3032821B1 (en) Method and device for shooting a picture
EP3249509A1 (en) Method and device for playing live videos
CN106331504B (en) Shooting method and device
US20160027191A1 (en) Method and device for adjusting skin color
CN105282441B (en) Photographing method and device
CN107888984B (en) Short video playing method and device
CN107155060A (en) Image processing method and device
EP3057304A1 (en) Method and apparatus for generating image filter
CN108462833B (en) Photographing method, photographing device and computer-readable storage medium
CN107944367B (en) Face key point detection method and device
US11770497B2 (en) Method and device for processing video, and storage medium
CN105512615B (en) Image processing method and device
CN113364965A (en) Shooting method and device based on multiple cameras and electronic equipment
CN108629814B (en) Camera adjusting method and device
CN105654470A (en) Image selection method, device and system
CN107239758B (en) Method and device for positioning key points of human face
CN106773750B (en) Equipment image display method and device
EP3799415A2 (en) Method and device for processing videos, and medium
CN112188096A (en) Photographing method and device, terminal and storage medium
CN105635573A (en) Pick-up head visual angle adjusting method and apparatus
CN107122356B (en) Method and device for displaying face value and electronic equipment
CN109102779A (en) backlight adjusting method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination