CN108449560B - Video recording method and terminal - Google Patents

Video recording method and terminal Download PDF

Info

Publication number
CN108449560B
CN108449560B CN201810330241.0A CN201810330241A CN108449560B CN 108449560 B CN108449560 B CN 108449560B CN 201810330241 A CN201810330241 A CN 201810330241A CN 108449560 B CN108449560 B CN 108449560B
Authority
CN
China
Prior art keywords
shooting
video frame
video
ith
time period
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.)
Active
Application number
CN201810330241.0A
Other languages
Chinese (zh)
Other versions
CN108449560A (en
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810330241.0A priority Critical patent/CN108449560B/en
Publication of CN108449560A publication Critical patent/CN108449560A/en
Application granted granted Critical
Publication of CN108449560B publication Critical patent/CN108449560B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)
  • Studio Devices (AREA)

Abstract

The invention provides a video recording method and a terminal, wherein the method comprises the following steps: counting the updating frequency of the shooting mode in the target time period; determining target video parameters according to the frequency range of the updating frequency; recording according to the target video recording parameter; the video parameters corresponding to different frequency ranges are different, the shooting mode comprises a shooting scene and/or shooting parameters, and the video parameters comprise a video frame rate and/or a video resolution. The invention can improve the flexibility of the video. In addition, the invention can improve the utilization rate of system resources and capture the updated details of the shooting mode.

Description

Video recording method and terminal
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a video recording method and a terminal.
Background
With the coming of the internet era and the rise of social networks, the demands of people on displaying and sharing life are further enhanced, and the video recording function of the terminal is more and more widely applied. For example: and sharing the videos shot through the video recording function of the terminal to the social platform by the user, and displaying and sharing the life.
In addition, users are continuously pursuing high-quality audio/video and video recording experiences. In order to make the recorded video have more real dynamic effect and present more details, the frame rate and resolution of the camera are usually set to the maximum value, and the video recording is performed at a fixed frame rate and resolution.
Therefore, the flexibility of the existing video recording technology is low.
Disclosure of Invention
The embodiment of the invention provides a video recording method and a terminal, which aim to solve the problem of low flexibility of the existing video recording technology.
In a first aspect, an embodiment of the present invention provides a video recording method, where the method includes:
counting the updating frequency of the shooting mode in the target time period;
determining target video parameters according to the frequency range of the updating frequency;
recording according to the target video recording parameter;
the video parameters corresponding to different frequency ranges are different, the shooting mode comprises a shooting scene and/or shooting parameters, and the video parameters comprise a video frame rate and/or a video resolution.
In a second aspect, an embodiment of the present invention further provides a terminal, where the terminal includes:
the statistic module is used for counting the updating frequency of the shooting mode in the target time period;
the determining module is used for determining target video parameters according to the frequency range of the updating frequency;
the video recording module is used for carrying out video recording according to the target video recording parameters;
the video parameters corresponding to different frequency ranges are different, the shooting mode comprises a shooting scene and/or shooting parameters, and the video parameters comprise a video frame rate and/or a video resolution.
In a third aspect, an embodiment of the present invention further provides a terminal, where the terminal includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the steps of the video recording method are implemented.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the video recording method described above.
In the embodiment of the invention, the terminal counts the updating frequency of the shooting mode in the target time period, and performs video recording according to the target video recording parameter after determining the target video recording parameter according to the frequency range of the updating frequency, wherein the video recording parameters corresponding to different frequency ranges are different, so that the flexibility of the video recording is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flow chart of a video recording method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a system block diagram provided by an embodiment of the invention;
fig. 3 is one of the structural diagrams of a terminal provided in an embodiment of the present invention;
fig. 4 is a second structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The video recording method of the embodiment of the invention is mainly applied to the terminal. The terminal may be a Mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a Wearable Device (Wearable Device), or the like.
The following describes a video recording method according to an embodiment of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a video recording method according to an embodiment of the present invention, and as shown in fig. 1, the video recording method according to the embodiment includes the following steps:
and step 101, counting the updating frequency of the shooting mode in the target time period.
In the present embodiment, the shooting mode includes at least one of a shooting scene and shooting parameters.
Wherein, the shooting parameters include but are not limited to: at least one of focal length, flash state, resolution, screen placement state and camera type, and of course, the shooting parameters may also include parameters such as aperture and shutter. The shooting scene may be understood as a shot picture.
In this step, the target time period may be a time period in a video recorded by the terminal. The length of the target time period may be predetermined according to actual needs, such as 10 seconds or 1 minute, and the embodiment of the present invention does not limit this.
Further, the end time point of the target period may be a corresponding time point when the terminal performs the counting operation. Illustratively, if the length of the target time period is 10 seconds, the time point corresponding to the statistical operation performed by the terminal is the 15 th second in the video, the target time period is the time period from the 5 th second to the 15 th second in the video, and the terminal counts the update frequency of the shooting mode in the 5 th second to the 15 th second in the video recorded by the terminal.
Of course, the ending time point of the target time period may also be a target time point of a target time duration t from a time point corresponding to the time point when the terminal performs the statistical operation, where the target time duration t may be predetermined according to actual needs, such as 5 seconds or 3 seconds, and the embodiment of the present invention does not limit this.
Further, the terminal dynamically counts the update frequency of the shooting mode in the target time period based on the counting period T, that is, the terminal may count the update frequency of the shooting mode in the target time period once every counting period T. It should be noted that, in the application scenario, the target time periods corresponding to each statistic are different time periods in the video recorded by the terminal, but it should be understood that the target time periods corresponding to adjacent statistics may overlap.
And step 102, determining target video parameters according to the frequency range of the updating frequency.
And 103, recording according to the target recording parameter.
In this embodiment, the terminal may pre-divide at least two frequency ranges, and set a corresponding video parameter for each frequency range, where the video parameters corresponding to different frequency ranges are different. The video recording parameters comprise at least one of video recording frame rate and video recording resolution.
Therefore, after the terminal obtains the updating frequency of the shooting mode in the target time period through statistics, the frequency range in which the updating frequency falls can be determined as the target frequency range in which the updating frequency is located, and then the target video parameters can be determined, and video recording is carried out according to the target video parameters.
It should be noted that, in this embodiment, each frequency range may be continuous or discontinuous, but there is no overlapping portion in each time interval, so as to avoid confusion of terminal calling video recording parameters.
Further, the maximum value of the frequency range may be positively correlated with the value of the video parameter, that is, the larger the maximum value of the frequency range is, the larger the value of the video parameter corresponding to the frequency range is, and the smaller the maximum value of the frequency range is, the smaller the value of the video parameter corresponding to the frequency range is.
Illustratively, assume that the terminal is divided into a first frequency range, a second frequency range, a third frequency range, and a fourth frequency range. In the first frequency range, if C is greater than 16, the terminal may set the first video recording parameter corresponding to the first frequency range, for example, the first video recording frame rate is set to 120F/s, and the first video recording resolution is set to 1080x 1920; in the second frequency range, C is more than 8 and less than or equal to 16, the terminal may set a second video parameter corresponding to the second frequency range, for example, the second video frame rate is set to 60F/s, and the second video resolution is set to 720x 1080; in the third frequency range, if C is more than 4 and less than or equal to 8, the terminal may set a third video parameter corresponding to the third frequency range, for example, the third video frame rate is set to 30F/s, and the third video resolution is set to 480x 640; in the fourth frequency range, C is greater than 2 and less than or equal to 4, the terminal may set a fourth video parameter corresponding to the fourth frequency range, for example, the fourth video frame rate is set to 15F/s, and the fourth video resolution is set to 240 × 320.
If the update frequency C is 5, the terminal may determine that the update frequency falls into a third frequency range, and record the video according to a third video parameter corresponding to the third frequency range, that is, the video frame rate of the video is set to 30F/s, and the video resolution is set to 480x 640.
Wherein C represents the updating frequency of the shooting mode in the target time period; the F/s is called Frames Per Second, and the Chinese name is frame Per Second; the resolution may be in units of inch pixels (ppi).
Therefore, the terminal can record video according to the video parameters with small numerical values under the condition of small updating frequency while improving the flexibility of the video, and record video according to the video parameters with large numerical values under the condition of large updating frequency, so that the utilization rate of system resources can be improved, the updated details of the shooting mode can be captured, and the display effect of the video generated through the video recording is improved.
It should be appreciated that the terminal may record video according to default recording parameters, such as recording frame rate and resolution, before the terminal counts the update frequency of the shooting mode within the target time period.
According to the video recording method, the terminal counts the updating frequency of the shooting mode in the target time period, and carries out video recording according to the target video recording parameter after determining the target video recording parameter according to the frequency range of the updating frequency, wherein the video recording parameters corresponding to different frequency ranges are different, so that the flexibility of the video recording is improved, and the requirements of different shooting scenes on the video recording frame rate are met.
In addition, under the condition that the maximum value of the frequency range is positively correlated with the numerical value of the video recording parameter, the video recording is carried out according to the target video recording parameter, so that the utilization rate of system resources can be improved, the updated details of the shooting mode can be captured, and the display effect of the video generated through the video recording is improved.
In the embodiment of the present invention, the terminal may determine whether the shooting mode of the current video frame is updated with respect to the shooting mode of the previous video frame with the shortest distance and time according to a variety of ways, which is specifically described below.
Optionally, the shooting mode includes a shooting scene; before step 101, the video recording method further includes:
collecting the ith video frame and the (i-1) th video frame in the target time period;
judging whether the shooting scene of the ith video frame is updated relative to the shooting scene of the ith-1 video frame according to the pixel values of the target pixel points of the ith video frame and the ith-1 video frame;
if the shooting scene of the ith video frame is updated relative to the shooting scene of the (i-1) th video frame, updating the updating frequency of the shooting mode in the target time period;
wherein i is a positive integer greater than 1, that is, the ith video frame may be any video frame except the first video frame in the video frames included in the target time period, and it should be understood that the time point corresponding to the first video frame is shortest from the starting time point of the target time period.
The target pixel points are all pixel points contained in the video frame or all pixel points contained in a target area in the video frame.
In this embodiment, the terminal may determine whether the shooting scene of the ith video frame is updated with respect to the shooting scene of the ith-1 video frame according to the pixel values of the target pixel points of the ith video frame and the ith-1 video frame, and update the update frequency of the shooting mode in the target time period when the shooting scene of the ith video frame is updated with respect to the shooting scene of the ith-1 video frame, for example, C2 ═ C1+ n, where C1 is the update frequency before updating, C2 is the update frequency after updating, and n is a positive integer, such as 1.
In this way, the terminal may determine the updated update frequency as the update frequency of the shooting mode in the target time period after determining whether the shooting scenes of all ith video frames in the target time period are updated.
In a specific practical application, optionally, the determining, according to the pixel values of the target pixel points of the ith video frame and the ith-1 video frame, whether the shooting scene of the ith video frame is updated relative to the shooting scene of the ith-1 video frame may specifically be represented as:
calculating the absolute value of the pixel difference between corresponding pixel points in target pixel points in the ith video frame and the (i-1) th video frame to obtain n first pixel differences;
calculating the average value of the n first pixel difference values to obtain a second pixel difference value;
if the second pixel difference value is larger than the preset threshold value, determining that the shooting scene of the ith video frame is updated;
wherein n is equal to the number of the target pixel points. It should be understood that if the number of target pixels in the ith video frame is different from that of the ith-1 video frame, n may be equal to the larger number of target pixels. The i-th video frame may be understood as the current video frame and the i-1 th video frame may be understood as the previous video frame.
Marking the r-th pixel point of the ith video frame as PrThe r-th pixel point of the i-1 th video frame is QrThen, the absolute value of the pixel difference between each corresponding pixel point in the target pixel point can be expressed as | Pr-QrAnd r is greater than or equal to 1 and less than or equal to n.
The second pixel difference value d may be expressed as:
Figure BDA0001627720590000061
the preset threshold T0 may be determined according to actual needs, such as 100ppi, which is not limited by the embodiment of the present invention.
Therefore, the terminal judges that the shooting scene of the ith video frame is updated under the condition that the average value of the n first pixel difference values is larger than the preset threshold value, and can reflect the whole change of the ith video frame, so that the accuracy of whether the shooting scene of the ith video frame is updated or not can be improved.
It should be understood that, in other embodiments, the terminal may also determine, through other manners, whether the shooting scene of the ith video frame is updated relative to the shooting scene of the ith-1 video frame according to the pixel values of the target pixels of the ith video frame and the ith-1 video frame, for example, whether the pixel values of the corresponding pixels of the target pixels in the ith video frame and the ith-1 video frame are the same or not is compared, if the pixel values are not the same, it is indicated that the shooting scene of the ith video frame is changed, and it may be determined that the shooting scene of the ith video frame is updated, but is not limited thereto.
Optionally, the shooting mode includes shooting parameters; before step 101, the method further comprises:
collecting the ith video frame and the (i-1) th video frame in the target time period;
acquiring a first shooting parameter of the ith video frame and a second shooting parameter of the (i-1) th video frame;
judging whether the first shooting parameter is the same as the second shooting parameter;
if the first shooting parameter is different from the second shooting parameter, updating the updating frequency of the shooting mode in the target time period;
wherein i is a positive integer greater than 1.
In this embodiment, the terminal may determine the type of the shooting parameter that needs to be monitored, so that after an ith video frame and an ith-1 video frame in the target time period are acquired, a first shooting parameter of the ith video frame and a second shooting parameter of the ith-1 video frame may be acquired.
Illustratively, let the first shooting parameter be Wi(Xi,Yi,Zi,Si,Ti) The second shooting parameter is Wi-1(Xi-1,Yi-1,Zi-1,Si-1,Ti-1). Wherein, X can be used for identifying the focal length of the camera; y can be used for marking the state of the flash lamp, such as whether the flash lamp is started or not, or the brightness of the flash lamp and the like; z may be used to identify resolution; s can be used for identifying the screen placement state, such as whether the terminal shoots in a horizontal screen or a vertical screen; t may be used to identify the camera type, such as whether the terminal is based on front camera shooting or rear camera shooting.
In practical applications, the values of X, Y, Z, S and T may be specific values of the shooting parameters, or values corresponding to the shooting parameters, such as: for Z to identify resolution, the value of Z may be a value of resolution, such as 480x 640; for the S for identifying the placement state of the screen, the terminal can preset that when the value of Z is 0, the identification terminal shoots the screen horizontally, and when the value of Z is 1, the identification terminal shoots the screen vertically. It is to be understood that any expression that can identify the value of the state of the shooting parameter is applicable to the present invention.
In the present embodiment, the first imaging parameter Wi(Xi,Yi,Zi,Si,Ti) Either type of the shooting parameters and the second shooting parameter is Wi-1(Xi-1,Yi-1,Zi-1,Si-1,Ti-1) If not, the shooting parameters of the ith video frame are changed, and it can be determined that the shooting parameters of the ith video frame are updated relative to the shooting parameters of the (i-1) th video frame, and the updating frequency of the shooting mode in the target time period is updated.
In this way, the updated update frequency can be determined as the update frequency of the shooting mode within the target period in the case where the shooting mode includes the shooting parameters.
In this embodiment of the present invention, for an application scenario that includes both a change of a shooting scene and a change of a shooting parameter in a target time period, that is, the shooting mode includes the shooting scene and the shooting parameter, optionally, the counting the update frequency of the shooting mode in the target time period includes:
counting a first updating frequency of the shooting mode in a target time period;
counting a second updating frequency of the shooting parameters in the target time period;
and carrying out weighted average on the first updating frequency and the second updating frequency based on a preset first weight corresponding to the shooting scene and a preset second weight corresponding to the shooting parameters to obtain the updating frequency of the shooting mode in the target time period.
In this embodiment, a first weight corresponding to the shooting scene and a second weight corresponding to the shooting parameters are preset in the terminal, so that after a first update frequency of the shooting mode and a second update frequency of the shooting parameters within a target time period are obtained through statistics by the terminal, the first update frequency and the second update frequency may be weighted and averaged based on the first weight and the second weight to obtain the update frequency of the shooting mode within the target time period.
For example, assuming that the first weight is 0.8, the second weight is 0.2, the first update frequency is 20, and the second update frequency is 10, the terminal obtains that the update frequency of the shooting mode in the target time period is 0.8 × 20+0.2 × 10 — 18.
In this way, compared with the method that the terminal directly determines the sum of the first updating frequency and the second updating frequency as the updating frequency of the shooting mode in the target time period, the flexibility of counting the updating frequency of the shooting mode can be improved by determining the updating frequency of the shooting mode in the target time period based on the first weight corresponding to the shooting scene and the second weight corresponding to the shooting parameter as well as the first updating frequency and the second updating frequency, in addition, the user can determine the weights of the updating frequency of the shooting scene and the shooting parameter according to the self requirement, and therefore the video generated by the video can be more suitable for the expectation of the user.
In the embodiment of the invention, the terminal can acquire the corresponding relation between the frequency range and the video recording parameters in advance. Specifically, the terminal may pre-establish a correspondence between the frequency range and the video recording parameter, or may obtain the correspondence by receiving a correspondence between the pre-established frequency range and the video recording parameter sent by another terminal, which may be determined according to actual needs, and this is not limited in the embodiment of the present invention.
Thus, optionally, the determining the target video recording parameter according to the frequency range in which the update frequency is located includes:
and searching the corresponding relation between the preset frequency range and the video parameters, and determining the target video parameters corresponding to the target frequency range. Therefore, the response rate of the terminal for determining the target screen recording parameters can be improved.
Of course, in some embodiments, after determining the target frequency range in which the update frequency is located, the terminal may also select the target video parameters by popping up a prompt box including multiple sets of video parameters, so that the terminal may perform video recording according to the target video parameters selected by the user and corresponding to the target frequency range.
It should be noted that, various optional implementations described in the embodiments of the present invention may be implemented in combination with each other or implemented separately, and the embodiments of the present invention are not limited thereto.
In the embodiment of the present invention, as shown in fig. 2, a video parameter adjustment module may be preset in a terminal, so that when the terminal performs screen video recording, the terminal may start a video parameter adjustment function of the video parameter adjustment module, and the video parameter adjustment module implements the steps in the method embodiments, that is, monitoring a camera shooting mode in real time, such as a change of a shooting scene and/or a shooting parameter, and adaptively adjusting video parameters, such as a video frame rate and a resolution, so as to meet dynamic requirements of shooting different scene modes on video recording, and improve flexibility of video recording.
Specifically, the video parameter adjustment module may be embodied as a program or a piece of software, which may be determined according to actual needs, and is not limited in this embodiment of the present invention.
It should be understood that, the terminal may close the video parameter adjustment module after the video is finished, so as to release the system resources occupied by the module and improve the utilization rate of the system resources.
In fig. 2, the CCD is called a Charge-coupled Device, and may be explained as a Charge-coupled Device; the A/D Converter can be interpreted as an Analog to Digital Converter; the liquid Crystal Screen can be interpreted as an lcd (liquid Crystal display) Screen; the storage module may be embodied as a Secure Digital Memory Card (SD Card), a mobile Phone Disk (Phone Disk), or a fixed or removable Memory, but is not limited thereto.
It should be understood that in fig. 2, the direction of the arrows may characterize the flow of the video data.
Referring to fig. 3, fig. 3 is a structural diagram of a terminal according to an embodiment of the present invention, and as shown in fig. 3, the terminal 300 includes: a statistics module 301, a determination module 302, and a video recording module 303.
The counting module 301 is configured to count update frequency of a shooting mode in a target time period;
a determining module 302, configured to determine a target video parameter according to a frequency range in which the update frequency is located;
a video recording module 303, configured to perform video recording according to the target video recording parameter;
the video parameters corresponding to different frequency ranges are different, the shooting mode comprises a shooting scene and/or shooting parameters, and the video parameters comprise a video frame rate and/or a video resolution.
In addition to fig. 3, the following describes modules included in the terminal 300 and units included in the modules.
Optionally, the shooting mode includes a shooting scene; the terminal 300 further includes:
the first acquisition module is used for acquiring the ith video frame and the (i-1) th video frame in a target time period before counting the updating frequency of the shooting mode in the target time period;
the judging module is used for judging whether a shooting scene of the ith video frame is updated relative to a shooting scene of the ith-1 video frame according to the pixel values of target pixel points of the ith video frame and the ith-1 video frame;
the first updating module is used for updating the updating frequency of the shooting mode in the target time period if the shooting scene of the ith video frame is updated relative to the shooting scene of the ith-1 video frame;
wherein i is a positive integer greater than 1.
Optionally, the determining module includes:
the first calculation unit is used for calculating the absolute value of the pixel difference between corresponding pixel points in the target pixel points of the ith video frame and the (i-1) th video frame to obtain n first pixel differences;
the second calculating unit is used for calculating the average value of the n first pixel difference values to obtain a second pixel difference value;
the determining unit is used for determining the shooting scene update of the ith video frame if the second pixel difference value is larger than a preset threshold value;
wherein n is equal to the number of the target pixel points.
Optionally, the shooting mode includes shooting parameters; the terminal 300 further includes:
the second acquisition module is used for acquiring the ith video frame and the (i-1) th video frame in the target time period before counting the updating frequency of the shooting mode in the target time period;
the acquisition module is used for acquiring a first shooting parameter of the ith video frame and a second shooting parameter of the (i-1) th video frame;
the second updating module is used for updating the updating frequency of the shooting mode in the target time period if the first shooting parameter is different from the second shooting parameter;
wherein i is a positive integer greater than 1.
Optionally, the shooting mode includes a shooting scene and shooting parameters; the statistic module 301 comprises:
the first statistic unit is used for counting a first updating frequency of the shooting mode in the target time period;
the second counting unit is used for counting a second updating frequency of the shooting parameters in the target time period;
and the third calculating unit is used for carrying out weighted average on the first updating frequency and the second updating frequency based on a preset first weight corresponding to the shooting scene and a preset second weight corresponding to the shooting parameters to obtain the updating frequency of the shooting mode in the target time period.
Optionally, the video recording module 303 is specifically configured to:
searching the corresponding relation between the preset frequency range and the video recording parameters, determining the target video recording parameters corresponding to the target frequency range, and recording according to the target video recording parameters.
The terminal 300 can implement each process in the method embodiment of the present invention and achieve the same beneficial effects, and is not described herein again to avoid repetition.
Referring to fig. 4, fig. 4 is a structural diagram of a terminal according to another embodiment of the present invention, where the terminal may be a hardware structural diagram of a terminal for implementing various embodiments of the present invention. As shown in fig. 4, the terminal 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the terminal configuration shown in fig. 4 is not intended to be limiting, and that the terminal may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
Wherein, the processor 410 is configured to:
counting the updating frequency of the shooting mode in the target time period;
determining target video parameters according to the frequency range of the updating frequency;
recording according to the target video recording parameter;
the video parameters corresponding to different frequency ranges are different, the shooting mode comprises a shooting scene and/or shooting parameters, and the video parameters comprise a video frame rate and/or a video resolution.
Optionally, the shooting mode includes a shooting scene; the processor 410 is further configured to, before counting the update frequency of the shooting mode within the target time period:
collecting the ith video frame and the (i-1) th video frame in the target time period;
judging whether the shooting scene of the ith video frame is updated relative to the shooting scene of the ith-1 video frame according to the pixel values of the target pixel points of the ith video frame and the ith-1 video frame;
if the shooting scene of the ith video frame is updated relative to the shooting scene of the (i-1) th video frame, updating the updating frequency of the shooting mode in the target time period;
wherein i is a positive integer greater than 1.
Optionally, the processor 410 executes the above-mentioned determining, according to the pixel values of the target pixel points of the ith video frame and the ith-1 video frame, whether the shooting scene of the ith video frame is updated relative to the shooting scene of the ith-1 video frame, and is further configured to:
calculating the absolute value of the pixel difference between corresponding pixel points in target pixel points in the ith video frame and the (i-1) th video frame to obtain n first pixel differences;
calculating the average value of the n first pixel difference values to obtain a second pixel difference value;
if the second pixel difference value is larger than the preset threshold value, determining that the shooting scene of the ith video frame is updated;
wherein n is equal to the number of the target pixel points.
Optionally, the shooting mode includes shooting parameters; the processor 410 is further configured to, before counting the update frequency of the shooting mode within the target time period:
collecting the ith video frame and the (i-1) th video frame in the target time period;
acquiring a first shooting parameter of the ith video frame and a second shooting parameter of the (i-1) th video frame;
if the first shooting parameter is different from the second shooting parameter, updating the updating frequency of the shooting mode in the target time period;
wherein i is a positive integer greater than 1.
Optionally, the processor 410 executes the shooting mode including shooting scenes and shooting parameters; the update frequency of the shooting mode in the statistical target time period is further used for:
counting a first updating frequency of the shooting mode in a target time period;
counting a second updating frequency of the shooting parameters in the target time period;
and carrying out weighted average on the first updating frequency and the second updating frequency based on a preset first weight corresponding to the shooting scene and a preset second weight corresponding to the shooting parameters to obtain the updating frequency of the shooting mode in the target time period.
Optionally, the processor 410 executes the video recording according to the target video recording parameter, and is further configured to:
searching the corresponding relation between the preset frequency range and the video recording parameters, determining the target video recording parameters corresponding to the target frequency range, and recording according to the target video recording parameters.
It should be noted that, in this embodiment, the terminal 400 may implement each process in the method embodiment of the present invention and achieve the same beneficial effects, and for avoiding repetition, details are not described here.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The terminal provides wireless broadband internet access to the user through the network module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the terminal 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The terminal 400 also includes at least one sensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 4061 and/or a backlight when the terminal 400 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured according to a form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 may be implemented according to various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two independent components to implement the input and output functions of the terminal, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the terminal, which is not limited herein.
The interface unit 408 is an interface for connecting an external device to the terminal 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal 400 or may be used to transmit data between the terminal 400 and an external device.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 410 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby integrally monitoring the terminal. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The terminal 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the terminal 400 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides a terminal, which includes a processor 410, a memory 409, and a computer program that is stored in the memory 409 and can be run on the processor 410, and when being executed by the processor 410, the computer program implements each process of the above video recording method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the video recording method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation 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 may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (11)

1. A video recording method is applied to a terminal and is characterized by comprising the following steps:
counting the updating frequency of the shooting mode in the target time period;
determining target video parameters according to the frequency range of the updating frequency;
recording according to the target video recording parameter;
the shooting mode comprises shooting scenes and shooting parameters, or the shooting mode comprises shooting parameters, the shooting parameters comprise at least one of focal length, flash lamp state, resolution, screen placement state, camera type, aperture and shutter, and the video parameters comprise video frame rate and/or video resolution.
2. The method of claim 1, wherein the shooting mode includes a shooting scene and shooting parameters; before the update frequency of the shooting mode in the statistical target time period, the method further comprises the following steps:
collecting the ith video frame and the (i-1) th video frame in the target time period;
judging whether the shooting scene of the ith video frame is updated relative to the shooting scene of the ith-1 video frame according to the pixel values of the target pixel points of the ith video frame and the ith-1 video frame;
if the shooting scene of the ith video frame is updated relative to the shooting scene of the (i-1) th video frame, updating the updating frequency of the shooting scene in the target time period;
wherein i is a positive integer greater than 1.
3. The method according to claim 2, wherein the determining whether the shooting scene of the ith video frame is updated relative to the shooting scene of the ith-1 video frame according to the pixel values of the target pixel points of the ith video frame and the ith-1 video frame comprises:
calculating the absolute value of the pixel difference between corresponding pixel points in target pixel points in the ith video frame and the (i-1) th video frame to obtain n first pixel differences;
calculating the average value of the n first pixel difference values to obtain a second pixel difference value;
if the second pixel difference value is larger than a preset threshold value, determining that the shooting scene of the ith video frame is updated;
wherein n is equal to the number of the target pixel points.
4. The method of claim 1, wherein the shooting mode includes shooting parameters; before the update frequency of the shooting mode in the statistical target time period, the method further comprises the following steps:
collecting the ith video frame and the (i-1) th video frame in the target time period;
acquiring a first shooting parameter of the ith video frame and a second shooting parameter of the (i-1) th video frame;
if the first shooting parameter is different from the second shooting parameter, updating the updating frequency of the shooting mode in the target time period;
wherein i is a positive integer greater than 1.
5. The method according to any one of claims 1 to 4, wherein the shooting mode includes a shooting scene and shooting parameters; the counting of the updating frequency of the shooting mode in the target time period comprises the following steps:
counting a first updating frequency of a shooting scene in a target time period;
counting a second updating frequency of the shooting parameters in the target time period;
and carrying out weighted average on the first updating frequency and the second updating frequency based on a preset first weight corresponding to the shooting scene and a preset second weight corresponding to the shooting parameters to obtain the updating frequency of the shooting mode in the target time period.
6. A terminal, comprising:
the statistic module is used for counting the updating frequency of the shooting mode in the target time period;
the determining module is used for determining target video parameters according to the frequency range of the updating frequency;
the video recording module is used for carrying out video recording according to the target video recording parameters;
the shooting mode comprises shooting scenes and shooting parameters, or the shooting mode comprises shooting parameters, the shooting parameters comprise at least one of focal length, flash lamp state, resolution, screen placement state, camera type, aperture and shutter, and the video parameters comprise video frame rate and/or video resolution.
7. The terminal according to claim 6, wherein the photographing mode includes a photographing scene and photographing parameters; the terminal further comprises:
the first acquisition module is used for acquiring the ith video frame and the (i-1) th video frame in a target time period before counting the updating frequency of the shooting mode in the target time period;
the judging module is used for judging whether a shooting scene of the ith video frame is updated relative to a shooting scene of the ith-1 video frame according to the pixel values of target pixel points of the ith video frame and the ith-1 video frame;
the first updating module is used for updating the updating frequency of the shooting scene in the target time period if the shooting scene of the ith video frame is updated relative to the shooting scene of the ith-1 video frame;
wherein i is a positive integer greater than 1.
8. The terminal of claim 7, wherein the determining module comprises:
the first calculation unit is used for calculating the absolute value of the pixel difference between corresponding pixel points in the target pixel points of the ith video frame and the (i-1) th video frame to obtain n first pixel differences;
the second calculating unit is used for calculating the average value of the n first pixel difference values to obtain a second pixel difference value;
the determining unit is used for determining the shooting scene update of the ith video frame if the second pixel difference value is larger than a preset threshold value;
wherein n is equal to the number of the target pixel points.
9. The terminal of claim 6, wherein the photographing mode comprises photographing parameters; the terminal further comprises:
the second acquisition module is used for acquiring the ith video frame and the (i-1) th video frame in the target time period before counting the updating frequency of the shooting mode in the target time period;
the acquisition module is used for acquiring a first shooting parameter of the ith video frame and a second shooting parameter of the (i-1) th video frame;
the second updating module is used for updating the updating frequency of the shooting mode in the target time period if the first shooting parameter is different from the second shooting parameter;
wherein i is a positive integer greater than 1.
10. The terminal according to any one of claims 6 to 9, wherein the photographing mode includes a photographing scene and photographing parameters; the statistic module comprises:
the first statistic unit is used for counting a first updating frequency of a shooting scene in a target time period;
the second counting unit is used for counting a second updating frequency of the shooting parameters in the target time period;
and the third calculating unit is used for carrying out weighted average on the first updating frequency and the second updating frequency based on a preset first weight corresponding to the shooting scene and a preset second weight corresponding to the shooting parameters to obtain the updating frequency of the shooting mode in the target time period.
11. A terminal, characterized in that it comprises a processor, a memory and a computer program stored on said memory and executable on said processor, said computer program, when executed by said processor, implementing the steps of the video recording method according to any one of claims 1 to 5.
CN201810330241.0A 2018-04-13 2018-04-13 Video recording method and terminal Active CN108449560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810330241.0A CN108449560B (en) 2018-04-13 2018-04-13 Video recording method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810330241.0A CN108449560B (en) 2018-04-13 2018-04-13 Video recording method and terminal

Publications (2)

Publication Number Publication Date
CN108449560A CN108449560A (en) 2018-08-24
CN108449560B true CN108449560B (en) 2021-02-19

Family

ID=63199895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810330241.0A Active CN108449560B (en) 2018-04-13 2018-04-13 Video recording method and terminal

Country Status (1)

Country Link
CN (1) CN108449560B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110142012A (en) * 2019-04-18 2019-08-20 张煜轩 A kind of chemistry solid-liquid reaction device and control method
CN117692767B (en) * 2024-02-02 2024-06-11 深圳市积加创新技术有限公司 Low-power consumption monitoring system based on scene self-adaptive dynamic time-sharing strategy

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102780869A (en) * 2012-06-27 2012-11-14 宇龙计算机通信科技(深圳)有限公司 Video recording device and method
CN104580969A (en) * 2013-10-23 2015-04-29 中兴通讯股份有限公司 Video frame rate adjusting method and device
CN104618656A (en) * 2015-02-15 2015-05-13 联想(北京)有限公司 Information processing method and electronic equipment
CN107396019A (en) * 2017-08-11 2017-11-24 维沃移动通信有限公司 A kind of slow motion video method for recording and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10298853B2 (en) * 2016-01-13 2019-05-21 Canon Kabushiki Kaisha Image processing apparatus, method of controlling image processing apparatus, and imaging apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102780869A (en) * 2012-06-27 2012-11-14 宇龙计算机通信科技(深圳)有限公司 Video recording device and method
CN104580969A (en) * 2013-10-23 2015-04-29 中兴通讯股份有限公司 Video frame rate adjusting method and device
CN104618656A (en) * 2015-02-15 2015-05-13 联想(北京)有限公司 Information processing method and electronic equipment
CN107396019A (en) * 2017-08-11 2017-11-24 维沃移动通信有限公司 A kind of slow motion video method for recording and mobile terminal

Also Published As

Publication number Publication date
CN108449560A (en) 2018-08-24

Similar Documents

Publication Publication Date Title
CN108513070B (en) Image processing method, mobile terminal and computer readable storage medium
CN109361865B (en) Shooting method and terminal
CN108111754B (en) Method for determining image acquisition mode and mobile terminal
CN109688322B (en) Method and device for generating high dynamic range image and mobile terminal
CN108307109B (en) High dynamic range image preview method and terminal equipment
CN108989672B (en) Shooting method and mobile terminal
CN108600668B (en) Screen recording frame rate adjusting method and mobile terminal
CN110913139B (en) Photographing method and electronic equipment
CN108234894B (en) Exposure adjusting method and terminal equipment
CN108307106B (en) Image processing method and device and mobile terminal
CN107730460B (en) Image processing method and mobile terminal
CN110213485B (en) Image processing method and terminal
CN109819166B (en) Image processing method and electronic equipment
CN111401463B (en) Method for outputting detection result, electronic equipment and medium
CN110086993B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
CN107153500B (en) Method and equipment for realizing image display
CN108307123B (en) Exposure adjusting method and mobile terminal
CN110708475B (en) Exposure parameter determination method, electronic equipment and storage medium
CN110944114B (en) Photographing method and electronic equipment
CN109639981B (en) Image shooting method and mobile terminal
CN108366171B (en) Temperature rise control method and mobile terminal
CN109104573B (en) Method for determining focusing point and terminal equipment
CN108243489B (en) Photographing control method and mobile terminal
CN108449560B (en) Video recording method and terminal
CN107734269B (en) Image processing method and mobile terminal

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
GR01 Patent grant
GR01 Patent grant