WO2023284591A1 - Video capture method and apparatus, electronic device, and storage medium - Google Patents

Video capture method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2023284591A1
WO2023284591A1 PCT/CN2022/103943 CN2022103943W WO2023284591A1 WO 2023284591 A1 WO2023284591 A1 WO 2023284591A1 CN 2022103943 W CN2022103943 W CN 2022103943W WO 2023284591 A1 WO2023284591 A1 WO 2023284591A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
electronic device
shaking
data
parameters
Prior art date
Application number
PCT/CN2022/103943
Other languages
French (fr)
Chinese (zh)
Inventor
张羽翕
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023284591A1 publication Critical patent/WO2023284591A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2621Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72433User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for voice messaging, e.g. dictaphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects

Definitions

  • the present invention relates to the technical field of intelligent terminals, in particular to a video shooting method and device, electronic equipment and a storage medium.
  • FIG. 1A to 1D show the current user's operation process of making a short video with shaking effects.
  • the user needs to use the camera function of the mobile phone to shoot a video first; after the video shooting is completed, the user opens the application program for making a short video installed on the mobile phone, opens the interface shown in Figure 1B, and clicks the Add Video button 101 'add the recorded video; afterward, the user clicks the special effect button 102' in the opened video processing interface shown in Figure 1C to enter the interface shown in Figure 1D, and the user presses the shake special effect button 103 on the interface shown in Figure 1D 'A jitter effect can be added to the video, and the visual effect of the jitter effect is shown in Figure 1D.
  • the above-mentioned process can produce a short video with shaking effects
  • the above-mentioned process is the post-production of the video, that is, the process of editing the video after shooting the video.
  • This post-production method To a large extent, it needs to rely on the personal ability of the creator (that is, the user who made the short video mentioned above).
  • Embodiments of the present application provide a video shooting method and device, electronic equipment, and a storage medium, by determining the shaking parameters used to control the shaking effect of the video based on the collected video data during the shooting of the video, and then based on the determined shaking Parameter shooting or processing while shooting to obtain a video with shaking effects, wherein the video data collected in the process of shooting video includes audio data and/or image data, and the present application can extract the audio feature value and/or Extract the change feature value of the focus object corresponding to the image data to determine the matching shake parameters, so as to obtain a video with shake special effects.
  • the shaking special effects presented in the video obtained by the video shooting method provided in the present application can highly match the video content and the emotion of the shooter, and the user does not need to spend a lot of time on the post-processing of the video, which is conducive to improving user experience.
  • an embodiment of the present application provides a video shooting method, which is applied to an electronic device, and the method includes: the electronic device acquires first data, and the first data includes first audio data and/or first image data; the electronic device The shake parameter is determined based on the first data; the electronic device generates second data based on the shake parameter, and the second data is video data; the second data generated by the electronic device based on the shake parameter is specifically: a second video shot based on the shake parameter, or, electronic The device shoots the second video, and processes the second video to obtain a third video according to the dithering parameter.
  • the electronic device can collect the first audio data and/or the first image data as the first data when shooting a video, and then determine the shaking parameters used to control the degree or effect of the shaking special effect according to the collected first data, and the electronic device can then Shooting according to the determined shake parameters to obtain a second video with a shake special effect, or performing shake processing on the captured second video according to the shake parameters to obtain a third video with a shake special effect.
  • the electronic device when the electronic device is a mobile phone, when the mobile phone runs the camera application to shoot video, it can collect audio data through a microphone, that is, the above-mentioned first audio data that constitutes the first data, or collect image data through a camera, that is, the above-mentioned first data that constitutes
  • the mobile phone responds to the user's operation or detects that the collected audio data and/or image data meet the conditions for shooting a shaking video
  • the mobile phone can determine the shaking parameters according to the collected audio data and/or image data, and A shaking video is shot based on the shaking parameter, or a video with a shaking special effect is obtained by performing shaking processing on the shot video.
  • the above method further includes: when the first audio data satisfies the first preset condition; and/or the first image data satisfies the second preset condition, the electronic device based on The first data determine dither parameters.
  • the electronic device presets the first preset condition for judging whether the first audio data satisfies the conditions for shooting a jittery video, such as the jitter trigger condition that the audio characteristic value described in the embodiment below needs to satisfy, wherein,
  • the audio feature value can be obtained based on the first audio data extraction;
  • the electronic device can also preset a second preset condition for judging whether the first image data meets the conditions for shooting a shaking video, the second preset condition is, for example, the following implementation
  • the jitter trigger conditions that need to be satisfied by the feature value of the focus object change described in the example, wherein the feature value of the focus object change can be obtained based on the first image data extraction, and the feature value of the focus object change can be the focus data described in the following embodiments .
  • the electronics can determine corresponding dither parameters.
  • the first audio data satisfies the first preset condition, including at least one of the following: the sampling rate of the first audio data is greater than the preset sampling rate threshold; the first audio data The frequency of the first audio data is greater than or equal to the preset frequency threshold; the loudness of the first audio data is greater than or equal to the loudness threshold.
  • the audio feature value corresponding to the first audio data may be feature values such as audio sampling rate, frequency, loudness, etc., when the sampling rate is greater than the preset sampling rate threshold, and/or the frequency is greater than or equal to the preset frequency threshold, and/or When the loudness is greater than or equal to the loudness threshold, it can be determined that the first audio data collected by the electronic device satisfies the first preset condition, for example, in the following embodiments, the audio sampling rate corresponding to the audio data collected when the mobile phone shoots a video When it is greater than the preset sampling rate threshold in the mobile phone, and/or the frequency is greater than or equal to the preset frequency threshold in the mobile phone, and/or the loudness is greater than or equal to the loudness threshold in the mobile phone, it can be determined that the audio data collected by the mobile phone meets the corresponding requirements.
  • the jitter trigger condition when it is greater than the preset sampling rate threshold in the mobile phone, and/or the frequency is greater than or equal to the preset frequency threshold in the mobile phone,
  • the image data satisfies the second preset condition, including at least one of the following: the displacement of the focus object in the first image data is greater than or equal to the preset displacement threshold; the first image The movement frequency of the focus object in the data is greater than or equal to a preset frequency threshold; the change value of the contour size of the focus object in the first image data is greater than or equal to a preset change value threshold.
  • the characteristic value of the focus object change corresponding to the first image data may be the characteristic values such as the displacement size, movement frequency, and contour size change value of the focus object in the first image data.
  • the displacement of the focus object in the first image data is greater than or equal to
  • the preset displacement threshold, and/or the movement frequency is greater than or equal to the preset frequency threshold, and/or the contour size change value is greater than or equal to the preset change value threshold, it can be determined that the first image data collected by the electronic device satisfies the first preset conditions.
  • the displacement in the focus object change characteristic value (focus data) corresponding to the image data collected when the mobile phone shoots a video is greater than or equal to the preset displacement threshold in the mobile phone, and/or the movement frequency is greater than or equal to
  • the preset frequency threshold and/or the change value of the outline size in the mobile phone is greater than or equal to the preset change value threshold in the mobile phone, it can be determined that the image data collected by the mobile phone satisfies the corresponding shaking trigger condition.
  • the electronic device includes a preset correspondence between audio data and/or image data and shaking parameters, and the electronic device determines the shaking parameter based on the first data, including: A dithering parameter matching the first audio data and/or the first image data is selected from the preset corresponding relationship.
  • the correspondence between various audio data and/or image data and shaking parameters is preset in the electronic device, and the electronic device can first find the matching preset Assuming corresponding audio data and/or image data in the corresponding relationship, and then determining the shaking parameter corresponding to the collected first audio data and/or first image data according to the above corresponding relationship.
  • the correspondence between the preset audio data and/or image data and the shaking parameters in the electronic device may be the correspondence between the audio feature value corresponding to the audio data and the shaking parameters, and/or the corresponding relationship between the image data
  • the correspondence between the audio characteristic value and the shaking parameter can be the corresponding relationship between a certain audio characteristic value and the shaking parameter, or it can be multiple
  • the corresponding relationship between the combination parameter of the audio feature value and the shaking parameter, the corresponding relationship between the changing characteristic value of the focus object and the shaking parameter can be the corresponding relationship between the changing characteristic value of a certain focus object and the shaking parameter, or can be It is the corresponding relationship between the combination parameter of the variation characteristic value of multiple focus objects and the dithering parameter, which is not limited here.
  • the electronic device includes multiple motors, and the multiple motors include motors in the camera module of the electronic device; and the shaking parameter includes a vibration parameter of at least one of the multiple motors .
  • the vibration parameters of the motor include at least one of vibration direction, vibration amplitude and vibration frequency.
  • the second video shot based on the shaking parameters includes: the electronic device controls the motor to vibrate based on the vibration parameters of the motor and shoots to obtain the second video.
  • multiple motors can be installed in the electronic device.
  • a motor for generating vibration prompt information can be installed in the mobile phone, and a motor installed in the camera module for controlling lens displacement or shaking can also be installed.
  • the vibration parameters determined by the above-mentioned electronic device based on the first data may include vibration parameters of any one or more motors in the electronic device, including vibration direction, vibration amplitude, and vibration frequency used to control the vibration speed of the motor, etc., and the electronic device may be based on The vibration parameter controls the vibration of the corresponding motor, so that the electronic device shakes or the lens of the electronic device shakes to shoot a second video with a shaking special effect.
  • the electronic device includes an optical anti-shake module
  • the shake parameter includes a lens shake parameter in the optical anti-shake module.
  • the lens shake parameter includes at least one item of shake displacement, shake direction, and shake frequency during the lens shake process.
  • the second video shot based on the shaking parameters includes: the electronic device turns off the anti-shaking function of the optical anti-shake module, and based on the lens shaking parameters, the optical anti-shake module controls the lens shaking to obtain the second video.
  • the shake parameter determined by the electronic device based on the first data may be related parameters corresponding to the optical anti-shake module of the electronic device, for example, the lens shake parameter in the optical anti-shake module, including the shake displacement used to control the degree of lens shake The size, the shaking frequency used to control the shaking speed of the lens, and the shaking direction, etc., so that the electronic device can control the lens through the optical anti-shake module to generate corresponding shaking according to the determined lens shaking parameters, and obtain a second image with shaking special effects. video.
  • the shake parameter further includes: a change parameter of the second image data collected when the electronic device shoots the second video; or a change parameter in the second image data collected when the electronic device shoots the second video
  • the change parameter of the focus object includes at least one item of scaling, displacement, moving direction, moving speed, and moving frequency.
  • the electronic device shoots the second video, and processes the second video according to the shaking parameters to obtain a third video, including any of the following: the electronic device shoots the second video, and processes the second video according to the change parameters of the second image data to obtain The third video: the electronic device shoots the second video, and processes the second video according to the change parameters of the focus object in the second image data to obtain the third video.
  • the shake parameter determined by the electronic device based on the first data may be a change parameter of the second image data in the second video to be shot, or a change parameter of the focus object extracted based on the second image data, for example, including The zoom ratio, displacement, moving direction, moving speed, moving frequency, etc. of the second image or the focus object in the second image, so that the electronic device can adjust the second image in the captured second video according to the determined change parameters.
  • the second image data is dithered to obtain a second video with a dithering effect.
  • the mobile phone can use the image sensor to perform processing such as zooming and moving on the image collected during the shooting process, or perform processing such as zooming and moving on the focus object in the image collected during the shooting process, so as to obtain a shaking effect video.
  • the video shooting interface of the electronic device includes a shaking mode control
  • the method further includes: in response to a user's operation on the shaking mode control, the electronic device generates second data based on shaking parameters.
  • the video shooting interface of the electronic device can be provided with a shaking mode control to control whether to shoot a video with shaking effects, and the user can click the control to turn on or off the shaking mode, and the control can be set at any position on the video shooting interface of the electronic device , without limitation here.
  • the electronic device can determine the shaking parameters according to the audio data and/or image data collected when shooting a video and shoot a video with shaking effects; when the shaking mode is turned off, even if the electronic device The collected audio data and/or image data can be matched to the corresponding shaking parameters, or meet the corresponding preset conditions. At this time, the electronic device will not shoot or generate the second video with shaking effects.
  • a shake mode check button is set, and the user clicks the button to complete the check, and the mobile phone can enter the shake shooting mode , in this mode, when the audio characteristic value corresponding to the audio data collected by the mobile phone and/or the focus object change characteristic value corresponding to the collected image data meet the shaking trigger condition, the mobile phone can control the motor according to the determined shaking parameters Vibration, or control camera shaking etc.
  • the above-mentioned shaking mode control can also be in the mode menu bar of the video shooting interface
  • the shaking shooting option the user slides left and right in the mode menu bar displayed on the mobile phone to select the shaking shooting option, and then enters the shaking shooting mode, which will not be repeated here.
  • the method further includes: when detecting that the current shooting scene is a preset scene, the electronic device generates the second data based on the shake parameter.
  • the electronic device can preset some scenes suitable for collecting jitter effects to express the video content or the emotion of the photographer, such as the more enthusiastic concert scene, sports competition scene, hip-hop competition scene, etc.
  • the electronic device detects that the current location is When the scene is a preset scene, it can automatically enter the shaking shooting mode.
  • the mobile phone can judge according to whether the audio data collected by the microphone and/or the image data collected by the camera match the audio data characteristics and/or image data characteristics corresponding to the preset scenes such as concerts, sports competitions, hip-hop competitions, etc. Whether the current scene is a preset scene, if a preset scene can be matched, the camera application running on the mobile phone will automatically enter the shaking shooting mode.
  • the electronic device generating the second data based on the shaking parameter further includes: the electronic device adding a sound effect beat or a music segment that matches the content of the second data.
  • the electronic device can simultaneously add a sound effect beat or a music clip that matches the shaking effect, for example, the audio beat is " ⁇ " or "Zi ⁇ Nourish ⁇ Nourish” and other special effects.
  • an embodiment of the present application provides a video shooting method, the method comprising: the second electronic device acquires first data, the first data being first audio data and/or first image data; the second electronic device based on The first data determines the shake parameter; the second electronic device sends the shake parameter to the first electronic device; the first electronic device shoots the second video based on the shake parameter, or the first electronic device shoots the second video and processes the second video according to the shake parameter Get the third video.
  • the video shooting method of the present application can be jointly executed by distributed multiple devices, wherein one electronic device (the second electronic device) collects the first data including the first audio data and/or the first image data, and based on the first The data determines the shaking parameters, and the electronic device sends the determined shaking parameters to another electronic device (the first electronic device) to shoot a second video with shaking effects, or process the captured second video to obtain a first shaking effect.
  • one electronic device the second electronic device
  • the electronic device collects the first data including the first audio data and/or the first image data
  • the data determines the shaking parameters
  • the electronic device sends the determined shaking parameters to another electronic device (the first electronic device) to shoot a second video with shaking effects, or process the captured second video to obtain a first shaking effect.
  • the user's mobile phone is interconnected with the bracelet, and the bracelet is used to collect first data including the first audio data and/or first image data, and send the shaking parameters determined based on the first data to the mobile phone, and the mobile phone then receives Shoot a second video with a shaking effect based on the obtained shaking parameters, or obtain a third video with a shaking effect from the captured second video.
  • the second electronic device includes a preset correspondence between audio data and/or image data and shaking parameters, and the second electronic device determines the shaking parameters based on the first data, including : The first electronic device selects a shaking parameter matching the first audio data and/or the first image data from preset correspondences.
  • the second electronic device used to determine the shaking parameters is preset with a preset correspondence between the audio data and/or image data and the shaking parameters, and the second electronic device can find a corresponding relationship with the collected data from the preset correspondence.
  • the jitter parameters corresponding to the first data are sent to the first electronic device.
  • the wristband is preset with a preset correspondence between audio data and/or image data and shaking parameters.
  • the wristband can collect the first data and determine the shaking based on the first data. Parameters are sent to the phone.
  • the wristband can also send the collected first data to the mobile phone for processing, and the mobile phone can preset audio data and/or image data and shaking parameters from the mobile phone based on the received first data.
  • the jitter parameters that match the first data are determined in the corresponding relationship between them, which is not limited here.
  • the shaking parameters include at least one of the following: vibration parameters of at least one of the multiple motors in the first electronic device, and the multiple motors include the vibration parameters of the first electronic device.
  • the vibration parameter of the motor includes at least one item of vibration direction, vibration amplitude, and vibration frequency;
  • the lens shake parameter includes at least one item of shake displacement, shake direction, and shake speed during the lens shake process.
  • the first electronic device shoots the second video based on the shaking parameters, including at least one of the following: the first electronic device controls the motor to vibrate and shoots the second video based on the vibration parameters of the motor.
  • the shaking parameters further include: a change parameter of the second image data collected when the first electronic device shoots the second video; or a change parameter of the second image data collected when the first electronic device shoots the second video.
  • Variation parameters of the focus object in the image data The change parameter of the second image data or the change parameter of the focus object in the second image data includes at least one item of scaling, displacement, moving direction, moving speed, and moving frequency.
  • the first electronic device shoots the second video, and processes the second video according to the shaking parameters to obtain the third video, including any of the following: the first electronic device shoots the second video video, and process the second video according to the change parameters of the second image data to obtain the third video; the first electronic device shoots the second video, and process the second video according to the change parameters of the focus object in the second image data to obtain the third video .
  • an embodiment of the present application provides a video shooting method, the method includes: the second electronic device acquires first data, the first data includes audio data and/or image data focus object change feature values; the second electronic device The shake parameter is determined based on the first data; the second electronic device obtains the second data shot by the first electronic device, and processes the second data according to the shake parameter to obtain a third video.
  • the first electronic device can shoot the video, but the second electronic device collects the first data, determines the shaking parameters, and controls the first electronic device according to the shaking parameters.
  • the video captured by the device is subjected to shaking processing to obtain a third video with a shaking special effect.
  • the wristband determines the shaking parameters according to the collected first data
  • the second video data captured by the mobile phone is also sent to the wristband, and the mobile phone is based on the determined shaking parameters.
  • the second video is processed with parameters to obtain a third video with a shaking effect.
  • the wristband can be configured with chips or processors with higher computing performance and audio and image processing capabilities, without limitation here.
  • the embodiment of the present application provides an electronic device, including: one or more processors; one or more memories; one or more memories storing one or more programs, when the one or more programs are When executed by one or more processors, the electronic device is made to execute the above video shooting method.
  • the embodiment of the present application provides a computer storage medium, where instructions are stored on the storage medium, and when the instructions are executed on the computer, the computer executes the above video shooting method.
  • an embodiment of the present application provides a computer program product, including a computer program/instruction, and when the computer program/instruction is executed by a processor, the above video shooting method is realized.
  • the embodiment of the present application provides a video shooting device, the device includes: a data acquisition module, configured to acquire first data, the first data includes first audio data and/or first image data; shake parameter generation A module for obtaining the first data collected by the data acquisition module, and determining a shaking parameter based on the first data; a shaking video generation module for obtaining the shaking parameters determined by the shaking parameter generation module, and shooting a second video based on the shaking parameters, Or, after shooting the second video, process the second video according to the shaking parameters to obtain the third video.
  • a data acquisition module configured to acquire first data
  • the first data includes first audio data and/or first image data
  • shake parameter generation A module for obtaining the first data collected by the data acquisition module, and determining a shaking parameter based on the first data
  • a shaking video generation module for obtaining the shaking parameters determined by the shaking parameter generation module, and shooting a second video based on the shaking parameters, Or, after shooting the second video, process the second video according to the shaking parameters to obtain the third video.
  • 1A to 1D are schematic diagrams of UI interfaces in the operation process of adding shaking effects to videos in the prior art.
  • FIG. 2 is a schematic diagram of various application scenarios of the video shooting method provided by the embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • FIG. 4 shows a schematic process of converting collected audio data into corresponding shaking parameters to implement adding shaking special effects provided by the embodiment of the present application.
  • FIG. 5 is a schematic diagram of the implementation flow of the video shooting method provided by the embodiment of the present application.
  • 6A to 6C are schematic diagrams of UI interfaces for entering the shake shooting mode provided by the embodiment of the present application.
  • FIG. 7 is a schematic diagram showing the composition principle of an anti-shake system based on OIS technology.
  • FIG. 8 is a schematic diagram of the UI interface of the mobile phone 100 provided by the embodiment of the present application for displaying the completed shake special effect video and performing subsequent processing.
  • 9A to 9C are schematic diagrams of a conversion process of converting real-time audio data and/or real-time image data into corresponding dithering parameters provided by the embodiment of the present application.
  • 10A to 10D are schematic diagrams of UI interfaces corresponding to setting shaking parameters on the mobile phone 100 provided by the embodiment of the present application.
  • FIG. 11 is a schematic diagram of a display interface of a shake effect preview window provided by the embodiment of the present application.
  • 12A to 12C are schematic diagrams of shaking special effects corresponding to shooting modes with different degrees of shaking provided by the embodiment of the present application.
  • FIG. 13 is a schematic diagram of a system architecture of a mobile phone 100 involved in a video shooting process through motor vibration provided by an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of a video capture device provided by an embodiment of the present application.
  • Illustrative embodiments of the present application include, but are not limited to, video shooting methods and devices, electronic equipment, and storage media.
  • FIG. 2 shows a schematic diagram of various application scenarios of the video shooting method of the present application.
  • the scene includes an electronic device 100 for shooting video, and a variety of shooting scenes suitable for shooting special effects videos using the video shooting method of this application, including but not limited to scenes that need to capture character movements/expressions, etc. , such as sports arenas, hip-hop competitions, children's performances, etc., and scenes that need to capture sound/light effects, such as concerts or singing and dancing performances, rap performances, etc.
  • the audience records the actions, expressions, voices, etc. of the competitors or performers by shooting videos.
  • hip-hop competitions most of the competitors will make some difficult movements after certain preparatory movements.
  • the audience is usually excited when watching these difficult movements, and at the same time, they would like to add special effects such as shaking to this moment in the shot video to express their excitement.
  • the present application provides a video shooting method, which is based on the video data collected during the video shooting process, including but not limited to audio data and/or focus data, and extracting The audio feature value and/or the change feature value of the focus object, when the audio feature value and/or the change feature value of the focus object meet the shaking trigger condition, trigger the addition of a shaking effect at a time node with a high degree of fit, and the video provided by this application
  • the shooting method can also convert the corresponding shaking parameters based on the audio feature value and/or the change feature value of the focus object, so as to control parameters such as shaking amplitude and shaking frequency, so that the shaking special effect presented in the captured video highly matches the emotion of the video content .
  • the focus data may be image data about the target focus in any frame of image collected by the camera module of the electronic device, and data such as the relative position of the target focus in the frame of image.
  • the shaking effect presented in the video shot when the preset shaking trigger conditions are met can be realized through hardware shaking in the electronic device, such as through the vibration of the motor, or through the optical anti-shake module to control the lens Vibration and other methods can be used to present jitter special effects in the captured video, wherein the above-mentioned motor can be a motor in the electronic device for providing vibration prompt information, etc., or it can be a motor in the camera module of the electronic device for controlling lens displacement or shaking.
  • the motor is not limited here.
  • the detailed process of presenting the shaking special effect at the corresponding time node in the captured video through the vibration of the motor in the electronic device or the movement of the lens through the optical anti-shake module will be described in detail below. This will not be repeated here.
  • the above-mentioned jitter special effect presented in the video shot under the condition of meeting the preset jitter trigger conditions can also be realized by the processor in the electronic device controlling the operation of related algorithms, for example, the image data collected by the camera module is processed After performing image processing such as noise reduction and de-distortion, the focus data is obtained based on the processed image data.
  • the image processor can run a shaking special effect processing algorithm to perform operations such as displacement and/or scaling in the 3D direction on the relevant focus data of the extracted focus object, so that the corresponding video content is presented in the video obtained after shooting , Emotionally matched jitter effects.
  • the electronic device 100 applicable to the video shooting method of the present application includes, but is not limited to, mobile phones, cameras, tablet computers, desktop computers, notebook computers, drones and other electronic devices with shooting functions, and the electronic device 100 can also be It is a combined device such as a gimbal and a mobile phone, or a gimbal and a camera, and there is no limitation here.
  • FIG. 3 shows a schematic diagram of a hardware structure of an electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, optical image stabilization module 192 , a camera 193, a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an acceleration sensor 180C, a distance sensor 180D, a touch sensor 180E, an ambient light sensor 180F and the like.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • the processor 110 may perform feature analysis on the collected audio data and/or image data through the control of the controller, and determine whether the vibration trigger condition is met, and convert the Get the shaking parameters to control the presentation of shaking effects that highly match the video content and emotion at certain time nodes in the captured video.
  • the shaking parameters are the shaking direction, shaking amplitude, and shaking frequency corresponding to the shaking effects. parameter.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • relevant preset conditions, preset parameters, and various instruction data for implementing the video shooting method provided in the present application may be stored in the memory, which is not limited here.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 may be respectively coupled to the touch sensor 180E, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180E through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 .
  • the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (blue tooth, BT), global navigation Satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA broadband Code division multiple access
  • WCDMA wideband code division multiple access
  • time division code division multiple access time-division code division multiple access
  • TD-SCDMA time-division code division multiple access
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou navigation satellite system beidou navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Mini-LED, Micro-LED, Micro-OLED, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP for conversion into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • the camera 193 may collect image data during the process of shooting video, including collecting continuous image data including shooting focus and the like.
  • the image data collected by the camera 193 can also be used to determine the scene where the electronic device 100 is located at this time. It can be understood that several scenes can be preset on the electronic device 100, for example, the scene shown in FIG. 2 above can be preset. In the various scenes shown, the feature values corresponding to the image data in different scenes are different.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or shoot videos in various encoding formats, such as moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • the NPU is a neural-network (NN) computing processor.
  • NPU neural-network
  • the NPU can be used to identify the focus of video shooting, such as the focus person, and then obtain the image change data related to the focus person in real time, and judge whether the shaking trigger condition is satisfied based on the above real-time image change data.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the captured video with shaking effect can be saved in the external memory card connected to the external memory interface.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the internal memory 121 may store executable program codes, instructions, etc. for the electronic device 100 to execute the video shooting method of the present application.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
  • the receiver 170B also called “earpiece”, is used to convert audio electrical signals into sound signals.
  • the receiver 170B can be placed close to the human ear to listen to the voice.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
  • the microphone 170C can be used to collect real-time audio data, and the electronic device 100 can judge whether the real-time audio data meets the jitter trigger condition based on the feature analysis of the collected audio data, and then determine whether to trigger the jitter to achieve A shaking effect appears in the captured video.
  • the audio data collected by the microphone 170C can also be used to determine the scene where the electronic device 100 is located at this time. It can be understood that several scenes can be preset on the electronic device 100, for example, the scene shown in FIG. 2 above can be preset. In the various scenarios shown, the feature values corresponding to the audio data in different scenarios are different.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
  • a capacitive pressure sensor may be comprised of at least two parallel plates with conductive material.
  • the electronic device 100 determines the intensity of pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions.
  • the electronic device 100 can use the pressure sensor 180A to detect the touch position to focus, so as to select the target focus at the touch position, for example, a certain focal person, that is, the context described focus object.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100 .
  • the angular velocity of the electronic device 100 around three axes may be determined by the gyro sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, and the processor 110 calculates the distance to be compensated by the optical anti-shake module 192 according to the angle, and the optical anti-shake module 192 controls the lens to reverse The movement counteracts the shake of the electronic device 100 to achieve anti-shake.
  • the electronic device 100 when the shaking shooting mode is started when shooting a video, the electronic device 100 can be set to turn off the work of the anti-shaking system in the camera module in the anti-shaking shooting mode, for example, to suppress the execution of the anti-shaking algorithm, so as to facilitate In shooting video, the purpose of presenting shaking special effects in the captured video is achieved by controlling the vibration of the motor 191 or the motor in the camera module, or controlling the lens shake through the optical anti-shake module 192 .
  • the processor 110 can also control to send a false anti-shake command including a false compensation distance to the anti-shake system, so as to control the optical anti-shake module 192 to actively control the lens shake In this way, a shake effect is generated to achieve the purpose of presenting a shake special effect video in the captured video, which is not limited here.
  • the relevant working principles of the anti-shake system in the camera module of the electronic device 100 and the optical anti-shake module 192 will be described in detail below, and will not be repeated here.
  • the acceleration sensor 180C can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to recognize the posture of the electronic device 100, and be applied to applications such as horizontal and vertical screen switching, pedometer, etc. In the embodiment of the present application, the acceleration sensor 180C may be used to identify whether the electronic device 100 is in a portrait posture or a landscape posture when shooting a video, so as to adaptively adjust the display form of the camera shooting interface.
  • the distance sensor 180D is used to measure the distance.
  • the electronic device 100 may measure the distance by infrared or laser. In the embodiment of the present application, in a video shooting scene, the electronic device 100 may use the distance sensor 180D for distance measurement to achieve automatic and fast focusing.
  • the touch sensor 180E is also called “touch device”.
  • the touch sensor 180E may be disposed on the display screen 194, and the touch sensor 180E and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180E is used to detect a touch operation acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the ambient light sensor 180F is used to sense ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180F can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180F can also cooperate with the proximity light sensor to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the motor 191 commonly used in the electronic device 100 includes a linear motor and a rotor motor.
  • the linear motor can support precise control of vibration intensity, vibration frequency, etc., and has a strong start-stop delay performance.
  • the purpose of presenting jitter special effects in the captured video can also be achieved by controlling the vibration of a motor (such as a voice coil motor) in the camera module of the electronic device 100 , which is not limited here.
  • the following takes the mobile phone 100 as the electronic device 100 as an example to introduce the specific implementation process of the solution of the present application in detail.
  • the motor 191 shown in FIG. 3 is taken as an example in the following description, and the purpose of presenting a shaking special effect in the captured video through vibration of the motor is described.
  • FIG. 4 shows a schematic process of converting the collected audio data into corresponding shaking parameters, so as to present shaking special effects in the captured video.
  • the microphone 170C can collect real-time audio data
  • the camera 193 can collect real-time image data
  • the processor 110 or image processor of the mobile phone 100 can collect real-time audio data based on the collected images.
  • Data Extraction Focus data as described above.
  • the processor 110 may obtain the audio data collected by the microphone 170C, and run the audio data at any moment to extract audio feature values, such as audio sampling rate, frequency, loudness, etc.
  • the processor 110 can convert the extracted audio feature value into the vibration parameters of the motor 191 by running related algorithms, such as the vibration direction, vibration frequency, Parameters such as vibration amplitude and vibration duration make the linear motor vibrate to produce jitter effects.
  • the processor 110 may also convert the extracted audio feature values into lens shake parameters in the optical anti-shake module 192 by running related algorithms, for example, converting the optical anti-shake module 192 to control the lens shake process
  • the parameters such as the shaking displacement, shaking direction, shaking speed, or shaking frequency in the lens enable the optical anti-shaking module 192 to control the lens to generate a corresponding displacement to generate a special shaking effect.
  • the processor 110 may also convert the extracted audio feature value into a change parameter of a real-time image, or into a change parameter of a focus object in a real-time image by running a related algorithm, wherein the real-time image is the mobile phone 100
  • the camera 193 real-time acquisition lens can capture the overall image data of the picture
  • the focus object in the real-time image is the target focus of the lens when the camera 193 collects the image data
  • the focus object can be extracted from the real-time image, for example, by a matting algorithm to achieve, without limitation.
  • the above-mentioned change data includes the real-time image or the displacement of the focus object in the real-time image in the three-dimensional space direction (XYZ axis direction), the moving direction (including the left, right, up and down displacement changes in the XZ axis direction, and the far and near displacement changes in the Y axis direction) ), the moving speed or moving frequency, and the change of outline size and other parameters, and then control the real-time image or the corresponding displacement of the focus object in the real-time image to present a shaking effect.
  • the processor 110 can also perform feature value extraction based on other data of the video shooting scene collected by other sensing elements on the mobile phone 100, and determine whether the shaking trigger condition is met, and then initiate other functions that can generate The electronic components of the shaking special effect initiate corresponding shaking to realize, and there is no limitation here.
  • the processor 110 may also acquire the image data collected by the camera 193 and extract the focus data about the captured target focus, and then analyze the change characteristic value of the focus object in a continuous period of time based on the focus data,
  • the change characteristic value represents the change characteristics such as the displacement, jumping or body shaking of the focus person, and the change of the focus person in the picture captured by the camera 193.
  • the processor 110 can, for example, run a related algorithm for The above-mentioned focus data calculates change characteristic values, such as calculating the displacement of the focus object, the change value of the image outline size of the focus object, etc., and the processor 110 converts the calculated characteristic values into the vibration parameters of the motor 191, Either convert the lens shake parameters in the optical anti-shake module 192, or convert them into the change parameters of the focus object in the real-time image, etc., to realize the shake special effect, which is not limited here.
  • the process of extracting feature values and data conversion described above will be described in detail below, and will not be repeated here.
  • the mobile phone 100 can also extract the change characteristic value of the focus object in the focus image based on the focus data collected by the camera 193, such as the displacement, movement direction, and movement frequency of the focus object, etc. , and then convert the change characteristic value of the focus object into the vibration parameters of the above-mentioned linear motor, the lens shake parameters in the optical image stabilization module, or the change parameters of the focus object, etc., to achieve the purpose of presenting special shaking effects in the captured video.
  • This is not limited.
  • the process of converting the characteristic value based on the change of the focus object into the corresponding dithering parameter will be described in detail below and will not be repeated here.
  • FIG. 5 shows a schematic flow chart of the implementation of the video shooting method of the present application. It can be understood that each step of the process shown in FIG. 5 is executed by the mobile phone 100. Specifically, the processor 110 of the mobile phone 100 controls and executes the implementation process of the video shooting method shown in FIG. 5 through the controller.
  • the process includes the following steps:
  • the user can operate the mobile phone 100, find the camera application icon in the desktop application icons of the mobile phone 100 and click the icon, start the camera, and select the recording function to shoot a video.
  • the user interface (User Interface, UI) for the user to select the video recording function can be referred to as shown in FIG. Refer to operation 1 shown in Fig. 6A.
  • the running camera application enters a shake shooting mode.
  • the mobile phone 100 can enter the shake shooting mode in response to the user's selection operation, and can also determine whether it is suitable for using shake shooting based on the audio data collected by the microphone 170C and/or the change data of the focus object in the focus image collected by the camera 193.
  • the preset conditions of the mode to enter the shaking shooting mode can be understood that the jittering shooting mode refers to a shooting mode that can present jittering special effects at certain time nodes during video shooting.
  • the manner of making the mobile phone 100 enter the shake shooting mode may refer to FIGS. 6A to 6C .
  • the user can slide left and right in the mode menu bar 602 displayed in the mode menu bar 602 displayed on the UI interface 601 opened by running the camera application on the mobile phone 100 to select the recording option 603, refer to the operation 1 shown in Figure 6A, and click on the UI corresponding to the recording mode
  • Click the shake mode check button 605 on the interface 604 refer to the operation 2 shown in FIG. 6A, check the shake mode, and enter the shake shooting mode.
  • the mode menu bar 602 displayed on the UI interface 601 opened by running the camera application on the mobile phone 100 includes a shaking shooting option 606, and the user can slide left and right on the mode menu bar 602 displayed on the UI interface 606 to select shaking shooting Option 606, refer to operation 1 shown in FIG. 6B , to enter the shaking shooting mode.
  • some video shooting scenes suitable for enhancing emotional expression by presenting shaking special effects are preset in the mobile phone 100, such as the various scenes shown in Figure 2 above, the camera interface opened by the user on the mobile phone 100 After sliding left and right in the displayed mode menu bar 602 to select the recording option 603, during the process of shooting video, the mobile phone 100 judges based on the audio data collected by the microphone 170C and/or the change data of the focus object in the focus image collected by the camera 193.
  • the current video shooting scene is a concert scene, and it is suitable to use the shaking shooting mode to shoot video.
  • a pop-up window prompt can be displayed on the display screen 194 of the mobile phone 100, and the prompt content is, for example, "A concert scene is detected, whether to enable the shaking shooting mode?" ", referring to the pop-up window 607 shown in Figure 6C, the user can click "Open” to enter the shake shooting mode, refer to the operation 3 shown in Figure 6C. It can be understood that in the pop-up window 607 shown in FIG. 6C , the user can also click "not open” or the close button 608 in the upper right corner of the pop-up window 607 to close the pop-up window and continue to shoot video in the current shooting mode.
  • the mobile phone 100 can obtain the concert time recorded in applications such as memos and calendars, and detect whether the user opens the camera application to shoot videos within this time.
  • the mobile phone 100 detects that the user clicks on the When the camera app shoots a video, it can display a pop-up notification as shown in Figure 6C.
  • the content of the notification can be different from that shown in Figure 6C.
  • the schedule reminders that the mobile phone 100 can obtain may also be other shooting scenes that are not limited to concerts, such as hip-hop competitions, etc.
  • the displayed notice may also be in other forms and other content, which is not limited here.
  • the mobile phone 100 can also preset feature value judgment conditions, so that in the process of shooting video, the mobile phone 100 can be based on the audio data collected by the microphone 170C and/or the audio data collected by the camera 193. Extract the corresponding eigenvalues from the image change data of the focus image, and judge whether the extracted eigenvalues meet the preset conditions suitable for adopting the jitter shooting mode, thereby prompting the user to adopt the jitter shooting mode.
  • Window 607 may also use other prompting methods, which are not limited here.
  • Video data such as real-time audio data and/or image data.
  • the camera application running on the mobile phone 100 collects real-time video data, which includes but is not limited to real-time audio data collected by the microphone 170C on the mobile phone 100, real-time image data collected by the camera 193; the processing of the mobile phone 100
  • the controller 110 can acquire the real-time audio data collected by the microphone 170C and the image data collected by the camera 193 in real time, and extract focus data corresponding to the corresponding image data. It can be understood that, in the focus images acquired at different times, the position, outline size, and degree of clarity or blur of the focus object may change.
  • the processor 110 of the mobile phone 100 can extract audio feature values based on the acquired real-time audio data, for example, the sampling rate, frequency, loudness, etc. of the audio can be extracted based on the real-time audio data;
  • the focus data extracted from the real-time image data is used to calculate the relevant feature values that characterize the change characteristics of the focus object, such as the displacement of the focus object, the moving speed or frequency of the focus object, and the change value of the outline size of the focus object.
  • the sampling rate is the sampling frequency, also known as sampling speed or sampling rate, which defines the number of samples extracted from continuous audio signals and composed of discrete signals per second, which is expressed in Hertz (Hz).
  • Frequency that is, the vibration frequency of sound, represents the number of periodic audio vibrations per unit time.
  • Loudness also known as sound intensity or volume, indicates the strength of sound energy, which mainly depends on the amplitude of sound waves.
  • the loudness of sound is generally measured by sound pressure (dyne/cm2) or sound intensity (watt/cm2), and the unit of boost pressure is Pa (Pa), and the logarithmic value of its ratio to the reference sound pressure is called the sound pressure level , the unit is decibel (dB).
  • the displacement of the focus object can be determined based on, for example, the change value of the position of the focus object in focus images collected at adjacent moments.
  • the moving speed of the focus object can be determined by, for example, the moving distance of the focus image per unit time.
  • the frequency of movement of the focus object can be determined by, for example, the number of times the position of the focus image moves per unit time.
  • the change value of the image outline size of the focus object may be determined based on, for example, the change difference value of the outline size of the focus object in focus images collected at adjacent moments.
  • step 505 Based on the audio feature value and/or the focus object change feature value, determine whether a shaking trigger condition is met. If yes, execute step 506; if no, return to step 503.
  • the mobile phone 100 determines whether the shaking trigger condition for triggering shaking is met based on the audio feature value extracted in step 504 and/or the change feature value of the focus object in the focus image. It can be understood that judging whether the shaking trigger condition is met can be done in a variety of ways, as an example, it can be judged in any one of the following two ways.
  • the mobile phone 100 presets an audio feature value threshold as a judgment condition.
  • the preset audio loudness threshold in the mobile phone 100 is set to 90dB
  • the sampling rate threshold is set to 50Hz
  • the frequency threshold is set to 100Hz
  • the audio feature values extracted in the above step 504 if the audio loudness is higher than 90dB, and/ Or when the audio sampling rate is higher than 50 Hz, and/or the audio frequency is higher than 100 Hz, it may be determined that the audio feature value corresponding to the currently collected audio data satisfies the jitter trigger condition.
  • the mobile phone 100 presets a focus object change characteristic value threshold as a judgment condition. For example, the mobile phone 100 presets the displacement threshold of the focus object in the focus image as 20 mm, the movement frequency threshold of the focus object as 50 Hz, and the outline size change threshold of the focus object as 10%, then when the focus image extracted in the above step 504 In the change characteristic value of the focus object, if the displacement of the focus object is greater than 20 mm, and/or the movement frequency of the focus object is higher than 50 Hz, and/or the change value of the outline size of the focus object exceeds 10%, the currently acquired image can be determined The change characteristic value of the focus object corresponding to the data satisfies the jitter trigger condition.
  • the mobile phone 100 presets the audio feature value threshold and the focus object change feature value threshold as common judgment conditions.
  • the audio feature values and the focus object change feature values are preset in the mobile phone 100, and are comprehensively used as a judgment condition for judging whether the shaking trigger condition is met, and each feature value threshold.
  • the processor 110 of the mobile phone 100 can run a related algorithm to convert the above step 540 Convert the audio feature value extracted from and/or the change feature value of the focus object in the focus image into the vibration parameter of the motor 191, or into the lens shake parameter in the optical anti-shake module 192, or into a real-time image or focus object
  • the displacement parameters are used to control the shaking effect in subsequent steps, and the above vibration parameters or displacement parameters can be collectively referred to as shaking parameters.
  • the above shaking parameters include but not limited to shaking direction, shaking amplitude, shaking frequency and other parameters.
  • the vibration parameters may correspond to vibration parameters such as the vibration direction, vibration amplitude, and vibration frequency of the motor 191, for example, based on the audio feature values extracted from the real-time audio data in step 505 above, converted into the above vibration parameters of the motor 191.
  • the processor 110 of the mobile phone 100 can control the motor 191 to initiate a corresponding vibration corresponding to the vibration parameter based on the vibration parameter of the motor 191. At this time, the mobile phone 100 drives the camera module to vibrate with the vibration of the motor 191.
  • the camera module Because the vibration cannot be focused, the captured video will appear as a jittering special effect of the focus object with effects such as displacement and ghosting.
  • the focus data may also be extracted based on the real-time image data in step 505 and the calculated change characteristic value of the focus object may be converted into the above vibration parameters of the motor 191 , which is not limited here.
  • the processor 110 of the mobile phone 100 can control to turn off the anti-shake function of the anti-shake system corresponding to the camera module, so that the vibration of the above-mentioned motor 191 can present an obvious shaking effect in the captured video.
  • the above shaking parameters may also correspond to the vibration parameters of the motor in the camera module, which will not be repeated here.
  • the above shake parameters may also correspond to compensation parameters such as the displacement, direction, speed, or frequency of the optical image stabilization module 192 to control the lens to perform compensation, for example, based on the real-time audio data extracted in step 505 above.
  • the audio characteristic value is converted into the above-mentioned displacement parameter in the optical anti-shake module 192 .
  • the mobile phone 100 can be set to turn off the anti-shaking system in the camera module in the anti-shaking shooting mode, and the processor 110 of the mobile phone 100 is based on the calculated
  • the lens shake parameter in 192 controls the lens to vibrate accordingly.
  • the camera module cannot focus due to the vibration, so in the captured video screen, the focus object has a shaking effect such as displacement and ghosting.
  • the focus data can also be extracted based on the real-time image data in step 505 above, and the calculated change characteristic value of the focus object can be converted into the above displacement parameters in the optical anti-shake module 192, which is not limited here. .
  • the anti-shake system of the mobile phone 100 may be, for example, an anti-shake system based on Optical Image Stabilization (OIS) technology.
  • OIS Optical Image Stabilization
  • Anti-shake wherein, the principle of anti-shake based on the OIS system is shown in FIG. 7 , when the mobile phone 100 moves during lens exposure, the image sensor is used to sense light and convert the light signal into an analog image signal, and convert the analog image After being converted into a data image, it is sent to the image processor for processing.
  • the OIS controller reads the data of the gyroscope sensor 180B to obtain the motion data of the mobile phone.
  • the OIS controller drives the X-axis OIS motor to move the lens in the X-axis direction according to the motion data.
  • the X-axis Hall sensor detects the movement of the lens in the X-axis direction
  • the Y-axis Hall sensor detects the movement of the lens in the Y-axis direction
  • the Y-axis Hall sensor transmits the real-time position of the lens moving in the Y-axis direction to the OIS control
  • the OIS controller continues to move the lens according to the new lens position and the new motion data acquired by the gyroscope sensor 180B, so that the closed-loop anti-shake control can be realized continuously. I won't repeat them here.
  • the above shaking parameters may also correspond to parameters such as the displacement, moving direction, moving speed or moving frequency of the focus object, screen brightness, screen filter, etc., for example, based on the audio feature value extracted from the real-time audio data in step 505 above.
  • the processor 110 or the image signal processor (Image Signal Processor, ISP) of the mobile phone 100 processes the real-time image or the change parameter in the real-time image based on the above-mentioned change parameter
  • the focus object produces a shaking effect such as zooming or moving.
  • the focus data can also be extracted based on the real-time image data in step 505 above, and the calculated characteristic value of the focus object can be converted into a real-time image or a change parameter of the focus object in the real-time image, which is not done here. limit.
  • different brightness values or filter values can be corresponding to different brightness values or filter values according to the obtained audio feature value and/or the change feature value of the focus object, so that the picture presents a shaking effect.
  • the processor 110 controls the motor based on the shaking parameter of the motor 191 obtained in step 506 above. 191 generates corresponding vibrations; or the processor 110 drives the optical anti-shake module 192 to control the lens to generate corresponding displacement based on the corresponding shake parameters of the optical anti-shake module 192 obtained in the above step 506; or the processor 110 in the mobile phone 100 or the ISP based on
  • the real-time image or the shaking parameters of the focus object in the real-time image obtained in the above step 506 runs the corresponding image processing algorithm to control the real-time image or focus object to generate real-time scaling, displacement or screen brightness value changes to present shaking effects.
  • the processor 110 of the mobile phone 100 controls the presentation of shaking effects at certain time nodes in the video, it can determine whether to add a sound effect beat or music to the shaking special effects presented at a certain time node based on the above-mentioned audio characteristic value. Fragments, in order to present better jitter effects in conjunction with the corresponding screen jitter.
  • the live music of the video or the collected audio has a strong sense of rhythm
  • it is also more suitable for presenting shaking special effects in conjunction with the shaking of the picture, for example, when shooting a video of a rap performance or shooting some singing
  • the rhythm of the background music is already very strong.
  • it is not necessary to add corresponding sound effect beats to the shaking of the screen to present the shaking special effect, and there is no limitation here.
  • the processor 110 of the mobile phone 100 controls the duration of presenting the shaking special effect at certain time nodes in the video, which can be determined based on the change of the corresponding audio feature value of the real-time audio data, that is, the audio feature value corresponding to the real-time audio data satisfies the shaking trigger.
  • the vibration effect is triggered at the moment of the condition, and the audio characteristic value corresponding to the real-time audio data does not meet the vibration trigger condition to stop the vibration effect; in other embodiments, it is also possible to set a fixed duration for the vibration effect triggered each time the vibration trigger condition is met.
  • a control for controlling the duration of the shaking effect can also be set on the video shooting interface of the camera application, for example, when the user shoots a video in the shaking shooting mode, when the When the shaking trigger condition, the user can press and hold the control to present the shaking special effect within a certain time node or time period, and the duration of pressing the control is the presentation duration of the corresponding shaking special effect; in other embodiments, the triggering of the shaking special effect and Suspension or termination can also adopt other forms of rules, which are not limited here.
  • the video shooting interface of the mobile phone 100 displays the completed shake special effect video
  • the user can further share, save or edit the completed shake special effect video on the interface of the mobile phone 100 displaying the shake special effect video For example, as shown in FIG.
  • the user can click the share button 802 on the interface 801 where the mobile phone 100 displays the completed shaking special effect video to share the shaking special effect video to the circle of friends or share it with friends; Click the save button 803 on the interface 801 to save the shaking special effect video to the local gallery; the user can also click the edit button 804 to further edit the completed shaking special effect video, such as adding filter effects, clipping video length, deleting the shaking special effect Part or all of the shaking special effects and other processing in the video, the user can also click the delete button 805 to delete the video, and there is no limitation here.
  • the audio feature value and/or the change feature value of the focus object in step 503 above can be collected by other electronic devices, such as a speaker in a watch.
  • the watch collects audio data and processes the audio feature value, it can The collected audio data or the processed audio feature values are sent to the mobile phone 100, and the mobile phone 100 generates the shaking parameters accordingly.
  • the watch can also process the audio data by itself according to the collected audio data or the processed audio feature values And generate a shaking parameter, and then send the shaking parameter to the mobile phone 100, and the mobile phone 100 continues to execute subsequent steps 504 to 507 based on the corresponding shaking parameter.
  • the video captured by the mobile phone 100 can also be sent to the watch for shaking processing, that is, the watch generates corresponding shaking parameters according to the audio data collected by the speaker, and performs shaking processing on the video sent by the mobile phone 100 to obtain
  • the video with special shaking effects is then sent to the mobile phone 100, and the mobile phone displays it to the user, or the watch processes the video with special shaking effects and then directly displays it to the user.
  • the microphone 170C collects live audio to generate audio data.
  • the processor 110 of the mobile phone 100 analyzes the audio data and extracts the obtained Audio feature value, when the audio feature value meets the shaking trigger condition, the processor 110 converts the obtained audio feature value into a vibration parameter (ie, a shaking parameter) of the motor 191, for example, the converted shaking parameter of the motor 191 includes a shaking amplitude of 2mm , Jitter frequency 30Hz.
  • the vibration of the motor 191 can drive the lens of the mobile phone 100 and the camera 193 to vibrate so as to realize the above-mentioned jitter effect.
  • the lens of the camera 193 cannot focus, which will cause the imaging picture of the camera application to vibrate and lose focus.
  • the shaking effect refer to the following figure 12A.
  • the microphone 170C collects the audio of the scene to generate audio data.
  • the processor 110 of the mobile phone 100 analyzes the above audio data to extract The audio feature value is obtained, and when the audio feature value satisfies the shaking trigger condition, the processor 110 converts the obtained audio feature value into lens shake parameters (ie, shake parameters) in the optical anti-shake module 192, such as the converted optical anti-shake
  • the lens shaking parameters in the shaking module group 192 include a shaking amplitude of 5 mm and a shaking frequency of 50 Hz.
  • the optical anti-shake module 192 can control the lens shake to achieve the above-mentioned shaking effects.
  • the lens of the camera 193 cannot focus, which will cause the imaging picture of the camera application to shake and lose focus.
  • For the shaking effect refer to the following figure 10B.
  • the processor 110 of the mobile phone 100 analyzes the above focus data and extracts the feature value of the focus object change.
  • the processor 110 converts the obtained feature value of the focus object change into a real-time image or a real-time image
  • the shaking parameters of the focus object that is, the above-mentioned change parameters, for example, the converted real-time image or the shaking parameters of the focus object in the real-time image include a shake amplitude of 10mm (for example, the upper limit of the displacement of the focus object in the XYZ axis direction is 10mm or the focus object
  • the upper limit of the change value of the outline size is 10 mm
  • the shaking frequency is 50 Hz (for example, the frequency of the displacement change of the focus object or the change frequency of the outline size).
  • the image processor or ISP on the mobile phone 100 can execute an image processing algorithm to control the focus object in the real-time image to perform real-time scaling or displacement according to the above-mentioned change parameters to generate a shaking effect.
  • the presentation form of the shaking effect can refer to the above-mentioned FIG. 1D
  • the presentation form of the jitter special effect is shown, and will not be repeated here.
  • the image processing algorithm for presenting the shaking effect can be performed after the image processor or ISP on the mobile phone 100 performs noise reduction, distortion correction or automatic filter processing on the image data collected by the camera 193, so as not to affect the original image The data must be saved.
  • the image processor or ISP executes the image processing algorithm to control the real-time image or extract the focus object in the real-time image for zooming or moving to present the shaking special effect
  • the user completes the video shooting and then generates Videos with jittery effects may experience long processing delays.
  • the above-mentioned process of controlling the real-time image or the focus object in the real-time image to produce zoom or displacement changes through the image processing algorithm to generate the shaking special effect does not involve the shaking process of any electronic components in the mobile phone 100 that affect the imaging of the camera application.
  • the jitter effect generated in the camera application will only cause jitter in the imaging screen of the camera application, such as real-time image zooming or displacement to produce jitter special effects, or focus object zooming or displacement in real-time images to produce jitter special effects, etc. This process will not affect the focus of the lens. Therefore, there will be no out-of-focus effects such as ghost images.
  • the special effects video shooting solution provided by the present application is based on the conversion of the audio feature value and/or the change feature value of the focus object in the focus image to obtain the shaking parameters, including but not limited to the conversion forms shown in FIGS. 9A to 9C above, for example, It may include a conversion form based on the change characteristic value of the focus object into the shake parameter of the motor 191, etc., which is not limited here.
  • the transformation form adopted in the special effect video shooting solution provided by the present application may be any one or a combination of transformation forms shown in FIGS. 9A to 9C above, which is not limited here.
  • the shaking parameters can be based on the real-time audio data and/or the focus data extracted from the real-time image data, and then extract the corresponding audio feature value and/or the change feature of the focus object The value is obtained through conversion, and there will be a time delay between the time node showing the shaking effect in the captured video and the time node when the audio feature value and/or the change feature value of the focus object meets the shaking trigger condition.
  • the corresponding relationship between the audio feature value and/or the change feature value of the focus object and the shaking parameter can be preset in the mobile phone 100, and refer to the data conversion process in FIGS.
  • corresponding data conversion formulas can also be preset in the mobile phone 100 to realize the above data conversion, which will not be repeated here.
  • the mobile phone 100 may also provide the user with a shaking parameter setting interface, as shown in FIGS. 10A to 10D below.
  • FIGS. 10A to 10D show UI interfaces corresponding to the user operating the mobile phone 100 to set shaking parameters.
  • the user can run the camera application on the mobile phone 100 to enter the shake shooting mode in the UI interface 1001 displayed, click the setting button 1002 in the upper right corner, refer to the operation 4 shown in Figure 10A, and enter the setting shown in Figure 10B Interface 1003.
  • the user can click on the shaking shooting mode option 1004 on the setting interface 1003 , refer to the operation 5 shown in FIG. 10B , and call out the shaking parameter setting window 1005 shown in FIG. 10C .
  • the user can also set the conditions for enabling the shake shooting mode on the setting interface shown in FIG. 10B , such as smart activation, or activation by user authorization, etc., which will not be repeated here.
  • the user can set the shake amplitude in the shake parameter setting window 1005.
  • the check box 1051 after selecting the close option can turn off the shake shooting mode.
  • the selection box 1052 can set the shaking range to 2mm
  • the check box 1053 after selecting the 5mm option can set the shaking range to 5mm
  • the check box 1054 after selecting the 10mm option can set the shaking range to 10mm.
  • the shaking The parameter setting window 1005 may also provide options for other numerical jitter amplitudes, which are not limited here.
  • the user can also set the shaking frequency in the shaking parameter setting window 1005, for example, select the check box 1055 after the close option to turn off the shaking shooting mode, refer to the operation 7 shown in Figure 10C, and select the 30Hz option
  • the last check box 1056 can set the jitter frequency to 30 Hz
  • the check box 1057 after selecting the 50 Hz option can set the jitter amplitude to 50 Hz.
  • the jitter parameter setting window 1005 can also provide other numerical jitter frequency options , without limitation here.
  • the user can set the shaking mode in the shaking parameter setting window 1006, for example, select the check box 1061 after the close option to turn off the shaking shooting mode, refer to the operation 8 shown in Figure 10C, and select the small amplitude shaking mode option
  • the last check box 1062 can turn on the small shake shooting mode
  • the check box 1063 after selecting the shake mode option can turn on the medium shake shooting mode
  • the check box 1064 after choosing the big shake mode option can turn on the big shake
  • the shaking amplitude corresponding to the shooting mode with small shaking, the shooting mode with medium shaking and the shooting mode with large shaking increases from small to large, and/or the shaking frequency increases from low to high.
  • the user can also select the check box 1065 next to the automatic option to start the automatic shooting mode.
  • the mobile phone 100 can automatically match the above-mentioned small shaking shooting mode and medium shaking shooting mode based on the collected real-time audio data and/or focus data.
  • the process of obtaining and processing real-time audio data and/or focus data by mobile phone 100 refers to the relevant descriptions in steps 503 to 505 above, which will not be repeated here.
  • the shake special effects corresponding to the small shake shooting mode, the medium shake shooting mode, or the large shake shooting mode shown in FIG. 10D can be referred to in FIGS. 12A to 12C .
  • FIG. 12A it is a schematic diagram showing a small-scale shake special effect in a video shot in the small-scale shake shooting mode.
  • FIG. 12B it is a schematic diagram showing a medium-range shake special effect in a video captured in the medium-range shake shooting mode.
  • FIG. 12C it is a schematic diagram showing a large-scale shake special effect in a video shot in the large-scale shake shooting mode.
  • FIG. 13 shows a schematic diagram of the system architecture of the mobile phone 100 involved in the process of shooting video with special effects through motor vibration in the camera module in some embodiments of the present application.
  • the mobile phone 100 includes an APP layer 1340 , a Hal layer 1330 , a Kernel layer 1320 and a hardware layer 1310 .
  • the hardware layer 1310 includes physical devices such as the microphone 170C, the register 11, the encoding module 12, the focusing coil 13, the Hall sensor 14, and the motor;
  • the Kernel layer 1320 includes the shake control module 21;
  • the Hal layer 1330 includes the selection module 31 and The image processing module 32 ;
  • the APP layer 1340 includes a camera application 41 .
  • the camera application 41 in the APP layer 1340 starts shooting video
  • the focusing coil 13 can drive the lens to move to achieve focusing
  • the Hall sensor 14 can obtain the actual position of the motor during focusing to control the position of the motor. Move to complete the focusing process.
  • the camera application 41 calls the parameter selection module 31 and the image processing module 32 in the Hal layer 1330 respectively after receiving the instruction to enter the shaking shooting mode.
  • the parameter selection module 31 obtains the collected audio data from the microphone 170C in the hardware layer 1310 and extracts corresponding audio feature values, and obtains specification parameters from the motor in the hardware layer 1310 .
  • the parameter selection module 31 determines the corresponding jitter parameters according to the above-mentioned audio feature value and specification parameters, and sends the jitter parameters to the jitter control module 21 in the Kernel layer 1320 .
  • the shake control module 21 controls the linear motor to generate vibrations that match the above shake parameters. It can be understood that the vibration of the motor causes the image image of the camera application 41 to shake. At this time, the focus coil 13 cannot focus, resulting in out-of-focus. When the motor stops vibrating, the Hall sensor 14 obtains the actual position of the motor again to control the movement of the motor, and the auxiliary focusing coil 13 completes focusing.
  • the hall sensor 14, the register 11, the encoding module 12, and the focus coil 13 are used to form a closed-loop dynamic adjustment of the imaging screen shake of the camera application caused by the motor and the focus process before and after out of focus.
  • FIG. 14 shows a schematic structural diagram of a video shooting device according to an embodiment of the present application.
  • the video shooting device 1400 includes a data collection module 1410 , a shaking parameter generating module 1420 and a shaking video generating module 1430 .
  • the data acquisition module 1410 is used to acquire video data such as real-time audio data and/or image data.
  • the specific process for the data acquisition module 1410 to acquire video data such as real-time audio data and/or image data can refer to the relevant description in the above-mentioned step 503, which will not be repeated here.
  • the shaking parameter generating module 1420 is configured to acquire video data such as audio data and/or image data collected by the data collecting module 1410, and determine shaking parameters based on the audio data and/or image data. For the specific process of determining the shaking parameters by the shaking parameter generating module 1420 based on the audio data and/or image data collected by the data collecting module 1410 , reference may be made to the relevant descriptions in the above steps 504 to 506 , which will not be repeated here.
  • Shaking video generating module 1430 configured to obtain the shaking parameters determined by shaking parameter generating module 1420, and shoot a video with shaking special effects based on the shaking parameters, or perform shaking processing on the captured video based on the shaking parameters to obtain a video with shaking special effects .
  • the shaking video generation module 1430 shoots a video with shaking effects based on the shaking parameters, or performs shaking processing on the captured video based on the shaking parameters to obtain a video with shaking effects based on the shaking parameters. Let me repeat.
  • the present disclosure also relates to means for performing operations in text.
  • This apparatus may be specially constructed for the required purposes or it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer.
  • a computer program may be stored on a computer readable medium such as, but not limited to, any type of disk including floppy disk, compact disk, CD-ROM, magneto-optical disk, read-only memory (ROM), random-access memory (RAM) , EPROM, EEPROM, magnetic or optical card, application specific integrated circuit (ASIC), or any type of medium suitable for storing electronic instructions, and each may be coupled to a computer system bus.
  • computers referred to in the specification may comprise a single processor or may be architectures involving multiple processors for increased computing power.

Abstract

The present application relates to the technical field of smart terminals, and specifically relates to a video capture method and apparatus, an electronic device, and a storage medium. The method comprises: an electronic device obtains first data, the first data comprising first audio data and/or first image data; the electronic device determines jitter parameters on the basis of the first data; the electronic device generates second data on the basis of the jitter parameters, wherein the second data is video data, and the second data generated by the electronic device on the basis of the jitter parameters is specifically: a second video captured on the basis of the jitter parameters, or a third video obtained by the electronic device capturing the second video and processing the second video according to the jitter parameters. The present application collects video data during a video capture process, and determines corresponding jitter parameters, which are used to capture or process a video which has jitter effects. The jitter effects presented by the video can closely match video content and the feelings of a photographer, and at the same time, saves a user time for post-processing the video, which helps to improve the user experience.

Description

视频拍摄方法及装置、电子设备和存储介质Video shooting method and device, electronic device and storage medium
本申请要求于2021年07月12日提交中国专利局、申请号为202110784717.X、申请名称为“视频拍摄方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110784717.X and the application name "video shooting method and device, electronic equipment and storage medium" submitted to the China Patent Office on July 12, 2021. The entire content of the application is passed References are incorporated in this application.
技术领域technical field
本发明涉及智能终端技术领域,具体涉及一种视频拍摄方法及装置、电子设备和存储介质。The present invention relates to the technical field of intelligent terminals, in particular to a video shooting method and device, electronic equipment and a storage medium.
背景技术Background technique
随着短视频类多媒体产业的蓬勃发展,短视频所呈现的各种高难度视频拍摄技术及处理技术在令人叹为观止的同时,也在不断提高着人们对这些技术的追求,例如普通用户在发布短视频时,也可能会在短视频中添加抖动等动感特效来表达视频中引人共鸣的内容。With the vigorous development of the short video multimedia industry, the various difficult video shooting technologies and processing technologies presented by the short video are amazing, and at the same time, people's pursuit of these technologies is constantly improving. For example, ordinary users are publishing When making short videos, dynamic special effects such as shaking may also be added to the short videos to express the resonant content in the videos.
图1A至的1D所示为当前用户制作一个具有抖动特效的短视频的操作过程。如图1A所示,通常用户需要使用手机的相机功能先拍摄一段视频;视频拍摄完成后,用户再打开手机上安装的制作短视频的应用程序,打开图1B所示界面,点击添加视频按钮101'添加所录制的视频;之后,用户在打开的图1C所示的视频处理界面中,点击特效按钮102',进入图1D所示界面,用户按下图1D所示界面上的抖动特效按钮103'可以为视频添加抖动特效,该抖动特效的视觉效果参考图1D所示。1A to 1D show the current user's operation process of making a short video with shaking effects. As shown in Figure 1A, usually the user needs to use the camera function of the mobile phone to shoot a video first; after the video shooting is completed, the user opens the application program for making a short video installed on the mobile phone, opens the interface shown in Figure 1B, and clicks the Add Video button 101 'add the recorded video; afterward, the user clicks the special effect button 102' in the opened video processing interface shown in Figure 1C to enter the interface shown in Figure 1D, and the user presses the shake special effect button 103 on the interface shown in Figure 1D 'A jitter effect can be added to the video, and the visual effect of the jitter effect is shown in Figure 1D.
现有技术中,上述过程虽然能够制作具有抖动特效的短视频,但是很明显地,上述过程是对视频的后期制作,即视频拍摄后再对视频进行编辑处理的过程,这种后期制作的方式在很大程序上需要依赖创作者(即上述制作短视频的用户)的个人能力,首先如果要做到抖动特效与视频中的画面以及声音实时高度匹配,难度较高;其次,后期制作能够添加的抖动效果单一,仅有放大缩小画面、或者左右上下的抖动,无法得到三维(3 Dimensions,3D)方向上拟真的画面抖动效果;另外,后期制作一般需要单独抽出时间制作,且耗时较长效率低,需要花费创作者很多时间精力。In the prior art, although the above-mentioned process can produce a short video with shaking effects, it is obvious that the above-mentioned process is the post-production of the video, that is, the process of editing the video after shooting the video. This post-production method To a large extent, it needs to rely on the personal ability of the creator (that is, the user who made the short video mentioned above). First, it is difficult to achieve a high degree of real-time matching between the shaking effect and the picture and sound in the video; secondly, post-production can add The jitter effect is single, only zooming in and out, or left and right, up and down, and it is impossible to obtain a realistic picture jitter effect in the three-dimensional (3 Dimensions, 3D) direction; in addition, post-production generally requires separate time for production, and it is time-consuming. The long-term efficiency is low, and it takes a lot of time and energy for the creator.
发明内容Contents of the invention
本申请实施例提供了一种视频拍摄方法及装置、电子设备和存储介质,通过在拍摄视频的过程中基于采集的视频数据,确定用于控制视频抖动效果的抖动参数,进而基于所确定的抖动参数拍摄或者边拍摄边处理得到具有抖动特效的视频,其中,拍摄视频的过程中所采集的视频数据包括音频数据和/或图像数据,本申请可以通过提取该音频数据中音频特征值和/或提取该图像数据所对应的焦点对象的变化特征值,来确定与之匹配的抖动参数,从而得到具有抖动特效的视频。本申请所提供的视频拍摄方法得到的视频中呈现的抖动特效效果能够与视频内容及拍摄者的情感高度匹配,并且用户不需要再花费大量时间在视频的后期处理上,利于提高用户体验。Embodiments of the present application provide a video shooting method and device, electronic equipment, and a storage medium, by determining the shaking parameters used to control the shaking effect of the video based on the collected video data during the shooting of the video, and then based on the determined shaking Parameter shooting or processing while shooting to obtain a video with shaking effects, wherein the video data collected in the process of shooting video includes audio data and/or image data, and the present application can extract the audio feature value and/or Extract the change feature value of the focus object corresponding to the image data to determine the matching shake parameters, so as to obtain a video with shake special effects. The shaking special effects presented in the video obtained by the video shooting method provided in the present application can highly match the video content and the emotion of the shooter, and the user does not need to spend a lot of time on the post-processing of the video, which is conducive to improving user experience.
第一方面,本申请实施例提供了一种视频拍摄方法,应用于电子设备,该方法包括:电子设备获取第一数据,第一数据包括第一音频数据和/或第一图像数据;电子设备基于第一数据确定抖动参数;电子设备基于抖动参数生成第二数据,第二数据为视频数据;电子设备基于抖动参数生成的第二数据具 体为:基于抖动参数拍摄的第二视频,或,电子设备拍摄第二视频,并根据抖动参数处理第二视频得到的第三视频。In a first aspect, an embodiment of the present application provides a video shooting method, which is applied to an electronic device, and the method includes: the electronic device acquires first data, and the first data includes first audio data and/or first image data; the electronic device The shake parameter is determined based on the first data; the electronic device generates second data based on the shake parameter, and the second data is video data; the second data generated by the electronic device based on the shake parameter is specifically: a second video shot based on the shake parameter, or, electronic The device shoots the second video, and processes the second video to obtain a third video according to the dithering parameter.
即电子设备可以在拍摄视频时采集第一音频数据和/或第一图像数据作为第一数据,再根据采集得到的第一数据来确定用于控制抖动特效程度或效果的抖动参数,电子设备再根据所确定的抖动参数来拍摄得到具有抖动特效的第二视频,或者根据抖动参数对所拍摄的第二视频进行抖动处理得到具有抖动特效的第三视频。例如,电子设备是手机时,手机运行相机应用拍摄视频时,可以通过麦克风等采集音频数据,即上述构成第一数据的第一音频数据,也可以通过摄像头采集图像数据,即上述构成第一数据的第一图像数据,手机响应于用户操作或者检测到所采集的音频数据和/或图像数据满足拍摄抖动视频的条件时,手机可以根据所采集的音频数据和/或图像数据确定抖动参数,并基于该抖动参数来拍摄抖动视频,或者对所拍摄的视频进行抖动处理得到具有抖动特效的视频。That is, the electronic device can collect the first audio data and/or the first image data as the first data when shooting a video, and then determine the shaking parameters used to control the degree or effect of the shaking special effect according to the collected first data, and the electronic device can then Shooting according to the determined shake parameters to obtain a second video with a shake special effect, or performing shake processing on the captured second video according to the shake parameters to obtain a third video with a shake special effect. For example, when the electronic device is a mobile phone, when the mobile phone runs the camera application to shoot video, it can collect audio data through a microphone, that is, the above-mentioned first audio data that constitutes the first data, or collect image data through a camera, that is, the above-mentioned first data that constitutes When the mobile phone responds to the user's operation or detects that the collected audio data and/or image data meet the conditions for shooting a shaking video, the mobile phone can determine the shaking parameters according to the collected audio data and/or image data, and A shaking video is shot based on the shaking parameter, or a video with a shaking special effect is obtained by performing shaking processing on the shot video.
在上述第一方面的一种可能的实现中,上述方法还包括:在第一音频数据满足第一预设条件;和/或第一图像数据满足第二预设条件的情况下,电子设备基于第一数据确定抖动参数。In a possible implementation of the above first aspect, the above method further includes: when the first audio data satisfies the first preset condition; and/or the first image data satisfies the second preset condition, the electronic device based on The first data determine dither parameters.
即电子设备中预设判断第一音频数据是否满足拍摄抖动视频的条件的第一预设条件,该第一预设条件例如是下文实施例所描述音频特征值需要满足的抖动触发条件,其中,音频特征值可以是基于第一音频数据提取得到的;电子设备中还可以预设判断第一图像数据是否满足拍摄抖动视频的条件的第二预设条件,该第二预设条件例如是下文实施例所描述的焦点对象变化特征值需要满足的抖动触发条件,其中焦点对象变化特征值可以是基于第一图像数据提取得到的,该焦点对象变化特征值可以是下文实施例中所描述的焦点数据。也就是说,电子设备所采集的第一音频数据对应的音频特征值满足相应抖动触发条件,和/或电子设备所采集的第一图像数据对应的焦点对象变化特征值满足相应抖动触发条件时,该电子设备可以确定相应的抖动参数。That is, the electronic device presets the first preset condition for judging whether the first audio data satisfies the conditions for shooting a jittery video, such as the jitter trigger condition that the audio characteristic value described in the embodiment below needs to satisfy, wherein, The audio feature value can be obtained based on the first audio data extraction; the electronic device can also preset a second preset condition for judging whether the first image data meets the conditions for shooting a shaking video, the second preset condition is, for example, the following implementation The jitter trigger conditions that need to be satisfied by the feature value of the focus object change described in the example, wherein the feature value of the focus object change can be obtained based on the first image data extraction, and the feature value of the focus object change can be the focus data described in the following embodiments . That is to say, when the audio characteristic value corresponding to the first audio data collected by the electronic device meets the corresponding shaking trigger condition, and/or the focus object change characteristic value corresponding to the first image data collected by the electronic device meets the corresponding shaking trigger condition, The electronics can determine corresponding dither parameters.
在上述第一方面的一种可能的实现中,第一音频数据满足第一预设条件,包括下列中的至少一项:第一音频数据的采样率大于预设采样率阈值;第一音频数据的频率大于或等于预设频率阈值;第一音频数据的响度大于或等于响度阈值。In a possible implementation of the above first aspect, the first audio data satisfies the first preset condition, including at least one of the following: the sampling rate of the first audio data is greater than the preset sampling rate threshold; the first audio data The frequency of the first audio data is greater than or equal to the preset frequency threshold; the loudness of the first audio data is greater than or equal to the loudness threshold.
即第一音频数据所对应的音频特征值可以是音频的采样率、频率、响度等特征值,当采样率大于预设采样率阈值、和/或频率大于或等于预设频率阈值、和/或响度大于或等于响度阈值时,便可以确定电子设备所采集的第一音频数据满足第一预设条件,例如,在下文实施例中,手机拍摄视频时所采集的音频数据所对应的音频采样率大于手机中的预设采样率阈值、和/或频率大于或等于手机中的预设频率阈值、和/或响度大于或等于手机中的响度阈值时,即可确定手机所采集的音频数据满足相应的抖动触发条件。That is, the audio feature value corresponding to the first audio data may be feature values such as audio sampling rate, frequency, loudness, etc., when the sampling rate is greater than the preset sampling rate threshold, and/or the frequency is greater than or equal to the preset frequency threshold, and/or When the loudness is greater than or equal to the loudness threshold, it can be determined that the first audio data collected by the electronic device satisfies the first preset condition, for example, in the following embodiments, the audio sampling rate corresponding to the audio data collected when the mobile phone shoots a video When it is greater than the preset sampling rate threshold in the mobile phone, and/or the frequency is greater than or equal to the preset frequency threshold in the mobile phone, and/or the loudness is greater than or equal to the loudness threshold in the mobile phone, it can be determined that the audio data collected by the mobile phone meets the corresponding requirements. The jitter trigger condition.
在上述第一方面的一种可能的实现中,图像数据满足第二预设条件,包括下列中的至少一项:第一图像数据中焦点对象的位移大于或等于预设位移阈值;第一图像数据中焦点对象的移动频率大于或等于预设频率阈值;第一图像数据中焦点对象的轮廓尺寸变化值大于或等于预设变化值阈值。In a possible implementation of the first aspect above, the image data satisfies the second preset condition, including at least one of the following: the displacement of the focus object in the first image data is greater than or equal to the preset displacement threshold; the first image The movement frequency of the focus object in the data is greater than or equal to a preset frequency threshold; the change value of the contour size of the focus object in the first image data is greater than or equal to a preset change value threshold.
即第一图像数据所对应的焦点对象变化特征值可以是第一图像数据中焦点对象的位移大小、移动频率、轮廓尺寸变化值等特征值,当第一图像数据中焦点对象的位移大于或等于预设位移阈值、和/或移动频率大于或等于预设频率阈值、和/或轮廓尺寸变化值大于或等于预设变化值阈值时,便可以确定电子设备所采集的第一图像数据满足第一预设条件。例如,在下文实施例中,手机拍摄视频时所采集的图像数据所对应的焦点对象变化特征值(焦点数据)中位移大于或等于手机中的预设位移阈值、和/或移动频率大于或等于手机中的预设频率阈值、和/或轮廓尺寸变化值大于或等于手机中的预设变化值阈 值时,即可确定手机所采集的图像数据满足相应的抖动触发条件。That is, the characteristic value of the focus object change corresponding to the first image data may be the characteristic values such as the displacement size, movement frequency, and contour size change value of the focus object in the first image data. When the displacement of the focus object in the first image data is greater than or equal to When the preset displacement threshold, and/or the movement frequency is greater than or equal to the preset frequency threshold, and/or the contour size change value is greater than or equal to the preset change value threshold, it can be determined that the first image data collected by the electronic device satisfies the first preset conditions. For example, in the following embodiments, the displacement in the focus object change characteristic value (focus data) corresponding to the image data collected when the mobile phone shoots a video is greater than or equal to the preset displacement threshold in the mobile phone, and/or the movement frequency is greater than or equal to When the preset frequency threshold and/or the change value of the outline size in the mobile phone is greater than or equal to the preset change value threshold in the mobile phone, it can be determined that the image data collected by the mobile phone satisfies the corresponding shaking trigger condition.
在上述第一方面的一种可能的实现中,电子设备包括音频数据和/或图像数据与抖动参数之间的预设对应关系,并且电子设备基于第一数据确定抖动参数,包括:电子设备从预设对应关系中选择匹配第一音频数据和/或第一图像数据的抖动参数。In a possible implementation of the first aspect above, the electronic device includes a preset correspondence between audio data and/or image data and shaking parameters, and the electronic device determines the shaking parameter based on the first data, including: A dithering parameter matching the first audio data and/or the first image data is selected from the preset corresponding relationship.
即电子设备中预设有各种音频数据和/或图像数据与抖动参数之间的对应关系,电子设备可以先根据所采集的第一音频数据和/或第一图像数据找到相匹配的上述预设对应关系中的相应音频数据和/或图像数据,再根据上述对应关系,确定与所采集的第一音频数据和/或第一图像数据相对应的抖动参数。例如,电子设备中预设的音频数据和/或图像数据与抖动参数之间的对应关系,可以是音频数据所对应的音频特征值与抖动参数之间的对应关系,和/或图像数据所对应的焦点对象变化特征值与抖动参数之间的对应关系,可以理解,音频特征值与抖动参数之间的对应关系既可以是某个音频特征值与抖动参数之间的对应关系,也可以是多个音频特征值的组合参数与抖动参数之间的对应关系,焦点对象变化特征值与抖动参数之间的对应关系既可以是某个焦点对象变化特征值与抖动参数之间的对应关系,也可以是多个焦点对象变化特征值的组合参数与抖动参数之间的对应关系,在此不做限制。That is, the correspondence between various audio data and/or image data and shaking parameters is preset in the electronic device, and the electronic device can first find the matching preset Assuming corresponding audio data and/or image data in the corresponding relationship, and then determining the shaking parameter corresponding to the collected first audio data and/or first image data according to the above corresponding relationship. For example, the correspondence between the preset audio data and/or image data and the shaking parameters in the electronic device may be the correspondence between the audio feature value corresponding to the audio data and the shaking parameters, and/or the corresponding relationship between the image data It can be understood that the correspondence between the audio characteristic value and the shaking parameter can be the corresponding relationship between a certain audio characteristic value and the shaking parameter, or it can be multiple The corresponding relationship between the combination parameter of the audio feature value and the shaking parameter, the corresponding relationship between the changing characteristic value of the focus object and the shaking parameter can be the corresponding relationship between the changing characteristic value of a certain focus object and the shaking parameter, or can be It is the corresponding relationship between the combination parameter of the variation characteristic value of multiple focus objects and the dithering parameter, which is not limited here.
在上述第一方面的一种可能的实现中,电子设备包括多个马达,并且多个马达包括电子设备的摄像头模组中的马达;并且抖动参数包括多个马达中的至少一个马达的振动参数。马达的振动参数包括振动方向、振动幅度、振动频率中的至少一项。基于抖动参数拍摄的第二视频,包括:电子设备基于马达的振动参数,控制马达产生振动并拍摄得到第二视频。In a possible implementation of the first aspect above, the electronic device includes multiple motors, and the multiple motors include motors in the camera module of the electronic device; and the shaking parameter includes a vibration parameter of at least one of the multiple motors . The vibration parameters of the motor include at least one of vibration direction, vibration amplitude and vibration frequency. The second video shot based on the shaking parameters includes: the electronic device controls the motor to vibrate based on the vibration parameters of the motor and shoots to obtain the second video.
即电子设备中可以设置有多个马达,例如,手机内可以设置用于产生振动提示信息的马达,也可以设置安装在摄像头模组中用于控制镜头位移或抖动的马达,在此不做限制;上述电子设备基于第一数据确定的抖动参数可以包括电子设备中任意一个或多个马达的振动参数,包括振动方向、振动幅度、以及用于控制马达振动快慢的振动频率等,电子设备可以根据该振动参数控制相应的马达振动,使得电子设备抖动或者电子设备的镜头抖动来拍摄具有抖动特效的第二视频。That is, multiple motors can be installed in the electronic device. For example, a motor for generating vibration prompt information can be installed in the mobile phone, and a motor installed in the camera module for controlling lens displacement or shaking can also be installed. There is no limitation here. The vibration parameters determined by the above-mentioned electronic device based on the first data may include vibration parameters of any one or more motors in the electronic device, including vibration direction, vibration amplitude, and vibration frequency used to control the vibration speed of the motor, etc., and the electronic device may be based on The vibration parameter controls the vibration of the corresponding motor, so that the electronic device shakes or the lens of the electronic device shakes to shoot a second video with a shaking special effect.
在上述第一方面的一种可能的实现中,电子设备包括光学防抖模组,并且抖动参数包括光学防抖模组中的镜头抖动参数。镜头抖动参数包括镜头抖动过程中的抖动位移大小、抖动方向、抖动频率中的至少一项。基于抖动参数拍摄的第二视频,包括:电子设备关闭光学防抖模组的防抖功能,并基于镜头抖动参数,通过光学防抖模组控制镜头抖动,拍摄得到第二视频。In a possible implementation of the foregoing first aspect, the electronic device includes an optical anti-shake module, and the shake parameter includes a lens shake parameter in the optical anti-shake module. The lens shake parameter includes at least one item of shake displacement, shake direction, and shake frequency during the lens shake process. The second video shot based on the shaking parameters includes: the electronic device turns off the anti-shaking function of the optical anti-shake module, and based on the lens shaking parameters, the optical anti-shake module controls the lens shaking to obtain the second video.
即电子设备基于第一数据确定的抖动参数可以是对应于电子设备的光学防抖模组的相关参数,例如是光学防抖模组中的镜头抖动参数,包括用于控制镜头抖动程度的抖动位移大小、用于控制镜头抖动快慢的抖动频率,以及抖动方向等,如此,电子设备便可以通过光学防抖模组控制镜头按照所确定的镜头抖动参数产生相应抖动,拍摄得到具有抖动特效的第二视频。That is, the shake parameter determined by the electronic device based on the first data may be related parameters corresponding to the optical anti-shake module of the electronic device, for example, the lens shake parameter in the optical anti-shake module, including the shake displacement used to control the degree of lens shake The size, the shaking frequency used to control the shaking speed of the lens, and the shaking direction, etc., so that the electronic device can control the lens through the optical anti-shake module to generate corresponding shaking according to the determined lens shaking parameters, and obtain a second image with shaking special effects. video.
在上述第一方面的一种可能的实现中,抖动参数还包括:电子设备拍摄第二视频时采集的第二图像数据的变化参数;或电子设备拍摄第二视频时采集的第二图像数据中的焦点对象的变化参数。第二图像数据的变化参数或第二图像数据中焦点对象的变化参数,包括缩放比例、位移大小、移动方向、移动速度、移动频率中的至少一项。电子设备拍摄第二视频,并根据抖动参数处理第二视频得到的第三视频,包括下列中的任一项:电子设备拍摄第二视频,并根据第二图像数据的变化参数处理第二视频得到第三视频;电子设备拍摄第二视频,并根据第二图像数据中的焦点对象的变化参数处理第二视频得到第三视频。In a possible implementation of the above-mentioned first aspect, the shake parameter further includes: a change parameter of the second image data collected when the electronic device shoots the second video; or a change parameter in the second image data collected when the electronic device shoots the second video The change parameter of the focus object. The change parameter of the second image data or the change parameter of the focus object in the second image data includes at least one item of scaling, displacement, moving direction, moving speed, and moving frequency. The electronic device shoots the second video, and processes the second video according to the shaking parameters to obtain a third video, including any of the following: the electronic device shoots the second video, and processes the second video according to the change parameters of the second image data to obtain The third video: the electronic device shoots the second video, and processes the second video according to the change parameters of the focus object in the second image data to obtain the third video.
即电子设备基于第一数据确定的抖动参数可以是即将拍摄的第二视频中的第二图像数据的变化参 数,还可以是基于该第二图像数据提取得到的焦点对象的变化参数,例如包括对第二图像或者第二图像中的焦点对象的缩放比例、位移大小、移动方向、移动速度、移动频率等,如此,电子设备便可以按照所确定的变化参数对所拍摄的第二视频中的第二图像数据进行抖动处理,得到具有抖动特效的第二视频。例如在下文实施例中,手机可以通过图像传感器对拍摄过程中所采集图像进行缩放、移动等处理、或者对拍摄过程中所采集图像中的焦点对象进行缩放、移动等处理,从而得到具有抖动特效的视频。That is, the shake parameter determined by the electronic device based on the first data may be a change parameter of the second image data in the second video to be shot, or a change parameter of the focus object extracted based on the second image data, for example, including The zoom ratio, displacement, moving direction, moving speed, moving frequency, etc. of the second image or the focus object in the second image, so that the electronic device can adjust the second image in the captured second video according to the determined change parameters. The second image data is dithered to obtain a second video with a dithering effect. For example, in the following embodiments, the mobile phone can use the image sensor to perform processing such as zooming and moving on the image collected during the shooting process, or perform processing such as zooming and moving on the focus object in the image collected during the shooting process, so as to obtain a shaking effect video.
在上述第一方面的一种可能的实现中,电子设备的视频拍摄界面包括抖动模式控件,并且方法还包括:响应于用户对抖动模式控件的操作,电子设备基于抖动参数生成第二数据。In a possible implementation of the above first aspect, the video shooting interface of the electronic device includes a shaking mode control, and the method further includes: in response to a user's operation on the shaking mode control, the electronic device generates second data based on shaking parameters.
即电子设备拍摄视频的界面上可以设置有控制是否拍摄具有抖动特效视频的抖动模式控件,用户点击该控件则可以开启或关闭抖动模式,该控件可以设置在电子设备的视频拍摄界面上的任意位置,在此不做限制。可以理解,开启抖动模式的情况下,电子设备便可以根据拍摄视频时采集的音频数据和/或图像数据确定抖动参数并拍摄得到具有抖动特效的视频;关闭抖动模式的情况下,即便电子设备所采集的音频数据和/或图像数据能够匹配到相应的抖动参数,或者说满足相应的预设条件,此时电子设备也不会拍摄或生成具有抖动特效的第二视频。例如,在下文实施例中,手机所运行的相机应用的视频拍摄界面上(参考图6A所示),设置有抖动模式勾选按钮,用户点击该按钮完成勾选,手机即可进入抖动拍摄模式,此模式下,当手机所采集的音频数据对应的音频特征值、和/或所采集的图像数据对应的焦点对象变化特征值满足抖动触发条件时,手机便可以根据所确定的抖动参数控制马达振动、或者控制镜头抖动等拍摄得到具有抖动特效的视频;在下文实施例中描述的另一视频拍摄界面上(参考图6B所示),上述抖动模式控件也可以视频拍摄界面的模式菜单栏中的抖动拍摄选项,用户在手机所显示的模式菜单栏中左右滑动选择该抖动拍摄选项,即可进入抖动拍摄模式,在此不再赘述。That is, the video shooting interface of the electronic device can be provided with a shaking mode control to control whether to shoot a video with shaking effects, and the user can click the control to turn on or off the shaking mode, and the control can be set at any position on the video shooting interface of the electronic device , without limitation here. It can be understood that when the shaking mode is turned on, the electronic device can determine the shaking parameters according to the audio data and/or image data collected when shooting a video and shoot a video with shaking effects; when the shaking mode is turned off, even if the electronic device The collected audio data and/or image data can be matched to the corresponding shaking parameters, or meet the corresponding preset conditions. At this time, the electronic device will not shoot or generate the second video with shaking effects. For example, in the following embodiments, on the video shooting interface of the camera application running on the mobile phone (as shown in FIG. 6A ), a shake mode check button is set, and the user clicks the button to complete the check, and the mobile phone can enter the shake shooting mode , in this mode, when the audio characteristic value corresponding to the audio data collected by the mobile phone and/or the focus object change characteristic value corresponding to the collected image data meet the shaking trigger condition, the mobile phone can control the motor according to the determined shaking parameters Vibration, or control camera shaking etc. to shoot to obtain a video with shaking special effects; on another video shooting interface described in the following embodiments (shown in reference to Figure 6B), the above-mentioned shaking mode control can also be in the mode menu bar of the video shooting interface The shaking shooting option, the user slides left and right in the mode menu bar displayed on the mobile phone to select the shaking shooting option, and then enters the shaking shooting mode, which will not be repeated here.
在上述第一方面的一种可能的实现中,方法还包括:在检测到当前拍摄场景为预设场景的情况下,电子设备基于抖动参数生成第二数据。In a possible implementation of the foregoing first aspect, the method further includes: when detecting that the current shooting scene is a preset scene, the electronic device generates the second data based on the shake parameter.
即电子设备中可以预设一些适合采集抖动特效表达视频内容或者拍摄者的情感的场景,例如是比较热血沸腾的演唱会场景、体育竞技场景、街舞比赛场景等,当电子设备检测到当前所处的场景为某个预设场景时,可以自动进入抖动拍摄模式。例如,手机可以根据麦克风所采集的音频数据和/或摄像头所采集的图像数据是否匹配预设的演唱会、体育竞技、街舞比赛等场景相对应的音频数据特征和/或图像数据特征,来判断当前所处场景是否为某个预设场景,如果可以匹配到某个预设场景,则手机所运行的相机应用自动进入抖动拍摄模式。That is, the electronic device can preset some scenes suitable for collecting jitter effects to express the video content or the emotion of the photographer, such as the more enthusiastic concert scene, sports competition scene, hip-hop competition scene, etc. When the electronic device detects that the current location is When the scene is a preset scene, it can automatically enter the shaking shooting mode. For example, the mobile phone can judge according to whether the audio data collected by the microphone and/or the image data collected by the camera match the audio data characteristics and/or image data characteristics corresponding to the preset scenes such as concerts, sports competitions, hip-hop competitions, etc. Whether the current scene is a preset scene, if a preset scene can be matched, the camera application running on the mobile phone will automatically enter the shaking shooting mode.
在上述第一方面的一种可能的实现中,电子设备基于抖动参数生成第二数据,还包括:电子设备添加与第二数据的内容相匹配的音效节拍或音乐片段。In a possible implementation of the foregoing first aspect, the electronic device generating the second data based on the shaking parameter further includes: the electronic device adding a sound effect beat or a music segment that matches the content of the second data.
即电子设备在基于抖动参数生成具有抖动特效的视频的过程中,可以同时添加与该抖动特效相匹配的音效节拍或者音乐片段,例如,该音频节拍是“咚~咚~咚”或者“滋~滋~滋”之类的特效。That is, in the process of generating a video with a shaking effect based on shaking parameters, the electronic device can simultaneously add a sound effect beat or a music clip that matches the shaking effect, for example, the audio beat is "咚~咚~咚" or "Zi~ Nourish ~ Nourish" and other special effects.
第二方面,本申请实施例提供了一种视频拍摄方法,该方法包括:第二电子设备获取第一数据,第一数据为第一音频数据和/或第一图像数据;第二电子设备基于第一数据确定抖动参数;第二电子设备向第一电子设备发送抖动参数;第一电子设备基于抖动参数拍摄第二视频,或第一电子设备拍摄第二视频,并根据抖动参数处理第二视频得到第三视频。In a second aspect, an embodiment of the present application provides a video shooting method, the method comprising: the second electronic device acquires first data, the first data being first audio data and/or first image data; the second electronic device based on The first data determines the shake parameter; the second electronic device sends the shake parameter to the first electronic device; the first electronic device shoots the second video based on the shake parameter, or the first electronic device shoots the second video and processes the second video according to the shake parameter Get the third video.
即本申请的视频拍摄方法可以由分布式的多个设备共同执行,其中一个电子设备(第二电子设备)采集包括第一音频数据和/或第一图像数据的第一数据,并基于第一数据确定抖动参数,该电子设备再将所确定的抖动参数发送给另一电子设备(第一电子设备)拍摄具有抖动特效的第二视频,或者处理所 拍摄的第二视频得到具有抖动特效的第三视频。例如用户的手机和手环互联,手环用于采集包括第一音频数据和/或第一图像数据的第一数据,并将基于该第一数据确定的抖动参数发送给手机,手机再根据接收到的抖动参数拍摄具有抖动特效的第二视频,或者对所拍摄的第二视频得到具有抖动特效的第三视频。That is, the video shooting method of the present application can be jointly executed by distributed multiple devices, wherein one electronic device (the second electronic device) collects the first data including the first audio data and/or the first image data, and based on the first The data determines the shaking parameters, and the electronic device sends the determined shaking parameters to another electronic device (the first electronic device) to shoot a second video with shaking effects, or process the captured second video to obtain a first shaking effect. Three videos. For example, the user's mobile phone is interconnected with the bracelet, and the bracelet is used to collect first data including the first audio data and/or first image data, and send the shaking parameters determined based on the first data to the mobile phone, and the mobile phone then receives Shoot a second video with a shaking effect based on the obtained shaking parameters, or obtain a third video with a shaking effect from the captured second video.
在上述第二方面的一种可能的实现中,第二电子设备包括音频数据和/或图像数据与抖动参数之间的预设对应关系,并且第二电子设备基于第一数据确定抖动参数,包括:第一电子设备从预设对应关系中选择匹配第一音频数据和/或第一图像数据的抖动参数。In a possible implementation of the second aspect above, the second electronic device includes a preset correspondence between audio data and/or image data and shaking parameters, and the second electronic device determines the shaking parameters based on the first data, including : The first electronic device selects a shaking parameter matching the first audio data and/or the first image data from preset correspondences.
即用于确定抖动参数的第二电子设备上预设有音频数据和/或图像数据与抖动参数之间的预设对应关系,该第二电子设备可以从预设的对应关系中找到与所采集的第一数据对应的抖动参数发送给第一电子设备。例如对于前述例子,手环内预设有音频数据和/或图像数据与抖动参数之间的预设对应关系,用户使用手机拍摄视频时,手环可以采集第一数据并根据第一数据确定抖动参数发送给手机。That is, the second electronic device used to determine the shaking parameters is preset with a preset correspondence between the audio data and/or image data and the shaking parameters, and the second electronic device can find a corresponding relationship with the collected data from the preset correspondence. The jitter parameters corresponding to the first data are sent to the first electronic device. For example, in the aforementioned example, the wristband is preset with a preset correspondence between audio data and/or image data and shaking parameters. When the user uses a mobile phone to shoot a video, the wristband can collect the first data and determine the shaking based on the first data. Parameters are sent to the phone.
可以理解,在另一些实施例中,手环也可以将其采集的第一数据发送给手机处理,手机基于接收到的第一数据从手机中预设的音频数据和/或图像数据与抖动参数之间的对应关系中确定与第一数据相匹配的抖动参数,在此不做限制。It can be understood that in some other embodiments, the wristband can also send the collected first data to the mobile phone for processing, and the mobile phone can preset audio data and/or image data and shaking parameters from the mobile phone based on the received first data. The jitter parameters that match the first data are determined in the corresponding relationship between them, which is not limited here.
在上述第二方面的一种可能的实现中,抖动参数包括下列中的至少一项:第一电子设备中的多个马达中的至少一个马达的振动参数,多个马达包括第一电子设备的摄像头模组中的马达;第一电子设备的光学防抖模组中的镜头抖动参数。马达的振动参数包括振动方向、振动幅度、振动频率中的至少一项;镜头抖动参数包括镜头抖动过程中的抖动位移大小、抖动方向、抖动速度中的至少一项。In a possible implementation of the second aspect above, the shaking parameters include at least one of the following: vibration parameters of at least one of the multiple motors in the first electronic device, and the multiple motors include the vibration parameters of the first electronic device. A motor in the camera module; a lens shake parameter in the optical anti-shake module of the first electronic device. The vibration parameter of the motor includes at least one item of vibration direction, vibration amplitude, and vibration frequency; the lens shake parameter includes at least one item of shake displacement, shake direction, and shake speed during the lens shake process.
在上述第二方面的一种可能的实现中,第一电子设备基于抖动参数拍摄第二视频,包括下列中的至少一项:第一电子设备基于马达的振动参数,控制马达产生振动并拍摄第二视频;第一电子设备基于关闭光学防抖模组的防抖功能,并基于镜头抖动参数,通过光学防抖模组控制镜头抖动并拍摄第二视频。In a possible implementation of the second aspect above, the first electronic device shoots the second video based on the shaking parameters, including at least one of the following: the first electronic device controls the motor to vibrate and shoots the second video based on the vibration parameters of the motor. Two videos: the first electronic device controls the lens shake through the optical image stabilization module based on disabling the anti-shake function of the optical anti-shake module, and based on the lens shake parameters, and shoots the second video.
在上述第二方面的一种可能的实现中,抖动参数还包括:第一电子设备拍摄第二视频时采集的第二图像数据的变化参数;或第一电子设备拍摄第二视频时采集的第二图像数据中的焦点对象的变化参数。第二图像数据的变化参数或第二图像数据中焦点对象的变化参数,包括缩放比例、位移大小、移动方向、移动速度、移动频率中的至少一项。In a possible implementation of the above-mentioned second aspect, the shaking parameters further include: a change parameter of the second image data collected when the first electronic device shoots the second video; or a change parameter of the second image data collected when the first electronic device shoots the second video. 2. Variation parameters of the focus object in the image data. The change parameter of the second image data or the change parameter of the focus object in the second image data includes at least one item of scaling, displacement, moving direction, moving speed, and moving frequency.
在上述第二方面的一种可能的实现中,第一电子设备拍摄第二视频,并根据抖动参数处理第二视频得到第三视频,包括下列中的任一项:第一电子设备拍摄第二视频,并根据第二图像数据的变化参数处理第二视频得到第三视频;第一电子设备拍摄第二视频,并根据第二图像数据中的焦点对象的变化参数处理第二视频得到第三视频。In a possible implementation of the second aspect above, the first electronic device shoots the second video, and processes the second video according to the shaking parameters to obtain the third video, including any of the following: the first electronic device shoots the second video video, and process the second video according to the change parameters of the second image data to obtain the third video; the first electronic device shoots the second video, and process the second video according to the change parameters of the focus object in the second image data to obtain the third video .
第三方面,本申请实施例提供了一种视频拍摄方法,该方法包括:第二电子设备获取第一数据,第一数据包括音频数据和/或图像数据焦点对象变化特征值;第二电子设备基于第一数据确定抖动参数;第二电子设备获取第一电子设备拍摄的第二数据,并根据抖动参数对第二数据进行处理得到第三视频。In a third aspect, an embodiment of the present application provides a video shooting method, the method includes: the second electronic device acquires first data, the first data includes audio data and/or image data focus object change feature values; the second electronic device The shake parameter is determined based on the first data; the second electronic device obtains the second data shot by the first electronic device, and processes the second data according to the shake parameter to obtain a third video.
即本申请的视频拍摄方法由分布式的多个设备共同执行时,可以由第一电子设备拍摄视频,但由第二电子设备采集第一数据、确定抖动参数以及根据该抖动参数对第一电子设备拍摄的视频进行抖动处理得到具有抖动特效的第三视频。例如,第一电子设备是手机,第二电子设备是手环时,手环根据所采集的第一数据确定抖动参数,手机拍摄的第二视频数据也发送给手环,手机基于所确定的抖动参数处理第二视频得到具有抖动特效的第三视频。此种情形下,手环可以配置具有较高运算性能以及音频、图像处理能力的芯片或处理器,在此不做限制,That is, when the video shooting method of the present application is jointly executed by multiple distributed devices, the first electronic device can shoot the video, but the second electronic device collects the first data, determines the shaking parameters, and controls the first electronic device according to the shaking parameters. The video captured by the device is subjected to shaking processing to obtain a third video with a shaking special effect. For example, when the first electronic device is a mobile phone and the second electronic device is a wristband, the wristband determines the shaking parameters according to the collected first data, and the second video data captured by the mobile phone is also sent to the wristband, and the mobile phone is based on the determined shaking parameters. The second video is processed with parameters to obtain a third video with a shaking effect. In this case, the wristband can be configured with chips or processors with higher computing performance and audio and image processing capabilities, without limitation here.
第四方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;一个或多个存储器;一个或多个存储器存储有一个或多个程序,当一个或者多个程序被一个或多个处理器执行时,使得电子设备执行上述视频拍摄方法。In a fourth aspect, the embodiment of the present application provides an electronic device, including: one or more processors; one or more memories; one or more memories storing one or more programs, when the one or more programs are When executed by one or more processors, the electronic device is made to execute the above video shooting method.
第五方面,本申请实施例提供了一种计算机存储介质,存储介质上存储有指令,指令在计算机上执行时使计算机执行上述视频拍摄方法。In a fifth aspect, the embodiment of the present application provides a computer storage medium, where instructions are stored on the storage medium, and when the instructions are executed on the computer, the computer executes the above video shooting method.
第六方面,本申请实施例提供了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现上述视频拍摄方法。In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program/instruction, and when the computer program/instruction is executed by a processor, the above video shooting method is realized.
第七方面,本申请实施例提供了一种视频拍摄装置,该装置包括:数据采集模块,用于获取第一数据,第一数据包括第一音频数据和/或第一图像数据;抖动参数生成模块,用于获取数据采集模块采集到的第一数据,并且基于第一数据确定抖动参数;抖动视频生成模块,用于获取抖动参数生成模块确定的抖动参数,并基于抖动参数拍摄第二视频,或者拍摄第二视频后根据抖动参数处理第二视频得到第三视频。In the seventh aspect, the embodiment of the present application provides a video shooting device, the device includes: a data acquisition module, configured to acquire first data, the first data includes first audio data and/or first image data; shake parameter generation A module for obtaining the first data collected by the data acquisition module, and determining a shaking parameter based on the first data; a shaking video generation module for obtaining the shaking parameters determined by the shaking parameter generation module, and shooting a second video based on the shaking parameters, Or, after shooting the second video, process the second video according to the shaking parameters to obtain the third video.
附图说明Description of drawings
图1A至1D所示为现有技术中对视频添加抖动特效的操作过程UI界面示意图。1A to 1D are schematic diagrams of UI interfaces in the operation process of adding shaking effects to videos in the prior art.
图2所示为本申请实施例所提供的视频拍摄方法的各种应用场景示意图。FIG. 2 is a schematic diagram of various application scenarios of the video shooting method provided by the embodiment of the present application.
图3所示为本申请实施例所提供的电子设备100的结构示意图。FIG. 3 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
图4所示为本申请实施例所提供的一种基于所采集的音频数据转换为相应的抖动参数,以实现添加抖动特效的示意性过程。FIG. 4 shows a schematic process of converting collected audio data into corresponding shaking parameters to implement adding shaking special effects provided by the embodiment of the present application.
图5所示为本申请实施例所提供的视频拍摄方法的实施流程示意图。FIG. 5 is a schematic diagram of the implementation flow of the video shooting method provided by the embodiment of the present application.
图6A至6C所示为本申请实施例所提供的进入抖动拍摄模式的UI界面示意。6A to 6C are schematic diagrams of UI interfaces for entering the shake shooting mode provided by the embodiment of the present application.
图7所示为基于OIS技术的防抖系统组成原理示意图。FIG. 7 is a schematic diagram showing the composition principle of an anti-shake system based on OIS technology.
图8所示为本申请实施例所提供的手机100显示已完成的抖动特效视频以及进行后续处理的UI界面示意图。FIG. 8 is a schematic diagram of the UI interface of the mobile phone 100 provided by the embodiment of the present application for displaying the completed shake special effect video and performing subsequent processing.
图9A至9C所示为本申请实施例所提供的实时音频数据和/或实时图像数据转换为相应的抖动参数的转换过程示意图。9A to 9C are schematic diagrams of a conversion process of converting real-time audio data and/or real-time image data into corresponding dithering parameters provided by the embodiment of the present application.
图10A至10D所示为本申请实施例所提供的在手机100上设置抖动参数所对应的UI界面示意图。10A to 10D are schematic diagrams of UI interfaces corresponding to setting shaking parameters on the mobile phone 100 provided by the embodiment of the present application.
图11所示为本申请实施例所提供的抖动效果预览窗口显示界面示意图。FIG. 11 is a schematic diagram of a display interface of a shake effect preview window provided by the embodiment of the present application.
图12A至12C所示为本申请实施例所提供的不同程度的抖动拍摄模式所对应的抖动特效效果示意图。12A to 12C are schematic diagrams of shaking special effects corresponding to shooting modes with different degrees of shaking provided by the embodiment of the present application.
图13所示为本申请实施例提供的一种通过马达振动完成视频拍摄过程所涉及的手机100的系统架构示意图。FIG. 13 is a schematic diagram of a system architecture of a mobile phone 100 involved in a video shooting process through motor vibration provided by an embodiment of the present application.
图14所示为本申请实施例提供的一种视频拍摄装置的结构示意图。FIG. 14 is a schematic structural diagram of a video capture device provided by an embodiment of the present application.
具体实施方式detailed description
下面将使用本领域技术人员通常采用的术语来描述说明性实施例的各个方面,以将他们工作的实质传达给本领域其他技术人员。然而,对于本领域技术人员来说,使用部分所描述的特征来施行一些替代性实施例是显而易见的。出于解释的目的,阐述了具体的数字和配置,以便对说明性实施例进行更加 透彻的理解。然而,对于本领域技术人员来说显而易见的是,可以在没有具体细节的情况下实施替代实施例。在一些其他情况下,本文省略或简化了一些众所周知的特征,以避免使本申请的说明性实施例模糊不清。Various aspects of the illustrative embodiments are described below using terms commonly employed by those skilled in the art to convey the substance of their work to others skilled in the art. However, it will be apparent to those skilled in the art that some alternative embodiments may be practiced using some of the described features. For purposes of explanation, specific numbers and configurations are set forth to provide a more thorough understanding of the illustrative embodiments. It will be apparent, however, to one skilled in the art that alternative embodiments may be practiced without the specific details. In other instances, well-known features have been omitted or simplified herein in order to avoid obscuring the illustrative embodiments of the application.
本申请的说明性实施例包括但不限于视频拍摄方法及装置、电子设备和存储介质。Illustrative embodiments of the present application include, but are not limited to, video shooting methods and devices, electronic equipment, and storage media.
图2示出了本申请的视频拍摄方法的各种应用场景示意图。FIG. 2 shows a schematic diagram of various application scenarios of the video shooting method of the present application.
如图2所示,该场景包括用于拍摄视频的电子设备100,以及适于采用本申请的视频拍摄方法拍摄特效视频的多种拍摄场景,包括但不限于需要捕捉人物动作/表情等的场景,例如体育竞技赛场、街舞比赛、儿童节目表演等,以及需要捕捉声音/光效等的场景,例如演唱会或唱跳表演、说唱表演现场等。在上述示例的这些场景中,观众通过拍摄视频的方式记录竞技者或者表演者的动作、表情、声音等,例如街舞比赛中,竞技者大多会在一定的预备动作之后做出一些高难度动作,观众在欣赏到这些高难度动作时通常会热血沸腾,同时会很想在拍摄的视频中对这一瞬间加上抖动等特效以表达自己的兴奋情感。As shown in Figure 2, the scene includes an electronic device 100 for shooting video, and a variety of shooting scenes suitable for shooting special effects videos using the video shooting method of this application, including but not limited to scenes that need to capture character movements/expressions, etc. , such as sports arenas, hip-hop competitions, children's performances, etc., and scenes that need to capture sound/light effects, such as concerts or singing and dancing performances, rap performances, etc. In these scenes of the above example, the audience records the actions, expressions, voices, etc. of the competitors or performers by shooting videos. For example, in hip-hop competitions, most of the competitors will make some difficult movements after certain preparatory movements. The audience is usually excited when watching these difficult movements, and at the same time, they would like to add special effects such as shaking to this moment in the shot video to express their excitement.
如上所述,用户在发布短视频时,有时需要在短视频中添加抖动等动感特效来表达视频中引人共鸣的内容。实际上,用户在用视频记录许多精彩瞬间的过程中,例如图2所示的各种场景中,用户都可以通过添加与所拍摄画面及场景中的声音等相匹配的抖动特效,来凸显主题、抒发情感。如果采用上述背景技术中所描述的视频处理过程,考虑到上述背景技术中所提及的后期制作过程中可能存在的抖动特效与视频中的画面以及实时声音难以高度匹配、能够添加的抖动效果单一、无法得到3D方向上拟真的画面抖动效果以及后期制作耗时较长、效率低下,需要花费创作者很多时间精力等问题,会给用户带来很不好的特效视频制作体验。可以理解,视频制作过程如果耗时太久会使得用户热情消退,制作出的特效视频也更难以表达当时情感。As mentioned above, when users publish short videos, they sometimes need to add dynamic special effects such as shaking to express the resonant content in the video. In fact, in the process of recording many exciting moments with video, for example, in the various scenes shown in Figure 2, the user can highlight the theme by adding shaking effects that match the captured pictures and the sound in the scene , Express emotion. If the video processing process described in the above-mentioned background technology is adopted, it is difficult to highly match the jitter special effects that may exist in the post-production process mentioned in the above-mentioned background technology with the picture in the video and the real-time sound, and the jitter effect that can be added is single , Unable to obtain realistic picture shaking effect in 3D direction, and the post-production takes a long time, is inefficient, and requires a lot of time and effort of creators, etc., which will bring users a very bad special effects video production experience. It is understandable that if the video production process takes too long, the user's enthusiasm will fade, and the produced special effects video will be more difficult to express the emotions at that time.
针对目前通过后期制作特效视频所存在的上述问题,本申请提供一种视频拍摄方法,通过在拍摄视频的过程中基于采集的视频数据,包括但不限于音频数据和/或焦点数据,并从中提取音频特征值和/或焦点对象的变化特征值,当音频特征值和/或焦点对象的变化特征值满足抖动触发条件时,触发添加高契合度时间节点的抖动特效,并且本申请所提供的视频拍摄方法还能够基于音频特征值和/或焦点对象的变化特征值转换得到相应的抖动参数,以控制抖动幅度、抖动频率等参数从而使得所拍摄视频中呈现的抖动特效效果与视频内容情感高度匹配。其中,焦点数据,可以是电子设备的摄像头模组采集的任一帧图像中关于目标焦点的图像数据、以及目标焦点在该帧图像中的相对位置等数据。Aiming at the above-mentioned problems currently existing in the post-production special effects video, the present application provides a video shooting method, which is based on the video data collected during the video shooting process, including but not limited to audio data and/or focus data, and extracting The audio feature value and/or the change feature value of the focus object, when the audio feature value and/or the change feature value of the focus object meet the shaking trigger condition, trigger the addition of a shaking effect at a time node with a high degree of fit, and the video provided by this application The shooting method can also convert the corresponding shaking parameters based on the audio feature value and/or the change feature value of the focus object, so as to control parameters such as shaking amplitude and shaking frequency, so that the shaking special effect presented in the captured video highly matches the emotion of the video content . Wherein, the focus data may be image data about the target focus in any frame of image collected by the camera module of the electronic device, and data such as the relative position of the target focus in the frame of image.
可以理解,上述在满足预设的抖动触发条件的情况下所拍摄视频中呈现的抖动特效,可以通过电子设备中的硬件抖动来实现,例如通过马达的振动、或者通过光学防抖模组控制镜头抖动等方式实现在所拍摄视频中呈现抖动特效,其中,上述马达可以是电子设备内用于提供振动提示信息等的马达,也可以是电子设备的摄像头模组中用于控制镜头位移或抖动的马达,在此不做限制,通过电子设备内的马达振动、或通过光学防抖模组控制镜头的移动实现所拍摄视频中相应时间节点上呈现抖动特效的详细过程,将在下文详细描述,在此不再赘述。另外,上述在满足预设的抖动触发条件的情况下所拍摄视频中呈现的抖动特效,也可以有电子设备中的处理器控制运行相关算法来实现,例如摄像头模组采集的图像数据经图像处理器进行降噪、去畸变等图像处理过程后,基于处理后的图像数据提取得到上述焦点数据。可以理解,图像处理器可以运行抖动特效处理算法对上述所提取的焦点对象的相关焦点数据在3D方向上进行位移和/或缩放等操作,以使得拍摄完成后得到的视频中呈现与相应视频内容、情感相匹配的抖动特效。It can be understood that the shaking effect presented in the video shot when the preset shaking trigger conditions are met can be realized through hardware shaking in the electronic device, such as through the vibration of the motor, or through the optical anti-shake module to control the lens Vibration and other methods can be used to present jitter special effects in the captured video, wherein the above-mentioned motor can be a motor in the electronic device for providing vibration prompt information, etc., or it can be a motor in the camera module of the electronic device for controlling lens displacement or shaking. The motor is not limited here. The detailed process of presenting the shaking special effect at the corresponding time node in the captured video through the vibration of the motor in the electronic device or the movement of the lens through the optical anti-shake module will be described in detail below. This will not be repeated here. In addition, the above-mentioned jitter special effect presented in the video shot under the condition of meeting the preset jitter trigger conditions can also be realized by the processor in the electronic device controlling the operation of related algorithms, for example, the image data collected by the camera module is processed After performing image processing such as noise reduction and de-distortion, the focus data is obtained based on the processed image data. It can be understood that the image processor can run a shaking special effect processing algorithm to perform operations such as displacement and/or scaling in the 3D direction on the relevant focus data of the extracted focus object, so that the corresponding video content is presented in the video obtained after shooting , Emotionally matched jitter effects.
可以理解,本申请的视频拍摄方法所适用的电子设备100包括但不限于手机、相机、平板电脑、 台式计算机、笔记本电脑、无人机等具有拍摄功能的各类电子设备,电子设备100也可以是云台与手机、云台与相机等组合设备,在此不做限制。It can be understood that the electronic device 100 applicable to the video shooting method of the present application includes, but is not limited to, mobile phones, cameras, tablet computers, desktop computers, notebook computers, drones and other electronic devices with shooting functions, and the electronic device 100 can also be It is a combined device such as a gimbal and a mobile phone, or a gimbal and a camera, and there is no limitation here.
图3示出了一种电子设备100的硬件结构示意图。FIG. 3 shows a schematic diagram of a hardware structure of an electronic device 100 .
如图3所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,光学防抖模组192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,加速度传感器180C,距离传感器180D,触摸传感器180E,环境光传感器180F等。As shown in FIG. 3 , the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, optical image stabilization module 192 , a camera 193, a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an acceleration sensor 180C, a distance sensor 180D, a touch sensor 180E, an ambient light sensor 180F and the like.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。在本申请的一些实施例中,处理器110可以通过控制器控制对采集的音频数据和/或图像数据进行特征分析,并判断是否符合抖动触发条件等,以及在符合抖动触发条件的情况下转换得到抖动参数,以控制在所拍摄视频中的某些时间节点上呈现与视频内容及情感高度匹配的抖动特效,抖动参数即为该抖动特效所对应的抖动方向、抖动幅度、以及抖动频率等相关参数。The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction. In some embodiments of the present application, the processor 110 may perform feature analysis on the collected audio data and/or image data through the control of the controller, and determine whether the vibration trigger condition is met, and convert the Get the shaking parameters to control the presentation of shaking effects that highly match the video content and emotion at certain time nodes in the captured video. The shaking parameters are the shaking direction, shaking amplitude, and shaking frequency corresponding to the shaking effects. parameter.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。在本申请的一些实施例中,存储器中可以存入实施本申请所提供的视频拍摄方法的相关预设条件、预设参数以及各种指令数据等,在此不做限制。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system. In some embodiments of the present application, relevant preset conditions, preset parameters, and various instruction data for implementing the video shooting method provided in the present application may be stored in the memory, which is not limited here.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180E,充电器,闪光灯,摄像头193等。例如处理器110可以通过I2C接口耦合触摸传感器180E,使处理器110与触摸传感器180K通过I2C总线接口通 信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be respectively coupled to the touch sensor 180E, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180E through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160 . For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 . The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。 移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(blue tooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (blue tooth, BT), global navigation Satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Mini-LED,Micro-LED,Micro-OLED,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Mini-LED, Micro-LED, Micro-OLED, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换为电信号,之后将电信号传递给ISP转换为数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换为标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。在本申请实施例中,摄像头193可以在拍摄视频的过程中采集图像数据,包括采集包括拍摄焦点的连续图像数据等。在另一些实施例中,摄像头193所采集的图像数据也可以用于判断此时电子设备100所处的场景,可以理解,电子设备100上可以预设几种场景,例如预设上述图2所示的各种场景,不同场景中的图像数据所对应的特征值是不同的。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1. In the embodiment of the present application, the camera 193 may collect image data during the process of shooting video, including collecting continuous image data including shooting focus and the like. In other embodiments, the image data collected by the camera 193 can also be used to determine the scene where the electronic device 100 is located at this time. It can be understood that several scenes can be preset on the electronic device 100, for example, the scene shown in FIG. 2 above can be preset. In the various scenes shown, the feature values corresponding to the image data in different scenes are different.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或拍摄多种编码格式的视频,例如动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or shoot videos in various encoding formats, such as moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如图像识别,人脸识别,语音识别,文本理解等。在本申请实施例中,可以通过NPU识别视频拍摄焦点,例如对焦的焦点人物,进而实时获取焦点人物有关的图像变化数据,基于上述实时的图像变化数据判断是否满足抖动触发条件。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, voice recognition, text understanding, and the like. In this embodiment of the application, the NPU can be used to identify the focus of video shooting, such as the focus person, and then obtain the image change data related to the focus person in real time, and judge whether the shaking trigger condition is satisfied based on the above real-time image change data.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。在本申请实施例中,所拍摄的具有抖动特效的视频可以保存在外部存储器接口所连接的外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card. In the embodiment of the present application, the captured video with shaking effect can be saved in the external memory card connected to the external memory interface.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。在本申请实施例中,内部存储器121可以存储用于电子设备100执行本申请的视频拍摄方法的可执行程序代码、指令等。The internal memory 121 may be used to store computer-executable program codes including instructions. The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor. In the embodiment of the present application, the internal memory 121 may store executable program codes, instructions, etc. for the electronic device 100 to execute the video shooting method of the present application.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换为模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。 Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
受话器170B,也称“听筒”,用于将音频电信号转换为声音信号。当电子设备100接听电话或语 音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the receiver 170B can be placed close to the human ear to listen to the voice.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。在本申请实施例中,麦克风170C可以用来采集实时音频数据,电子设备100基于对所采集的音频数据进行特征分析,可以判断实时的音频数据是否符合抖动触发条件,进而确定是否触发抖动实现在所拍摄视频中呈现抖动特效。在另一些实施例中,麦克风170C所采集的音频数据也可以用于判断此时电子设备100所处的场景,可以理解,电子设备100上可以预设几种场景,例如预设上述图2所示的各种场景,不同场景中的音频数据所对应的特征值是不同的。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc. In the embodiment of the present application, the microphone 170C can be used to collect real-time audio data, and the electronic device 100 can judge whether the real-time audio data meets the jitter trigger condition based on the feature analysis of the collected audio data, and then determine whether to trigger the jitter to achieve A shaking effect appears in the captured video. In some other embodiments, the audio data collected by the microphone 170C can also be used to determine the scene where the electronic device 100 is located at this time. It can be understood that several scenes can be preset on the electronic device 100, for example, the scene shown in FIG. 2 above can be preset. In the various scenarios shown, the feature values corresponding to the audio data in different scenarios are different.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used for connecting wired earphones. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换为电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。在本申请实施例中,在拍摄视频的过程中,电子设备100可以压力传感器180A检测触摸位置进行对焦,以选中位于该触摸位置上的目标焦点,例如是某个焦点人物,即上下文所描述的焦点对象。The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may be comprised of at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. In this embodiment of the present application, during the process of shooting a video, the electronic device 100 can use the pressure sensor 180A to detect the touch position to focus, so as to select the target focus at the touch position, for example, a certain focal person, that is, the context described focus object.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,处理器110根据角度计算出光学防抖模组192需要补偿的距离,通过光学防抖模组192控制镜头反向运动抵消电子设备100的抖动,实现防抖。在本申请实施例中,当拍摄视频时启动了抖动拍摄模式,电子设备100可以设置在防抖拍摄模式下关闭摄像头模组中的防抖系统工作,例如抑制防抖算法执行,以利于在所拍摄视频中通过控制马达191或者摄像头模组中马达振动、或者通过光学防抖模组192控制镜头抖动等来实现在所拍摄视频中呈现抖动特效的目的。在另一些实施例中,也可以通过在电子设备100的防抖系统中的防抖算法基础上增加抖动算法,使得在抖动拍摄模式下电子设备100的处理器110基于陀螺仪传感器180B检测到的抖动角度所计算出的需要补偿的距离呈倍数变大,从而以过度补偿距离的方式实现在所拍摄视频中呈现抖动特效的目的,在此不做限制。在另一些实施例中,当电子设备100进入抖动拍摄模式,处理器110还可以控制向防抖系统发送包含虚假补偿距离的虚假防抖指令,以实现控制光学防抖模组192主动控制镜头抖动从而产生抖动效果来实现在所拍摄视频中呈现抖动特效视频的目的,在此不做限制。其中,电子设备100的摄像头模组中防抖系统以及光学防抖模组192的相关工作原理将在下文详细描述,在此不再赘述。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, and the processor 110 calculates the distance to be compensated by the optical anti-shake module 192 according to the angle, and the optical anti-shake module 192 controls the lens to reverse The movement counteracts the shake of the electronic device 100 to achieve anti-shake. In the embodiment of the present application, when the shaking shooting mode is started when shooting a video, the electronic device 100 can be set to turn off the work of the anti-shaking system in the camera module in the anti-shaking shooting mode, for example, to suppress the execution of the anti-shaking algorithm, so as to facilitate In shooting video, the purpose of presenting shaking special effects in the captured video is achieved by controlling the vibration of the motor 191 or the motor in the camera module, or controlling the lens shake through the optical anti-shake module 192 . In some other embodiments, it is also possible to add a shaking algorithm based on the anti-shaking algorithm in the anti-shaking system of the electronic device 100, so that in the shaking shooting mode, the processor 110 of the electronic device 100 detects the vibration based on the gyroscope sensor 180B The distance to be compensated calculated by the jitter angle becomes multiplied, so that the purpose of presenting a jitter special effect in the captured video is achieved by over-compensating the distance, which is not limited here. In some other embodiments, when the electronic device 100 enters the shaking shooting mode, the processor 110 can also control to send a false anti-shake command including a false compensation distance to the anti-shake system, so as to control the optical anti-shake module 192 to actively control the lens shake In this way, a shake effect is generated to achieve the purpose of presenting a shake special effect video in the captured video, which is not limited here. Wherein, the relevant working principles of the anti-shake system in the camera module of the electronic device 100 and the optical anti-shake module 192 will be described in detail below, and will not be repeated here.
加速度传感器180C可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备100的姿态,应用于横竖屏切换,计步器等应用。在本申请实施例中,加速度传感器180C可以用于识别电子设备100拍摄视频时,处于竖屏姿态或者横屏姿态,以适应性的调整相机拍摄界面的显示形式。The acceleration sensor 180C can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to recognize the posture of the electronic device 100, and be applied to applications such as horizontal and vertical screen switching, pedometer, etc. In the embodiment of the present application, the acceleration sensor 180C may be used to identify whether the electronic device 100 is in a portrait posture or a landscape posture when shooting a video, so as to adaptively adjust the display form of the camera shooting interface.
距离传感器180D,用于测量距离。电子设备100可以通过红外或激光测量距离。在本申请实施例中,视频拍摄场景中,电子设备100可以利用距离传感器180D测距以实现自动快速对焦。The distance sensor 180D is used to measure the distance. The electronic device 100 may measure the distance by infrared or laser. In the embodiment of the present application, in a video shooting scene, the electronic device 100 may use the distance sensor 180D for distance measurement to achieve automatic and fast focusing.
触摸传感器180E,也称“触控器件”。触摸传感器180E可以设置于显示屏194,由触摸传感器180E与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180E用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180E is also called "touch device". The touch sensor 180E may be disposed on the display screen 194, and the touch sensor 180E and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180E is used to detect a touch operation acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
环境光传感器180F用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180F也可用于拍照时自动调节白平衡。环境光传感器180F还可以与接近光传感器配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180F is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180F can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180F can also cooperate with the proximity light sensor to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。电子设备100中常用的马达191包括线性马达和转子马达,其中线性马达可支持对振动强度、振动频率等的精准控制,同时启停延时性能也较强。在本申请的实施例中,可以通过设置马达191的振动参数,包括上述振动方向、振动幅度、振动频率等,来实现在所拍摄视频中呈现抖动特效。在另一些实施例中,抖动拍摄模式下也可以通过控制电子设备100的摄像头模组中的马达(例如音圈马达)振动实现在所拍摄视频中呈现抖动特效的目的,在此不做限制。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization. The motor 191 commonly used in the electronic device 100 includes a linear motor and a rotor motor. The linear motor can support precise control of vibration intensity, vibration frequency, etc., and has a strong start-stop delay performance. In the embodiment of the present application, it is possible to present shaking special effects in the captured video by setting the vibration parameters of the motor 191 , including the above-mentioned vibration direction, vibration amplitude, and vibration frequency. In some other embodiments, in the jitter shooting mode, the purpose of presenting jitter special effects in the captured video can also be achieved by controlling the vibration of a motor (such as a voice coil motor) in the camera module of the electronic device 100 , which is not limited here.
为了便于描述,下面以电子设备100为手机100作为示例,详细介绍本申请方案的具体实施过程。另外,为了便于描述,以下描述中均以图3所示的马达191为例,描述通过马达振动实现在所拍摄视频中呈现抖动特效的目的。For the convenience of description, the following takes the mobile phone 100 as the electronic device 100 as an example to introduce the specific implementation process of the solution of the present application in detail. In addition, for the convenience of description, the motor 191 shown in FIG. 3 is taken as an example in the following description, and the purpose of presenting a shaking special effect in the captured video through vibration of the motor is described.
作为示例,图4示出了一种基于所采集的音频数据转换为相应的抖动参数,以实现在所拍摄视频中呈现抖动特效的示意性过程。As an example, FIG. 4 shows a schematic process of converting the collected audio data into corresponding shaking parameters, so as to present shaking special effects in the captured video.
如图4所示,手机100打开相机应用拍摄视频的过程中,麦克风170C可以采集实时音频数据,摄像头193可以采集实时的图像数据,手机100的处理器110或图像处理器能够基于所采集的图像数据提取上述焦点数据。As shown in FIG. 4 , when the mobile phone 100 opens the camera application to shoot video, the microphone 170C can collect real-time audio data, the camera 193 can collect real-time image data, and the processor 110 or image processor of the mobile phone 100 can collect real-time audio data based on the collected images. Data Extraction Focus data as described above.
作为示例,处理器110可以获取麦克风170C所采集的音频数据,并将任一时刻的音频数据通过运行相关算法提取音频特征值,例如音频的采样率、频率、响度等。在一些实施例中,基于上述提取得到的音频特征值,处理器110可以通过运行相关算法将提取的上述音频特征值转换为马达191的振动参数,例如转换为马达191的振动方向、振动频率、振动幅度以及振动时长等参数,使线性马达产生振动以产生抖动特效。As an example, the processor 110 may obtain the audio data collected by the microphone 170C, and run the audio data at any moment to extract audio feature values, such as audio sampling rate, frequency, loudness, etc. In some embodiments, based on the extracted audio feature value, the processor 110 can convert the extracted audio feature value into the vibration parameters of the motor 191 by running related algorithms, such as the vibration direction, vibration frequency, Parameters such as vibration amplitude and vibration duration make the linear motor vibrate to produce jitter effects.
在另一些实施例中,处理器110也可以通过运行相关算法将提取的上述音频特征值转换为光学防抖模组192中的镜头抖动参数,例如转换为光学防抖模组192控制镜头抖动过程中的抖动位移大小、抖动方向、抖动速度或抖动频率等参数,使光学防抖模组192控制镜头产生相应位移以产生抖动特效。In some other embodiments, the processor 110 may also convert the extracted audio feature values into lens shake parameters in the optical anti-shake module 192 by running related algorithms, for example, converting the optical anti-shake module 192 to control the lens shake process The parameters such as the shaking displacement, shaking direction, shaking speed, or shaking frequency in the lens enable the optical anti-shaking module 192 to control the lens to generate a corresponding displacement to generate a special shaking effect.
在另一些实施例中,处理器110还可以通过运行相关算法将提取的上述音频特征值转换为实时图像的变化参数、或者转换为实时图像中的焦点对象的变化参数,其中实时图像为手机100的摄像头193实时采集的镜头能够捕捉到的画面整体的图像数据,实时图像中的焦点对象则是摄像头193采集图像数据时镜头聚焦的目标焦点,从实时图像中提取焦点对象例如可以通过抠图算法来实现,在此不做限制。上述变化数据包括实时图像或实时图像中的焦点对象在三维空间方向(XYZ轴方向)上的位移大小、移动方向(包括XZ轴方向上的左右上下位移变化、以及Y轴方向上的远近位移变化)、移动速度或移动频率、以及轮廓尺寸变化等参数,进而控制实时图像或实时图像中的焦点对象产生相应的位移以呈现抖动特效。In some other embodiments, the processor 110 may also convert the extracted audio feature value into a change parameter of a real-time image, or into a change parameter of a focus object in a real-time image by running a related algorithm, wherein the real-time image is the mobile phone 100 The camera 193 real-time acquisition lens can capture the overall image data of the picture, the focus object in the real-time image is the target focus of the lens when the camera 193 collects the image data, and the focus object can be extracted from the real-time image, for example, by a matting algorithm to achieve, without limitation. The above-mentioned change data includes the real-time image or the displacement of the focus object in the real-time image in the three-dimensional space direction (XYZ axis direction), the moving direction (including the left, right, up and down displacement changes in the XZ axis direction, and the far and near displacement changes in the Y axis direction) ), the moving speed or moving frequency, and the change of outline size and other parameters, and then control the real-time image or the corresponding displacement of the focus object in the real-time image to present a shaking effect.
可以理解,在另一些实施例中,处理器110也可以基于手机100上的其他感知元件所采集的视频拍摄现场的其他数据进行特征值提取,并判断是否满足抖动触发条件,再发起其他能够产生抖动特效的电子元件发起相应的抖动来实现,在此不做限制。It can be understood that, in some other embodiments, the processor 110 can also perform feature value extraction based on other data of the video shooting scene collected by other sensing elements on the mobile phone 100, and determine whether the shaking trigger condition is met, and then initiate other functions that can generate The electronic components of the shaking special effect initiate corresponding shaking to realize, and there is no limitation here.
例如,在另一些实施例中,处理器110还可以获取摄像头193所采集的图像数据并提取关于所拍摄的目标焦点的焦点数据,进而基于焦点数据分析连续时间段内焦点对象的变化特征值,该变化特征值表征的是例如焦点人物的位移、跳动或身体抖动以及该焦点人物在摄像头193捕捉的画面中变大变小等变化所产生的变化特征,处理器110例如可以通过运行相关算法针对上述焦点数据计算变化特征值,例如计算焦点对象的位移大小、焦点对象的图像轮廓尺寸变化值等,处理器110再通过运行相关算法将计算得到的各特征值转换为上述马达191的振动参数、或者转换上述光学防抖模组192中的镜头抖动参数、又或者转换为上述实时图像中焦点对象的变化参数等,实现抖动特效,在此不做限制。上述提取特征值以及数据转换的过程等,将在下文详细描述,在此不再赘述。For example, in some other embodiments, the processor 110 may also acquire the image data collected by the camera 193 and extract the focus data about the captured target focus, and then analyze the change characteristic value of the focus object in a continuous period of time based on the focus data, The change characteristic value represents the change characteristics such as the displacement, jumping or body shaking of the focus person, and the change of the focus person in the picture captured by the camera 193. The processor 110 can, for example, run a related algorithm for The above-mentioned focus data calculates change characteristic values, such as calculating the displacement of the focus object, the change value of the image outline size of the focus object, etc., and the processor 110 converts the calculated characteristic values into the vibration parameters of the motor 191, Either convert the lens shake parameters in the optical anti-shake module 192, or convert them into the change parameters of the focus object in the real-time image, etc., to realize the shake special effect, which is not limited here. The process of extracting feature values and data conversion described above will be described in detail below, and will not be repeated here.
可以理解,在另一些实施例中,手机100也可以基于摄像头193所采集的焦点数据,提取焦点图像中焦点对象的变化特征值,例如焦点对象的位移大小、移动方向、焦点对象的移动频率等,再将焦点对象的变化特征值转换为上述线性马达的振动参数、光学防抖模组中的镜头抖动参数或者焦点对象的变化参数等,来实现在所拍摄视频中呈现抖动特效的目的,在此不做限制。基于焦点对象的变化特征值转换为相应的抖动参数的过程,将在下文详细描述,在此不再赘述。It can be understood that, in some other embodiments, the mobile phone 100 can also extract the change characteristic value of the focus object in the focus image based on the focus data collected by the camera 193, such as the displacement, movement direction, and movement frequency of the focus object, etc. , and then convert the change characteristic value of the focus object into the vibration parameters of the above-mentioned linear motor, the lens shake parameters in the optical image stabilization module, or the change parameters of the focus object, etc., to achieve the purpose of presenting special shaking effects in the captured video. This is not limited. The process of converting the characteristic value based on the change of the focus object into the corresponding dithering parameter will be described in detail below and will not be repeated here.
具体地,图5示出了本申请的视频拍摄方法的实施流程示意图。可以理解,图5所示流程的各步骤执行主体均为手机100,具体地,手机100的处理器110通过控制器控制执行图5所示视频拍摄方法的实施流程。Specifically, FIG. 5 shows a schematic flow chart of the implementation of the video shooting method of the present application. It can be understood that each step of the process shown in FIG. 5 is executed by the mobile phone 100. Specifically, the processor 110 of the mobile phone 100 controls and executes the implementation process of the video shooting method shown in FIG. 5 through the controller.
如图5所示,该流程包括以下步骤:As shown in Figure 5, the process includes the following steps:
501:响应于用户操作,启动相机拍摄视频。501: In response to a user operation, start a camera to shoot a video.
具体地,用户可以操作手机100,在手机100的桌面应用图标中找到相机应用图标并点击该图标,启动相机后选择录像功能拍摄视频。Specifically, the user can operate the mobile phone 100, find the camera application icon in the desktop application icons of the mobile phone 100 and click the icon, start the camera, and select the recording function to shoot a video.
手机100启动相机后供用户选择录像功能的用户界面User Interface,UI)可以参考图6A所示,用户可以在手机100运行相机应用所打开的UI界面601上左右滑动模式菜单栏602选择录像模式,参考图6A所示的操作①。After the mobile phone 100 starts the camera, the user interface (User Interface, UI) for the user to select the video recording function can be referred to as shown in FIG. Refer to operation ① shown in Fig. 6A.
502:所运行的相机应用进入抖动拍摄模式。502: The running camera application enters a shake shooting mode.
具体地,手机100可以响应于用户的选择操作进入抖动拍摄模式,也可以基于麦克风170C所采集的音频数据和/或摄像头193所采集的焦点图像中焦点对象的变化数据判断是否达到适合使用抖动拍摄模式的预设条件,来进入抖动拍摄模式。可以理解,抖动拍摄模式是指可以在拍摄视频的过程中在某些时间节点上呈现抖动特效的拍摄模式。Specifically, the mobile phone 100 can enter the shake shooting mode in response to the user's selection operation, and can also determine whether it is suitable for using shake shooting based on the audio data collected by the microphone 170C and/or the change data of the focus object in the focus image collected by the camera 193. The preset conditions of the mode to enter the shaking shooting mode. It can be understood that the jittering shooting mode refers to a shooting mode that can present jittering special effects at certain time nodes during video shooting.
作为示例,使手机100进入抖动拍摄模式的方式可以参考图6A至6C所示。As an example, the manner of making the mobile phone 100 enter the shake shooting mode may refer to FIGS. 6A to 6C .
如图6A所示,用户可以手机100运行相机应用所打开的UI界面601所显示的模式菜单栏602中左右滑动选择录像选项603,参考图6A所示的操作①,并在录像模式对应的UI界面604上点击抖动模式勾选按钮605,参考图6A所示的操作②,勾选抖动模式,进入抖动拍摄模式。As shown in Figure 6A, the user can slide left and right in the mode menu bar 602 displayed in the mode menu bar 602 displayed on the UI interface 601 opened by running the camera application on the mobile phone 100 to select the recording option 603, refer to the operation ① shown in Figure 6A, and click on the UI corresponding to the recording mode Click the shake mode check button 605 on the interface 604, refer to the operation ② shown in FIG. 6A, check the shake mode, and enter the shake shooting mode.
如图6B所示,手机100运行相机应用所打开的UI界面601所显示的模式菜单栏602中包括抖动拍摄选项606,用户可以在UI界面606所显示的模式菜单栏602上左右滑动选择抖动拍摄选项606,参考图6B所示的操作①,进入抖动拍摄模式。As shown in FIG. 6B , the mode menu bar 602 displayed on the UI interface 601 opened by running the camera application on the mobile phone 100 includes a shaking shooting option 606, and the user can slide left and right on the mode menu bar 602 displayed on the UI interface 606 to select shaking shooting Option 606, refer to operation ① shown in FIG. 6B , to enter the shaking shooting mode.
可以理解,图6A所示的操作①与图6B所示的操作①的操作方式相同。It can be understood that the operation ① shown in FIG. 6A is the same as the operation ① shown in FIG. 6B .
如图6C所示,作为示例,手机100中预设有一些适合以呈现抖动特效的方式增强情感表达的视频拍摄场景,例如上述图2所示的各种场景,用户在手机100打开的相机界面所显示的模式菜单栏602中左右滑动选择录像选项603后,在拍摄视频的过程中,手机100基于麦克风170C所采集的音频数据和/或摄像头193所采集的焦点图像中焦点对象的变化数据判断当前的视频拍摄场景为演唱会场景,适于采用抖动拍摄模式拍摄视频,则手机100的显示屏194上可以显示弹窗提示,提示内容例如是“检测到演唱会场景,是否启用抖动拍摄模式?”,参考图6C所示的弹窗607,用户可以点击“开启”进入抖动拍摄模式,参考图6C所示的操作③。可以理解,在图6C所示的弹窗607中,用户也可以点击“不开启”或者该弹窗607右上角的关闭按钮608,关闭该弹窗,继续采用当前的拍摄模式拍摄视频。As shown in Figure 6C, as an example, some video shooting scenes suitable for enhancing emotional expression by presenting shaking special effects are preset in the mobile phone 100, such as the various scenes shown in Figure 2 above, the camera interface opened by the user on the mobile phone 100 After sliding left and right in the displayed mode menu bar 602 to select the recording option 603, during the process of shooting video, the mobile phone 100 judges based on the audio data collected by the microphone 170C and/or the change data of the focus object in the focus image collected by the camera 193. The current video shooting scene is a concert scene, and it is suitable to use the shaking shooting mode to shoot video. Then, a pop-up window prompt can be displayed on the display screen 194 of the mobile phone 100, and the prompt content is, for example, "A concert scene is detected, whether to enable the shaking shooting mode?" ", referring to the pop-up window 607 shown in Figure 6C, the user can click "Open" to enter the shake shooting mode, refer to the operation ③ shown in Figure 6C. It can be understood that in the pop-up window 607 shown in FIG. 6C , the user can also click "not open" or the close button 608 in the upper right corner of the pop-up window 607 to close the pop-up window and continue to shoot video in the current shooting mode.
另外可以理解,参考图6C所示界面,在另一些实施例中,手机100中也可以没有预设场景或者所预设的场景中不包括演唱会等场景,但手机100上安装的备忘录应用中添加了参加演唱会的备忘事项,或者手机100上安装的日历应用中设置了一个关于某个演唱会的日程提醒,又或者手机100上安装的某票务应用中生成了一个演唱会门票订单自动添加的一个日程提醒等,手机100可以获取备忘录、日历等应用中记录的演唱会时间并在该时间内检测用户是否打开相机应用拍摄视频,如果手机100检测到上述记录的演唱会时间内用户点击相机应用拍摄视频时,可以显示图6C所示的弹窗通知,该通知的内容可以不同于图6C所示通知内容,例如可以参考“系统检测到您的日程提醒中记录的演唱会时间已到,请问您现在是否需要启用抖动拍摄模式”,在另一些实施例中,手机100可以获取的日程提醒等也可以是不限于演唱会的其他拍摄场景,例如街舞比赛等,手机100运行相机应用时显示的通知也可以是其他形式以及其他内容,在此不做限制。In addition, it can be understood that referring to the interface shown in FIG. 6C , in other embodiments, there may be no preset scene in the mobile phone 100 or the preset scene does not include scenes such as concerts, but the memo application installed on the mobile phone 100 A memorandum for attending a concert is added, or a schedule reminder about a certain concert is set in the calendar application installed on the mobile phone 100, or a concert ticket order is automatically generated in a certain ticketing application installed on the mobile phone 100. Added a schedule reminder, etc., the mobile phone 100 can obtain the concert time recorded in applications such as memos and calendars, and detect whether the user opens the camera application to shoot videos within this time. If the mobile phone 100 detects that the user clicks on the When the camera app shoots a video, it can display a pop-up notification as shown in Figure 6C. The content of the notification can be different from that shown in Figure 6C. For example, you can refer to "The system detected that the concert time recorded in your schedule reminder has arrived , do you need to enable the shaking shooting mode now?" In other embodiments, the schedule reminders that the mobile phone 100 can obtain may also be other shooting scenes that are not limited to concerts, such as hip-hop competitions, etc. When the mobile phone 100 runs the camera application The displayed notice may also be in other forms and other content, which is not limited here.
在另一些实施例中,如上所示,手机100中也可以预设特征值判断条件,从而在拍摄视频的过程中,手机100可以基于麦克风170C所采集的音频数据和/或摄像头193所采集的焦点图像的图像变化数据提取相应的特征值,并判断所提取的特征值是否达到适于采用抖动拍摄模式的预设条件,从而提示用户采用抖动拍摄模式,提示方式可以参考上述图6C所示弹窗607,也可以采用其他提示方式,在此不做限制。In some other embodiments, as shown above, the mobile phone 100 can also preset feature value judgment conditions, so that in the process of shooting video, the mobile phone 100 can be based on the audio data collected by the microphone 170C and/or the audio data collected by the camera 193. Extract the corresponding eigenvalues from the image change data of the focus image, and judge whether the extracted eigenvalues meet the preset conditions suitable for adopting the jitter shooting mode, thereby prompting the user to adopt the jitter shooting mode. Window 607 may also use other prompting methods, which are not limited here.
503:获取实时的音频数据和/或图像数据等视频数据。503: Obtain video data such as real-time audio data and/or image data.
具体地,视频拍摄过程中,手机100运行的相机应用采集实时视频数据,该视频数据包括但不限于手机100上的麦克风170C采集的实时音频数据,摄像头193采集的实时图像数据;手机100的处理 器110可以获取麦克风170C采集的实时音频数据,以及摄像头193实时采集的图像数据,并提取与相应图像数据相对应的焦点数据。可以理解,在不同时刻获取的焦点图像中,焦点对象的位置、轮廓尺寸大小、清晰或模糊的程度等都有可能发生变化。Specifically, during the video shooting process, the camera application running on the mobile phone 100 collects real-time video data, which includes but is not limited to real-time audio data collected by the microphone 170C on the mobile phone 100, real-time image data collected by the camera 193; the processing of the mobile phone 100 The controller 110 can acquire the real-time audio data collected by the microphone 170C and the image data collected by the camera 193 in real time, and extract focus data corresponding to the corresponding image data. It can be understood that, in the focus images acquired at different times, the position, outline size, and degree of clarity or blur of the focus object may change.
504:基于音频数据提取相应的音频特征值,和/或基于图像数据提取相应的焦点对象变化特征值。504: Extract corresponding audio feature values based on audio data, and/or extract corresponding focus object change feature values based on image data.
具体地,手机100的处理器110可以基于获取的实时音频数据提取音频特征值,例如,基于该实时音频数据可以提取音频的采样率、频率、响度等;手机100的处理器110也可以基于获取的实时图像数据提取得到的焦点数据,计算得到表征焦点对象变化特征的相关的特征值,例如焦点对象的位移大小、焦点对象的移动速度或移动频率、以及焦点对象的轮廓尺寸变化值等。Specifically, the processor 110 of the mobile phone 100 can extract audio feature values based on the acquired real-time audio data, for example, the sampling rate, frequency, loudness, etc. of the audio can be extracted based on the real-time audio data; The focus data extracted from the real-time image data is used to calculate the relevant feature values that characterize the change characteristics of the focus object, such as the displacement of the focus object, the moving speed or frequency of the focus object, and the change value of the outline size of the focus object.
其中,采样率即采样频率,也称为采样速度或者采样率,定义了每秒从连续的音频信号中提取并组成离散信号的采样个数,它用赫兹(Hz)来表示。Among them, the sampling rate is the sampling frequency, also known as sampling speed or sampling rate, which defines the number of samples extracted from continuous audio signals and composed of discrete signals per second, which is expressed in Hertz (Hz).
频率,即声音的振动频率,表征单位时间内音频周期性振动的次数。Frequency, that is, the vibration frequency of sound, represents the number of periodic audio vibrations per unit time.
响度,又称声强或音量,表示的是声音能量的强弱程度,主要取决于声波振幅的大小。声音的响度一般用声压(达因/平方厘米)或声强(瓦特/平方厘米)来计量,升压的单位为帕(Pa),它与基准声压比值的对数值称为声压级,单位是分贝(dB)。Loudness, also known as sound intensity or volume, indicates the strength of sound energy, which mainly depends on the amplitude of sound waves. The loudness of sound is generally measured by sound pressure (dyne/cm2) or sound intensity (watt/cm2), and the unit of boost pressure is Pa (Pa), and the logarithmic value of its ratio to the reference sound pressure is called the sound pressure level , the unit is decibel (dB).
焦点对象的位移例如可以基于相邻时刻所采集的焦点图像中焦点对象所处位置的变化值来确定。The displacement of the focus object can be determined based on, for example, the change value of the position of the focus object in focus images collected at adjacent moments.
焦点对象的移动速度例如可以是单位时间内焦点图像的移动距离来确定。The moving speed of the focus object can be determined by, for example, the moving distance of the focus image per unit time.
焦点对象的移动频率例如可以通过单位时间内焦点图像的位置移动次数来确定。The frequency of movement of the focus object can be determined by, for example, the number of times the position of the focus image moves per unit time.
焦点对象的图像轮廓尺寸变化值例如可以基于相邻时刻所采集的焦点图像中焦点对象的轮廓尺寸大小的变化差值来确定。The change value of the image outline size of the focus object may be determined based on, for example, the change difference value of the outline size of the focus object in focus images collected at adjacent moments.
505:基于音频特征值和/或焦点对象变化特征值,判断是否满足抖动触发条件。若是,则执行步骤506;若否,则返回步骤503。505: Based on the audio feature value and/or the focus object change feature value, determine whether a shaking trigger condition is met. If yes, execute step 506; if no, return to step 503.
具体地,手机100基于上述步骤504中提取得到的音频特征值和/或焦点图像中焦点对象的变化特征值,判断是否满足触发抖动的抖动触发条件。可以理解,判断是否满足抖动触发条件可以通过多种方式,作为示例,可以通过下列两种方式中的任一种方式来判断。Specifically, the mobile phone 100 determines whether the shaking trigger condition for triggering shaking is met based on the audio feature value extracted in step 504 and/or the change feature value of the focus object in the focus image. It can be understood that judging whether the shaking trigger condition is met can be done in a variety of ways, as an example, it can be judged in any one of the following two ways.
其一,手机100中预设音频特征值阈值作为判断条件。例如,手机100中预设音频响度阈值设置为90dB,采样率阈值设置为50Hz,频率阈值设置为100Hz,则当上述步骤504中提取得到的音频特征值中,如果音频响度高于90dB、和/或音频采样率高于50Hz、和/或音频频率高于100Hz时,则可以确定当前采集的音频数据所对应的音频特征值满足抖动触发条件。Firstly, the mobile phone 100 presets an audio feature value threshold as a judgment condition. For example, the preset audio loudness threshold in the mobile phone 100 is set to 90dB, the sampling rate threshold is set to 50Hz, and the frequency threshold is set to 100Hz, then when the audio feature values extracted in the above step 504, if the audio loudness is higher than 90dB, and/ Or when the audio sampling rate is higher than 50 Hz, and/or the audio frequency is higher than 100 Hz, it may be determined that the audio feature value corresponding to the currently collected audio data satisfies the jitter trigger condition.
其二,手机100中预设焦点对象变化特征值阈值作为判断条件。例如,手机100中预设焦点图像中焦点对象的位移阈值为20mm、焦点对象的移动频率阈值为50Hz、焦点对象的轮廓尺寸变化值阈值为10%,则当上述步骤504中提取得到的焦点图像中焦点对象的变化特征值中,如果焦点对象的位移大于20mm、和/或焦点对象的移动频率高于50Hz、和/或焦点对象的轮廓尺寸变化值超过10%,则可以确定当前采集的图像数据所对应的焦点对象变化特征值满足抖动触发条件。Second, the mobile phone 100 presets a focus object change characteristic value threshold as a judgment condition. For example, the mobile phone 100 presets the displacement threshold of the focus object in the focus image as 20 mm, the movement frequency threshold of the focus object as 50 Hz, and the outline size change threshold of the focus object as 10%, then when the focus image extracted in the above step 504 In the change characteristic value of the focus object, if the displacement of the focus object is greater than 20 mm, and/or the movement frequency of the focus object is higher than 50 Hz, and/or the change value of the outline size of the focus object exceeds 10%, the currently acquired image can be determined The change characteristic value of the focus object corresponding to the data satisfies the jitter trigger condition.
其三,手机100中预设音频特征值阈值和焦点对象变化特征值阈值作为共同的判断条件。例如,手机100中预设上述音频特征值中的一种或多种、以及上述焦点对象变化特征值中的一种或多种,综合作为判断是否满足抖动触发条件的判断条件,各特征值阈值示例,参考上述相关描述,在此不再赘述。Thirdly, the mobile phone 100 presets the audio feature value threshold and the focus object change feature value threshold as common judgment conditions. For example, one or more of the above-mentioned audio feature values and one or more of the above-mentioned focus object change feature values are preset in the mobile phone 100, and are comprehensively used as a judgment condition for judging whether the shaking trigger condition is met, and each feature value threshold For an example, refer to the relevant description above, and details are not repeated here.
506:基于音频特征值和/或焦点对象的变化特征值,转换得到抖动参数。506: Based on the audio feature value and/or the change feature value of the focus object, convert to obtain a dither parameter.
具体地,当上述步骤505中,基于音频数据特征值和/或焦点图像中焦点对象的变化特征值判断满 足抖动触发条件需要触发抖动时,手机100的处理器110可以运行相关算法将上述步骤540中提取得到的音频特征值和/或焦点图像中焦点对象的变化特征值转换为马达191的振动参数,或者转换为光学防抖模组192中的镜头抖动参数,或者转换为实时图像或焦点对象的位移参数,以用于后续步骤中控制抖动效果,上述振动参数或位移参数可以统称为抖动参数。Specifically, when in the above step 505, based on the feature value of the audio data and/or the change feature value of the focus object in the focus image, it is judged that the shaking trigger condition needs to be triggered, the processor 110 of the mobile phone 100 can run a related algorithm to convert the above step 540 Convert the audio feature value extracted from and/or the change feature value of the focus object in the focus image into the vibration parameter of the motor 191, or into the lens shake parameter in the optical anti-shake module 192, or into a real-time image or focus object The displacement parameters are used to control the shaking effect in subsequent steps, and the above vibration parameters or displacement parameters can be collectively referred to as shaking parameters.
可以理解,上述抖动参数包括但不限于抖动方向、抖动幅度、抖动频率等参数。作为示例,该抖动参数可以对应于马达191的振动方向、振动幅度、振动频率等振动参数,例如基于上述步骤505中的实时音频数据提取得到的音频特征值,转换为马达191的上述振动参数。手机100的处理器110基于马达191的振动参数便可以控制马达191发起对应于该振动参数的相应振动,此时手机100带动摄像头模组随马达191的振动而产生振动,此时,摄像头模组由于振动无法聚焦,因此在所拍摄的视频画面中则呈现为焦点对象具有位移、虚影等效果的抖动特效。在另一些实施例中,也可以基于上述步骤505中的实时图像数据提取焦点数据并计算得到的焦点对象的变化特征值转换为马达191的上述振动参数,在此不做限制。It can be understood that the above shaking parameters include but not limited to shaking direction, shaking amplitude, shaking frequency and other parameters. As an example, the vibration parameters may correspond to vibration parameters such as the vibration direction, vibration amplitude, and vibration frequency of the motor 191, for example, based on the audio feature values extracted from the real-time audio data in step 505 above, converted into the above vibration parameters of the motor 191. The processor 110 of the mobile phone 100 can control the motor 191 to initiate a corresponding vibration corresponding to the vibration parameter based on the vibration parameter of the motor 191. At this time, the mobile phone 100 drives the camera module to vibrate with the vibration of the motor 191. At this time, the camera module Because the vibration cannot be focused, the captured video will appear as a jittering special effect of the focus object with effects such as displacement and ghosting. In some other embodiments, the focus data may also be extracted based on the real-time image data in step 505 and the calculated change characteristic value of the focus object may be converted into the above vibration parameters of the motor 191 , which is not limited here.
可以理解,在抖动拍摄模式下,手机100的处理器110可以控制关闭与摄像头模组相应的防抖系统的防抖功能,以使上述马达191的振动能够在所拍摄视频中呈现明显的抖动效果。在另一些实施例中,上述抖动参数也可以对应于摄像头模组中的马达的振动参数,在此不再赘述。It can be understood that in the shaking shooting mode, the processor 110 of the mobile phone 100 can control to turn off the anti-shake function of the anti-shake system corresponding to the camera module, so that the vibration of the above-mentioned motor 191 can present an obvious shaking effect in the captured video. . In some other embodiments, the above shaking parameters may also correspond to the vibration parameters of the motor in the camera module, which will not be repeated here.
作为示例,上述抖动参数还可以对应于光学防抖模组192控制镜头进行补偿移动的位移大小、移动方向、移动速度或移动频率等补偿参数,例如基于上述步骤505中的实时音频数据提取得到的音频特征值,转换为光学防抖模组192中的上述位移参数。如上所述,当拍摄视频时启动了抖动拍摄模式,手机100可以设置在防抖拍摄模式下关闭摄像头模组中的防抖系统工作,手机100的处理器110基于计算得到的光学防抖模组192中的镜头抖动参数控制镜头产生相应抖动,此时,摄像头模组由于振动无法聚焦,因此在所拍摄的视频画面中则呈现为焦点对象具有位移、虚影等效果的抖动特效。在另一些实施例中,也可以基于上述步骤505中的实时图像数据提取焦点数据并计算得到的焦点对象的变化特征值转换为光学防抖模组192中的上述位移参数,在此不做限制。As an example, the above shake parameters may also correspond to compensation parameters such as the displacement, direction, speed, or frequency of the optical image stabilization module 192 to control the lens to perform compensation, for example, based on the real-time audio data extracted in step 505 above. The audio characteristic value is converted into the above-mentioned displacement parameter in the optical anti-shake module 192 . As mentioned above, when the shaking shooting mode is started when shooting a video, the mobile phone 100 can be set to turn off the anti-shaking system in the camera module in the anti-shaking shooting mode, and the processor 110 of the mobile phone 100 is based on the calculated The lens shake parameter in 192 controls the lens to vibrate accordingly. At this time, the camera module cannot focus due to the vibration, so in the captured video screen, the focus object has a shaking effect such as displacement and ghosting. In some other embodiments, the focus data can also be extracted based on the real-time image data in step 505 above, and the calculated change characteristic value of the focus object can be converted into the above displacement parameters in the optical anti-shake module 192, which is not limited here. .
可以理解,手机100的防抖系统例如可以是基于光学稳定(Optical Image Stabilization,OIS)技术的防抖系统,该技术主要通过运行防抖算法通过光学防抖模组192控制镜头进行位移补偿以实现防抖,其中,基于OIS系统实现防抖的原理参考图7所示,当镜头曝光期间手机100发生运动时,图像传感器用于感光并将光信号转换为模拟的图像信号,并将模拟的图像转换为数据图像后发送给图像处理器进行处理,OIS控制器读取陀螺仪传感器180B的数据获取到手机的运动数据,OIS控制器根据运动数据推动X轴OIS马达在X轴方向上移动镜头,并推动Y轴OIS马达在Y轴方向上移动镜头。X轴霍尔传感器检测镜头在X轴方向上的移动,Y轴霍尔传感器检测镜头在Y轴方向上的移动,Y轴霍尔传感器将镜头在Y轴方向上移动的实时位置传给OIS控制器,OIS控制器根据新的镜头位置和陀螺仪传感器180B获取的新的运动数据继续推动镜头移动,因而可以连续的实现闭环防抖控制。在此不再赘述。It can be understood that the anti-shake system of the mobile phone 100 may be, for example, an anti-shake system based on Optical Image Stabilization (OIS) technology. Anti-shake, wherein, the principle of anti-shake based on the OIS system is shown in FIG. 7 , when the mobile phone 100 moves during lens exposure, the image sensor is used to sense light and convert the light signal into an analog image signal, and convert the analog image After being converted into a data image, it is sent to the image processor for processing. The OIS controller reads the data of the gyroscope sensor 180B to obtain the motion data of the mobile phone. The OIS controller drives the X-axis OIS motor to move the lens in the X-axis direction according to the motion data. And push the Y-axis OIS motor to move the lens in the Y-axis direction. The X-axis Hall sensor detects the movement of the lens in the X-axis direction, the Y-axis Hall sensor detects the movement of the lens in the Y-axis direction, and the Y-axis Hall sensor transmits the real-time position of the lens moving in the Y-axis direction to the OIS control The OIS controller continues to move the lens according to the new lens position and the new motion data acquired by the gyroscope sensor 180B, so that the closed-loop anti-shake control can be realized continuously. I won't repeat them here.
作为示例,上述抖动参数还可以对应于焦点对象的位移大小、移动方向、移动速度或移动频率,画面亮度,画面滤镜等参数,例如基于上述步骤505中的实时音频数据提取得到的音频特征值转换为实时图像的变化参数,或者转换为实时图像中焦点对象的变化参数,手机100的处理器110或者图像信号处理器(Image Signal Processor,ISP)基于上述变化参数处理实时图像或者实时图像中的焦点对象产生缩放或者移动等呈现抖动效果。在另一些实施例中,也可以基于上述步骤505中的实时图像数据提取焦点数据并计算得到的焦点对象的变化特征值转换为实时图像或者实时图像中的焦点对象的变化参 数,在此不做限制。对于画面亮度和画面滤镜而言,可以根据获取的音频特征值和/或焦点对象的变化特征值,对应不同的亮度值或者滤镜值,使得画面呈现抖动的效果。As an example, the above shaking parameters may also correspond to parameters such as the displacement, moving direction, moving speed or moving frequency of the focus object, screen brightness, screen filter, etc., for example, based on the audio feature value extracted from the real-time audio data in step 505 above. Converted to the change parameter of the real-time image, or converted to the change parameter of the focus object in the real-time image, the processor 110 or the image signal processor (Image Signal Processor, ISP) of the mobile phone 100 processes the real-time image or the change parameter in the real-time image based on the above-mentioned change parameter The focus object produces a shaking effect such as zooming or moving. In some other embodiments, the focus data can also be extracted based on the real-time image data in step 505 above, and the calculated characteristic value of the focus object can be converted into a real-time image or a change parameter of the focus object in the real-time image, which is not done here. limit. For picture brightness and picture filter, different brightness values or filter values can be corresponding to different brightness values or filter values according to the obtained audio feature value and/or the change feature value of the focus object, so that the picture presents a shaking effect.
可以理解,在另一些实施例中,基于音频特征值和/或焦点对象的变化特征值,转换得到抖动参数的同时,还可以生成与抖动参数相关联的图像亮度变化参数、图像颜色变换参数等,或者同时添加动态图片,例如彩色心形、星形等形状图片等,以起到点缀的效果,在此不做限制。It can be understood that, in some other embodiments, based on the audio feature value and/or the change feature value of the focus object, while converting the dithering parameters, image brightness change parameters, image color transformation parameters, etc. associated with the dithering parameters can also be generated. , or add dynamic pictures at the same time, such as colorful heart-shaped, star-shaped pictures, etc., to achieve the effect of embellishment, and there is no limitation here.
上述数据转换过程以及与抖动模式和抖动参数确定相关的描述,将在下文结合附图详细说明,在此不再赘述。The above data conversion process and the description related to the determination of the jitter mode and the jitter parameter will be described in detail below in conjunction with the accompanying drawings, and will not be repeated here.
507:在视频中的呈现抖动特效,完成具有抖动特效视频的拍摄。507: Presenting the shaking special effect in the video, completing the shooting of the video with the shaking special effect.
具体地,在音频特征值和/或焦点对象变化特征值满足抖动触发条件的某些时间节点上、者某个时间周期内,处理器110基于上述步骤506中得到的马达191的抖动参数控制马达191产生相应振动;或者处理器110基于上述步骤506中得到的光学防抖模组192的相应抖动参数驱动光学防抖模组192控制镜头产生相应位移;或者手机100中的处理器110或者ISP基于上述步骤506中得到的实时图像或实时图像中焦点对象的抖动参数运行相应的图像处理算法控制实时图像或者焦点对象产生实时缩放、位移或画面亮度值的变化,以呈现抖动特效。Specifically, at certain time nodes or within a certain time period when the audio feature value and/or the focus object change feature value meet the shaking trigger condition, the processor 110 controls the motor based on the shaking parameter of the motor 191 obtained in step 506 above. 191 generates corresponding vibrations; or the processor 110 drives the optical anti-shake module 192 to control the lens to generate corresponding displacement based on the corresponding shake parameters of the optical anti-shake module 192 obtained in the above step 506; or the processor 110 in the mobile phone 100 or the ISP based on The real-time image or the shaking parameters of the focus object in the real-time image obtained in the above step 506 runs the corresponding image processing algorithm to control the real-time image or focus object to generate real-time scaling, displacement or screen brightness value changes to present shaking effects.
可以理解,手机100的处理器110控制在视频中的某些时间节点上呈现抖动特效的同时,可以基于上述音频特征值确定是否针对某个时间节点上呈现的抖动特效相应地添加音效节拍或音乐片段,以配合相应的画面抖动呈现更好的抖动特效,例如在拍摄体育竞技的视频时,可以在某个展示技巧的精彩瞬间添加“咚~咚~咚”或者“哇~哇~”之类的特效;在拍摄街舞比赛的视频时,可以在展示街舞技巧的精彩瞬间添加“嘭~嘭~”或者“啪~啪~”之类的特效;或者在拍摄机器人舞视频时,在呈现抖动特效的精彩瞬间添加“滋~滋~滋”之类的特效。在另一些实施例中,如果拍摄视频的现场音乐或者所采集的音频节奏感很强,也比较适合与画面抖动配合呈现抖动特效时,例如在拍摄说唱(rap)表演的视频或者拍摄某些唱跳表演的视频时,背景音乐的节奏感已经很强,此时则可以不需要对画面抖动添加相应的音效节拍以呈现抖动特效,在此不做限制。It can be understood that while the processor 110 of the mobile phone 100 controls the presentation of shaking effects at certain time nodes in the video, it can determine whether to add a sound effect beat or music to the shaking special effects presented at a certain time node based on the above-mentioned audio characteristic value. Fragments, in order to present better jitter effects in conjunction with the corresponding screen jitter. For example, when shooting a sports video, you can add "咚~咚~咚" or "Wow~Wow~" at a wonderful moment showing skills special effects; when shooting videos of hip-hop competitions, you can add special effects such as "bang~bang~" or "crack~crack~" at the wonderful moment of showing hip-hop skills; or when shooting robot dance videos, you can present shaking special effects Add special effects such as "Zi~Zi~Zi" to the wonderful moments. In other embodiments, if the live music of the video or the collected audio has a strong sense of rhythm, it is also more suitable for presenting shaking special effects in conjunction with the shaking of the picture, for example, when shooting a video of a rap performance or shooting some singing When jumping to the video of the performance, the rhythm of the background music is already very strong. At this time, it is not necessary to add corresponding sound effect beats to the shaking of the screen to present the shaking special effect, and there is no limitation here.
可以理解,手机100的处理器110控制在视频中的某些时间节点上呈现抖动特效的时长可以基于实时音频数据相应的音频特征值变化情况确定,即实时音频数据对应的音频特征值满足抖动触发条件的时刻触发开始抖动特效,实时音频数据对应的音频特征值不满足抖动触发条件时刻中止抖动特效;在另一些实施例中,也可以针对每次满足抖动触发条件触发的抖动特效设定固定时长,例如设置为3秒或者5秒等;在另一些实施例中,还可以在相机应用的视频拍摄界面上设置控制抖动特效时长的控件,例如用户在抖动拍摄模式下拍摄视频时,当不满足抖动触发条件时,用户可以长按该控件在某个时间节点或者时间段内呈现抖动特效,按下该控件的时长即为相应抖动特效的呈现时长;在另一些实施例中抖动特效的触发和中止或结束还可以采用其他形式的规则,在此不做限制。It can be understood that the processor 110 of the mobile phone 100 controls the duration of presenting the shaking special effect at certain time nodes in the video, which can be determined based on the change of the corresponding audio feature value of the real-time audio data, that is, the audio feature value corresponding to the real-time audio data satisfies the shaking trigger. The vibration effect is triggered at the moment of the condition, and the audio characteristic value corresponding to the real-time audio data does not meet the vibration trigger condition to stop the vibration effect; in other embodiments, it is also possible to set a fixed duration for the vibration effect triggered each time the vibration trigger condition is met. , for example, set to 3 seconds or 5 seconds, etc.; in other embodiments, a control for controlling the duration of the shaking effect can also be set on the video shooting interface of the camera application, for example, when the user shoots a video in the shaking shooting mode, when the When the shaking trigger condition, the user can press and hold the control to present the shaking special effect within a certain time node or time period, and the duration of pressing the control is the presentation duration of the corresponding shaking special effect; in other embodiments, the triggering of the shaking special effect and Suspension or termination can also adopt other forms of rules, which are not limited here.
可以理解,在上述步骤507之后,手机100的视频拍摄界面上显示完成的抖动特效视频,用户还可以在手机100显示抖动特效视频的界面上对完成的抖动特效视频进一步分享、保存或者编辑等处理,例如,参考图8所示,用户可以在手机100显示已完成的抖动特效视频的界面801上,点击分享按钮802将该抖动特效视频分享至朋友圈或者分享给好友等;用户也可以在该界面801上点击保存按钮803将抖动特效视频保存至本地图库;用户还可以点击编辑按钮804对已完成的抖动特效视频进行进一步的编辑处理,例如添加滤镜效果、剪辑视频长度、删除该抖动特效视频中的部分或全部抖动特效等处理,用户也可以点击删除按钮805删除该视频,在此不做限制。It can be understood that after the above step 507, the video shooting interface of the mobile phone 100 displays the completed shake special effect video, and the user can further share, save or edit the completed shake special effect video on the interface of the mobile phone 100 displaying the shake special effect video For example, as shown in FIG. 8 , the user can click the share button 802 on the interface 801 where the mobile phone 100 displays the completed shaking special effect video to share the shaking special effect video to the circle of friends or share it with friends; Click the save button 803 on the interface 801 to save the shaking special effect video to the local gallery; the user can also click the edit button 804 to further edit the completed shaking special effect video, such as adding filter effects, clipping video length, deleting the shaking special effect Part or all of the shaking special effects and other processing in the video, the user can also click the delete button 805 to delete the video, and there is no limitation here.
另外,可以理解,上述步骤503中的音频特征值和/或焦点对象的变化特征值可以由其他电子设备,如手表中的扬声器采集得到,手表在采集音频数据处理得到音频特征值后,可以将采集到的音频数据或处理得到的音频特征值发送给手机100,由手机100相应生成抖动参数,在另一些实施例中,手表也可以根据所采集的音频数据或处理得到的音频特征值自行处理并生成抖动参数,再将该抖动参数发送给手机100,手机100基于相应的抖动参数再继续执行后续步骤504至507。在另一些实施例中,手机100所拍摄的视频还可以发送给手表进行抖动处理,即手表根据扬声器所采集的音频数据生成相应的抖动参数,对手机100发来的视频进行抖动处理,得到具有抖动特效的视频后再发送给手机100,由手机向用户展示,或者手表处理得到具有抖动特效的视频后直接向用户展示,在此不做限制。In addition, it can be understood that the audio feature value and/or the change feature value of the focus object in step 503 above can be collected by other electronic devices, such as a speaker in a watch. After the watch collects audio data and processes the audio feature value, it can The collected audio data or the processed audio feature values are sent to the mobile phone 100, and the mobile phone 100 generates the shaking parameters accordingly. In other embodiments, the watch can also process the audio data by itself according to the collected audio data or the processed audio feature values And generate a shaking parameter, and then send the shaking parameter to the mobile phone 100, and the mobile phone 100 continues to execute subsequent steps 504 to 507 based on the corresponding shaking parameter. In some other embodiments, the video captured by the mobile phone 100 can also be sent to the watch for shaking processing, that is, the watch generates corresponding shaking parameters according to the audio data collected by the speaker, and performs shaking processing on the video sent by the mobile phone 100 to obtain The video with special shaking effects is then sent to the mobile phone 100, and the mobile phone displays it to the user, or the watch processes the video with special shaking effects and then directly displays it to the user. There is no limitation here.
对于上述步骤506涉及的数据转换过程以及确定抖动参数的相关描述,作为示例,下面先结合图9A至9C对上述数据转换过程进行详细说明。Regarding the related description of the data conversion process involved in the above step 506 and the determination of the jitter parameters, as an example, the above data conversion process will be described in detail below with reference to FIGS. 9A to 9C .
参考图9A所示,手机100启动相机应用拍摄视频并进入抖动拍摄模式后,麦克风170C采集现场音频生成音频数据,参考上述步骤504描述的相关过程,手机100的处理器110分析上述音频数据提取得到音频特征值,当该音频特征值满足抖动触发条件时,处理器110将得到的音频特征值转换为马达191的振动参数(即抖动参数),例如转换得到的马达191的抖动参数包括抖动幅度2mm、抖动频率30Hz。可以理解,马达191的振动可以带动手机100以及摄像头193的镜头产生抖动从而实现上述抖动特效,马达191振动的过程中,摄像头193的镜头无法实现对焦从而导致相机应用的成像画面产生抖动与失焦的抖动特效效果,参考下图12A所示。Referring to FIG. 9A , after the mobile phone 100 starts the camera application to shoot video and enters the shaking shooting mode, the microphone 170C collects live audio to generate audio data. Referring to the related process described in step 504 above, the processor 110 of the mobile phone 100 analyzes the audio data and extracts the obtained Audio feature value, when the audio feature value meets the shaking trigger condition, the processor 110 converts the obtained audio feature value into a vibration parameter (ie, a shaking parameter) of the motor 191, for example, the converted shaking parameter of the motor 191 includes a shaking amplitude of 2mm , Jitter frequency 30Hz. It can be understood that the vibration of the motor 191 can drive the lens of the mobile phone 100 and the camera 193 to vibrate so as to realize the above-mentioned jitter effect. During the vibration of the motor 191, the lens of the camera 193 cannot focus, which will cause the imaging picture of the camera application to vibrate and lose focus. For the shaking effect, refer to the following figure 12A.
如图9B所示,手机100启动相机应用拍摄视频并进入抖动拍摄模式后,麦克风170C采集现场的音频生成音频数据,参考上述步骤504描述的相关过程,手机100的处理器110分析上述音频数据提取得到音频特征值,当该音频特征值满足抖动触发条件时,处理器110将得到的音频特征值转换为光学防抖模组192中的镜头抖动参数(即抖动参数),例如转换得到的光学防抖模组192中的镜头抖动参数包括抖动幅度5mm、抖动频率50Hz。可以理解,光学防抖模组192控制镜头抖动可以实现上述抖动特效,光学防抖模组192控制镜头抖动的过程中,摄像头193的镜头无法实现对焦从而导致相机应用的成像画面产生抖动与失焦的抖动特效效果,参考下图10B所示。As shown in FIG. 9B , after the mobile phone 100 starts the camera application to shoot video and enters the shaking shooting mode, the microphone 170C collects the audio of the scene to generate audio data. Referring to the related process described in step 504 above, the processor 110 of the mobile phone 100 analyzes the above audio data to extract The audio feature value is obtained, and when the audio feature value satisfies the shaking trigger condition, the processor 110 converts the obtained audio feature value into lens shake parameters (ie, shake parameters) in the optical anti-shake module 192, such as the converted optical anti-shake The lens shaking parameters in the shaking module group 192 include a shaking amplitude of 5 mm and a shaking frequency of 50 Hz. It can be understood that the optical anti-shake module 192 can control the lens shake to achieve the above-mentioned shaking effects. During the process of controlling the lens shake by the optical anti-shake module 192, the lens of the camera 193 cannot focus, which will cause the imaging picture of the camera application to shake and lose focus. For the shaking effect, refer to the following figure 10B.
如图9C所示,手机100启动相机应用拍摄视频并进入抖动拍摄模式后,用户点击手机100显示的相机界面指定焦点对象,摄像头193获取焦点对象的实时图像生成焦点数据,参考上述步骤504描述的相关过程,手机100的处理器110分析上述焦点数据提取得到焦点对象变化特征值,当该音频特征值满足抖动触发条件时,处理器110将得到的焦点对象变化特征值转换为实时图像或实时图像中焦点对象的抖动参数,即上述变化参数,例如转换得到的实时图像或实时图像中焦点对象的抖动参数包括抖动幅度10mm(例如焦点对象在XYZ轴方向上的位移上限值为10mm或焦点对象的轮廓尺寸变化值上限值为10mm)、抖动频率50Hz(例如,焦点对象的位移变化频率或轮廓尺寸变化频率)。可以理解,手机100上的图像处理器或ISP可以执行图像处理算法控制实时图像中的焦点对象按照上述变化参数进行实时缩放或位移以产生抖动特效,该抖动特效的呈现形式可以参考上述图1D所示的抖动特效呈现形式,在此不再赘述。可以理解,用于呈现抖动特效的图像处理算法可以在手机100上的图像处理器或ISP对摄像头193采集的图像数据进行降噪、畸变矫正或者自动滤镜等处理之后再进行,以免影响原始图像数据得保存,因此,在一些实施例中,通过图像处理器或ISP执行图像处理算法控制实时图像或者提取实时图像中的焦点对象进行缩放或者移动来呈现抖动特效时,用户完成视频拍摄后到生成具有抖动特效的视频的过程可能会有较长的处理延迟。As shown in FIG. 9C , after the mobile phone 100 starts the camera application to shoot video and enters the shaking shooting mode, the user clicks on the camera interface displayed on the mobile phone 100 to specify the focus object, and the camera 193 acquires the real-time image of the focus object to generate focus data. Refer to the description in step 504 above. In the related process, the processor 110 of the mobile phone 100 analyzes the above focus data and extracts the feature value of the focus object change. When the audio feature value meets the shaking trigger condition, the processor 110 converts the obtained feature value of the focus object change into a real-time image or a real-time image The shaking parameters of the focus object, that is, the above-mentioned change parameters, for example, the converted real-time image or the shaking parameters of the focus object in the real-time image include a shake amplitude of 10mm (for example, the upper limit of the displacement of the focus object in the XYZ axis direction is 10mm or the focus object The upper limit of the change value of the outline size is 10 mm), and the shaking frequency is 50 Hz (for example, the frequency of the displacement change of the focus object or the change frequency of the outline size). It can be understood that the image processor or ISP on the mobile phone 100 can execute an image processing algorithm to control the focus object in the real-time image to perform real-time scaling or displacement according to the above-mentioned change parameters to generate a shaking effect. The presentation form of the shaking effect can refer to the above-mentioned FIG. 1D The presentation form of the jitter special effect is shown, and will not be repeated here. It can be understood that the image processing algorithm for presenting the shaking effect can be performed after the image processor or ISP on the mobile phone 100 performs noise reduction, distortion correction or automatic filter processing on the image data collected by the camera 193, so as not to affect the original image The data must be saved. Therefore, in some embodiments, when the image processor or ISP executes the image processing algorithm to control the real-time image or extract the focus object in the real-time image for zooming or moving to present the shaking special effect, the user completes the video shooting and then generates Videos with jittery effects may experience long processing delays.
可以理解,上述通过图像处理算法控制实时图像或实时图像中的焦点对象产生缩放或位移变化而产生抖动特效的过程,不涉及手机100中的任何影响相机应用成像的电子元件的抖动过程,该过程中产生的抖动特效仅会导致相机应用的成像画面产生抖动,例如实时图像缩放或位移产生抖动特效、或者实时图像中的焦点对象缩放或位移产生抖动特效等,该过程不会影响镜头的对焦,因而不会产生虚影等失焦效果。It can be understood that the above-mentioned process of controlling the real-time image or the focus object in the real-time image to produce zoom or displacement changes through the image processing algorithm to generate the shaking special effect does not involve the shaking process of any electronic components in the mobile phone 100 that affect the imaging of the camera application. The jitter effect generated in the camera application will only cause jitter in the imaging screen of the camera application, such as real-time image zooming or displacement to produce jitter special effects, or focus object zooming or displacement in real-time images to produce jitter special effects, etc. This process will not affect the focus of the lens. Therefore, there will be no out-of-focus effects such as ghost images.
可以理解,本申请所提供的特效视频拍摄方案基于音频特征值和/或焦点图像中焦点对象的变化特征值转换得到抖动参数,包括但不限于上述图9A至9C所示的转换形式,例如还可以包括基于焦点对象变化特征值转换为马达191的抖动参数的转换形式等,在此不做限制。另外可以理解,本申请所提供的特效视频拍摄方案所采用的转换形式可以是上述图9A至9C所示任一种或多种转换形式的组合,在此不做限制。It can be understood that the special effects video shooting solution provided by the present application is based on the conversion of the audio feature value and/or the change feature value of the focus object in the focus image to obtain the shaking parameters, including but not limited to the conversion forms shown in FIGS. 9A to 9C above, for example, It may include a conversion form based on the change characteristic value of the focus object into the shake parameter of the motor 191, etc., which is not limited here. In addition, it can be understood that the transformation form adopted in the special effect video shooting solution provided by the present application may be any one or a combination of transformation forms shown in FIGS. 9A to 9C above, which is not limited here.
可以理解,上述图5所示视频拍摄方法的实施过程中,抖动参数可以基于实时音频数据和/或实时图像数据中提取的焦点数据,进而提取相应的音频特征值和/或焦点对象的变化特征值经转换得到,所拍摄的视频中呈现抖动特效的时间节点相对于音频特征值和/或焦点对象的变化特征值满足抖动触发条件的时间节点会存在时间延迟。另外,可以理解,手机100中可以预先设置音频特征值和/或焦点对象的变化特征值与抖动参数之间的对应关系,参考上述图9A至9C的数据转换过程以实现实时音频数据和/或实时图像数据转换为抖动参数的过程,在另一些实施例中,也可以在手机100中预设相应的数据转换公式实现上述数据转换,在此不再赘述。It can be understood that during the implementation of the video shooting method shown in FIG. 5 above, the shaking parameters can be based on the real-time audio data and/or the focus data extracted from the real-time image data, and then extract the corresponding audio feature value and/or the change feature of the focus object The value is obtained through conversion, and there will be a time delay between the time node showing the shaking effect in the captured video and the time node when the audio feature value and/or the change feature value of the focus object meets the shaking trigger condition. In addition, it can be understood that the corresponding relationship between the audio feature value and/or the change feature value of the focus object and the shaking parameter can be preset in the mobile phone 100, and refer to the data conversion process in FIGS. 9A to 9C to realize real-time audio data and/or For the process of converting real-time image data into shaking parameters, in some other embodiments, corresponding data conversion formulas can also be preset in the mobile phone 100 to realize the above data conversion, which will not be repeated here.
另外,在另一些实施例中,手机100还可以向用户提供抖动参数设置界面,参考下图10A至10D所示。In addition, in some other embodiments, the mobile phone 100 may also provide the user with a shaking parameter setting interface, as shown in FIGS. 10A to 10D below.
作为示例,图10A至10D示出了用户操作手机100设置抖动参数所对应的UI界面。As an example, FIGS. 10A to 10D show UI interfaces corresponding to the user operating the mobile phone 100 to set shaking parameters.
如图10A所示,用户可以在手机100运行相机应用进入抖动拍摄模式所显示的UI界面1001中,点击右上角的设置按钮1002,参考图10A所示的操作④,进入图10B所示的设置界面1003。As shown in Figure 10A, the user can run the camera application on the mobile phone 100 to enter the shake shooting mode in the UI interface 1001 displayed, click the setting button 1002 in the upper right corner, refer to the operation ④ shown in Figure 10A, and enter the setting shown in Figure 10B Interface 1003.
如图10B所示,用户可以在设置界面1003上点击抖动拍摄模式选项1004,参考图10B所示的操作⑤,调出图10C所示的抖动参数设置窗口1005。在另一些实施例中,用户在图10B所示的设置界面1003上点击抖动拍摄模式选项1004也可以调出图10D所示的抖动参数设置窗口1006,或者其他形式抖动参数设置窗口,在此不做限制。As shown in FIG. 10B , the user can click on the shaking shooting mode option 1004 on the setting interface 1003 , refer to the operation ⑤ shown in FIG. 10B , and call out the shaking parameter setting window 1005 shown in FIG. 10C . In some other embodiments, the user clicks the shaking shooting mode option 1004 on the setting interface 1003 shown in FIG. 10B to call out the shaking parameter setting window 1006 shown in FIG. Do limit.
可以理解,用户也可以在图10B所示的设置界面上设置开启抖动拍摄模式的条件,例如智能开启、或者经用户授权开启等方式,在此不再赘述。It can be understood that the user can also set the conditions for enabling the shake shooting mode on the setting interface shown in FIG. 10B , such as smart activation, or activation by user authorization, etc., which will not be repeated here.
如图10C所示,用户可以在抖动参数设置窗口1005中设置抖动幅度,例如选中关闭选项后的复选框1051可以关闭抖动拍摄模式,参考图10C所示的操作⑥,选中2mm选项后的复选框1052可以设置抖动幅度为2mm,选中5mm选项后的复选框1053可以设置抖动幅度为5mm,选中10mm选项后的复选框1054可以设置抖动幅度为10mm,在另一些实施例中,抖动参数设置窗口1005还可以提供其他数值的抖动幅度选项,在此不做限制。As shown in FIG. 10C, the user can set the shake amplitude in the shake parameter setting window 1005. For example, the check box 1051 after selecting the close option can turn off the shake shooting mode. Referring to the operation ⑥ shown in FIG. The selection box 1052 can set the shaking range to 2mm, the check box 1053 after selecting the 5mm option can set the shaking range to 5mm, and the check box 1054 after selecting the 10mm option can set the shaking range to 10mm. In other embodiments, the shaking The parameter setting window 1005 may also provide options for other numerical jitter amplitudes, which are not limited here.
另外,如图10C所示,用户还可以在抖动参数设置窗口1005中设置抖动频率,例如选中关闭选项后的复选框1055可以关闭抖动拍摄模式,参考图10C所示的操作⑦,选中30Hz选项后的复选框1056可以设置抖动频率为30Hz,选中50Hz选项后的复选框1057可以设置抖动幅度为50Hz,在另一些实施例中,抖动参数设置窗口1005还可以提供其他数值的抖动频率选项,在此不做限制。In addition, as shown in Figure 10C, the user can also set the shaking frequency in the shaking parameter setting window 1005, for example, select the check box 1055 after the close option to turn off the shaking shooting mode, refer to the operation ⑦ shown in Figure 10C, and select the 30Hz option The last check box 1056 can set the jitter frequency to 30 Hz, and the check box 1057 after selecting the 50 Hz option can set the jitter amplitude to 50 Hz. In other embodiments, the jitter parameter setting window 1005 can also provide other numerical jitter frequency options , without limitation here.
如图10D所示,用户可以在抖动参数设置窗口1006中设置抖动模式,例如选中关闭选项后的复选 框1061可以关闭抖动拍摄模式,参考图10C所示的操作⑧,选中小幅度抖动模式选项后的复选框1062可以开启小幅度抖动拍摄模式,选中幅度抖动模式选项后的复选框1063可以开启中幅度抖动拍摄模式,选中大幅度抖动模式选项后的复选框1064可以开启大幅度抖动拍摄模式,可以理解,小幅度抖动拍摄模式、中幅度抖动拍摄模式、大幅度抖动拍摄模式分别所对应的抖动幅度由小到大递增、和/或抖动频率由低到高递增。用户也可以选中自动选项后的复选框1065开启自动拍摄模式,开启自动拍摄模式后,手机100可以基于所采集的实时音频数据和/或焦点数据自动匹配上述小幅度抖动拍摄模式、中幅度抖动拍摄模式、或大幅度抖动拍摄模式进行视频拍摄,手机100获取并处理实时音频数据和/或焦点数据的过程参考上述步骤503至505中相关描述,在此不再赘述。As shown in Figure 10D, the user can set the shaking mode in the shaking parameter setting window 1006, for example, select the check box 1061 after the close option to turn off the shaking shooting mode, refer to the operation ⑧ shown in Figure 10C, and select the small amplitude shaking mode option The last check box 1062 can turn on the small shake shooting mode, the check box 1063 after selecting the shake mode option can turn on the medium shake shooting mode, and the check box 1064 after choosing the big shake mode option can turn on the big shake As for the shooting mode, it can be understood that the shaking amplitude corresponding to the shooting mode with small shaking, the shooting mode with medium shaking and the shooting mode with large shaking increases from small to large, and/or the shaking frequency increases from low to high. The user can also select the check box 1065 next to the automatic option to start the automatic shooting mode. After the automatic shooting mode is turned on, the mobile phone 100 can automatically match the above-mentioned small shaking shooting mode and medium shaking shooting mode based on the collected real-time audio data and/or focus data. For video shooting in shooting mode or large shaking shooting mode, the process of obtaining and processing real-time audio data and/or focus data by mobile phone 100 refers to the relevant descriptions in steps 503 to 505 above, which will not be repeated here.
在图10D所示的抖动参数设置窗口1006中,还可以点击各抖动模式选项对应的预览按钮1066,预览相应抖动模式的抖动特效效果,参考图10D所示的操作⑨,可以打开图11所示的抖动效果预览窗口1101,用户点击该窗口1101上的播放按钮1102即可观看相应抖动模式的抖动特效视频预览效果。In the shake parameter setting window 1006 shown in Figure 10D, you can also click the preview button 1066 corresponding to each shake mode option to preview the shake special effect of the corresponding shake mode, refer to the operation ⑨ shown in Figure 10D, you can open the The shaking effect preview window 1101 of the selected shaking effect preview window 1101, the user clicks the play button 1102 on the window 1101 to watch the shaking special effect video preview effect of the corresponding shaking mode.
上述图10D所示的小幅度抖动拍摄模式、中幅度抖动拍摄模式、或大幅度抖动拍摄模式所对应的抖动特效效果可以参考图12A至12C所示。The shake special effects corresponding to the small shake shooting mode, the medium shake shooting mode, or the large shake shooting mode shown in FIG. 10D can be referred to in FIGS. 12A to 12C .
如图12A所示,为小幅度抖动拍摄模式所拍摄的视频中呈现小幅度抖动特效的效果示意图。As shown in FIG. 12A , it is a schematic diagram showing a small-scale shake special effect in a video shot in the small-scale shake shooting mode.
如图12B所示,为中幅度抖动拍摄模式所拍摄的视频中呈现中幅度抖动特效的效果示意图。As shown in FIG. 12B , it is a schematic diagram showing a medium-range shake special effect in a video captured in the medium-range shake shooting mode.
如图12C所示,为大幅度抖动拍摄模式所拍摄的视频中呈现大幅度抖动特效的效果示意图。As shown in FIG. 12C , it is a schematic diagram showing a large-scale shake special effect in a video shot in the large-scale shake shooting mode.
作为示例,图13示出了本申请一些实施例中通过摄像头模组中的马达振动来完成特效视频拍摄过程所涉及的手机100的系统架构示意图。As an example, FIG. 13 shows a schematic diagram of the system architecture of the mobile phone 100 involved in the process of shooting video with special effects through motor vibration in the camera module in some embodiments of the present application.
如图13所示,手机100包括APP层1340、Hal层1330、Kernel层1320和硬件层1310。其中,硬件层1310中包括麦克风170C、寄存器11、编码模块12、对焦线圈13、霍尔传感器14、马达等实体器件;Kernel层1320中包括抖动控制模块21;Hal层1330中包括选择模块31和图像处理模块32;APP层1340中包括相机应用41。As shown in FIG. 13 , the mobile phone 100 includes an APP layer 1340 , a Hal layer 1330 , a Kernel layer 1320 and a hardware layer 1310 . Among them, the hardware layer 1310 includes physical devices such as the microphone 170C, the register 11, the encoding module 12, the focusing coil 13, the Hall sensor 14, and the motor; the Kernel layer 1320 includes the shake control module 21; the Hal layer 1330 includes the selection module 31 and The image processing module 32 ; the APP layer 1340 includes a camera application 41 .
具体地,在图13所示的实施例中,APP层1340中的相机应用41启动拍摄视频,对焦线圈13可以带动镜头移动实现对焦,对焦期间霍尔传感器14能够获取马达的实际位置控制马达的移动完成对焦过程。相机应用41在接收到进入抖动拍摄模式的指令后,分别调用Hal层1330中的参数选择模块31和图像处理模块32。而后,参数选择模块31从硬件层1310中的麦克风170C获取所采集的音频数据并提取相应的音频特征值,并从硬件层1310中的马达获取规格参数。而后,参数选择模块31根据上述音频特征值和规格参数确定对应的抖动参数,并将抖动参数发送给Kernel层1320中的抖动控制模块21。抖动控制模块21控制线性马达产生与上述抖动参数相适配的振动,可以理解,马达的振动引起相机应用41的成像画面的抖动,此时对焦线圈13无法完成对焦因而产生失焦。当马达停止振动,霍尔传感器14再次获取马达的实际位置,控制马达移动,辅助对焦线圈13完成对焦。Specifically, in the embodiment shown in FIG. 13 , the camera application 41 in the APP layer 1340 starts shooting video, the focusing coil 13 can drive the lens to move to achieve focusing, and the Hall sensor 14 can obtain the actual position of the motor during focusing to control the position of the motor. Move to complete the focusing process. The camera application 41 calls the parameter selection module 31 and the image processing module 32 in the Hal layer 1330 respectively after receiving the instruction to enter the shaking shooting mode. Then, the parameter selection module 31 obtains the collected audio data from the microphone 170C in the hardware layer 1310 and extracts corresponding audio feature values, and obtains specification parameters from the motor in the hardware layer 1310 . Then, the parameter selection module 31 determines the corresponding jitter parameters according to the above-mentioned audio feature value and specification parameters, and sends the jitter parameters to the jitter control module 21 in the Kernel layer 1320 . The shake control module 21 controls the linear motor to generate vibrations that match the above shake parameters. It can be understood that the vibration of the motor causes the image image of the camera application 41 to shake. At this time, the focus coil 13 cannot focus, resulting in out-of-focus. When the motor stops vibrating, the Hall sensor 14 obtains the actual position of the motor again to control the movement of the motor, and the auxiliary focusing coil 13 completes focusing.
本申请通过霍尔传感器14、寄存器11、编码模块12和对焦线圈13形成马达引起相机应用的成像画面抖动及失焦前后对焦过程中的闭环动态调整。In this application, the hall sensor 14, the register 11, the encoding module 12, and the focus coil 13 are used to form a closed-loop dynamic adjustment of the imaging screen shake of the camera application caused by the motor and the focus process before and after out of focus.
作为示例,图14根据本申请的实施例,示出了一种视频拍摄装置的结构示意图。As an example, FIG. 14 shows a schematic structural diagram of a video shooting device according to an embodiment of the present application.
如图14所示,该视频拍摄装置1400包括数据采集模块1410、抖动参数生成模块1420以及抖动视频生成模块1430。As shown in FIG. 14 , the video shooting device 1400 includes a data collection module 1410 , a shaking parameter generating module 1420 and a shaking video generating module 1430 .
其中,数据采集模块1410,用于获取实时的音频数据和/或图像数据等视频数据。数据采集模块1410获取实时的音频数据和/或图像数据等视频数据的具体过程可以参考上述步骤503中相关描述,在 此不再赘述。Among them, the data acquisition module 1410 is used to acquire video data such as real-time audio data and/or image data. The specific process for the data acquisition module 1410 to acquire video data such as real-time audio data and/or image data can refer to the relevant description in the above-mentioned step 503, which will not be repeated here.
抖动参数生成模块1420,用于获取数据采集模块1410采集到的音频数据和/或图像数据等视频数据,并且基于该音频数据和/或图像数据确定抖动参数。抖动参数生成模块1420基于数据采集模块1410所采集的音频数据和/或图像数据确定抖动参数的具体过程,可以参考上述步骤504至506中相关描述,在此不再赘述。The shaking parameter generating module 1420 is configured to acquire video data such as audio data and/or image data collected by the data collecting module 1410, and determine shaking parameters based on the audio data and/or image data. For the specific process of determining the shaking parameters by the shaking parameter generating module 1420 based on the audio data and/or image data collected by the data collecting module 1410 , reference may be made to the relevant descriptions in the above steps 504 to 506 , which will not be repeated here.
抖动视频生成模块1430,用于获取抖动参数生成模块1420确定的抖动参数,并基于该抖动参数拍摄具有抖动特效的视频,或者基于该抖动参数对所拍摄的视频进行抖动处理得到具有抖动特效的视频。抖动视频生成模块1430基于该抖动参数拍摄具有抖动特效的视频,或者基于该抖动参数对所拍摄的视频进行抖动处理得到具有抖动特效的视频的具体过程可以参考上述步骤507中相关描述,在此不再赘述。Shaking video generating module 1430, configured to obtain the shaking parameters determined by shaking parameter generating module 1420, and shoot a video with shaking special effects based on the shaking parameters, or perform shaking processing on the captured video based on the shaking parameters to obtain a video with shaking special effects . The shaking video generation module 1430 shoots a video with shaking effects based on the shaking parameters, or performs shaking processing on the captured video based on the shaking parameters to obtain a video with shaking effects based on the shaking parameters. Let me repeat.
在说明书对“一个实施例”或“实施例”的引用意指结合实施例所描述的具体特征、结构或特性被包括在根据本申请公开的至少一个范例实施方案或技术中。说明书中的各个地方的短语“在一个实施例中”的出现不一定全部指代同一个实施例。Reference to "one embodiment" or "an embodiment" in the specification means that a specific feature, structure or characteristic described in connection with the embodiment is included in at least one exemplary implementation or technology disclosed according to the present application. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment.
本申请公开还涉及用于执行文本中的操作装置。该装置可以专门处于所要求的目的而构造或者其可以包括被存储在计算机中的计算机程序选择性地激活或者重新配置的通用计算机。这样的计算机程序可以被存储在计算机可读介质中,诸如,但不限于任何类型的盘,包括软盘、光盘、CD-ROM、磁光盘、只读存储器(ROM)、随机存取存储器(RAM)、EPROM、EEPROM、磁或光卡、专用集成电路(ASIC)或者适于存储电子指令的任何类型的介质,并且每个可以被耦合到计算机系统总线。此外,说明书中所提到的计算机可以包括单个处理器或者可以是采用针对增加的计算能力的多个处理器涉及的架构。The present disclosure also relates to means for performing operations in text. This apparatus may be specially constructed for the required purposes or it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored on a computer readable medium such as, but not limited to, any type of disk including floppy disk, compact disk, CD-ROM, magneto-optical disk, read-only memory (ROM), random-access memory (RAM) , EPROM, EEPROM, magnetic or optical card, application specific integrated circuit (ASIC), or any type of medium suitable for storing electronic instructions, and each may be coupled to a computer system bus. Furthermore, computers referred to in the specification may comprise a single processor or may be architectures involving multiple processors for increased computing power.
本文所提出的过程和显示器固有地不涉及任何具体计算机或其他装置。各种通用系统也可以与根据本文中的教导的程序一起使用,或者构造更多专用装置以执行一个或多个方法步骤可以证明是方便的。在一下描述中讨论了用于各种这些系统的结构。另外,可以使用足以实现本申请公开的技术和实施方案的任何具体编程语言。各种编程语言可以被用于实施本公开,如本文所讨论的。The processes and displays presented herein are not inherently related to any specific computer or other device. Various general-purpose systems may also be used with programs in accordance with the teachings herein, or it may prove convenient to construct a more specialized apparatus to perform one or more method steps. The architecture for a variety of these systems is discussed in the description below. In addition, any specific programming language sufficient to implement the techniques and embodiments disclosed herein may be used. Various programming languages can be used to implement the present disclosure, as discussed herein.
另外,在本说明书所使用的语言已经主要被选择用于可读性和指导性的目的并且可能未被选择为描绘或限制所公开的主题。因此,本申请公开旨在说明而非限制本文所讨论的概念的范围。Additionally, the language used in this specification has been chosen primarily for readability and instructional purposes and may not have been chosen to delineate or limit the subject matter disclosed. Accordingly, the present disclosure is intended to illustrate, not to limit, the scope of the concepts discussed herein.

Claims (19)

  1. 一种视频拍摄方法,应用于电子设备,其特征在于,包括:A video shooting method applied to electronic equipment, characterized in that it comprises:
    所述电子设备获取第一数据,所述第一数据包括第一音频数据和/或第一图像数据;The electronic device acquires first data, where the first data includes first audio data and/or first image data;
    所述电子设备基于所述第一数据确定抖动参数;determining, by the electronic device, a dithering parameter based on the first data;
    所述电子设备基于所述抖动参数生成第二数据,所述第二数据为视频数据;The electronic device generates second data based on the jitter parameter, and the second data is video data;
    所述电子设备基于所述抖动参数生成的第二数据具体为:基于所述抖动参数拍摄的第二视频,或,所述电子设备拍摄第二视频,并根据所述抖动参数处理第二视频得到的第三视频。The second data generated by the electronic device based on the jitter parameters is specifically: a second video shot based on the jitter parameters, or the electronic device shoots a second video and processes the second video according to the jitter parameters to obtain the third video of .
  2. 根据权利要求1所述的方法,其特征在于,所述方法包括:The method according to claim 1, characterized in that the method comprises:
    在所述第一音频数据满足第一预设条件;和/或所述第一图像数据满足第二预设条件的情况下,When the first audio data satisfies a first preset condition; and/or the first image data satisfies a second preset condition,
    所述电子设备基于所述第一数据确定抖动参数。The electronic device determines a dithering parameter based on the first data.
  3. 根据权利要求2所述的方法,其特征在于,所述第一音频数据满足第一预设条件,包括下列中的至少一项:The method according to claim 2, wherein the first audio data satisfies a first preset condition, including at least one of the following:
    所述第一音频数据的采样率大于预设采样率阈值;The sampling rate of the first audio data is greater than a preset sampling rate threshold;
    所述第一音频数据的频率大于或等于预设频率阈值;The frequency of the first audio data is greater than or equal to a preset frequency threshold;
    所述第一音频数据的响度大于或等于响度阈值。The loudness of the first audio data is greater than or equal to a loudness threshold.
  4. 根据权利要求2所述的方法,其特征在于,所述图像数据满足第二预设条件,包括下列中的至少一项:The method according to claim 2, wherein the image data satisfies a second preset condition, including at least one of the following:
    所述第一图像数据中焦点对象的位移大于或等于预设位移阈值;The displacement of the focus object in the first image data is greater than or equal to a preset displacement threshold;
    所述第一图像数据中焦点对象的移动频率大于或等于预设频率阈值;The movement frequency of the focus object in the first image data is greater than or equal to a preset frequency threshold;
    所述第一图像数据中焦点对象的轮廓尺寸变化值大于或等于预设变化值阈值。The change value of the contour size of the focus object in the first image data is greater than or equal to a preset change value threshold.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述电子设备包括音频数据和/或图像数据与所述抖动参数之间的预设对应关系,并且所述电子设备基于所述第一数据确定抖动参数,包括:The method according to any one of claims 1 to 4, wherein the electronic device includes a preset correspondence between audio data and/or image data and the shaking parameters, and the electronic device is based on The first data determines a jitter parameter, including:
    所述电子设备从所述预设对应关系中选择匹配所述第一音频数据和/或第一图像数据的抖动参数。The electronic device selects a dithering parameter matching the first audio data and/or the first image data from the preset correspondence.
  6. 根据权利要求5所述的方法,其特征在于,所述电子设备包括多个马达,并且所述多个马达包括所述电子设备的摄像头模组中的马达;并且The method according to claim 5, wherein the electronic device includes a plurality of motors, and the plurality of motors include motors in a camera module of the electronic device; and
    所述抖动参数包括所述多个马达中的至少一个马达的振动参数。The shaking parameters include vibration parameters of at least one motor of the plurality of motors.
  7. 根据权利要求6所述的方法,其特征在于,所述马达的振动参数包括振动方向、振动幅度、振动频率中的至少一项。The method according to claim 6, wherein the vibration parameters of the motor include at least one of vibration direction, vibration amplitude, and vibration frequency.
  8. 根据权利要求6或7所述的方法,其特征在于,所述基于所述抖动参数拍摄的第二视频,包括:The method according to claim 6 or 7, wherein the second video taken based on the shaking parameters comprises:
    所述电子设备基于所述马达的振动参数,控制所述马达产生振动并拍摄得到所述第二视频。Based on the vibration parameter of the motor, the electronic device controls the motor to generate vibration and captures the second video.
  9. 根据权利要求5所述的方法,其特征在于,所述电子设备包括光学防抖模组,并且The method according to claim 5, wherein the electronic device includes an optical anti-shake module, and
    所述抖动参数包括所述光学防抖模组中的镜头抖动参数。The shake parameters include lens shake parameters in the optical anti-shake module.
  10. 根据权利要求9所述的方法,其特征在于,所述镜头抖动参数包括镜头抖动过程中的抖动位移大小、抖动方向、抖动频率中的至少一项。The method according to claim 9, wherein the lens shaking parameters include at least one item of shaking displacement, shaking direction, and shaking frequency during the lens shaking process.
  11. 根据权利要求9或10所述的方法,其特征在于,所述基于所述抖动参数拍摄的第二视频,包括:The method according to claim 9 or 10, wherein the second video taken based on the shaking parameters comprises:
    所述电子设备关闭所述光学防抖模组的防抖功能,并基于所述镜头抖动参数,通过所述光学防抖模组控制镜头抖动,拍摄得到所述第二视频。The electronic device turns off the anti-shake function of the optical anti-shake module, and based on the lens shake parameters, controls the lens shake through the optical anti-shake module, and shoots to obtain the second video.
  12. 根据权利要求5所述的方法,其特征在于,所述抖动参数还包括:The method according to claim 5, wherein the jitter parameters further comprise:
    所述电子设备拍摄第二视频时采集的第二图像数据的变化参数;或Change parameters of the second image data collected when the electronic device shoots the second video; or
    所述电子设备拍摄第二视频时采集的第二图像数据中的焦点对象的变化参数。The change parameters of the focus object in the second image data collected when the electronic device shoots the second video.
  13. 根据权利要求12所述的方法,其特征在于,所述第二图像数据的变化参数或所述第二图像数据中焦点对象的变化参数,包括缩放比例、位移大小、移动方向、移动速度、移动频率中的至少一项。The method according to claim 12, wherein the change parameters of the second image data or the change parameters of the focus object in the second image data include scaling, displacement, moving direction, moving speed, moving at least one of the frequencies.
  14. 根据权利要求12或13所述的方法,其特征在于,所述电子设备拍摄第二视频,并根据所述抖动参数处理第二视频得到的第三视频,包括下列中的任一项:The method according to claim 12 or 13, wherein the electronic device shoots the second video, and processes the second video according to the shaking parameters to obtain a third video, including any of the following:
    所述电子设备拍摄第二视频,并根据所述第二图像数据的变化参数处理第二视频得到所述第三视频;The electronic device shoots a second video, and processes the second video according to a change parameter of the second image data to obtain the third video;
    所述电子设备拍摄第二视频,并根据所述第二图像数据中的焦点对象的变化参数处理第二视频得到所述第三视频。The electronic device shoots a second video, and processes the second video according to a change parameter of the focus object in the second image data to obtain the third video.
  15. 根据权利要求1至14中任一项所述的方法,其特征在于,所述电子设备的视频拍摄界面包括抖动模式控件,并且所述方法还包括:The method according to any one of claims 1 to 14, wherein the video shooting interface of the electronic device includes a shaking mode control, and the method further includes:
    响应于用户对所述抖动模式控件的操作,所述电子设备基于所述抖动参数生成第二数据。In response to a user's operation on the shaking mode control, the electronic device generates second data based on the shaking parameters.
  16. 根据权利要求1至14中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 14, further comprising:
    在检测到当前拍摄场景为预设场景的情况下,所述电子设备基于所述抖动参数生成第二数据。When detecting that the current shooting scene is a preset scene, the electronic device generates second data based on the shake parameter.
  17. 根据权利要求1至16中任一项所述的方法,其特征在于,所述电子设备基于所述抖动参数生成第二数据,还包括:The method according to any one of claims 1 to 16, wherein the electronic device generates second data based on the jitter parameters, further comprising:
    所述电子设备添加与所述第二数据的内容相匹配的音效节拍或音乐片段。The electronic device adds a sound effect beat or a music segment matching the content of the second data.
  18. 一种电子设备,其特征在于,包括:一个或多个处理器;一个或多个存储器;所述一个或多个存储器存储有一个或多个程序,当所述一个或者多个程序被所述一个或多个处理器执行时,使得所述电子设备执行权利要求1至17中任一项所述的视频拍摄方法。An electronic device, characterized in that it includes: one or more processors; one or more memories; the one or more memories store one or more programs, when the one or more programs are described When executed by one or more processors, the electronic device executes the video shooting method according to any one of claims 1 to 17.
  19. 一种计算机存储介质,其特征在于,所述存储介质上存储有指令,所述指令在计算机上执行时使所述计算机执行权利要求1至17中任一项所述的视频拍摄方法。A computer storage medium, characterized in that instructions are stored on the storage medium, and when the instructions are executed on a computer, the computer executes the video shooting method according to any one of claims 1 to 17.
PCT/CN2022/103943 2021-07-12 2022-07-05 Video capture method and apparatus, electronic device, and storage medium WO2023284591A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110784717.X 2021-07-12
CN202110784717.XA CN115623145A (en) 2021-07-12 2021-07-12 Video shooting method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023284591A1 true WO2023284591A1 (en) 2023-01-19

Family

ID=84856122

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/103943 WO2023284591A1 (en) 2021-07-12 2022-07-05 Video capture method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN115623145A (en)
WO (1) WO2023284591A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259780A (en) * 2018-04-17 2018-07-06 北京艾沃次世代文化传媒有限公司 For the anti-interference special efficacy audio video synchronization display methods of virtual film studio
CN109597431A (en) * 2018-11-05 2019-04-09 视联动力信息技术股份有限公司 A kind of method and device of target following
CN109922268A (en) * 2019-04-03 2019-06-21 睿魔智能科技(深圳)有限公司 Image pickup method, device, equipment and the storage medium of video
JP2020013050A (en) * 2018-07-20 2020-01-23 株式会社タムロン Photographing parameter adjustment device, lens unit including the same, photographing parameter adjustment system, and photographing parameter adjustment method
CN112087652A (en) * 2020-08-03 2020-12-15 北京达佳互联信息技术有限公司 Video production method, video sharing device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259780A (en) * 2018-04-17 2018-07-06 北京艾沃次世代文化传媒有限公司 For the anti-interference special efficacy audio video synchronization display methods of virtual film studio
JP2020013050A (en) * 2018-07-20 2020-01-23 株式会社タムロン Photographing parameter adjustment device, lens unit including the same, photographing parameter adjustment system, and photographing parameter adjustment method
CN109597431A (en) * 2018-11-05 2019-04-09 视联动力信息技术股份有限公司 A kind of method and device of target following
CN109922268A (en) * 2019-04-03 2019-06-21 睿魔智能科技(深圳)有限公司 Image pickup method, device, equipment and the storage medium of video
CN112087652A (en) * 2020-08-03 2020-12-15 北京达佳互联信息技术有限公司 Video production method, video sharing device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115623145A (en) 2023-01-17

Similar Documents

Publication Publication Date Title
WO2021052232A1 (en) Time-lapse photography method and device
CN111345010B (en) Multimedia content synchronization method, electronic equipment and storage medium
CN110784830B (en) Data processing method, Bluetooth module, electronic device and readable storage medium
WO2020173394A1 (en) Recording frame rate control method and related apparatus
CN112492193B (en) Method and equipment for processing callback stream
US11848016B2 (en) Voice control command generation method and terminal
CN114489533A (en) Screen projection method and device, electronic equipment and computer readable storage medium
WO2020056684A1 (en) Method and device employing multiple tws earpieces connected in relay mode to realize automatic interpretation
CN114710640A (en) Video call method, device and terminal based on virtual image
CN114185503B (en) Multi-screen interaction system, method, device and medium
JP2022537012A (en) Multi-terminal multimedia data communication method and system
CN113593567B (en) Method for converting video and sound into text and related equipment
CN111930335A (en) Sound adjusting method and device, computer readable medium and terminal equipment
CN112272191B (en) Data transfer method and related device
CN113810640A (en) Video processing method and device and electronic equipment
CN112532508B (en) Video communication method and video communication device
CN114339429A (en) Audio and video playing control method, electronic equipment and storage medium
CN114827581A (en) Synchronization delay measuring method, content synchronization method, terminal device, and storage medium
WO2022267640A1 (en) Video sharing method, and electronic device and storage medium
CN113923351B (en) Method, device and storage medium for exiting multi-channel video shooting
WO2022161077A1 (en) Speech control method, and electronic device
WO2023284591A1 (en) Video capture method and apparatus, electronic device, and storage medium
WO2022022319A1 (en) Image processing method, electronic device, image processing system and chip system
WO2022033344A1 (en) Video stabilization method, and terminal device and computer-readable storage medium
CN114120987B (en) Voice wake-up method, electronic equipment and chip system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22841228

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE