Video recording method and apparatus
Patent Information
- Application Number
- CN202611119934.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-27
AI Technical Summary
[0012]在本申请实施例中,采用第一帧率,对处于运动状态的第一拍摄对象进行视频录制,得到至少一个图像帧;基于上述视频录制过程中采集的上述至少一个图像帧中的第一图像帧,确定上述第一图像帧中上述第一拍摄对象的第一位姿信息;基于该第一位姿信息,确定上述第一图像帧的第一分值,该第一分值用于表征上述第一图像帧对应的运动动作在上述第一拍摄对象运动过程中的重要程度;在上述第一分值大于第一阈值的情况下,采用第二帧率对处于运动状态的第一拍摄对象进行视频录制,其中,上述第二帧率大于上述第一帧率。本方案中,在以较低的采集帧率录制视频的过程中,可以在第一图像帧的第一分值大于阈值的情况下,确定第一图像帧为关键片段的起始帧,从而之后通过更高的采集帧率录制视频,使得播放录制得到的视频时,关键片段能够直接以慢动作的形式播放,避免了通过视频编辑软件对关键片段进行插帧处理导致的关键片段画面模糊的问题,提高了录制的视频在以慢动作的形式播放时的播放效果。
Smart Images

Figure CN122994443A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of electronic technology, specifically relating to a video recording method and apparatus. Background Technology
[0002] With the widespread use of cameras and other shooting equipment, recording videos and playing key segments in slow motion during playback has become increasingly important.
[0003] In related technologies, after recording a video, a user can manually select key segments from the video using video editing software and then perform frame interpolation on those selected segments. This allows the key segments to be played in slow motion when the processed video is subsequently played back. For example, after recording a video of an athlete performing a movement, a user can manually select key segments of the athlete performing specific actions using video editing software and then perform frame interpolation on those segments. This allows the key segments of the athlete performing specific actions to be played in slow motion when the processed video is subsequently played back.
[0004] However, in the above-mentioned solution, the video frames generated by interpolating key segments using video editing software are significantly of lower quality than other video frames captured by the recording device. This results in blurry images of key segments when the processed video is played back. Consequently, the recorded video in this technology exhibits poor playback quality when played in slow motion. Summary of the Invention
[0005] The purpose of this application is to provide a video recording method and apparatus that can improve the playback effect of recorded videos when played in slow motion.
[0006] In a first aspect, embodiments of this application provide a video recording method, the method comprising: recording a video of a first subject in motion at a first frame rate to obtain at least one image frame; determining a first pose information of the first subject in the first image frame based on the first image frame acquired during the video recording process; determining a first score of the first image frame based on the first pose information, the first score being used to characterize the importance of the motion action corresponding to the first image frame in the motion process of the first subject; and recording a video of the first subject in motion at a second frame rate when the first score is greater than a first threshold, wherein the second frame rate is greater than the first frame rate.
[0007] Secondly, embodiments of this application provide a video recording apparatus, comprising: a processing module configured to record video of a first subject in motion at a first frame rate to obtain at least one image frame; and to determine, based on the first image frame acquired during the video recording process, a first pose information of the first subject in the first image frame; and to determine, based on the first pose information, a first score of the first image frame, the first score being used to characterize the importance of the motion action corresponding to the first image frame in the motion process of the first subject; and, if the first score is greater than a first threshold, to record video of the first subject in motion at a second frame rate, wherein the second frame rate is greater than the first frame rate.
[0008] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the video recording method as described in the first aspect.
[0009] Fourthly, embodiments of this application provide a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the video recording method as described in the first aspect.
[0010] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the video recording method as described in the first aspect.
[0011] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the video recording method as described in the first aspect.
[0012] In this embodiment, a first frame rate is used to record video of a first subject in motion, resulting in at least one image frame. Based on the first image frame acquired during the video recording process, the first pose information of the first subject in the first image frame is determined. Based on this first pose information, a first score of the first image frame is determined, which characterizes the importance of the motion action corresponding to the first image frame in the motion of the first subject. If the first score is greater than a first threshold, a second frame rate is used to record video of the first subject in motion, wherein the second frame rate is greater than the first frame rate. In this solution, during video recording at a lower frame rate, if the first score of the first image frame is greater than the threshold, the first image frame can be determined as the starting frame of a key segment. Subsequently, video is recorded at a higher frame rate, allowing the key segments to be played directly in slow motion when the recorded video is played back. This avoids the problem of blurred key segments caused by frame interpolation in video editing software, improving the playback effect of the recorded video in slow motion. Attached Figure Description
[0013] Figure 1 This is one of the flowcharts of the video recording method provided in some embodiments of this application;
[0014] Figure 2 This is the second flowchart of a video recording method provided in some embodiments of this application;
[0015] Figure 3 This is the third flowchart of the video recording method provided in some embodiments of this application;
[0016] Figure 4 This is the fourth flowchart of the video recording method provided in some embodiments of this application;
[0017] Figure 5 This is the fifth flowchart of a video recording method provided in some embodiments of this application;
[0018] Figure 6 This is the sixth flowchart of the video recording method provided in some embodiments of this application;
[0019] Figure 7 These are schematic diagrams of the modules involved in the video recording method provided in some embodiments of this application;
[0020] Figure 8 These are schematic diagrams of video recording devices provided in some embodiments of this application;
[0021] Figure 9These are schematic diagrams of the electronic devices provided in some embodiments of this application;
[0022] Figure 10 These are schematic diagrams of the hardware structure of electronic devices provided in some embodiments of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0024] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0025] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."
[0026] The video recording method and apparatus provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0027] With the widespread use of smartphones and portable shooting devices such as action cameras, users' demand for capturing memorable moments during sports is growing. For example, recording highlight actions in sports like skiing, badminton, and tennis. These highlight actions are fleeting and unrepeatable, and users often want to record and review these moments in slow motion.
[0028] In related technologies, users record the entire motion process at a standard frame rate to obtain video, and then manually select highlight segments in the video using video editing software to apply a slow-motion effect. However, post-editing has significant time delays, requiring a considerable amount of time to browse, filter, and edit the resulting video after recording. Furthermore, the frame interpolation quality generated by the video editing software is inferior to the natively recorded image frames, resulting in blurry images when playing highlight segments of the video. Thus, in related technologies, the playback effect of recorded videos played in slow motion is poor.
[0029] This application provides a video recording method and apparatus. A first frame rate is used to record video of a first subject in motion, obtaining at least one image frame. Based on the first image frame acquired during the video recording process, a first pose information of the first subject in the first image frame is determined. Based on this first pose information, a first score is determined for the first image frame, which characterizes the importance of the motion action corresponding to the first image frame in the motion of the first subject. If the first score is greater than a first threshold, a second frame rate is used to record video of the first subject in motion, wherein the second frame rate is greater than the first frame rate. In this solution, during video recording at a lower frame rate, if the first score of the first image frame is greater than a threshold, the first image frame can be determined as the starting frame of a key segment. Subsequently, video is recorded at a higher frame rate, allowing the key segments to be played directly in slow motion when the recorded video is played back. This avoids the problem of blurred key segments caused by frame interpolation in video editing software, improving the playback effect of the recorded video in slow motion.
[0030] The embodiments of this application can be applied to scenarios where video recording is required.
[0031] In one possible application scenario, the video recording method provided in this application embodiment can be applied to scenarios where it is necessary to record athletes skiing, such as scenario 1.
[0032] Scenario 1: Taking the recording of athlete A's skiing process using a drone as an example. The drone uses a first frame rate to record video of athlete A in motion, obtaining at least one image frame of athlete A skiing; based on the first image frame from the at least one image frame of athlete A skiing captured during the video recording, the first pose information of athlete A in the first image frame is determined; based on the first pose information, a first score is determined for the first image frame, which is used to characterize the importance of the movement corresponding to the first image frame in the athlete A's motion process; if the first score is greater than a first threshold, a second frame rate is used to record video of athlete A in motion, wherein the second frame rate is greater than the first frame rate.
[0033] In another possible application scenario, the video recording method provided in this application embodiment can be applied to scenarios where it is necessary to record athletes playing badminton, such as scenario 2.
[0034] Scenario 2: Taking the recording of athlete B playing badminton via a mobile phone as an example. The mobile phone uses a first frame rate to record video of athlete B in motion, obtaining at least one image frame of athlete B playing badminton; based on the first image frame from the at least one image frame of athlete B playing badminton captured during the video recording, the first pose information of athlete B in the first image frame is determined; based on the first pose information, a first score is determined for the first image frame, which is used to characterize the importance of the movement corresponding to the first image frame in the athlete B's movement process; if the first score is greater than a first threshold, a second frame rate is used to record video of athlete B in motion, wherein the second frame rate is greater than the first frame rate.
[0035] It should be noted that the above scenarios 1 and 2 are merely exemplary examples of some scenarios that may be applied to the embodiments of this application. In actual implementation, the embodiments of this application can also be applied to any possible scenario where video recording is required. The embodiments of this application are not limited here.
[0036] The video recording method provided in this application can be executed by a video recording device, which can be an electronic device, or a functional module or functional entity within an electronic device. The following description uses an electronic device as an example to illustrate the technical solution provided in this application.
[0037] Figure 1 A flowchart of a video recording method provided in an embodiment of this application is shown, such as... Figure 1 As shown, the video recording method provided in this application embodiment may include the following steps 201 to 204.
[0038] Step 201: The electronic device uses the first frame rate to record video of the first subject in motion, and obtains at least one image frame.
[0039] In some embodiments of this application, the electronic device records video of a first subject in motion, thereby obtaining at least one image frame of the first subject in motion.
[0040] In some embodiments of this application, being in motion means that the position or posture of the subject being photographed changes constantly.
[0041] In some embodiments of this application, the first frame rate can be a fixed value, such as 30 frames per second (FPS). Of course, the first frame rate can also be other preset values of the system, which can be determined according to actual needs, and this application does not limit it.
[0042] In some embodiments of this application, the first subject to be photographed can be a person. Of course, the first subject to be photographed can also be other moving subjects, such as cars, airplanes, etc., which can be determined according to actual needs, and this application does not limit it.
[0043] In some embodiments of this application, the user can make a first input to the first electronic device to trigger the electronic device to record video of the first subject in motion through the camera module at the first frame rate mentioned above.
[0044] In some embodiments of this application, the first input can be a user's touch input to the recording control in the camera application interface. Of course, the first input can also be other types of input, such as voice input, etc., which can be determined according to actual needs, and this application does not limit it.
[0045] In some embodiments of this application, the first input includes at least one of the following: touch input from a user via a finger or stylus, voice commands input by the user, or specific gestures input by the user. Of course, the first input can also be other feasible inputs, which can be determined according to actual needs, and this application does not limit them.
[0046] In some embodiments of this application, the above-mentioned touch input can be single-click input, double-click input, or any number of clicks, or it can be long-press input or short-press input.
[0047] In some embodiments of this application, the specific gesture mentioned above can be any one of a single-click gesture, a swipe gesture, a drag gesture, a pressure recognition gesture, a long-press gesture, an area change gesture, a double-press gesture, or a double-tap gesture.
[0048] In some embodiments of this application, when the electronic device is recording video of a first moving object at a first frame rate, the user can enable the pre-recording buffer mode of the electronic device. Specifically, when the electronic device is in pre-recording buffer mode, the pre-recording buffer module in the electronic device can continuously acquire image frames at a higher frame rate and temporarily store them in a circular pre-recording buffer while recording video of the first moving object at the first frame rate. This circular pre-recording buffer only retains high-frame-rate image frames of a first preset duration.
[0049] In some embodiments of this application, the first preset duration can be a fixed value, such as 5 seconds. Of course, the first preset duration can also be other values preset by the system, which can be determined according to actual needs, and this application does not limit this.
[0050] In some embodiments of this application, the first preset duration can be pre-configured based on the type of movement of the first subject. For example, when the first subject is skiing, the first preset duration can be 5 seconds; when the first subject is playing badminton, the first preset duration can be 3 seconds.
[0051] It's understandable that electronic devices can use image frames from a cyclic pre-recording buffer as the beginning of key segments in a video, thus ensuring the integrity of those key segments. When an electronic device is in pre-recording buffer mode, it needs to constantly capture image frames at a high frame rate, resulting in higher power consumption. Therefore, pre-recording buffer mode is suitable for scenarios where the integrity of key segments is critical, such as racing scenarios.
[0052] Step 202: The electronic device determines the first pose information of the first subject in the first image frame based on the first image frame in at least one image frame captured during the video recording process.
[0053] In some embodiments of this application, the first image frame can be the latest image frame captured by the electronic device during video recording at a first frame rate. Alternatively, the first image frame can also be an image frame obtained by the electronic device by sampling frames at a preset number of times per second.
[0054] In some embodiments of this application, the image frames obtained by the electronic device by sampling frames at a preset number of times per second refer to the number of image frames randomly sampled by the electronic device from the image frames recorded per second, which is equal to the preset number of times.
[0055] In some embodiments of this application, the preset number of times can be a fixed value, such as 20. Of course, the preset number of times can also be other values preset by the system, which can be determined according to actual needs, and this application does not limit this.
[0056] In some embodiments of this application, the aforementioned first pose information is used to indicate the position or pose of the first subject being photographed.
[0057] In some embodiments of this application, the electronic device can determine the first pose information based on the motion type corresponding to the first photographed object.
[0058] It should be noted that the specific implementation process of the electronic device determining the first pose information based on the motion type corresponding to the first photographed object can be found in the relevant description in the following embodiments. To avoid repetition, this application will not elaborate on it here.
[0059] Step 203: The electronic device determines the first score of the first image frame based on the first pose information.
[0060] In some embodiments of this application, the first score is used to characterize the importance of the motion action corresponding to the first image frame during the motion of the first photographed object.
[0061] In some embodiments of this application, the electronic device can determine whether the action of the first photographed object in the first image frame is a highlight action based on a first score, thereby determining whether the first image frame is the starting frame of the highlight moment.
[0062] Step 204: When the first score is greater than the first threshold, the electronic device uses the second frame rate to record video of the first subject in motion.
[0063] The second frame rate is greater than the first frame rate.
[0064] In some embodiments of this application, the second frame rate can be a fixed value, such as 120 FPS. Of course, the second frame rate can also be other values preset by the system, which can be determined according to actual needs, and this application does not limit this.
[0065] In some embodiments of this application, the first threshold can be a fixed value, such as 60. Of course, the first threshold can also be other values preset by the system. The specific value can be determined according to actual needs, and this application does not limit it.
[0066] In some embodiments of this application, the first threshold mentioned above may also be referred to as the highlight trigger threshold.
[0067] In some embodiments of this application, when the first score is greater than the first threshold, the electronic device can use the first image frame as the starting frame of the key segment, thereby increasing the acquisition frame rate and recording the key segment at the second acquisition frame rate.
[0068] In some embodiments of this application, the aforementioned key segment refers to a video segment of the highlight moment of the first photographed object.
[0069] In some embodiments of this application, when an electronic device plays a recorded video, the key segments in the video are played in slow motion because the image frames corresponding to the key segments are recorded at the second frame rate, while the non-key segments are played in normal motion because they are recorded at the first frame rate.
[0070] It should be noted that when playing back the recorded video, the degree to which key segments are slowed down depends on the second frame rate and the playback frame rate of the video. For example, with a second frame rate of 120 frames per second and a playback frame rate of 60 frames per second, the key segments will be played in slow motion at 0.5x speed.
[0071] This application provides a video recording method. When recording video at a lower frame rate, if the first score of the first image frame is greater than a threshold, the first image frame can be determined as the starting frame of a key segment. Subsequently, video can be recorded at a higher frame rate, so that when the recorded video is played back, the key segment can be played directly in slow motion. This avoids the problem of blurry key segments caused by frame interpolation in video editing software, and improves the playback effect of the recorded video when played back in slow motion.
[0072] In some embodiments of this application, combined with Figure 1 ,like Figure 2 As shown, step 202 can be implemented through steps 202a and 202b below.
[0073] Step 202a: The electronic device determines at least one key body part of the first subject in the first image frame that corresponds to the motion type, based on the motion type of the first subject.
[0074] In some embodiments of this application, the aforementioned sports types include at least one of the following: skiing, badminton, basketball, and high jump. Of course, the aforementioned sports types may also include other types of sports, which can be determined according to actual needs, and this application does not limit this.
[0075] In some embodiments of this application, the above-mentioned types of exercise may also be referred to as sports events.
[0076] In some embodiments of this application, the aforementioned key body parts include at least one of the following: head, shoulder, torso, hip, knee, ankle, and foot. Of course, the aforementioned key body parts may also include other body parts, which can be determined according to actual needs, and this application does not limit this.
[0077] In some embodiments of this application, the aforementioned key body parts may also be referred to as key points of the human skeleton.
[0078] In some embodiments of this application, the electronic device can retrieve a preset posture scoring template based on the motion type corresponding to the first photographed object, obtain the scoring standard corresponding to the motion type corresponding to the first photographed object, and then determine at least one key body part in the first image frame corresponding to the motion type based on the scoring standard, and subsequently calculate the first score based on the at least one key body part corresponding to the motion type.
[0079] In some embodiments of this application, the electronic device can perform image recognition on the first image frame to identify key body parts in the first image frame. Specifically, the electronic device can perform image recognition on the first image frame to identify the display position of the first subject in the first image frame, and then perform pose estimation on the first subject, that is, analyze the human body image displayed in the first image frame, extract the coordinates of key points of the human body in real time, and then calculate the angles, heights, and motion states of various parts of the body as the data basis for determining the first pose information.
[0080] In some embodiments of this application, the aforementioned human body key points are used to characterize human posture and motion state. Electronic devices can calculate the first pose information by analyzing the temporal changes in the coordinates of these human body key points.
[0081] In some embodiments of this application, the scoring criteria described above are used to indicate the basis for calculating the first score. For example, the first scoring criterion may be the bending angle of the knee joint, and the electronic device may calculate the first score based on the size of the bending angle of the knee joint.
[0082] In some embodiments of this application, the posture scoring template includes at least one first mapping relationship.
[0083] In some embodiments of this application, the first mapping relationship described above is a mapping relationship between sports type and scoring criteria.
[0084] In some embodiments of this application, when the sport is skiing, the corresponding scoring standard can be the bending angle during skiing; when the sport is badminton, the corresponding scoring standard can be the bending angle of the knee joint; and when the sport is basketball, the corresponding scoring standard can be the distance between the foot and the ground.
[0085] In some embodiments of this application, the electronic device can extract first image features from the first image frame, thereby determining the motion type corresponding to the first photographed object based on the first image features.
[0086] In some embodiments of this application, the first image feature includes at least one of the following: site texture features, color distribution features, sports equipment features, and body shape features of the first photographed object. Of course, the first image feature may also include other image features extracted from the first image frame to determine the motion type corresponding to the first photographed object; the specific features can be determined according to actual needs, and this application does not limit this.
[0087] In some embodiments of this application, the aforementioned field texture features refer to the texture features of the sports field in the first image frame. For example, the field boundary line features in the sports field in the first image frame.
[0088] In some embodiments of this application, the aforementioned color distribution features refer to the color distribution features of pixels in the first image frame. For example, when the white distribution in the first image frame is greater than a preset threshold, it can be determined that the sport corresponding to the first photographed object is skiing.
[0089] In some embodiments of this application, the sports equipment feature refers to the type of sports equipment included in the first image frame. For example, if the sports equipment feature of the first image frame matches the features of a basketball, it can be determined that the type of sport corresponding to the first photographed object is playing basketball.
[0090] In some embodiments of this application, the electronic device can continuously detect the image features of the acquired image frames, so that after the motion type corresponding to the first captured object changes, the electronic device can promptly identify the changed motion type.
[0091] For example, such as Figure 3 As shown, the electronic device can determine the motion type corresponding to the first subject through steps 20 to 25:
[0092] Step 20: After recording begins, the electronic device performs background scene analysis on the first image frame and extracts the first image features from the first image frame.
[0093] Step 21: Based on the first image features mentioned above, the electronic device determines the first motion type and outputs the first confidence level.
[0094] In some embodiments of this application, the first confidence level described above represents the probability that the motion type corresponding to the first photographed object is the first motion type.
[0095] Step 22: The electronic device determines whether the first confidence level is greater than the confidence threshold.
[0096] If yes, proceed to step 23; otherwise, proceed to step 20.
[0097] In some embodiments of this application, the confidence threshold can be a fixed value, such as 0.6. Of course, the confidence level can also be other preset values of the system, which can be determined according to actual needs, and this application does not limit this.
[0098] Step 23: The electronic device determines the motion type corresponding to the first subject to be photographed as the first motion type.
[0099] Step 24: During the video recording process, the electronic device continuously detects the image features of the captured image frames and calculates the scene switching deviation.
[0100] In some embodiments of this application, the above-mentioned scene switching deviation represents the probability that the motion type corresponding to the first shooting object in the current image frame changes.
[0101] Step 25: The electronic device determines whether the scene switching deviation is greater than or equal to the scene switching threshold.
[0102] If yes, proceed to step 20; otherwise, the recording ends.
[0103] In some embodiments of this application, the scene switching threshold can be a fixed value, such as 0.6. Of course, the scene switching threshold can also be other values preset by the system, which can be determined according to actual needs, and this application does not limit this.
[0104] Step 202b: The electronic device determines the first pose information based on the position information of at least one key body part of the first subject in the first image frame.
[0105] In some embodiments of this application, the first pose information includes at least one of the following: the included angle value formed by the lines connecting at least one key body part, and the distance between at least one key body part and the ground baseline.
[0106] In some embodiments of this application, the position information of at least one key body part in the first image frame can be the coordinate information of at least one key body part in the first image frame.
[0107] In some embodiments of this application, the coordinate information described above can be coordinates in a Cartesian coordinate system established in the first image frame. Alternatively, the coordinate information described above can also be pixel-level coordinates in the first image frame.
[0108] In some embodiments of this application, the aforementioned ground reference line is used to indicate the location of the ground in the first image frame.
[0109] In this way, the electronic device can determine the position information of at least one key body part corresponding to the movement type of the subject from the first image frame. Based on the position information of the at least one key body part, the first score of the first image frame is determined. Then, when recording video at a lower frame rate, if the first score of the first image frame is greater than a threshold, the first image frame is determined as the starting frame of the key segment. Subsequently, video is recorded at a higher frame rate, so that when the recorded video is played back, the key segment can be played directly in slow motion. This avoids the problem of blurring of the key segment due to frame interpolation processing of the key segment by video editing software, and improves the playback effect of the recorded video when played back in slow motion.
[0110] In some embodiments of this application, combined with Figure 1 ,like Figure 4 As shown, after step 204 above, the video recording method provided in this application embodiment further includes steps 205a to 205c as described below.
[0111] Step 205a: The electronic device determines the second pose information of the first shooting object based on the second image frame captured during the video recording process.
[0112] In some embodiments of this application, the second image frame can be the latest image frame captured by the electronic device during video recording at a second frame rate. Alternatively, the second image frame can also be an image frame obtained by the electronic device by sampling frames at a preset number of times per second.
[0113] In some embodiments of this application, the aforementioned second pose information is used to indicate the position or posture of the first subject being photographed.
[0114] In some embodiments of this application, the electronic device can determine the second pose information based on the motion type corresponding to the first photographed object.
[0115] In some embodiments of this application, the second pose information includes at least one of the following: the included angle value formed by the lines connecting at least one key body part, and the distance between at least one key body part and the ground baseline.
[0116] In some embodiments of this application, the position information of at least one key body part in the second image frame can be the coordinate information of at least one key body part in the second image frame.
[0117] In some embodiments of this application, the coordinate information described above can be coordinates in a Cartesian coordinate system established in the second image frame. Alternatively, the coordinate information described above can also be pixel-level coordinates in the second image frame.
[0118] In some embodiments of this application, the aforementioned ground reference line is used to indicate the location of the ground in the second image frame.
[0119] Step 205b: The electronic device determines the second score of the second image frame based on the second pose information.
[0120] In some embodiments of this application, the second score is used to characterize the importance of the motion action corresponding to the second image frame during the motion of the first photographed object.
[0121] In some embodiments of this application, the electronic device can determine whether the action of the first photographed object in the second image frame is the ending action of the highlight action based on the second score, thereby determining whether the second image frame is the ending frame of the highlight moment.
[0122] Step 205c: When the second score is less than or equal to the second threshold, the electronic device, every first cycle, lowers the video recording frame rate according to the first step length, and uses the lowered frame rate to record video of the first subject.
[0123] In some embodiments of this application, the second threshold can be a fixed value, such as 40. Of course, the second threshold can also be other values preset by the system, which can be determined according to actual needs, and this application does not limit this.
[0124] In some embodiments of this application, the second threshold may be less than the first threshold in order to avoid the electronic device frequently switching frame rates in a critical state.
[0125] In some embodiments of this application, the second threshold mentioned above may also be referred to as the highlight off threshold.
[0126] In some embodiments of this application, the first step length is the acquisition frame rate that decreases every first cycle. For example, when the first step length is 10 FPS and the second frame rate is 120 FPS, the acquisition frame rate decreases by 10 FPS every first cycle, and the electronic device records video of the first subject at acquisition frame rates of 110 FPS, 100 FPS, and 90 FPS respectively.
[0127] In some embodiments of this application, the first period can be a fixed value, such as 1 second. Of course, the first period can also be other values preset by the system, which can be determined according to actual needs, and this application does not limit this.
[0128] In some embodiments of this application, the electronic device can determine the first step length based on the scores of the two preceding adjacent image frames of the second image frame.
[0129] It should be noted that the specific implementation process of the electronic device determining the first step length based on the scores of the two preceding image frames of the second image frame can be found in the relevant description in the following embodiments. To avoid repetition, this application will not elaborate further here.
[0130] In some embodiments of this application, the electronic device can gradually reduce the acquisition frame rate in the first step and continue to record video at the reduced frame rate until the acquisition frame rate drops to the first frame rate. After that, the electronic device maintains the acquisition video at the first frame rate and no longer reduces the acquisition frame rate.
[0131] In this way, the electronic device can determine the second score of the second image frame based on the second pose information, and determine whether the second image frame is the end frame of the key segment through the second score, thereby determining whether to reduce the acquisition frame rate of the recorded video. This allows the electronic device to subsequently record non-key segments based on a lower acquisition frame rate, reducing the storage space and computing resources occupied by the entire video recording process.
[0132] In some embodiments of this application, combined with Figure 4 ,like Figure 5 As shown, prior to step 205c above, the video recording method provided in this application embodiment further includes steps 205d and 205e below.
[0133] Step 205d: The electronic device acquires the scores of the two adjacent image frames before the second image frame.
[0134] In some embodiments of this application, the score of each image frame is used to characterize the importance of the motion action corresponding to the image frame during the motion of the first subject being photographed.
[0135] In some embodiments of this application, the two image frames adjacent to the second image frame refer to the third image frame and the fourth image frame. The third image frame refers to the image frame preceding the second image frame, and the fourth image frame refers to the image frame preceding the second image frame.
[0136] In some embodiments of this application, the electronic device can determine at least one key body part corresponding to the motion type of the photographed object in the third or fourth image frame based on the motion type of the photographed object in the third or fourth image frame, and then determine the score of the third or fourth image frame based on the position information of the at least one key body part in the third or fourth image frame.
[0137] It should be noted that the specific implementation process of determining at least one key body part corresponding to the motion type of the photographed object in the third or fourth image frame based on the motion type of the photographed object in the third or fourth image frame, and then determining the score of the third or fourth image frame based on the position information of the at least one key body part in the third or fourth image frame, can be found in the relevant description in the following embodiments. To avoid repetition, this application will not elaborate further here.
[0138] Step 205e: The electronic device determines the first step length based on the difference in scores between the two preceding adjacent image frames.
[0139] In some embodiments of this application, the first step length is positively correlated with the difference in scores between the two preceding adjacent image frames.
[0140] In some embodiments of this application, the difference in scores between two consecutive image frames represents the rate at which the scores of the image frames decrease, and also represents the rate at which the motion intensity of the first subject decreases.
[0141] It is understandable that when the difference in scores between the two preceding image frames is large, it indicates that the motion intensity of the first subject is decaying at a faster rate. In this case, the acquisition frame rate of the electronic device can be quickly reduced with a larger step length, so that the acquisition frame rate of the electronic device can quickly return to the first frame rate. When the difference in scores between the two preceding image frames is small, it indicates that the motion intensity of the first subject is decaying at a slower rate. In this case, the acquisition frame rate of the electronic device can be gradually reduced with a smaller step length, so that the acquisition frame rate of the electronic device can gradually return to the first frame rate, thereby extending the duration of the high acquisition frame rate to capture the tail end of the first subject's movement.
[0142] In this way, the electronic device can determine the first step length based on the rate of decrease of the image frame score. This allows the electronic device to quickly reduce its capture frame rate with a larger step length when the score decreases rapidly, avoiding the waste of storage space and computing resources caused by capturing non-critical segments at a large capture frame rate for a long time. Alternatively, the electronic device can reduce its capture frame rate with a smaller first step length when the score decreases slowly, avoiding the problem of missing the end of highlight action in critical segments captured at the second frame rate, thus improving the flexibility of video recording.
[0143] In some embodiments of this application, the video recording method provided in this application further includes the following steps 206a and 206b.
[0144] Step 206a: When the first score is greater than the first threshold, the electronic device records the acquisition time information of the first image frame.
[0145] In some embodiments of this application, the acquisition time information of the first image frame is used to indicate the time point at which the electronic device acquires the first image frame.
[0146] Step 206b: After the video recording is completed, the electronic device generates first index information based on the acquisition time information of the first image frame, and writes the first index information into the metadata of the first video obtained from the video recording.
[0147] In some embodiments of this application, the first index information is used to locate the first image frame in the first video.
[0148] In some embodiments of this application, the aforementioned first index information may be the playback time point information of the first image frame in the first video. For example, the first index information may be a time point accurate to the second, which is the playback time point of the first image frame.
[0149] In some embodiments of this application, the electronic device may also write the motion type corresponding to the first shooting object into the metadata of the first video, so that when the user plays the first video, he / she can quickly browse key segments of a specific motion type based on the metadata of the first video.
[0150] In some embodiments of this application, the electronic device can also write the first frame rate and the second frame rate into the metadata of the first video, enabling the electronic device to parse the first video, obtain the first frame rate and the second frame rate, and select an appropriate playback frame rate to play the first video based on the first frame rate and the second frame rate. For example, assuming the first frame rate is 60 FPS and the second frame rate is 120 FPS, the electronic device can select a playback frame rate of 60 FPS to play the first video, so that the video segments recorded at the first frame rate in the first video play at normal speed, and the video segments recorded at the second frame rate play in slow motion at 0.5x speed.
[0151] In some embodiments of this application, the electronic device can parse the metadata of the first video to quickly locate and extract all video segments recorded at the second frame rate in the first video, and splice these video segments recorded at the second frame rate to automatically generate a highlight compilation short video, which contains only the key segments from the first video.
[0152] In this way, the electronic device can determine the index information of the first image frame based on the acquisition time information of the first image frame. As a result, when playing the recorded video later, the playback position of the first image frame can be quickly located by the index information of the first image frame, without the user having to manually drag the playback progress bar to find the playback position of the first image frame, thus improving the convenience of playing the recorded video.
[0153] This application proposes a video recording method that can record based on the scores of captured image frames. For example, as shown... Figure 6 As shown, the video recording method proposed in this application may include the following steps 40 to 54:
[0154] Step 40: The electronic device records video at the standard frame rate.
[0155] In some embodiments of this application, the standard frame rate mentioned above is the first frame rate mentioned above.
[0156] Step 41: The electronic device outputs the posture score of the first image frame based on the sports event and through a preset scoring template.
[0157] In some embodiments of this application, the first image frame may be the latest image frame captured by the electronic device at a first acquisition frame rate. Alternatively, the first image frame may be an image frame extracted by the electronic device from a plurality of image frames captured at the first frame rate according to a preset rule.
[0158] In some embodiments of this application, the above-mentioned attitude score is the same as the above-mentioned first score.
[0159] Step 42: The electronic device determines whether the attitude score of the first image frame is greater than or equal to the first threshold attitude score.
[0160] If yes, proceed to step 43 below; if no, proceed to step 41 above.
[0161] In some embodiments of this application, the aforementioned first threshold attitude score is the aforementioned first threshold.
[0162] Step 43: The electronic device switches the camera path mode to high frame rate mode and records the acquisition time information of the first image frame.
[0163] In some embodiments of this application, the electronic device records video at a second frame rate when it is in the high frame rate mode described above.
[0164] Step 44: The electronic device records video at a high frame rate.
[0165] In some embodiments of this application, the aforementioned high frame rate is the aforementioned second frame rate.
[0166] Step 45: The electronic device outputs the posture score of the second image frame based on the sports event and through a preset scoring template.
[0167] In some embodiments of this application, the pose score of the second image frame is the same as the second score.
[0168] Step 46: The electronic device determines whether the pose score of the second image frame is less than or equal to the second threshold pose score.
[0169] If yes, proceed to step 47; otherwise, proceed to step 45.
[0170] In some embodiments of this application, the aforementioned second threshold attitude score is the aforementioned second threshold.
[0171] Step 47: The electronic device calculates the score decay rate.
[0172] In some embodiments of this application, the above-mentioned score decay rate is the difference in scores between the two preceding adjacent image frames of the first image frame.
[0173] Step 48: The electronic device generates an adaptive adjustment step size based on the score decay rate.
[0174] In some embodiments of this application, the adaptive adjustment step size is the first step size.
[0175] Step 49: The electronic device reduces its acquisition frame rate based on adaptive adjustment step size until the acquisition frame rate of the electronic device is equal to the standard frame rate mentioned above.
[0176] Step 50: The electronic device records video at the standard frame rate.
[0177] Step 51: The electronic device determines whether to stop recording video.
[0178] If yes, proceed to step 52; otherwise, proceed to step 41.
[0179] Step 52: The electronic device encodes the acquired image frames to obtain the first video.
[0180] Step 53: The electronic device writes the index information of the first image frame into the metadata of the first video based on the acquisition time of the first image frame.
[0181] Step 54: The electronic device plays the first video.
[0182] It should be noted that the specific implementation process of each step in steps 40 to 54 above can be found in the relevant descriptions in the above embodiments. To avoid repetition, this application will not repeat them here.
[0183] The video recording method proposed in this application will be described in detail below through the functional modules in the electronic device.
[0184] For example, such as Figure 7As shown, the video recording method proposed in this application involves seven modules in an electronic device, namely a scene recognition module, a threshold module, an image analysis module, a posture scoring module, a pre-recording buffer module, a frame rate control module, and a video encoding module. The system comprises several modules: a scene recognition module for identifying the current sports field scene and its confidence level based on the venue, athlete posture, and sports equipment; a threshold module for setting scoring thresholds for multiple sports, such as scores for skiing cornering, snow wall scoring, basketball jump posture, and badminton smash posture; an image analysis module for key point extraction, posture estimation, and image region feature analysis; a posture scoring module for comprehensive posture scoring based on image feature values according to different preset scoring templates for various sports; a pre-recording buffer module for storing high-frame-rate image frames of a preset duration in a cyclic high-frame-rate buffer in high-power mode; a frame rate control module for phased switching between high and standard frame rates, calculating adaptive step size, and adjusting the adaptive step size based on the rate of increase or decrease in motion posture; step size compression when the motion posture score decreases rapidly and step size extension when the motion posture score decreases slowly; and a video encoding module for mixing the output of frame rate files with the writing of metadata from the recorded video, such as writing variable frequency information into the time index.
[0185] Specifically, the electronic device can first output a video stream from the video acquisition hardware. This video stream is divided into two paths: one is directly sent to the video encoding module, and the other is sent to the image analysis module. The image analysis module is a mandatory module and will sequentially complete three steps: key point extraction, pose estimation, and image region feature analysis, outputting image feature values to the pose scoring module. Simultaneously, the input video stream will also be sent to the optional scene recognition module. The scene recognition module can identify the current sports scene and its confidence level based on information such as the venue, athlete posture, and sports equipment, outputting the sports type scene recognition result to the pose scoring module. After receiving image feature values and scene recognition results, the posture scoring module calls preset scoring templates according to different movements, completes a comprehensive posture score based on the image feature values, and outputs the posture score to another posture scoring module. The threshold module pre-stores scoring thresholds for multiple sports, such as skiing carving and cornering, snow wall scoring, basketball jump posture scoring, and badminton smash posture scoring, and outputs corresponding threshold parameters to another posture scoring module. This other posture scoring module performs a comprehensive score on the input posture score value based on the preset scoring templates for different sports and the threshold parameters, and outputs a highlight status signal (trigger or off signal) to the frame rate control module. Simultaneously, the posture scoring module also calculates the decay rate based on the posture score from the image features and outputs the calculation result to the frame rate control module. The pre-recording buffer module, after triggering high-power mode, stores high-frame-rate image frames of a preset duration in a looping high-frame-rate buffer. The pre-recording buffer module can receive the movement type recognition results output by the threshold module. The frame rate control module is mandatory. It switches between high and standard frame rates in stages based on the input signal. Simultaneously, it adjusts the adaptive step size based on the motion posture, increasing or decreasing the step size during rapid decay and increasing it during slow decay. Finally, it outputs frame rate control commands to the video encoding module. The video encoding module then combines the input video stream and the frame rate control commands to output a hybrid frame rate video file. The metadata of this hybrid frame rate video file includes variable frame rate information and metadata time indexes.
[0186] It should be noted that each of the above method embodiments, or various possible implementations of each method embodiment, can be executed individually or in combination of any two or more. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.
[0187] The video recording method provided in this application can be executed by a video recording device. This application uses a video recording device executing the video recording method as an example to illustrate the video recording device provided in this application.
[0188] Figure 8 This is a schematic diagram of the structure of a video recording device provided in an embodiment of this application. Figure 8 As shown, the video recording device 500 includes a processing module 501.
[0189] The aforementioned processing module 501 is configured to record video of a first subject in motion using a first frame rate to obtain at least one image frame; and to determine, based on the first image frame in the at least one image frame acquired during the video recording process, the first pose information of the first subject in the first image frame; and to determine, based on the first pose information, a first score of the first image frame, the first score being used to characterize the importance of the motion action corresponding to the first image frame in the motion process of the first subject; and, if the first score is greater than a first threshold, to record video of the first subject in motion using a second frame rate, wherein the second frame rate is greater than the first frame rate.
[0190] In one possible implementation, the processing module 501 is specifically used to: determine at least one key body part of the first photographed object corresponding to the motion type in the first image frame; and determine the first pose information based on the position information of the at least one key body part of the first photographed object in the first image frame, wherein the first pose information includes at least one of the following: the included angle value formed by the line connecting the at least one key body part, and the distance between the at least one key body part and the ground baseline.
[0191] In one possible implementation, the processing module 501 is further configured to: determine the second pose information of the first subject based on the second image frame acquired during the video recording process after recording the video of the first subject in motion at a second frame rate; determine the second score of the second image frame based on the second pose information, wherein the second score is used to characterize the importance of the motion action corresponding to the second image frame in the motion process of the first subject; and, if the second score is less than or equal to a second threshold, reduce the frame rate of the video recording by a step length every first cycle, and record the video of the first subject at the reduced frame rate.
[0192] In one possible implementation, the processing module 501 is further configured to, before lowering the video recording frame rate according to the first step length every first cycle, obtain the scores of the two adjacent image frames before the second image frame, wherein the score of each image frame is used to characterize the importance of the motion action corresponding to the image frame in the motion process of the first shooting object; and determine the first step length based on the difference between the scores of the two adjacent image frames, wherein the first step length is positively correlated with the difference.
[0193] In one possible implementation, the processing module 501 is further configured to record the acquisition time information of the first image frame when the first score is greater than the first threshold; and, after the video recording is completed, generate first index information based on the acquisition time information of the first image frame, and write the first index information into the metadata of the first video obtained from the video recording, wherein the first index information is used to locate the first image frame in the first video.
[0194] This application provides a video recording device that, during video recording at a lower frame rate, determines the first image frame as the starting frame of a key segment if the first score of the first image frame is greater than a threshold. This allows for subsequent video recording at a higher frame rate, enabling the key segment to be played directly in slow motion when the recorded video is played back. This avoids the problem of blurred key segments caused by frame interpolation in video editing software, thus improving the playback effect of the recorded video in slow motion.
[0195] The video recording device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0196] The video recording device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0197] The video recording device provided in this application embodiment can implement the various processes implemented in the above method embodiments, and will not be described again here to avoid repetition.
[0198] Optionally, such as Figure 9 As shown, this application embodiment also provides an electronic device 600, including a processor 601 and a memory 602. The memory 602 stores a program or instructions that can run on the processor 601. When the program or instructions are executed by the processor 601, they implement the various steps of the above-described video recording method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0199] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0200] Figure 10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0201] The electronic device 100 includes, but is not limited to, components such as: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, and processor 110.
[0202] Those skilled in the art will understand that the electronic device 100 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 110 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 10 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0203] The processor 110 is configured to: record video of a first subject in motion using a first frame rate to obtain at least one image frame; determine a first pose information of the first subject in the first image frame based on the first image frame acquired during the video recording process; determine a first score of the first image frame based on the first pose information, the first score being used to characterize the importance of the motion action corresponding to the first image frame in the motion process of the first subject; and record video of the first subject in motion using a second frame rate when the first score is greater than a first threshold, wherein the second frame rate is greater than the first frame rate.
[0204] Optionally, the processor 110 is specifically configured to: determine at least one key body part of the first photographed object corresponding to the motion type in the first image frame; and determine the first pose information based on the position information of the at least one key body part of the first photographed object in the first image frame, wherein the first pose information includes at least one of the following: the angle value formed by the line connecting the at least one key body part, and the distance between the at least one key body part and the ground baseline.
[0205] Optionally, the processor 110 is further configured to: after recording video of a first subject in motion at a second frame rate, determine second pose information of the first subject based on second image frames acquired during video recording; and, based on the second pose information, determine a second score of the second image frame, the second score being used to characterize the importance of the motion action corresponding to the second image frame in the motion process of the first subject; and, if the second score is less than or equal to a second threshold, reduce the frame rate of video recording by a first step length every first cycle, and record video of the first subject using the reduced frame rate.
[0206] Optionally, the processor 110 is further configured to, before lowering the video recording frame rate according to the first step length every first cycle, obtain the scores of the two adjacent image frames before the second image frame, wherein the score of each image frame is used to characterize the importance of the motion action corresponding to the image frame in the motion process of the first shooting object; and determine the first step length based on the difference between the scores of the two adjacent image frames, wherein the first step length is positively correlated with the difference.
[0207] Optionally, the processor 110 is further configured to record the acquisition time information of the first image frame when the first score is greater than the first threshold; and, after the video recording is completed, generate first index information based on the acquisition time information of the first image frame, and write the first index information into the metadata of the first video obtained from the video recording, wherein the first index information is used to locate the first image frame in the first video.
[0208] This application provides an electronic device that, during video recording at a lower frame rate, can determine the first image frame as the starting frame of a key segment if the first score of the first image frame is greater than a threshold. This allows for subsequent video recording at a higher frame rate, enabling the key segment to be played directly in slow motion when the recorded video is played back. This avoids the problem of blurred key segments caused by frame interpolation in video editing software, thus improving the playback effect of the recorded video when played in slow motion.
[0209] It should be understood that, in this embodiment, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0210] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 109 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 109 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0211] Processor 110 may include one or more processing units; optionally, processor 110 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 110.
[0212] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described video recording method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0213] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0214] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above video recording method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0215] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0216] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the video recording method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0217] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0218] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0219] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A video recording method, characterized in that, The method includes: Using the first frame rate, video is recorded on the first subject in motion to obtain at least one image frame; Based on the first image frame of the at least one image frame captured during the video recording process, determine the first pose information of the first subject in the first image frame; Based on the first pose information, a first score of the first image frame is determined. The first score is used to characterize the importance of the motion action corresponding to the first image frame in the motion process of the first photographed object. If the first score is greater than the first threshold, a second frame rate is used to record video of the first subject in motion, wherein the second frame rate is greater than the first frame rate.
2. The method according to claim 1, characterized in that, Determining the first pose information of the first subject in the first image frame based on the first image frame acquired during the video recording process includes: Based on the motion type corresponding to the first photographed object, at least one key body part of the first photographed object in the first image frame that corresponds to the motion type is determined. Based on the position information of at least one key body part of the first photographed object in the first image frame, the first pose information is determined. The first pose information includes at least one of the following: the included angle value formed by the line connecting the at least one key body part, and the distance between the at least one key body part and the ground baseline.
3. The method according to claim 1, characterized in that, After recording video of the first moving subject at the second frame rate, the method further includes: Based on the second image frame captured during video recording, the second pose information of the first shooting object is determined; Based on the second pose information, a second score of the second image frame is determined. The second score is used to characterize the importance of the motion action corresponding to the second image frame in the motion process of the first photographed object. If the second score is less than or equal to the second threshold, every first cycle, the frame rate of video recording is lowered according to the first step length, and the video is recorded on the first subject using the lowered frame rate.
4. The method according to claim 3, characterized in that, Before lowering the video recording frame rate according to the first step length every first cycle, the method further includes: The scores of the two adjacent image frames preceding the second image frame are obtained. The score of each image frame is used to characterize the importance of the motion action corresponding to the image frame in the motion process of the first photographed object. The first step length is determined based on the difference in scores between the two preceding adjacent image frames, and the first step length is positively correlated with the difference.
5. The method according to claim 1, characterized in that, The method further includes: If the first score is greater than the first threshold, the acquisition time information of the first image frame is recorded; After the video recording is completed, a first index is generated based on the acquisition time information of the first image frame, and the first index is written into the metadata of the first video obtained from the video recording. The first index is used to locate the first image frame in the first video.
6. A video recording device, characterized in that, The device includes: a processing module; The processing module is configured to record video of a first moving object at a first frame rate, obtaining at least one image frame; and Based on the first image frame from the at least one image frame captured during the video recording process, determine the first pose information of the first photographed object in the first image frame; and... Based on the first pose information, a first score is determined for the first image frame, whereby the first score characterizes the importance of the motion action corresponding to the first image frame in the motion process of the first photographed object; and... If the first score is greater than the first threshold, a second frame rate is used to record video of the first subject in motion, wherein the second frame rate is greater than the first frame rate.
7. The apparatus according to claim 6, characterized in that, The processing module is specifically used for: Based on the motion type corresponding to the first photographed object, at least one key body part of the first photographed object in the first image frame that corresponds to the motion type is determined. Based on the position information of at least one key body part of the first photographed object in the first image frame, the first pose information is determined. The first pose information includes at least one of the following: the included angle value formed by the line connecting the at least one key body part, and the distance between the at least one key body part and the ground baseline.
8. The apparatus according to claim 6, characterized in that, The processing module is further configured to determine the second pose information of the first subject based on the second image frame acquired during the video recording process after the first subject in motion is recorded at the second frame rate. as well as, Based on the second pose information, a second score of the second image frame is determined. The second score is used to characterize the importance of the motion action corresponding to the second image frame in the motion process of the first photographed object. as well as, If the second score is less than or equal to the second threshold, every first cycle, the frame rate of video recording is lowered according to the first step length, and the video is recorded on the first subject using the lowered frame rate.
9. The apparatus according to claim 8, characterized in that, The processing module is also used to obtain the scores of the two adjacent image frames before the second image frame every first cycle, before lowering the frame rate of video recording according to the first step length. The score of each image frame is used to characterize the importance of the motion action corresponding to the image frame in the motion process of the first shooting object. as well as, The first step length is determined based on the difference in scores between the two preceding adjacent image frames, and the first step length is positively correlated with the difference.
10. The apparatus according to claim 6, characterized in that, The processing module is also used to record the acquisition time information of the first image frame when the first score is greater than the first threshold. as well as, After the video recording is completed, a first index is generated based on the acquisition time information of the first image frame, and the first index is written into the metadata of the first video obtained from the video recording. The first index is used to locate the first image frame in the first video.