WO2022068537A1 - Image processing method and related apparatus - Google Patents

Image processing method and related apparatus Download PDF

Info

Publication number
WO2022068537A1
WO2022068537A1 PCT/CN2021/116944 CN2021116944W WO2022068537A1 WO 2022068537 A1 WO2022068537 A1 WO 2022068537A1 CN 2021116944 W CN2021116944 W CN 2021116944W WO 2022068537 A1 WO2022068537 A1 WO 2022068537A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
image
frame
camera
video
Prior art date
Application number
PCT/CN2021/116944
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 WO2022068537A1 publication Critical patent/WO2022068537A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Definitions

  • the present application relates to the technical field of computer vision, and in particular, to an image processing method and related apparatus.
  • an electronic device such as a mobile phone records a video or displays a preview screen
  • the electronic device such as the mobile phone only supports the user's manual zoom adjustment, and the user operation is complicated.
  • the electronic device such as a mobile phone records a video
  • the electronic device after the user can only manually adjust the focal length once, the electronic device such as the mobile phone can only record with the focal length adjusted by the user, so that the recorded video cannot reflect the details of the subject in the video.
  • the user's focusing operation is complicated.
  • the present application provides an image processing method, a related device, and a related device, which can make the shot video or picture have the effect of automatic zooming, and highlight the detailed characteristics of the shooting subject.
  • the present application provides an image processing method, including: an electronic device displays a first shooting preview interface, the first shooting preview interface includes a first preview frame, and the first preview frame displays real-time capture by a camera of the electronic device obtained screen.
  • the electronic device detects the first operation on the first shooting preview interface
  • the electronic device displays a shooting option interface, where the shooting option interface includes a first shooting option and a second shooting option.
  • the electronic device displays a second shooting preview interface
  • the second shooting preview interface includes a second preview frame
  • the second preview frame displays the camera of the electronic device real-time captured images. The electronic device starts to capture the first video content.
  • the electronic device displays in the second preview frame the first part of the picture captured in real time by the camera of the electronic device.
  • the electronic device displays, in the second preview frame, the second part of the picture captured in real time by the camera of the electronic device.
  • the electronic device displays the shooting option interface.
  • the electronic device detects the third operation for the second shooting option, displays a third shooting preview interface, the third shooting preview interface includes a third preview frame, and the third preview frame displays the camera of the electronic device real-time captured images.
  • the electronic device starts capturing the second video content.
  • the electronic device displays, in the third preview frame, the third part of the picture captured in real time by the camera of the electronic device.
  • the electronic device displays, in the third preview frame, the fourth part of the picture captured in real time by the camera of the electronic device, wherein the first part and the second part are , the third part and the fourth part are different.
  • the present application provides an image processing method, in which an electronic device can use a cropping frame with a preset size and a preset motion trajectory to crop an image captured by a camera during a photo-taking or video-recording process, and display the image in the cropping frame on the in the preview interface or the recording interface.
  • the shot video or picture can have the effect of automatic zooming, and the detailed characteristics of the shooting subject can be highlighted.
  • the electronic device before the electronic device starts to capture the first video content, the electronic device detects a fourth operation on the second capture preview interface. In response to the fourth operation, the electronic device starts to capture the first video content.
  • the second shooting preview interface further includes an option switching control; after the electronic device displays the second part of the picture captured in real time by the camera of the electronic device in the second preview frame, the The electronic device detects a fifth operation for the option toggle control. In response to the fifth operation, the electronic device displays the photographing option interface. In this way, after a shooting option has been selected, the user can be provided with an entry for changing the shooting option, so that the user can change the shooting option to shoot video content.
  • the method further includes: 2. Shoot the sixth operation of the preview interface.
  • the electronic device saves the first part as a video frame at a first moment in the video file, and saves the second part as a video frame at a second moment in the video file. In this way, the electronic device can shoot video recordings with effects such as automatic zoom or lens shift.
  • the method further includes: detecting, by the electronic device, a seventh operation at a first moment after starting to capture the first video content. In response to the seventh operation, the electronic device saves the first part as a picture. In this way, the electronic device can save a preview video image as a picture during a preview process with effects such as automatic zooming or lens panning.
  • the second shooting preview interface further includes a first window.
  • the electronic device displays, in the first window, a picture captured in real time by a camera of the electronic device.
  • the electronic device displays the bounding box of the first portion in the first window.
  • the electronic device displays the bounding box of the second portion in the first window.
  • the second shooting preview interface further includes a first window.
  • the electronic device displays, in the first window, a video frame at the first moment in the video sample corresponding to the first shooting option.
  • the electronic device displays a video image at the second moment in the video sample corresponding to the first shooting option in the first window. In this way, it is convenient for users to compare the shooting effects in real-time with the video samples.
  • the display position of the first window and the second preview frame is any one of the following: at least a partial area of the first window overlaps with the display area of the second preview frame; or, the first window A window is displayed outside the second preview frame in the second shooting preview interface; alternatively, the first window is displayed in the upper right corner of the second preview frame; alternatively, the first window is displayed in the second preview frame The upper left area of the preview box.
  • the first window includes a window closing control; the electronic device detects an eighth operation for the window closing control in the first window; in response to the eighth operation, the electronic device Close the display of this first window.
  • the user when the user does not need the first window, the user can be manually triggered to close, so as to ensure that the shooting picture displayed on the electronic device is not blocked.
  • the electronic device displays a window opening control in the second shooting preview interface; the electronic device detects the ninth window opening control for the window opening control. operation; in response to the ninth operation, the electronic device displays the first window on the second shooting preview interface. In this way, when the user needs to call the small window, the user can trigger the electronic device to redisplay the first window.
  • the second shooting preview interface further includes a mirror movement mode closing control.
  • the electronic device detects a tenth operation acting on the mirror motion mode off control. In response to the tenth operation, the electronic device displays the first shooting preview interface. In this way, the user can trigger to close the shooting mode at any time.
  • the second shooting preview interface further includes a second window
  • the electronic device displays the waveform diagram of the first music segment corresponding to the first shooting option in the second window.
  • the audio information in the waveform chart at the first moment after starting to shoot the first video content is different from the audio information in the waveform chart at the second moment after starting to shoot the first video content, and the audio information includes the following One or more of: tempo information, amplitude information, and style information.
  • the electronic device can play the first music segment.
  • the electronic device when the electronic device saves the first part as a video picture at the first moment in the video file, and saves the second part as a video picture at the second moment in the video file, the electronic The device saves the first piece of music in the audio data of the video file.
  • the electronic device performs image stabilization processing on the image captured in real time by the camera of the electronic device before displaying the image captured in real time by the camera of the electronic device, and the image stabilization processing includes one of the following: Or more: electronic image stabilization EIS processing, optical image stabilization processing, mechanical image stabilization processing.
  • the shooting picture can be made smooth and excessive.
  • the electronic device before the electronic device displays in the second preview frame the first part of the picture captured by the camera of the electronic device in real time, the electronic device performs image super-resolution reconstruction on the first part. Before the electronic device displays the second part of the picture captured in real time by the camera of the electronic device in the second preview frame, the electronic device performs image super-resolution reconstruction on the second part. Before the electronic device displays the third part of the picture captured by the camera of the electronic device in real time in the third preview frame, the electronic device performs image super-resolution reconstruction on the third part. Before the electronic device displays the fourth part of the picture captured by the camera of the electronic device in real time in the third preview frame, the electronic device performs image super-resolution reconstruction on the fourth part. In this way, the shooting picture can be made clearer.
  • the camera of the electronic device includes a wide-angle camera and a non-wide-angle camera.
  • the first preview frame displays the image captured by the non-wide-angle camera in real time.
  • the second preview frame displays the picture captured by the wide-angle camera in real time.
  • the third preview frame displays the image captured by the wide-angle camera in real time. In this way, the captured picture can have a larger viewing angle.
  • the present application provides an electronic device, including: a processor, a camera, and a touch screen.
  • the touch screen may be used to display a first shooting preview interface, where the first shooting preview interface includes a first preview frame, and the first preview frame displays a picture captured by the camera in real time.
  • the processor is further configured to instruct the touch screen to display a shooting option interface after detecting a first operation on the first shooting preview interface, where the shooting option interface includes a first shooting option and a second shooting option.
  • the processor is further configured to instruct the touch screen to display a second shooting preview interface after detecting a second operation for the first shooting option, the second shooting preview interface includes a second preview frame, and the second preview frame displays the The picture captured by the camera of the electronic device in real time.
  • the processor is further configured to instruct the camera to start shooting the first video content.
  • the processor is further configured to instruct the touch screen to display the first part of the picture captured by the camera in real time in the second preview frame at a first moment after starting to shoot the first video content.
  • the processor is further configured to instruct the touch screen to display the second part of the picture captured by the camera in real time in the second preview frame at a second moment after starting to shoot the first video content.
  • the touch screen is also used to display the shooting option interface.
  • the processor is further configured to instruct the touch screen to display a third shooting preview interface after detecting a third operation for the second shooting option, the third shooting preview interface includes a third preview frame, and the third preview frame displays the The picture captured by the camera of the electronic device in real time.
  • the processor is further configured to instruct the camera to start shooting the second video content.
  • the processor is further configured to instruct the touch screen to display the third part of the picture captured by the camera in real time in the third preview frame at the first moment after starting to shoot the second video content.
  • the processor is further configured to instruct the touch screen to display the fourth part of the picture captured by the camera in real time in the third preview frame at a second moment after starting to shoot the second video content, wherein the first part, the The second part, the third part and the fourth part are all different.
  • the present application provides an image processing method, in which an electronic device can use a cropping frame with a preset size and a preset motion trajectory to crop an image captured by a camera during a photo-taking or video-recording process, and display the image in the cropping frame on the in the preview interface or the recording interface.
  • the shot video or picture can have the effect of automatic zooming, and the detailed characteristics of the shooting subject can be highlighted.
  • the processor before the processor instructs the camera to start shooting the first video content, the processor is further configured to detect a fourth operation on the second shooting preview interface.
  • the processor is specifically configured to instruct the camera to start shooting the first video content in response to the fourth operation.
  • the second shooting preview interface further includes an option switching control.
  • the processor instructs the touch screen to display the second part of the picture captured by the camera of the electronic device in real time in the second preview frame
  • the processor is further configured to detect a fifth operation for the option switching control.
  • the processor is specifically configured to display the shooting option interface in response to the fifth operation. In this way, after a shooting option has been selected, the user can be provided with an entry for changing the shooting option, so that the user can change the shooting option to shoot video content.
  • the processor is further configured to detect that the preview for the second shooting is The sixth operation of the interface.
  • the processor is further configured to, in response to the sixth operation, save the first part as a video picture at a first moment in the video file, and save the second part as a video picture at a second moment in the video file.
  • the electronic device can shoot video recordings with effects such as automatic zoom or lens shift.
  • the processor is further configured to detect the seventh operation at a first moment after starting to shoot the first video content.
  • the processor is further configured to save the first part as a picture in response to the seventh operation.
  • the electronic device can save a preview video image as a picture during a preview process with effects such as automatic zooming or lens panning.
  • the second shooting preview interface further includes a first window.
  • the touch screen is also used for displaying the picture captured in real time by the camera of the electronic device in the first window.
  • the processor is further configured to instruct the touch screen to display the bounding box of the first part in the first window at a first moment after starting to shoot the first video content.
  • the processor is further configured to instruct the touch screen to display the bounding box of the second part in the first window at a second moment after starting to shoot the first video content. In this way, it is convenient for the user to see the picture captured by the camera in real time, and it is convenient for the user to find the subject to be photographed.
  • the second shooting preview interface further includes a first window.
  • the processor is further configured to instruct the touch screen to display the video image at the first moment in the video sample corresponding to the first shooting option in the first window at the first moment after the first video content is started to be captured.
  • the processor is further configured to instruct the touch screen to display, in the first window, a video image at the second moment in the video sample corresponding to the first shooting option at a second moment after the first video content is started to be captured. In this way, it is convenient for users to compare the shooting effects in real-time with the video samples.
  • the display position of the first window and the second preview frame is any one of the following: at least a partial area of the first window overlaps with the display area of the second preview frame; or, the first window A window is displayed outside the second preview frame in the second shooting preview interface; alternatively, the first window is displayed in the upper right corner of the second preview frame; alternatively, the first window is displayed in the second preview frame The upper left area of the preview box.
  • the first window includes a window closing control; the processor is further configured to detect an eighth operation for the window closing control in the first window. The processor is further configured to close and display the first window in response to the eighth operation. In this way, when the user does not need the first window, the user can be manually triggered to close, so as to ensure that the shooting picture displayed on the electronic device is not blocked.
  • the touch screen is further used for displaying a window opening control in the second shooting preview interface.
  • the processor is further configured to detect the ninth operation of opening the control for the window.
  • the processor is further configured to instruct the touch screen to display the first window on the second shooting preview interface in response to the ninth operation. In this way, when the user needs to call the small window, the user can trigger the electronic device to redisplay the first window.
  • the second shooting preview interface further includes a mirror movement mode closing control.
  • the processor is further configured to detect a tenth operation acting on the mirror movement mode closing control.
  • the processor is further configured to instruct the touch screen to display the first shooting preview interface in response to the tenth operation. In this way, the user can trigger to close the shooting mode at any time.
  • the second shooting preview interface further includes a second window.
  • the touch screen is further configured to display the waveform diagram of the first music segment corresponding to the first shooting option in the second window.
  • the audio information in the waveform chart at the first moment after starting to shoot the first video content is different from the audio information in the waveform chart at the second moment after starting to shoot the first video content, and the audio information includes the following One or more of: tempo information, amplitude information, and style information. In this way, the video picture can be automatically zoomed following the rhythm of the music, which enhances the visual effect of the shooting picture.
  • the electronic device may further include a speaker.
  • the processor is further configured to instruct the speaker to play the first music segment after starting to shoot the first video content.
  • the processor when the processor saves the first part as a video picture at the first moment in the video file, and saves the second part as a video picture at the second moment in the video file, the processor , and is also used to save the first music segment in the audio data of the video file.
  • the processor is further configured to perform image stabilization processing on the images captured in real time by the camera before displaying the images captured in real time by the camera, and the image stabilization processing includes one or more of the following: Electronic image stabilization EIS processing, optical image stabilization processing, mechanical image stabilization processing. In this way, the shooting picture can be made smooth and excessive.
  • the processor is further configured to perform image super-resolution reconstruction on the first part before the touch screen displays the first part of the picture acquired by the camera in real time in the second preview frame.
  • the processor is further configured to perform image super-resolution reconstruction on the second part before the touch screen displays the second part of the picture acquired by the camera in real time in the second preview frame.
  • the processor is further configured to perform image super-resolution reconstruction on the third part before the touch screen displays the third part of the picture acquired by the camera in real time in the third preview frame.
  • the processor is further configured to perform image super-resolution reconstruction on the fourth part before the touch screen displays the fourth part of the picture acquired by the camera in real time in the third preview frame. In this way, the shooting picture can be made clearer.
  • the camera of the electronic device includes a wide-angle camera and a non-wide-angle camera.
  • the first preview frame displays the image captured by the non-wide-angle camera in real time.
  • the second preview frame displays the picture captured by the wide-angle camera in real time.
  • the third preview frame displays the image captured by the wide-angle camera in real time. In this way, the captured picture can have a larger viewing angle.
  • the present application provides an electronic device including a touch screen, a camera, one or more processors and one or more memories.
  • the one or more processors are coupled to the touch screen, the camera, and one or more memories for storing computer program code, the computer program code including computer instructions, when the one or more processors execute the computer
  • the electronic device is caused to execute the image processing method in any possible implementation manner of any one of the foregoing aspects.
  • the present application provides an electronic device, including: one or more functional modules.
  • One or more functional modules are used to execute the image processing method in any possible implementation manner of any of the above aspects.
  • an embodiment of the present application provides a computer storage medium, including computer instructions, which, when the computer instructions are run on an electronic device, cause the communication apparatus to execute the image processing method in any of the possible implementations of any of the above aspects .
  • an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, enables the computer to execute the image processing method in any of the possible implementations of any of the foregoing aspects.
  • FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a software structure of an electronic device provided by an embodiment of the present application.
  • 3A-3Q are schematic diagrams of a group of interfaces provided by the embodiments of the present application.
  • 4A-4F are schematic diagrams of a group of interfaces provided by another embodiment of the present application.
  • 5A-5E are schematic diagrams of a group of interfaces provided by another embodiment of the present application.
  • 6A-6H are schematic diagrams of a set of interfaces provided by another embodiment of the present application.
  • FIGS. 7A-7C are schematic diagrams of position changes of the cropping frame on the original image provided by the embodiments of the present application.
  • 7D-FIG. 7F are schematic diagrams of a group of cropping effects of an original image by using a cropping frame according to an embodiment of the present application.
  • FIGS. 8A-8C are schematic diagrams of position changes of a cropping frame on an original image provided by another embodiment of the present application.
  • FIG. 8D-FIG. 8G are schematic diagrams of a group of cropping effects of an original image by using a cropping frame according to an embodiment of the present application.
  • FIGS. 9A-9F are schematic diagrams of position changes of the cropping frame on the original image provided by the embodiments of the present application.
  • 9G-9K are schematic diagrams of a group of interfaces provided by another embodiment of the present application.
  • 10A-10K are schematic diagrams of a group of interfaces provided by another embodiment of the present application.
  • 11A-11E are schematic diagrams of a set of interfaces provided by another embodiment of the present application.
  • 12A-12D are schematic diagrams of a group of interfaces provided by another embodiment of the present application.
  • FIGS. 13A-13E are schematic diagrams of a group of interfaces provided by another embodiment of the present application.
  • 14A-14E are schematic diagrams of a group of interfaces provided by another embodiment of the present application.
  • 15A-15E are schematic diagrams of a set of interfaces provided by another embodiment of the present application.
  • 16 is a schematic diagram of waveform comparison of a sound signal and a rhythm signal provided by an embodiment of the application;
  • 17A-17J are schematic diagrams of a set of interfaces provided by another embodiment of the present application.
  • FIG. 18 is a schematic diagram of a module architecture of a video stream cropping system provided by an embodiment of the present application.
  • 19 is a schematic diagram of the hardware architecture of a video stream cropping system provided by an embodiment of the application.
  • FIG. 20 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • first and second are only used for descriptive purposes, and should not be construed as implying or implying relative importance or implying the number of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, the “multiple” The meaning is two or more.
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 As an example, it should be understood that the electronic device 100 shown in FIG. 1 is only an example, and the electronic device 100 may have more or fewer components than those shown in FIG. 1 , two or more components may be combined, or Different component configurations are possible.
  • the various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
  • the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an 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, buttons 190, motor 191, indicator 192, camera 193, display screen 194, And a subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented 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 processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. 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 processor
  • graphics processor graphics processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the 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 transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, 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 transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with 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 a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • 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 may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement 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 interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement 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 may 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 the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically 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 to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated 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 used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device 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 input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • 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 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with 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 (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system, GLONASS
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quadsi -zenith satellite system, QZSS
  • SBAS satellite based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is 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 alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • 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).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element 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 tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto 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 optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it 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 formats of 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 include multiple cameras.
  • the plurality of cameras may include wide-angle cameras and non-wide-angle cameras.
  • the electronic device 100 can obtain the video stream by using a wide-angle camera. In this way, the electronic device 100 can obtain a video picture with a wider viewing angle.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG Moving Picture Experts Group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the electronic device 100 needs to identify the image content in the shooting picture, detect and track the position of the designated image content, and determine the outline of the designated image content.
  • the application processor can send the preprocessed RGB image (or BGR image or single-channel image or grayscale image, etc.) to the NPU.
  • the NPU can detect and track the position of the specified image content in the RGB image (or BGR image or single-channel image or grayscale image, etc.) through the AI model, and determine the outline of the specified image content.
  • the NPU can output the detection frame information or outline information of the specified image content to the application processor.
  • the application processor may determine the cropping frame information according to the detection frame information/or outline information of the specified image.
  • the application processor may crop the video stream based on the cropping frame information, or the application processor may instruct the ISP to crop the video stream based on the cropping frame information.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, 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 realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 .
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound near the microphone 170C through the human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, 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 pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of 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 the 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.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 .
  • the angular velocity of electronic device 100 about three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse motion to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L 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 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation 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 touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations 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 indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 100 employs an eSIM, ie: an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present invention takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 as an example.
  • FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • AndroidRuntime includes core libraries and virtual machines. Androidruntime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into raw input events (including touch coordinates, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer.
  • the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon, for example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
  • the camera 193 captures still images or video.
  • the present application provides an image processing method, in which the electronic device 100 can use a cropping frame with a preset size and a preset motion trajectory to crop an image captured by a camera during a photographing or video recording process, and display the image in the cropping frame.
  • the preview interface or recording interface In this way, the shot video or picture can have the effect of automatic zooming, and the detailed characteristics of the shooting subject can be highlighted.
  • the electronic device 100 may receive a camera movement template selected by the user before recording.
  • the lens motion template may include a size change rule of the cropping frame and a motion track of the cropping frame on the original image acquired by the camera.
  • the electronic device 100 can use the cropping frame defined in the lens motion template to crop each frame of the original image captured by the camera, and display the cropped image on the video recording interface in frame order. .
  • the video shot by the electronic device 100 can have the effect of automatic zooming, which increases the viewing quality of the video.
  • the electronic device 100 may display an interface 310 with a home screen, the interface 310 displays a page on which application icons are placed, and the page includes a plurality of application icons (eg, weather application icons, stock application icon, calculator application icon, settings application icon, mail application icon, gallery application icon 312, music application icon, video application icon, browser application icon, etc.).
  • a page indicator is also displayed below the multiple application icons to indicate the positional relationship between the currently displayed page and other pages.
  • tray icons eg, a dialing application icon, an information application icon, a contact application icon, and a camera application icon 311 ), and the tray icons remain displayed when the page is switched.
  • the above-mentioned page may also include multiple application icons and page indicators.
  • the page indicator may not be a part of the page, but exists alone.
  • the above-mentioned picture icon is also optional, which is not limited in this embodiment of the present application.
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the camera application icon 311, and in response to the input operation, the electronic device 100 may display the photographing interface 320 as shown in FIG. 3B .
  • an input operation eg, a single click
  • the shooting interface 320 may include an echo control 321, a shooting control 322, a camera conversion control 323, a picture captured by the camera 324, a setting control 325, a zoom ratio control 326, and one or more shooting mode controls (for example, “Night Scene Mode” control 327A, "Portrait Mode” control 327B, “Large Aperture” control 327C, “Normal Photo Mode” control 327D, "Video Mode” control 327E, "Pro Mode” control 327F, More Mode Control 327G ).
  • the echo control 321 can be used to display the captured image.
  • the shooting control 322 is used to trigger saving of the image captured by the camera.
  • the camera switching control 323 can be used to switch cameras for taking pictures.
  • the setting control 325 can be used to set the camera function.
  • the zoom ratio control 326 can be used to set the zoom ratio of the camera.
  • the zoom magnification control 326 can trigger the electronic device 100 to display a zoom slide bar, and the zoom slide bar can receive the user's upward (or downward) sliding operation, so that the electronic device 100 increases (or decreases) the zoom magnification of the camera .
  • the zoom magnification control 326 can display a zoom increase control and a zoom decrease control on the electronic device 100, and the zoom increase control can be used to receive and respond to the user's input to trigger the electronic device 100 to increase the zoom magnification of the camera;
  • the widget can be used to receive and respond to the user's input to trigger the electronic device 100 to reduce the zoom ratio of the camera.
  • the shooting mode control can be used to trigger the opening of the image processing flow corresponding to the shooting mode. For example, a "night scene mode" control 372A may be used to trigger an increase in brightness and color richness, etc. in a captured image.
  • the "Portrait Mode” control 327B may be used to trigger blurring of the background of the person in the captured image.
  • the “large aperture” control 327C can be used to trigger the electronic device 100 to invoke an image processing algorithm to highlight the subject and blur the background. As shown in FIG. 3B , the shooting mode currently selected by the user is the "normal shooting mode".
  • the electronic device 100 may receive a user input operation (eg, a click) on the "more" control 327G, and in response to the input operation, the electronic device 100 may display the mode selection page 330 as shown in FIG. 3C.
  • a user input operation eg, a click
  • the mode selection page 330 includes one or more mode controls (eg, "HDR Mode” control, “Time Lapse Mode” control, “Watermark Mode” control, “Slow Motion Mode” control, “ “Intelligent Object Recognition Mode” control, “Document Correction Mode” control, “Panorama Mode” control, “Streamer Shutter Mode” control, “3D Dynamic Mode” control, “Online Translation Mode” control, “Intelligent Mirror Mode” control 331, etc. Wait).
  • mode controls eg, "HDR Mode” control, “Time Lapse Mode” control, “Watermark Mode” control, “Slow Motion Mode” control, “ “Intelligent Object Recognition Mode” control, “Document Correction Mode” control, “Panorama Mode” control, “Streamer Shutter Mode” control, “3D Dynamic Mode” control, “Online Translation Mode” control, “Intelligent Mirror Mode” control 331, etc. Wait).
  • the mode selection page 330 may be transparently displayed on the picture 324 captured by the above-mentioned camera.
  • the electronic device 100 may receive an input operation (eg, single click) of the user acting on the "smart mirror movement mode" control 331, and in response to the input operation, the electronic device 100 may display the mirror movement template interface 340 as shown in FIG. 3D .
  • an input operation eg, single click
  • the electronic device 100 may display the mirror movement template interface 340 as shown in FIG. 3D .
  • the motion template selection interface 340 includes one or more motion template options (eg, "travel" motion option 341A, “comfortable” motion option 341B, “kinetic” motion option 341C, etc. ), selection box 342 , mirror movement template display area 351 , mirror movement track display area 353 , intelligent mirror movement prompt box 343 , echo control 346 , and mirror movement shooting control 345 .
  • a mirror movement template play control 352 is displayed on the mirror movement template display area 351 .
  • There is a close control 344 in the smart mirror movement prompt box 343 and the close control 344 can be used to trigger the electronic device 100 to exit the mirror movement template selection interface 340 .
  • the size change rules of the cropping frame or the motion trajectory of the cropping frame corresponding to different mirror motion template options are different.
  • the “travel” camera movement option 341A has been selected in the selection box 342 , and the video sample corresponding to the “travel” camera movement option 341A is displayed in the camera movement template display area 351 .
  • the camera movement track display area 353 may display the cropping frame size change rule corresponding to the "travel" camera movement option 341A and/or the movement track of the cropping frame in the original image.
  • the center point of the crop box corresponding to the "travel" motion option 341A may be at the same location as the center point of the original image, and the size of the crop box corresponding to the "travel" motion option 341A may first decrease proportionally from the size of the original image over time. to the preset minimum size, and then scale up from the preset minimum size to the size of the original image.
  • the size of the cropping frame corresponding to the "travel" lens movement option 341A changes in proportion to the size of the original image. This preset minimum size is smaller than the size of the original image.
  • the lens movement template selection interface 340 may be transparently displayed on the picture 324 captured by the above-mentioned camera.
  • the electronic device 100 may receive an input operation (eg, click) that the user acts on the camera movement template playback control 352, and in response to the input operation, as shown in FIG. 3E, the electronic device 100 may display the template in the camera movement track display area 353.
  • the electronic device 100 may crop the template picture based on the cropping frame 355 to obtain a cropped picture.
  • the electronic device 100 can adjust the size of the cropped picture to the display size of the moving-motion template display area 351 and display it in the display area 351 of the moving-motion template.
  • the template picture may be each frame picture in a piece of video footage.
  • the cropping frame 355 is reduced to a preset minimum size.
  • the cropping frame 355 can be gradually enlarged to the size of the original picture, and then reduced to a preset size after being enlarged to the size of the original picture.
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the camera movement control 345, and in response to the input operation, the electronic device 100 may display the recording interface 360 as shown in FIG.
  • the size change rule of the cropping frame corresponding to the "travel" mirror motion template 341A and/or the motion track of the cropping frame in the original image is used to crop the video stream obtained by the camera during video shooting.
  • the video recording interface 360 may include a preview image 371 obtained by the camera, an echo control 346, a video capture control 361, a mirror movement template switching control 362, an intelligent mirror movement prompt box 343, and a mirror movement template preview window 363 .
  • the mirror movement template preview window 363 displays the cropping effect picture corresponding to the selected mirror movement template (for example, the mirror movement template corresponding to the above-mentioned "travel" mirror movement option 341A has been selected).
  • the lens-moving template preview window 363 includes a closing control 364, and the closing control 364 can be used to trigger the electronic device 100 to close the lens-moving template preview window 363.
  • the display position of the mirror movement template preview window 363 may be at the upper right corner of the display screen or at the upper left corner of the display screen, which is not limited herein.
  • the camera movement template switching control 362 may display the name of the camera movement template selected by the electronic device 100 (for example, "travel").
  • the moving template switching control 362 can be used to trigger the electronic device 100 to switch the moving template.
  • the electronic device 100 may receive and respond to a user's input operation (eg, hold and drag) on the mirror movement template preview window 363, and move the display position of the mirror movement template preview window 363.
  • the electronic device 100 may receive an input operation (such as a single click) that the user acts on the video capture control 361, and in response to the input operation, the electronic device 100 may start to change the rule and/or crop the size of the cropping frame corresponding to the selected mirror motion template.
  • the motion trajectory of the frame in the original image is cropped for each frame of the video stream obtained by the camera.
  • the electronic device 100 may adjust the cropped image of each frame to a specified size and display it in the video recording interface 360 in sequence of frames.
  • the electronic device 100 may save the cropped video stream.
  • the electronic device 100 can display the recording time frame 366 and the recording end control 365 on the recording interface 360 , and replace the echo control 346 and the mode switching control 362 to pause the recording. Controls 367 and Camera Controls 368.
  • the recording time frame 366 may be used to display the recording time of the electronic device 100 .
  • the recording end control 365 can be used for the electronic device 100 to end the recording.
  • the pause recording control 367 can be used to trigger the electronic device 100 to pause recording.
  • the photographing control 368 can be used to trigger the electronic device 100 to save a certain frame or multiple frames of video recordings as a picture during the video recording process.
  • the electronic device 100 may crop each frame of the original image acquired by the camera through the cropping frame, and capture the image within the cropping frame.
  • the electronic device 100 can adjust the image in the cropping frame to a specified size and display it on the video recording interface 360 .
  • the center point of the crop box may be at the same location as the center point of the original image.
  • the size of the cropping frame can be gradually reduced from the size of the original image stream to the preset minimum size in proportion.
  • the electronic device 100 when the electronic device 100 receives the third second after receiving the user's input operation acting on the video capture control 361, the electronic device 100 can obtain the original image P1 through the camera, and determine that the cropping frame is in the original image P1. position in image P1.
  • the electronic device 100 may cut out the image within the cropping frame on the original image P1, and adjust the cutout image to a specified size to obtain the cropped image 372.
  • the electronic device 100 may display the cropped image 372 on the recording interface 360 .
  • the electronic device 100 may display the effect picture of the selected mirror movement template at the third second in the mirror movement template preview window 363 .
  • the magnification ratio of the image content in the cropped image 372 is greater than the magnification ratio of the image content in the preview image 371 shown in FIG. 3I.
  • the electronic device 100 when the electronic device 100 receives the input operation of the user acting on the video capture control 361 at the 8th second, the cropping frame is reduced to the preset minimum size, and the electronic device 100 can obtain the original image through the camera P2, and determine the position of the cropping frame in the original image P2.
  • the electronic device 100 may cut out the image in the cropping frame on the original image P2, and adjust the cutout image to a specified size to obtain the cropped image 373.
  • the electronic device 100 may display the cropped image 373 on the recording interface 360 .
  • the electronic device 100 may display the effect picture of the selected mirror motion template at the 8th second in the template preview window 363 .
  • the magnification of the image content in the cropped image 373 is greater than the magnification of the image content in the cropped image 372 shown in FIG. 3J.
  • the electronic device 100 when the electronic device 100 receives the user's input operation on the video capture control 361 in the 12th second, the size of the cropping frame is larger than the preset minimum size and smaller than the size of the frame image, the electronic device 100 can The original image P3 is acquired through the camera, and the position of the cropping frame in the original image P3 is determined. The electronic device 100 may cut out the image within the cropping frame on the original image P3, and adjust the cutout image to a specified size to obtain the cropped image 374. The electronic device 100 may display the cropped image 374 on the recording interface 360 . The electronic device 100 may display, in the template preview window 363, the effect picture of the selected mirror motion template at the 12th second. Wherein, the magnification ratio of the image content in the cropped image 374 is smaller than the magnification ratio of the image content in the cropped image 373 shown in FIG. 3K.
  • the electronic device 100 may receive an input operation (eg, click) that the user acts on the recording end control 365, and in response to the input operation, the electronic device 100 may end the recording, and save the video stream after the video stream is cropped by the cropping frame corresponding to the lens motion template. Record video. As shown in FIG. 3M , after the electronic device 100 finishes recording, the electronic device 100 can display the pause recording control 367 and the photographing control 368 with the echo control 346 and the mode switching control 362 , and display the captured recording on the echo control 346 The image frame in the finished recorded video.
  • an input operation eg, click
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the echo control 346, and in response to the input operation, the electronic device 100 may display a video browsing interface 380 as shown in FIG. 3N.
  • an input operation eg, a single click
  • the video browsing interface 380 may include a recorded video 381 captured in an intelligent mirror movement mode, a video playback control 382 , a total video time 383 , and a menu 384 .
  • the menu 384 may include a share button, a favorite button, an edit button, a delete button, and more buttons.
  • the share button can be used to trigger the sharing of the recorded video 381 .
  • the favorite button can be used to trigger to save the recorded video 381 to the picture favorite folder.
  • the edit button can be used to trigger editing functions such as rotation, trimming, adding filters, and blurring of the recorded video 381.
  • the delete button can be used to trigger deletion of the recorded video 381 .
  • the More button can be used to trigger opening of more functions related to the recorded video 381.
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the video playback control 382 , and in response to the input operation, the electronic device 100 may play the recorded video 381 .
  • an input operation eg, a single click
  • a pause control 386 and a playback progress bar 385 can be displayed on the video preview interface 380 .
  • the pause control 386 can be used to pause the playback of the recorded video 381 .
  • the electronic device 100 may display the video screen 391 on the video preview interface 380 .
  • the electronic device 100 may display a video screen 392 on the video preview interface 380 .
  • the magnification ratio of the image content in the video frame 392 is smaller than the magnification ratio of the image content in the video frame 391 shown in FIG. 30 .
  • the electronic device 100 may display a video screen 393 on the video preview interface 380 .
  • the magnification ratio of the image content in the video frame 393 is smaller than the magnification ratio of the image content in the video frame 392 shown in FIG. 3P.
  • the electronic device 100 may receive the user's input at any time, and trigger the display of the above mirror movement template selection interface. In this way, it is convenient for the user to choose and replace other mirror movement templates.
  • the electronic device 100 may display a recording interface 360 .
  • the video recording interface 360 for the text description of the video recording interface 360, reference may be made to the above-mentioned embodiment shown in FIG. 3I, and details are not repeated here.
  • the electronic device 100 may receive an input operation (eg, single click) of the user acting on the moving template switching control 362, and in response to the input operation, the electronic device 100 may display the moving template selection interface 340 as shown in FIG. 4B .
  • an input operation eg, single click
  • the electronic device 100 may display the moving template selection interface 340 as shown in FIG. 4B .
  • the selection box 342 has selected the "travel" motion template 341A.
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the "kinetic" motion template 341C, and in response to the input operation, the electronic device 100 may select the "kinetic" motion template 341C.
  • an input operation eg, a single click
  • the selection box 342 has selected the "Motion” motion template 341C.
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the camera movement control 345, and in response to the input operation, the electronic device 100 may display the photographing interface 410 as shown in FIG. 4D, and use the selected ""
  • the corresponding cropping frame information (including the size change rule of the cropping frame and/or the motion track of the cropping frame in the original image) corresponding to the "Dynamic" lens motion template 341C is used to crop the video picture obtained by the camera when the video is captured.
  • the shooting interface 410 may include a preview image 441 obtained by the camera, an echo control 346 , a video shooting control 361 , a mirror movement template switching control 362 , an intelligent mirror movement prompt box 343 , and a mirror movement template preview window 431 .
  • the motion template preview window 431 displays the video with the cropping effect corresponding to the selected motion template (for example, the motion template corresponding to the above-mentioned "Motion" motion option 341C has been selected).
  • the camera-moving template preview window 431 includes a closing control 432, and the closing control 432 can be used to trigger the electronic device 100 to close the camera-moving template preview window 431.
  • the motion template switching control 362 may display the name of the motion template selected by the electronic device 100 (for example, "Motion").
  • the moving template switching control 362 can be used to trigger the electronic device 100 to switch the moving template.
  • the electronic device 100 may receive the user's input, and close/open the lens motion template preview window on the shooting interface. In this way, the electronic device 100 can open/close the preview window of the mirror movement template at any time according to the needs of the user, so that the preview window of the mirror movement template will not always block the shooting picture.
  • the electronic device 100 may receive an input operation (eg, click) that the user acts on the closing control 432, and in response to the input operation, the electronic device 100 may close the lens motion template preview window 431, and A picture-in-picture on control 433 as shown in FIG. 4E is displayed.
  • an input operation eg, click
  • the PIP enable control 433 can be displayed on the top right side of the display screen, or can be displayed in other positions without limitation.
  • the electronic device 100 may receive an input operation (eg, a single click) of the user for the PIP enable control 433, and in response to the input operation, the electronic device 100 may display a mirror motion template preview window 431 as shown in FIG. 4F .
  • a viewfinder display window may be displayed on the shooting interface.
  • the framing display window includes the original image obtained by the camera and the cropping frame.
  • the electronic device 100 can show the dynamic change of the cropping frame to the user, which is convenient for the user to perceive the position of the cropping frame in the original image.
  • the electronic device 100 may display a lens motion template selection interface 340 .
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the camera movement control 345 , and in response to the input operation, the electronic device 100 may display the photographing interface 510 as shown in FIG. 5B .
  • the shooting interface 510 includes the original image 511 obtained by the camera, an echo control 346 , a video shooting control 361 , a mirror movement template switching control 362 , an intelligent mirror movement prompt box 343 , and a viewfinder display window 521 .
  • the viewfinder display window 521 displays the original image 511a (the image content included in the original image 511a is the same, and the display scale is different), and the close control 522 is displayed.
  • the close control 522 can be used to trigger the electronic device 100 to close the viewfinder display window 521 .
  • the viewfinder display window 521 may be at the upper right corner of the display screen or at the upper left corner of the display screen, which is not limited herein.
  • the electronic device 100 may receive and move the display position of the viewfinder display window 521 in response to a user's input operation (eg, press and drag) on the viewfinder display window 521 .
  • a user's input operation eg, press and drag
  • the electronic device 100 may receive an input operation (such as a single click) that the user acts on the video capture control 361, and in response to the input operation, the electronic device 100 may start to change the rule and/or crop the size of the cropping frame corresponding to the selected mirror motion template.
  • the motion trajectory of the frame in the original image is cropped for each frame of the video stream obtained by the camera.
  • the electronic device 100 can adjust the cropped image of each frame to a specified size and sequentially display it in the video recording interface 360 in frame order, and display the position of the cropping frame on the original image in the viewfinder display window 521 .
  • the electronic device 100 may save the cropped video stream.
  • the electronic device 100 may display a recording time frame 366 and a recording end control 365 on the recording interface 360 .
  • the electronic device 100 may display the original image captured by the camera in the viewfinder display window 521 , and display the position of the cropping frame 523 in the original image in the viewfinder display window 521 .
  • the electronic device 100 can cut out the image in the cropping frame 523 on the original image, adjust it to a specified size, and obtain a cropped image.
  • the electronic device 100 may display the cropped image on the video recording interface 360 as a video recording image.
  • the electronic device 100 can obtain the original image 512a through the camera, and determine the size of the cropping frame 523 in the original image 512a. Location.
  • the electronic device 100 may cut out the image in the cropping frame 523 on the original image 512 a , and adjust the cut-out image to a specified size to obtain the cropped image 512 .
  • the electronic device 100 may display the original image 512 a in the framing presentation window 521 , and display the position of the cropping frame 523 on the original image 512 a in the framing presentation window 521 .
  • the electronic device 100 may display the image 512 on the recording interface 360 . Wherein, the magnification ratio of the image content in the cropped image 512 is greater than the magnification ratio of the image content in the original image 511 shown in FIG. 5B .
  • the electronic device 100 may display the above-mentioned image captured by one camera (such as a wide-angle camera) among the multiple cameras in the viewfinder display window 521, and display the An image captured by another camera (eg, a depth-of-field camera) among the plurality of cameras by adjusting the zoom ratio is displayed in the shooting interface 510 as a preview image or a video image.
  • one camera such as a wide-angle camera
  • another camera eg, a depth-of-field camera
  • the electronic device 100 may adjust the original image captured by the camera to a specified magnification and display it in the viewfinder display window 521 .
  • the electronic device 100 may perform cropping through a cropping frame based on the original image adjusted to a specified magnification to obtain a cropped image, and display the cropped image on the shooting interface 510 as a preview image or a video image.
  • the electronic device 100 when the electronic device 100 shoots a video, what the electronic device 100 acquires through the camera is an image stream.
  • the size of each frame of the original image in the image stream is fixed.
  • the electronic device 100 may determine the position of the cropping frame in each frame of the original image in the image stream according to the size change rule of the cropping frame corresponding to the selected mirror motion template and/or the motion trajectory of the cropping frame in the original image. Then, the electronic device 100 may crop each frame of the original image in the image stream by using the cropping frame to obtain the cropped image stream within the cropping frame.
  • the electronic device 100 can adjust the cropped image stream in the cropping frame to a specified size, and display it on the video recording interface 360 in frame order.
  • the size of the cropping frame can be gradually reduced from the size of the original image to the preset minimum size in proportion. From the 8th second to the 16th second after receiving the user's input operation acting on the video shooting control 361, the size of the cropping frame is gradually increased proportionally to the size of the original image.
  • the cropping frame 523 is reduced to a preset minimum size.
  • the electronic device 100 may acquire the original image 513a through the camera, and determine the position of the cropping frame 523 in the original image 513a.
  • the electronic device 100 may cut out the image in the cropping frame 523 on the original image 513a, and adjust the cutout image to a specified size to obtain the cropped image 513.
  • the electronic device 100 may display the original image 513 a in the framing presentation window 521 , and display the position of the cropping frame 523 on the original image 513 a in the framing presentation window 521 .
  • the electronic device 100 may display the cropped image 513 on the recording interface 360 .
  • the magnification ratio of the image content in the cropped image 513 is greater than the magnification ratio of the image content in the cropped image 512 shown in FIG. 5C .
  • the size of the cropping frame 523 is larger than the preset minimum size and smaller than the size of the frame image.
  • the electronic device 100 may acquire the frame image of the 12th second through the camera, and determine the position of the cropping frame in the original image 514a.
  • the electronic device 100 may cut out the image in the cropping frame 523 on the original image 514a, and adjust the cutout image to a specified size to obtain the cropped image 514.
  • the electronic device 100 may display the original image 514a in the framing presentation window 521, and display the position of the cropping frame 523 on the original image 514a in the framing presentation window 521.
  • the electronic device 100 may display the cropped image 514 on the recording interface 360 .
  • the magnification ratio of the image content in the cropped image 514 is smaller than the magnification ratio of the image content in the cropped image 513 shown in FIG. 5D .
  • the electronic device 100 can receive an input operation (such as a single click) that the user acts on the recording end control 365, and in response to the input operation, the electronic device 100 can end the recording, and save the clipping of the video stream through the clipping frame information corresponding to the above-mentioned mirror motion template. video recording later.
  • an input operation such as a single click
  • the electronic device 100 may select a mirror movement mode to take a photo. After the electronic device 100 is switched to the mirror movement mode, the electronic device 100 may receive the mirror movement template selected by the user. Different mirror motion templates may correspond to different cropping frame information (including the size change rule of the cropping frame and the motion track of the cropping frame on the original image obtained by the camera). The electronic device 100 can use the cropping frame information corresponding to the mirror movement template to crop each frame of image collected by the camera, and use the cropped image as a preview image to display on the shooting interface. When the electronic device 100 receives the user's input (eg, single click) acting on the photographing control, the electronic device 100 may save the preview screen displayed at this time as a picture. In this way, the electronic device 100 can realize automatic zooming through the lens movement template selected by the user, which is convenient for the user to select the subject or the background of the shooting scene.
  • Different mirror motion templates may correspond to different cropping frame information (including the size change rule of the cropping frame and the motion track of the cropping frame on the
  • the electronic device 100 may receive an input operation (eg, a single click) for the user to select the mirror movement mode control 327H, and in response to the input operation, the electronic device 100 may switch from the “normal photographing mode” to “Smart Mirror Mode".
  • the electronic device 100 can crop the frame image acquired by the camera according to the size change rule of the cropping frame corresponding to the motion template selected by the user and/or the motion trajectory of the cropping frame in the original image, and then crop the frame image obtained by the camera.
  • the resulting image is displayed on the shooting interface as a preview screen.
  • the electronic device 100 may display a motion template selection interface 610 in response to an input operation (eg, a single click) of the user selecting the motion motion mode control 327H.
  • the motion selection interface 610 may include one or more motion template options (eg, "travel" motion option 611A, “comfortable” motion option 611B, “kinetic” motion option 611C, etc.), selection box 612, Determine the control 613, the mirror movement template display area 614, and the mirror movement track display area 616.
  • the mirror movement template display area 614 may display a mirror movement template play control 615 .
  • the camera movement track display area 616 may display the center point 617 of the crop frame corresponding to the "travel" movement option 611A in the original image, and the size change.
  • the center point of the cropping frame corresponding to the "travel" motion option 611A may be at the same location as the central point of the original image, and the size of the cropping frame corresponding to the "travel" motion option 611A may first decrease in proportion to the size of the original image over time. to the preset minimum size, and then scale up from the preset minimum size to the size of the original image.
  • the template selection interface 610 may also display one or more shooting mode controls (for example, a "night scene mode” control 327A, a “portrait mode” control 327B, a “large aperture” control 327C, and a “mirror movement” mode control. 327H, “Normal Photo Mode” control 327D, “Video Mode” control 327E, "Pro Mode” control 327F, etc.).
  • shooting mode controls for example, a "night scene mode” control 327A, a "portrait mode” control 327B, a “large aperture” control 327C, and a “mirror movement” mode control.
  • 327H "Normal Photo Mode” control 327D
  • Video Mode control 327E
  • Pro Mode control 327F
  • the electronic device 100 may receive an input operation (eg, click) that the user acts on the camera movement template playback control 615, and in response to the input operation, as shown in FIG. 6C, the electronic device 100 may display the template in the camera movement track display area 616. Picture, crop box 618, and center point 617 of crop box 618. The electronic device 100 may crop the template picture based on the cropping frame 618 to obtain a cropped picture. The electronic device 100 can adjust the size of the cropped image to the display size of the moving-motion template display area 614 and display it in the display area 614 of the moving-motion template.
  • an input operation eg, click
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the determination control 613, and in response to the input operation, the electronic device 100 may display the photographing interface 620 as shown in FIG. 6D, and use the selected "travel"
  • the size change rule of the cropping frame corresponding to the mirror movement template 611A and/or the motion trajectory of the cropping frame in the original image is used to crop the original preview image obtained by the camera.
  • the shooting interface 620 may include a mirror movement template switching control 621, a viewfinder display window 622, a cropped image 631, one or more shooting mode controls (for example, the “night scene mode” control 327A, the “portrait mode” Control 327B, “Large Aperture” control 327C, “Motion Mirror” mode control 327H, “Normal Photo Mode” control 327D, "Video Mode” control 327E, “Pro Mode” control 327F, etc.), Echo Control 321, Shooting Control 322. Camera conversion control 323.
  • the “night scene mode” control 327A for example, the “night scene mode” control 327A, the “portrait mode” Control 327B, “Large Aperture” control 327C, “Motion Mirror” mode control 327H, “Normal Photo Mode” control 327D, "Video Mode” control 327E, “Pro Mode” control 327F, etc.
  • Echo Control 321 Shooting Control 322.
  • Camera conversion control 323 For the text description of one
  • the mirror movement template switching control 621 can be used to trigger the electronic device 100 to display the above-mentioned mirror movement template selection interface 610 and switch the mirror movement template selected by the user based on the user's input.
  • the framing presentation window 622 may display the original image 631a.
  • the close control 623 can be used to trigger the electronic device 100 to close the viewfinder display window 623 . As shown in FIG. 6D , the size of the current cropping frame is the same as the size of the original image 631 . Therefore, the image content in this cropped image 631 is the same as the image content in the original image 631a.
  • the size of the cropping frame can be gradually reduced proportionally from the size of the original image stream to the preset minimum size.
  • the electronic device 100 receives the input operation of the user acting on the determination control 613 from the 8th second to the 16th second, the size of the cropping frame gradually increases proportionally to the size of the original image.
  • the electronic device 100 can obtain the original image 632a through the camera, and determine that the cropping frame 624 is in the original image location in 632a.
  • the electronic device 100 may cut out the image in the cropping frame 624 on the original image 632a, and adjust the cutout image to a specified size to obtain the cropped image 632.
  • the electronic device 100 may display the original image 632a in the framing presentation window 622, and display in the framing presentation window 622 the position of the cropping frame 624 on the original image 632a.
  • the electronic device 100 may display the cropped image 632 on the photographing interface 620 .
  • the magnification of the image content in the cropped image 632 is greater than the magnification of the image content in the cropped image 631 shown in FIG. 6D .
  • the electronic device 100 when the electronic device 100 receives the user's input operation on the determination control 613 at the 8th second, the electronic device 100 can obtain the original image 633a through the camera, and determine that the cropping frame is in the original image 633a in the location.
  • the electronic device 100 can cut out the image in the cropping frame 624 on the original image 633a, and adjust the cutout image to a specified size to obtain the cropped image 633.
  • the electronic device 100 may display the original image 633 a in the framing presentation window 622 and display the position of the cropping frame 624 on the original image 633 a in the framing presentation window 622 .
  • the electronic device 100 may display the cropped image 633 on the photographing interface 620 .
  • the magnification ratio of the image content in the cropped image 633 is greater than the magnification ratio of the image content in the cropped image 632 shown in FIG. 6E.
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the photographing control 322, and in response to the input operation, the electronic device 100 may save the cropped image 633 displayed on the photographing interface 620 as a picture, and store the cropped image 633 is displayed on the echo control 321.
  • an input operation eg, a single click
  • the electronic device 100 may display snapshot prompt information on the photography interface 620 during the process of displaying the above-mentioned photographing interface 620 , and the snapshot prompt information may be used to prompt the user to trigger the preview displayed on the photographing interface 620 The screen is saved as a picture.
  • the electronic device 100 may receive the input operation.
  • the multi-frame cropped images acting on the shooting control 322 for a period of time before and after are saved as video images of the video file.
  • the electronic device 100 may, based on the lens motion template selected by the user, determine a cropped image that satisfies a certain condition from the cropped images cropped by the electronic device 100, and crop the frame. Images are saved as pictures.
  • the electronic device 100 can automatically crop the multiple frames within a preset time.
  • the image is saved as the video footage of the video file.
  • the electronic device 100 when the electronic device 100 receives the user's input operation on the determination control 613 in the 12th second, the electronic device 100 can obtain the original image 634a through the camera, and determine that the cropping frame is in the original image 634a in the location.
  • the electronic device 100 may cut out the image in the cropping frame 624 on the original image 634a, and adjust the cutout image to a specified size to obtain the cropped image 634.
  • the electronic device 100 may display the original image 634a in the framing presentation window 622 and display the position of the cropping frame 624 on the original image 634a in the framing presentation window 622 .
  • the electronic device 100 may display the cropped image 634 on the photographing interface 620 .
  • the magnification ratio of the image content in the cropped image 634 is smaller than the magnification ratio of the image content in the cropped image 633 shown in FIG. 6F .
  • Thumbnails of the above cropped images 633 may be displayed on the echo control 321 .
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the echo control 346, and in response to the input operation, the electronic device 100 may display a picture browsing interface 640 as shown in FIG. 6H.
  • an input operation eg, a single click
  • the picture browsing interface 640 may include a picture 641 and a menu 642 .
  • the picture 641 is the same as the cropped image 633 shown in FIG. 6F described above.
  • the menu 642 reference may be made to the aforementioned embodiment shown in FIG. 3N , which will not be repeated here.
  • the electronic device 100 may receive an input operation (eg, long press) that the user acts on the shooting control 322 , and in response to the input operation, the electronic device 100 may convert the cropped image 633 and the cropped image 633 displayed on the shooting interface 620 and The above-mentioned viewfinder display window 622 is saved as a picture together.
  • an input operation eg, long press
  • the cropping frame may be rectangular, the center of the cropping frame may be at the same position as the center of the original image, and the size of the cropping frame is proportional to the size of the original image.
  • the size of the cropping frame can be gradually proportionally reduced over time from the size of the original image to a preset minimum size, and then gradually increased proportionally from the preset minimum size to the size of the original image.
  • the cropping frame can repeat the above changing process cyclically.
  • the size of the cropping frame may first gradually increase proportionally from the preset minimum size to the original image size over time, and then gradually decrease proportionally from the original image size to the preset size. Set minimum size.
  • the cropping frame can repeat the above changing process cyclically.
  • the original image 701 is a rectangle.
  • the center of the original image 701 may be at the same position as the center of the crop frame 702 , ie, both at position 704 .
  • the center of the preset minimum size area 703 is also the position 704 .
  • the size of the crop box 702 may vary proportionally between the size of the original image 701 and the preset minimum size.
  • the width of the crop frame 702 may be x, and the height may be y.
  • the width of the original image 701 may be A, and the height may be B.
  • the width of the preset minimum size area 703 may be a, and the height may be b.
  • the size of the crop box 702 has been reduced to a preset minimum size (width a, height b).
  • the size of the cropping frame 702 when the size of the cropping frame 702 is reduced to a preset minimum size (width is a, height is b), the size of the cropping frame 702 can be gradually increased to the size of the original image 701 (width is A, height is for B).
  • the electronic device 100 may acquire multiple frames of original images by acquiring a camera, and the electronic device 100 may determine the cropping frame in each frame of the original image according to the cropping frame information (including the cropping frame size change rule and/or the motion trajectory of the cropping frame in the original image). in the location.
  • the electronic device 100 can intercept the image within the cropping frame in each frame of the original image according to the position of the cropping frame in each frame of the original image, and adjust it to a specified size to obtain multiple frames of cropped images.
  • the electronic device 100 may display the multiple frames of cropped images in sequence on the shooting interface or video recording interface in the above-mentioned embodiment.
  • the electronic device 100 may display the cropped image on the shooting interface or the video recording interface every time a cropped image is cropped out, or after cropping out multiple frames of cropped images, the cropped images of the multiple frames are sequentially displayed in the frame order. Displayed on the shooting interface or video recording interface.
  • the electronic device 100 obtains the original image 721 through the camera, and the electronic device 100 can determine, according to the cropping frame information, that the center point of the cropping frame 712 on the original image 721 is the same as the central point of the original image 721 . position, ie all at position 714. At this time, the size of the cropping frame 712 is proportionally reduced from the size of the original image 721 to be between the size of the original image 721 and the preset minimum size.
  • the electronic device 100 can cut out the image in the cropping frame 712 on the original image 721 and adjust it to a specified size to obtain the cropped image 722 .
  • the electronic device 100 may display the cropped image 722 on the above-mentioned shooting interface or video recording interface.
  • the electronic device 100 acquires the original image 731 after acquiring the above-mentioned original image 721 through the camera.
  • the electronic device 100 may determine, according to the cropping frame information, that the center point of the cropping frame 712 on the original image 731 is at the same position as the central point of the original image 731 , that is, both are at the position 714 .
  • the size of the cropping frame 712 is reduced proportionally from the size of the original image 731 to the preset minimum size, that is, the size of the cropping frame 712 coincides with the preset minimum size area 713 .
  • the electronic device 100 can cut out the image in the cropping frame 712 of the original image 731 and adjust it to a specified size to obtain the cropped image 732 .
  • the electronic device 100 may display the cropped image 732 on the above-mentioned shooting interface or video recording interface.
  • the magnification of the scene in the cropped image 732 is greater than the magnification of the scene in the cropped image 722 shown in FIG. 7D.
  • the electronic device 100 acquires the original image 741 after acquiring the above-mentioned original image 731 through the camera.
  • the electronic device 100 may determine, according to the cropping frame information, that the center point of the cropping frame 712 on the original image 741 is at the same position as the central point of the original image 741 , that is, both are at the position 714 .
  • the size of the cropping frame 712 is proportionally enlarged from the preset minimum size to between the size of the original image 741 and the preset minimum size.
  • the electronic device 100 can cut out the image in the cropping frame 712 on the original image 741 and adjust it to a specified size to obtain the cropped image 742 .
  • the electronic device 100 may display the cropped image 742 on the above-mentioned shooting interface or video recording interface.
  • the magnification of the scene in the cropped image 742 is smaller than the magnification of the scene in the cropped image 742 shown in FIG. 7D .
  • the center of the cropping frame may not be in the same position as the center of the original image.
  • the size of the crop box changes in proportion to the size of the original image.
  • the size of the crop box can be gradually reduced proportionally from the maximum size to the preset minimum size over time, and then gradually increased proportionally from the preset minimum size to the maximum size.
  • the cropping frame can repeat the above changing process cyclically.
  • the electronic device 100 may determine the maximum size of the cropping frame according to the center point of the cropping frame and the size of the original image. The maximum size is proportional to the original image. When the cropping frame is at the maximum size, the coverage of the cropping frame does not exceed the original image, and any border of the cropping frame is in contact with the border of the original image.
  • the size of the cropping frame may gradually increase proportionally from the preset minimum size to the maximum size over time, and then gradually decrease proportionally from the maximum size to the preset minimum size.
  • the cropping frame can repeat the above changing process cyclically.
  • the original image 801 is a rectangle.
  • the center of the original image 801 may be at a different position from the center of the cropping frame 802, the center of the original image 801 may be at position 806, the center of the cropping frame 802 may be at position 805, and the center of the preset minimum size area 803 is also at position 805,
  • the center of maximum size area 804 is also at location 805 .
  • any frame (eg, the lower frame) of the maximum size area 804 is in contact with the frame of the original image.
  • the width of the cropping frame 8002 is x, and the height may be y.
  • the width of the original image 801 may be A, and the height may be B.
  • the width of the preset minimum size area 803 may be a, and the height may be b.
  • the maximum size area 804 may have a width of c and a height of d.
  • the width x can be reduced from the width value c to the width value a
  • the height y can be reduced from the height value d to the height value b.
  • the size of the crop frame 802 has been reduced to a preset minimum size (width a, height b).
  • the size of the cropping frame 802 when the size of the cropping frame 802 is reduced to a preset minimum size (width is a, height is b), the size of the cropping frame 802 can be gradually increased to the size of the original image 801 (width is c, height is for d).
  • the electronic device 100 may acquire multiple frames of original images by acquiring a camera, and the electronic device 100 may determine the cropping frame in each frame of the original image according to the cropping frame information (including the cropping frame size change rule and/or the motion trajectory of the cropping frame in the original image). in the location.
  • the electronic device 100 can intercept the image within the cropping frame in each frame of the original image according to the position of the cropping frame in each frame of the original image, and adjust it to a specified size to obtain multiple frames of cropped images.
  • the electronic device 100 may display the multiple frames of cropped images in sequence on the shooting interface or video recording interface in the above-mentioned embodiment.
  • the electronic device 100 may display a cropped image on a shooting interface or a video recording interface every time a frame of cropped image is cropped, or after cropping out multiple frames of cropped images, the multiple frames of cropped images are sequentially displayed in frame order. Displayed on the shooting interface or video recording interface.
  • the electronic device 100 obtains the original image 821 through the camera, and the electronic device 100 may determine that the center point of the cropping frame 812 on the original image 821 is at the position 815 according to the cropping frame information. At this time, the size of the cropping frame 812 is proportionally reduced from the maximum size to between the maximum size and the preset minimum size.
  • the electronic device 100 can cut out the image in the cropping frame 812 on the original image 821, and adjust it to a specified size to obtain the cropped image 822.
  • the electronic device 100 may display the cropped image 822 on the above-mentioned shooting interface or video recording interface.
  • the electronic device 100 acquires the original image 831 after acquiring the above-mentioned original image 821 through the camera.
  • the electronic device 100 may determine that the center point of the cropping frame 812 on the original image 831 is at the position 815 according to the cropping frame information.
  • the size of the cropping frame 812 is proportionally reduced from the maximum size to the preset minimum size, that is, the size of the cropping frame 812 coincides with the preset minimum size area 813 .
  • the electronic device 100 can cut out the image in the cropping frame 812 on the original image 831 and adjust it to a specified size to obtain the cropped image 832 .
  • the electronic device 100 may display the cropped image 832 on the above-mentioned shooting interface or video recording interface.
  • the magnification of the scene in the cropped image 832 is greater than the magnification of the scene in the cropped image 822 shown in FIG. 8D .
  • the electronic device 100 acquires the original image 841 after acquiring the above-mentioned original image 831 through the camera.
  • the electronic device 100 may determine that the center point of the cropping frame 712 on the original image 841 is at the position 815 according to the cropping frame information.
  • the size of the cropping frame 812 is proportionally enlarged from the preset minimum size to between the maximum size and the preset minimum size.
  • the electronic device 100 can cut out the image in the cropping frame 812 on the original image 841 and adjust it to a specified size to obtain the cropped image 842 .
  • the electronic device 100 may display the cropped image 842 on the above-mentioned shooting interface or video recording interface.
  • the magnification of the scene in the cropped image 842 is smaller than the magnification of the scene in the cropped image 842 shown in FIG. 8D .
  • the center of the cropping frame may not be at the same position as the center of the original image.
  • the size of the crop box changes in proportion to the size of the original image.
  • the center point of the cropping frame can be fixed, and the size of the cropping frame can gradually increase from a preset minimum size over time until the first side of the cropping frame touches the boundary of the original image.
  • the cropping box keeps the first side in contact with the boundary of the original image, the center point of the cropping box can be moved, and the size of the cropping box continues to increase until both the first and second sides of the cropping box touch the boundary of the original image.
  • the cropping box can repeat the above changing process.
  • the center point of the cropping frame 803 is at the position point 805 on the original image 801, and the center point of the original image 801 is at the position point 806, which are not at the same position.
  • the size of the cropping frame 803 is a preset minimum size.
  • the center point of the cropping frame 803 is at the position point 805, and the size of the cropping frame 803 increases proportionally relative to the time t1 unchanged.
  • the center point of the cropping frame 803 is at the position point 805, and the size of the cropping frame 803 is proportionally increased relative to the time t1 until the lower border of the cropping frame 803 contacts the lower border of the original image 801.
  • the lower border of the cropping frame 803 is always in contact with the lower border of the original image 801, and the size of the cropping frame 803 increases proportionally.
  • the center point of the cropping frame 803 is displaced relative to the time t1, and the size of the cropping frame 803 is proportionally increased until the lower border of the cropping frame 803 is in contact with the lower border of the original image 801, and the left border of the cropping frame 803 is in contact with the original image.
  • the left border of 801 touches.
  • the lower border of the cropping frame 803 is always in contact with the lower border of the original image 801 and the left border of the cropping frame 803 is always in contact with the left border of the original image 801, and the size of the cropping frame 803 increases proportionally.
  • the size of the crop frame 803 is increased to the size of the original image.
  • the size of the cropping frame may be a fixed size, and the center point of the cropping frame may move according to a preset trajectory on the original image.
  • the original image may be a rectangle, the cropping frame may also be a rectangle, and the ratio of the width to the height of the cropping frame is equal to the ratio of the width to the height of the original image.
  • the center point 913 of the cropping frame 912 may move left and right on the original image 911 with a straight trajectory 921 between the position 922 and the position 923 .
  • the center point 913 of the cropping frame 912 may coincide with the left border of the original image 911 .
  • the center point 913 of the cropping frame 912 is at the position 923 , the right border of the cropping frame 912 may coincide with the right border of the original image 911 .
  • the center point 913 of the crop frame 912 may move up and down on the original image 911 in a straight line trajectory 931 between the position 932 and the position 933 .
  • the center point 913 of the cropping frame 912 may be at the position 932
  • the upper border of the cropping frame 912 may coincide with the upper border of the original image 911 .
  • the center point 913 of the cropping frame 912 is at the position 933
  • the lower border of the cropping frame 912 may coincide with the lower border of the original image 911 .
  • the center point 913 of the crop box 912 may move from the upper left corner to the lower right corner on the original image 911 in a straight line trajectory 941 between the position 942 and the position 943 .
  • the center point 913 of the cropping frame 912 may be at position 942
  • the upper border of the cropping frame 912 may coincide with the upper border of the original image 911
  • the left border of the cropping frame 912 may coincide with the left border of the original image 911 .
  • the center point 913 of the cropping frame 912 is at position 943
  • the lower border of the cropping frame 912 may coincide with the lower border of the original image 911
  • the right border of the cropping frame 912 may coincide with the right border of the original image 911 .
  • the center point 913 of the crop box 912 may move from the lower left corner to the upper right corner on the original image 911 in a straight line trajectory 951 between positions 952 and 953 .
  • the center point 913 of the cropping frame 912 may be at position 952
  • the lower border of the cropping frame 912 may coincide with the lower border of the original image 911
  • the left border of the cropping frame 912 may coincide with the left border of the original image 911 .
  • the center point 913 of the cropping frame 912 is at the position 953
  • the upper border of the cropping frame 912 may coincide with the upper border of the original image 911
  • the right border of the cropping frame 912 may coincide with the right border of the original image 911 .
  • the motion trajectory 961 of the center point 913 of the cropping frame 912 may be a heart shape, wherein the cropping frame 912 may move clockwise or counterclockwise on the motion trajectory 961 .
  • the cropping frame 912 moves clockwise or counterclockwise on the motion track 961 , it always does not exceed the size range of the original image 911 .
  • the motion trajectory 971 of the center point 913 of the cropping frame 912 may be a circular figure, wherein the cropping frame 912 may move clockwise or counterclockwise on the motion trajectory 971 .
  • the cropping frame 912 moves clockwise or counterclockwise on the motion track 971 , it always does not exceed the size range of the original image 911 .
  • the motion trajectory of the center point 912 of the cropping frame 912 in the original image 911 is not limited to the above-mentioned graphs, and may also have other graphs, for example, a horizontal “8” curve graph, a Bezier curve graph, a circular arc curve graphics, etc.
  • the electronic device 100 may display the cropping frame in the viewfinder display window above. Motion trajectory on the original image.
  • the electronic device 100 may display special effects (such as fireworks special effects, kaleidoscope special effects, heart-shaped beating special effects, etc.) in the viewfinder display window.
  • the electronic device 100 may display a photographing interface 980 .
  • the shooting interface 980 may include a lens motion template switching control 981, a viewfinder display window 982, a cropped image 991, and one or more shooting mode controls.
  • the moving template switching control 981 displays the name of the moving template currently used by the electronic device 100 (for example, "circular moving").
  • the electronic device 100 may display the original image 991 a obtained at this time, the closing control 983 , the cropping frame 984 , and the motion track of the cropping frame 984 in the viewfinder display window 982 .
  • the electronic device 100 obtains the cropped image 991 by cropping based on the original image 991a and the position of the cropping frame 984 in the original image 991a.
  • the cropping frame 984 moves once according to a preset motion trajectory (eg, a circular trajectory).
  • the electronic device 100 may acquire the original image 992 a through the camera, and display the original image 992 a in the viewfinder display window 982 .
  • the electronic device 100 may cut out the image in the cropping frame 984 on the original image 992a, and adjust the cutout image to a specified size to obtain the cropped image 992.
  • the electronic device 100 may display the cropped image 992 on the shooting interface 980, and display a special effect picture 986 (eg, a fireworks special effect picture, etc.).
  • a special effect picture 986 eg, a fireworks special effect picture, etc.
  • the electronic device 100 can display a special effect picture on the shooting interface, and while displaying the characteristic picture, adjust the size of the cropping frame to gradually increase to the size of the original image over time, and display the cropped image in the cropping frame on the shooting interface. or on the recording interface.
  • a preset motion trajectory for example, a circular trajectory
  • the electronic device 100 when the electronic device 100 displays the above-mentioned viewfinder display window on the video recording interface in the mirror-moving video recording mode, the electronic device 100 can receive the user's input of ending the video recording, and in response to the input, the electronic device 100 can record the video recording interface within the video recording time.
  • the cropped image shown above is saved as a video image in the video file together with the above-mentioned special effect image.
  • the electronic device 100 may also save the cropped image displayed on the recording interface during the recording time together with the above-mentioned viewfinder display window as a video picture in the video file.
  • the electronic device 100 may also save the cropped image displayed on the recording interface during the recording time, the above-mentioned special effect picture, and the above-mentioned viewfinder display window together as a video picture in the video file.
  • the video preview interface 993 may include a video 995 shot in a circular motion mode, and a video playback control 994a, wherein the video screen of the video 995 includes a cropped image and a viewfinder display window after cropping based on the original image obtained by the camera 994b.
  • the framing display window 994b includes a cropping frame 994c and an original image 995a obtained by the camera.
  • the electronic device 100 receives an input operation (eg, a single click) of the user acting on the video playback control 994a, and in response to the input operation, the electronic device 100 can play the video 995.
  • an input operation eg, a single click
  • the electronic device 100 may display a video screen 996 on the video preview interface 993 .
  • the video frame 996 includes a viewfinder display window 994b, the position of the cropping frame 994c on the original image 996a obtained by the camera, and a cropped image cropped from the original image 996a based on the cropping frame 994c.
  • the framing display window 994b can also display the motion track of the cropping frame 994c.
  • the electronic device 100 may display a video screen 997 on the video preview interface 993 .
  • the video screen 997 includes a viewfinder display window 994b, the position of the cropping frame 994c on the original image 997a obtained by the camera, and the cropped image and special effect screen (such as a fireworks special effect screen) cropped from the original image 997a based on the cropping frame 994c and many more).
  • the size of the cropping frame changes in proportion to the size of the original image, and at the same time, the center point of the cropping frame can move according to a preset track on the original image.
  • the size of the cropping frame may gradually decrease proportionally from the size of the original image to the preset minimum size over time, and then gradually increase proportionally from the preset minimum size to the size of the original image.
  • the original image may be a rectangle
  • the cropping frame may also be a rectangle
  • the ratio of the width to the height of the cropping frame is equal to the ratio of the width to the height of the original image.
  • the electronic device 100 may receive a user-defined setting of the center point of the cropping frame in the original image when displaying the original image obtained by the camera as a preview image in the shooting interface.
  • the electronic device 100 may determine the maximum size and the minimum size of the cropping frame based on the size of the original image and the center point of the cropping frame.
  • the electronic device 100 may determine the position and size of the cropping frame in each frame of the original image based on the maximum size and the minimum size of the cropping frame, and the speed at which the size of the cropping frame changes proportionally between the maximum size and the minimum size.
  • the electronic device 100 may, based on the position and size of the cropping frame in each frame of the original image, cut out the image within the cropping frame on each frame of the original image, and display the cutout image on the shooting interface as a preview image. In this way, it is convenient for the user to customize the selection of the center point of the cropping frame, and the electronic device 100 can align the center point of the shooting image with the shooting subject, so that the shooting subject is clearer.
  • the electronic device 100 may display a mirror motion template selection interface 610 .
  • the lens movement selection interface 610 for the text description of the lens movement selection interface 610, reference may be made to the aforementioned embodiment shown in FIG. 6B , which will not be repeated here.
  • the selection box 612 of the camera movement selection interface 610 the "travel" camera movement template 611A has been selected.
  • the electronic device 100 may receive user input (eg, a click) for the "custom" motion template option 611D, and in response to the input, the electronic device 100 may move the selection box 612 to select the "custom" motion template Template option 611D.
  • the electronic device 100 can close and display the motion template display area 614 and the motion track display area 616 , and display a prompt box 1011 .
  • the prompt box 1011 can be used to display the function description of the "customized" mirror movement template, and the function description can be text (for example, "you can customize the center point of mirror movement", etc.), pictures, videos, and so on.
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the determination control 613 , and in response to the input operation, the electronic device 100 may display a photographing interface 1020 as shown in FIG. 10C .
  • an input operation eg, a single click
  • the shooting interface 1020 may include a viewfinder display window 1021, an original image 1031, prompt information 1025, a determination control 1026, a lens motion template switching control 1027, a position marker 1028, and one or more shooting mode controls (eg, "Night Scene Mode” Control 327A, "Portrait Mode” Control 327B, “Large Aperture” Control 327C, “Mirror” Mode Control 327H, “Normal Photo Mode” Control 327D, "Video Mode” Control 327E, “Pro Mode” Control 327F etc.), echo control 321, capture control 322, camera conversion control 323.
  • shooting mode controls eg, "Night Scene Mode” Control 327A, "Portrait Mode” Control 327B, “Large Aperture” Control 327C, “Mirror” Mode Control 327H, “Normal Photo Mode” Control 327D, "Video Mode” Control 327E, “Pro Mode” Control 327F etc.
  • echo control 321 capture control 322, camera conversion control 323.
  • the mirror movement template switching control 1027 can be used to trigger the electronic device 100 to switch the mirror movement template selected by the user, and the mirror movement template switching control 1027 displays the name of the mirror movement template currently selected by the electronic device 100 (for example, "custom mirror movement" ).
  • the viewfinder display window 1021 may display a close control 1022, an original image 1031a (same image content as the original image 1031, but with a different display scale), a cropping frame 1023, and the cropping frame 1023 at the center point 1024 of the original image 1031a.
  • the close control 1022 can be used to trigger the electronic device 100 to close the viewfinder display window 1021 .
  • the prompt information 1025 can be used to prompt the user to adjust the position of the center point 1023 of the cropping frame 1024 on the image on the original image 1031 .
  • the position marker 1028 may be used to indicate the current position of the center point 1023 of the cropping frame 1024 on the original image 1031a.
  • the electronic device 100 may receive an input (eg, dragging) of the position marker 1028 from the user, and in response to the input operation, the electronic device 100 may adjust the display position of the position marker 1028 on the original image 1031a. Wherein, after the position of the position marker 1028 on the original image 1031 is moved, the electronic device 100 can adjust the position of the center point 1023 of the cropping frame 1024 in the viewfinder display window 1021 on the original image 1031a.
  • the electronic device 100 may receive an input (eg, a single click) of the determination control 1026 from the user, and in response to the input, the electronic device 100 may capture the image within the cropping frame on the original image, and will capture the The image is resized to the specified size to get a cropped image.
  • the electronic device 100 may display the cropped image as a preview image on the shooting interface.
  • the electronic device 100 may also not display the above-mentioned prompt information 1025 and the above-mentioned determination control 1026 in response to the user's input to the determination control 1026 .
  • the position of the center point 1024 of the cropping frame 1023 may be fixed on the original image, and the size of the cropping frame 1023 changes in proportion to the size of the original image.
  • the size of the cropping frame 1023 may gradually increase proportionally from the preset minimum size to the maximum size over time, and then gradually increase proportionally from the maximum size to the preset minimum size.
  • the size of the cropping frame 1023 is the preset minimum size.
  • the electronic device 100 may display the original image 1032 a obtained by the camera in the viewfinder display window 1021 .
  • the electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1032a, and adjust the cutout image to a specified size to obtain the cropped image 1032.
  • the electronic device 100 may display the cropped image 1032 as a preview image on the shooting interface 1020 .
  • the electronic device 100 may also display controls 1029 on the photographing interface 1020 .
  • the control 1029 can be used to trigger the electronic device 100 to reselect the center point of the cropping frame on the original image based on the user's input.
  • the size of the cropping frame 1023 is proportionally increased from the preset minimum size to between the maximum size and the preset minimum size.
  • the electronic device 100 may display the original image 1033a obtained by the camera in the viewfinder display window 1021 at this time.
  • the electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1033a, and adjust the cutout image to a specified size to obtain the cropped image 1033.
  • the electronic device 100 can display the cropped image 1033 as a preview image on the shooting interface 1020. .
  • the magnification of the image content in the cropped image 1033 is smaller than the magnification of the image content in the cropped image 1032 shown in FIG. 10F .
  • the size of the crop frame 1023 is increased from the maximum size to the maximum size proportionally between the maximum size and the preset minimum size.
  • the electronic device 100 may display the original image 1034a obtained by the camera in the viewfinder display window 1021 at this time.
  • the electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1034a, and adjust the cutout image to a specified size to obtain the cropped image 1034.
  • the electronic device 100 can display the cropped image 1034 as a preview image on the shooting interface 1020. .
  • the magnification of the image content in the cropped image 1034 is smaller than the magnification of the image content in the cropped image 1033 shown in FIG. 10G.
  • the electronic device 100 may receive an input (eg, click) that the user acts on the control 1029, and in response to the input, as shown in FIG. Position marker 1028, the above-mentioned determination control 1026.
  • an input eg, click
  • the electronic device 100 may receive user input (eg, dragging) for the location marker 1028 , and in response to the input, the electronic device 100 may adjust the display position of the location marker 1028 in the original image 1035 .
  • the electronic device 100 can determine the center point 1024 of the cropping frame 1023 in the original image 1035a in the viewfinder display window 1021 based on the display position of the position marker 1028 in the original image 1035 (same content as the image in the original image 1035, but with a different display scale). ) on the position.
  • the electronic device 100 may receive an input (eg, a click) from the user for the determination control 1026 , and in response to the input, the electronic device 100 may cut out the image within the cropping frame on the original image, and will cut out the The image is resized to the specified size to get a cropped image.
  • the electronic device 100 may display the cropped image on the shooting interface 1020 as a preview image.
  • the electronic device 100 can display the original image 1036a obtained by the camera in the viewfinder display window 1021 .
  • the electronic device 100 may display the cropped image 1036 cut out by the cropping frame 1023 as a preview screen on the photographing interface 1020 .
  • the electronic device 100 may receive a user-defined setting of the center point of the cropping frame in the original image when displaying the original image obtained by the camera as a preview image in the shooting interface.
  • the electronic device 100 may determine the maximum size and the preset minimum size of the cropping frame based on the size of the original image and the center point of the cropping frame.
  • the electronic device 100 may receive the user's input, and adjust the size of the cropping frame at any time during the preview or video recording process.
  • the electronic device 100 may, based on the position and size of the cropping frame in each frame of the original image, cut out the image within the cropping frame on each frame of the original image, and display the cutout image on the shooting interface as a preview image.
  • the electronic device 100 can align the central point of the photographed image with the subject, and zoom in or out at any time to make the subject clearer.
  • the electronic device 100 may display a photographing interface 1020 .
  • a photographing interface 1020 for the text description of the photographing interface 1020, reference may be made to the aforementioned embodiment shown in FIG. 10C , which will not be repeated here.
  • the electronic device 100 may receive the user's input (for example, clicking) on the determination control 1026, and in response to the input, as shown in FIG. 11B , the electronic device 100 may The original image 1112a acquired by the camera at this time is displayed in the viewfinder display window 1021 .
  • the electronic device 100 may cut out the image in the cropping frame 1023 on the original image 1112a, and adjust the cutout image to a specified size to obtain the cropped image 1112.
  • the electronic device 100 may display the cropped image 1112 as a preview image on the shooting interface.
  • the electronic device 100 can also display a magnification magnification control 1121 and a magnification reduction control 1122 on the shooting interface 1020 .
  • the magnification control 1121 can be used to reduce the size of the cropping frame 1023
  • the magnification reduction control 1122 can be used to increase the size of the cropping frame 1023 .
  • the above-mentioned magnification control 1121 and magnification reduction control 1122 may also be sliders.
  • the electronic device 100 receives a user sliding upwards on the sliders, the electronic device 100 can reduce the size of the crop frame 1023 .
  • the electronic device 100 receives the user sliding down the slider bar, the electronic device 100 may increase the size of the cropping frame 1023 .
  • the electronic device 100 may receive a user input (eg, single click or long press) acting on the zoom-out control 1122, and in response to the input, the electronic device 100 may increase the size of the crop box 1023 as shown in FIG. 11C.
  • the electronic device 100 can display the original image 1113a obtained by the camera in the viewfinder display window 1021 at this time.
  • the electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1113a, adjust it to a specified size, and obtain the cropped image 1113.
  • the electronic device 100 may display the cropped image 1113 as a preview screen on the shooting interface 1020 .
  • the magnification of the image content in the cropped image 1113 is smaller than the magnification of the image content in the cropped image 1112 shown in FIG. 11B .
  • the electronic device 100 may continue to receive the user's operation (eg, single click or long press) on the zoom-out control 1122, and in response to the operation, the electronic device 100 may increase the size of the crop frame 1023 to the maximum size.
  • the maximum size reference may be made to the foregoing embodiments shown in FIGS. 8A to 8F , and details are not repeated here.
  • the electronic device 100 adjusts the crop frame 1023 to the maximum size based on the user's input operation on the zoom-out control 1122 .
  • the electronic device 100 can display the original image 1114a obtained by the camera in the viewfinder display window 1021 at this time.
  • the electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1114a, adjust it to a specified size, and obtain the cropped image 1114.
  • the electronic device 100 may display the cropped image 1114 as a preview image on the shooting interface 1020 .
  • the magnification of the image content in the cropped image 1114 is smaller than the magnification of the image content in the cropped image 1113 shown in FIG. 11C .
  • the electronic device 100 may receive an operation (eg, single click or long press) of the user acting on the magnification increase control 1121 , and in response to the operation, as shown in FIG. 11E , the electronic device 100 may reduce the size of the cropping frame 1023 .
  • the electronic device 100 may display the original image 1115a obtained by the camera in the viewfinder display window 1021 at this time.
  • the electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1115a, adjust it to a specified size, and obtain the cropped image 1115.
  • the electronic device 100 may display the cropped image 1115 as a preview image on the shooting interface 1020 .
  • the magnification of the image content in the cropped image 1115 is smaller than the magnification of the image content in the cropped image 1114 shown in FIG. 11D .
  • the electronic device 100 may receive a user-defined setting of the center point of the cropping frame in the original image when displaying the original image obtained by the camera as a preview image in the shooting interface.
  • the size of the cropping frame can be fixed.
  • the cropping frame can move in a fixed direction on the original image, and the electronic device 100 can receive user input to adjust the moving direction and speed of the cropping frame on the original image at any time.
  • the electronic device 100 may determine the position and size of the cropping frame in each frame of the original image according to the moving direction and the moving speed of the cropping frame.
  • the electronic device 100 can cut out the image within the cropping frame on each frame of the original image based on the position and size of the cropping frame in each frame of the original image, and display the cutout image as a preview image on the shooting interface or the video recording interface. In this way, it is convenient for the user to adjust the acquisition position of the shooting image at any time during the preview or video recording process, so that the shooting image moves in the direction selected by the user, which improves the user experience.
  • the electronic device 100 may display a photographing interface 1020 .
  • a photographing interface 1020 for the text description of the photographing interface 1020, reference may be made to the aforementioned embodiment shown in FIG. 10C , which will not be repeated here.
  • the electronic device 100 may receive the user's input (eg, clicking) on the determination control 1026, and in response to the input, as shown in FIG. 12B, the electronic device 100 may The original image 1211a obtained by the camera at this time is displayed in the viewfinder display window 1021 .
  • the electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1211a, and adjust the cutout image to a specified size to obtain the cropped image 1211.
  • the electronic device 100 may display the cropped image 1211 as a preview image on the shooting interface.
  • the electronic device 100 can display multiple directional movement controls for the crop frame 1023 on the photographing interface 1020 (including up-move controls 1221 , down-move controls 1222 , left-move controls 1223 , and right-move controls 1224 ).
  • the move-up control 1221 can be used to trigger the electronic device 100 to move the position of the crop frame 1023 upward on the original image.
  • the move down control 1222 can be used to trigger the electronic device 100 to move down the position of the cropping frame 1023 on the original image.
  • the left move control 1223 can be used to trigger the electronic device 100 to move the position of the crop frame 1023 on the original image to the left.
  • the right move control 1224 can be used to trigger the electronic device 100 to move the position of the crop frame 1023 on the original image to the right.
  • the multiple direction movement controls may be cross-shaped sliding bars.
  • the cropping frame 1023 may be moved to the right from the position selected by the user on the original image at the beginning.
  • the electronic device 100 can intercept the image in the cropping frame 1023 on the original image 1211 a and adjust it to a specified size to obtain the cropped image 1211 .
  • the cropping frame 1023 moves to the right on the original image, and the electronic device 100 can use the cropping frame 1023 to cut out the cropped image 1212 from the original image 1212a, and display the cropped image 1212 as a preview image on the shooting interface 1020 superior.
  • the image content in the cropped image 1212 is to the right of the image content in the cropped image 1211 shown in FIG. 12B .
  • the electronic device 100 may receive a user input (eg, a click) on the move up control 1221, and in response to the input, the electronic device 100 may move up the position of the crop box 1023 on the original image.
  • the electronic device 100 can capture the image in the cropping frame 1023 on the original image, adjust it to a specified size, and obtain the cropped image 1213 .
  • the electronic device 100 may display the original image 1213 a obtained by the camera at this time in the viewfinder display window 1021 .
  • the electronic device 100 may cut out the image in the cropping frame 1023 on the original image 1213a, and adjust the cutout image to a specified size to obtain the cropped image 1213.
  • the electronic device 100 may display the cropped image 1213 on the shooting interface 1020 as a preview image.
  • the image content in the cropped image 1213 is above the image content in the cropped image 1212 shown in FIG. 12C .
  • the electronic device 100 may exit from displaying the above-mentioned directional movement control.
  • the electronic device 100 may display the above-mentioned directional movement controls again.
  • the electronic device 100 may receive a user's long-press operation on the above-mentioned directional movement control, and in response to the long-press operation, the electronic device 100 may increase the moving speed of the cropping frame on the original image.
  • the electronic device 100 may obtain the original image P1 at the first second, the original image P2 at the second second, and the original image P3 at the third second sequentially through the camera.
  • the position of the cropping frame on the original image P2 is shifted to the right by 100 pixels compared to the position on the original image P1.
  • the electronic device 100 receives the user's long-press operation on the right shift control from the second to the third second, and the electronic device 100 can increase the speed at which the cropping frame moves to the right on the original image.
  • the position of the cropping frame on the original image P3 is shifted to the right by 200 pixels compared to the position on the original image P2.
  • the electronic device 100 may receive the user-defined setting of the center point of the cropping frame in the original image when displaying the original image obtained by the camera as a preview image in the shooting interface.
  • the size of the cropping frame can be fixed.
  • the electronic device 100 may receive the user's input (for example, the above-mentioned operation of moving the control in the direction) during the process of taking a photo preview or recording, and adjust the position of the cropping frame on the original image at any time.
  • the electronic device 100 can cut out the image within the cropping frame on each frame of the original image based on the position and size of the cropping frame in each frame of the original image, and display the cutout image as a preview image on the shooting interface or the video recording interface. In this way, it is convenient for the user to adjust the acquisition position of the shooting image at any time during the preview or video recording process, so that the shooting image moves in the direction selected by the user, which improves the user experience.
  • the electronic device 100 may have moving image content (eg, a flying bird) in the preview screen or the video screen.
  • the electronic device 100 receives the user's input, identifies the moving image content (eg, a flying bird), and determines the position of the moving image content on each frame of the original image.
  • the electronic device 100 can adjust the position of the cropping frame on each frame of the original image, so that the moving image content is always within the cropping frame.
  • the electronic device 100 may, based on the position and size of the cropping frame in each frame of the original image, cut out the image within the cropping frame on each frame of the original image, and display the cutout image on the shooting interface as a preview image. In this way, when the electronic device 100 captures the moving image content, the shooting screen can always display the moving image content in an enlarged manner.
  • the electronic device 100 may display a photographing interface 1310 .
  • the shooting interface 1310 may include a viewfinder display window 1311, an original image 1321, one or more shooting mode controls (for example, the "Night Scene Mode” control 327A, the "Portrait Mode” control 327B, the “Large Aperture” control 327C, the “Motion “Mirror” mode control 327H, “Normal camera mode” control 327D, "Video mode” control 327E, "Pro mode” control 327F, etc.), echo control 321, shooting control 322, camera conversion control 323.
  • shooting mode controls for example, the "Night Scene Mode” control 327A, the "Portrait Mode” control 327B, the “Large Aperture” control 327C, the “Motion “Mirror” mode control 327H, “Normal camera mode” control 327D, "Video mode” control 327E, “Pro mode” control 327F, etc.
  • echo control 321 shooting control 322, camera
  • the viewfinder display window 1311 may be displayed with a close control 1312 and an original image 1321a (the image content is the same as that of the original image 1321, but the display scale is different).
  • the electronic device 100 may receive a click operation (eg, single click, long press, double click, etc.) performed by the user on the original image 1321, and in response to the input, the electronic device 100 may perform a click operation in the original image 1321 according to the click operation.
  • Action position it is recognized that the image content 1316 selected by the user is a bird, and the image content 1316 is moving.
  • the electronic device 100 acquires the original image 1322 , wherein the position of the image content 1316 in the original image 1322 is different from the position in the original image 1321 .
  • the electronic device 100 displays the original image 1322 as a preview image on the shooting interface 1310, and displays the original image 1322a in the viewfinder display window 1311 (same image content as the original image 1322, but with a different display scale).
  • the electronic device 100 may display a prompt message 1318 and a determination control 1319, and display a marker frame 1317 in the area where the image content 1316 is located.
  • the position of the display position of the determination control 1319 on the shooting interface 1310 is not limited.
  • the determination control 1319 may be above the mirror movement mode control 327H, and the determination control 1319 may also be near the image 1316.
  • the electronic device 100 can also display a cropping frame 1313 in the viewfinder display window 1311 , where the center point of the cropping frame 1313 is on the image content 1316 , and the prompt information 1318 can be used to prompt the user whether to track the image content 1316 .
  • the center point of the mark frame 1317 is on the image content 1316 , and the mark frame 1317 is used to indicate the size of the cropping frame and the position of the cropping frame relative to the image content 1316 .
  • the electronic device 100 may receive an input (eg, dragging) that the user acts on the marking frame 1317 to adjust the size of the cropping frame.
  • the electronic device 100 may receive an input (such as a single click) that the user acts on the determination control 1319, and in response to the input, as shown in FIG. 13C, the electronic device 100 may display the original image 1323a obtained by the camera at this time in the viewfinder display window 1311 middle.
  • the electronic device 100 can cut out the image in the cropping frame 1313 on the original image 1323a, and adjust the cutout image to a specified size to obtain the cropped image 1323.
  • the electronic device 100 may display the cropped image 1323 as a preview image on the shooting interface 1310 .
  • the image content 1316 is in the center of the cropped image 1323 .
  • the display size of the image content 1316 in the cropped image 1323 is larger than the display size of the image content 1316 in the original image 1322 shown in FIG. 13B .
  • the electronic device 100 may directly recognize the image content selected by the user according to the action position of the click operation in the original image 1321 after receiving the user's double-click operation on the original image 1321. 1316. After recognizing the image content 1316 selected by the user, the electronic device 100 may display the original image acquired by the camera in the viewfinder display window 1311 . The electronic device 100 may cut out an image including the image content 1316 on the original image, and adjust the cut out image to a specified size to obtain a cropped image. The electronic device 100 may display the cropped image on the photographing interface 1310 .
  • the position of the image content 1316 in the original image has changed.
  • the cropping frame 1313 moves following the position of the image content 1316 .
  • the electronic device 100 may display the cropped image 1324 cut out from the original image 1324a as a preview image on the shooting interface 1310 at this time.
  • the image content 1316 is still in the center of the cropped image 1324.
  • the electronic device 100 may display the original image 1325 a obtained by the camera at this time in the viewfinder display window 1311 .
  • the electronic device 100 may cut out the image in the cropping frame 1313 on the original image 1325a, and adjust the cutout image to a specified size to obtain the cropped image 1325.
  • the electronic device 100 may display the cropped image 1325 as a preview image on the shooting interface 1310 .
  • the electronic device 100 may also display the motion track 1331 of the image content 1316 in the above-mentioned viewfinder display window 1311 .
  • the electronic device 100 may recognize the outline of a specified image content (eg, a scene or a task) in a preview or video image.
  • the electronic device 100 may use the outline of the specified image content as the movement track of the center point of the cropping frame, and adjust the cropping frame to move on the outline of the specified image content at a preset speed.
  • the size of the cropping frame can be fixed.
  • the electronic device 100 may determine the position of the cropping frame on each frame of the original image based on the outline of the specified image content and the preset speed.
  • the electronic device 100 may, based on the position of the cropping frame in each frame of the original image, cut out the image within the cropping frame on each frame of the original image, and display the cutout image as a preview image on the shooting interface or as a video recording image. displayed in the recording interface. In this way, when recording a video or displaying a preview image, the electronic device 100 can automatically adjust the focus according to the outline of the photographed object, so as to highlight the detailed features of the photographed object.
  • the electronic device 100 may receive a music clip selected by the user before taking a photo or recording a video. After the electronic device 100 starts recording, the electronic device 100 can control the size change of the cropping frame and/or the movement track of the cropping frame on the original image by using the audio information of the music piece. The electronic device 100 can determine the position and size of the cropping frame on each frame of the original image captured by the camera. One frame of image is cropped, and the cropped image is displayed on the camera preview interface or video recording interface in frame order. In this way, the shooting picture of the electronic device 100 can be automatically zoomed following the rhythm of the music, which enhances the visual effect of the shooting picture.
  • the motion template selection interface 1410 may include one or more motion template options (eg, "travel" motion options, “comfortable” motion options 1411A, “dynamic” motion options 1411B, etc.), music mode Option 1411C, selection box 1412, smart mirror movement prompt box 1413, mirror movement control 1415, and echo control 1416.
  • close control 1414 in the smart motion prompt box 1413 , and the close control 1414 can be used to trigger the electronic device 100 to exit the motion template selection interface 1410 .
  • the intelligent motion motion prompt box 1413 the motion motion shooting control 1415 , and the echo control 1416 , reference may be made to the aforementioned embodiment shown in FIG. 3D , which will not be repeated here.
  • the electronic device 100 may receive the user's operation (eg click) on the music mode option 1411C, and in response to the input, the electronic device 100 may move the selection box 1412 to select the music mode option 1411C, and in the motion template selection interface 1410 A music template selection box 1420 is displayed above.
  • the music template selection box 1420 may include one or more music piece options (eg, music piece 1 option 1421, music piece 2 option, music piece 3 option, music piece 4 option, etc.).
  • the audio information of each music segment is different, and different music segments correspond to different cropping frame information (including the size change rule of the cropping frame and/or the motion track of the cropping frame in the original image).
  • a play control and a selection control are displayed on each music piece option (for example, a play control 1423 and a selection control 1422 are displayed on the music piece 1 option 1421), and the play control can be used to trigger the electronic device 100 to play the music piece corresponding to the play control .
  • the selection control can be used to trigger the electronic device 100 to select the music piece corresponding to the selection control.
  • the electronic device 100 may receive an input (eg, a single click) of the user acting on the selection control 1422, and in response to the input, as shown in FIG. 14B, the electronic device 100 may select the music piece 1 corresponding to the music piece 1 option 1421, and in the A checkmark is displayed on selection control 1422.
  • the check mark displayed on the selection control 1422 can be used to indicate that the electronic device 100 determines the cropping frame information corresponding to the music piece 1 to crop the original image obtained by the camera during video recording.
  • the electronic device 100 may receive an input (eg, a single click) from the user acting on the camera control 1415 , and in response to the input, the electronic device 100 may display as shown in FIG. 14C .
  • the video recording interface 1430 may include the original image 1461 obtained by the camera, the echo control 1416, the video capture control 1431, the mirror movement template switching control 1432, the intelligent mirror movement prompt box 1413, the viewfinder display window 1441 and the sound Waveform display window 1445.
  • the motion template switching control 1432 can be used to trigger the electronic device 100 to switch the selected music segment, and the motion template switching control 1432 displays the name of the currently selected music segment (for example, "music segment 1").
  • the viewfinder display window 1441 displays the original image 1461a obtained by the camera (same image content as the original image 1461 above, but with a different display scale), a close control 1442 and a cropping frame 1443 .
  • the sound waveform display window 1445 can be used to display a sound waveform diagram of the selected music piece (eg, music piece 1 ), wherein the signal waveform diagram can be a change relationship diagram of the sound amplitude and time of the selected music piece.
  • the electronic device 100 may receive user input (eg, a single click) for the video capture control 1431, and in response to the input, the electronic device 100 may start playing the music piece 1 through the speaker, and parse the audio information of the selected music piece.
  • the electronic device 100 can determine the cropping frame information (including the size change of the cropping frame and/or the motion track of the cropping frame on the original image) according to the audio information (including sound amplitude, sound frequency, etc.) of the selected music piece. ).
  • the electronic device 100 can crop the original image obtained by the camera according to the cropping frame information to obtain a cropped image, and display the cropped image on the video recording interface 1430 as a shooting picture.
  • the audio information of the music segment and the cropping frame information reference may be made to the subsequent embodiments, which will not be repeated here.
  • the electronic device 100 when the electronic device 100 starts recording in response to an input (eg, a single click) to the video capture control 1431, the electronic device 100 may display a recording time frame 1434, a recording end control 1435, and echo the controls 1416 and
  • the mode switching control 1432 is replaced with a pause recording control 1435 and a photographing control 1436 , and the electronic device 100 can display the sound waveform diagram of the music piece 1 on the viewfinder display window 1445 .
  • the pause recording control 1435 can be used to trigger the electronic device 100 to pause recording.
  • the photographing control 1436 can be used to trigger the electronic device 100 to save a certain frame or multiple frames of the video recording as a picture.
  • the electronic device 100 determines the position of the cropping frame 1443 on each frame of the original image acquired by the camera based on the audio information of the music piece 1 .
  • the electronic device 100 may sequentially display each frame of the original image obtained by the camera in the viewfinder display window 1441 in frame order, and display the position of the cropping frame 1443 on each frame of the original image in the viewfinder display window 1441 .
  • the electronic device 100 may cut out the image in the cropping frame 1443 on the original image, and adjust the cutout image to a specified size to obtain a cropped image.
  • the electronic device 100 may display the cropped image on the video recording interface 1430 as a captured image.
  • the size and/or the center point of the cropping frame 1443 at the position of the original image changes following the rhythm of the music piece 1 .
  • the size of the cropping frame 1443 can be increased with the increase of the sound amplitude of the music piece 1.
  • the sound amplitude of the music piece 1 at the 3rd second is greater than that at the 8th second. Therefore, the size of the cropping frame 1443 is in the video recording.
  • the size at the 3rd second after the start is larger than the size at the 8th second after the recording starts.
  • the electronic device 100 acquires the original image 1462a through the camera at the third second after the recording starts.
  • the electronic device 100 may cut out the cropped image 1462 from the original image 1462a through the cropping frame 1443 .
  • the electronic device 100 acquires the original image 1463a through the camera at the 8th second after the recording starts.
  • the cropped image 1463 is cut out from the original image 1463a by the cropping frame 1443.
  • the magnification ratio of the image content in the cropped image 1462 is smaller than the magnification ratio of the image content in the cropped image 1463 .
  • the electronic device 100 may receive a user input (eg, a single click) on the recording end control 1435, and in response to the input, the electronic device 100 may display a multi-frame cropped image and the selected music clip from the start of the recording to the end of the recording The sound in is saved as a video file.
  • a user input eg, a single click
  • the electronic device 100 may collect sound signals through a microphone during a photo preview or a video recording process.
  • the electronic device 100 can control the size change of the cropping frame and/or the movement track of the cropping frame on the original image by collecting audio information (including sound amplitude, sound frequency, etc.) of the sound signal.
  • the electronic device 100 can determine the position and size of the cropping frame on each frame of the original image captured by the camera. One frame of image is cropped, and the cropped image is displayed on the camera preview interface or video recording interface in frame order. In this way, the shooting picture of the electronic device 100 can be automatically zoomed following the rhythm of the sound signal in the environment, which enhances the visual effect of the shooting picture.
  • FIG. 15A when the electronic device 100 receives an input operation (such as a single click) that the user acts on the “smart mirror movement mode” control 331 shown in FIG. 3C , in response to the input operation, the electronic device 100 can A lens motion template selection interface 1410 is displayed.
  • an ambient sound option 1424 may also be displayed on the lens motion template selection interface 1410 .
  • a selection control 1425 is displayed on the ambient sound option 1424 .
  • the electronic device 100 may receive user input (eg, a click) on the selected control 1425, and in response to the input, as shown in FIG. 15B, the electronic device 100 may display a checkmark on the selected control 1425, The displayed check mark can be used to indicate that the electronic device 100 determines the ambient sound collected by the microphone during video recording, analyzes the audio information of the ambient sound (such as sound amplitude, sound rhythm, etc.) to crop the original image obtained by the camera.
  • user input eg, a click
  • the electronic device 100 may display a checkmark on the selected control 1425, The displayed check mark can be used to indicate that the electronic device 100 determines the ambient sound collected by the microphone during video recording, analyzes the audio information of the ambient sound (such as sound amplitude, sound rhythm, etc.) to crop the original image obtained by the camera.
  • the electronic device 100 may receive an input (eg, a single click) that the user acts on the camera movement control 1415 , and in response to the input, the electronic device 100 may display the display shown in FIG. 14C The recording interface 1530 is shown.
  • an input eg, a single click
  • the video recording interface 1530 may include the original image 1561 obtained by the camera, the echo control 1516, the video capture control 1531, the mirror movement template switching control 1532, the intelligent mirror movement prompt box 1513, the viewfinder display window 1541 and the sound Waveform display window 1545.
  • the mirror movement template switching control 1532 can be used to trigger the electronic device 100 to switch the music acquisition source, and the word "ambient sound" is displayed on the mirror movement template switching control 1532.
  • the viewfinder display window 1541 includes an original image 1561a (the image content is the same as that in the original image 1561, and the display ratio is different), a close control 1542 and a cropping frame 1543.
  • the sound waveform display window 1545 may be used to display the collected sound waveform graph of the ambient sound, where the sound waveform graph may be a graph of the change between the sound amplitude and time of the ambient sound.
  • the electronic device 100 may receive an input (eg, a single click) of the video capture control 1531 from the user, and in response to the input, the electronic device 100 may start to collect ambient sound through a microphone in real time, and parse the audio information in the ambient sound.
  • the electronic device 100 may determine the cropping frame information (including the size change of the cropping frame and/or the motion track of the cropping frame on the original image) according to the audio information (including sound amplitude, sound frequency, etc.) of the environmental sound.
  • the electronic device 100 can crop the original image obtained by the camera according to the cropping frame information to obtain a cropped image, and display the cropped image on the video recording interface 1530 as a shooting picture.
  • the audio information of the ambient sound and the cropping frame information reference may be made to the subsequent embodiments, which will not be repeated here.
  • the electronic device 100 when the electronic device 100 starts recording in response to an input (eg, a single click) to the video capture control 1531, the electronic device 100 may display a recording time frame 1534, a recording end control 1535, and echo the controls 1516 and The mode switch control 1532 is replaced by a pause video control 1535 and a photo control 1536 .
  • the electronic device 100 may display the collected sound waveform diagram of the ambient sound on the viewfinder display window 1545 .
  • the pause recording control 1535 can be used to trigger the electronic device 100 to pause recording.
  • the photographing control 1536 can be used to trigger the electronic device 100 to save a certain frame or multiple frames of the video recording as a picture.
  • the electronic device 100 determines the position of the cropping frame 1543 on each frame of the original image acquired by the camera based on the audio information of the ambient sound.
  • the electronic device 100 may sequentially display each frame of the original image obtained by the camera in the viewfinder display window 1541 in frame order, and display the position of the cropping frame 1543 on each frame of the original image in the viewfinder display window 1541 .
  • the electronic device 100 can cut out the image in the cropping frame 1543 on the original image, and adjust the cutout image to a specified size to obtain a cropped image.
  • the electronic device 100 may display the cropped image on the video recording interface 1530 as a captured image.
  • the size and/or the center point of the cropping frame 1543 at the position of the original image changes following the rhythm of the ambient sound.
  • the size of the cropping frame 1543 can be increased with the increase of the sound amplitude of the ambient sound.
  • the sound amplitude of the ambient sound at the 3rd second is greater than that at the 8th second. Therefore, the size of the cropping frame 1543 is after the recording starts.
  • the size at the 3rd second is larger than the size at the 8th second after the recording starts.
  • the electronic device 100 acquires the original image 1562a through the camera at the third second after the start of recording.
  • the electronic device 100 can cut out the cropped image 1562a from the original image 1562a through the cropping frame 1543, and the electronic device 100 obtains the original image 1563a through the camera at the 8th second after the recording starts.
  • the electronic device 100 may cut out the cropped image 1563 from the original image 1563a through the cropping frame 1543 , wherein the magnification of the image content in the cropped image 1562 is smaller than the magnification of the image content in the cropped image 1563 .
  • the electronic device 100 may receive a user input (eg, a single click) on the recording end control 1535, and in response to the input, the electronic device 100 may display a multi-frame cropped image from the start of the recording to the end of the recording and from the start of the recording to the end of the recording.
  • the ambient sound collected by the microphone within the time of the end of the recording is saved as a video file.
  • the electronic device 100 has a touch screen that can be folded, which may be referred to as a folding screen.
  • a folding screen When the touch screen of the electronic device 100 is in a half-folded state (for example, the folding angle is about 90 degrees), the touch screen of the electronic device 100 can be divided into at least an A screen and a B screen.
  • customized interface layouts and functional control layouts may be preset for the half-folded form of the folding screen.
  • the electronic device 100 can display the camera application interface (or video recording interface).
  • the device 100 can display the preview image in the shooting interface (or the recording image in the recording interface) on the A screen, and display the function controls in the shooting interface (or the recording interface) (or the function controls in the recording interface) on the B screen.
  • the electronic device 100 may display the video recording interface 1530 shown in FIG. 15C on the touch screen.
  • the electronic device 100 can display the video recording image in the above-mentioned recording interface 1530 on the A screen (for example, the original image 1561 in FIG. 15C or the cropped image 1562 in FIG. 15D ), and on the B screen
  • the function controls in the video recording interface 1530 such as the echo control 1516, the video capture control 1531, the mirror movement template switching control 1532, the intelligent mirror movement prompt box 1513, the viewfinder display window 1541 and the sound waveform display window 1545 in FIG. ,and many more).
  • various controls in the application interface can be rearranged according to the physical form of the folding screen, so that the user can obtain a better visual experience when viewing and using the folding screen.
  • the electronic device 100 may display different contents in the same application interface in a split screen.
  • the touch screen of the electronic device 100 may be divided into multiple display areas, and the multiple display areas include display area 1 and display area 2 .
  • the electronic device 100 may display a shooting interface (or a video recording interface) of the camera application.
  • the electronic device 100 can display the preview image in the shooting interface (or the video recording image in the video recording interface) on the display area 1 of the touch screen, and display the preview image on the display area 2 of the touch screen.
  • the function controls in the shooting interface (or the recording interface) (or the function controls in the recording interface).
  • the electronic device 100 can display the video recording interface 1530 shown in FIG. 15C on the touch screen.
  • the electronic device 100 can display the video recording image in the above-mentioned video recording interface 1530 on the display area 1 of the touch screen (for example, the original image 1561 in FIG. 15C or the cropped image 1562 in FIG. 15D ).
  • the function controls in the recording interface 1530 are displayed on the display area 2 of the touch screen (for example, the echo control 1516 in FIG. viewfinder display window 1541 and sound waveform display window 1545, etc.).
  • various controls in the application interface can be rearranged according to whether the application split screen is enabled or not, so that the user can obtain a better visual experience after viewing and using the application split screen.
  • the operation of the user triggering the electronic device 100 to start recording, end recording, or take a photo is not limited to controls displayed on the touch screen (eg, start recording controls, end recording controls, shooting controls, etc.). Touch input such as clicks.
  • the user triggers the electronic device 100 to start recording, end recording, or take a photo, etc., which may also be voice input.
  • the electronic device 100 can recognize the voice input. Semantics (eg "eggplant”, “photograph”, “start video recording”, “end video recording”, etc.), control the electronic device 100 to start video recording, end video recording or take photo, and so on.
  • the electronic device 100 may also trigger to take a photo, start or end video recording, etc. by recognizing a designated gesture or facial expression of a person in the shooting preview screen.
  • the electronic device 100 can also control the electronic device 100 to start video recording, end video recording or take pictures, etc. .
  • the following describes the determination of the above-mentioned cropping frame information (including the size change rule of the cropping frame and/or the motion track of the cropping frame in the original image) according to the audio information of the sound signal in the embodiments of the present application.
  • the electronic device 100 acquires a sound signal during video recording or shooting preview.
  • the sound signal may be audio data corresponding to the music segment selected by the user in the foregoing embodiment, or may be ambient sound collected by the electronic device 100 through the microphone in the foregoing embodiment.
  • the electronic device 100 may parse audio information of the sound signal, where the audio information of the sound signal includes rhythm information, amplitude information, style information, and the like.
  • the electronic device 100 can adjust the size of the cropping frame, the changing speed of the cropping frame (including the changing speed of the size of the cropping frame and/or the moving speed of the center point of the cropping frame, etc.), filter effects (including different color lighting effects) and so on.
  • the electronic device 100 may, after acquiring the sound signal, sample and quantize the sound signal to obtain window data.
  • the electronic device 100 may perform difference processing on the window data to obtain difference data.
  • the electronic device 100 may perform Fourier transform on the difference data and differentiate again to obtain a rhythm signal.
  • the electronic device 100 can obtain the rhythm start point and the rhythm end point from the rhythm signal.
  • the electronic device 100 identifies the rhythm start point of the i-th rhythm, the rhythm end point of the The starting point of the i+1 rhythm, the ending point of the i+1 th rhythm, etc., i is a positive integer.
  • the length between the rhythm start point and the rhythm end point of a rhythm indicates the speed of the rhythm.
  • the electronic device 100 can control the size change of the cropping frame on the original image through the rhythm of the sound signal. Wherein, when the rhythm of the sound signal becomes faster, the electronic device 100 can control the size of the cropping frame on the original image to increase, and when the rhythm of the sound signal becomes slower, the electronic device 100 can control the size of the cropping frame on the original image to increase Small. When the size of the cropping frame is proportionally enlarged to the maximum size, the electronic device 100 may control the size of the cropping frame to be proportionally smaller in reverse. When the size of the cropping frame becomes larger to the preset minimum size, the electronic device 100 may control the size of the cropping frame to increase proportionally and inversely.
  • the electronic device 100 may identify the rhythm termination time point of the sound signal, and at the rhythm termination time point of the sound signal, control the size of the cropping frame to be larger or smaller by a specified multiple.
  • the electronic device 100 may control the cropping frame to move on the original image.
  • the electronic device 100 can control the moving speed of the cropping frame on the original image through the rhythm of the sound signal. Wherein, when the rhythm of the sound signal becomes faster, the electronic device 100 can control the moving speed of the cropping frame on the original image to increase. When the rhythm of the sound signal becomes slower, the electronic device 100 may control the moving speed of the cropping frame on the original image to become smaller.
  • the electronic device 100 can control the cropping frame to move in the reverse direction, or control the positive and negative directions of the cropping frame to move 90 degrees.
  • the electronic device 100 may identify the rhythm ending time point (or rhythm starting time point) of the sound signal, and at the rhythm ending time point (or rhythm starting time point) of the sound signal, control the The switching of the crop box moves the direction once.
  • the electronic device 100 can control the size change of the cropping frame on the original image through the amplitude of the sound signal. Wherein, when the amplitude of the sound signal increases, the electronic device 100 can control the size of the cropping frame on the original image to increase, and when the amplitude of the sound signal decreases, the electronic device 100 can control the size of the cropping frame on the original image to decrease .
  • the electronic device 100 may control the size of the cropping frame to be proportionally smaller in reverse.
  • the electronic device 100 may control the size of the cropping frame to increase proportionally and inversely.
  • the electronic device 100 may control the cropping frame to move on the original image.
  • the electronic device 100 can control the moving speed of the cropping frame on the original image through the amplitude of the sound signal. Wherein, when the amplitude of the sound signal increases, the electronic device 100 can control the moving speed of the cropping frame on the original image to increase. When the rhythm of the sound signal becomes slower, the electronic device 100 may control the moving speed of the cropping frame on the original image to become smaller.
  • the electronic device 100 can control the cropping frame to move in the reverse direction, or control the positive and negative directions of the cropping frame to move 90 degrees.
  • the electronic device 100 can control the size change of the cropping frame on the original image through the rhythm of the sound signal, the electronic device 100 can control the cropping frame to move on the original image, and control the size of the cropping frame on the original image by the amplitude of the sound signal. Movement speed on the original image.
  • the electronic device 100 can control the size change of the cropping frame on the original image through the amplitude of the sound signal, the electronic device 100 can control the cropping frame to move on the original image, and control the size of the cropping frame on the original image through the rhythm of the sound signal. Movement speed on the original image.
  • the electronic device 100 may determine the filter color (eg, red, orange, yellow, green, cyan, blue, purple, etc. color lighting effects) through the musical style of the sound signal. After the electronic device 100 intercepts the image in the cropping frame on the original image, it can apply a filter effect to the cropped image based on the filter color, and display the cropped image after the filter effect on the above-mentioned shooting interface or the above-mentioned video recording interface. middle. For example, the electronic device 100 may change a filter color when recognizing that the main chorus of the sound signal is switched.
  • the filter color eg, red, orange, yellow, green, cyan, blue, purple, etc. color lighting effects
  • the electronic device 100 may identify the rhythm start time point (or rhythm end time point) of the sound signal, and at the rhythm start time point (or rhythm end time point) of the sound signal, change the Filter color once.
  • the electronic device 100 may store video files locally.
  • the electronic device 100 may be based on the cropping frame information (including the size change rule of the cropping frame and/or the motion track of the cropping frame on the video screen) corresponding to the motion template selected by the user.
  • the electronic device 100 can trim each frame of video picture in the video file according to the cropping frame information corresponding to the mirror motion template, and adjust the cropped video picture to a specified size to obtain a cropped video. In this way, the electronic device 100 can trim the saved video file according to the trimming information corresponding to the lens motion template selected by the user, re-zoom the video image, and can highlight the subject or scene background in the video image.
  • the electronic device 100 displays an interface 310 with a home screen.
  • the text description for the interface 310 may refer to the embodiment shown in FIG. 3A , which will not be repeated here.
  • the electronic device 100 may receive user input (eg, a click) on the gallery application icon 312, and in response to the input, the electronic device 100 may display the gallery application interface 1710 as shown in FIG. 17B.
  • user input eg, a click
  • the electronic device 100 may display the gallery application interface 1710 as shown in FIG. 17B.
  • the gallery application interface 1710 can be displayed to include one or more albums (eg, all photo albums, video album 1716, camera album, WeChat album, Weibo album, etc.).
  • the electronic device 100 may display a gallery menu 1711 below the gallery album interface 1710 .
  • the gallery menu 1711 includes a photo control 1712, an album control 1713, a time control 1714, and a discovery control 1715.
  • the photo control 1712 is used to trigger the electronic device 100 to display all local pictures in the form of picture thumbnails.
  • the album control 1713 is used to trigger the electronic device 100 to display the album to which the local picture belongs.
  • the photo album control 1713 is currently selected, and the electronic device 100 displays the gallery application interface 1710 .
  • the moment control 1714 can be used to trigger the electronic device 100 to display a locally stored featured picture.
  • the discovery control 1715 can be used to trigger the electronic device 100 to display a classified album of pictures.
  • the electronic device 100 may receive user input (eg, a click) on the video album 1716, and in response to the input, the electronic device 100 may display the video album interface 1720 as shown in FIG. 17C.
  • user input eg, a click
  • the electronic device 100 may display the video album interface 1720 as shown in FIG. 17C.
  • the video album interface 1720 may include one or more video file options (eg, video file option 1721 and video file option 1722).
  • the electronic device 100 may receive user input (eg, a click) on the video file option 1721, and in response to the input, the electronic device 100 may display a video browsing interface 1730 as shown in FIG. 17D.
  • user input eg, a click
  • the electronic device 100 may display a video browsing interface 1730 as shown in FIG. 17D.
  • the video browsing interface 1730 includes a video 1731 , a video playback control 1732 , a total video time 1733 , a menu 1734 , and a mirror movement mode control 1735 .
  • a video 1731 As shown in FIG. 17D , the video browsing interface 1730 includes a video 1731 , a video playback control 1732 , a total video time 1733 , a menu 1734 , and a mirror movement mode control 1735 .
  • a menu 1734 for the textual description of the menu 1734, reference may be made to the foregoing embodiments, which will not be repeated here.
  • the electronic device 100 may receive user input (eg, a single click) on the motion mode control 1735, and in response to the input, the electronic device 100 may display a motion template selection interface 1740 as shown in FIG. 17E.
  • user input eg, a single click
  • the motion template selection interface 1740 includes one or more motion template options (eg, "travel" motion option 1741A, “comfortable” motion option 1741B, “dynamic” motion option 1741C, etc. etc.), the selection box 1742, the confirmation control 1743, the cancel control 1744, the mirror movement template display area 1751, and the mirror movement track display area 1753.
  • the cancel control 1743 can be used to trigger the electronic device 100 to exit the lens motion template selection interface 1740 .
  • the size change rules of the cropping frame or the motion trajectory of the cropping frame corresponding to different mirror motion template options are different. As shown in FIG.
  • the “travel” camera movement option 1741A has been selected in the selection box 1742 , and the video sample corresponding to the “travel” camera movement option 1741A is displayed in the camera movement template display area 1751 .
  • the camera movement track display area 1753 may display the cropping frame size change rule corresponding to the "travel” camera movement option 1741A and/or the motion trajectory of the cropping frame in the original image of the video dailies.
  • the center point of the crop box corresponding to the "travel" motion option 1741A may be at the same location as the center point of the original image, and the size of the crop box corresponding to the "travel” motion option 1741A may first decrease proportionally from the size of the original image over time.
  • the size of the cropping frame corresponding to the "travel" lens movement option 1741A changes proportionally to the size of the original image.
  • the preset minimum size is smaller than the size of the original image.
  • the electronic device 100 may receive an input operation (eg, a single click) of the user acting on the determination control 1743, and in response to the input operation, the electronic device 100 may use the cropping box size change rule and /Or the motion track of the cropping frame in the original image, crop the video picture stream in the video 1731 to obtain the cropped video 1761, and display the cropped video 1761 on the video browsing interface 1760 as shown in FIG. 17F .
  • an input operation eg, a single click
  • the video browsing interface 1760 may include a trimmed video 1761 , a video playback control 1762 , a total duration of the trimmed video 1763 , a mirror motion template switching control 1764 and a save control 1765 .
  • the video playback control 1762 can be used to trigger the electronic device 100 to save the cropped video 1761 to a specified storage path.
  • the moving template switching control 1764 can be used to trigger the electronic device 100 to switch the moving template.
  • the electronic device 100 may store video files locally.
  • the electronic device 100 may receive a piece of music selected by the user or collect ambient sounds through a microphone.
  • the electronic device 100 can control the size change of the cropping frame and/or the motion track of the cropping frame on the original video picture in the video file according to the audio information of the music piece or the ambient sound.
  • the electronic device 100 can determine the position and size of the cropping frame on each frame of the original image captured by the camera, and based on the position and size of the cropping frame on each frame of the original image, each frame of video image Perform cropping, and adjust the cropped video image to a specified size to obtain a cropped image stream.
  • the electronic device 100 may save the cropped image stream and the above-mentioned music clip (or ambient sound) as a video file. In this way, the video picture can be automatically zoomed following the rhythm of the music, which enhances the visual effect of the shooting picture.
  • the electronic device 100 may display a lens motion template selection interface 1740 .
  • the electronic device 100 may display the music template selection box 1770 on the lens motion template selection interface 1740 to include one or more Music segment options (eg, music segment 1 option 1771 , music segment 2 option, music segment 3 option, music segment 4 option, etc.), and ambient sound option 1774 .
  • Music segment options eg, music segment 1 option 1771 , music segment 2 option, music segment 3 option, music segment 4 option, etc.
  • a play control and a selection control are displayed on each music piece option (for example, a play control 1773 and a selection control 1772 are displayed on the music piece 1 option 1771), and the play control can be used to trigger the electronic device 100 to play the music piece corresponding to the play control .
  • the selection control can be used to trigger the electronic device 100 to select the music piece corresponding to the selection control.
  • a selection control 1775 is displayed on the ambient sound option 1774 .
  • the electronic device 100 may receive user input (eg, a click) on the selected control 1775, and in response to the input, as shown in FIG. 17G , the electronic device 100 may display a checkmark on the selected control 1775
  • the displayed check mark can be used to represent the ambient sound collected by the electronic device 100 through the microphone, and to crop each frame of the video picture in the above-mentioned video 1731 .
  • the electronic device 100 may receive an input (eg, a single click) from the user acting on the determination control 1743, and in response to the input, the electronic device 100 may start collecting ambient sounds through the microphone , and the ambient sound collection interface 1780 shown in FIG. 17H is displayed.
  • an input eg, a single click
  • the ambient sound collection interface 1780 includes a waveform diagram 1781 of the ambient sound, a collection pause control 1782 , a collection time bar 1783 , and a recollection control 1784 .
  • the waveform diagram 1781 of the ambient sound is used to display the signal waveform of the ambient sound.
  • the collection pause control 1782 can be used to trigger the electronic device 100 to pause the collection of ambient sounds through the microphone.
  • the collection time bar 1783 is used to indicate the total time length (for example, 12 seconds) that the electronic device 100 needs to collect ambient sounds and the time length that has been collected (for example, 8 seconds of ambient sounds are currently collected), wherein the total time for collecting ambient sounds The length is the broadcast time length of the video to be trimmed.
  • the electronic device 100 may display an ambient sound playback control 1785 and a determination control 1786 on the ambient sound trimming interface 1780 .
  • the ambient sound playback control 1785 can be used to trigger the electronic device 100 to play the collected ambient sound. In this way, the user can audition whether the collected environment is suitable.
  • the electronic device 100 may receive the user's input (for example, a single click) for the determination control 1786, and in response to the input, the electronic device 100 may use the collected ambient sound to trim each frame of the video to be trimmed. And enlarge the cropped picture to the specified size to get the cropped picture flow.
  • the electronic device 100 can combine the cropped image stream and the collected ambient sound to obtain a cropped video 1791, and display the cropped video 1761 on the video browsing interface 1790 as shown in FIG. 17J .
  • the video browsing interface 1790 may include a trimmed video 1791 , a video playback control 1792 , a total duration of trimmed video 1793 , a mirror motion template switching control 1794 and a save control 1795 .
  • the video playback control 1792 can be used to trigger the electronic device 100 to save the cropped video 1791 to a specified storage path.
  • the moving template switching control 1794 can be used to trigger the electronic device 100 to switch the moving template.
  • FIG. 18 shows a schematic diagram of a video stream cropping system 1800 provided in an embodiment of the present application.
  • the video stream cropping system 1800 can be applied to the above-mentioned electronic device 100 to execute the image processing method in the above-mentioned embodiment.
  • the video stream cropping system 1800 may include: an image stabilization module 1801 , a mirror movement control module 1802 , and a super-division processing module 1803 .
  • the electronic device 100 obtains the video stream through the camera when the above-mentioned mirror movement mode is enabled for recording.
  • the electronic device 100 may acquire the video stream through the camera when the above-mentioned mirror movement mode is turned on and the shooting interface is displayed.
  • the electronic device 100 stores a video file locally, and the electronic device 100 can acquire the video stream in the video file.
  • the electronic device 100 may have multiple cameras, and the multiple cameras include a wide-angle camera.
  • the electronic device 100 obtains the video stream by using the wide-angle camera. In this way, the electronic device 100 can obtain a video picture with a wider viewing angle.
  • the electronic device 100 may perform image stabilization processing on the video stream through the image stabilization module 1802 .
  • the image stabilization module 1801 may perform electronic image stabilization (electronic image stabilization, EIS) processing on the video stream. Specifically, the image stabilization module 1801 can obtain the electronic device 100 through sensors such as a gyroscope sensor to detect the jitter information of the electronic device 100 when it obtains a video stream through a camera. The image stabilization module 1801 may calculate motion information of adjacent frames in the video stream based on the jitter information. The image stabilization module 1801 can perform motion compensation for each pixel in the frame image based on the motion information of the adjacent frame images, so as to achieve the purpose of stabilizing the image.
  • EIS electronic image stabilization
  • the image stabilization module 1801 may also perform optical image stabilization on the video stream. Specifically, the electronic device 100 can adaptively adjust the optical path through optical visibility to compensate for image motion caused by the camera platform shake.
  • the image stabilization module 1801 can also perform mechanical image stabilization when acquiring a video stream through a camera. Specifically, the image stabilization module 1801 can acquire the shaking information of the electronic device 100 detected by the electronic device 100 through a device such as a gyroscope sensor, and then adjust the servo system of the camera to achieve the purpose of stabilizing the image.
  • a device such as a gyroscope sensor
  • the above-mentioned image stabilization module 1801 is optional, and it is optional to perform image stabilization processing on the acquired video stream, and the electronic device 100 may perform cropping through the mirror movement control module without performing image stabilization.
  • the motion control module 1802 can trim the picture of the video stream based on a preset motion template or a sound signal. Specifically, the motion control module 1802 can determine the cropping frame information according to the motion template selected by the user or the rhythm information of the sound signal.
  • the cropping information includes the size and position of the cropping frame on each frame of the video stream.
  • the mirror motion template defines the size change rule of the cropping frame and the motion track of the cropping frame on the original image obtained by the camera.
  • the sound signal may be a music clip stored locally by the electronic device 100, or may be collected by the microphone when the electronic device 100 starts recording or displays the shooting interface in the above-mentioned mirror motion mode.
  • the mirror movement control module 1802 can cut out the image in the cropping frame in each frame, and adjust the cutout image to the specified size. size, get the cropped video stream.
  • the mirror motion control module 1802 inputs the cropped video stream to the super-division processing module 1803 .
  • the super-resolution processing module 1803 can perform image super-resolution reconstruction on the pictures of the cropped video stream. In this way, the clarity of the picture can be improved, the details of the picture can be enriched, and the noise in the picture can be removed.
  • the electronic device 100 may display the super-divided cropped video stream on the video recording interface or the shooting interface in the foregoing embodiment. The electronic device 100 may also save the super-divided cropped video stream in response to the user's input.
  • the above-mentioned super-division processing module 1803 is optional, and the electronic device 100 can directly display the cropped video stream processed by the camera movement control module 1802 on the video recording interface or shooting interface in the above-mentioned embodiment. middle.
  • the electronic device 100 may also save the cropped video stream in response to the user's input.
  • FIG. 19 shows a schematic diagram of a video stream cropping system 1900 provided in an embodiment of the present application.
  • the video stream cropping system 1900 can be applied to the above-mentioned electronic device 100 to execute the image processing method in the above-mentioned embodiment.
  • the video stream cropping system 1900 may include a camera 1901 , an image signal processor (ISP) 1902 , a memory 1903 , and an application processor (AP) 1904 .
  • ISP image signal processor
  • AP application processor
  • the camera 1901 can convert the optical signal into an electrical signal after receiving the optical signal, and input the electrical signal to the image signal processor 1902 .
  • the image signal processor 1902 can output YUV data through a signal processing algorithm and store it in the memory 1903 .
  • the electronic device 100 may have multiple cameras, and the multiple cameras include a wide-angle camera.
  • the electronic device 100 obtains the video stream by using the wide-angle camera. In this way, the electronic device 100 can obtain a video picture with a wider viewing angle.
  • the application processor 1904 can read the YUV data in the memory 1903 (for example, the size is 4608*2592 or 3840*2160), and determine the position and size of the cropping frame in the current frame based on the preset motion template and the sound signal.
  • the application processor 1904 can cut out the image in the cropping frame on the current frame and adjust it to a specified size (for example, 1920*1080 or 3840*2160).
  • the application processor 1904 can cut out the image in the cropping frame in each frame of the video stream, and adjust it to a specified size to obtain the cropped video stream.
  • the application processor 1904 may send the position and size of the cropping frame on the current frame to the image signal processor 1902 .
  • the image signal processor 1902 may, based on the position and size of the cropping frame on the current frame, cut out the image within the cropping frame on the current frame, and adjust it to a specified size.
  • the image signal processor 1902 obtains the cropped video stream by extracting the image within the cropping frame in each frame of the video stream, and adjusting it to a specified size.
  • the electronic device 100 needs to identify the image content in the shooting picture, detect and track the position of the designated image content, and determine the outline of the designated image content.
  • the video stream cropping system 1900 described above also includes a neural network processor (not shown in FIG. 19).
  • the application processor 1904 can preprocess the YUV data.
  • the preprocessing process includes the application processor 1904 (or the application processor 1904 instructs digital signal processing) to convert the YUV data into an RGB image (or a BGR image or a single-channel image or a grayscale image, etc.), and downsample to the AI model
  • the input image size for example, 224*224, 288*288, etc.).
  • the application processor 1904 may feed the preprocessed RGB image (or BGR image or single channel image or grayscale image, etc.) to the neural network processor.
  • the neural network processor can detect and track the position of the specified image content in the RGB image (or BGR image or single-channel image or grayscale image, etc.) through the AI model, and determine the outline of the specified image content.
  • the neural network processor may output detection frame information or outline information specifying image content to the application processor 1904 .
  • the application processor 1904 may determine the above-mentioned cropping frame information according to the detection frame information/or outline information of the specified image.
  • the application processor 1904 may detect the jitter information of the electronic device 100 through the gyro sensor while the image signal processor 1902 outputs the YUV data. After acquiring the YUV data, the application processor 1904 can calculate the motion information of adjacent frames in the video stream based on the jitter information. The application processor 1904 may perform motion compensation on each pixel in the frame based on the motion information of the adjacent frames, so as to achieve the purpose of stabilizing the image.
  • the application processor 1904 may perform electronic image stabilization (EIS) processing on the video stream. Specifically, the application processor 1904 may obtain the electronic device 100 through a sensor such as a gyroscope sensor to detect the jitter information of the electronic device 100 when it obtains a video stream through a camera. The application processor 1904 may calculate motion information of adjacent frames in the video stream based on the jitter information. The application processor 1904 may perform motion compensation on each pixel in the frame based on the motion information of the adjacent frames, so as to achieve the purpose of stabilizing the image.
  • EIS electronic image stabilization
  • the application processor 1904 may send the motion information of the adjacent frames to the graphics processor (not shown in FIG. 19 ).
  • the graphics processor can perform motion compensation for each pixel in the frame based on the motion information of the adjacent frames, so as to achieve the purpose of stabilizing the image.
  • the application processor 1904 may also perform optical image stabilization on the video stream. Specifically, the application processor 1904 can adaptively adjust the optical path through optical visibility to compensate for image motion caused by camera platform shake.
  • the application processor 1904 can also perform mechanical image stabilization when acquiring the video stream through the camera. Specifically, the application processor 1904 can acquire the jitter information of the electronic device 100 detected by the electronic device 100 through a device such as a gyroscope sensor, and then adjust the servo system (sevomechanism) of the camera to achieve the purpose of stabilizing the image.
  • a device such as a gyroscope sensor
  • the application processor 1904 may perform image super-resolution reconstruction on pictures of the cropped video stream. In this way, the clarity of the picture can be improved, the details of the picture can be enriched, and the noise in the picture can be removed.
  • the application processor 1904 directly outputs to the super-resolution neural network model after cropping each frame in the video stream based on the cropping frame, and uses the super-resolution neural network model to process the cropped picture. Perform image super-resolution reconstruction and adjust to the specified size to obtain the cropped video stream after super-resolution.
  • the application processor 1904 trims each frame of the video stream based on the cropping frame, it is adjusted to a specified size, and then output to the super-resolution neural network model, and the super-resolution neural network is passed through the super-resolution neural network model.
  • the network model performs image super-resolution reconstruction on the cropped picture, and obtains the cropped video stream after super-resolution.
  • the video stream of the first frame rate can be obtained through the camera.
  • the electronic device 100 can obtain a video stream with a second frame rate through the camera, where the second frame rate is higher than the first frame rate.
  • the electronic device 100 can use multiple frames of pictures for fusion (for example, every 3 to 7 frames of pictures) during the super-division process, which improves the picture definition of the cropped video stream.
  • the electronic device 100 After the electronic device 100 acquires the multi-frame pictures in the cropped video stream during the super-division process, it can select one of the frame pictures as the reference frame picture, and register the rest of the multi-frame pictures to the reference frame picture. .
  • the electronic device 100 can input the registered multiple frames into the super-resolution neural network model, and fuse the multiple frames through the super-resolution neural network model to obtain high-definition frame images.
  • the electronic device 100 can increase the image capture frame rate of the camera, thereby increasing the picture frame rate of the video stream. For example, before the electronic device 100 starts the mirror movement mode, the camera may capture images at a frame rate of 30 frames per second. After the electronic device 100 enables the mirror movement mode, the camera can capture images at a frame rate of 90 frames per second.
  • the electronic device 100 may insert frames by software after the camera captures the image picture, so as to improve the picture frame rate of the video stream. For example, before the electronic device 100 enables the mirror movement mode, the camera may capture images at a frame rate of 30 frames per second without performing frame interpolation to obtain a video stream of 30 frames per second. After the electronic device 100 enables the mirror movement mode, the camera can capture images at a frame rate of 90 frames per second, and insert 90 frames of images per second to obtain a video stream of 180 frames per second.
  • FIG. 20 shows a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • the image processing method includes:
  • the electronic device 100 displays a first shooting preview interface
  • the first shooting preview interface includes a first preview frame
  • the first preview frame displays a picture captured by a camera of the electronic device 100 in real time.
  • the first shooting preview interface may be the shooting interface 320 in the embodiment shown in FIG. 3B. In some embodiments, the first shooting preview interface may also be the shooting interface 320 in the embodiment shown in FIG. 6A above. For specific content, reference may be made to the foregoing embodiments, which will not be repeated here.
  • the electronic device 100 After the electronic device 100 detects the first operation on the first shooting preview interface, the electronic device 100 displays a shooting option interface.
  • the shooting option interface includes a first shooting option and a second shooting option.
  • the first operation may be the operation for the more mode control 327G in the embodiment shown in FIG. 3B
  • the shooting option interface may be the lens movement template selection interface 340 in the embodiment shown in FIG. 3D
  • the electronic device 100 may display the mode selection page 330 shown in FIG. 3C described above.
  • the electronic device 100 may detect an operation (eg, a single click) on the "Smart Mirror Mode” control 331 in the mode selection page 330, and in response to the operation on the "Smart Mirror Mode” control 331, the electronic device 100 may display the Lens motion template selection interface 340 .
  • the first shooting option may be the "travel" motion option 341A in the lens motion template selection interface 340 shown in FIG. 3D
  • the second shooting option may be the "Motion" motion in the lens motion template selection interface 340 shown in FIG. 3D. ”
  • Mirror template option 341C For example, the first shooting option may be the "travel" motion option 341A in the lens motion template selection interface 340 shown in FIG. 3D, and the second shooting option may
  • the first operation may be the operation for the more mode control 327G in the embodiment shown in FIG. 3B
  • the shooting option interface may be the lens movement template selection interface 1410 in the embodiment shown in FIG. 14A .
  • the electronic device 100 may display the mode selection page 330 shown in FIG. 3C described above.
  • the electronic device 100 may detect an operation (eg, a single click) on the "Smart Mirror Mode" control 331 in the mode selection page 330, and in response to the operation on the "Smart Mirror Mode” control 331, the electronic device 100 may display a graph.
  • Motion template selection interface 1410 shown in 14A For example, the first shooting option may be the above-mentioned music piece 1 option 1421 shown in FIG. 14A
  • the second shooting option may be the above-mentioned music piece 2 option shown in FIG. 14B .
  • the electronic device 100 After the electronic device 100 detects the second operation for the first shooting option, the electronic device 100 displays a second shooting preview interface.
  • the second preview interface includes a second preview frame, and the second preview frame displays an image captured by the camera of the electronic device 100 in real time.
  • the second operation may be an operation for the “travel” camera movement option 341A in the embodiment shown in FIG. 3D (for example, a single click), and the second shooting preview interface may be the video recording interface in the embodiment shown in FIG. 3I . 360 or the shooting interface 510 in the embodiment shown in FIG. 5B.
  • the electronic device 100 may also detect the operation on the camera movement control 345 in the embodiment shown in FIG. 3D or FIG. 3E or FIG. 5A (for example, a single click), and in response to the operation on the camera movement control 345, the electronic device 100 may display the above-mentioned recording interface 360 or the above-mentioned photographing interface 510.
  • the electronic device 100 starts to shoot the first video content.
  • the electronic device 100 detects a fourth operation on the second capture preview interface. In response to the fourth operation, the electronic device 100 starts to capture the first video content.
  • the second shooting preview interface may be the video recording interface 360 in the embodiment shown in FIG. 3I.
  • the fourth operation may be an operation (eg, a single click) on the video capture control 361 in the video recording interface 360 , and in response to the operation on the video capture control 361 in the video recording interface 360 , the electronic device 100 may start to capture the first video content.
  • the electronic device 100 displays, in the second preview frame, the first part of the picture captured in real time by the camera of the electronic device 100 .
  • the electronic device 100 displays, in a second preview frame, the second part of the picture captured in real time by the camera of the electronic device 100 .
  • the first part displayed in the second preview frame may be the cropped image 372 in the embodiment shown in FIG. 3J.
  • the second preview frame displays that the second part may be the cropped image 373 in the embodiment shown in FIG. 3K.
  • the second shooting preview interface further includes a first window.
  • the electronic device 100 displays the picture captured in real time by the camera of the electronic device 100 in the first window.
  • the electronic device 100 displays the bounding box of the first part in the first window.
  • the electronic device 100 displays the bounding box of the second portion in the first window. In this way, it is convenient for the user to see the picture captured by the camera in real time, and it is convenient for the user to find the subject to be photographed.
  • the first window may be the viewfinder display window 521 in the embodiments shown in FIGS. 5B-5E.
  • the electronic device 100 displays the video at the first moment in the video sample corresponding to the first shooting option in the first window screen.
  • the electronic device 100 displays, in the first window, a video frame at the second moment in the video sample corresponding to the first shooting option. In this way, it is convenient for users to compare the shooting effects in real-time with the video samples.
  • the first window may be the mirror moving template preview window 363 in the embodiments shown in FIG. 3I-FIG. 3M.
  • the display position of the first window and the second preview frame is any one of the following: at least part of the first window overlaps with the display area of the second preview frame; or, the first window is displayed on the second shooting preview interface on the first Two positions outside the preview frame; or, the first window is displayed in the upper right area of the second preview frame; or, the first window is displayed in the upper left area of the second preview frame.
  • the first window includes a window closing control; the electronic device 100 detects an eighth operation for the window closing control in the first window; in response to the eighth operation, the electronic device 100 closes and displays the first window. In this way, when the user does not need the first window, the user can be manually triggered to close, so as to ensure that the shooting picture displayed on the electronic device 100 is not blocked.
  • the electronic device 100 After the electronic device 100 closes and displays the first window, the electronic device 100 displays the window opening control in the second shooting preview interface; the electronic device 100 detects a ninth operation for the window opening control; in response to the ninth operation, The electronic device 100 displays the first window on the second shooting preview interface. In this way, the user can trigger the electronic device 100 to redisplay the first window when the user needs to call the widget.
  • the second shooting preview interface further includes a second window
  • the electronic device 100 displays the waveform diagram of the first music segment corresponding to the first shooting option in the second window.
  • the audio information in the waveform chart at the first moment after starting to shoot the first video content is different from the audio information in the waveform chart at the second moment after starting to shoot the first video content, and the audio information includes the following One or more of: tempo information, amplitude information, and style information.
  • the electronic device 100 may play the first music segment.
  • the electronic device 100 saves the first part as a video frame at the first moment in the video file, and saves the second part as a video frame at the second moment in the video file, the electronic device 100 saves the first music segment in the in the audio data of the video file.
  • the second window may be the sound waveform display window 1445 in the embodiment shown in FIG. 14C-FIG. 14E.
  • the sound waveform display window 1445 in the embodiment shown in FIG. 14C-FIG. 14E.
  • FIGS. 14C to 14E For specific content, reference may be made to the foregoing embodiments shown in FIGS. 14C to 14E , which will not be repeated here.
  • the electronic device 100 detects a sixth operation on the second shooting preview interface after the electronic device 100 displays the second part of the picture captured by the camera of the electronic device 100 in real time in the second preview frame. In response to the sixth operation, the electronic device 100 saves the first part as a video frame at the first moment in the video file, and saves the second part as a video frame at the second moment in the video file. In this way, the electronic device 100 can shoot video recordings with effects such as automatic zooming or lens panning.
  • the electronic device 100 detects the seventh operation at a first moment after starting to capture the first video content. In response to the seventh operation, the electronic device 100 saves the first part as a picture.
  • the seventh operation may be an operation (eg, a single click) for the photographing control 368 in the embodiment shown in FIG. 3J .
  • the seventh operation may be an operation (eg, a single click) for the photographing control 368 in the embodiment shown in FIG. 3J .
  • the seventh operation may be an operation (eg, a single click) for the photographing control 368 in the embodiment shown in FIG. 3J .
  • FIG. 3J For specific content, reference may be made to the aforementioned embodiment shown in FIG. 3J , which will not be repeated here.
  • the electronic device 100 displays a shooting option interface.
  • the second shooting preview interface further includes an option switching control; after the electronic device 100 displays the second part of the picture captured in real time by the camera of the electronic device 100 in the second preview frame, the electronic device 100 100 A fifth operation for the option toggle control is detected. In response to the fifth operation, the electronic device 100 displays the photographing option interface. In this way, after a shooting option has been selected, the user can be provided with an entry for changing the shooting option, so that the user can change the shooting option to shoot video content.
  • the fifth operation may be an operation (eg, a single click) on the mirror movement template switching control 362 in the embodiment shown in FIG. 4A.
  • an operation eg, a single click
  • FIGS. 4A to 4D For specific content, reference may be made to the foregoing embodiments shown in FIGS. 4A to 4D , which will not be repeated here.
  • the electronic device 100 displays a third shooting preview interface, the third shooting preview interface includes a third preview frame, and the third preview frame displays the camera of the electronic device 100 real-time captured images.
  • the third shooting preview interface may be the shooting interface 410 shown in FIG. 4D above.
  • the shooting screen effects corresponding to different shooting options reference may be made to the embodiments shown in FIGS. 7A to 7F , the embodiments shown in FIGS. 8A to 8G and the embodiments shown in FIGS.
  • the electronic device 100 starts to shoot the second video content.
  • the electronic device 100 displays, in a third preview frame, the third part of the picture captured in real time by the camera of the electronic device 100 .
  • the electronic device 100 displays, in a third preview frame, the fourth part of the picture captured by the camera of the electronic device 100 in real time.
  • the first part, the second part, the third part and the fourth part are all different.
  • the electronic device 100 before displaying the image captured by the camera of the electronic device 100 in real time, performs image stabilization processing on the image captured in real time by the camera of the electronic device 100 , and the image stabilization processing includes one of the following or Various: electronic image stabilization EIS processing, optical image stabilization processing, mechanical image stabilization processing. In this way, the shooting picture can be made smooth and excessive.
  • the electronic device 100 before the electronic device 100 displays the first part of the picture captured in real time by the camera of the electronic device 100 in the second preview frame, the electronic device performs image super-resolution reconstruction on the first part. Before the electronic device displays the second part of the picture captured in real time by the camera of the electronic device in the second preview frame, the electronic device performs image super-resolution reconstruction on the second part. Before the electronic device displays the third part of the picture captured in real time by the camera of the electronic device in the third preview frame, the electronic device performs image super-resolution reconstruction on the third part. Before the electronic device displays the fourth part of the picture captured by the camera of the electronic device in real time in the third preview frame, the electronic device performs image super-resolution reconstruction on the fourth part. In this way, the shooting picture can be made clearer.
  • the camera of the electronic device includes a wide-angle camera and a non-wide-angle camera.
  • the first preview frame displays the image captured by the non-wide-angle camera in real time.
  • the second preview frame displays the picture captured by the wide-angle camera in real time.
  • the third preview frame displays the image captured by the wide-angle camera in real time. In this way, the captured picture can have a larger viewing angle.

Abstract

The present application discloses an image processing method, being applied to the field of video recording or photographing. Said method comprises: in the process of photographing or video recording by an electronic device, cropping, by means of a cropping frame having a preset size and a preset movement trajectory selected by a user, an image acquired by a camera, and displaying, in a photographing preview interface or a video recording interface, the image in the cropping frame. In this way, the photographed video or picture can have an automatic zooming effect, and detail features of a photographed object can be highlighted.

Description

一种图像处理方法及相关装置An image processing method and related device
本申请要求于2020年09月29日提交中国专利局、申请号为202011053345.5、申请名称为“一种图像处理方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011053345.5 and the application title "An image processing method and related device" filed with the China Patent Office on September 29, 2020, the entire contents of which are incorporated herein by reference middle.
技术领域technical field
本申请涉及计算机视觉技术领域,尤其涉及一种图像处理方法及相关装置。The present application relates to the technical field of computer vision, and in particular, to an image processing method and related apparatus.
背景技术Background technique
智能终端发展至今,拍照和录像已然成为其最重要的特性之一。用户在使用手机等便携式电子设备进行拍摄时,会有变焦或长焦的需求,以拍清楚远处的景物或拍出更广阔的风景。With the development of smart terminals, taking pictures and videos has become one of its most important features. When a user uses a portable electronic device such as a mobile phone to shoot, there will be a need for zooming or telephoto, so as to clearly capture a distant scene or capture a wider landscape.
目前,当手机等电子设备录制视频或者显示预览画面时,若用户想要调整画面的取景焦距时,手机等电子设备仅支持用户手动变焦调节,用户操作复杂。在手机等电子设备进行录像时,用户只能手动调整一次焦距后,手机等电子设备就只能以用户调整后的焦距进行录像,这样录制完的视频,难以体现出视频中拍摄主体的细节,且用户调焦操作繁杂。At present, when an electronic device such as a mobile phone records a video or displays a preview screen, if the user wants to adjust the framing focal length of the screen, the electronic device such as the mobile phone only supports the user's manual zoom adjustment, and the user operation is complicated. When an electronic device such as a mobile phone records a video, after the user can only manually adjust the focal length once, the electronic device such as the mobile phone can only record with the focal length adjusted by the user, so that the recorded video cannot reflect the details of the subject in the video. Moreover, the user's focusing operation is complicated.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种图像处理方法及相关装置及相关装置,可以使得拍摄出来的视频或图片具有自动变焦的效果,凸显出拍摄主体的细节特征。The present application provides an image processing method, a related device, and a related device, which can make the shot video or picture have the effect of automatic zooming, and highlight the detailed characteristics of the shooting subject.
第一方面,本申请提供了一种图像处理方法,包括:电子设备显示第一拍摄预览界面,该第一拍摄预览界面包括第一预览框,该第一预览框显示该电子设备的摄像头实时采集得到的画面。该电子设备检测到对该第一拍摄预览界面的第一操作后,该电子设备显示拍摄选项界面,该拍摄选项界面包括第一拍摄选项和第二拍摄选项。该电子设备检测到针对该第一拍摄选项的第二操作后,该电子设备显示第二拍摄预览界面,该第二拍摄预览界面包括第二预览框,该第二预览框显示该电子设备的摄像头实时采集得到的画面。该电子设备开始拍摄第一视频内容。在开始拍摄该第一视频内容后的第一时刻,该电子设备在该第二预览框中显示该电子设备的摄像头实时采集得到的画面的第一部分。在开始拍摄该第一视频内容后的第二时刻,该电子设备在该第二预览框中显示该电子设备的摄像头实时采集得到的画面的第二部分。该电子设备显示该拍摄选项界面。该电子设备检测到针对该第二拍摄选项的第三操作后,该电子设备显示第三拍摄预览界面,该第三拍摄预览界面包括第三预览框,该第三预览框显示该电子设备的摄像头实时采集得到的画面。该电子设备开始拍摄第二视频内容。在开始拍摄该第二视频内容后的第一时刻,该电子设备在该第三预览框中显示该电子设备的摄像头实时采集得到的画面的第三部分。在开始拍摄该第二视频内容后的第二时刻,该电子设备在该第三预览框中显示该电子设备的摄像头实时采集得到的画面的第四部分,其中,该第一部分、该第二部分、该第三部分和该第四部分均不同。In a first aspect, the present application provides an image processing method, including: an electronic device displays a first shooting preview interface, the first shooting preview interface includes a first preview frame, and the first preview frame displays real-time capture by a camera of the electronic device obtained screen. After the electronic device detects the first operation on the first shooting preview interface, the electronic device displays a shooting option interface, where the shooting option interface includes a first shooting option and a second shooting option. After the electronic device detects the second operation for the first shooting option, the electronic device displays a second shooting preview interface, the second shooting preview interface includes a second preview frame, and the second preview frame displays the camera of the electronic device real-time captured images. The electronic device starts to capture the first video content. At the first moment after starting to shoot the first video content, the electronic device displays in the second preview frame the first part of the picture captured in real time by the camera of the electronic device. At a second moment after starting to shoot the first video content, the electronic device displays, in the second preview frame, the second part of the picture captured in real time by the camera of the electronic device. The electronic device displays the shooting option interface. After the electronic device detects the third operation for the second shooting option, the electronic device displays a third shooting preview interface, the third shooting preview interface includes a third preview frame, and the third preview frame displays the camera of the electronic device real-time captured images. The electronic device starts capturing the second video content. At the first moment after starting to shoot the second video content, the electronic device displays, in the third preview frame, the third part of the picture captured in real time by the camera of the electronic device. At a second moment after starting to shoot the second video content, the electronic device displays, in the third preview frame, the fourth part of the picture captured in real time by the camera of the electronic device, wherein the first part and the second part are , the third part and the fourth part are different.
本申请提供了一种图像处理方法,电子设备可以在拍照或录像过程中,通过预设大小以及预设运动轨迹的裁剪框对摄像头采集到的图像进行裁剪,并将裁剪框中的图像显示在预览界面或录像界面中。这样,可以使得拍摄出来的视频或图片具有自动变焦的效果,凸显出拍摄主体的细节特征。The present application provides an image processing method, in which an electronic device can use a cropping frame with a preset size and a preset motion trajectory to crop an image captured by a camera during a photo-taking or video-recording process, and display the image in the cropping frame on the in the preview interface or the recording interface. In this way, the shot video or picture can have the effect of automatic zooming, and the detailed characteristics of the shooting subject can be highlighted.
在一种可能的实现方式中,在电子设备开始拍摄第一视频内容之前,电子设备检测到针对第二拍摄预览界面的第四操作。响应于该第四操作,该电子设备开始拍摄第一视频内容。In a possible implementation manner, before the electronic device starts to capture the first video content, the electronic device detects a fourth operation on the second capture preview interface. In response to the fourth operation, the electronic device starts to capture the first video content.
在一种可能的实现方式中,该第二拍摄预览界面还包括选项切换控件;在该电子设备在该第二预览框中显示该电子设备的摄像头实时采集得到的画面的第二部分之后,该电子设备检测到针对该选项切换控件的第五操作。响应于该第五操作,该电子设备显示该拍摄选项界面。这样,可以在已选中一个拍摄选项后,为用户提供更换拍摄选项的入口,方便用户更换拍摄选项拍摄视频内容。In a possible implementation manner, the second shooting preview interface further includes an option switching control; after the electronic device displays the second part of the picture captured in real time by the camera of the electronic device in the second preview frame, the The electronic device detects a fifth operation for the option toggle control. In response to the fifth operation, the electronic device displays the photographing option interface. In this way, after a shooting option has been selected, the user can be provided with an entry for changing the shooting option, so that the user can change the shooting option to shoot video content.
在一种可能的实现方式中,在该电子设备在该第二预览框中显示该电子设备的摄像头实时采集得到的画面的第二部分之后,该方法还包括:该电子设备检测到针对该第二拍摄预览界面的第六操作。响应于该第六操作,该电子设备将该第一部分保存为视频文件中第一时刻的视频画面,将该第二部分保存为该视频文件中第二时刻的视频画面。这样,电子设备可以拍摄出具有自动变焦或镜头平移等效果的录像视频。In a possible implementation manner, after the electronic device displays the second part of the picture captured in real time by the camera of the electronic device in the second preview frame, the method further includes: 2. Shoot the sixth operation of the preview interface. In response to the sixth operation, the electronic device saves the first part as a video frame at a first moment in the video file, and saves the second part as a video frame at a second moment in the video file. In this way, the electronic device can shoot video recordings with effects such as automatic zoom or lens shift.
在一种可能的实现方式中,该方法还包括:该电子设备在开始拍摄该第一视频内容后的第一时刻,检测到第七操作。响应于该第七操作,该电子设备将该第一部分保存为图片。这样,电子设备可以在具有自动变焦或镜头平移等效果的预览过程中,保存一张预览视频画面为图片。In a possible implementation manner, the method further includes: detecting, by the electronic device, a seventh operation at a first moment after starting to capture the first video content. In response to the seventh operation, the electronic device saves the first part as a picture. In this way, the electronic device can save a preview video image as a picture during a preview process with effects such as automatic zooming or lens panning.
在一种可能的实现方式中,该第二拍摄预览界面还包括第一窗口。该电子设备在该第一窗口中显示该电子设备的摄像头实时采集得到的画面。在开始拍摄该第一视频内容后的第一时刻,该电子设备在该第一窗口中显示该第一部分的边界框。在开始拍摄该第一视频内容后的第二时刻,该电子设备在该第一窗口中显示该第二部分的边界框。这样,可以方便用户看到摄像头实时采集得到的画面,方便用户找到拍摄的主体。In a possible implementation manner, the second shooting preview interface further includes a first window. The electronic device displays, in the first window, a picture captured in real time by a camera of the electronic device. At a first moment after starting to capture the first video content, the electronic device displays the bounding box of the first portion in the first window. At a second moment after starting to capture the first video content, the electronic device displays the bounding box of the second portion in the first window. In this way, it is convenient for the user to see the picture captured by the camera in real time, and it is convenient for the user to find the subject to be photographed.
在一种可能的实现方式中,该第二拍摄预览界面还包括第一窗口。在开始拍摄该第一视频内容后的第一时刻,该电子设备在该第一窗口中显示该第一拍摄选项对应的视频样片中在第一时刻时的视频画面。在开始拍摄该第一视频内容后的第二时刻,该电子设备在该第一窗口中显示该第一拍摄选项对应的视频样片中在第二时刻时的视频画面。这样,可以方便用户实时对比和视频样片中的拍摄效果。In a possible implementation manner, the second shooting preview interface further includes a first window. At a first moment after starting to shoot the first video content, the electronic device displays, in the first window, a video frame at the first moment in the video sample corresponding to the first shooting option. At a second moment after starting to shoot the first video content, the electronic device displays a video image at the second moment in the video sample corresponding to the first shooting option in the first window. In this way, it is convenient for users to compare the shooting effects in real-time with the video samples.
在本申请的实现方式中,该第一窗口和该第二预览框的显示位置为以下任意一种:该第一窗口的至少部分区域和该第二预览框的显示区域重叠;或者,该第一窗口显示在该第二拍摄预览界面中该第二预览框之外的位置;或者,该第一窗口显示在该第二预览框的右上角区域;或者,该第一窗口显示在该第二预览框的左上角区域。In the implementation of the present application, the display position of the first window and the second preview frame is any one of the following: at least a partial area of the first window overlaps with the display area of the second preview frame; or, the first window A window is displayed outside the second preview frame in the second shooting preview interface; alternatively, the first window is displayed in the upper right corner of the second preview frame; alternatively, the first window is displayed in the second preview frame The upper left area of the preview box.
在一种可能的实现方式中,该第一窗口中包括有窗口关闭控件;该电子设备检测到针对该第一窗口中该窗口关闭控件的第八操作;响应于该第八操作,该电子设备关闭显示该第一窗口。这样,可以在用户无需第一窗口时,可以让用户手动触发关闭,保证电子设备上显示 的拍摄画面不被遮挡。In a possible implementation manner, the first window includes a window closing control; the electronic device detects an eighth operation for the window closing control in the first window; in response to the eighth operation, the electronic device Close the display of this first window. In this way, when the user does not need the first window, the user can be manually triggered to close, so as to ensure that the shooting picture displayed on the electronic device is not blocked.
在一种可能的实现方式中,在该电子设备关闭显示该第一窗口后,该电子设备在该第二拍摄预览界面中显示窗口开启控件;该电子设备检测到针对该窗口开启控件的第九操作;响应于该第九操作,该电子设备在该第二拍摄预览界面上显示该第一窗口。这样,可以在用户需要调取小窗口时,由用户触发电子设备重新显示该第一窗口。In a possible implementation manner, after the electronic device closes and displays the first window, the electronic device displays a window opening control in the second shooting preview interface; the electronic device detects the ninth window opening control for the window opening control. operation; in response to the ninth operation, the electronic device displays the first window on the second shooting preview interface. In this way, when the user needs to call the small window, the user can trigger the electronic device to redisplay the first window.
在一种可能的实现方式中,该第二拍摄预览界面还包括有运镜模式关闭控件。该电子设备检测到作用于该运镜模式关闭控件的第十操作。响应于该第十操作,该电子设备显示该第一拍摄预览界面。这样,用户可以随时触发关闭该拍摄模式。In a possible implementation manner, the second shooting preview interface further includes a mirror movement mode closing control. The electronic device detects a tenth operation acting on the mirror motion mode off control. In response to the tenth operation, the electronic device displays the first shooting preview interface. In this way, the user can trigger to close the shooting mode at any time.
在一种可能的实现方式中,该第二拍摄预览界面还包括有第二窗口,该电子设备在该第二窗口中显示该第一拍摄选项对应的第一音乐片段的波形图。其中,在开始拍摄该第一视频内容后的第一时刻该波形图中的音频信息与在开始拍摄该第一视频内容后的第二时刻该波形图中的音频信息不同,该音频信息包括以下一种或多种:节奏信息、幅度信息和风格信息。In a possible implementation manner, the second shooting preview interface further includes a second window, and the electronic device displays the waveform diagram of the first music segment corresponding to the first shooting option in the second window. Wherein, the audio information in the waveform chart at the first moment after starting to shoot the first video content is different from the audio information in the waveform chart at the second moment after starting to shoot the first video content, and the audio information includes the following One or more of: tempo information, amplitude information, and style information.
其中,在该电子设备开始拍摄该第一视频内容之后,该电子设备可以播放该第一音乐片段。Wherein, after the electronic device starts to shoot the first video content, the electronic device can play the first music segment.
在一种可能的实现方式中,当该电子设备将该第一部分保存为视频文件中第一时刻的视频画面,将该第二部分保存为该视频文件中第二时刻的视频画面时,该电子设备将该第一音乐片段保存在该视频文件的音频数据中。In a possible implementation manner, when the electronic device saves the first part as a video picture at the first moment in the video file, and saves the second part as a video picture at the second moment in the video file, the electronic The device saves the first piece of music in the audio data of the video file.
在一种可能的实现方式中,该电子设备在显示该电子设备的摄像头实时采集得到的画面之前,对该电子设备的摄像头实时采集得到的画面进行稳像处理,该稳像处理包括以下一种或多种:电子稳像EIS处理、光学稳像处理、机械稳像处理。这样,可以使得拍摄画面平滑过度。In a possible implementation manner, the electronic device performs image stabilization processing on the image captured in real time by the camera of the electronic device before displaying the image captured in real time by the camera of the electronic device, and the image stabilization processing includes one of the following: Or more: electronic image stabilization EIS processing, optical image stabilization processing, mechanical image stabilization processing. In this way, the shooting picture can be made smooth and excessive.
在一种可能的实现方式中,在该电子设备在该第二预览框中显示该电子设备的摄像头实时采集得到的画面的第一部分之前,该电子设备对该第一部分进行图像超分辨率重建。在该电子设备在该第二预览框中显示该电子设备的摄像头实时采集得到的画面的第二部分之前,该电子设备对该第二部分进行图像超分辨率重建。在该电子设备在该第三预览框中显示该电子设备的摄像头实时采集得到的画面的第三部分之前,该电子设备对该第三部分进行图像超分辨率重建。在该电子设备在该第三预览框中显示该电子设备的摄像头实时采集得到的画面的第四部分之前,该电子设备对该第四部分进行图像超分辨率重建。这样,可以使得拍摄画面更加清晰。In a possible implementation manner, before the electronic device displays in the second preview frame the first part of the picture captured by the camera of the electronic device in real time, the electronic device performs image super-resolution reconstruction on the first part. Before the electronic device displays the second part of the picture captured in real time by the camera of the electronic device in the second preview frame, the electronic device performs image super-resolution reconstruction on the second part. Before the electronic device displays the third part of the picture captured by the camera of the electronic device in real time in the third preview frame, the electronic device performs image super-resolution reconstruction on the third part. Before the electronic device displays the fourth part of the picture captured by the camera of the electronic device in real time in the third preview frame, the electronic device performs image super-resolution reconstruction on the fourth part. In this way, the shooting picture can be made clearer.
在一种可能的实现方式中,该电子设备的摄像头包括广角摄像头和非广角摄像头。该第一预览框显示该非广角摄像头实时采集得到的画面。该第二预览框显示该广角摄像头实时采集得到的画面。该第三预览框显示该广角摄像头实时采集得到的画面。这样,可以使得拍摄的画面具有更大的视角。In a possible implementation manner, the camera of the electronic device includes a wide-angle camera and a non-wide-angle camera. The first preview frame displays the image captured by the non-wide-angle camera in real time. The second preview frame displays the picture captured by the wide-angle camera in real time. The third preview frame displays the image captured by the wide-angle camera in real time. In this way, the captured picture can have a larger viewing angle.
第二方面,本申请提供了一种电子设备,包括:处理器、摄像头和触控屏。其中,触控屏,可用于显示第一拍摄预览界面,该第一拍摄预览界面包括第一预览框,该第一预览框显示摄像头实时采集得到的画面。处理器,还用于检测到对第一拍摄预览界面的第一操作后,指示触控屏显示拍摄选项界面,该拍摄选项界面包括第一拍摄选项和第二拍摄选项。处理器,还用于检测到针对该第一拍摄选项的第二操作后,指示触控屏显示第二拍摄预览界面,该第二拍摄预览界面包括第二预览框,该第二预览框显示该电子设备的摄像头实时采集得到的画面。该处理器,还用于指示摄像头开始拍摄第一视频内容。处理器,还用于在开始拍摄该第一视频内容后的第一时刻,指示触控屏在该第二预览框中显示该摄像头实时采集得到的画面的第一部分。该处理器,还用于在开始拍摄该第一视频内容后的第二时刻,指示触控屏在该第二预览框中显示摄像头实时采集得到的画面的第二部分。触控屏,还用于显示该拍摄选项界面。处理器,还用于检测到针对该第二拍摄选项的第三操作后,指示触控屏显示第三拍摄预览界面,该第三拍摄预览界面包括第三预览框,该第三预览框显示该电子设备的摄像头实时采集得到的画面。处理器,还用于指示摄像头开始拍摄第二视频内容。处理器,还用于在开始拍摄该第二视频内容后的第一时刻,指示触控屏在该第三预览框中显示摄像头实时采集得到的画面的第三部分。处理器,还用于在开始拍摄该第二视频内容后的第二时刻,指示触控屏在该第三预览框中显示摄像头实时采集得到的画面的第四部分,其中,该第一部分、该第二部分、该第三部分和该第四部分均不同。In a second aspect, the present application provides an electronic device, including: a processor, a camera, and a touch screen. The touch screen may be used to display a first shooting preview interface, where the first shooting preview interface includes a first preview frame, and the first preview frame displays a picture captured by the camera in real time. The processor is further configured to instruct the touch screen to display a shooting option interface after detecting a first operation on the first shooting preview interface, where the shooting option interface includes a first shooting option and a second shooting option. The processor is further configured to instruct the touch screen to display a second shooting preview interface after detecting a second operation for the first shooting option, the second shooting preview interface includes a second preview frame, and the second preview frame displays the The picture captured by the camera of the electronic device in real time. The processor is further configured to instruct the camera to start shooting the first video content. The processor is further configured to instruct the touch screen to display the first part of the picture captured by the camera in real time in the second preview frame at a first moment after starting to shoot the first video content. The processor is further configured to instruct the touch screen to display the second part of the picture captured by the camera in real time in the second preview frame at a second moment after starting to shoot the first video content. The touch screen is also used to display the shooting option interface. The processor is further configured to instruct the touch screen to display a third shooting preview interface after detecting a third operation for the second shooting option, the third shooting preview interface includes a third preview frame, and the third preview frame displays the The picture captured by the camera of the electronic device in real time. The processor is further configured to instruct the camera to start shooting the second video content. The processor is further configured to instruct the touch screen to display the third part of the picture captured by the camera in real time in the third preview frame at the first moment after starting to shoot the second video content. The processor is further configured to instruct the touch screen to display the fourth part of the picture captured by the camera in real time in the third preview frame at a second moment after starting to shoot the second video content, wherein the first part, the The second part, the third part and the fourth part are all different.
本申请提供了一种图像处理方法,电子设备可以在拍照或录像过程中,通过预设大小以及预设运动轨迹的裁剪框对摄像头采集到的图像进行裁剪,并将裁剪框中的图像显示在预览界面或录像界面中。这样,可以使得拍摄出来的视频或图片具有自动变焦的效果,凸显出拍摄主体的细节特征。The present application provides an image processing method, in which an electronic device can use a cropping frame with a preset size and a preset motion trajectory to crop an image captured by a camera during a photo-taking or video-recording process, and display the image in the cropping frame on the in the preview interface or the recording interface. In this way, the shot video or picture can have the effect of automatic zooming, and the detailed characteristics of the shooting subject can be highlighted.
在一种可能的实现方式中,在处理器指示摄像头开始拍摄第一视频内容之前,处理器,还用于检测到针对第二拍摄预览界面的第四操作。处理器,具体用于响应于该第四操作,指示摄像头开始拍摄第一视频内容。In a possible implementation manner, before the processor instructs the camera to start shooting the first video content, the processor is further configured to detect a fourth operation on the second shooting preview interface. The processor is specifically configured to instruct the camera to start shooting the first video content in response to the fourth operation.
在一种可能的实现方式中,该第二拍摄预览界面还包括选项切换控件。在处理器指示触控屏在该第二预览框中显示该电子设备的摄像头实时采集得到的画面的第二部分之后,处理器,还用于检测到针对该选项切换控件的第五操作。处理器,具体用于响应于该第五操作,显示该拍摄选项界面。这样,可以在已选中一个拍摄选项后,为用户提供更换拍摄选项的入口,方便用户更换拍摄选项拍摄视频内容。In a possible implementation manner, the second shooting preview interface further includes an option switching control. After the processor instructs the touch screen to display the second part of the picture captured by the camera of the electronic device in real time in the second preview frame, the processor is further configured to detect a fifth operation for the option switching control. The processor is specifically configured to display the shooting option interface in response to the fifth operation. In this way, after a shooting option has been selected, the user can be provided with an entry for changing the shooting option, so that the user can change the shooting option to shoot video content.
在一种可能的实现方式中,在处理器指示触控屏在该第二预览框中显示摄像头实时采集得到的画面的第二部分之后,处理器,还用于检测到针对该第二拍摄预览界面的第六操作。处理器,还用于响应于该第六操作,将该第一部分保存为视频文件中第一时刻的视频画面,将该第二部分保存为该视频文件中第二时刻的视频画面。这样,电子设备可以拍摄出具有自动变焦或镜头平移等效果的录像视频。In a possible implementation manner, after the processor instructs the touch screen to display the second part of the picture captured by the camera in real time in the second preview frame, the processor is further configured to detect that the preview for the second shooting is The sixth operation of the interface. The processor is further configured to, in response to the sixth operation, save the first part as a video picture at a first moment in the video file, and save the second part as a video picture at a second moment in the video file. In this way, the electronic device can shoot video recordings with effects such as automatic zoom or lens shift.
在一种可能的实现方式中,处理器,还用于在开始拍摄该第一视频内容后的第一时刻,检测到第七操作。处理器,还用于响应于该第七操作,将该第一部分保存为图片。这样,电子设备可以在具有自动变焦或镜头平移等效果的预览过程中,保存一张预览视频画面为图片。In a possible implementation manner, the processor is further configured to detect the seventh operation at a first moment after starting to shoot the first video content. The processor is further configured to save the first part as a picture in response to the seventh operation. In this way, the electronic device can save a preview video image as a picture during a preview process with effects such as automatic zooming or lens panning.
在一种可能的实现方式中,该第二拍摄预览界面还包括第一窗口。触控屏,还用于在第一窗口中显示该电子设备的摄像头实时采集得到的画面。处理器,还用于在开始拍摄该第一视频内容后的第一时刻,指示触控屏在该第一窗口中显示该第一部分的边界框。处理器,还用于在开始拍摄该第一视频内容后的第二时刻,指示触控屏在该第一窗口中显示该第二部分的边界框。这样,可以方便用户看到摄像头实时采集得到的画面,方便用户找到拍摄的主体。In a possible implementation manner, the second shooting preview interface further includes a first window. The touch screen is also used for displaying the picture captured in real time by the camera of the electronic device in the first window. The processor is further configured to instruct the touch screen to display the bounding box of the first part in the first window at a first moment after starting to shoot the first video content. The processor is further configured to instruct the touch screen to display the bounding box of the second part in the first window at a second moment after starting to shoot the first video content. In this way, it is convenient for the user to see the picture captured by the camera in real time, and it is convenient for the user to find the subject to be photographed.
在一种可能的实现方式中,该第二拍摄预览界面还包括第一窗口。处理器,还用于在开始拍摄该第一视频内容后的第一时刻,指示触控屏在该第一窗口中显示该第一拍摄选项对应的视频样片中在第一时刻时的视频画面。处理器,还用于在开始拍摄该第一视频内容后的第二时刻,指示触控屏在该第一窗口中显示该第一拍摄选项对应的视频样片中在第二时刻时的视频画面。这样,可以方便用户实时对比和视频样片中的拍摄效果。In a possible implementation manner, the second shooting preview interface further includes a first window. The processor is further configured to instruct the touch screen to display the video image at the first moment in the video sample corresponding to the first shooting option in the first window at the first moment after the first video content is started to be captured. The processor is further configured to instruct the touch screen to display, in the first window, a video image at the second moment in the video sample corresponding to the first shooting option at a second moment after the first video content is started to be captured. In this way, it is convenient for users to compare the shooting effects in real-time with the video samples.
在本申请的实现方式中,该第一窗口和该第二预览框的显示位置为以下任意一种:该第一窗口的至少部分区域和该第二预览框的显示区域重叠;或者,该第一窗口显示在该第二拍摄预览界面中该第二预览框之外的位置;或者,该第一窗口显示在该第二预览框的右上角区域;或者,该第一窗口显示在该第二预览框的左上角区域。In the implementation of the present application, the display position of the first window and the second preview frame is any one of the following: at least a partial area of the first window overlaps with the display area of the second preview frame; or, the first window A window is displayed outside the second preview frame in the second shooting preview interface; alternatively, the first window is displayed in the upper right corner of the second preview frame; alternatively, the first window is displayed in the second preview frame The upper left area of the preview box.
在一种可能的实现方式中,该第一窗口中包括有窗口关闭控件;处理器,还用于检测到针对该第一窗口中该窗口关闭控件的第八操作。处理器,还用于响应于该第八操作,关闭显示该第一窗口。这样,可以在用户无需第一窗口时,可以让用户手动触发关闭,保证电子设备上显示的拍摄画面不被遮挡。In a possible implementation manner, the first window includes a window closing control; the processor is further configured to detect an eighth operation for the window closing control in the first window. The processor is further configured to close and display the first window in response to the eighth operation. In this way, when the user does not need the first window, the user can be manually triggered to close, so as to ensure that the shooting picture displayed on the electronic device is not blocked.
在一种可能的实现方式中,在该电子设备关闭显示该第一窗口后。触控屏,还用于在该第二拍摄预览界面中显示窗口开启控件。处理器,还用于检测到针对该窗口开启控件的第九操作。处理器,还用于响应于该第九操作,指示触控屏在该第二拍摄预览界面上显示该第一窗口。这样,可以在用户需要调取小窗口时,由用户触发电子设备重新显示该第一窗口。In a possible implementation manner, after the electronic device closes and displays the first window. The touch screen is further used for displaying a window opening control in the second shooting preview interface. The processor is further configured to detect the ninth operation of opening the control for the window. The processor is further configured to instruct the touch screen to display the first window on the second shooting preview interface in response to the ninth operation. In this way, when the user needs to call the small window, the user can trigger the electronic device to redisplay the first window.
在一种可能的实现方式中,该第二拍摄预览界面还包括有运镜模式关闭控件。处理器,还用于检测到作用于该运镜模式关闭控件的第十操作。处理器,还用于响应于该第十操作,指示触控屏显示该第一拍摄预览界面。这样,用户可以随时触发关闭该拍摄模式。In a possible implementation manner, the second shooting preview interface further includes a mirror movement mode closing control. The processor is further configured to detect a tenth operation acting on the mirror movement mode closing control. The processor is further configured to instruct the touch screen to display the first shooting preview interface in response to the tenth operation. In this way, the user can trigger to close the shooting mode at any time.
在一种可能的实现方式中,该第二拍摄预览界面还包括有第二窗口。触控屏,还用于在该第二窗口中显示该第一拍摄选项对应的第一音乐片段的波形图。其中,在开始拍摄该第一视频内容后的第一时刻该波形图中的音频信息与在开始拍摄该第一视频内容后的第二时刻该波形图中的音频信息不同,该音频信息包括以下一种或多种:节奏信息、幅度信息和风格信息。这样,可以使得视频画面能够跟随音乐的节奏自动变焦,增强了了拍摄画面的视觉效果。In a possible implementation manner, the second shooting preview interface further includes a second window. The touch screen is further configured to display the waveform diagram of the first music segment corresponding to the first shooting option in the second window. Wherein, the audio information in the waveform chart at the first moment after starting to shoot the first video content is different from the audio information in the waveform chart at the second moment after starting to shoot the first video content, and the audio information includes the following One or more of: tempo information, amplitude information, and style information. In this way, the video picture can be automatically zoomed following the rhythm of the music, which enhances the visual effect of the shooting picture.
其中,该电子设备还可以包括扬声器。处理器,还用于在开始拍摄该第一视频内容之后,指示扬声器播放该第一音乐片段。Wherein, the electronic device may further include a speaker. The processor is further configured to instruct the speaker to play the first music segment after starting to shoot the first video content.
在一种可能的实现方式中,当该处理器将该第一部分保存为视频文件中第一时刻的视频画面,将该第二部分保存为该视频文件中第二时刻的视频画面时,处理器,还用于将该第一 音乐片段保存在该视频文件的音频数据中。In a possible implementation manner, when the processor saves the first part as a video picture at the first moment in the video file, and saves the second part as a video picture at the second moment in the video file, the processor , and is also used to save the first music segment in the audio data of the video file.
在一种可能的实现方式中,该处理器,还用于在显示摄像头实时采集得到的画面之前,对摄像头实时采集得到的画面进行稳像处理,该稳像处理包括以下一种或多种:电子稳像EIS处理、光学稳像处理、机械稳像处理。这样,可以使得拍摄画面平滑过度。In a possible implementation manner, the processor is further configured to perform image stabilization processing on the images captured in real time by the camera before displaying the images captured in real time by the camera, and the image stabilization processing includes one or more of the following: Electronic image stabilization EIS processing, optical image stabilization processing, mechanical image stabilization processing. In this way, the shooting picture can be made smooth and excessive.
在一种可能的实现方式中,处理器,还用于在触控屏在该第二预览框中显示摄像头实时采集得到的画面的第一部分之前,对该第一部分进行图像超分辨率重建。处理器,还用于在触控屏在该第二预览框中显示摄像头实时采集得到的画面的第二部分之前,对该第二部分进行图像超分辨率重建。处理器,还用于在触控屏在该第三预览框中显示摄像头实时采集得到的画面的第三部分之前,对第三部分进行图像超分辨率重建。处理器,还用于在触控屏在该第三预览框中显示摄像头实时采集得到的画面的第四部分之前,对该第四部分进行图像超分辨率重建。这样,可以使得拍摄画面更加清晰。In a possible implementation manner, the processor is further configured to perform image super-resolution reconstruction on the first part before the touch screen displays the first part of the picture acquired by the camera in real time in the second preview frame. The processor is further configured to perform image super-resolution reconstruction on the second part before the touch screen displays the second part of the picture acquired by the camera in real time in the second preview frame. The processor is further configured to perform image super-resolution reconstruction on the third part before the touch screen displays the third part of the picture acquired by the camera in real time in the third preview frame. The processor is further configured to perform image super-resolution reconstruction on the fourth part before the touch screen displays the fourth part of the picture acquired by the camera in real time in the third preview frame. In this way, the shooting picture can be made clearer.
在一种可能的实现方式中,该电子设备的摄像头包括广角摄像头和非广角摄像头。In a possible implementation manner, the camera of the electronic device includes a wide-angle camera and a non-wide-angle camera.
该第一预览框显示该非广角摄像头实时采集得到的画面。该第二预览框显示该广角摄像头实时采集得到的画面。该第三预览框显示该广角摄像头实时采集得到的画面。这样,可以使得拍摄的画面具有更大的视角。The first preview frame displays the image captured by the non-wide-angle camera in real time. The second preview frame displays the picture captured by the wide-angle camera in real time. The third preview frame displays the image captured by the wide-angle camera in real time. In this way, the captured picture can have a larger viewing angle.
第三方面,本申请提供了一种电子设备,包括触控屏、摄像头、一个或多个处理器和一个或多个存储器。该一个或多个处理器与触控屏、摄像头、以及一个或多个存储器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述任一方面任一项可能的实现方式中的图像处理方法。In a third aspect, the present application provides an electronic device including a touch screen, a camera, one or more processors and one or more memories. The one or more processors are coupled to the touch screen, the camera, and one or more memories for storing computer program code, the computer program code including computer instructions, when the one or more processors execute the computer When the instruction is given, the electronic device is caused to execute the image processing method in any possible implementation manner of any one of the foregoing aspects.
第四方面,本申请提供了一种电子设备,包括:一个或多个功能模块。一个或多个功能模块用于执行上述任一方面任一项可能的实现方式中的图像处理方法。In a fourth aspect, the present application provides an electronic device, including: one or more functional modules. One or more functional modules are used to execute the image processing method in any possible implementation manner of any of the above aspects.
第五方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得通信装置执行上述任一方面任一项可能的实现方式中的图像处理方法。In a fifth aspect, an embodiment of the present application provides a computer storage medium, including computer instructions, which, when the computer instructions are run on an electronic device, cause the communication apparatus to execute the image processing method in any of the possible implementations of any of the above aspects .
第六方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述任一方面任一项可能的实现方式中的图像处理方法。In a sixth aspect, an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, enables the computer to execute the image processing method in any of the possible implementations of any of the foregoing aspects.
附图说明Description of drawings
图1为本申请实施例提供的一种电子设备的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
图2为本申请实施例提供的一种电子设备的软件结构示意图;2 is a schematic diagram of a software structure of an electronic device provided by an embodiment of the present application;
图3A-图3Q为本申请实施例提供的一组界面示意图;3A-3Q are schematic diagrams of a group of interfaces provided by the embodiments of the present application;
图4A-图4F为本申请另一实施例提供的一组界面示意图;4A-4F are schematic diagrams of a group of interfaces provided by another embodiment of the present application;
图5A-图5E为本申请另一实施例提供的一组界面示意图;5A-5E are schematic diagrams of a group of interfaces provided by another embodiment of the present application;
图6A-图6H为本申请另一实施例提供的一组界面示意图;6A-6H are schematic diagrams of a set of interfaces provided by another embodiment of the present application;
图7A-图7C为本申请实施例提供的裁剪框的在原始图像上的位置变化示意图;7A-7C are schematic diagrams of position changes of the cropping frame on the original image provided by the embodiments of the present application;
图7D-图7F为本申请实施例提供的一组利用裁剪框对原始图像的裁剪效果示意图;7D-FIG. 7F are schematic diagrams of a group of cropping effects of an original image by using a cropping frame according to an embodiment of the present application;
图8A-图8C为本申请另一实施例提供的裁剪框的在原始图像上的位置变化示意图;8A-8C are schematic diagrams of position changes of a cropping frame on an original image provided by another embodiment of the present application;
图8D-图8G为本申请实施例提供的一组利用裁剪框对原始图像的裁剪效果示意图;FIG. 8D-FIG. 8G are schematic diagrams of a group of cropping effects of an original image by using a cropping frame according to an embodiment of the present application;
图9A-图9F为本申请实施例提供的裁剪框的在原始图像上的位置变化示意图;9A-9F are schematic diagrams of position changes of the cropping frame on the original image provided by the embodiments of the present application;
图9G-图9K为本申请另一实施例提供的一组界面示意图;9G-9K are schematic diagrams of a group of interfaces provided by another embodiment of the present application;
图10A-图10K为本申请另一实施例提供的一组界面示意图;10A-10K are schematic diagrams of a group of interfaces provided by another embodiment of the present application;
图11A-图11E为本申请另一实施例提供的一组界面示意图;11A-11E are schematic diagrams of a set of interfaces provided by another embodiment of the present application;
图12A-图12D为本申请另一实施例提供的一组界面示意图;12A-12D are schematic diagrams of a group of interfaces provided by another embodiment of the present application;
图13A-图13E为本申请另一实施例提供的一组界面示意图;13A-13E are schematic diagrams of a group of interfaces provided by another embodiment of the present application;
图14A-图14E为本申请另一实施例提供的一组界面示意图;14A-14E are schematic diagrams of a group of interfaces provided by another embodiment of the present application;
图15A-图15E为本申请另一实施例提供的一组界面示意图;15A-15E are schematic diagrams of a set of interfaces provided by another embodiment of the present application;
图16为本申请实施例提供的声音信号和节奏信号的波形对比示意图;16 is a schematic diagram of waveform comparison of a sound signal and a rhythm signal provided by an embodiment of the application;
图17A-图17J为本申请另一实施例提供的一组界面示意图;17A-17J are schematic diagrams of a set of interfaces provided by another embodiment of the present application;
图18为本申请实施例提供的一种视频流裁剪系统的模块架构示意图;18 is a schematic diagram of a module architecture of a video stream cropping system provided by an embodiment of the present application;
图19为本申请实施例提供的一种视频流裁剪系统的硬件架构示意图;19 is a schematic diagram of the hardware architecture of a video stream cropping system provided by an embodiment of the application;
图20为本申请实施例提供的一种图像处理方法的流程示意图。FIG. 20 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图对本申请实施例中的技术方案进行清除、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be cleared and described in detail below with reference to the accompanying drawings. Wherein, in the description of the embodiments of the present application, unless otherwise specified, “/” means or, for example, A/B can mean A or B; “and/or” in the text is only a description of an associated object The association relationship indicates that there can be three kinds of relationships, for example, A and/or B can indicate that A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of this application , "plurality" means two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as implying or implying relative importance or implying the number of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, the "multiple" The meaning is two or more.
图1示出了电子设备100的结构示意图。FIG. 1 shows a schematic structural diagram of an electronic device 100 .
下面以电子设备100为例对实施例进行具体说明。应该理解的是,图1所示电子设备100仅是一个范例,并且电子设备100可以具有比图1中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。The embodiment will be described in detail below by taking the electronic device 100 as an example. It should be understood that the electronic device 100 shown in FIG. 1 is only an example, and the electronic device 100 may have more or fewer components than those shown in FIG. 1 , two or more components may be combined, or Different component configurations are possible. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
电子设备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,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an 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, buttons 190, motor 191, indicator 192, camera 193, display screen 194, And a subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structures illustrated in the embodiments of the present invention do 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 less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented 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 processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器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 cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器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, the 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 transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, 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总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as 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, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled with 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 a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals. 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 may 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 typically used to connect the processor 110 with 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 implement 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 interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to implement 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 may 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 the like. The GPIO interface can also be configured as 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 that conforms to the USB standard specification, and may specifically 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 to play audio through the headphones. The 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 illustrated 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为电子设备供电。The charging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。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 input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号 调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,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 (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). 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 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,电子设备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 with the mobile communication module 150, and the antenna 2 is coupled with 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 (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), 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 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is 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 alter 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),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. 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), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element 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 tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided 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的正整数。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto 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 optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it 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 formats of 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.
其中,在本申请的一些实施例中,摄像头193可以包括多个摄像头。这多个摄像头可以包括广角摄像头和非广角摄像头。在一种可能的实现方式中,在电子设备100开启下述实施例中的运镜模式时,电子设备100可以使用广角摄像头获取到该视频流。这样,电子设备100可以获取到更广视角的视频画面。Wherein, in some embodiments of the present application, the camera 193 may include multiple cameras. The plurality of cameras may include wide-angle cameras and non-wide-angle cameras. In a possible implementation manner, when the electronic device 100 enables the mirror motion mode in the following embodiment, the electronic device 100 can obtain the video stream by using a wide-angle camera. In this way, the electronic device 100 can obtain a video picture with a wider viewing angle.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(movingpicture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。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 record 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的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information, and can 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, speech recognition, text understanding, and the like.
在一些实施例中,电子设备100需要识别出拍摄画面中的图像内容,并检测跟踪指定图像内容的位置,以及确定出指定图像内容的轮廓。应用处理器可以将预处理后的RGB图(或者BGR图或单通道图或灰度图等等)送入NPU中。NPU可以通过AI模型,检测跟踪RGB图(或者BGR图或单通道图或灰度图等等)中指定图像内容的位置,并确定出指定图像内容的轮廓。NPU可以将指定图像内容的检测框信息或轮廓信息输出给应用处理器。应用处理器可以根据指定图像的检测框信息/或轮廓信息,确定出裁剪框信息。应用处理器可以基于裁剪框信息对视频流进行裁剪,或者,应用处理器可以基于裁剪框信息指示ISP对视频流进行裁剪。In some embodiments, the electronic device 100 needs to identify the image content in the shooting picture, detect and track the position of the designated image content, and determine the outline of the designated image content. The application processor can send the preprocessed RGB image (or BGR image or single-channel image or grayscale image, etc.) to the NPU. The NPU can detect and track the position of the specified image content in the RGB image (or BGR image or single-channel image or grayscale image, etc.) through the AI model, and determine the outline of the specified image content. The NPU can output the detection frame information or outline information of the specified image content to the application processor. The application processor may determine the cropping frame information according to the detection frame information/or outline information of the specified image. The application processor may crop the video stream based on the cropping frame information, or the application processor may instruct the ISP to crop the video stream based on the cropping frame information.
外部存储器接口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, 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 realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 . The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110 中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound near the microphone 170C through the human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association ofthe USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of 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 the 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. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by 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, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光 二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light to the outside through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L 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 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation 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 touch operations may be provided through 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 location where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations 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.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡 等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present invention takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 as an example.
图2是本申请实施例的电子设备100的软件结构框图。FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 2, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100 . For example, the management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
AndroidRuntime包括核心库和虚拟机。Androidruntime负责安卓系统的调度和管理。AndroidRuntime includes core libraries and virtual machines. Androidruntime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media  Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。In the following, the workflow of the software and hardware of the electronic device 100 is exemplarily described in conjunction with the capturing and photographing scene.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes touch operations into raw input events (including touch coordinates, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer. The application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon, for example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer. The camera 193 captures still images or video.
本申请提供了一种图像处理方法,电子设备100可以在拍照或录像过程中,通过预设大小以及预设运动轨迹的裁剪框对摄像头采集到的图像进行裁剪,并将裁剪框中的图像显示在预览界面或录像界面中。这样,可以使得拍摄出来的视频或图片具有自动变焦的效果,凸显出拍摄主体的细节特征。The present application provides an image processing method, in which the electronic device 100 can use a cropping frame with a preset size and a preset motion trajectory to crop an image captured by a camera during a photographing or video recording process, and display the image in the cropping frame. In the preview interface or recording interface. In this way, the shot video or picture can have the effect of automatic zooming, and the detailed characteristics of the shooting subject can be highlighted.
下面结合应用场景,介绍本申请实施例涉及的一种图像处理方法。The following describes an image processing method involved in an embodiment of the present application in combination with an application scenario.
在一些应用场景中,电子设备100可以在录像之前,接收用户选择的运镜模板。该运镜模板可以包括裁剪框的尺寸变化规则和该裁剪框在摄像头获取的原始图像上的运动轨迹。当电子设备100开始录像后,电子设备100可以通过该运镜模板中定义的裁剪框对摄像头采集到的每一帧原始图像进行裁剪,并将裁剪后的图像按照帧顺序,显示在录像界面中。这样,可以使得电子设备100拍摄出来的视频具有自动变焦的效果,增加了视频的观赏性。In some application scenarios, the electronic device 100 may receive a camera movement template selected by the user before recording. The lens motion template may include a size change rule of the cropping frame and a motion track of the cropping frame on the original image acquired by the camera. After the electronic device 100 starts recording, the electronic device 100 can use the cropping frame defined in the lens motion template to crop each frame of the original image captured by the camera, and display the cropped image on the video recording interface in frame order. . In this way, the video shot by the electronic device 100 can have the effect of automatic zooming, which increases the viewing quality of the video.
示例性的,如图3A所示,电子设备100可以显示有主屏幕的界面310,该界面310中显示了一个放置有应用图标的页面,该页面包括多个应用图标(例如,天气应用图标、股票应用图标、计算器应用图标、设置应用图标、邮件应用图标、图库应用图标312、音乐应用图标、视频应用图标、浏览器应用图标等等)。多个应用图标下方还显示包括有页面指示符,以表明当前显示的页面与其他页面的位置关系。页面指示符的下方有多个托盘图标(例如拨号应用图标、信息应用图标、联系人应用图标、相机应用图标311),托盘图标在页面切换时保持显示。在一些实施例中,上述页面也可以包括多个应用图标和页面指示符,页面指示符可以不是页面的一部分,单独存在,上述图片图标也是可选的,本申请实施例对此不作限制。Exemplarily, as shown in FIG. 3A , the electronic device 100 may display an interface 310 with a home screen, the interface 310 displays a page on which application icons are placed, and the page includes a plurality of application icons (eg, weather application icons, stock application icon, calculator application icon, settings application icon, mail application icon, gallery application icon 312, music application icon, video application icon, browser application icon, etc.). A page indicator is also displayed below the multiple application icons to indicate the positional relationship between the currently displayed page and other pages. Below the page indicator are a plurality of tray icons (eg, a dialing application icon, an information application icon, a contact application icon, and a camera application icon 311 ), and the tray icons remain displayed when the page is switched. In some embodiments, the above-mentioned page may also include multiple application icons and page indicators. The page indicator may not be a part of the page, but exists alone. The above-mentioned picture icon is also optional, which is not limited in this embodiment of the present application.
电子设备100可以接收用户作用于相机应用图标311的输入操作(例如单击),响应于该输入操作,电子设备100可以显示如图3B所示的拍摄界面320。The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the camera application icon 311, and in response to the input operation, the electronic device 100 may display the photographing interface 320 as shown in FIG. 3B .
如图3B所示,该拍摄界面320可以包括有回显控件321、拍摄控件322、摄像头转换控件323、摄像头捕捉的画面324、设置控件325、变焦倍率控件326、一个或多个拍摄模式控件(例如,“夜景模式”控件327A、“人像模式”控件327B、“大光圈”控件327C、“普通拍 照模式”控件327D、“录像模式”控件327E、“专业模式”控件327F、更多模式控件327G)。其中,该回显控件321可用于显示已拍摄的图像。该拍摄控件322用于触发保存摄像头拍摄到的图像。该摄像头转换控件323可用于切换拍照的摄像头。该设置控件325可用于设置拍照功能。该变焦倍率控件326可用于设置摄像头的变焦倍数。其中,该变焦倍率控件326可以触发电子设备100显示变焦滑动条,该变焦滑动条可以接收用户的向上(或向下)滑动的操作,使得电子设备100增大(或减小)摄像头的变焦倍率。可能的,该变焦倍率控件326可以电子设备100显示变焦增大控件和变焦增小控件,变焦增大控件可用于接收并响应于用户的输入,触发电子设备100增大摄像头的变焦倍率;变焦减小控件可用于接收并响应于用户的输入,触发电子设备100减小摄像头的变焦倍率。该拍摄模式控件可用于触发开启该拍摄模式对应的图像处理流程。例如,“夜景模式”控件372A可用于触发增加拍摄图像中的亮度和色彩丰富度等。“人像模式”控件327B可用于触发对拍摄图像中人物背景的虚化。“大光圈”控件327C可用于触发电子设备100调用图像处理算法,突出拍摄主体,虚化模糊掉背景。如图3B所示,当前用户选择的拍摄模式为“普通拍照模式”。As shown in FIG. 3B, the shooting interface 320 may include an echo control 321, a shooting control 322, a camera conversion control 323, a picture captured by the camera 324, a setting control 325, a zoom ratio control 326, and one or more shooting mode controls ( For example, "Night Scene Mode" control 327A, "Portrait Mode" control 327B, "Large Aperture" control 327C, "Normal Photo Mode" control 327D, "Video Mode" control 327E, "Pro Mode" control 327F, More Mode Control 327G ). The echo control 321 can be used to display the captured image. The shooting control 322 is used to trigger saving of the image captured by the camera. The camera switching control 323 can be used to switch cameras for taking pictures. The setting control 325 can be used to set the camera function. The zoom ratio control 326 can be used to set the zoom ratio of the camera. Wherein, the zoom magnification control 326 can trigger the electronic device 100 to display a zoom slide bar, and the zoom slide bar can receive the user's upward (or downward) sliding operation, so that the electronic device 100 increases (or decreases) the zoom magnification of the camera . Possibly, the zoom magnification control 326 can display a zoom increase control and a zoom decrease control on the electronic device 100, and the zoom increase control can be used to receive and respond to the user's input to trigger the electronic device 100 to increase the zoom magnification of the camera; The widget can be used to receive and respond to the user's input to trigger the electronic device 100 to reduce the zoom ratio of the camera. The shooting mode control can be used to trigger the opening of the image processing flow corresponding to the shooting mode. For example, a "night scene mode" control 372A may be used to trigger an increase in brightness and color richness, etc. in a captured image. The "Portrait Mode" control 327B may be used to trigger blurring of the background of the person in the captured image. The “large aperture” control 327C can be used to trigger the electronic device 100 to invoke an image processing algorithm to highlight the subject and blur the background. As shown in FIG. 3B , the shooting mode currently selected by the user is the "normal shooting mode".
电子设备100可以接收用户作用于“更多”控件327G的输入操作(例如单击),响应于该输入操作,电子设备100可以显示如图3C所示的模式选择页面330。The electronic device 100 may receive a user input operation (eg, a click) on the "more" control 327G, and in response to the input operation, the electronic device 100 may display the mode selection page 330 as shown in FIG. 3C.
如图3C所示,该模式选择页面330包括有一个或多个模式控件(例如,“HDR模式”控件、“延时摄影模式”控件、“水印模式”控件、“慢动作模式”控件、“智能识物模式”控件、“文档矫正模式”控件、“全景模式”控件、“流光快门模式”控件、“3D动态模式”控件、“在线翻译模式”控件、“智能运镜模式”控件331等等)。As shown in FIG. 3C, the mode selection page 330 includes one or more mode controls (eg, "HDR Mode" control, "Time Lapse Mode" control, "Watermark Mode" control, "Slow Motion Mode" control, " "Intelligent Object Recognition Mode" control, "Document Correction Mode" control, "Panorama Mode" control, "Streamer Shutter Mode" control, "3D Dynamic Mode" control, "Online Translation Mode" control, "Intelligent Mirror Mode" control 331, etc. Wait).
可能的实现方式中,该模式选择页面330可以透明的显示在上述摄像头捕捉的画面324之上。In a possible implementation manner, the mode selection page 330 may be transparently displayed on the picture 324 captured by the above-mentioned camera.
电子设备100可以接收用户作用于“智能运镜模式”控件331的输入操作(例如单击),响应于该输入操作,电子设备100可以显示如图3D所示的运镜模板界面340。The electronic device 100 may receive an input operation (eg, single click) of the user acting on the "smart mirror movement mode" control 331, and in response to the input operation, the electronic device 100 may display the mirror movement template interface 340 as shown in FIG. 3D .
如图3D所示,该运镜模板选择界面340包括一个或多个运镜模板选项(例如,“旅行”运镜选项341A、“舒服”运镜选项341B、“动感”运镜选项341C等等)、选择框342、运镜模板展示区351、运镜轨迹展示区353、智能运镜提示框343、回显控件346、运镜拍摄控件345。该运镜模板展示区351上显示有运镜模板播放控件352。该智能运镜提示框343中有关闭控件344,该关闭控件344可用于触发电子设备100退出运镜模板选择界面340。其中,不同的运镜模板选项对应的裁剪框的尺寸变化规则或裁剪框运动轨迹不同。如图3D所示,选择框342已选中“旅行”运镜选项341A,运镜模板展示区351中显示有“旅行”运镜选项341A对应的视频样片。运镜轨迹展示区353中可以显示有“旅行”运镜选项341A对应的裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹。例如,“旅行”运镜选项341A对应裁剪框的中心点可以与原始图像的中心点同位置,“旅行”运镜选项341A对应裁剪框的尺寸可以随时间先从原始图像的尺寸成比例变小至预设最小尺寸,然后再从预设最小尺寸成比例变大至原始图像的尺寸。其中,“旅行”运镜选项341A对应裁剪框的尺寸按照原始图像的尺寸成比例变化。该预设最小尺寸小于原始图像的尺寸。As shown in Figure 3D, the motion template selection interface 340 includes one or more motion template options (eg, "travel" motion option 341A, "comfortable" motion option 341B, "kinetic" motion option 341C, etc. ), selection box 342 , mirror movement template display area 351 , mirror movement track display area 353 , intelligent mirror movement prompt box 343 , echo control 346 , and mirror movement shooting control 345 . A mirror movement template play control 352 is displayed on the mirror movement template display area 351 . There is a close control 344 in the smart mirror movement prompt box 343 , and the close control 344 can be used to trigger the electronic device 100 to exit the mirror movement template selection interface 340 . Wherein, the size change rules of the cropping frame or the motion trajectory of the cropping frame corresponding to different mirror motion template options are different. As shown in FIG. 3D , the “travel” camera movement option 341A has been selected in the selection box 342 , and the video sample corresponding to the “travel” camera movement option 341A is displayed in the camera movement template display area 351 . The camera movement track display area 353 may display the cropping frame size change rule corresponding to the "travel" camera movement option 341A and/or the movement track of the cropping frame in the original image. For example, the center point of the crop box corresponding to the "travel" motion option 341A may be at the same location as the center point of the original image, and the size of the crop box corresponding to the "travel" motion option 341A may first decrease proportionally from the size of the original image over time. to the preset minimum size, and then scale up from the preset minimum size to the size of the original image. The size of the cropping frame corresponding to the "travel" lens movement option 341A changes in proportion to the size of the original image. This preset minimum size is smaller than the size of the original image.
其中,不同运镜模板对应的裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹,后续实施例有详细描述,在此不赘述。The size change rules of the cropping frame corresponding to different mirror motion templates and/or the motion trajectory of the cropping frame in the original image will be described in detail in subsequent embodiments, and will not be repeated here.
可能的实现方式中,该运镜模板选择界面340可以透明的显示在上述摄像头捕捉到的画面324上。In a possible implementation manner, the lens movement template selection interface 340 may be transparently displayed on the picture 324 captured by the above-mentioned camera.
电子设备100可以接收用户作用于该运镜模板播放控件352的输入操作(例如单击),响 应于该输入操作,如图3E所示,电子设备100可以在运镜轨迹展示区353中显示模板图片、裁剪框355、和裁剪框355的中心点354。电子设备100可以基于裁剪框355对模板图片进行裁剪,得到裁剪图片。电子设备100可以将裁剪图片的尺寸调整至该运镜模板展示区351的显示尺寸,显示在运镜模板展示区351中。在一种可能的实现方式,模板图片可以是一段视频样片中的每一帧图片。The electronic device 100 may receive an input operation (eg, click) that the user acts on the camera movement template playback control 352, and in response to the input operation, as shown in FIG. 3E, the electronic device 100 may display the template in the camera movement track display area 353. The picture, the crop box 355, and the center point 354 of the crop box 355. The electronic device 100 may crop the template picture based on the cropping frame 355 to obtain a cropped picture. The electronic device 100 can adjust the size of the cropped picture to the display size of the moving-motion template display area 351 and display it in the display area 351 of the moving-motion template. In a possible implementation manner, the template picture may be each frame picture in a piece of video footage.
如图3F所示,该裁剪框355变小至预设最小尺寸。其中,裁剪框355越小,运镜模板展示区351中显示的图片中放大倍率越大。As shown in FIG. 3F, the cropping frame 355 is reduced to a preset minimum size. Wherein, the smaller the cropping frame 355 is, the larger the magnification of the picture displayed in the mirror movement template display area 351 is.
如图3G所示,该裁剪框355变小至预设最小尺寸之后,可以再变大。运镜模板展示区351中显示的图片中放大倍率由最高值逐渐减小。As shown in FIG. 3G , after the cropping frame 355 is reduced to a preset minimum size, it can be enlarged again. The magnification in the picture displayed in the lens movement template display area 351 gradually decreases from the highest value.
如图3H所示,该裁剪框355可以逐渐变大至原始图片的尺寸,并在变大至原始图片的尺寸之后,再缩小至预设尺寸。As shown in FIG. 3H , the cropping frame 355 can be gradually enlarged to the size of the original picture, and then reduced to a preset size after being enlarged to the size of the original picture.
电子设备100可以接收用户作用于运镜拍摄控件345的输入操作(例如单击),响应于该输入操作,电子设备100可以显示如图3I所示的录像界面360,并使用该已选中的“旅行”运镜模板341A对应的裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹,对视频拍摄时摄像头获取的视频流进行裁剪。The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the camera movement control 345, and in response to the input operation, the electronic device 100 may display the recording interface 360 as shown in FIG. The size change rule of the cropping frame corresponding to the "travel" mirror motion template 341A and/or the motion track of the cropping frame in the original image is used to crop the video stream obtained by the camera during video shooting.
如图3I所示,该录像界面360可以包括摄像头获取到的预览图像371、回显控件346、视频拍摄控件361、运镜模板切换控件362、智能运镜提示框343、运镜模板预览窗口363。其中,运镜模板预览窗口363中显示有已选中运镜模板(例如已选中上述“旅行”运镜选项341A对应的运镜模板)对应的裁剪效果画面。该运镜模板预览窗口363中包括有关闭控件364,该关闭控件364可用于触发电子设备100关闭该运镜模板预览窗口363。该运镜模板预览窗口363的显示位置可以在显示屏的右上角也可以在显示屏的左上角,在此不作限定。该运镜模板切换控件362上可以显示电子设备100已选中运镜模板的名称(例如“旅行”)。该运镜模板切换控件362可用于触发电子设备100切换运镜模板。在一种可能的实现方式中,电子设备100可以接收并响应于用户作用于该运镜模板预览窗口363的输入操作(例如按住拖动),移动该运镜模板预览窗口363的显示位置。As shown in FIG. 3I , the video recording interface 360 may include a preview image 371 obtained by the camera, an echo control 346, a video capture control 361, a mirror movement template switching control 362, an intelligent mirror movement prompt box 343, and a mirror movement template preview window 363 . Wherein, the mirror movement template preview window 363 displays the cropping effect picture corresponding to the selected mirror movement template (for example, the mirror movement template corresponding to the above-mentioned "travel" mirror movement option 341A has been selected). The lens-moving template preview window 363 includes a closing control 364, and the closing control 364 can be used to trigger the electronic device 100 to close the lens-moving template preview window 363. The display position of the mirror movement template preview window 363 may be at the upper right corner of the display screen or at the upper left corner of the display screen, which is not limited herein. The camera movement template switching control 362 may display the name of the camera movement template selected by the electronic device 100 (for example, "travel"). The moving template switching control 362 can be used to trigger the electronic device 100 to switch the moving template. In a possible implementation manner, the electronic device 100 may receive and respond to a user's input operation (eg, hold and drag) on the mirror movement template preview window 363, and move the display position of the mirror movement template preview window 363.
电子设备100可以接收用户作用于该视频拍摄控件361的输入操作(例如单击),响应于该输入操作,电子设备100可以开始根据已选中运镜模板对应的裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹,对摄像头获取到视频流的每一帧图像进行裁剪。电子设备100可以将每一帧裁剪后的图像调整到指定尺寸按照帧顺序依次显示在录像界面360中。电子设备100可以保存裁剪后的视频流。The electronic device 100 may receive an input operation (such as a single click) that the user acts on the video capture control 361, and in response to the input operation, the electronic device 100 may start to change the rule and/or crop the size of the cropping frame corresponding to the selected mirror motion template. The motion trajectory of the frame in the original image is cropped for each frame of the video stream obtained by the camera. The electronic device 100 may adjust the cropped image of each frame to a specified size and display it in the video recording interface 360 in sequence of frames. The electronic device 100 may save the cropped video stream.
如图3J所示,当电子设备100开始录像后,电子设备100可以在录像界面360上显示录制时间框366、录像结束控件365,并将回显控件346和模式切换控件362替换显示为暂停录像控件367和拍照控件368。其中,该录制时间框366可用于显示电子设备100的录像时间。该录像结束控件365可用于电子设备100结束录像。该暂停录像控件367可用于触发电子设备100暂停录像。该拍照控件368可用于触发电子设备100将录像过程中的某一帧或多帧录像画面保存为图片。电子设备100可以通过裁剪框对摄像头获取的每一帧原始图像进行裁剪,截取出裁剪框内的图像。电子设备100可以裁剪框内的图像调整至指定尺寸,显示在录像界面360上。As shown in FIG. 3J , after the electronic device 100 starts recording, the electronic device 100 can display the recording time frame 366 and the recording end control 365 on the recording interface 360 , and replace the echo control 346 and the mode switching control 362 to pause the recording. Controls 367 and Camera Controls 368. The recording time frame 366 may be used to display the recording time of the electronic device 100 . The recording end control 365 can be used for the electronic device 100 to end the recording. The pause recording control 367 can be used to trigger the electronic device 100 to pause recording. The photographing control 368 can be used to trigger the electronic device 100 to save a certain frame or multiple frames of video recordings as a picture during the video recording process. The electronic device 100 may crop each frame of the original image acquired by the camera through the cropping frame, and capture the image within the cropping frame. The electronic device 100 can adjust the image in the cropping frame to a specified size and display it on the video recording interface 360 .
例如,该裁剪框的中心点可以与原始图像的中心点处于同一位置。当电子设备100接收到接收用户作用于该视频拍摄控件361的输入操作后的前8s内,裁剪框的尺寸可以先从原始图像流的尺寸逐渐成比例缩小至预设最小尺寸,当电子设备100接收到接收用户作用于该视 频拍摄控件361的输入操作后的第8秒至第16秒时,裁剪框的尺寸再逐渐成比例增大至原始图像的尺寸。如图3J所示,当电子设备100接收到接收用户作用于该视频拍摄控件361的输入操作后的第3秒时,电子设备100可以通过摄像头获取到原始图像P1,并确定出裁剪框在原始图像P1中的位置。电子设备100可以截取出原始图像P1上裁剪框内的图像,并将截取后的图像调整至指定尺寸,得到裁剪图像372。电子设备100可以将裁剪图像372显示在录像界面360上。电子设备100可以在运镜模板预览窗口363中显示已选中运镜模板在第3秒时的效果图片。其中,该裁剪图像372中图像内容的放大倍率大于上述图3I所示预览图像371中图像内容的放大倍率。For example, the center point of the crop box may be at the same location as the center point of the original image. When the electronic device 100 receives the user's input operation on the video capture control 361 within the first 8s, the size of the cropping frame can be gradually reduced from the size of the original image stream to the preset minimum size in proportion. When the electronic device 100 From the 8th second to the 16th second after receiving the input operation of the user acting on the video shooting control 361, the size of the cropping frame is gradually increased proportionally to the size of the original image. As shown in FIG. 3J , when the electronic device 100 receives the third second after receiving the user's input operation acting on the video capture control 361, the electronic device 100 can obtain the original image P1 through the camera, and determine that the cropping frame is in the original image P1. position in image P1. The electronic device 100 may cut out the image within the cropping frame on the original image P1, and adjust the cutout image to a specified size to obtain the cropped image 372. The electronic device 100 may display the cropped image 372 on the recording interface 360 . The electronic device 100 may display the effect picture of the selected mirror movement template at the third second in the mirror movement template preview window 363 . The magnification ratio of the image content in the cropped image 372 is greater than the magnification ratio of the image content in the preview image 371 shown in FIG. 3I.
如图3K所示,当电子设备100接收到接收用户作用于该视频拍摄控件361的输入操作后的第8秒时,裁剪框缩小至预设最小尺寸,电子设备100可以通过摄像头获取到原始图像P2,并确定出裁剪框在原始图像P2中的位置。电子设备100可以截取出原始图像P2上裁剪框内的图像,并将截取后的图像调整至指定尺寸,得到裁剪图像373。电子设备100可以将裁剪图像373显示在录像界面360上。电子设备100可以在模板预览窗口363中显示已选中运镜模板在第8秒时的效果图片。其中,该裁剪图像373中图像内容的放大倍率大于上述图3J所示裁剪图像372中图像内容的放大倍率。As shown in FIG. 3K , when the electronic device 100 receives the input operation of the user acting on the video capture control 361 at the 8th second, the cropping frame is reduced to the preset minimum size, and the electronic device 100 can obtain the original image through the camera P2, and determine the position of the cropping frame in the original image P2. The electronic device 100 may cut out the image in the cropping frame on the original image P2, and adjust the cutout image to a specified size to obtain the cropped image 373. The electronic device 100 may display the cropped image 373 on the recording interface 360 . The electronic device 100 may display the effect picture of the selected mirror motion template at the 8th second in the template preview window 363 . The magnification of the image content in the cropped image 373 is greater than the magnification of the image content in the cropped image 372 shown in FIG. 3J.
如图3L所示,当电子设备100接收到用户作用于该视频拍摄控件361的输入操作后的第12秒时,裁剪框的尺寸大于预设最小尺寸且小于帧图像的尺寸,电子设备100可以通过摄像头获取到原始图像P3,并确定出裁剪框在原始图像P3中的位置。电子设备100可以截取出原始图像P3上裁剪框内的图像,并将截取后的图像调整至指定尺寸,得到裁剪图像374。电子设备100可以将裁剪图像374显示在录像界面360上。电子设备100可以在模板预览窗口363中显示已选中运镜模板在第12秒时的效果图片。其中,该裁剪图像374中图像内容的放大倍率小于上述图3K所示裁剪图像373中图像内容的放大倍率。As shown in FIG. 3L , when the electronic device 100 receives the user's input operation on the video capture control 361 in the 12th second, the size of the cropping frame is larger than the preset minimum size and smaller than the size of the frame image, the electronic device 100 can The original image P3 is acquired through the camera, and the position of the cropping frame in the original image P3 is determined. The electronic device 100 may cut out the image within the cropping frame on the original image P3, and adjust the cutout image to a specified size to obtain the cropped image 374. The electronic device 100 may display the cropped image 374 on the recording interface 360 . The electronic device 100 may display, in the template preview window 363, the effect picture of the selected mirror motion template at the 12th second. Wherein, the magnification ratio of the image content in the cropped image 374 is smaller than the magnification ratio of the image content in the cropped image 373 shown in FIG. 3K.
电子设备100可以接收用户作用于录像结束控件365的输入操作(例如单击),响应于该输入操作,电子设备100可以结束录像,并保存通过运镜模板对应的裁剪框对视频流裁剪后的录像视频。如图3M所示,在电子设备100结束录像后,电子设备100可以将暂停录像控件367和拍照控件368替换显示为回显控件346和模式切换控件362,并在回显控件346上显示已拍摄完成的录像视频中的图像画面。The electronic device 100 may receive an input operation (eg, click) that the user acts on the recording end control 365, and in response to the input operation, the electronic device 100 may end the recording, and save the video stream after the video stream is cropped by the cropping frame corresponding to the lens motion template. Record video. As shown in FIG. 3M , after the electronic device 100 finishes recording, the electronic device 100 can display the pause recording control 367 and the photographing control 368 with the echo control 346 and the mode switching control 362 , and display the captured recording on the echo control 346 The image frame in the finished recorded video.
电子设备100可以接收用户作用于该回显控件346的输入操作(例如单击),响应于该输入操作,电子设备100可以显示如图3N所示的视频浏览界面380。The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the echo control 346, and in response to the input operation, the electronic device 100 may display a video browsing interface 380 as shown in FIG. 3N.
如图3N所示,该视频浏览界面380可以包括智能运镜模式下拍摄的录像视频381、视频播放控件382、视频总时间383、菜单384。该菜单384可以包括分享按钮、收藏按钮、编辑按钮、删除按钮、更多按钮。分享按钮可用于触发对该录像视频381的分享。该收藏按钮可用于触发收藏该录像视频381到图片收藏文件夹。编辑按钮可用于触发对录像视频381的旋转、修剪、增加滤镜、虚化等编辑功能。删除按钮可用于触发删除该录像视频381。更多按钮可用于触发打开更多与该录像视频381相关的功能。As shown in FIG. 3N , the video browsing interface 380 may include a recorded video 381 captured in an intelligent mirror movement mode, a video playback control 382 , a total video time 383 , and a menu 384 . The menu 384 may include a share button, a favorite button, an edit button, a delete button, and more buttons. The share button can be used to trigger the sharing of the recorded video 381 . The favorite button can be used to trigger to save the recorded video 381 to the picture favorite folder. The edit button can be used to trigger editing functions such as rotation, trimming, adding filters, and blurring of the recorded video 381. The delete button can be used to trigger deletion of the recorded video 381 . The More button can be used to trigger opening of more functions related to the recorded video 381.
电子设备100可以接收用户作用于该视频播放控件382的输入操作(例如单击),响应于该输入操作,电子设备100可以播放该录像视频381。The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the video playback control 382 , and in response to the input operation, the electronic device 100 may play the recorded video 381 .
如图3O所示,电子设备100在开始播放该录像视频381后,可以在该视频预览界面380上显示暂停播放控件386、播放进度条385。该暂停播放控件386可用于暂停播放该录像视频381。当录像视频381播放到第3秒时,电子设备100可以在该视频预览界面380上显示视频画面391。As shown in FIG. 30 , after the electronic device 100 starts to play the recorded video 381 , a pause control 386 and a playback progress bar 385 can be displayed on the video preview interface 380 . The pause control 386 can be used to pause the playback of the recorded video 381 . When the recorded video 381 is played to the third second, the electronic device 100 may display the video screen 391 on the video preview interface 380 .
如图3P所示,当录像视频381播放到第8秒时,电子设备100可以在该视频预览界面380上显示视频画面392。其中,该视频画面392中图像内容的放大倍率小于上述图3O所示视频画面391中图像内容的放大倍率。As shown in FIG. 3P , when the recorded video 381 is played to the eighth second, the electronic device 100 may display a video screen 392 on the video preview interface 380 . Wherein, the magnification ratio of the image content in the video frame 392 is smaller than the magnification ratio of the image content in the video frame 391 shown in FIG. 30 .
如图3Q所示,当录像视频381播放到第12秒时,电子设备100可以在该视频预览界面380上显示视频画面393。其中,该视频画面393中图像内容的放大倍率小于上述图3P所示视频画面392中图像内容的放大倍率。As shown in FIG. 3Q , when the recorded video 381 is played to the 12th second, the electronic device 100 may display a video screen 393 on the video preview interface 380 . The magnification ratio of the image content in the video frame 393 is smaller than the magnification ratio of the image content in the video frame 392 shown in FIG. 3P.
在一种可能的实现方式中,电子设备100在选择完运镜模板之后,可以随时接收用户的输入,触发显示上述运镜模板选择界面。这样,可以方便用户选择更换其他的运镜模板。In a possible implementation manner, after selecting the mirror movement template, the electronic device 100 may receive the user's input at any time, and trigger the display of the above mirror movement template selection interface. In this way, it is convenient for the user to choose and replace other mirror movement templates.
示例性的,如图4A所示,电子设备100可以显示录像界面360。其中,针对录像界面360的文字描述可以参考上述图3I所示实施例,在此不再赘述。Exemplarily, as shown in FIG. 4A , the electronic device 100 may display a recording interface 360 . Wherein, for the text description of the video recording interface 360, reference may be made to the above-mentioned embodiment shown in FIG. 3I, and details are not repeated here.
电子设备100可以接收用户作用于运镜模板切换控件362的输入操作(例如单击),响应于该输入操作,电子设备100可以显示如图4B所示的运镜模板选择界面340。其中,针对该运镜模板选择界面340的文字描述可以参考前述图3D所示实施例,在此不再赘述。The electronic device 100 may receive an input operation (eg, single click) of the user acting on the moving template switching control 362, and in response to the input operation, the electronic device 100 may display the moving template selection interface 340 as shown in FIG. 4B . Wherein, for the text description of the lens movement template selection interface 340, reference may be made to the aforementioned embodiment shown in FIG. 3D , which will not be repeated here.
如图4B所示,选择框342已选中“旅行”运镜模板341A。电子设备100可以接收用户作用于“动感”运镜模板341C的输入操作(例如单击),响应于该输入操作,电子设备100可以选中该“动感”运镜模板341C。As shown in FIG. 4B, the selection box 342 has selected the "travel" motion template 341A. The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the "kinetic" motion template 341C, and in response to the input operation, the electronic device 100 may select the "kinetic" motion template 341C.
如图4C所示,选择框342已选中“动感”运镜模板341C。电子设备100可以接收用户作用于运镜拍摄控件345的输入操作(例如单击),响应于该输入操作,电子设备100可以显示如图4D所示的拍摄界面410,并使用该已选中的“动感”运镜模板341C对应的裁剪框信息(包括裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹),对视频拍摄时摄像头获取的视频画面进行裁剪。As shown in FIG. 4C, the selection box 342 has selected the "Motion" motion template 341C. The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the camera movement control 345, and in response to the input operation, the electronic device 100 may display the photographing interface 410 as shown in FIG. 4D, and use the selected "" The corresponding cropping frame information (including the size change rule of the cropping frame and/or the motion track of the cropping frame in the original image) corresponding to the "Dynamic" lens motion template 341C is used to crop the video picture obtained by the camera when the video is captured.
如图4D所示,该拍摄界面410可以包括摄像头获取到的预览图像441、回显控件346、视频拍摄控件361、运镜模板切换控件362、智能运镜提示框343、运镜模板预览窗口431。其中,运镜模板预览窗口431中显示有已选中运镜模板(例如已选中上述“动感”运镜选项341C对应的运镜模板)对应的裁剪效果视频。该运镜模板预览窗口431中包括有关闭控件432,该关闭控件432可用于触发电子设备100关闭该运镜模板预览窗口431。该运镜模板切换控件362上可以显示电子设备100已选中运镜模板的名称(例如“动感”)。该运镜模板切换控件362可用于触发电子设备100切换运镜模板。As shown in FIG. 4D , the shooting interface 410 may include a preview image 441 obtained by the camera, an echo control 346 , a video shooting control 361 , a mirror movement template switching control 362 , an intelligent mirror movement prompt box 343 , and a mirror movement template preview window 431 . Wherein, the motion template preview window 431 displays the video with the cropping effect corresponding to the selected motion template (for example, the motion template corresponding to the above-mentioned "Motion" motion option 341C has been selected). The camera-moving template preview window 431 includes a closing control 432, and the closing control 432 can be used to trigger the electronic device 100 to close the camera-moving template preview window 431. The motion template switching control 362 may display the name of the motion template selected by the electronic device 100 (for example, "Motion"). The moving template switching control 362 can be used to trigger the electronic device 100 to switch the moving template.
在一种可能的实现方式中,电子设备100可以接收用户的输入,关闭/打开拍摄界面上的运镜模板预览窗口。这样,电子设备100可以根据用户的需求,随时打开/关闭运镜模板预览窗口,让运镜模板预览窗口不会一直对拍摄画面造成遮挡。In a possible implementation manner, the electronic device 100 may receive the user's input, and close/open the lens motion template preview window on the shooting interface. In this way, the electronic device 100 can open/close the preview window of the mirror movement template at any time according to the needs of the user, so that the preview window of the mirror movement template will not always block the shooting picture.
示例性的,如图4D所示,电子设备100可以接收用户作用于关闭控件432的输入操作(例如单击),响应于该输入操作,电子设备100可以关闭该运镜模板预览窗口431,并显示如图4E所示的画中画开启控件433。Exemplarily, as shown in FIG. 4D , the electronic device 100 may receive an input operation (eg, click) that the user acts on the closing control 432, and in response to the input operation, the electronic device 100 may close the lens motion template preview window 431, and A picture-in-picture on control 433 as shown in FIG. 4E is displayed.
如图4E所示,该画中画开启控件433可以显示在显示屏右侧的顶部,也可以显示在其他位置不作限制。电子设备100可以接收用户针对该画中画开启控件433的输入操作(例如单击),响应于该输入操作,电子设备100可以如图4F所示的运镜模板预览窗口431。As shown in FIG. 4E , the PIP enable control 433 can be displayed on the top right side of the display screen, or can be displayed in other positions without limitation. The electronic device 100 may receive an input operation (eg, a single click) of the user for the PIP enable control 433, and in response to the input operation, the electronic device 100 may display a mirror motion template preview window 431 as shown in FIG. 4F .
在一种可能的实现方式中,电子设备100在确定出用户选中的运镜模板之后,可以在拍 摄界面上显示取景展示窗口。其中,该取景展示窗口中包括有摄像头获取到的原始图像和裁剪框。这样,电子设备100可以向用户展示裁剪框的动态变化,方便用户感知裁剪框在原始图像中的位置。In a possible implementation manner, after the electronic device 100 determines the lens movement template selected by the user, a viewfinder display window may be displayed on the shooting interface. Wherein, the framing display window includes the original image obtained by the camera and the cropping frame. In this way, the electronic device 100 can show the dynamic change of the cropping frame to the user, which is convenient for the user to perceive the position of the cropping frame in the original image.
示例性的,如图5A所示,电子设备100可以显示运镜模板选择界面340。其中,针对该运镜模板选择界面340的文字描述可以参考前述图3D所示实施例,在此不再赘述。电子设备100可以接收用户作用于运镜拍摄控件345的输入操作(例如单击),响应于该输入操作,电子设备100可以显示如图5B所示的拍摄界面510。Exemplarily, as shown in FIG. 5A , the electronic device 100 may display a lens motion template selection interface 340 . Wherein, for the text description of the lens movement template selection interface 340, reference may be made to the aforementioned embodiment shown in FIG. 3D , which will not be repeated here. The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the camera movement control 345 , and in response to the input operation, the electronic device 100 may display the photographing interface 510 as shown in FIG. 5B .
如图5B所示,该拍摄界面510包括摄像头获取到的原始图像511、回显控件346、视频拍摄控件361、运镜模板切换控件362、智能运镜提示框343、取景展示窗口521。其中,取景展示窗口521中显示有原始图像511a(与原始图像511a包括的图像内容相同,显示比例不同)、关闭控件522。该关闭控件522可用于触发电子设备100关闭该取景展示窗口521。其中,该取景展示窗口521可以在显示屏的右上角也可以在显示屏的左上角,在此不作限定。As shown in FIG. 5B , the shooting interface 510 includes the original image 511 obtained by the camera, an echo control 346 , a video shooting control 361 , a mirror movement template switching control 362 , an intelligent mirror movement prompt box 343 , and a viewfinder display window 521 . Wherein, the viewfinder display window 521 displays the original image 511a (the image content included in the original image 511a is the same, and the display scale is different), and the close control 522 is displayed. The close control 522 can be used to trigger the electronic device 100 to close the viewfinder display window 521 . Wherein, the viewfinder display window 521 may be at the upper right corner of the display screen or at the upper left corner of the display screen, which is not limited herein.
在一种可能的实现方式中,电子设备100可以接收并响应于用户作用于该取景展示窗口521的输入操作(例如按住拖动),移动该取景展示窗口521的显示位置。In a possible implementation manner, the electronic device 100 may receive and move the display position of the viewfinder display window 521 in response to a user's input operation (eg, press and drag) on the viewfinder display window 521 .
电子设备100可以接收用户作用于该视频拍摄控件361的输入操作(例如单击),响应于该输入操作,电子设备100可以开始根据已选中运镜模板对应的裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹,对摄像头获取到的视频流的每一帧图像进行剪裁。电子设备100可以将每一帧裁剪后的图像调整到指定尺寸按照帧顺序依次显示在录像界面360中,并在取景展示窗口521中显示出裁剪框在原始图像上的位置。电子设备100可以保存裁剪后的视频流。The electronic device 100 may receive an input operation (such as a single click) that the user acts on the video capture control 361, and in response to the input operation, the electronic device 100 may start to change the rule and/or crop the size of the cropping frame corresponding to the selected mirror motion template. The motion trajectory of the frame in the original image is cropped for each frame of the video stream obtained by the camera. The electronic device 100 can adjust the cropped image of each frame to a specified size and sequentially display it in the video recording interface 360 in frame order, and display the position of the cropping frame on the original image in the viewfinder display window 521 . The electronic device 100 may save the cropped video stream.
如图5C所示,当电子设备100开始录像后,电子设备100可以在录像界面360上显示录制时间框366以及录像结束控件365。电子设备100可以将摄像头捕捉到的原始图像显示在取景展示窗口521中,并在取景展示窗口521中显示裁剪框523在原始图像中的位置。电子设备100可以截取出原始图像上处于裁剪框523内的图像,调整至指定尺寸,得到裁剪图像。电子设备100可以将该裁剪图像作为录像画面,显示在录像界面360上。例如,当电子设备100接收到用户作用于该视频拍摄控件361的输入操作后的第3秒时,电子设备100可以通过摄像头获取到原始图像512a,并确定出裁剪框523在原始图像512a中的位置。电子设备100可以截取出原始图像512a上处于裁剪框523内的图像,并将截取后的图像调整至指定尺寸,得到裁剪图像512。电子设备100可以将原始图像512a显示在取景展示窗口521中,并在取景展示窗口521中显示裁剪框523在原始图像512a上的位置。电子设备100可以将图像512显示在录像界面360上。其中,该裁剪图像512中图像内容的放大倍率大于上述图5B所示原始图像511中图像内容的放大倍率。As shown in FIG. 5C , after the electronic device 100 starts recording, the electronic device 100 may display a recording time frame 366 and a recording end control 365 on the recording interface 360 . The electronic device 100 may display the original image captured by the camera in the viewfinder display window 521 , and display the position of the cropping frame 523 in the original image in the viewfinder display window 521 . The electronic device 100 can cut out the image in the cropping frame 523 on the original image, adjust it to a specified size, and obtain a cropped image. The electronic device 100 may display the cropped image on the video recording interface 360 as a video recording image. For example, when the electronic device 100 receives the user's input operation on the video capture control 361 in the third second, the electronic device 100 can obtain the original image 512a through the camera, and determine the size of the cropping frame 523 in the original image 512a. Location. The electronic device 100 may cut out the image in the cropping frame 523 on the original image 512 a , and adjust the cut-out image to a specified size to obtain the cropped image 512 . The electronic device 100 may display the original image 512 a in the framing presentation window 521 , and display the position of the cropping frame 523 on the original image 512 a in the framing presentation window 521 . The electronic device 100 may display the image 512 on the recording interface 360 . Wherein, the magnification ratio of the image content in the cropped image 512 is greater than the magnification ratio of the image content in the original image 511 shown in FIG. 5B .
在一种可能的实现方式中,电子设备100上可以有多个摄像头,电子设备100可以将这多个摄像头中一个摄像头(例如广角摄像头)采集到的上述图像显示在取景展示窗口521中,将这多个摄像头中另一个摄像头(例如景深摄像头)调整变焦倍率采集到的图像作为预览画面或录像画面显示在拍摄界面510中。In a possible implementation manner, there may be multiple cameras on the electronic device 100, and the electronic device 100 may display the above-mentioned image captured by one camera (such as a wide-angle camera) among the multiple cameras in the viewfinder display window 521, and display the An image captured by another camera (eg, a depth-of-field camera) among the plurality of cameras by adjusting the zoom ratio is displayed in the shooting interface 510 as a preview image or a video image.
在一种可能的实现方式中,电子设备100可以将摄像头采集的原始图像,调整至指定倍率后显示在取景展示窗口521中。电子设备100可以基于调整至指定倍率后的原始图像,通过裁剪框进行裁剪,得到裁剪图像,并将裁剪图像作为预览画面或录像画面显示在拍摄界面510中。In a possible implementation manner, the electronic device 100 may adjust the original image captured by the camera to a specified magnification and display it in the viewfinder display window 521 . The electronic device 100 may perform cropping through a cropping frame based on the original image adjusted to a specified magnification to obtain a cropped image, and display the cropped image on the shooting interface 510 as a preview image or a video image.
其中,在电子设备100拍摄视频时,电子设备100通过摄像头获取到的是图像流。该图 像流中每一帧原始图像的尺寸都是固定的。电子设备100可以根据已选中运镜模板对应的裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹,确定裁剪框在图像流中每一帧原始图像中的位置。然后,电子设备100可以通过裁剪框对图像流中每一帧原始图像进行裁剪,获取裁剪框内的裁剪图像流。电子设备100可以裁剪框内的裁剪图像流调整至指定尺寸,按照帧顺序显示在录像界面360上。Wherein, when the electronic device 100 shoots a video, what the electronic device 100 acquires through the camera is an image stream. The size of each frame of the original image in the image stream is fixed. The electronic device 100 may determine the position of the cropping frame in each frame of the original image in the image stream according to the size change rule of the cropping frame corresponding to the selected mirror motion template and/or the motion trajectory of the cropping frame in the original image. Then, the electronic device 100 may crop each frame of the original image in the image stream by using the cropping frame to obtain the cropped image stream within the cropping frame. The electronic device 100 can adjust the cropped image stream in the cropping frame to a specified size, and display it on the video recording interface 360 in frame order.
例如,当电子设备100接收到接收用户作用于该视频拍摄控件361的输入操作后的前8s内,裁剪框的尺寸可以先从原始图像的尺寸逐渐成比例缩小至预设最小尺寸,当电子设备100接收到接收用户作用于该视频拍摄控件361的输入操作后的第8秒至第16秒时,裁剪框的尺寸再逐渐成比例增大至原始图像的尺寸。For example, within the first 8 s after the electronic device 100 receives the input operation of the user acting on the video capture control 361, the size of the cropping frame can be gradually reduced from the size of the original image to the preset minimum size in proportion. From the 8th second to the 16th second after receiving the user's input operation acting on the video shooting control 361, the size of the cropping frame is gradually increased proportionally to the size of the original image.
如图5D所示,当电子设备100接收到用户作用于该视频拍摄控件361的输入操作后的第8秒时,裁剪框523缩小至预设最小尺寸。电子设备100可以通过摄像头获取到原始图像513a,并确定出裁剪框523在原始图像513a中的位置。电子设备100可以截取出原始图像513a上处于裁剪框523内的图像,并将截取后的图像调整至指定尺寸,得到裁剪图像513。电子设备100可以将原始图像513a显示在取景展示窗口521中,并在取景展示窗口521中显示裁剪框523在原始图像513a上的位置。电子设备100可以将裁剪图像513显示在录像界面360上。其中,该裁剪图像513中图像内容的放大倍率大于上述图5C所示裁剪图像512中图像内容的放大倍率。As shown in FIG. 5D , when the electronic device 100 receives the user's input operation on the video capture control 361 at the 8th second, the cropping frame 523 is reduced to a preset minimum size. The electronic device 100 may acquire the original image 513a through the camera, and determine the position of the cropping frame 523 in the original image 513a. The electronic device 100 may cut out the image in the cropping frame 523 on the original image 513a, and adjust the cutout image to a specified size to obtain the cropped image 513. The electronic device 100 may display the original image 513 a in the framing presentation window 521 , and display the position of the cropping frame 523 on the original image 513 a in the framing presentation window 521 . The electronic device 100 may display the cropped image 513 on the recording interface 360 . The magnification ratio of the image content in the cropped image 513 is greater than the magnification ratio of the image content in the cropped image 512 shown in FIG. 5C .
如图5E所示,当电子设备100接收到用户作用于该视频拍摄控件361的输入操作后的第12秒时,裁剪框523的尺寸大于预设最小尺寸且小于帧图像的尺寸。电子设备100可以通过摄像头获取到第12秒帧图像,并确定出裁剪框在原始图像514a中的位置。电子设备100可以截取出原始图像514a上裁剪框523内的图像,并将截取后的图像调整至指定尺寸,得到裁剪图像514。电子设备100可以将原始图像514a显示在取景展示窗口521中,并在取景展示窗口521中显示裁剪框523在原始图像514a上的位置。电子设备100可以将裁剪图像514显示在录像界面360上。其中,该裁剪图像514中图像内容的放大倍率小于上述图5D所示裁剪图像513中图像内容的放大倍率。As shown in FIG. 5E , 12 seconds after the electronic device 100 receives the user's input operation on the video capture control 361 , the size of the cropping frame 523 is larger than the preset minimum size and smaller than the size of the frame image. The electronic device 100 may acquire the frame image of the 12th second through the camera, and determine the position of the cropping frame in the original image 514a. The electronic device 100 may cut out the image in the cropping frame 523 on the original image 514a, and adjust the cutout image to a specified size to obtain the cropped image 514. The electronic device 100 may display the original image 514a in the framing presentation window 521, and display the position of the cropping frame 523 on the original image 514a in the framing presentation window 521. The electronic device 100 may display the cropped image 514 on the recording interface 360 . Wherein, the magnification ratio of the image content in the cropped image 514 is smaller than the magnification ratio of the image content in the cropped image 513 shown in FIG. 5D .
电子设备100可以接收用户作用于录像结束控件365的输入操作(例如单击),响应于该输入操作,电子设备100可以结束录像,并保存通过上述运镜模板对应的裁剪框信息对视频流裁剪后的录像视频。The electronic device 100 can receive an input operation (such as a single click) that the user acts on the recording end control 365, and in response to the input operation, the electronic device 100 can end the recording, and save the clipping of the video stream through the clipping frame information corresponding to the above-mentioned mirror motion template. video recording later.
在一些应用场景中,电子设备100可以选择运镜模式进行拍照。在电子设备100切换至运镜模式后,电子设备100可以接收用户选择的运镜模板。不同的运镜模板可以对应不同的裁剪框信息(包括裁剪框的尺寸变化规则和该裁剪框在摄像头获取到的原始图像上的运动轨迹)。电子设备100可以通过该运镜模板对应的裁剪框信息对摄像头采集到的每一帧图像进行裁剪,并将裁剪后的图像作为预览画面,显示在拍摄界面中。当电子设备100接收用户的作用于拍摄控件的输入(例如单击)时,电子设备100可以将此时显示的预览画面保存为图片。这样,电子设备100可以通过用户选择的运镜模板实现自动变焦,方便用户选择拍摄景物的主体或景物背景。In some application scenarios, the electronic device 100 may select a mirror movement mode to take a photo. After the electronic device 100 is switched to the mirror movement mode, the electronic device 100 may receive the mirror movement template selected by the user. Different mirror motion templates may correspond to different cropping frame information (including the size change rule of the cropping frame and the motion track of the cropping frame on the original image obtained by the camera). The electronic device 100 can use the cropping frame information corresponding to the mirror movement template to crop each frame of image collected by the camera, and use the cropped image as a preview image to display on the shooting interface. When the electronic device 100 receives the user's input (eg, single click) acting on the photographing control, the electronic device 100 may save the preview screen displayed at this time as a picture. In this way, the electronic device 100 can realize automatic zooming through the lens movement template selected by the user, which is convenient for the user to select the subject or the background of the shooting scene.
示例性的,如图6A所示,电子设备100可以接收用户选择运镜模式控件327H的输入操作(例如单击),响应于该输入操作,电子设备100可以从“普通拍照模式”切换至“智能运镜模式”。在智能运镜模式下,电子设备100可以根据用户选择的运镜模板对应的裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹,对摄像头获取的帧图像进行裁剪,并将剪裁 后的图像作为预览画面显示在拍摄界面上。Exemplarily, as shown in FIG. 6A , the electronic device 100 may receive an input operation (eg, a single click) for the user to select the mirror movement mode control 327H, and in response to the input operation, the electronic device 100 may switch from the “normal photographing mode” to “ Smart Mirror Mode". In the smart motion mode, the electronic device 100 can crop the frame image acquired by the camera according to the size change rule of the cropping frame corresponding to the motion template selected by the user and/or the motion trajectory of the cropping frame in the original image, and then crop the frame image obtained by the camera. The resulting image is displayed on the shooting interface as a preview screen.
如图6B所示,电子设备100响应于用户选择运镜模式控件327H的输入操作(例如单击),可以显示运镜模板选择界面610。该运镜选择界面610可以包括一个或多个运镜模板选项(例如,“旅行”运镜选项611A、“舒服”运镜选项611B、“动感”运镜选项611C等等)、选择框612、确定控件613、运镜模板展示区614、运镜轨迹展示区616。运镜模板展示区614上可以显示有运镜模板播放控件615。该运镜轨迹展示区616可以显示有“旅行”运镜选项611A对应的裁剪框在原始图像中的中心点617,以及尺寸变化。例如,“旅行”运镜选项611A对应裁剪框的中心点可以与原始图像的中心点同位置,“旅行”运镜选项611A对应裁剪框的尺寸可以随时间先从原始图像的尺寸成比例变小至预设最小尺寸,然后再从预设最小尺寸成比例变大至原始图像的尺寸。可选的,该模板选择界面610还可以显示有一个或多个拍摄模式控件(例如,“夜景模式”控件327A、“人像模式”控件327B、“大光圈”控件327C、“运镜”模式控件327H、“普通拍照模式”控件327D、“录像模式”控件327E、“专业模式”控件327F等等)。其中,针对一个或多个拍摄模式控件的文字描述,可以参考前述图3B所示实施例,在此不再赘述。As shown in FIG. 6B , the electronic device 100 may display a motion template selection interface 610 in response to an input operation (eg, a single click) of the user selecting the motion motion mode control 327H. The motion selection interface 610 may include one or more motion template options (eg, "travel" motion option 611A, "comfortable" motion option 611B, "kinetic" motion option 611C, etc.), selection box 612, Determine the control 613, the mirror movement template display area 614, and the mirror movement track display area 616. The mirror movement template display area 614 may display a mirror movement template play control 615 . The camera movement track display area 616 may display the center point 617 of the crop frame corresponding to the "travel" movement option 611A in the original image, and the size change. For example, the center point of the cropping frame corresponding to the "travel" motion option 611A may be at the same location as the central point of the original image, and the size of the cropping frame corresponding to the "travel" motion option 611A may first decrease in proportion to the size of the original image over time. to the preset minimum size, and then scale up from the preset minimum size to the size of the original image. Optionally, the template selection interface 610 may also display one or more shooting mode controls (for example, a "night scene mode" control 327A, a "portrait mode" control 327B, a "large aperture" control 327C, and a "mirror movement" mode control. 327H, "Normal Photo Mode" control 327D, "Video Mode" control 327E, "Pro Mode" control 327F, etc.). Wherein, for the text description of one or more shooting mode controls, reference may be made to the embodiment shown in FIG. 3B , which will not be repeated here.
电子设备100可以接收用户作用于该运镜模板播放控件615的输入操作(例如单击),响应于该输入操作,如图6C所示,电子设备100可以在运镜轨迹展示区616中显示模板图片、裁剪框618、和裁剪框618的中心点617。电子设备100可以基于裁剪框618对模板图片进行裁剪,得到裁剪图片。电子设备100可以将裁剪图片的尺寸调整至该运镜模板展示区614的显示尺寸,显示在运镜模板展示区614中。The electronic device 100 may receive an input operation (eg, click) that the user acts on the camera movement template playback control 615, and in response to the input operation, as shown in FIG. 6C, the electronic device 100 may display the template in the camera movement track display area 616. Picture, crop box 618, and center point 617 of crop box 618. The electronic device 100 may crop the template picture based on the cropping frame 618 to obtain a cropped picture. The electronic device 100 can adjust the size of the cropped image to the display size of the moving-motion template display area 614 and display it in the display area 614 of the moving-motion template.
电子设备100可以接收用户作用于确定控件613的输入操作(例如单击),响应于该输入操作,电子设备100可以显示如图6D所示的拍摄界面620,并使用该已选中的“旅行”运镜模板611A对应的裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹,对摄像头获取到的原始预览画面进行裁剪。The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the determination control 613, and in response to the input operation, the electronic device 100 may display the photographing interface 620 as shown in FIG. 6D, and use the selected "travel" The size change rule of the cropping frame corresponding to the mirror movement template 611A and/or the motion trajectory of the cropping frame in the original image is used to crop the original preview image obtained by the camera.
如图6D所示,该拍摄界面620可以包括有运镜模板切换控件621、取景展示窗口622、裁剪图像631、一个或多个拍摄模式控件(例如,“夜景模式”控件327A、“人像模式”控件327B、“大光圈”控件327C、“运镜”模式控件327H、“普通拍照模式”控件327D、“录像模式”控件327E、“专业模式”控件327F等等)、回显控件321、拍摄控件322、摄像头转换控件323。其中,针对一个或多个拍摄模式控件、回显控件321、拍摄控件322和摄像头转换控件323的文字描述,可以参考前述图3B所示实施例,在此不再赘述。该运镜模板切换控件621可用于触发电子设备100显示上述运镜模板选择界面610并基于用户的输入切换用户选中的运镜模板。该取景展示窗口622可以显示有原始图像631a。该关闭控件623可用于触发电子设备100关闭该取景展示窗口623。如图6D所示,当前裁剪框的尺寸与原始图像631的尺寸相同。因此,该裁剪图像631中的图像内容与原始图像631a中的图像内容相同。As shown in FIG. 6D , the shooting interface 620 may include a mirror movement template switching control 621, a viewfinder display window 622, a cropped image 631, one or more shooting mode controls (for example, the “night scene mode” control 327A, the “portrait mode” Control 327B, "Large Aperture" control 327C, "Motion Mirror" mode control 327H, "Normal Photo Mode" control 327D, "Video Mode" control 327E, "Pro Mode" control 327F, etc.), Echo Control 321, Shooting Control 322. Camera conversion control 323. For the text description of one or more shooting mode controls, echo control 321 , shooting control 322 and camera conversion control 323 , reference may be made to the embodiment shown in FIG. 3B , which will not be repeated here. The mirror movement template switching control 621 can be used to trigger the electronic device 100 to display the above-mentioned mirror movement template selection interface 610 and switch the mirror movement template selected by the user based on the user's input. The framing presentation window 622 may display the original image 631a. The close control 623 can be used to trigger the electronic device 100 to close the viewfinder display window 623 . As shown in FIG. 6D , the size of the current cropping frame is the same as the size of the original image 631 . Therefore, the image content in this cropped image 631 is the same as the image content in the original image 631a.
例如,当电子设备100接收到接收用户作用于上述图6C所示确定控件613的输入操作后的前8s内,裁剪框的尺寸可以先从原始图像流的尺寸逐渐成比例缩小至预设最小尺寸,当电子设备100接收到接收用户作用于上述确定控件613的输入操作后的第8秒至第16秒时,裁剪框的尺寸再逐渐成比例增大至原始图像的尺寸。For example, within the first 8 s after the electronic device 100 receives the input operation performed by the user on the determination control 613 shown in FIG. 6C , the size of the cropping frame can be gradually reduced proportionally from the size of the original image stream to the preset minimum size. , when the electronic device 100 receives the input operation of the user acting on the determination control 613 from the 8th second to the 16th second, the size of the cropping frame gradually increases proportionally to the size of the original image.
如图6E所示,当电子设备100接收到用户作用于上述确定控件613的输入操作后的第3秒时,电子设备100可以通过摄像头获取到原始图像632a,并确定出裁剪框624在原始图像632a中的位置。电子设备100可以截取出原始图像632a上裁剪框624内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像632。电子设备100可以将原始图像632a显示在取景 展示窗口622中,并在取景展示窗口622中显示裁剪框624在原始图像632a上的位置。电子设备100可以将裁剪图像632显示在拍摄界面620上。其中,该裁剪图像632中图像内容的放大倍率大于上述图6D所示裁剪图像631中图像内容的放大倍率。As shown in FIG. 6E , when the electronic device 100 receives the user's input operation on the determination control 613 in the third second, the electronic device 100 can obtain the original image 632a through the camera, and determine that the cropping frame 624 is in the original image location in 632a. The electronic device 100 may cut out the image in the cropping frame 624 on the original image 632a, and adjust the cutout image to a specified size to obtain the cropped image 632. The electronic device 100 may display the original image 632a in the framing presentation window 622, and display in the framing presentation window 622 the position of the cropping frame 624 on the original image 632a. The electronic device 100 may display the cropped image 632 on the photographing interface 620 . The magnification of the image content in the cropped image 632 is greater than the magnification of the image content in the cropped image 631 shown in FIG. 6D .
如图6F所示,当电子设备100接收到用户作用于上述确定控件613的输入操作后的第8秒时,电子设备100可以通过摄像头获取到原始图像633a,并确定出裁剪框在原始图像633a中的位置。电子设备100可以截取出原始图像633a上裁剪框624内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像633。电子设备100可以将原始图像633a显示在取景展示窗口622中,并在取景展示窗口622中显示裁剪框624在原始图像633a上的位置。电子设备100可以将裁剪图像633显示在拍摄界面620上。其中,该裁剪图像633中图像内容的放大倍率大于上述图6E所示裁剪图像632中图像内容的放大倍率。As shown in FIG. 6F , when the electronic device 100 receives the user's input operation on the determination control 613 at the 8th second, the electronic device 100 can obtain the original image 633a through the camera, and determine that the cropping frame is in the original image 633a in the location. The electronic device 100 can cut out the image in the cropping frame 624 on the original image 633a, and adjust the cutout image to a specified size to obtain the cropped image 633. The electronic device 100 may display the original image 633 a in the framing presentation window 622 and display the position of the cropping frame 624 on the original image 633 a in the framing presentation window 622 . The electronic device 100 may display the cropped image 633 on the photographing interface 620 . The magnification ratio of the image content in the cropped image 633 is greater than the magnification ratio of the image content in the cropped image 632 shown in FIG. 6E.
电子设备100可以接收用户作用于拍摄控件322的输入操作(例如单击),响应于该输入操作,电子设备100可以将拍摄界面620上显示的裁剪图像633保存为图片,并将该裁剪图像633的缩略图显示在回显控件321上。The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the photographing control 322, and in response to the input operation, the electronic device 100 may save the cropped image 633 displayed on the photographing interface 620 as a picture, and store the cropped image 633 is displayed on the echo control 321.
在一种可能的实现方式中,电子设备100可以在显示上述拍摄界面620的过程中,在拍摄界面620上显示抓拍提示信息,该抓拍提示信息可用于提示用户触发将拍摄界面620上显示的预览画面保存为图片。In a possible implementation manner, the electronic device 100 may display snapshot prompt information on the photography interface 620 during the process of displaying the above-mentioned photographing interface 620 , and the snapshot prompt information may be used to prompt the user to trigger the preview displayed on the photographing interface 620 The screen is saved as a picture.
在一种可能的实现方式中,当电子设备100接收到用户作用于上述拍摄界面620上拍摄控件322的输入操作(例如单击)时,响应于该输入操作,电子设备100可以将接收到该作用于拍摄控件322前后一段时间内的多帧裁剪图像保存为视频文件的视频画面。In a possible implementation manner, when the electronic device 100 receives an input operation (such as a single click) that the user acts on the shooting control 322 on the shooting interface 620, in response to the input operation, the electronic device 100 may receive the input operation. The multi-frame cropped images acting on the shooting control 322 for a period of time before and after are saved as video images of the video file.
在一种可能的实现方式中,电子设备100可以基于用户选择的运镜模板,从电子设备100裁剪出的多帧裁剪图像中确定出满足一定条件的一帧裁剪图像,并将这一帧裁剪图像保存为图片。In a possible implementation manner, the electronic device 100 may, based on the lens motion template selected by the user, determine a cropped image that satisfies a certain condition from the cropped images cropped by the electronic device 100, and crop the frame. Images are saved as pictures.
在一种可能的实现方式中,当电子设备100接收到用户作用于上述图6C中所述确定控件613的输入(例如单击)后,电子设备100可以自动将预设时间内的多帧裁剪图像保存为视频文件的视频画面。In a possible implementation manner, after the electronic device 100 receives the user's input (eg, click) acting on the determination control 613 described in FIG. 6C , the electronic device 100 can automatically crop the multiple frames within a preset time. The image is saved as the video footage of the video file.
如图6G所示,当电子设备100接收到用户作用于上述确定控件613的输入操作后的第12秒时,电子设备100可以通过摄像头获取到原始图像634a,并确定出裁剪框在原始图像634a中的位置。电子设备100可以截取出原始图像634a上裁剪框624内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像634。电子设备100可以将原始图像634a显示在取景展示窗口622中,并在取景展示窗口622中显示裁剪框624在原始图像634a上的位置。电子设备100可以将裁剪图像634显示在拍摄界面620上。其中,该裁剪图像634中图像内容的放大倍率小于上述图6F所示裁剪图像633中图像内容的放大倍率。回显控件321上可以显示上述裁剪图像633的缩略图。As shown in FIG. 6G , when the electronic device 100 receives the user's input operation on the determination control 613 in the 12th second, the electronic device 100 can obtain the original image 634a through the camera, and determine that the cropping frame is in the original image 634a in the location. The electronic device 100 may cut out the image in the cropping frame 624 on the original image 634a, and adjust the cutout image to a specified size to obtain the cropped image 634. The electronic device 100 may display the original image 634a in the framing presentation window 622 and display the position of the cropping frame 624 on the original image 634a in the framing presentation window 622 . The electronic device 100 may display the cropped image 634 on the photographing interface 620 . Wherein, the magnification ratio of the image content in the cropped image 634 is smaller than the magnification ratio of the image content in the cropped image 633 shown in FIG. 6F . Thumbnails of the above cropped images 633 may be displayed on the echo control 321 .
电子设备100可以接收用户作用于该回显控件346的输入操作(例如单击),响应于该输入操作,电子设备100可以显示如图6H所示的图片浏览界面640。The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the echo control 346, and in response to the input operation, the electronic device 100 may display a picture browsing interface 640 as shown in FIG. 6H.
如图6H所示,该图片浏览界面640可以包括有图片641、菜单642。其中,该图片641与上述图6F中所示的裁剪图像633相同。针对该菜单642的文字说明可以参考前述图3N所示实施例,在此不再赘述。As shown in FIG. 6H , the picture browsing interface 640 may include a picture 641 and a menu 642 . The picture 641 is the same as the cropped image 633 shown in FIG. 6F described above. For the text description of the menu 642, reference may be made to the aforementioned embodiment shown in FIG. 3N , which will not be repeated here.
在一种可能的实现方式中,电子设备100可以接收用户作用于拍摄控件322的输入操作 (例如长按),响应于该输入操作,电子设备100可以将拍摄界面620上显示的裁剪图像633和上述取景展示窗口622一起保存为图片。In a possible implementation manner, the electronic device 100 may receive an input operation (eg, long press) that the user acts on the shooting control 322 , and in response to the input operation, the electronic device 100 may convert the cropped image 633 and the cropped image 633 displayed on the shooting interface 620 and The above-mentioned viewfinder display window 622 is saved as a picture together.
下面介绍本申请实施例中涉及的运镜模板。The mirror motion templates involved in the embodiments of the present application are described below.
在一些实施例中,裁剪框可以是矩形的,上述裁剪框的中心可以与原始图像的中心处于同一位置,裁剪框的尺寸与原始图像的尺寸成比例关系。裁剪框的尺寸随着时间的推移可以从原始图像的尺寸逐渐成比例减小至预设最小尺寸,然后再从预设最小尺寸逐渐成比例变大至原始图像的尺寸。裁剪框可以循环重复上述变化过程。In some embodiments, the cropping frame may be rectangular, the center of the cropping frame may be at the same position as the center of the original image, and the size of the cropping frame is proportional to the size of the original image. The size of the cropping frame can be gradually proportionally reduced over time from the size of the original image to a preset minimum size, and then gradually increased proportionally from the preset minimum size to the size of the original image. The cropping frame can repeat the above changing process cyclically.
在一种可能的实现方式中,裁剪框的尺寸随着时间的推移可以先从预设最小尺寸逐渐成比例变大至原始图像的尺寸,然后再从原始图像的尺寸逐渐成比例减小至预设最小尺寸。裁剪框可以循环重复上述变化过程。In a possible implementation manner, the size of the cropping frame may first gradually increase proportionally from the preset minimum size to the original image size over time, and then gradually decrease proportionally from the original image size to the preset size. Set minimum size. The cropping frame can repeat the above changing process cyclically.
示例性的,如图7A所示,原始图像701为矩形。原始图像701的中心可以与裁剪框702的中心处于同一位置,即都处于位置704。预设最小尺寸区域703的中心也为位置704。裁剪框702的尺寸可以在原始图像701的尺寸与预设最小尺寸之间成比例变化。其中,裁剪框702的宽度可以为x,高度可以为y。原始图像701的宽度可以为A,高度可以为B。预设最小尺寸区域703的宽度可以为a,高度可以为b。其中,裁剪框702的宽度x,高度y可以满足以下关系:x/y=A/B=a/b且a≤x≤A(或b≤y≤B),裁剪框702的宽度x可以从宽度值A缩小至宽度值a,高度y可以从高度值B缩小至高度值b。Exemplarily, as shown in FIG. 7A , the original image 701 is a rectangle. The center of the original image 701 may be at the same position as the center of the crop frame 702 , ie, both at position 704 . The center of the preset minimum size area 703 is also the position 704 . The size of the crop box 702 may vary proportionally between the size of the original image 701 and the preset minimum size. The width of the crop frame 702 may be x, and the height may be y. The width of the original image 701 may be A, and the height may be B. The width of the preset minimum size area 703 may be a, and the height may be b. Wherein, the width x and height y of the cropping frame 702 may satisfy the following relationship: x/y=A/B=a/b and a≤x≤A (or b≤y≤B), the width x of the cropping frame 702 may be from The width value A is reduced to the width value a, and the height y can be reduced from the height value B to the height value b.
如图7B所示,裁剪框702的尺寸已减小至预设最小尺寸(宽度为a,高度为b)。As shown in FIG. 7B, the size of the crop box 702 has been reduced to a preset minimum size (width a, height b).
如图7C所示,当裁剪框702的尺寸缩小至预设最小尺寸后(宽度为a,高度为b),裁剪框702的尺寸可以逐渐变大至原始图像701的尺寸(宽度为A,高度为B)。As shown in FIG. 7C , when the size of the cropping frame 702 is reduced to a preset minimum size (width is a, height is b), the size of the cropping frame 702 can be gradually increased to the size of the original image 701 (width is A, height is for B).
电子设备100可以通过获取摄像头获取多帧原始图像,电子设备100可以根据裁剪框信息(包括裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹)确定裁剪框在每一帧原始图像中的位置。电子设备100可以根据裁剪框在每一帧原始图像中的位置,截取每一帧原始图像中裁剪框内的图像,调整至指定尺寸,得到多帧裁剪图像。电子设备100可以将这多帧裁剪图像,按照帧顺序依次显示在上述实施例中的拍摄界面或录像界面上。其中,电子设备100可以每裁剪出一帧裁剪图像,就将这帧裁剪图像显示在拍摄界面或录像界面上,也可以裁剪出多帧裁剪图像后,再将这多帧裁剪图像按照帧顺序依次显示在拍摄界面或录像界面上。The electronic device 100 may acquire multiple frames of original images by acquiring a camera, and the electronic device 100 may determine the cropping frame in each frame of the original image according to the cropping frame information (including the cropping frame size change rule and/or the motion trajectory of the cropping frame in the original image). in the location. The electronic device 100 can intercept the image within the cropping frame in each frame of the original image according to the position of the cropping frame in each frame of the original image, and adjust it to a specified size to obtain multiple frames of cropped images. The electronic device 100 may display the multiple frames of cropped images in sequence on the shooting interface or video recording interface in the above-mentioned embodiment. The electronic device 100 may display the cropped image on the shooting interface or the video recording interface every time a cropped image is cropped out, or after cropping out multiple frames of cropped images, the cropped images of the multiple frames are sequentially displayed in the frame order. Displayed on the shooting interface or video recording interface.
示例性的,如图7D所示,电子设备100通过摄像头获取到原始图像721,电子设备100可以根据裁剪框信息确定出原始图像721上的裁剪框712中心点与原始图像721的中心点处于同一位置,即都处于位置714。此时,裁剪框712的尺寸从原始图像721的尺寸成比例缩小至该原始图像721的尺寸与该预设最小尺寸之间。电子设备100可以截取出原始图像721上裁剪框712中的图像,并调整至指定尺寸得到裁剪图像722。电子设备100可以将裁剪图像722显示在上述拍摄界面或录像界面上。Exemplarily, as shown in FIG. 7D , the electronic device 100 obtains the original image 721 through the camera, and the electronic device 100 can determine, according to the cropping frame information, that the center point of the cropping frame 712 on the original image 721 is the same as the central point of the original image 721 . position, ie all at position 714. At this time, the size of the cropping frame 712 is proportionally reduced from the size of the original image 721 to be between the size of the original image 721 and the preset minimum size. The electronic device 100 can cut out the image in the cropping frame 712 on the original image 721 and adjust it to a specified size to obtain the cropped image 722 . The electronic device 100 may display the cropped image 722 on the above-mentioned shooting interface or video recording interface.
如图7E所示,电子设备100通过摄像头在获取到上述原始图像721后,获取到原始图像731。电子设备100可以根据裁剪框信息确定出原始图像731上的裁剪框712中心点与原始图像731的中心点处于同一位置,即都处于位置714。裁剪框712的尺寸此时从原始图像731的尺寸成比例缩小至预设最小尺寸,即裁剪框712的尺寸与预设最小尺寸区域713重合。电子设备100可以截取出原始图像731裁剪框712中的图像,并调整至指定尺寸得到裁剪图像732。其中,电子设备100可以将裁剪图像732显示在上述拍摄界面或录像界面上。其中,裁 剪图像732中景物的放大倍率大于上述图7D所示的裁剪图像722中景物的放大倍率。As shown in FIG. 7E , the electronic device 100 acquires the original image 731 after acquiring the above-mentioned original image 721 through the camera. The electronic device 100 may determine, according to the cropping frame information, that the center point of the cropping frame 712 on the original image 731 is at the same position as the central point of the original image 731 , that is, both are at the position 714 . The size of the cropping frame 712 is reduced proportionally from the size of the original image 731 to the preset minimum size, that is, the size of the cropping frame 712 coincides with the preset minimum size area 713 . The electronic device 100 can cut out the image in the cropping frame 712 of the original image 731 and adjust it to a specified size to obtain the cropped image 732 . The electronic device 100 may display the cropped image 732 on the above-mentioned shooting interface or video recording interface. The magnification of the scene in the cropped image 732 is greater than the magnification of the scene in the cropped image 722 shown in FIG. 7D.
如图7F所示,电子设备100通过摄像头在获取到上述原始图像731后,获取到原始图像741。电子设备100可以根据裁剪框信息确定出原始图像741上的裁剪框712中心点与原始图像741的中心点处于同一位置,即都处于位置714。此时,裁剪框712的尺寸从预设最小尺寸成比例放大至该原始图像741的尺寸与该预设最小尺寸之间。电子设备100可以截取出原始图像741上裁剪框712中的图像,并调整至指定尺寸得到裁剪图像742。电子设备100可以将裁剪图像742显示在上述拍摄界面或录像界面上。其中,裁剪图像742中景物的放大倍率小于上述图7D所示的裁剪图像742中景物的放大倍率。As shown in FIG. 7F , the electronic device 100 acquires the original image 741 after acquiring the above-mentioned original image 731 through the camera. The electronic device 100 may determine, according to the cropping frame information, that the center point of the cropping frame 712 on the original image 741 is at the same position as the central point of the original image 741 , that is, both are at the position 714 . At this time, the size of the cropping frame 712 is proportionally enlarged from the preset minimum size to between the size of the original image 741 and the preset minimum size. The electronic device 100 can cut out the image in the cropping frame 712 on the original image 741 and adjust it to a specified size to obtain the cropped image 742 . The electronic device 100 may display the cropped image 742 on the above-mentioned shooting interface or video recording interface. The magnification of the scene in the cropped image 742 is smaller than the magnification of the scene in the cropped image 742 shown in FIG. 7D .
在一些实施例中,上述裁剪框的中心可以与原始图像的中心不在同一位置。裁剪框的尺寸与原始图像的尺寸成比例关系变化。裁剪框的尺寸随着时间的推移可以从最大尺寸逐渐成比例减小至预设最小尺寸,然后再从预设最小尺寸逐渐成比例变大至最大尺寸。裁剪框可以循环重复上述变化过程。其中,电子设备100可以根据裁剪框的中心点以及原始图像的尺寸确定该裁剪框的最大尺寸。最大尺寸与原始图像成比例关系,裁剪框处于最大尺寸时,裁剪框的覆盖范围不超出原始图像,且裁剪框任一条边框与原始图像的边框相接触。In some embodiments, the center of the cropping frame may not be in the same position as the center of the original image. The size of the crop box changes in proportion to the size of the original image. The size of the crop box can be gradually reduced proportionally from the maximum size to the preset minimum size over time, and then gradually increased proportionally from the preset minimum size to the maximum size. The cropping frame can repeat the above changing process cyclically. The electronic device 100 may determine the maximum size of the cropping frame according to the center point of the cropping frame and the size of the original image. The maximum size is proportional to the original image. When the cropping frame is at the maximum size, the coverage of the cropping frame does not exceed the original image, and any border of the cropping frame is in contact with the border of the original image.
在一种可能的实现方式中,裁剪框的尺寸随着时间的推移可以从预设最小尺寸逐渐成比例变大至最大尺寸,然后再从最大尺寸逐渐成比例变小至预设最小尺寸。裁剪框可以循环重复上述变化过程。In a possible implementation manner, the size of the cropping frame may gradually increase proportionally from the preset minimum size to the maximum size over time, and then gradually decrease proportionally from the maximum size to the preset minimum size. The cropping frame can repeat the above changing process cyclically.
示例性的,如图8A所示,原始图像801为矩形。原始图像801的中心可以与裁剪框802的中心处于不同的位置,原始图像801的中心可以在位置806,裁剪框802的中心可以在位置805,预设最小尺寸区域803的中心也在位置805,最大尺寸区域804的中心也在位置805。其中,最大尺寸区域804的任一条边框(例如下边框)与原始图像的边框相接触。其中,裁剪框8002的宽度为x,高度可以为y。原始图像801的宽度可以为A,高度可以为B。预设最小尺寸区域803的宽度可以为a,高度可以为b。最大尺寸区域804的宽度可以为c,高度可以为d。其中,裁剪框802的宽度x,高度y可以满足以下关系:x/y=A/B=a/b=c/d且a≤x≤c(或b≤y≤d),裁剪框802的宽度x可以从宽度值c缩小至宽度值a,高度y可以从高度值d缩小至高度值b。Exemplarily, as shown in FIG. 8A , the original image 801 is a rectangle. The center of the original image 801 may be at a different position from the center of the cropping frame 802, the center of the original image 801 may be at position 806, the center of the cropping frame 802 may be at position 805, and the center of the preset minimum size area 803 is also at position 805, The center of maximum size area 804 is also at location 805 . Wherein, any frame (eg, the lower frame) of the maximum size area 804 is in contact with the frame of the original image. The width of the cropping frame 8002 is x, and the height may be y. The width of the original image 801 may be A, and the height may be B. The width of the preset minimum size area 803 may be a, and the height may be b. The maximum size area 804 may have a width of c and a height of d. Wherein, the width x and height y of the cropping frame 802 may satisfy the following relationship: x/y=A/B=a/b=c/d and a≤x≤c (or b≤y≤d), the width of the cropping frame 802 The width x can be reduced from the width value c to the width value a, and the height y can be reduced from the height value d to the height value b.
如图8B所示,裁剪框802的尺寸已减小至预设最小尺寸(宽度为a,高度为b)。As shown in FIG. 8B, the size of the crop frame 802 has been reduced to a preset minimum size (width a, height b).
如图8C所示,当裁剪框802的尺寸缩小至预设最小尺寸后(宽度为a,高度为b),裁剪框802的尺寸可以逐渐变大至原始图像801的尺寸(宽度为c,高度为d)。As shown in FIG. 8C , when the size of the cropping frame 802 is reduced to a preset minimum size (width is a, height is b), the size of the cropping frame 802 can be gradually increased to the size of the original image 801 (width is c, height is for d).
电子设备100可以通过获取摄像头获取多帧原始图像,电子设备100可以根据裁剪框信息(包括裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹)确定裁剪框在每一帧原始图像中的位置。电子设备100可以根据裁剪框在每一帧原始图像中的位置,截取每一帧原始图像中裁剪框内的图像,调整至指定尺寸,得到多帧裁剪图像。电子设备100可以将这多帧裁剪图像,按照帧顺序依次显示在上述实施例中的拍摄界面或录像界面上。其中,电子设备100可以每裁剪出一帧裁剪图像,就将这帧裁剪图像显示在拍摄界面或录像界面上,也可以裁剪出多帧裁剪图像后,再将这多帧裁剪图像按照帧顺序依次显示在拍摄界面或录像界面上。The electronic device 100 may acquire multiple frames of original images by acquiring a camera, and the electronic device 100 may determine the cropping frame in each frame of the original image according to the cropping frame information (including the cropping frame size change rule and/or the motion trajectory of the cropping frame in the original image). in the location. The electronic device 100 can intercept the image within the cropping frame in each frame of the original image according to the position of the cropping frame in each frame of the original image, and adjust it to a specified size to obtain multiple frames of cropped images. The electronic device 100 may display the multiple frames of cropped images in sequence on the shooting interface or video recording interface in the above-mentioned embodiment. The electronic device 100 may display a cropped image on a shooting interface or a video recording interface every time a frame of cropped image is cropped, or after cropping out multiple frames of cropped images, the multiple frames of cropped images are sequentially displayed in frame order. Displayed on the shooting interface or video recording interface.
示例性的,如图8D所示,电子设备100通过摄像头获取到原始图像821,电子设备100可以根据裁剪框信息确定出原始图像821上的裁剪框812中心点在位置815。此时,裁剪框812的尺寸从最大尺寸成比例缩小至该最大尺寸与预设最小尺寸之间。电子设备100可以截 取出原始图像821上裁剪框812中的图像,并调整至指定尺寸得到裁剪图像822。电子设备100可以将裁剪图像822显示在上述拍摄界面或录像界面上。Exemplarily, as shown in FIG. 8D , the electronic device 100 obtains the original image 821 through the camera, and the electronic device 100 may determine that the center point of the cropping frame 812 on the original image 821 is at the position 815 according to the cropping frame information. At this time, the size of the cropping frame 812 is proportionally reduced from the maximum size to between the maximum size and the preset minimum size. The electronic device 100 can cut out the image in the cropping frame 812 on the original image 821, and adjust it to a specified size to obtain the cropped image 822. The electronic device 100 may display the cropped image 822 on the above-mentioned shooting interface or video recording interface.
如图8E所示,电子设备100通过摄像头在获取到上述原始图像821后,获取到原始图像831。电子设备100可以根据裁剪框信息确定出原始图像831上的裁剪框812中心点在位置815。裁剪框812的尺寸此时从最大尺寸成比例缩小至预设最小尺寸,即裁剪框812的尺寸与预设最小尺寸区域813重合。电子设备100可以截取出原始图像831上裁剪框812中的图像,并调整至指定尺寸得到裁剪图像832。其中,电子设备100可以将裁剪图像832显示在上述拍摄界面或录像界面上。其中,裁剪图像832中景物的放大倍率大于上述图8D所示的裁剪图像822中景物的放大倍率。As shown in FIG. 8E , the electronic device 100 acquires the original image 831 after acquiring the above-mentioned original image 821 through the camera. The electronic device 100 may determine that the center point of the cropping frame 812 on the original image 831 is at the position 815 according to the cropping frame information. At this time, the size of the cropping frame 812 is proportionally reduced from the maximum size to the preset minimum size, that is, the size of the cropping frame 812 coincides with the preset minimum size area 813 . The electronic device 100 can cut out the image in the cropping frame 812 on the original image 831 and adjust it to a specified size to obtain the cropped image 832 . The electronic device 100 may display the cropped image 832 on the above-mentioned shooting interface or video recording interface. The magnification of the scene in the cropped image 832 is greater than the magnification of the scene in the cropped image 822 shown in FIG. 8D .
如图8F所示,电子设备100通过摄像头在获取到上述原始图像831后,获取到原始图像841。电子设备100可以根据裁剪框信息确定出原始图像841上的裁剪框712中心点在位置815。此时,裁剪框812的尺寸从预设最小尺寸成比例放大至该最大尺寸与该预设最小尺寸之间。电子设备100可以截取出原始图像841上裁剪框812中的图像,并调整至指定尺寸得到裁剪图像842。电子设备100可以将裁剪图像842显示在上述拍摄界面或录像界面上。其中,裁剪图像842中景物的放大倍率小于上述图8D所示的裁剪图像842中景物的放大倍率。As shown in FIG. 8F , the electronic device 100 acquires the original image 841 after acquiring the above-mentioned original image 831 through the camera. The electronic device 100 may determine that the center point of the cropping frame 712 on the original image 841 is at the position 815 according to the cropping frame information. At this time, the size of the cropping frame 812 is proportionally enlarged from the preset minimum size to between the maximum size and the preset minimum size. The electronic device 100 can cut out the image in the cropping frame 812 on the original image 841 and adjust it to a specified size to obtain the cropped image 842 . The electronic device 100 may display the cropped image 842 on the above-mentioned shooting interface or video recording interface. The magnification of the scene in the cropped image 842 is smaller than the magnification of the scene in the cropped image 842 shown in FIG. 8D .
在一种可能的实现方式中,上述裁剪框的中心可以与原始图像的中心不在同一位置。裁剪框的尺寸与原始图像的尺寸成比例关系变化。首先,裁剪框的中心点可以固定,裁剪框尺寸随着时间的推移可以从预设最小尺寸逐渐增大至裁剪框的第一边接触到原始图像的边界。然后,裁剪框保持第一边与原始图像的边界接触,裁剪框的中心点可移动,裁剪框的尺寸继续增大至裁剪框的第一边和第二边都接触到原始图像的边界。接着,保持裁剪框的第一边和第二边与原始图像的边界接触,裁剪框的中心点可移动,裁剪框的尺寸继续增大至原始图像的尺寸。裁剪框可以重复上述变化过程。In a possible implementation manner, the center of the cropping frame may not be at the same position as the center of the original image. The size of the crop box changes in proportion to the size of the original image. First, the center point of the cropping frame can be fixed, and the size of the cropping frame can gradually increase from a preset minimum size over time until the first side of the cropping frame touches the boundary of the original image. Then, the cropping box keeps the first side in contact with the boundary of the original image, the center point of the cropping box can be moved, and the size of the cropping box continues to increase until both the first and second sides of the cropping box touch the boundary of the original image. Then, keeping the first and second sides of the cropping frame in contact with the boundary of the original image, the center point of the cropping frame can be moved, and the size of the cropping frame continues to increase to the size of the original image. The cropping box can repeat the above changing process.
示例性的,如图8G所示,在t1时刻,裁剪框803的中心点处于原始图像801上的位置点805,原始图像801的中心点处于位置点806,不在同一位置。裁剪框803的尺寸为预设最小尺寸。在t2时刻,裁剪框803的中心点处于位置点805,相对于t1时刻不变,裁剪框803的尺寸成比例增大。在t3时刻,裁剪框803的中心点处于位置点805,相对于t1时刻不变,裁剪框803的尺寸成比例增大至裁剪框803的下边框与原始图像801的下边界接触。在t3~t4时间段内,裁剪框803的下边框与原始图像801的下边界始终接触,裁剪框803的尺寸成比例增大。在t4时刻,裁剪框803的中心点相对于t1时刻有位移裁剪框803的尺寸成比例增大至裁剪框803的下边框与原始图像801的下边界接触,裁剪框803的左边框与原始图像801的左边界接触。在t4~t5时间段内,裁剪框803的下边框与原始图像801的下边界始终接触且裁剪框803的左边框与原始图像801的左边界始终接触,裁剪框803的尺寸成比例增大。在t5时刻,裁剪框803的尺寸增大至原始图像的尺寸。Exemplarily, as shown in FIG. 8G, at time t1, the center point of the cropping frame 803 is at the position point 805 on the original image 801, and the center point of the original image 801 is at the position point 806, which are not at the same position. The size of the cropping frame 803 is a preset minimum size. At time t2, the center point of the cropping frame 803 is at the position point 805, and the size of the cropping frame 803 increases proportionally relative to the time t1 unchanged. At time t3, the center point of the cropping frame 803 is at the position point 805, and the size of the cropping frame 803 is proportionally increased relative to the time t1 until the lower border of the cropping frame 803 contacts the lower border of the original image 801. During the time period from t3 to t4, the lower border of the cropping frame 803 is always in contact with the lower border of the original image 801, and the size of the cropping frame 803 increases proportionally. At time t4, the center point of the cropping frame 803 is displaced relative to the time t1, and the size of the cropping frame 803 is proportionally increased until the lower border of the cropping frame 803 is in contact with the lower border of the original image 801, and the left border of the cropping frame 803 is in contact with the original image. The left border of 801 touches. During the time period from t4 to t5, the lower border of the cropping frame 803 is always in contact with the lower border of the original image 801 and the left border of the cropping frame 803 is always in contact with the left border of the original image 801, and the size of the cropping frame 803 increases proportionally. At time t5, the size of the crop frame 803 is increased to the size of the original image.
在一些实施例中,上述裁剪框的尺寸可以为固定尺寸,裁剪框的中心点可以在原始图像上按照预设轨迹移动。其中,原始图像可以为矩形,裁剪框也可以为矩形,裁剪框的宽度与高度的比值等于原始图像的宽度与高度的比值。In some embodiments, the size of the cropping frame may be a fixed size, and the center point of the cropping frame may move according to a preset trajectory on the original image. The original image may be a rectangle, the cropping frame may also be a rectangle, and the ratio of the width to the height of the cropping frame is equal to the ratio of the width to the height of the original image.
示例性的,如图9A所示,裁剪框912的中心点913可以在位置922和位置923之间以直线轨迹921在原始图像911上左右移动。当裁剪框912的中心点913处于位置922时,裁剪框912的左边框可以与原始图像911的左边框重合。当裁剪框912的中心点913处于位置923时,裁剪框912的右边框可以与原始图像911的右边框重合。Exemplarily, as shown in FIG. 9A , the center point 913 of the cropping frame 912 may move left and right on the original image 911 with a straight trajectory 921 between the position 922 and the position 923 . When the center point 913 of the cropping frame 912 is at the position 922 , the left border of the cropping frame 912 may coincide with the left border of the original image 911 . When the center point 913 of the cropping frame 912 is at the position 923 , the right border of the cropping frame 912 may coincide with the right border of the original image 911 .
如图9B所示,裁剪框912的中心点913可以在位置932和位置933之间以直线轨迹931在原始图像911上上下移动。当裁剪框912的中心点913可以处于位置932时,裁剪框912的上边框可以与原始图像911的上边框重合。当裁剪框912的中心点913处于位置933时,裁剪框912的下边框可以与原始图像911的下边框重合。As shown in FIG. 9B , the center point 913 of the crop frame 912 may move up and down on the original image 911 in a straight line trajectory 931 between the position 932 and the position 933 . When the center point 913 of the cropping frame 912 may be at the position 932 , the upper border of the cropping frame 912 may coincide with the upper border of the original image 911 . When the center point 913 of the cropping frame 912 is at the position 933 , the lower border of the cropping frame 912 may coincide with the lower border of the original image 911 .
如图9C所示,裁剪框912的中心点913可以在位置942和位置943之间以直线轨迹941在原始图像911上在左上角到右下角移动。当裁剪框912的中心点913可以处于位置942时,裁剪框912的上边框可以与原始图像911的上边框重合,裁剪框912的左边框可以与原始图像911的左边框重合。当裁剪框912的中心点913处于位置943时,裁剪框912的下边框可以与原始图像911的下边框重合,裁剪框912的右边框可以与原始图像911的右边框重合。As shown in FIG. 9C , the center point 913 of the crop box 912 may move from the upper left corner to the lower right corner on the original image 911 in a straight line trajectory 941 between the position 942 and the position 943 . When the center point 913 of the cropping frame 912 may be at position 942 , the upper border of the cropping frame 912 may coincide with the upper border of the original image 911 , and the left border of the cropping frame 912 may coincide with the left border of the original image 911 . When the center point 913 of the cropping frame 912 is at position 943 , the lower border of the cropping frame 912 may coincide with the lower border of the original image 911 , and the right border of the cropping frame 912 may coincide with the right border of the original image 911 .
如图9D所示,裁剪框912的中心点913可以在位置952和位置953之间以直线轨迹951在原始图像911上在左下角到右上角移动。当裁剪框912的中心点913可以处于位置952时,裁剪框912的下边框可以与原始图像911的下边框重合,裁剪框912的左边框可以与原始图像911的左边框重合。当裁剪框912的中心点913处于位置953时,裁剪框912的上边框可以与原始图像911的上边框重合,裁剪框912的右边框可以与原始图像911的右边框重合。As shown in FIG. 9D , the center point 913 of the crop box 912 may move from the lower left corner to the upper right corner on the original image 911 in a straight line trajectory 951 between positions 952 and 953 . When the center point 913 of the cropping frame 912 may be at position 952 , the lower border of the cropping frame 912 may coincide with the lower border of the original image 911 , and the left border of the cropping frame 912 may coincide with the left border of the original image 911 . When the center point 913 of the cropping frame 912 is at the position 953 , the upper border of the cropping frame 912 may coincide with the upper border of the original image 911 , and the right border of the cropping frame 912 may coincide with the right border of the original image 911 .
如图9E所示,裁剪框912的中心点913的运动轨迹961可以为心形图形,其中,裁剪框912可以在该运动轨迹961上按照顺时针或者逆时针运动。裁剪框912在该运动轨迹961上按照顺时针或者逆时针运动时,始终不超出原始图像911的尺寸范围。As shown in FIG. 9E , the motion trajectory 961 of the center point 913 of the cropping frame 912 may be a heart shape, wherein the cropping frame 912 may move clockwise or counterclockwise on the motion trajectory 961 . When the cropping frame 912 moves clockwise or counterclockwise on the motion track 961 , it always does not exceed the size range of the original image 911 .
如图9F所示,裁剪框912的中心点913的运动轨迹971可以为圆形图形,其中,裁剪框912可以在该运动轨迹971上按照顺时针或者逆时针运动。裁剪框912在该运动轨迹971上按照顺时针或者逆时针运动时,始终不超出原始图像911的尺寸范围。As shown in FIG. 9F , the motion trajectory 971 of the center point 913 of the cropping frame 912 may be a circular figure, wherein the cropping frame 912 may move clockwise or counterclockwise on the motion trajectory 971 . When the cropping frame 912 moves clockwise or counterclockwise on the motion track 971 , it always does not exceed the size range of the original image 911 .
需要说明的是,上述裁剪框912的中心点912在原始图像911中的运动轨迹不限于上述图形,还可以有其他图形,例如,横“8”曲线图形、贝塞尔曲线图形、圆弧曲线图形,等等。It should be noted that the motion trajectory of the center point 912 of the cropping frame 912 in the original image 911 is not limited to the above-mentioned graphs, and may also have other graphs, for example, a horizontal “8” curve graph, a Bezier curve graph, a circular arc curve graphics, etc.
在一种可能的实现方式中,电子设备100在运镜拍照或录像模式下,在拍摄界面或录像界面上显示出取景展示窗口时,电子设备100可以在上述取景展示窗口中显示出裁剪框在原始图像上的运动轨迹。当裁剪框在沿着该运动轨迹运动完一次时,电子设备100可以显示出在取景展示窗口中显示特效(例如烟花特效、万花筒特效、心形跳动特效等等特效)。In a possible implementation manner, when the electronic device 100 displays a viewfinder display window on the shooting interface or video recording interface in the camera or video mode, the electronic device 100 may display the cropping frame in the viewfinder display window above. Motion trajectory on the original image. When the cropping frame moves along the motion track once, the electronic device 100 may display special effects (such as fireworks special effects, kaleidoscope special effects, heart-shaped beating special effects, etc.) in the viewfinder display window.
示例性的,如图9G所示,电子设备100可以显示拍摄界面980。该拍摄界面980可以包括有运镜模板切换控件981、取景展示窗口982、裁剪图像991、一个或多个拍摄模式控件。其中,针对一个或多个拍摄模式控件的文字描述可以参考前述图3B所示实施例,在此不再赘述。该运镜模板切换控件981上显示有电子设备100当前采用的运镜模板的名称(例如“圆形运镜”)。电子设备100可以在取景展示窗口982中显示此时获取到的原始图像991a、关闭控件983、裁剪框984以及裁剪框984的运动轨迹。电子设备100基于该原始图像991a和裁剪框984在原始图像991a中的位置,裁剪获得该裁剪图像991。Exemplarily, as shown in FIG. 9G , the electronic device 100 may display a photographing interface 980 . The shooting interface 980 may include a lens motion template switching control 981, a viewfinder display window 982, a cropped image 991, and one or more shooting mode controls. For the text description of one or more shooting mode controls, reference may be made to the aforementioned embodiment shown in FIG. 3B , and details are not repeated here. The moving template switching control 981 displays the name of the moving template currently used by the electronic device 100 (for example, "circular moving"). The electronic device 100 may display the original image 991 a obtained at this time, the closing control 983 , the cropping frame 984 , and the motion track of the cropping frame 984 in the viewfinder display window 982 . The electronic device 100 obtains the cropped image 991 by cropping based on the original image 991a and the position of the cropping frame 984 in the original image 991a.
如图9H所示,裁剪框984按照预设运动轨迹(例如圆形轨迹)移动完一次。电子设备100可以通过摄像头获取到原始图像992a,并将原始图像992a显示在取景展示窗口982中。电子设备100可以截取出原始图像992a上处于裁剪框984内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像992。电子设备100可以将裁剪图像992显示在拍摄界面980上,并显示出特效画面986(例如烟花特效画面等等)。As shown in FIG. 9H , the cropping frame 984 moves once according to a preset motion trajectory (eg, a circular trajectory). The electronic device 100 may acquire the original image 992 a through the camera, and display the original image 992 a in the viewfinder display window 982 . The electronic device 100 may cut out the image in the cropping frame 984 on the original image 992a, and adjust the cutout image to a specified size to obtain the cropped image 992. The electronic device 100 may display the cropped image 992 on the shooting interface 980, and display a special effect picture 986 (eg, a fireworks special effect picture, etc.).
在一种可能的实现方式中,当裁剪框按照预设运动轨迹(例如圆形轨迹)移动完一次。电子设备100可以在拍摄界面上显示出特效画面,并在显示特性画面的同时,调整裁剪框的 尺寸随时间推移逐渐变大至原始图像的尺寸,并将裁剪框中的裁剪图像显示在拍摄界面或录像界面上。In a possible implementation manner, when the cropping frame moves according to a preset motion trajectory (for example, a circular trajectory) once. The electronic device 100 can display a special effect picture on the shooting interface, and while displaying the characteristic picture, adjust the size of the cropping frame to gradually increase to the size of the original image over time, and display the cropped image in the cropping frame on the shooting interface. or on the recording interface.
其中,当电子设备100在运镜录像模式下,在录像界面上显示上述取景展示窗口时,电子设备100可以接收用户结束录像的输入,响应于该输入,电子设备100可以将录像时间内录像界面上显示的裁剪图像和上述特效画面一起保存为视频文件中的视频画面。或者,电子设备100还可以将录像时间内录像界面上显示的裁剪图像、上述取景展示窗口一起保存为视频文件中的视频画面。或者,电子设备100还可以将录像时间内录像界面上显示的裁剪图像、上述特效画面以及上述取景展示窗口一起保存为视频文件中的视频画面。Wherein, when the electronic device 100 displays the above-mentioned viewfinder display window on the video recording interface in the mirror-moving video recording mode, the electronic device 100 can receive the user's input of ending the video recording, and in response to the input, the electronic device 100 can record the video recording interface within the video recording time. The cropped image shown above is saved as a video image in the video file together with the above-mentioned special effect image. Alternatively, the electronic device 100 may also save the cropped image displayed on the recording interface during the recording time together with the above-mentioned viewfinder display window as a video picture in the video file. Alternatively, the electronic device 100 may also save the cropped image displayed on the recording interface during the recording time, the above-mentioned special effect picture, and the above-mentioned viewfinder display window together as a video picture in the video file.
示例性的,如图9I所示,电子设备100在将录像时间内录像界面上显示的裁剪图像、上述特效画面以及上述取景展示窗口一起保存为视频995中的视频画面之后,可以显示视频预览界面993。该视频预览界面993可以包括圆形运镜模式下拍摄的视频995、视频播放控件994a、其中,该视频995的视频画面中包括有基于摄像头获取到的原始图像裁剪后的裁剪图像以及取景展示窗口994b。其中该取景展示窗口994b包括有裁剪框994c和摄像头获取到的原始图像995a。Exemplarily, as shown in FIG. 9I , after the electronic device 100 saves the cropped image, the above-mentioned special effect picture and the above-mentioned framing display window displayed on the video recording interface during the video recording time together as the video picture in the video 995, the video preview interface can be displayed. 993. The video preview interface 993 may include a video 995 shot in a circular motion mode, and a video playback control 994a, wherein the video screen of the video 995 includes a cropped image and a viewfinder display window after cropping based on the original image obtained by the camera 994b. The framing display window 994b includes a cropping frame 994c and an original image 995a obtained by the camera.
电子设备100接收用户作用于该视频播放控件994a的输入操作(例如单击),响应于该输入操作,电子设备100可以播放该视频995。The electronic device 100 receives an input operation (eg, a single click) of the user acting on the video playback control 994a, and in response to the input operation, the electronic device 100 can play the video 995.
如图9J所示,当视频995播放到第3秒时,电子设备100可以在该视频预览界面993上显示视频画面996。该视频画面996中包括有取景展示窗口994b、裁剪框994c在摄像头获取到的原始图像996a上的位置、以及基于裁剪框994c从原始图像996a上裁剪出的裁剪图像。该取景展示窗口994b中还可以显示出裁剪框994c的运动轨迹。As shown in FIG. 9J , when the video 995 is played to the 3rd second, the electronic device 100 may display a video screen 996 on the video preview interface 993 . The video frame 996 includes a viewfinder display window 994b, the position of the cropping frame 994c on the original image 996a obtained by the camera, and a cropped image cropped from the original image 996a based on the cropping frame 994c. The framing display window 994b can also display the motion track of the cropping frame 994c.
如图9K所示,当视频995播放到第12秒时,电子设备100可以在该视频预览界面993上显示视频画面997。该视频画面997中包括有取景展示窗口994b、裁剪框994c在摄像头获取到的原始图像997a上的位置、以及基于裁剪框994c从原始图像997a上裁剪出的裁剪图像和特效画面(例如烟花特效画面等等)。As shown in FIG. 9K , when the video 995 is played to the 12th second, the electronic device 100 may display a video screen 997 on the video preview interface 993 . The video screen 997 includes a viewfinder display window 994b, the position of the cropping frame 994c on the original image 997a obtained by the camera, and the cropped image and special effect screen (such as a fireworks special effect screen) cropped from the original image 997a based on the cropping frame 994c and many more).
在一些实施例中,裁剪框的尺寸与原始图像的尺寸成比例变化,同时,裁剪框的中心点可以在原始图像上按照预设轨迹移动。其中,裁剪框的尺寸可以随着时间的推移可以从原始图像的尺寸逐渐成比例减小至预设最小尺寸,然后再从预设最小尺寸逐渐成比例变大至原始图像的尺寸。其中,原始图像可以为矩形,裁剪框也可以为矩形,裁剪框的宽度与高度的比值等于原始图像的宽度与高度的比值。In some embodiments, the size of the cropping frame changes in proportion to the size of the original image, and at the same time, the center point of the cropping frame can move according to a preset track on the original image. Wherein, the size of the cropping frame may gradually decrease proportionally from the size of the original image to the preset minimum size over time, and then gradually increase proportionally from the preset minimum size to the size of the original image. The original image may be a rectangle, the cropping frame may also be a rectangle, and the ratio of the width to the height of the cropping frame is equal to the ratio of the width to the height of the original image.
在一些应用场景中,电子设备100可以在将摄像头获取到的原始图像作为预览画面显示在拍摄界面中时,接收用户自定义在原始图像中设置裁剪框的中心点。电子设备100可以基于原始图像的尺寸和裁剪框的中心点、确定出裁剪框的最大尺寸和最小尺寸。电子设备100可以基于裁剪框的最大尺寸和最小尺寸,以及裁剪框的尺寸在最大尺寸和最小尺寸之间成比例变化的速度,确定裁剪框在每一帧原始图像中的位置和尺寸。电子设备100可以基于裁剪框在每一帧原始图像中的位置和尺寸,截取出每一帧原始图像上裁剪框内的图像,并将截取后的图像作为预览画面显示在拍摄界面中。这样,可以方便用户自定义选择裁剪框的中心点,电子设备100可以将拍摄画面的中心点对准拍摄主体,使得拍摄主体更加清晰。In some application scenarios, the electronic device 100 may receive a user-defined setting of the center point of the cropping frame in the original image when displaying the original image obtained by the camera as a preview image in the shooting interface. The electronic device 100 may determine the maximum size and the minimum size of the cropping frame based on the size of the original image and the center point of the cropping frame. The electronic device 100 may determine the position and size of the cropping frame in each frame of the original image based on the maximum size and the minimum size of the cropping frame, and the speed at which the size of the cropping frame changes proportionally between the maximum size and the minimum size. The electronic device 100 may, based on the position and size of the cropping frame in each frame of the original image, cut out the image within the cropping frame on each frame of the original image, and display the cutout image on the shooting interface as a preview image. In this way, it is convenient for the user to customize the selection of the center point of the cropping frame, and the electronic device 100 can align the center point of the shooting image with the shooting subject, so that the shooting subject is clearer.
示例性的,如图10A所示,电子设备100可以显示有运镜模板选择界面610。其中,针对该运镜选择界面610的文字描述可以参考前述图6B所示实施例,在此不再赘述。其中, 在运镜选择界面610中选择框612已选中“旅行”运镜模板611A。Exemplarily, as shown in FIG. 10A , the electronic device 100 may display a mirror motion template selection interface 610 . Wherein, for the text description of the lens movement selection interface 610, reference may be made to the aforementioned embodiment shown in FIG. 6B , which will not be repeated here. Wherein, in the selection box 612 of the camera movement selection interface 610, the "travel" camera movement template 611A has been selected.
如图10B所示,电子设备100可以接收用户针对“自定义”运镜模板选项611D的输入(例如单击),响应于该输入,电子设备100可以移动选择框612选中“自定义”运镜模板选项611D。其中,当选择框612选中“自定义”运镜模板选项611D时,电子设备100可以关闭显示运镜模板展示区614和运镜轨迹展示区616,并显示出提示框1011。其中该提示框1011可用于显示对“自定义”运镜模板的功能描述,该功能描述可以是文字(例如“您可以自定义设置运镜中心点”等等)、图片、视频等等。As shown in FIG. 10B , the electronic device 100 may receive user input (eg, a click) for the "custom" motion template option 611D, and in response to the input, the electronic device 100 may move the selection box 612 to select the "custom" motion template Template option 611D. Wherein, when the “custom” motion template option 611D is selected in the selection box 612 , the electronic device 100 can close and display the motion template display area 614 and the motion track display area 616 , and display a prompt box 1011 . The prompt box 1011 can be used to display the function description of the "customized" mirror movement template, and the function description can be text (for example, "you can customize the center point of mirror movement", etc.), pictures, videos, and so on.
电子设备100可以接收用户作用于确定控件613的输入操作(例如单击),响应于该输入操作,电子设备100可以显示如图10C所示的拍摄界面1020。The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the determination control 613 , and in response to the input operation, the electronic device 100 may display a photographing interface 1020 as shown in FIG. 10C .
如图10C所示,该拍摄界面1020可以包括取景展示窗口1021、原始图像1031、提示信息1025、确定控件1026、运镜模板切换控件1027、位置标记1028、一个或多个拍摄模式控件(例如,“夜景模式”控件327A、“人像模式”控件327B、“大光圈”控件327C、“运镜”模式控件327H、“普通拍照模式”控件327D、“录像模式”控件327E、“专业模式”控件327F等等)、回显控件321、拍摄控件322、摄像头转换控件323。其中,针对一个或多个拍摄模式控件、回显控件321、拍摄控件322和摄像头转换控件323的文字描述,可以参考前述图3B所示实施例,在此不再赘述。该运镜模板切换控件1027可用于触发电子设备100切换用户选中的运镜模板,该运镜模板切换控件1027上显示有当前电子设备100已选中运镜模板的名称(例如“自定义运镜”)。该取景展示窗口1021可以显示有关闭控件1022、原始图像1031a(与原始图像1031的图像内容相同,显示比例不同)、裁剪框1023、裁剪框1023在原始图像1031a的中心点1024。该关闭控件1022可用于触发电子设备100关闭该取景展示窗口1021。该提示信息1025可用于提示用户在原始图像1031上调整裁剪框1024的中心点1023在图像上的位置。该位置标记1028可用于提示在原始图像1031a上裁剪框1024的中心点1023当前所处的位置。As shown in FIG. 10C , the shooting interface 1020 may include a viewfinder display window 1021, an original image 1031, prompt information 1025, a determination control 1026, a lens motion template switching control 1027, a position marker 1028, and one or more shooting mode controls (eg, "Night Scene Mode" Control 327A, "Portrait Mode" Control 327B, "Large Aperture" Control 327C, "Mirror" Mode Control 327H, "Normal Photo Mode" Control 327D, "Video Mode" Control 327E, "Pro Mode" Control 327F etc.), echo control 321, capture control 322, camera conversion control 323. For the text description of one or more shooting mode controls, echo control 321 , shooting control 322 and camera conversion control 323 , reference may be made to the embodiment shown in FIG. 3B , which will not be repeated here. The mirror movement template switching control 1027 can be used to trigger the electronic device 100 to switch the mirror movement template selected by the user, and the mirror movement template switching control 1027 displays the name of the mirror movement template currently selected by the electronic device 100 (for example, "custom mirror movement" ). The viewfinder display window 1021 may display a close control 1022, an original image 1031a (same image content as the original image 1031, but with a different display scale), a cropping frame 1023, and the cropping frame 1023 at the center point 1024 of the original image 1031a. The close control 1022 can be used to trigger the electronic device 100 to close the viewfinder display window 1021 . The prompt information 1025 can be used to prompt the user to adjust the position of the center point 1023 of the cropping frame 1024 on the image on the original image 1031 . The position marker 1028 may be used to indicate the current position of the center point 1023 of the cropping frame 1024 on the original image 1031a.
如图10D所示,电子设备100可以接收用户针对该位置标记1028的输入(例如拖动),响应于该输入操作,电子设备100可以调整该位置标记1028在原始图像1031a上的显示位置。其中,当该位置标记1028在原始图像1031上的位置被移动后,电子设备100可以调整该取景展示窗口1021中裁剪框1024的中心点1023在原始图像1031a上的位置。As shown in FIG. 10D , the electronic device 100 may receive an input (eg, dragging) of the position marker 1028 from the user, and in response to the input operation, the electronic device 100 may adjust the display position of the position marker 1028 on the original image 1031a. Wherein, after the position of the position marker 1028 on the original image 1031 is moved, the electronic device 100 can adjust the position of the center point 1023 of the cropping frame 1024 in the viewfinder display window 1021 on the original image 1031a.
如图10E所示,电子设备100可以接收用户针对该确定控件1026的输入(例如单击),响应于该输入,电子设备100可以截取出原始图像上在裁剪框内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像。电子设备100可以将裁剪图像作为预览画面显示在拍摄界面上。电子设备100还可以响应于用户针对该确定控件1026的输入,不显示上述提示信息1025和上述确定控件1026。As shown in FIG. 10E , the electronic device 100 may receive an input (eg, a single click) of the determination control 1026 from the user, and in response to the input, the electronic device 100 may capture the image within the cropping frame on the original image, and will capture the The image is resized to the specified size to get a cropped image. The electronic device 100 may display the cropped image as a preview image on the shooting interface. The electronic device 100 may also not display the above-mentioned prompt information 1025 and the above-mentioned determination control 1026 in response to the user's input to the determination control 1026 .
如图10F所示,裁剪框1023的中心点1024可以在原始图像上所在的位置固定,裁剪框1023的尺寸与原始图像的尺寸成比例关系变化。裁剪框1023的尺寸随着时间的推移可以从预设最小尺寸逐渐成比例增大至最大尺寸,然后再从最大尺寸逐渐成比例变大至预设最小尺寸。其中,针对裁剪框1023的尺寸在预设最小尺寸与最大尺寸之间变化过程,可以参考前述图8A-图8F所实施例,在此不再赘述。此时,裁剪框1023的尺寸为预设最小尺寸。电子设备100可以将摄像头获取到的原始图像1032a显示在该取景展示窗口1021中。电子设备100可以截取出原始图像1032a上裁剪框1023内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像1032。电子设备100可以将裁剪图像1032作为预览画面显示在拍摄界面1020上。电子设备100还可以在拍摄界面1020上显示控件1029。其中,该控件1029可用于触发电子 设备100基于用户的输入,重新选择裁剪框在原始图像上的中心点。As shown in FIG. 10F , the position of the center point 1024 of the cropping frame 1023 may be fixed on the original image, and the size of the cropping frame 1023 changes in proportion to the size of the original image. The size of the cropping frame 1023 may gradually increase proportionally from the preset minimum size to the maximum size over time, and then gradually increase proportionally from the maximum size to the preset minimum size. For the process of changing the size of the cropping frame 1023 between the preset minimum size and the maximum size, reference may be made to the embodiments shown in FIG. 8A to FIG. 8F , which will not be repeated here. At this time, the size of the cropping frame 1023 is the preset minimum size. The electronic device 100 may display the original image 1032 a obtained by the camera in the viewfinder display window 1021 . The electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1032a, and adjust the cutout image to a specified size to obtain the cropped image 1032. The electronic device 100 may display the cropped image 1032 as a preview image on the shooting interface 1020 . The electronic device 100 may also display controls 1029 on the photographing interface 1020 . The control 1029 can be used to trigger the electronic device 100 to reselect the center point of the cropping frame on the original image based on the user's input.
如图10G所示,此时,裁剪框1023的尺寸从预设最小尺寸成比例增大至最大尺寸与预设最小尺寸之间。电子设备100可以将此时通过摄像头获取的原始图像1033a显示在取景展示窗口1021中。电子设备100可以截取出原始图像1033a上裁剪框1023内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像1033,电子设备100可以将裁剪图像1033作为预览画面显示在拍摄界面1020上。其中,该裁剪图像1033中图像内容的放大倍率小于上述图10F所示裁剪图像1032中图像内容的放大倍率。As shown in FIG. 10G , at this time, the size of the cropping frame 1023 is proportionally increased from the preset minimum size to between the maximum size and the preset minimum size. The electronic device 100 may display the original image 1033a obtained by the camera in the viewfinder display window 1021 at this time. The electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1033a, and adjust the cutout image to a specified size to obtain the cropped image 1033. The electronic device 100 can display the cropped image 1033 as a preview image on the shooting interface 1020. . The magnification of the image content in the cropped image 1033 is smaller than the magnification of the image content in the cropped image 1032 shown in FIG. 10F .
如图10H所示,此时,裁剪框1023的尺寸从在最大尺寸与预设最小尺寸之间成比例增大至最大尺寸。电子设备100可以将此时通过摄像头获取的原始图像1034a显示在取景展示窗口1021中。电子设备100可以截取出原始图像1034a上裁剪框1023内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像1034,电子设备100可以将裁剪图像1034作为预览画面显示在拍摄界面1020上。其中,该裁剪图像1034中图像内容的放大倍率小于上述图10G所示裁剪图像1033中图像内容的放大倍率。As shown in FIG. 10H , at this time, the size of the crop frame 1023 is increased from the maximum size to the maximum size proportionally between the maximum size and the preset minimum size. The electronic device 100 may display the original image 1034a obtained by the camera in the viewfinder display window 1021 at this time. The electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1034a, and adjust the cutout image to a specified size to obtain the cropped image 1034. The electronic device 100 can display the cropped image 1034 as a preview image on the shooting interface 1020. . The magnification of the image content in the cropped image 1034 is smaller than the magnification of the image content in the cropped image 1033 shown in FIG. 10G.
电子设备100可以接收用户作用于该控件1029的输入(例如单击),响应于该输入,如图10I所示,电子设备100可以在拍摄界面1020上显示原始图像1035、上述提示信息1025、上述位置标记1028、上述确定控件1026。The electronic device 100 may receive an input (eg, click) that the user acts on the control 1029, and in response to the input, as shown in FIG. Position marker 1028, the above-mentioned determination control 1026.
如图10I所示,电子设备100可以接收用户针对的位置标记1028的输入(例如拖动),响应于该输入,电子设备100可以调整位置标记1028在原始图像1035中的显示位置。电子设备100可以基于该位置标记1028在原始图像1035中的显示位置,确定出裁剪框1023的中心点1024在取景展示窗口1021中原始图像1035a(与原始图像1035中的图像内容相同,显示比例不同)上的位置。As shown in FIG. 10I , the electronic device 100 may receive user input (eg, dragging) for the location marker 1028 , and in response to the input, the electronic device 100 may adjust the display position of the location marker 1028 in the original image 1035 . The electronic device 100 can determine the center point 1024 of the cropping frame 1023 in the original image 1035a in the viewfinder display window 1021 based on the display position of the position marker 1028 in the original image 1035 (same content as the image in the original image 1035, but with a different display scale). ) on the position.
如图10J所示,电子设备100可以接收用户针对该确定控件1026的输入(例如单击),响应于该输入,电子设备100可以截取出原始图像上在裁剪框内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像。电子设备100可以将裁剪图像作为预览画面显示在拍摄界面1020上。As shown in FIG. 10J , the electronic device 100 may receive an input (eg, a click) from the user for the determination control 1026 , and in response to the input, the electronic device 100 may cut out the image within the cropping frame on the original image, and will cut out the The image is resized to the specified size to get a cropped image. The electronic device 100 may display the cropped image on the shooting interface 1020 as a preview image.
如图10K所示,裁剪框1023的中心点1024在原始图像中的位置固定,裁剪框1023的尺寸与原始图像的尺寸成比例关系变化。电子设备100可以将摄像头获取到的原始图像1036a显示在该取景展示窗口1021中。电子设备100可以将通过裁剪框1023截取出的裁剪图像1036作为预览画面,显示在拍摄界面1020上。As shown in FIG. 10K , the position of the center point 1024 of the cropping frame 1023 in the original image is fixed, and the size of the cropping frame 1023 changes in proportion to the size of the original image. The electronic device 100 can display the original image 1036a obtained by the camera in the viewfinder display window 1021 . The electronic device 100 may display the cropped image 1036 cut out by the cropping frame 1023 as a preview screen on the photographing interface 1020 .
在一些应用场景中,电子设备100可以在将摄像头获取到的原始图像作为预览画面显示在拍摄界面中时,接收用户自定义在原始图像中设置裁剪框的中心点。电子设备100可以基于原始图像的尺寸和裁剪框的中心点、确定出裁剪框的最大尺寸和预设最小尺寸。电子设备100可以接收用户的输入,在预览或录像过程中,随时调整裁剪框的尺寸。电子设备100可以基于裁剪框在每一帧原始图像中的位置和尺寸,截取出每一帧原始图像上裁剪框内的图像,并将截取后的图像作为预览画面显示在拍摄界面中。这样,可以方便用户自定义选择裁剪框的中心点和裁剪框的大小,电子设备100可以将拍摄画面的中心点对准拍摄主体,随时放大或缩小拍摄主体,使得拍摄主体更加清晰。In some application scenarios, the electronic device 100 may receive a user-defined setting of the center point of the cropping frame in the original image when displaying the original image obtained by the camera as a preview image in the shooting interface. The electronic device 100 may determine the maximum size and the preset minimum size of the cropping frame based on the size of the original image and the center point of the cropping frame. The electronic device 100 may receive the user's input, and adjust the size of the cropping frame at any time during the preview or video recording process. The electronic device 100 may, based on the position and size of the cropping frame in each frame of the original image, cut out the image within the cropping frame on each frame of the original image, and display the cutout image on the shooting interface as a preview image. In this way, it is convenient for the user to customize the selection of the center point of the cropping frame and the size of the cropping frame, and the electronic device 100 can align the central point of the photographed image with the subject, and zoom in or out at any time to make the subject clearer.
示例性的,如图11A所示,电子设备100可以显示拍摄界面1020。其中,针对该拍摄界面1020的文字说明可以参考前述图10C所示实施例,在此不再赘述。Exemplarily, as shown in FIG. 11A , the electronic device 100 may display a photographing interface 1020 . Wherein, for the text description of the photographing interface 1020, reference may be made to the aforementioned embodiment shown in FIG. 10C , which will not be repeated here.
电子设备100在接收用户的输入,调整该位置标记1028的显示位置后,可以接收用户针 对该确定控件1026的输入(例如单击),响应于该输入,如图11B所示,电子设备100可以将此时通过摄像头获取的原始图像1112a显示在取景展示窗口1021中。电子设备100可以截取出原始图像1112a上在裁剪框1023内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像1112。电子设备100可以将裁剪图像1112作为预览画面显示在拍摄界面上。After receiving the user's input and adjusting the display position of the position marker 1028, the electronic device 100 may receive the user's input (for example, clicking) on the determination control 1026, and in response to the input, as shown in FIG. 11B , the electronic device 100 may The original image 1112a acquired by the camera at this time is displayed in the viewfinder display window 1021 . The electronic device 100 may cut out the image in the cropping frame 1023 on the original image 1112a, and adjust the cutout image to a specified size to obtain the cropped image 1112. The electronic device 100 may display the cropped image 1112 as a preview image on the shooting interface.
如图11B所示,电子设备100还可以在拍摄界面1020上显示倍率放大控件1121和倍率缩小控件1122。其中,该倍率放大控件1121可用于减小裁剪框1023的尺寸,该倍率缩小控件1122可用于增大裁剪框1023的尺寸。其中,可能的,上述倍率放大控件1121和倍率缩小控件1122也可以是滑动条,当电子设备100接收用户针对该滑动条向上滑动时,电子设备100可以减小该裁剪框1023的尺寸。当电子设备100接收用户针对该滑动条向下滑动时,电子设备100可以增大该裁剪框1023的尺寸。As shown in FIG. 11B , the electronic device 100 can also display a magnification magnification control 1121 and a magnification reduction control 1122 on the shooting interface 1020 . The magnification control 1121 can be used to reduce the size of the cropping frame 1023 , and the magnification reduction control 1122 can be used to increase the size of the cropping frame 1023 . Wherein, possibly, the above-mentioned magnification control 1121 and magnification reduction control 1122 may also be sliders. When the electronic device 100 receives a user sliding upwards on the sliders, the electronic device 100 can reduce the size of the crop frame 1023 . When the electronic device 100 receives the user sliding down the slider bar, the electronic device 100 may increase the size of the cropping frame 1023 .
电子设备100可以接收用户作用于该倍率缩小控件1122的输入(例如单击或长按),响应于该输入,如图11C所示,电子设备100可以增大裁剪框1023的尺寸。电子设备100可以将此时通过摄像头获取的原始图像1113a显示在取景展示窗口1021中。电子设备100可以截取出原始图像1113a上该裁剪框1023中图像,调整至指定尺寸,得到裁剪图像1113。The electronic device 100 may receive a user input (eg, single click or long press) acting on the zoom-out control 1122, and in response to the input, the electronic device 100 may increase the size of the crop box 1023 as shown in FIG. 11C. The electronic device 100 can display the original image 1113a obtained by the camera in the viewfinder display window 1021 at this time. The electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1113a, adjust it to a specified size, and obtain the cropped image 1113.
如图11C所示,电子设备100可以将裁剪图像1113作为预览画面显示在拍摄界面1020上。其中,该裁剪图像1113中图像内容的放大倍率小于上述图11B所示裁剪图像1112中图像内容的放大倍率。As shown in FIG. 11C , the electronic device 100 may display the cropped image 1113 as a preview screen on the shooting interface 1020 . Wherein, the magnification of the image content in the cropped image 1113 is smaller than the magnification of the image content in the cropped image 1112 shown in FIG. 11B .
电子设备100可以继续接收用户作用于该倍率缩小控件1122的操作(例如单击或长按),响应于该操作,电子设备100可以增大裁剪框1023的尺寸至最大尺寸。其中,针对最大尺寸的描述,可以参考前述图8A至图8F所示实施例,在此不再赘述。The electronic device 100 may continue to receive the user's operation (eg, single click or long press) on the zoom-out control 1122, and in response to the operation, the electronic device 100 may increase the size of the crop frame 1023 to the maximum size. For the description of the maximum size, reference may be made to the foregoing embodiments shown in FIGS. 8A to 8F , and details are not repeated here.
如图11D所示,电子设备100基于用户针对该倍率缩小控件1122输入操作,将裁剪框1023调整至最大尺寸。电子设备100可以将此时通过摄像头获取的原始图像1114a显示在取景展示窗口1021中。电子设备100可以截取出原始图像1114a上该裁剪框1023中图像,调整至指定尺寸,得到裁剪图像1114。电子设备100可以将裁剪图像1114作为预览画面显示在拍摄界面1020上。其中,该裁剪图像1114中图像内容的放大倍率小于上述图11C所示裁剪图像1113中图像内容的放大倍率。As shown in FIG. 11D , the electronic device 100 adjusts the crop frame 1023 to the maximum size based on the user's input operation on the zoom-out control 1122 . The electronic device 100 can display the original image 1114a obtained by the camera in the viewfinder display window 1021 at this time. The electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1114a, adjust it to a specified size, and obtain the cropped image 1114. The electronic device 100 may display the cropped image 1114 as a preview image on the shooting interface 1020 . The magnification of the image content in the cropped image 1114 is smaller than the magnification of the image content in the cropped image 1113 shown in FIG. 11C .
电子设备100可以接收用户作用于该倍率增大控件1121的操作(例如单击或长按),响应于该操作,如图11E所示,电子设备100可以减小裁剪框1023的尺寸。电子设备100可以将此时通过摄像头获取的原始图像1115a显示在取景展示窗口1021中。电子设备100可以截取出原始图像1115a上该裁剪框1023中图像,调整至指定尺寸,得到裁剪图像1115。The electronic device 100 may receive an operation (eg, single click or long press) of the user acting on the magnification increase control 1121 , and in response to the operation, as shown in FIG. 11E , the electronic device 100 may reduce the size of the cropping frame 1023 . The electronic device 100 may display the original image 1115a obtained by the camera in the viewfinder display window 1021 at this time. The electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1115a, adjust it to a specified size, and obtain the cropped image 1115.
如图11E所示,电子设备100可以将该裁剪图像1115作为预览画面显示在拍摄界面1020上。其中,该裁剪图像1115中图像内容的放大倍率小于上述图11D所示裁剪图像1114中的图像内容的放大倍率。As shown in FIG. 11E , the electronic device 100 may display the cropped image 1115 as a preview image on the shooting interface 1020 . Wherein, the magnification of the image content in the cropped image 1115 is smaller than the magnification of the image content in the cropped image 1114 shown in FIG. 11D .
在一些应用场景中,电子设备100可以在将摄像头获取到的原始图像作为预览画面显示在拍摄界面中时,接收用户自定义在原始图像中设置裁剪框的中心点。其中,裁剪框的尺寸可以固定不变。在预览或录像过程中,裁剪框可以在原始图像上沿着固定的方向上移动,电子设备100可以接收用户的输入,随时调整裁剪框在原始图像上的移动方向以及移动速度。电子设备100可以根据裁剪框的移动方向以及移动速度,确定出裁剪框在每一帧原始图像中的位置和尺寸。电子设备100可以基于裁剪框在每一帧原始图像中的位置和尺寸截取出每一帧原始图像上裁剪框内的图像,并将截取后的图像作为预览画面显示在拍摄界面或录像界面 中。这样,可以方便用户在预览或录像过程中,随时调整拍摄画面的获取位置,使得拍摄画面跟随用户的选中方向移动,提高了用户体验。In some application scenarios, the electronic device 100 may receive a user-defined setting of the center point of the cropping frame in the original image when displaying the original image obtained by the camera as a preview image in the shooting interface. The size of the cropping frame can be fixed. During the preview or recording process, the cropping frame can move in a fixed direction on the original image, and the electronic device 100 can receive user input to adjust the moving direction and speed of the cropping frame on the original image at any time. The electronic device 100 may determine the position and size of the cropping frame in each frame of the original image according to the moving direction and the moving speed of the cropping frame. The electronic device 100 can cut out the image within the cropping frame on each frame of the original image based on the position and size of the cropping frame in each frame of the original image, and display the cutout image as a preview image on the shooting interface or the video recording interface. In this way, it is convenient for the user to adjust the acquisition position of the shooting image at any time during the preview or video recording process, so that the shooting image moves in the direction selected by the user, which improves the user experience.
示例性的,如图12A所示,电子设备100可以显示拍摄界面1020。其中,针对该拍摄界面1020的文字说明可以参考前述图10C所示实施例,在此不再赘述。Exemplarily, as shown in FIG. 12A , the electronic device 100 may display a photographing interface 1020 . Wherein, for the text description of the photographing interface 1020, reference may be made to the aforementioned embodiment shown in FIG. 10C , which will not be repeated here.
电子设备100在接收用户的输入,调整该位置标记1028的显示位置后,可以接收用户针对该确定控件1026的输入(例如单击),响应于该输入,如图12B所示,电子设备100可以将此时通过摄像头获取的原始图像1211a显示在取景展示窗口1021中。电子设备100可以截取出原始图像1211a上在裁剪框1023内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像1211。电子设备100可以将裁剪图像1211作为预览画面显示在拍摄界面上。After receiving the user's input and adjusting the display position of the position marker 1028, the electronic device 100 may receive the user's input (eg, clicking) on the determination control 1026, and in response to the input, as shown in FIG. 12B, the electronic device 100 may The original image 1211a obtained by the camera at this time is displayed in the viewfinder display window 1021 . The electronic device 100 can cut out the image in the cropping frame 1023 on the original image 1211a, and adjust the cutout image to a specified size to obtain the cropped image 1211. The electronic device 100 may display the cropped image 1211 as a preview image on the shooting interface.
如图12B所示,电子设备100可以在拍摄界面1020上显示裁剪框1023的多个方向移动控件(包括上移控件1221、下移控件1222、左移控件1223和右移控件1224)。其中,该上移控件1221可用于触发电子设备100向上移动裁剪框1023在原始图像上的位置。该下移控件1222可用于触发电子设备100向下移动裁剪框1023在原始图像上的位置。该左移控件1223可用于触发电子设备100向左移动裁剪框1023在原始图像上的位置。该右移控件1224可用于触发电子设备100向右移动裁剪框1023在原始图像上的位置。在一种可能的实现方式中,该多个方向移动控件可以是十字形的滑动条。As shown in FIG. 12B , the electronic device 100 can display multiple directional movement controls for the crop frame 1023 on the photographing interface 1020 (including up-move controls 1221 , down-move controls 1222 , left-move controls 1223 , and right-move controls 1224 ). The move-up control 1221 can be used to trigger the electronic device 100 to move the position of the crop frame 1023 upward on the original image. The move down control 1222 can be used to trigger the electronic device 100 to move down the position of the cropping frame 1023 on the original image. The left move control 1223 can be used to trigger the electronic device 100 to move the position of the crop frame 1023 on the original image to the left. The right move control 1224 can be used to trigger the electronic device 100 to move the position of the crop frame 1023 on the original image to the right. In a possible implementation manner, the multiple direction movement controls may be cross-shaped sliding bars.
如图12B、图12C所示,裁剪框1023可以刚开始可以从原始图像上用户选中的位置,向右移动。如图12B所示,电子设备100可以截取原始图像1211a上该裁剪框1023中的图像,调整至指定尺寸,得到裁剪图像1211。如图12C所示,裁剪框1023在原始图像上向右移动,电子设备100可以通过裁剪框1023从原始图像1212a上截取出裁剪图像1212,并将该裁剪图像1212作为预览画面显示在拍摄界面1020上。其中,该裁剪图像1212中图像内容在上述图12B所示裁剪图像1211中图像内容的右边。As shown in FIG. 12B and FIG. 12C , the cropping frame 1023 may be moved to the right from the position selected by the user on the original image at the beginning. As shown in FIG. 12B , the electronic device 100 can intercept the image in the cropping frame 1023 on the original image 1211 a and adjust it to a specified size to obtain the cropped image 1211 . As shown in FIG. 12C , the cropping frame 1023 moves to the right on the original image, and the electronic device 100 can use the cropping frame 1023 to cut out the cropped image 1212 from the original image 1212a, and display the cropped image 1212 as a preview image on the shooting interface 1020 superior. The image content in the cropped image 1212 is to the right of the image content in the cropped image 1211 shown in FIG. 12B .
电子设备100可以接收用户作用于该上移控件1221的输入(例如单击),响应于该输入,电子设备100可以向上移动裁剪框1023在原始图像上的位置。电子设备100可以截取原始图像上该裁剪框1023中的图像,调整至指定尺寸,得到裁剪图像1213。The electronic device 100 may receive a user input (eg, a click) on the move up control 1221, and in response to the input, the electronic device 100 may move up the position of the crop box 1023 on the original image. The electronic device 100 can capture the image in the cropping frame 1023 on the original image, adjust it to a specified size, and obtain the cropped image 1213 .
如图12D所示,电子设备100可以将此时通过摄像头获取的原始图像1213a显示在取景展示窗口1021中。电子设备100可以截取出原始图像1213a上在裁剪框1023内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像1213。电子设备100可以将该裁剪图像1213作为预览画面显示在拍摄界面1020上。其中,该裁剪图像1213中图像内容在上述图12C所示裁剪图像1212中图像内容的上方。As shown in FIG. 12D , the electronic device 100 may display the original image 1213 a obtained by the camera at this time in the viewfinder display window 1021 . The electronic device 100 may cut out the image in the cropping frame 1023 on the original image 1213a, and adjust the cutout image to a specified size to obtain the cropped image 1213. The electronic device 100 may display the cropped image 1213 on the shooting interface 1020 as a preview image. The image content in the cropped image 1213 is above the image content in the cropped image 1212 shown in FIG. 12C .
在一种可能的实现方式中,当电子设备100一段时间(例如3秒)未接收到用户针对上述方向移动控件的输入时,电子设备100可以退出显示上述方向移动控件。当电子设备100接收到用户针对拍摄界面的输入(例如双击操作)时,电子设备100可以再次显示出上述方向移动控件。In a possible implementation manner, when the electronic device 100 does not receive the user's input for the above-mentioned directional movement control for a period of time (eg, 3 seconds), the electronic device 100 may exit from displaying the above-mentioned directional movement control. When the electronic device 100 receives the user's input on the photographing interface (eg, a double-click operation), the electronic device 100 may display the above-mentioned directional movement controls again.
在一些实施例中,电子设备100可以接收用户作用于上述方向移动控件的长按操作,响应于该长按操作,电子设备100可以增大裁剪框在原始图像上的移动速度。In some embodiments, the electronic device 100 may receive a user's long-press operation on the above-mentioned directional movement control, and in response to the long-press operation, the electronic device 100 may increase the moving speed of the cropping frame on the original image.
示例性的,例如,电子设备100可以通过摄像头依次在第1秒获取到原始图像P1、在第2秒原始图像P2、在第3秒获取到原始图像P3。其中,裁剪框在原始图像P2上的位置相比于在原始图像P1上的位置向右移动了100个像素点。电子设备100在第2秒至第3秒时接收到了用户作用于右移控件的长按操作,电子设备100可以增大裁剪框在原始图像上向右移动 的速度。其中,裁剪框在原始图像P3上的位置相比于在原始图像P2上的位置向右移动了200个像素点。上述示例仅仅用于解释本申请,不应构成限定。Exemplarily, for example, the electronic device 100 may obtain the original image P1 at the first second, the original image P2 at the second second, and the original image P3 at the third second sequentially through the camera. The position of the cropping frame on the original image P2 is shifted to the right by 100 pixels compared to the position on the original image P1. The electronic device 100 receives the user's long-press operation on the right shift control from the second to the third second, and the electronic device 100 can increase the speed at which the cropping frame moves to the right on the original image. The position of the cropping frame on the original image P3 is shifted to the right by 200 pixels compared to the position on the original image P2. The above examples are only used to explain the present application and should not be construed as limitations.
在一些实施例中,电子设备100可以在将摄像头获取到的原始图像作为预览画面显示在拍摄界面中时,接收用户自定义在原始图像中设置裁剪框的中心点。其中,裁剪框的尺寸可以固定不变。电子设备100可以在拍照预览或录像过程中接收用户的输入(例如针对上述方向移动控件的操作),随时调整裁剪框在原始图像上的位置。电子设备100可以基于裁剪框在每一帧原始图像中的位置和尺寸截取出每一帧原始图像上裁剪框内的图像,并将截取后的图像作为预览画面显示在拍摄界面或录像界面中。这样,可以方便用户在预览或录像过程中,随时调整拍摄画面的获取位置,使得拍摄画面跟随用户的选中方向移动,提高了用户体验。In some embodiments, the electronic device 100 may receive the user-defined setting of the center point of the cropping frame in the original image when displaying the original image obtained by the camera as a preview image in the shooting interface. The size of the cropping frame can be fixed. The electronic device 100 may receive the user's input (for example, the above-mentioned operation of moving the control in the direction) during the process of taking a photo preview or recording, and adjust the position of the cropping frame on the original image at any time. The electronic device 100 can cut out the image within the cropping frame on each frame of the original image based on the position and size of the cropping frame in each frame of the original image, and display the cutout image as a preview image on the shooting interface or the video recording interface. In this way, it is convenient for the user to adjust the acquisition position of the shooting image at any time during the preview or video recording process, so that the shooting image moves in the direction selected by the user, which improves the user experience.
在一些应用场景中,电子设备100可以预览画面或录像画面中有运动的图像内容(例如,飞翔的鸟)。电子设备100接收用户的输入,识别出该运动的图像内容(例如,飞翔的鸟),并确定出该运动的图像内容在每一帧原始图像上的位置。电子设备100可以调整裁剪框在每一帧原始图像上的位置,使得该运动的图像内容始终在该裁剪框内。电子设备100可以基于该裁剪框在每一帧原始图像中的位置和尺寸,截取出每一帧原始图像上裁剪框内的图像,并将截取后的图像作为预览画面显示在拍摄界面中。这样,电子设备100可以在拍摄运动的图像内容时,让拍摄画面始终放大显示该运动的图像内容。In some application scenarios, the electronic device 100 may have moving image content (eg, a flying bird) in the preview screen or the video screen. The electronic device 100 receives the user's input, identifies the moving image content (eg, a flying bird), and determines the position of the moving image content on each frame of the original image. The electronic device 100 can adjust the position of the cropping frame on each frame of the original image, so that the moving image content is always within the cropping frame. The electronic device 100 may, based on the position and size of the cropping frame in each frame of the original image, cut out the image within the cropping frame on each frame of the original image, and display the cutout image on the shooting interface as a preview image. In this way, when the electronic device 100 captures the moving image content, the shooting screen can always display the moving image content in an enlarged manner.
示例性的,如图13A所示,电子设备100可以显示拍摄界面1310。其中,该拍摄界面1310可以包括取景展示窗口1311、原始图像1321、一个或多个拍摄模式控件(例如,“夜景模式”控件327A、“人像模式”控件327B、“大光圈”控件327C、“运镜”模式控件327H、“普通拍照模式”控件327D、“录像模式”控件327E、“专业模式”控件327F等等)、回显控件321、拍摄控件322、摄像头转换控件323。其中,针对一个或多个拍摄模式控件、回显控件321、拍摄控件322和摄像头转换控件323的文字描述,可以参考前述图3B所示实施例,在此不再赘述。该取景展示窗口1311可以显示有关闭控件1312和原始图像1321a(与原始图像1321的图像内容相同,显示比例不同)。Exemplarily, as shown in FIG. 13A , the electronic device 100 may display a photographing interface 1310 . The shooting interface 1310 may include a viewfinder display window 1311, an original image 1321, one or more shooting mode controls (for example, the "Night Scene Mode" control 327A, the "Portrait Mode" control 327B, the "Large Aperture" control 327C, the "Motion "Mirror" mode control 327H, "Normal camera mode" control 327D, "Video mode" control 327E, "Pro mode" control 327F, etc.), echo control 321, shooting control 322, camera conversion control 323. For the text description of one or more shooting mode controls, echo control 321 , shooting control 322 and camera conversion control 323 , reference may be made to the embodiment shown in FIG. 3B , which will not be repeated here. The viewfinder display window 1311 may be displayed with a close control 1312 and an original image 1321a (the image content is the same as that of the original image 1321, but the display scale is different).
电子设备100可以接收用户作用于该原始图像1321上的点选操作(例如单击、长按、双击等等),响应于该输入,电子设备100可以根据该点选操作在原始图像1321中的作用位置,识别出用户选择的图像内容1316为鸟,且该图像内容1316在运动。The electronic device 100 may receive a click operation (eg, single click, long press, double click, etc.) performed by the user on the original image 1321, and in response to the input, the electronic device 100 may perform a click operation in the original image 1321 according to the click operation. Action position, it is recognized that the image content 1316 selected by the user is a bird, and the image content 1316 is moving.
如图13B所示,此时,电子设备100获取到原始图像1322,其中,图像内容1316在原始图像1322中的位置与在原始图像1321中的位置不同。电子设备100将该原始图像1322作为预览画面显示在拍摄界面1310上,并在取景展示窗口1311中显示原始图像1322a(与原始图像1322的图像内容相同,显示比例不同)。电子设备100可以在识别出该图像内容1316在运动时,显示提示信息1318和确定控件1319,并在图像内容1316所在区域显示标记框1317。其中,该确定控件1319的显示位置在拍摄界面1310上的位置不作限定,例如,该确定控件1319可以在运镜模式控件327H的上方,该确定控件1319还可以在该图像1316附近。电子设备100还可以在取景展示窗口1311中显示裁剪框1313,其中,该裁剪框1313的中心点在该图像内容1316上,该提示信息1318可用于提示用户是否跟踪该图像内容1316。该标记框1317的中心点在该图像内容1316上,该标记框1317用于表示裁剪框的尺寸,以及裁剪框相对于该图像内容1316的位置。在一种可能的实现方式中,电子设备100可以接收用户作用于该标记框1317的输入(例如拖动),调整裁剪框的尺寸。As shown in FIG. 13B , at this time, the electronic device 100 acquires the original image 1322 , wherein the position of the image content 1316 in the original image 1322 is different from the position in the original image 1321 . The electronic device 100 displays the original image 1322 as a preview image on the shooting interface 1310, and displays the original image 1322a in the viewfinder display window 1311 (same image content as the original image 1322, but with a different display scale). When recognizing that the image content 1316 is moving, the electronic device 100 may display a prompt message 1318 and a determination control 1319, and display a marker frame 1317 in the area where the image content 1316 is located. The position of the display position of the determination control 1319 on the shooting interface 1310 is not limited. For example, the determination control 1319 may be above the mirror movement mode control 327H, and the determination control 1319 may also be near the image 1316. The electronic device 100 can also display a cropping frame 1313 in the viewfinder display window 1311 , where the center point of the cropping frame 1313 is on the image content 1316 , and the prompt information 1318 can be used to prompt the user whether to track the image content 1316 . The center point of the mark frame 1317 is on the image content 1316 , and the mark frame 1317 is used to indicate the size of the cropping frame and the position of the cropping frame relative to the image content 1316 . In a possible implementation manner, the electronic device 100 may receive an input (eg, dragging) that the user acts on the marking frame 1317 to adjust the size of the cropping frame.
电子设备100可以接收用户作用于确定控件1319的输入(例如单击),响应于该输入,如图13C所示,电子设备100可以将此时通过摄像头获取的原始图像1323a显示在取景展示窗口1311中。电子设备100可以截取出原始图像1323a上在裁剪框1313内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像1323。电子设备100可以将裁剪图像1323作为预览画面显示在拍摄界面1310上。该图像内容1316处于该裁剪图像1323的中心。其中,该裁剪图像1323中的图像内容1316的显示尺寸大于上述图13B所示原始图像1322中图像内容1316的显示尺寸。The electronic device 100 may receive an input (such as a single click) that the user acts on the determination control 1319, and in response to the input, as shown in FIG. 13C, the electronic device 100 may display the original image 1323a obtained by the camera at this time in the viewfinder display window 1311 middle. The electronic device 100 can cut out the image in the cropping frame 1313 on the original image 1323a, and adjust the cutout image to a specified size to obtain the cropped image 1323. The electronic device 100 may display the cropped image 1323 as a preview image on the shooting interface 1310 . The image content 1316 is in the center of the cropped image 1323 . The display size of the image content 1316 in the cropped image 1323 is larger than the display size of the image content 1316 in the original image 1322 shown in FIG. 13B .
在一种可能的实现方式中,电子设备100可以接收用户作用于该原始图像1321上的双击等操作后,直接根据该点选操作在原始图像1321中的作用位置,识别出用户选择的图像内容1316。在识别出用户选择的图像内容1316后,电子设备100可以将通过摄像头获取的原始图像显示在取景展示窗口1311中。电子设备100可以截取出原始图像上包括有图像内容1316的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像。电子设备100可以将裁剪图像显示在拍摄界面1310上。In a possible implementation manner, the electronic device 100 may directly recognize the image content selected by the user according to the action position of the click operation in the original image 1321 after receiving the user's double-click operation on the original image 1321. 1316. After recognizing the image content 1316 selected by the user, the electronic device 100 may display the original image acquired by the camera in the viewfinder display window 1311 . The electronic device 100 may cut out an image including the image content 1316 on the original image, and adjust the cut out image to a specified size to obtain a cropped image. The electronic device 100 may display the cropped image on the photographing interface 1310 .
如图13D所示,该图像内容1316在原始图像中的位置有变化。裁剪框1313跟随图像内容1316的位置移动。电子设备100可以将此时从原始图像1324a中截取出的裁剪图像1324作为预览画面显示拍摄界面1310上。其中,该图像内容1316仍处于该裁剪图像1324的中心。As shown in Figure 13D, the position of the image content 1316 in the original image has changed. The cropping frame 1313 moves following the position of the image content 1316 . The electronic device 100 may display the cropped image 1324 cut out from the original image 1324a as a preview image on the shooting interface 1310 at this time. Here, the image content 1316 is still in the center of the cropped image 1324.
在一种可能的实现方式中,如图13E所示,电子设备100可以将此时通过摄像头获取的原始图像1325a显示在取景展示窗口1311中。电子设备100可以截取出原始图像1325a上在裁剪框1313内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像1325。电子设备100可以将裁剪图像1325作为预览画面显示在拍摄界面1310上。电子设备100还可以在上述取景展示窗口1311中显示出该图像内容1316的运动轨迹1331。In a possible implementation manner, as shown in FIG. 13E , the electronic device 100 may display the original image 1325 a obtained by the camera at this time in the viewfinder display window 1311 . The electronic device 100 may cut out the image in the cropping frame 1313 on the original image 1325a, and adjust the cutout image to a specified size to obtain the cropped image 1325. The electronic device 100 may display the cropped image 1325 as a preview image on the shooting interface 1310 . The electronic device 100 may also display the motion track 1331 of the image content 1316 in the above-mentioned viewfinder display window 1311 .
在一些实施例中,电子设备100可以识别出预览画面或录像画面中指定图像内容(例如,景物或任务)的轮廓。电子设备100可以将该指定图像内容的轮廓作为裁剪框的中心点的运动轨迹,调整裁剪框以预设速度在该指定图像内容的轮廓上移动。其中,裁剪框的尺寸可以固定。电子设备100可以基于指定图像内容的轮廓以及预设速度,确定出裁剪框在每一帧原始图像上的位置。电子设备100可以基于该裁剪框在每一帧原始图像中的位置,截取出每一帧原始图像上裁剪框内的图像,并将截取后的图像作为预览画面显示在拍摄界面中或者作为录像画面显示在录像界面中。这样,电子设备100可以在录制视频或显示预览画面时,根据拍摄物体的轮廓,自动调焦,凸显出拍摄物体的细节特征。In some embodiments, the electronic device 100 may recognize the outline of a specified image content (eg, a scene or a task) in a preview or video image. The electronic device 100 may use the outline of the specified image content as the movement track of the center point of the cropping frame, and adjust the cropping frame to move on the outline of the specified image content at a preset speed. Among them, the size of the cropping frame can be fixed. The electronic device 100 may determine the position of the cropping frame on each frame of the original image based on the outline of the specified image content and the preset speed. The electronic device 100 may, based on the position of the cropping frame in each frame of the original image, cut out the image within the cropping frame on each frame of the original image, and display the cutout image as a preview image on the shooting interface or as a video recording image. displayed in the recording interface. In this way, when recording a video or displaying a preview image, the electronic device 100 can automatically adjust the focus according to the outline of the photographed object, so as to highlight the detailed features of the photographed object.
在一些应用场景中,电子设备100可以在拍照或录像之前,可以接收用户选择的音乐片段。当电子设备100开始录像后,电子设备100可以该音乐片段的音频信息控制裁剪框的尺寸变化和/或该裁剪框在原始图像上的运动轨迹。电子设备100可以确定出摄像头采集到的每一帧原始图像上该裁剪框所处的位置以及尺寸,电子设备100可以基于该裁剪框在每一帧原始图像上所处的位置以及尺寸,对每一帧图像进行裁剪,并将裁剪后的图像按照帧顺序,显示在拍照预览界面或录像界面中。这样,可以使得电子设备100的拍摄画面能够跟随音乐的节奏自动变焦,增强了了拍摄画面的视觉效果。In some application scenarios, the electronic device 100 may receive a music clip selected by the user before taking a photo or recording a video. After the electronic device 100 starts recording, the electronic device 100 can control the size change of the cropping frame and/or the movement track of the cropping frame on the original image by using the audio information of the music piece. The electronic device 100 can determine the position and size of the cropping frame on each frame of the original image captured by the camera. One frame of image is cropped, and the cropped image is displayed on the camera preview interface or video recording interface in frame order. In this way, the shooting picture of the electronic device 100 can be automatically zoomed following the rhythm of the music, which enhances the visual effect of the shooting picture.
示例性的,如图14A所示,当电子设备100接收用户作用于上述图3C所示“智能运镜模式”控件331的输入操作(例如单击),响应于该输入操作,电子设备100可以显示运镜模 板选择界面1410。其中,该运镜模板选择界面1410可以包括一个或多个运镜模板选项(例如,“旅行”运镜选项、“舒服”运镜选项1411A、“动感”运镜选项1411B等等)、音乐模式选项1411C、选择框1412、智能运镜提示框1413、运镜拍摄控件1415、回显控件1416。其中,该智能运镜提示框1413中有关闭控件1414,该关闭控件1414可用于触发电子设备100退出运镜模板选择界面1410。针对智能运镜提示框1413、运镜拍摄控件1415、回显控件1416的文字说明可以参考前述图3D所示实施例,在此不再赘述。Exemplarily, as shown in FIG. 14A , when the electronic device 100 receives an input operation (such as a single click) that the user acts on the “smart mirror movement mode” control 331 shown in FIG. 3C , in response to the input operation, the electronic device 100 can A lens motion template selection interface 1410 is displayed. The motion template selection interface 1410 may include one or more motion template options (eg, "travel" motion options, "comfortable" motion options 1411A, "dynamic" motion options 1411B, etc.), music mode Option 1411C, selection box 1412, smart mirror movement prompt box 1413, mirror movement control 1415, and echo control 1416. There is a close control 1414 in the smart motion prompt box 1413 , and the close control 1414 can be used to trigger the electronic device 100 to exit the motion template selection interface 1410 . For the text description of the intelligent motion motion prompt box 1413 , the motion motion shooting control 1415 , and the echo control 1416 , reference may be made to the aforementioned embodiment shown in FIG. 3D , which will not be repeated here.
其中,电子设备100可以接收用户针对音乐模式选项1411C的操作(例如单击),响应于该输入,电子设备100可以移动选择框1412选中该音乐模式选项1411C,并在该运镜模板选择界面1410上显示音乐模板选择框1420。该音乐模板选择框1420可以包括一个或多个音乐片段选项(例如,音乐片段1选项1421、音乐片段2选项、音乐片段3选项、音乐片段4选项等等)。其中,每个音乐片段的音频信息不同,不同的音乐片段对应不同的裁剪框信息(包括裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹)。每个音乐片段选项上显示有播放控件和选择控件(例如,音乐片段1选项1421上显示有播放控件1423和选择控件1422),该播放控件可用于触发电子设备100播放该播放控件对应的音乐片段。该选择控件可用于触发电子设备100选中该选择控件对应的音乐片段。Wherein, the electronic device 100 may receive the user's operation (eg click) on the music mode option 1411C, and in response to the input, the electronic device 100 may move the selection box 1412 to select the music mode option 1411C, and in the motion template selection interface 1410 A music template selection box 1420 is displayed above. The music template selection box 1420 may include one or more music piece options (eg, music piece 1 option 1421, music piece 2 option, music piece 3 option, music piece 4 option, etc.). Wherein, the audio information of each music segment is different, and different music segments correspond to different cropping frame information (including the size change rule of the cropping frame and/or the motion track of the cropping frame in the original image). A play control and a selection control are displayed on each music piece option (for example, a play control 1423 and a selection control 1422 are displayed on the music piece 1 option 1421), and the play control can be used to trigger the electronic device 100 to play the music piece corresponding to the play control . The selection control can be used to trigger the electronic device 100 to select the music piece corresponding to the selection control.
电子设备100可以接收用户作用于该选择控件1422的输入(例如单击),响应于该输入,如图14B所示,电子设备100可以选中该音乐片段1选项1421对应的音乐片段1,在该选择控件1422上显示选中标记。该选择控件1422上显示的选中标记可用于表示电子设备100确定通过音乐片段1对应的裁剪框信息,在录像时对摄像头获取到的原始图像进行裁剪。The electronic device 100 may receive an input (eg, a single click) of the user acting on the selection control 1422, and in response to the input, as shown in FIG. 14B, the electronic device 100 may select the music piece 1 corresponding to the music piece 1 option 1421, and in the A checkmark is displayed on selection control 1422. The check mark displayed on the selection control 1422 can be used to indicate that the electronic device 100 determines the cropping frame information corresponding to the music piece 1 to crop the original image obtained by the camera during video recording.
如图14B所示,电子设备100在已选中音乐片段1后,可以接收用户作用于该运镜拍摄控件1415的输入(例如单击),响应于该输入,电子设备100可以显示如图14C所示的录像界面1430。As shown in FIG. 14B , after the music piece 1 has been selected, the electronic device 100 may receive an input (eg, a single click) from the user acting on the camera control 1415 , and in response to the input, the electronic device 100 may display as shown in FIG. 14C . The video recording interface 1430 shown.
如图14C所示,该录像界面1430可以包括摄像头获取到的原始图像1461、回显控件1416、视频拍摄控件1431、运镜模板切换控件1432、智能运镜提示框1413、取景展示窗口1441和声音波形展示窗口1445。其中,该运镜模板切换控件1432可用于触发电子设备100切换已选中的音乐片段,该运镜模板切换控件1432上显示有当前已选中音乐片段的名称(例如“音乐片段1”)。该取景展示窗口1441中显示包括有摄像头获取到的原始图像1461a(与上述原始图像1461的图像内容相同,显示比例不同)、关闭控件1442和裁剪框1443。该声音波形展示窗口1445可用于显示已选中音乐片段(例如音乐片段1)的声音波形图,其中,该信号波形图可以是已选中音乐片段的声音幅度与时间的变化关系图。As shown in FIG. 14C , the video recording interface 1430 may include the original image 1461 obtained by the camera, the echo control 1416, the video capture control 1431, the mirror movement template switching control 1432, the intelligent mirror movement prompt box 1413, the viewfinder display window 1441 and the sound Waveform display window 1445. The motion template switching control 1432 can be used to trigger the electronic device 100 to switch the selected music segment, and the motion template switching control 1432 displays the name of the currently selected music segment (for example, "music segment 1"). The viewfinder display window 1441 displays the original image 1461a obtained by the camera (same image content as the original image 1461 above, but with a different display scale), a close control 1442 and a cropping frame 1443 . The sound waveform display window 1445 can be used to display a sound waveform diagram of the selected music piece (eg, music piece 1 ), wherein the signal waveform diagram can be a change relationship diagram of the sound amplitude and time of the selected music piece.
电子设备100可以接收用户针对该视频拍摄控件1431的输入(例如单击),响应于该输入,电子设备100可以开始通过扬声器播放该音乐片段1,并解析已选中音乐片段的音频信息。电子设备100可以根据该已选中音乐片段的音频信息(包括声音幅度、声音频率等等),确定出该裁剪框信息(包括裁剪框的尺寸变化和/或该裁剪框在原始图像上的运动轨迹)。电子设备100可以根据裁剪框信息,对摄像头获取到的原始图像进行裁剪,得到裁剪图像,并将裁剪图像作为拍摄画面显示在录像界面1430上。其中,针对音乐片段的音频信息与裁剪框信息的关系可以参考后续实施例,在此不再赘述。The electronic device 100 may receive user input (eg, a single click) for the video capture control 1431, and in response to the input, the electronic device 100 may start playing the music piece 1 through the speaker, and parse the audio information of the selected music piece. The electronic device 100 can determine the cropping frame information (including the size change of the cropping frame and/or the motion track of the cropping frame on the original image) according to the audio information (including sound amplitude, sound frequency, etc.) of the selected music piece. ). The electronic device 100 can crop the original image obtained by the camera according to the cropping frame information to obtain a cropped image, and display the cropped image on the video recording interface 1430 as a shooting picture. For the relationship between the audio information of the music segment and the cropping frame information, reference may be made to the subsequent embodiments, which will not be repeated here.
如图14D所示,电子设备100响应于针对该视频拍摄控件1431的输入(例如单击)开始录像时,电子设备100可以显示录制时间框1434,录像结束控件1435,并将回显控件1416和模式切换控件1432替换显示为暂停录像控件1435和拍照控件1436,电子设备100可以在取景展示窗口1445上显示音乐片段1的声音波形图。该暂停录像控件1435可用于触发电子 设备100暂停录像。该拍照控件1436可用于触发电子设备100将录像过程中的某一帧或多帧录像画面保存为图片。电子设备100基于音乐片段1的音频信息,确定出摄像头获取的每一帧原始图像上裁剪框1443所处的位置。电子设备100可以将摄像头获取到的每一帧原始图像都按照帧顺序依次显示在取景展示窗口1441中,并在取景展示窗口1441中显示出裁剪框1443在每一帧原始图像上的位置。电子设备100可以截取出原始图像上该裁剪框1443内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像。电子设备100可以将裁剪图像作为拍摄画面显示在录像界面1430上。As shown in FIG. 14D , when the electronic device 100 starts recording in response to an input (eg, a single click) to the video capture control 1431, the electronic device 100 may display a recording time frame 1434, a recording end control 1435, and echo the controls 1416 and The mode switching control 1432 is replaced with a pause recording control 1435 and a photographing control 1436 , and the electronic device 100 can display the sound waveform diagram of the music piece 1 on the viewfinder display window 1445 . The pause recording control 1435 can be used to trigger the electronic device 100 to pause recording. The photographing control 1436 can be used to trigger the electronic device 100 to save a certain frame or multiple frames of the video recording as a picture. The electronic device 100 determines the position of the cropping frame 1443 on each frame of the original image acquired by the camera based on the audio information of the music piece 1 . The electronic device 100 may sequentially display each frame of the original image obtained by the camera in the viewfinder display window 1441 in frame order, and display the position of the cropping frame 1443 on each frame of the original image in the viewfinder display window 1441 . The electronic device 100 may cut out the image in the cropping frame 1443 on the original image, and adjust the cutout image to a specified size to obtain a cropped image. The electronic device 100 may display the cropped image on the video recording interface 1430 as a captured image.
如图14D、图14E所示,裁剪框1443的尺寸和/或中心点在原始图像的位置跟随音乐片段1的节奏变化而变化。例如,裁剪框1443的尺寸可以随音乐片段1的声音幅度增大而增大,音乐片段1在第3秒时的声音幅度大于第8秒时的声音幅度,因此,裁剪框1443的尺寸在录像开始后第3秒时的尺寸大于在录像开始后第8秒时的尺寸。电子设备100在录像开始后第3秒时通过摄像头获取到原始图像1462a。电子设备100可以通过裁剪框1443从原始图像1462a中截取出裁剪图像1462。电子设备100在录像开始后第8秒时通过摄像头获取到原始图像1463a。通过裁剪框1443从原始图像1463a中截取出裁剪图像1463。其中,裁剪图像1462中图像内容的放大倍率小于裁剪图像1463中图像内容的放大倍率。As shown in FIG. 14D and FIG. 14E , the size and/or the center point of the cropping frame 1443 at the position of the original image changes following the rhythm of the music piece 1 . For example, the size of the cropping frame 1443 can be increased with the increase of the sound amplitude of the music piece 1. The sound amplitude of the music piece 1 at the 3rd second is greater than that at the 8th second. Therefore, the size of the cropping frame 1443 is in the video recording. The size at the 3rd second after the start is larger than the size at the 8th second after the recording starts. The electronic device 100 acquires the original image 1462a through the camera at the third second after the recording starts. The electronic device 100 may cut out the cropped image 1462 from the original image 1462a through the cropping frame 1443 . The electronic device 100 acquires the original image 1463a through the camera at the 8th second after the recording starts. The cropped image 1463 is cut out from the original image 1463a by the cropping frame 1443. The magnification ratio of the image content in the cropped image 1462 is smaller than the magnification ratio of the image content in the cropped image 1463 .
电子设备100可以接收用户作用于录像结束控件1435的输入(例如单击),响应于该输入,电子设备100可以将从录像开始到录像结束的时间内显示的多帧裁剪图像以及已选中音乐片段中的声音保存为视频文件。The electronic device 100 may receive a user input (eg, a single click) on the recording end control 1435, and in response to the input, the electronic device 100 may display a multi-frame cropped image and the selected music clip from the start of the recording to the end of the recording The sound in is saved as a video file.
在一些应用场景中,例如,用户拿起电子设备100在演唱会上拍摄舞台上的演唱者时,演唱会现场充满演唱者的歌声与音乐。电子设备100可以在拍照预览时或录像过程中,通过麦克风采集声音信号。电子设备100可以采集到的声音信号的音频信息(包括声音幅度、声音频率等等)控制裁剪框的尺寸变化和/或该裁剪框在原始图像上的运动轨迹。电子设备100可以确定出摄像头采集到的每一帧原始图像上该裁剪框所处的位置以及尺寸,电子设备100可以基于该裁剪框在每一帧原始图像上所处的位置以及尺寸,对每一帧图像进行裁剪,并将裁剪后的图像按照帧顺序,显示在拍照预览界面或录像界面中。这样,可以使得电子设备100的拍摄画面能够跟随环境中声音信号的节奏自动变焦,增强了拍摄画面的视觉效果。In some application scenarios, for example, when a user picks up the electronic device 100 to photograph a singer on the stage at a concert, the concert scene is filled with the singer's singing and music. The electronic device 100 may collect sound signals through a microphone during a photo preview or a video recording process. The electronic device 100 can control the size change of the cropping frame and/or the movement track of the cropping frame on the original image by collecting audio information (including sound amplitude, sound frequency, etc.) of the sound signal. The electronic device 100 can determine the position and size of the cropping frame on each frame of the original image captured by the camera. One frame of image is cropped, and the cropped image is displayed on the camera preview interface or video recording interface in frame order. In this way, the shooting picture of the electronic device 100 can be automatically zoomed following the rhythm of the sound signal in the environment, which enhances the visual effect of the shooting picture.
示例性的,如图15A所示,当电子设备100接收用户作用于上述图3C所示“智能运镜模式”控件331的输入操作(例如单击),响应于该输入操作,电子设备100可以显示运镜模板选择界面1410。该运镜模板选择界面1410上除了上述图14A中显示的多个控件之外,还可以显示有环境音选项1424。该环境音选项1424上显示有选中控件1425。Exemplarily, as shown in FIG. 15A , when the electronic device 100 receives an input operation (such as a single click) that the user acts on the “smart mirror movement mode” control 331 shown in FIG. 3C , in response to the input operation, the electronic device 100 can A lens motion template selection interface 1410 is displayed. In addition to the multiple controls shown in FIG. 14A , an ambient sound option 1424 may also be displayed on the lens motion template selection interface 1410 . A selection control 1425 is displayed on the ambient sound option 1424 .
电子设备100可以接收用户作用于该选中控件1425的输入(例如单击),响应于该输入,如图15B所示,电子设备100可以在该选中控件1425上显示选中标记,该选中控件1425上显示的选中标记可用于表示电子设备100确定在录像时通过麦克风采集到的环境音,分析环境音的音频信息(例如声音幅度、声音节奏等等)对摄像头获取到的原始图像进行裁剪。The electronic device 100 may receive user input (eg, a click) on the selected control 1425, and in response to the input, as shown in FIG. 15B, the electronic device 100 may display a checkmark on the selected control 1425, The displayed check mark can be used to indicate that the electronic device 100 determines the ambient sound collected by the microphone during video recording, analyzes the audio information of the ambient sound (such as sound amplitude, sound rhythm, etc.) to crop the original image obtained by the camera.
如图15B所示,电子设备100在已选中环境音选项1423后,可以接收用户作用于该运镜拍摄控件1415的输入(例如单击),响应于该输入,电子设备100可以显示如图14C所示的录像界面1530。As shown in FIG. 15B , after the ambient sound option 1423 has been selected, the electronic device 100 may receive an input (eg, a single click) that the user acts on the camera movement control 1415 , and in response to the input, the electronic device 100 may display the display shown in FIG. 14C The recording interface 1530 is shown.
如图15C所示,该录像界面1530可以包括摄像头获取到的原始图像1561、回显控件1516、视频拍摄控件1531、运镜模板切换控件1532、智能运镜提示框1513、取景展示窗口1541和声音波形展示窗口1545。其中,该运镜模板切换控件1532可用于触发电子设备100切换音 乐获取来源,该运镜模板切换控件1532上显示有“环境音”字样。该取景展示窗口1541中显示包括有原始图像1561a(与原始图像1561中的图像内容相同,显示比例不同)、关闭控件1542和裁剪框1543。该声音波形展示窗口1545可用于显示采集到的环境音的声音波形图,其中,该声音波形图可以是环境音的声音幅度与时间的变化关系图。As shown in FIG. 15C , the video recording interface 1530 may include the original image 1561 obtained by the camera, the echo control 1516, the video capture control 1531, the mirror movement template switching control 1532, the intelligent mirror movement prompt box 1513, the viewfinder display window 1541 and the sound Waveform display window 1545. Wherein, the mirror movement template switching control 1532 can be used to trigger the electronic device 100 to switch the music acquisition source, and the word "ambient sound" is displayed on the mirror movement template switching control 1532. The viewfinder display window 1541 includes an original image 1561a (the image content is the same as that in the original image 1561, and the display ratio is different), a close control 1542 and a cropping frame 1543. The sound waveform display window 1545 may be used to display the collected sound waveform graph of the ambient sound, where the sound waveform graph may be a graph of the change between the sound amplitude and time of the ambient sound.
电子设备100可以接收用户针对该视频拍摄控件1531的输入(例如单击),响应于该输入,电子设备100可以开始通过麦克风实时采集环境音,并解析环境音中的音频信息。电子设备100可以根据该环境音的音频信息(包括声音幅度、声音频率等等),确定出该裁剪框信息(包括裁剪框的尺寸变化和/或该裁剪框在原始图像上的运动轨迹)。电子设备100可以根据裁剪框信息,对摄像头获取到的原始图像进行裁剪,得到裁剪图像,并将裁剪图像作为拍摄画面显示在录像界面1530上。其中,针对环境音的音频信息与裁剪框信息的关系可以参考后续实施例,在此不再赘述。The electronic device 100 may receive an input (eg, a single click) of the video capture control 1531 from the user, and in response to the input, the electronic device 100 may start to collect ambient sound through a microphone in real time, and parse the audio information in the ambient sound. The electronic device 100 may determine the cropping frame information (including the size change of the cropping frame and/or the motion track of the cropping frame on the original image) according to the audio information (including sound amplitude, sound frequency, etc.) of the environmental sound. The electronic device 100 can crop the original image obtained by the camera according to the cropping frame information to obtain a cropped image, and display the cropped image on the video recording interface 1530 as a shooting picture. For the relationship between the audio information of the ambient sound and the cropping frame information, reference may be made to the subsequent embodiments, which will not be repeated here.
如图15D所示,电子设备100响应于针对该视频拍摄控件1531的输入(例如单击)开始录像时,电子设备100可以显示录制时间框1534,录像结束控件1535,并将回显控件1516和模式切换控件1532替换显示为暂停录像控件1535和拍照控件1536。电子设备100可以在取景展示窗口1545上显示采集到的环境音的声音波形图。该暂停录像控件1535可用于触发电子设备100暂停录像。该拍照控件1536可用于触发电子设备100将录像过程中的某一帧或多帧录像画面保存为图片。电子设备100基于环境音的音频信息,确定出摄像头获取的每一帧原始图像上裁剪框1543所处的位置。电子设备100可以将摄像头获取到的每一帧原始图像都按照帧顺序依次显示在取景展示窗口1541中,并在取景展示窗口1541中显示出裁剪框1543在每一帧原始图像上的位置。电子设备100可以截取出原始图像上该裁剪框1543内的图像,并将截取出的图像调整至指定尺寸,得到裁剪图像。电子设备100可以将裁剪图像作为拍摄画面显示在录像界面1530上。As shown in FIG. 15D , when the electronic device 100 starts recording in response to an input (eg, a single click) to the video capture control 1531, the electronic device 100 may display a recording time frame 1534, a recording end control 1535, and echo the controls 1516 and The mode switch control 1532 is replaced by a pause video control 1535 and a photo control 1536 . The electronic device 100 may display the collected sound waveform diagram of the ambient sound on the viewfinder display window 1545 . The pause recording control 1535 can be used to trigger the electronic device 100 to pause recording. The photographing control 1536 can be used to trigger the electronic device 100 to save a certain frame or multiple frames of the video recording as a picture. The electronic device 100 determines the position of the cropping frame 1543 on each frame of the original image acquired by the camera based on the audio information of the ambient sound. The electronic device 100 may sequentially display each frame of the original image obtained by the camera in the viewfinder display window 1541 in frame order, and display the position of the cropping frame 1543 on each frame of the original image in the viewfinder display window 1541 . The electronic device 100 can cut out the image in the cropping frame 1543 on the original image, and adjust the cutout image to a specified size to obtain a cropped image. The electronic device 100 may display the cropped image on the video recording interface 1530 as a captured image.
如图15D、图15E所示,裁剪框1543的尺寸和/或中心点在原始图像的位置跟随环境音的节奏变化而变化。例如,裁剪框1543的尺寸可以随环境音的声音幅度增大而增大,环境音在第3秒时的声音幅度大于第8秒时的声音幅度,因此,裁剪框1543的尺寸在录像开始后第3秒时的尺寸大于在录像开始后第8秒时的尺寸。电子设备100在录像开始后第3秒时通过摄像头获取到原始图像1562a。电子设备100可以通过裁剪框1543从原始图像1562a中截取出裁剪图像1562,电子设备100在录像开始后第8秒时通过摄像头获取到原始图像1563a。电子设备100可以通过裁剪框1543从原始图像1563a中截取出裁剪图像1563,其中,裁剪图像1562中图像内容的放大倍率小于裁剪图像1563中图像内容的放大倍率。As shown in FIG. 15D and FIG. 15E , the size and/or the center point of the cropping frame 1543 at the position of the original image changes following the rhythm of the ambient sound. For example, the size of the cropping frame 1543 can be increased with the increase of the sound amplitude of the ambient sound. The sound amplitude of the ambient sound at the 3rd second is greater than that at the 8th second. Therefore, the size of the cropping frame 1543 is after the recording starts. The size at the 3rd second is larger than the size at the 8th second after the recording starts. The electronic device 100 acquires the original image 1562a through the camera at the third second after the start of recording. The electronic device 100 can cut out the cropped image 1562a from the original image 1562a through the cropping frame 1543, and the electronic device 100 obtains the original image 1563a through the camera at the 8th second after the recording starts. The electronic device 100 may cut out the cropped image 1563 from the original image 1563a through the cropping frame 1543 , wherein the magnification of the image content in the cropped image 1562 is smaller than the magnification of the image content in the cropped image 1563 .
电子设备100可以接收用户作用于录像结束控件1535的输入(例如单击),响应于该输入,电子设备100可以将从录像开始到录像结束的时间内显示的多帧裁剪图像以及从录像开始到录像结束的时间内通过麦克风采集到的环境音保存为视频文件。The electronic device 100 may receive a user input (eg, a single click) on the recording end control 1535, and in response to the input, the electronic device 100 may display a multi-frame cropped image from the start of the recording to the end of the recording and from the start of the recording to the end of the recording. The ambient sound collected by the microphone within the time of the end of the recording is saved as a video file.
在一些实施例中,电子设备100具有可被折叠的触控屏,可以被称为折叠屏。电子设备100的触控屏处于半折叠形态(例如折叠角度在90度左右)时,电子设备100的触控屏可以划分为至少包括A屏和B屏。电子设备100上的一些应用可以针对折叠屏的半折叠形态,预先设置了定制的界面布局和功能控件布局。以相机应用为例,当电子设备100的折叠屏处于展开形态时,电子设备100可以显示有相机应用的拍摄界面(或录像界面),当电子设备100的折叠屏转变为半折叠形态后,电子设备100可以在A屏上显示拍摄界面中的预览画面(或录像界面中的录像画面),在B屏上显示拍摄界面(或录像界面)中的功能控件(或录像界 面中的功能控件)。In some embodiments, the electronic device 100 has a touch screen that can be folded, which may be referred to as a folding screen. When the touch screen of the electronic device 100 is in a half-folded state (for example, the folding angle is about 90 degrees), the touch screen of the electronic device 100 can be divided into at least an A screen and a B screen. For some applications on the electronic device 100, customized interface layouts and functional control layouts may be preset for the half-folded form of the folding screen. Taking the camera application as an example, when the folding screen of the electronic device 100 is in the unfolded state, the electronic device 100 can display the camera application interface (or video recording interface). The device 100 can display the preview image in the shooting interface (or the recording image in the recording interface) on the A screen, and display the function controls in the shooting interface (or the recording interface) (or the function controls in the recording interface) on the B screen.
例如,折叠屏在展开形态下,电子设备100可以在触控屏上显示上述图15C所示的录像界面1530。当折叠屏切换至半折叠形态时,电子设备100可以在A屏上显示上述录像界面1530中的录像画面(例如图15C中的原始图像1561或者时如15D中的裁剪图像1562),在B屏上显示录像界面1530中的功能控件(例如上述图15C中的回显控件1516、视频拍摄控件1531、运镜模板切换控件1532、智能运镜提示框1513、取景展示窗口1541和声音波形展示窗口1545,等等)。这样,可以根据折叠屏的物理形态重新布局应用界面中的各个控件,使得用户在观看和使用折叠屏时得到较好的视觉体验。For example, when the folding screen is in the unfolded state, the electronic device 100 may display the video recording interface 1530 shown in FIG. 15C on the touch screen. When the folded screen is switched to the half-folded state, the electronic device 100 can display the video recording image in the above-mentioned recording interface 1530 on the A screen (for example, the original image 1561 in FIG. 15C or the cropped image 1562 in FIG. 15D ), and on the B screen The function controls in the video recording interface 1530 (such as the echo control 1516, the video capture control 1531, the mirror movement template switching control 1532, the intelligent mirror movement prompt box 1513, the viewfinder display window 1541 and the sound waveform display window 1545 in FIG. ,and many more). In this way, various controls in the application interface can be rearranged according to the physical form of the folding screen, so that the user can obtain a better visual experience when viewing and using the folding screen.
在一些实施例中,电子设备100可以分屏显示同一应用界面中的不同内容。在启动应用分屏时,电子设备100的触控屏可以划分为多个显示区域,多个个显示区域包括显示区域1和显示区域2。以相机应用为例,当电子设备100未开启应用分屏时,电子设备100可以显示有相机应用的拍摄界面(或录像界面)。当电子设备100开启应用分屏后,电子设备100可以在触控屏的显示区域1上显示拍摄界面中的预览画面(或录像界面中的录像画面),在触控屏的显示区域2上显示拍摄界面(或录像界面)中的功能控件(或录像界面中的功能控件)。In some embodiments, the electronic device 100 may display different contents in the same application interface in a split screen. When the application split screen is activated, the touch screen of the electronic device 100 may be divided into multiple display areas, and the multiple display areas include display area 1 and display area 2 . Taking a camera application as an example, when the electronic device 100 does not enable the application split screen, the electronic device 100 may display a shooting interface (or a video recording interface) of the camera application. When the electronic device 100 enables the application split screen, the electronic device 100 can display the preview image in the shooting interface (or the video recording image in the video recording interface) on the display area 1 of the touch screen, and display the preview image on the display area 2 of the touch screen The function controls in the shooting interface (or the recording interface) (or the function controls in the recording interface).
例如,当电子设备100未开启应用分屏时,电子设备100可以在触控屏上显示上述图15C所示的录像界面1530。当电子设备100开启应用分屏后,电子设备100可以在触控屏的显示区域1上显示上述录像界面1530中的录像画面(例如图15C中的原始图像1561或者时如15D中的裁剪图像1562),在触控屏的显示区域2上显示录像界面1530中的功能控件(例如上述图15C中的回显控件1516、视频拍摄控件1531、运镜模板切换控件1532、智能运镜提示框1513、取景展示窗口1541和声音波形展示窗口1545,等等)。这样,可以根据应用分屏的开启与否,重新布局应用界面中的各个控件,使得用户在观看和使用应用分屏后,能得到较好的视觉体验。For example, when the electronic device 100 does not enable the application split screen, the electronic device 100 can display the video recording interface 1530 shown in FIG. 15C on the touch screen. After the electronic device 100 enables the application split screen, the electronic device 100 can display the video recording image in the above-mentioned video recording interface 1530 on the display area 1 of the touch screen (for example, the original image 1561 in FIG. 15C or the cropped image 1562 in FIG. 15D ). ), the function controls in the recording interface 1530 are displayed on the display area 2 of the touch screen (for example, the echo control 1516 in FIG. viewfinder display window 1541 and sound waveform display window 1545, etc.). In this way, various controls in the application interface can be rearranged according to whether the application split screen is enabled or not, so that the user can obtain a better visual experience after viewing and using the application split screen.
在本申请的实施例中,用户触发电子设备100开始录像、结束录像或拍照等的操作,不限于针对触控屏上显示的控件(例如开始录像控件、结束录像控件、拍摄控件等等)的点击等触控输入。可选的,用户触发电子设备100开始录像、结束录像或拍照等的操作,还可以是语音输入,例如,当电子设备100接收到用户的语音输入后,电子设备100可以识别出该语音输入的语义(例如“茄子”、“拍照”、“开始录像”、“结束录像”等等),控制电子设备100开始录像、结束录像或拍照等等。可选的,电子设备100还可以通过识别出拍摄预览画面中人物的指定手势或脸部表情,触发拍照、开始录像或结束录像等等。电子设备100还可以通过检测到用户针对物理按键(例如音量键或电源键等)的输入(例如同时按下上音量键和下音量键),控制电子设备100开始录像、结束录像或拍照等等。In the embodiment of the present application, the operation of the user triggering the electronic device 100 to start recording, end recording, or take a photo is not limited to controls displayed on the touch screen (eg, start recording controls, end recording controls, shooting controls, etc.). Touch input such as clicks. Optionally, the user triggers the electronic device 100 to start recording, end recording, or take a photo, etc., which may also be voice input. For example, when the electronic device 100 receives the user's voice input, the electronic device 100 can recognize the voice input. Semantics (eg "eggplant", "photograph", "start video recording", "end video recording", etc.), control the electronic device 100 to start video recording, end video recording or take photo, and so on. Optionally, the electronic device 100 may also trigger to take a photo, start or end video recording, etc. by recognizing a designated gesture or facial expression of a person in the shooting preview screen. The electronic device 100 can also control the electronic device 100 to start video recording, end video recording or take pictures, etc. .
下面介绍本申请实施例中根据声音信号的音频信息确定出上述裁剪框信息(包括裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹)。The following describes the determination of the above-mentioned cropping frame information (including the size change rule of the cropping frame and/or the motion track of the cropping frame in the original image) according to the audio information of the sound signal in the embodiments of the present application.
电子设备100在录像或拍摄预览时,获取到声音信号。其中,声音信号可以是上述实施例中用户已选中的音乐片段对应的音频数据,也可以是上述实施例中电子设备100通过麦克风采集的环境音。电子设备100可以解析声音信号的音频信息,其中,声音信号的音频信息包括节奏信息、幅度信息和风格信息等等。电子设备100可以通过声音信号的音频信息,调整裁剪框的尺寸、裁剪框的变化速度(包括裁剪框的尺寸变化速度和/或裁剪框中心点的移动 速度等等)、滤镜效果(包括不同色彩的灯光效果)等等。The electronic device 100 acquires a sound signal during video recording or shooting preview. The sound signal may be audio data corresponding to the music segment selected by the user in the foregoing embodiment, or may be ambient sound collected by the electronic device 100 through the microphone in the foregoing embodiment. The electronic device 100 may parse audio information of the sound signal, where the audio information of the sound signal includes rhythm information, amplitude information, style information, and the like. The electronic device 100 can adjust the size of the cropping frame, the changing speed of the cropping frame (including the changing speed of the size of the cropping frame and/or the moving speed of the center point of the cropping frame, etc.), filter effects (including different color lighting effects) and so on.
其中,电子设备100可以在获取到声音信号后,对声音信号进行采样量化得到窗口数据。电子设备100可以对窗口数据进行差值处理,得到差值数据。接着,电子设备100可以对差值数据进行傅里叶变换并再次差分得到节奏信号。如图16所示,电子设备100可以从节奏信号中获取到节奏起始点和节奏终止点,例如,电子设备100识别出第i个节奏的节奏起始点、第i个节奏的节奏终止点、第i+1个节奏的起始点、第i+1个节奏的终止点等等,i为正整数。其中,一个节奏的节奏起始点和节奏终止点之间的长度表示该节奏的快慢程度。The electronic device 100 may, after acquiring the sound signal, sample and quantize the sound signal to obtain window data. The electronic device 100 may perform difference processing on the window data to obtain difference data. Next, the electronic device 100 may perform Fourier transform on the difference data and differentiate again to obtain a rhythm signal. As shown in FIG. 16 , the electronic device 100 can obtain the rhythm start point and the rhythm end point from the rhythm signal. For example, the electronic device 100 identifies the rhythm start point of the i-th rhythm, the rhythm end point of the The starting point of the i+1 rhythm, the ending point of the i+1 th rhythm, etc., i is a positive integer. Among them, the length between the rhythm start point and the rhythm end point of a rhythm indicates the speed of the rhythm.
在一些实施例中,电子设备100可以通过声音信号的节奏快慢控制裁剪框在原始图像上的尺寸变化。其中,当声音信号的节奏变快时,电子设备100可以控制裁剪框在原始图像上的尺寸变大,当声音信号的节奏变慢时,电子设备100可以控制裁剪框在原始图像上的尺寸变小。当裁剪框的尺寸成比例变大到最大尺寸时,电子设备100可以控制裁剪框的尺寸成比例反向变小。当裁剪框的尺寸变大到预设最小尺寸时,电子设备100可以控制裁剪框的尺寸成比例反向变大。In some embodiments, the electronic device 100 can control the size change of the cropping frame on the original image through the rhythm of the sound signal. Wherein, when the rhythm of the sound signal becomes faster, the electronic device 100 can control the size of the cropping frame on the original image to increase, and when the rhythm of the sound signal becomes slower, the electronic device 100 can control the size of the cropping frame on the original image to increase Small. When the size of the cropping frame is proportionally enlarged to the maximum size, the electronic device 100 may control the size of the cropping frame to be proportionally smaller in reverse. When the size of the cropping frame becomes larger to the preset minimum size, the electronic device 100 may control the size of the cropping frame to increase proportionally and inversely.
在一种可能的实现方中,电子设备100可以识别出声音信号的节奏终止时间点,并在声音信号的节奏终止时间点,控制裁剪框的尺寸变大指定倍数或变小指定倍数。In a possible implementation, the electronic device 100 may identify the rhythm termination time point of the sound signal, and at the rhythm termination time point of the sound signal, control the size of the cropping frame to be larger or smaller by a specified multiple.
在一些实施例中,电子设备100可以控制裁剪框在原始图像上移动。电子设备100可以通过声音信号的节奏快慢控制裁剪框在原始图像上移动速度。其中,当声音信号的节奏变快时,电子设备100可以控制裁剪框在原始图像上的移动速度变大。当声音信号的节奏变慢时,电子设备100可以控制裁剪框在原始图像上的移动速度变小。当裁剪框的沿一方向移动到原始图像的边界时,电子设备100可以控制裁剪框反向移动,也可以控制裁剪框正负转向90度移动。In some embodiments, the electronic device 100 may control the cropping frame to move on the original image. The electronic device 100 can control the moving speed of the cropping frame on the original image through the rhythm of the sound signal. Wherein, when the rhythm of the sound signal becomes faster, the electronic device 100 can control the moving speed of the cropping frame on the original image to increase. When the rhythm of the sound signal becomes slower, the electronic device 100 may control the moving speed of the cropping frame on the original image to become smaller. When the cropping frame moves to the boundary of the original image in one direction, the electronic device 100 can control the cropping frame to move in the reverse direction, or control the positive and negative directions of the cropping frame to move 90 degrees.
在一种可能的实现方中,电子设备100可以识别出声音信号的节奏终止时间点(或节奏起始时间点),并在声音信号的节奏终止时间点(或节奏起始时间点),控制裁剪框的切换一次移动方向。In a possible implementation, the electronic device 100 may identify the rhythm ending time point (or rhythm starting time point) of the sound signal, and at the rhythm ending time point (or rhythm starting time point) of the sound signal, control the The switching of the crop box moves the direction once.
在一些实施例中,电子设备100可以通过声音信号的幅度控制裁剪框在原始图像上的尺寸变化。其中,当声音信号的幅度变大时,电子设备100可以控制裁剪框在原始图像上的尺寸变大,当声音信号的幅度变小时,电子设备100可以控制裁剪框在原始图像上的尺寸变小。当裁剪框的尺寸成比例变大到最大尺寸时,电子设备100可以控制裁剪框的尺寸成比例反向变小。当裁剪框的尺寸变大到预设最小尺寸时,电子设备100可以控制裁剪框的尺寸成比例反向变大。In some embodiments, the electronic device 100 can control the size change of the cropping frame on the original image through the amplitude of the sound signal. Wherein, when the amplitude of the sound signal increases, the electronic device 100 can control the size of the cropping frame on the original image to increase, and when the amplitude of the sound signal decreases, the electronic device 100 can control the size of the cropping frame on the original image to decrease . When the size of the cropping frame is proportionally enlarged to the maximum size, the electronic device 100 may control the size of the cropping frame to be proportionally smaller in reverse. When the size of the cropping frame becomes larger to the preset minimum size, the electronic device 100 may control the size of the cropping frame to increase proportionally and inversely.
在一些实施例中,电子设备100可以控制裁剪框在原始图像上移动。电子设备100可以通过声音信号的幅度控制裁剪框在原始图像上移动速度。其中,当声音信号的幅度变大时,电子设备100可以控制裁剪框在原始图像上的移动速度变大。当声音信号的节奏变慢时,电子设备100可以控制裁剪框在原始图像上的移动速度变小。当裁剪框的沿一方向移动到原始图像的边界时,电子设备100可以控制裁剪框反向移动,也可以控制裁剪框正负转向90度移动。In some embodiments, the electronic device 100 may control the cropping frame to move on the original image. The electronic device 100 can control the moving speed of the cropping frame on the original image through the amplitude of the sound signal. Wherein, when the amplitude of the sound signal increases, the electronic device 100 can control the moving speed of the cropping frame on the original image to increase. When the rhythm of the sound signal becomes slower, the electronic device 100 may control the moving speed of the cropping frame on the original image to become smaller. When the cropping frame moves to the boundary of the original image in one direction, the electronic device 100 can control the cropping frame to move in the reverse direction, or control the positive and negative directions of the cropping frame to move 90 degrees.
在一些实施例中,电子设备100可以通过声音信号的节奏快慢控制裁剪框在原始图像上的尺寸变化,电子设备100可以控制裁剪框在原始图像上移动,通过声音信号的幅度大小控制裁剪框在原始图像上移动速度。In some embodiments, the electronic device 100 can control the size change of the cropping frame on the original image through the rhythm of the sound signal, the electronic device 100 can control the cropping frame to move on the original image, and control the size of the cropping frame on the original image by the amplitude of the sound signal. Movement speed on the original image.
在一些实施例中,电子设备100可以通过声音信号的幅度大小控制裁剪框在原始图像上的尺寸变化,电子设备100可以控制裁剪框在原始图像上移动,通过声音信号的节奏快慢控制裁剪框在原始图像上移动速度。In some embodiments, the electronic device 100 can control the size change of the cropping frame on the original image through the amplitude of the sound signal, the electronic device 100 can control the cropping frame to move on the original image, and control the size of the cropping frame on the original image through the rhythm of the sound signal. Movement speed on the original image.
在一些实施例中,电子设备100可以通过声音信号的音乐风格确定出滤镜色彩(例如、赤色、橙色、黄色、绿色、青色、蓝色、紫色等等颜色的灯光效果)。电子设备100在截取出原始图像上裁剪框内的图像后,可以基于滤镜色彩对该截取出的图像施加滤镜效果,并将滤镜效果后的裁剪图像显示在上述拍摄界面或上述录像界面中。例如,电子设备100可以在识别出声音信号的主副歌切换时,更换一个滤镜色彩。In some embodiments, the electronic device 100 may determine the filter color (eg, red, orange, yellow, green, cyan, blue, purple, etc. color lighting effects) through the musical style of the sound signal. After the electronic device 100 intercepts the image in the cropping frame on the original image, it can apply a filter effect to the cropped image based on the filter color, and display the cropped image after the filter effect on the above-mentioned shooting interface or the above-mentioned video recording interface. middle. For example, the electronic device 100 may change a filter color when recognizing that the main chorus of the sound signal is switched.
在一种可能的实现方式中,电子设备100可以识别出声音信号的节奏起始时间点(或节奏终止时间点),并在声音信号的节奏起始时间点(或节奏终止时间点),更改一次滤镜色彩。In a possible implementation manner, the electronic device 100 may identify the rhythm start time point (or rhythm end time point) of the sound signal, and at the rhythm start time point (or rhythm end time point) of the sound signal, change the Filter color once.
在一些应用场景中,电子设备100在本地可以保存有视频文件。电子设备100可以基于用户选择的运镜模板对应的裁剪框信息(包括裁剪框尺寸变化规则和/或裁剪框在视频画面上的运动轨迹)。电子设备100可以通过该运镜模板对应的裁剪框信息对该视频文件中的每一帧视频画面进行裁剪,并将裁剪后的视频画面调整至指定尺寸,得到裁剪视频。这样,电子设备100可以通过用户选择的运镜模板对应的裁剪信息对已保存的视频文件进行裁剪,对视频画面重新变焦,可以突出视频画面中的拍摄主体或景物背景。In some application scenarios, the electronic device 100 may store video files locally. The electronic device 100 may be based on the cropping frame information (including the size change rule of the cropping frame and/or the motion track of the cropping frame on the video screen) corresponding to the motion template selected by the user. The electronic device 100 can trim each frame of video picture in the video file according to the cropping frame information corresponding to the mirror motion template, and adjust the cropped video picture to a specified size to obtain a cropped video. In this way, the electronic device 100 can trim the saved video file according to the trimming information corresponding to the lens motion template selected by the user, re-zoom the video image, and can highlight the subject or scene background in the video image.
示例性的,如图17A所示,电子设备100显示有主屏幕的界面310。其中,针对该界面310的文字说明可以参考签署图3A所示实施例,在此不再赘述。Exemplarily, as shown in FIG. 17A , the electronic device 100 displays an interface 310 with a home screen. The text description for the interface 310 may refer to the embodiment shown in FIG. 3A , which will not be repeated here.
电子设备100可以接收用户作用于该图库应用图标312的输入(例如单击),响应于该输入,电子设备100可以显示如图17B所示的图库应用界面1710。The electronic device 100 may receive user input (eg, a click) on the gallery application icon 312, and in response to the input, the electronic device 100 may display the gallery application interface 1710 as shown in FIG. 17B.
如图17B所示,该图库应用界面1710可以显示包括有一个或多个相册(例如,所有照片相册、视频相册1716、相机相册、微信相册、微博相册等等)。电子设备100可以在该图库相册界面1710的下方显示有图库菜单1711。其中,该图库菜单1711中包括有照片控件1712、相册控件1713、时刻控件1714、发现控件1715。其中,该照片控件1712用于触发电子设备100以图片缩略图的形式显示本地所有的图片。该相册控件1713用于触发电子设备100显示本地图片归属的相册。如图17B所示,当前相册控件1713处于选中状态,电子设备100显示该图库应用界面1710。该时刻控件1714可用于触发电子设备100显示本地存储的精选图片。该发现控件1715可用于触发电子设备100显示图片的分类相册。As shown in FIG. 17B, the gallery application interface 1710 can be displayed to include one or more albums (eg, all photo albums, video album 1716, camera album, WeChat album, Weibo album, etc.). The electronic device 100 may display a gallery menu 1711 below the gallery album interface 1710 . The gallery menu 1711 includes a photo control 1712, an album control 1713, a time control 1714, and a discovery control 1715. The photo control 1712 is used to trigger the electronic device 100 to display all local pictures in the form of picture thumbnails. The album control 1713 is used to trigger the electronic device 100 to display the album to which the local picture belongs. As shown in FIG. 17B , the photo album control 1713 is currently selected, and the electronic device 100 displays the gallery application interface 1710 . The moment control 1714 can be used to trigger the electronic device 100 to display a locally stored featured picture. The discovery control 1715 can be used to trigger the electronic device 100 to display a classified album of pictures.
电子设备100可以接收用户作用于该视频相册1716的输入(例如单击),响应于该输入,电子设备100可以显示如图17C所示的视频相册界面1720。The electronic device 100 may receive user input (eg, a click) on the video album 1716, and in response to the input, the electronic device 100 may display the video album interface 1720 as shown in FIG. 17C.
如图17C所示,该视频相册界面1720可以包括一个或多个视频文件选项(例如,视频文件选项1721和视频文件选项1722)。As shown in Figure 17C, the video album interface 1720 may include one or more video file options (eg, video file option 1721 and video file option 1722).
电子设备100可以接收用户作用于该视频文件选项1721的输入(例如单击),响应于该输入,电子设备100可以显示如图17D所示的视频浏览界面1730。The electronic device 100 may receive user input (eg, a click) on the video file option 1721, and in response to the input, the electronic device 100 may display a video browsing interface 1730 as shown in FIG. 17D.
如图17D所示,视频浏览界面1730上包括有视频1731、视频播放控件1732、视频总时间1733、菜单1734、运镜模式控件1735。针对该菜单1734的文字描述可以参考前述实施例, 在此不再赘述。As shown in FIG. 17D , the video browsing interface 1730 includes a video 1731 , a video playback control 1732 , a total video time 1733 , a menu 1734 , and a mirror movement mode control 1735 . For the textual description of the menu 1734, reference may be made to the foregoing embodiments, which will not be repeated here.
电子设备100可以接收用户作用于该运镜模式控件1735的输入(例如单击),响应于该输入,电子设备100可以显示如图17E所示的运镜模板选择界面1740。The electronic device 100 may receive user input (eg, a single click) on the motion mode control 1735, and in response to the input, the electronic device 100 may display a motion template selection interface 1740 as shown in FIG. 17E.
如图17E所示,该运镜模板选择界面1740包括有一个或多个运镜模板选项(例如,“旅行”运镜选项1741A、“舒服”运镜选项1741B、“动感”运镜选项1741C等等)、选择框1742、确定控件1743、取消控件1744、运镜模板展示区1751、运镜轨迹展示区1753。其中,该取消控件1743可用于触发电子设备100退出运镜模板选择界面1740。其中,不同的运镜模板选项对应的裁剪框的尺寸变化规则或裁剪框运动轨迹不同。如图17E所示,选择框1742已选中“旅行”运镜选项1741A,运镜模板展示区1751中显示有“旅行”运镜选项1741A对应的视频样片。运镜轨迹展示区1753中可以显示有“旅行”运镜选项1741A对应的裁剪框尺寸变化规则和/或裁剪框在视频样片的原始图像中的运动轨迹。例如,“旅行”运镜选项1741A对应裁剪框的中心点可以与原始图像的中心点同位置,“旅行”运镜选项1741A对应裁剪框的尺寸可以随时间先从原始图像的尺寸成比例变小至预设最小尺寸,然后再从预设最小尺寸成比例变大至原始图像的尺寸。其中,“旅行”运镜选项1741A对应裁剪框的尺寸按照原始图像的尺寸成比例变化。该预设最小尺寸小于原始图像的尺寸。As shown in FIG. 17E, the motion template selection interface 1740 includes one or more motion template options (eg, "travel" motion option 1741A, "comfortable" motion option 1741B, "dynamic" motion option 1741C, etc. etc.), the selection box 1742, the confirmation control 1743, the cancel control 1744, the mirror movement template display area 1751, and the mirror movement track display area 1753. The cancel control 1743 can be used to trigger the electronic device 100 to exit the lens motion template selection interface 1740 . Wherein, the size change rules of the cropping frame or the motion trajectory of the cropping frame corresponding to different mirror motion template options are different. As shown in FIG. 17E , the “travel” camera movement option 1741A has been selected in the selection box 1742 , and the video sample corresponding to the “travel” camera movement option 1741A is displayed in the camera movement template display area 1751 . The camera movement track display area 1753 may display the cropping frame size change rule corresponding to the "travel" camera movement option 1741A and/or the motion trajectory of the cropping frame in the original image of the video dailies. For example, the center point of the crop box corresponding to the "travel" motion option 1741A may be at the same location as the center point of the original image, and the size of the crop box corresponding to the "travel" motion option 1741A may first decrease proportionally from the size of the original image over time. to the preset minimum size, and then scale up from the preset minimum size to the size of the original image. The size of the cropping frame corresponding to the "travel" lens movement option 1741A changes proportionally to the size of the original image. The preset minimum size is smaller than the size of the original image.
电子设备100可以接收用户作用于确定控件1743的输入操作(例如单击),响应于该输入操作,电子设备100可以使用该已选中的“旅行”运镜模板1741A对应的裁剪框尺寸变化规则和/或裁剪框在原始图像中的运动轨迹,对视频1731中的视频画面流进行裁剪,得到裁剪视频1761,并将裁剪视频1761显示在如图17F所示的视频浏览界面1760。The electronic device 100 may receive an input operation (eg, a single click) of the user acting on the determination control 1743, and in response to the input operation, the electronic device 100 may use the cropping box size change rule and /Or the motion track of the cropping frame in the original image, crop the video picture stream in the video 1731 to obtain the cropped video 1761, and display the cropped video 1761 on the video browsing interface 1760 as shown in FIG. 17F .
如图17F所示,该视频浏览界面1760可以包括有裁剪视频1761、视频播放控件1762、裁剪视频总时长1763、运镜模板切换控件1764和保存控件1765。其中,该视频播放控件1762可用于触发电子设备100保存该裁剪视频1761到指定存储路径。该运镜模板切换控件1764可用于触发电子设备100切换运镜模板。As shown in FIG. 17F , the video browsing interface 1760 may include a trimmed video 1761 , a video playback control 1762 , a total duration of the trimmed video 1763 , a mirror motion template switching control 1764 and a save control 1765 . The video playback control 1762 can be used to trigger the electronic device 100 to save the cropped video 1761 to a specified storage path. The moving template switching control 1764 can be used to trigger the electronic device 100 to switch the moving template.
在一些应用场景中,电子设备100在本地可以保存有视频文件。电子设备100可以接收用户选择的音乐片段或者通过麦克风采集环境音。电子设备100可以根据该音乐片段或者环境音的音频信息控制裁剪框的尺寸变化和/或该裁剪框在视频文件中原始视频画面上的运动轨迹。电子设备100可以确定出摄像头采集到的每一帧原始图像上该裁剪框所处的位置以及尺寸,并基于该裁剪框在每一帧原始图像上所处的位置以及尺寸,每一帧视频画面进行裁剪,并将裁剪后的视频画面调整至指定尺寸,得到裁剪画面流。电子设备100可以将裁剪画面流和上述音乐片段(或者环境音),保存为视频文件。这样,可以使得视频画面能够跟随音乐的节奏自动变焦,增强了了拍摄画面的视觉效果。In some application scenarios, the electronic device 100 may store video files locally. The electronic device 100 may receive a piece of music selected by the user or collect ambient sounds through a microphone. The electronic device 100 can control the size change of the cropping frame and/or the motion track of the cropping frame on the original video picture in the video file according to the audio information of the music piece or the ambient sound. The electronic device 100 can determine the position and size of the cropping frame on each frame of the original image captured by the camera, and based on the position and size of the cropping frame on each frame of the original image, each frame of video image Perform cropping, and adjust the cropped video image to a specified size to obtain a cropped image stream. The electronic device 100 may save the cropped image stream and the above-mentioned music clip (or ambient sound) as a video file. In this way, the video picture can be automatically zoomed following the rhythm of the music, which enhances the visual effect of the shooting picture.
示例性的,如图17G所示,电子设备100可以显示运镜模板选择界面1740。当电子设备100接收并响应于用户的输入,将选择框1742移动到音乐模式选项1742C上时,电子设备100可以在运镜模板选择界面1740上显示音乐模板选择框1770可以以包括一个或多个音乐片段选项(例如,音乐片段1选项1771、音乐片段2选项、音乐片段3选项、音乐片段4选项等等)、以及环境音选项1774。每个音乐片段选项上显示有播放控件和选择控件(例如,音乐片段1选项1771上显示有播放控件1773和选择控件1772),该播放控件可用于触发电子设备100播放该播放控件对应的音乐片段。该选择控件可用于触发电子设备100选中该选择控件对应的音乐片段。该环境音选项1774上显示有选中控件1775。Exemplarily, as shown in FIG. 17G , the electronic device 100 may display a lens motion template selection interface 1740 . When the electronic device 100 receives and in response to the user's input moves the selection box 1742 to the music mode option 1742C, the electronic device 100 may display the music template selection box 1770 on the lens motion template selection interface 1740 to include one or more Music segment options (eg, music segment 1 option 1771 , music segment 2 option, music segment 3 option, music segment 4 option, etc.), and ambient sound option 1774 . A play control and a selection control are displayed on each music piece option (for example, a play control 1773 and a selection control 1772 are displayed on the music piece 1 option 1771), and the play control can be used to trigger the electronic device 100 to play the music piece corresponding to the play control . The selection control can be used to trigger the electronic device 100 to select the music piece corresponding to the selection control. A selection control 1775 is displayed on the ambient sound option 1774 .
电子设备100可以接收用户作用于该选中控件1775的输入(例如单击),响应于该输入, 如图17G所示,电子设备100可以在该选中控件1775上显示选中标记,该选中控件1775上显示的选中标记可用于表示电子设备100通过麦克风采集到的环境音,对上述视频1731中每一帧视频画面进行裁剪。The electronic device 100 may receive user input (eg, a click) on the selected control 1775, and in response to the input, as shown in FIG. 17G , the electronic device 100 may display a checkmark on the selected control 1775 The displayed check mark can be used to represent the ambient sound collected by the electronic device 100 through the microphone, and to crop each frame of the video picture in the above-mentioned video 1731 .
如图17G所示,电子设备100在已选中环境音选项1774后,可以接收用户作用于该确定控件1743的输入(例如单击),响应于该输入,电子设备100可以开始通过麦克风采集环境音,并显示如图17H所示的环境音采集界面1780。As shown in FIG. 17G , after the ambient sound option 1774 has been selected, the electronic device 100 may receive an input (eg, a single click) from the user acting on the determination control 1743, and in response to the input, the electronic device 100 may start collecting ambient sounds through the microphone , and the ambient sound collection interface 1780 shown in FIG. 17H is displayed.
如图17H所示,该环境音采集界面1780包括有环境音的波形图1781、采集暂停控件1782、采集时间条1783、重新采集控件1784。其中,该环境音的波形图1781用于显示该环境音的信号波形。该采集暂停控件1782可用于触发电子设备100暂停通过麦克风采集环境音。该采集时间条1783用于指示电子设备100需要采集环境音的总时间长度(例如12秒)以及已经采集到的时间长度(例如当前已采集8秒环境音),其中,采集环境音的总时间长度为待裁剪视频的播发时间长度。As shown in FIG. 17H , the ambient sound collection interface 1780 includes a waveform diagram 1781 of the ambient sound, a collection pause control 1782 , a collection time bar 1783 , and a recollection control 1784 . The waveform diagram 1781 of the ambient sound is used to display the signal waveform of the ambient sound. The collection pause control 1782 can be used to trigger the electronic device 100 to pause the collection of ambient sounds through the microphone. The collection time bar 1783 is used to indicate the total time length (for example, 12 seconds) that the electronic device 100 needs to collect ambient sounds and the time length that has been collected (for example, 8 seconds of ambient sounds are currently collected), wherein the total time for collecting ambient sounds The length is the broadcast time length of the video to be trimmed.
如图17I所示,当电子设备100针对采集环境音的时间达到待裁剪视频的播发时间长度时,电子设备100可以在环境音裁剪界面1780上显示环境音播放控件1785和确定控件1786。该环境音播发控件1785可用于触发电子设备100播放已采集到的环境音。这样,可以让用户试听采集到的环境是否合适。As shown in FIG. 17I , when the time for collecting ambient sound by the electronic device 100 reaches the broadcast time length of the video to be trimmed, the electronic device 100 may display an ambient sound playback control 1785 and a determination control 1786 on the ambient sound trimming interface 1780 . The ambient sound playback control 1785 can be used to trigger the electronic device 100 to play the collected ambient sound. In this way, the user can audition whether the collected environment is suitable.
电子设备100可以接收用户针对该确定控件1786的输入(例如单击),响应于该输入,电子设备100可以通过已采集到的环境音,对上述待裁剪视频中每一帧视频画面进行裁剪,并将裁剪后的画面放大至指定尺寸,得到裁剪画面流。电子设备100可以将裁剪画面流和已采集到的环境音合并,得到裁剪视频1791,并将裁剪视频1761显示在如图17J所示的视频浏览界面1790。The electronic device 100 may receive the user's input (for example, a single click) for the determination control 1786, and in response to the input, the electronic device 100 may use the collected ambient sound to trim each frame of the video to be trimmed. And enlarge the cropped picture to the specified size to get the cropped picture flow. The electronic device 100 can combine the cropped image stream and the collected ambient sound to obtain a cropped video 1791, and display the cropped video 1761 on the video browsing interface 1790 as shown in FIG. 17J .
如图17J所示,该视频浏览界面1790可以包括有裁剪视频1791、视频播放控件1792、裁剪视频总时长1793、运镜模板切换控件1794和保存控件1795。其中,该视频播放控件1792可用于触发电子设备100保存该裁剪视频1791到指定存储路径。该运镜模板切换控件1794可用于触发电子设备100切换运镜模板。As shown in FIG. 17J , the video browsing interface 1790 may include a trimmed video 1791 , a video playback control 1792 , a total duration of trimmed video 1793 , a mirror motion template switching control 1794 and a save control 1795 . The video playback control 1792 can be used to trigger the electronic device 100 to save the cropped video 1791 to a specified storage path. The moving template switching control 1794 can be used to trigger the electronic device 100 to switch the moving template.
下面介绍本申请实施例中提供的一种视频流裁剪系统。The following introduces a video stream cropping system provided in the embodiments of the present application.
图18示出了本申请实施例中提供的一种视频流裁剪系统1800的示意图。其中,该视频流裁剪系统1800可应用于上述电子设备100,以执行上述实施例中的图像处理方法。FIG. 18 shows a schematic diagram of a video stream cropping system 1800 provided in an embodiment of the present application. Wherein, the video stream cropping system 1800 can be applied to the above-mentioned electronic device 100 to execute the image processing method in the above-mentioned embodiment.
如图18所示,该视频流裁剪系统1800可以包括:稳像模块1801、运镜控制模块1802、超分处理模块1803。As shown in FIG. 18 , the video stream cropping system 1800 may include: an image stabilization module 1801 , a mirror movement control module 1802 , and a super-division processing module 1803 .
其中,电子设备100在开启上述运镜模式进行录像时通过摄像头获取到该视频流。或者,电子设备100可以在开启上述运镜模式,显示拍摄界面时,通过摄像头获取到该视频流。或者,电子设备100本地存储有视频文件,电子设备100可以获取该视频文件中的视频流。Wherein, the electronic device 100 obtains the video stream through the camera when the above-mentioned mirror movement mode is enabled for recording. Alternatively, the electronic device 100 may acquire the video stream through the camera when the above-mentioned mirror movement mode is turned on and the shooting interface is displayed. Alternatively, the electronic device 100 stores a video file locally, and the electronic device 100 can acquire the video stream in the video file.
在一种可能的实现方式中,电子设备100上可以有多个摄像头,这多个摄像头中包括有广角摄像头。在电子设备100开启上述运镜模式时,电子设备100使用广角摄像头获取到该视频流。这样,电子设备100可以获取到更广视角的视频画面。In a possible implementation manner, the electronic device 100 may have multiple cameras, and the multiple cameras include a wide-angle camera. When the electronic device 100 enables the above-mentioned mirror movement mode, the electronic device 100 obtains the video stream by using the wide-angle camera. In this way, the electronic device 100 can obtain a video picture with a wider viewing angle.
当电子设备100通过摄像头获取到该视频流时,电子设备100可以通过稳像模块1802对视频流进行稳像处理。When the electronic device 100 obtains the video stream through the camera, the electronic device 100 may perform image stabilization processing on the video stream through the image stabilization module 1802 .
在一种可能的实现方式中,稳像模块1801可以对视频流进行电子稳像(electronic image stabilization,EIS)处理。具体的,稳像模块1801可以获取到电子设备100通过陀螺仪传感 器等传感器,检测到电子设备100在通过摄像头获取到视频流时的抖动信息。稳像模块1801可以基于抖动信息,计算出视频流中相邻帧画面的运动信息。稳像模块1801可以基于相邻帧画面的运动信息,对帧画面中的每个像素点进行运动补偿,达到稳定图像的目的。In a possible implementation manner, the image stabilization module 1801 may perform electronic image stabilization (electronic image stabilization, EIS) processing on the video stream. Specifically, the image stabilization module 1801 can obtain the electronic device 100 through sensors such as a gyroscope sensor to detect the jitter information of the electronic device 100 when it obtains a video stream through a camera. The image stabilization module 1801 may calculate motion information of adjacent frames in the video stream based on the jitter information. The image stabilization module 1801 can perform motion compensation for each pixel in the frame image based on the motion information of the adjacent frame images, so as to achieve the purpose of stabilizing the image.
在其他可能的实现方式中,稳像模块1801还可以对视频流进行光学稳像。具体的,电子设备100可以通过光学不见自适应调整光路,补偿由于摄像头平台抖动造成的图像运动。In other possible implementation manners, the image stabilization module 1801 may also perform optical image stabilization on the video stream. Specifically, the electronic device 100 can adaptively adjust the optical path through optical visibility to compensate for image motion caused by the camera platform shake.
稳像模块1801还可以在通过摄像头获取视频流时进行机械稳像。具体的,稳像模块1801可以获取电子设备100通过陀螺仪传感器等器件检测电子设备100的抖动信息,然后对摄像头的伺服系统(sevomechanism)进行调整,而达到稳定图像的目的。The image stabilization module 1801 can also perform mechanical image stabilization when acquiring a video stream through a camera. Specifically, the image stabilization module 1801 can acquire the shaking information of the electronic device 100 detected by the electronic device 100 through a device such as a gyroscope sensor, and then adjust the servo system of the camera to achieve the purpose of stabilizing the image.
其中,上述稳像模块1801是可选的,对获取到的视频流进行稳像处理是可选的,电子设备100可以不进行稳像就通过运镜控制模块进行裁剪。The above-mentioned image stabilization module 1801 is optional, and it is optional to perform image stabilization processing on the acquired video stream, and the electronic device 100 may perform cropping through the mirror movement control module without performing image stabilization.
运镜控制模块1802可以基于预设的运镜模板或声音信号对视频流的画面进行裁剪。具体的,运镜控制模块1802可以通过用户选中的运镜模板或者声音信号的节奏信息,确定出裁剪框信息。其中,裁剪信息包括该裁剪框在视频流中每一帧画面上的尺寸和位置。其中,运镜模板定义了裁剪框的尺寸变化规则和该裁剪框在摄像头获取的原始图像上的运动轨迹。该声音信号可以是电子设备100本地存储的音乐片段,也可以是电子设备100在开始录像或在开启上述运镜模式显示拍摄界面时,通过麦克风采集的。The motion control module 1802 can trim the picture of the video stream based on a preset motion template or a sound signal. Specifically, the motion control module 1802 can determine the cropping frame information according to the motion template selected by the user or the rhythm information of the sound signal. The cropping information includes the size and position of the cropping frame on each frame of the video stream. The mirror motion template defines the size change rule of the cropping frame and the motion track of the cropping frame on the original image obtained by the camera. The sound signal may be a music clip stored locally by the electronic device 100, or may be collected by the microphone when the electronic device 100 starts recording or displays the shooting interface in the above-mentioned mirror motion mode.
运镜控制模块1802在确定出裁剪框在视频流中每一帧画面上的尺寸和位置后,可以截取出每一帧画面中的处于裁剪框内的图像,并将截取出的图像调整至指定尺寸,得到裁剪视频流。After determining the size and position of the cropping frame on each frame in the video stream, the mirror movement control module 1802 can cut out the image in the cropping frame in each frame, and adjust the cutout image to the specified size. size, get the cropped video stream.
运镜控制模块1802在得到裁剪视频流后,将裁剪视频流输入到超分处理模块1803中。该超分处理模块1803可以对裁剪视频流的画面进行图像超分辨率重建。这样,可以提升画面的清晰度,丰富画面细节,去除画面中的噪声。电子设备100可以将超分后的裁剪视频流显示在上述实施例中的录像界面或拍摄界面中。电子设备100还可以响应于用户的输入保存该超分后的裁剪视频流。After obtaining the cropped video stream, the mirror motion control module 1802 inputs the cropped video stream to the super-division processing module 1803 . The super-resolution processing module 1803 can perform image super-resolution reconstruction on the pictures of the cropped video stream. In this way, the clarity of the picture can be improved, the details of the picture can be enriched, and the noise in the picture can be removed. The electronic device 100 may display the super-divided cropped video stream on the video recording interface or the shooting interface in the foregoing embodiment. The electronic device 100 may also save the super-divided cropped video stream in response to the user's input.
在一种可能的实现方式中,上述超分处理模块1803是可选的,电子设备100可以直接将运镜控制模块1802处理完得到的裁剪视频流显示在上述实施例中的录像界面或拍摄界面中。电子设备100还可以响应于用户的输入保存该裁剪视频流。In a possible implementation manner, the above-mentioned super-division processing module 1803 is optional, and the electronic device 100 can directly display the cropped video stream processed by the camera movement control module 1802 on the video recording interface or shooting interface in the above-mentioned embodiment. middle. The electronic device 100 may also save the cropped video stream in response to the user's input.
下面介绍本申请实施例中提供的一种视频流裁剪系统。The following introduces a video stream cropping system provided in the embodiments of the present application.
图19示出了本申请实施例中提供的一种视频流裁剪系统1900的示意图。其中,该视频流裁剪系统1900可应用于上述电子设备100,以执行上述实施例中的图像处理方法。FIG. 19 shows a schematic diagram of a video stream cropping system 1900 provided in an embodiment of the present application. Wherein, the video stream cropping system 1900 can be applied to the above-mentioned electronic device 100 to execute the image processing method in the above-mentioned embodiment.
该视频流裁剪系统1900可以包括摄像头1901、图像信号处理器(ISP)1902、内存1903、应用处理器(AP)1904。The video stream cropping system 1900 may include a camera 1901 , an image signal processor (ISP) 1902 , a memory 1903 , and an application processor (AP) 1904 .
其中,该摄像头1901可以在接收到光信号后,转换成电信号,并将电信号输入给图像信号处理器1902。图像信号处理器1902可以通过信号处理算法,输出YUV数据,并存储到内存1903。The camera 1901 can convert the optical signal into an electrical signal after receiving the optical signal, and input the electrical signal to the image signal processor 1902 . The image signal processor 1902 can output YUV data through a signal processing algorithm and store it in the memory 1903 .
在一种可能的实现方式中,电子设备100上可以有多个摄像头,这多个摄像头中包括有广角摄像头。在电子设备100开启上述运镜模式时,电子设备100使用广角摄像头获取到该视频流。这样,电子设备100可以获取到更广视角的视频画面。In a possible implementation manner, the electronic device 100 may have multiple cameras, and the multiple cameras include a wide-angle camera. When the electronic device 100 enables the above-mentioned mirror movement mode, the electronic device 100 obtains the video stream by using the wide-angle camera. In this way, the electronic device 100 can obtain a video picture with a wider viewing angle.
应用处理器1904可以读取内存1903中的YUV数据(例如尺寸为4608*2592或 3840*2160),并基于预设运镜模板和声音信号,确定出裁剪框在当前帧画面的位置和尺寸。应用处理器1904可以截取出的当前帧画面上处于裁剪框内的图像,并调整至指定尺寸(例如1920*1080或3840*2160)。应用处理器1904可以截取出视频流中每一帧画面中处于裁剪框内的图像,并调整至指定尺寸,得到裁剪视频流。The application processor 1904 can read the YUV data in the memory 1903 (for example, the size is 4608*2592 or 3840*2160), and determine the position and size of the cropping frame in the current frame based on the preset motion template and the sound signal. The application processor 1904 can cut out the image in the cropping frame on the current frame and adjust it to a specified size (for example, 1920*1080 or 3840*2160). The application processor 1904 can cut out the image in the cropping frame in each frame of the video stream, and adjust it to a specified size to obtain the cropped video stream.
在一种可能的实现方式中,应用处理器1904在确定出裁剪框在当前帧画面的位置和尺寸后,可以将该裁剪框在当前帧画面上的位置和尺寸发送给图像信号处理器1902。图像信号处理器1902可以基于裁剪框在当前帧画面上的位置和尺寸,截取出当前帧画面上处于裁剪框内的图像,并调整至指定尺寸。图像信号处理器1902以截取出视频流中每一帧画面中处于裁剪框内的图像,并调整至指定尺寸,得到裁剪视频流。In a possible implementation manner, after determining the position and size of the cropping frame on the current frame, the application processor 1904 may send the position and size of the cropping frame on the current frame to the image signal processor 1902 . The image signal processor 1902 may, based on the position and size of the cropping frame on the current frame, cut out the image within the cropping frame on the current frame, and adjust it to a specified size. The image signal processor 1902 obtains the cropped video stream by extracting the image within the cropping frame in each frame of the video stream, and adjusting it to a specified size.
在一种可能的实现方式中,电子设备100需要识别出拍摄画面中的图像内容,并检测跟踪指定图像内容的位置,以及确定出指定图像内容的轮廓。上述视频流裁剪系统1900还包括神经网络处理器(图19中未示出)。应用处理器1904在读取到YUV数据后,可以对YUV数据转进行预处理。其中,预处理流程包括应用处理器1904(或者应用处理器1904指示数字信号处理)将YUV数据换成RGB图(或者BGR图或单通道图或灰度图等等),并降采样到AI模型的输入图尺寸(例如,224*224,288*288等)。应用处理器1904可以将预处理后的RGB图(或者BGR图或单通道图或灰度图等等)送入神经网络处理器。神经网络处理器可以通过AI模型,检测跟踪RGB图(或者BGR图或单通道图或灰度图等等)中指定图像内容的位置,并确定出指定图像内容的轮廓。神经网络处理器可以将指定图像内容的检测框信息或轮廓信息输出给应用处理器1904。应用处理器1904可以根据指定图像的检测框信息/或轮廓信息,确定出上述裁剪框信息。In a possible implementation manner, the electronic device 100 needs to identify the image content in the shooting picture, detect and track the position of the designated image content, and determine the outline of the designated image content. The video stream cropping system 1900 described above also includes a neural network processor (not shown in FIG. 19). After reading the YUV data, the application processor 1904 can preprocess the YUV data. Among them, the preprocessing process includes the application processor 1904 (or the application processor 1904 instructs digital signal processing) to convert the YUV data into an RGB image (or a BGR image or a single-channel image or a grayscale image, etc.), and downsample to the AI model The input image size (for example, 224*224, 288*288, etc.). The application processor 1904 may feed the preprocessed RGB image (or BGR image or single channel image or grayscale image, etc.) to the neural network processor. The neural network processor can detect and track the position of the specified image content in the RGB image (or BGR image or single-channel image or grayscale image, etc.) through the AI model, and determine the outline of the specified image content. The neural network processor may output detection frame information or outline information specifying image content to the application processor 1904 . The application processor 1904 may determine the above-mentioned cropping frame information according to the detection frame information/or outline information of the specified image.
在一些实施例中,应用处理器1904可以在图像信号处理器1902输出YUV数据的同时,通过陀螺仪传感器检测电子设备100的抖动信息。应用处理器1904在获取到YUV数据后,可以基于抖动信息,计算出视频流中相邻帧画面的运动信息。应用处理器1904可以基于相邻帧画面的运动信息,对帧画面中的每个像素点进行运动补偿,达到稳定图像的目的。In some embodiments, the application processor 1904 may detect the jitter information of the electronic device 100 through the gyro sensor while the image signal processor 1902 outputs the YUV data. After acquiring the YUV data, the application processor 1904 can calculate the motion information of adjacent frames in the video stream based on the jitter information. The application processor 1904 may perform motion compensation on each pixel in the frame based on the motion information of the adjacent frames, so as to achieve the purpose of stabilizing the image.
在一种可能的实现方式中,应用处理器1904可以对视频流进行电子稳像(electronic image stabilization,EIS)处理。具体的,应用处理器1904可以获取到电子设备100通过陀螺仪传感器等传感器,检测到电子设备100在通过摄像头获取到视频流时的抖动信息。应用处理器1904可以基于抖动信息,计算出视频流中相邻帧画面的运动信息。应用处理器1904可以基于相邻帧画面的运动信息,对帧画面中的每个像素点进行运动补偿,达到稳定图像的目的。In one possible implementation, the application processor 1904 may perform electronic image stabilization (EIS) processing on the video stream. Specifically, the application processor 1904 may obtain the electronic device 100 through a sensor such as a gyroscope sensor to detect the jitter information of the electronic device 100 when it obtains a video stream through a camera. The application processor 1904 may calculate motion information of adjacent frames in the video stream based on the jitter information. The application processor 1904 may perform motion compensation on each pixel in the frame based on the motion information of the adjacent frames, so as to achieve the purpose of stabilizing the image.
可能的,应用处理器1904在基于抖动信息,计算出视频流中相邻帧画面的运动信息后,可以将相邻帧画面的运动信息发送给图形处理器(图19中未示出)。图形处理器可以基于相邻帧画面的运动信息,对帧画面中的每个像素点进行运动补偿,达到稳定图像的目的。Possibly, after calculating the motion information of adjacent frames in the video stream based on the jitter information, the application processor 1904 may send the motion information of the adjacent frames to the graphics processor (not shown in FIG. 19 ). The graphics processor can perform motion compensation for each pixel in the frame based on the motion information of the adjacent frames, so as to achieve the purpose of stabilizing the image.
在其他可能的实现方式中,应用处理器1904还可以对视频流进行光学稳像。具体的,应用处理器1904可以通过光学不见自适应调整光路,补偿由于摄像头平台抖动造成的图像运动。In other possible implementations, the application processor 1904 may also perform optical image stabilization on the video stream. Specifically, the application processor 1904 can adaptively adjust the optical path through optical visibility to compensate for image motion caused by camera platform shake.
应用处理器1904还可以在通过摄像头获取视频流时进行机械稳像。具体的,应用处理器1904可以获取电子设备100通过陀螺仪传感器等器件检测电子设备100的抖动信息,然后对摄像头的伺服系统(sevomechanism)进行调整,而达到稳定图像的目的。The application processor 1904 can also perform mechanical image stabilization when acquiring the video stream through the camera. Specifically, the application processor 1904 can acquire the jitter information of the electronic device 100 detected by the electronic device 100 through a device such as a gyroscope sensor, and then adjust the servo system (sevomechanism) of the camera to achieve the purpose of stabilizing the image.
在一些实施例中,应用处理器1904可以对裁剪视频流的画面进行图像超分辨率重建。这 样,可以提升画面的清晰度,丰富画面细节,去除画面中的噪声。In some embodiments, the application processor 1904 may perform image super-resolution reconstruction on pictures of the cropped video stream. In this way, the clarity of the picture can be improved, the details of the picture can be enriched, and the noise in the picture can be removed.
在一种可能的实现方式中,应用处理器1904在基于裁剪框对视频流中每一帧画面进行裁剪后,直接输出给超分神经网络模型,并通过超分神经网络模型对裁剪后的画面进行图像超分辨率重建并调整至指定尺寸,得到超分后的裁剪视频流。In a possible implementation manner, the application processor 1904 directly outputs to the super-resolution neural network model after cropping each frame in the video stream based on the cropping frame, and uses the super-resolution neural network model to process the cropped picture. Perform image super-resolution reconstruction and adjust to the specified size to obtain the cropped video stream after super-resolution.
在一种可能的实现方式中,应用处理器1904在基于裁剪框对视频流中每一帧画面进行裁剪后,先调整至指定尺寸后,再输出给超分神经网络模型,并通过超分神经网络模型对裁剪后的画面进行图像超分辨率重建,得到超分后的裁剪视频流。In a possible implementation manner, after the application processor 1904 trims each frame of the video stream based on the cropping frame, it is adjusted to a specified size, and then output to the super-resolution neural network model, and the super-resolution neural network is passed through the super-resolution neural network model. The network model performs image super-resolution reconstruction on the cropped picture, and obtains the cropped video stream after super-resolution.
在本申请实施例中,电子设备100在接收并响应于用户作用于相机应用图标的输入,显示拍摄界面时可以通过摄像头获取到第一帧率的视频流。当电子设备100接收并响应于上述用户开启运镜模式的输入后,电子设备100可以以通过摄像头获取到第二帧率的视频流,其中,第二帧率高于第一帧率。这样,可以使得电子设备100在超分处理过程中,使用多帧画面进行融合(例如,每3至7帧画面进行融合),提高了裁剪视频流的画面清晰度。In this embodiment of the present application, when the electronic device 100 receives and responds to the user's input acting on the camera application icon, and displays the shooting interface, the video stream of the first frame rate can be obtained through the camera. After the electronic device 100 receives and responds to the user's input of enabling the mirror motion mode, the electronic device 100 can obtain a video stream with a second frame rate through the camera, where the second frame rate is higher than the first frame rate. In this way, the electronic device 100 can use multiple frames of pictures for fusion (for example, every 3 to 7 frames of pictures) during the super-division process, which improves the picture definition of the cropped video stream.
电子设备100在超分处理过程中获取到裁剪视频流中的多帧画面后,可以选定其中一帧画面作为参考帧画面,并将多帧画面中的其余帧画面向该参考帧画面配准。电子设备100可以将配准后的这多帧画面输入到超分神经网络模型中,并通过超分神经网络模型对这多帧画面进行融合,得到高清帧画面。After the electronic device 100 acquires the multi-frame pictures in the cropped video stream during the super-division process, it can select one of the frame pictures as the reference frame picture, and register the rest of the multi-frame pictures to the reference frame picture. . The electronic device 100 can input the registered multiple frames into the super-resolution neural network model, and fuse the multiple frames through the super-resolution neural network model to obtain high-definition frame images.
其中,电子设备100可以提高摄像头的图像采集帧率,从而提高视频流的画面帧率。例如,电子设备100开启运镜模式之前,可以通过摄像头以每秒30帧的帧率采集图像画面。电子设备100在开启运镜模式之后,可以通过摄像头以每秒90帧的帧率采集图像画面。Wherein, the electronic device 100 can increase the image capture frame rate of the camera, thereby increasing the picture frame rate of the video stream. For example, before the electronic device 100 starts the mirror movement mode, the camera may capture images at a frame rate of 30 frames per second. After the electronic device 100 enables the mirror movement mode, the camera can capture images at a frame rate of 90 frames per second.
在一种可能的实现方式中,电子设备100可以在摄像头采集到图像画面后,可以软件插帧,提高视频流的画面帧率。例如,电子设备100开启运镜模式之前,可以通过摄像头以每秒30帧的帧率采集图像画面,且不进行插帧,得到每秒30帧的视频流。电子设备100在开启运镜模式之后,可以通过摄像头以每秒90帧的帧率采集图像画面,且每秒插入90帧图像画面,得到每秒180帧的视频流。In a possible implementation manner, the electronic device 100 may insert frames by software after the camera captures the image picture, so as to improve the picture frame rate of the video stream. For example, before the electronic device 100 enables the mirror movement mode, the camera may capture images at a frame rate of 30 frames per second without performing frame interpolation to obtain a video stream of 30 frames per second. After the electronic device 100 enables the mirror movement mode, the camera can capture images at a frame rate of 90 frames per second, and insert 90 frames of images per second to obtain a video stream of 180 frames per second.
下面介绍本申请实施例提供的一种图像处理方法的流程。The following describes the flow of an image processing method provided by an embodiment of the present application.
图20示出了本申请实施例提供的一种图像处理方法的流程示意图。FIG. 20 shows a schematic flowchart of an image processing method provided by an embodiment of the present application.
如图20所示,该图像处理方法包括:As shown in Figure 20, the image processing method includes:
S2001、电子设备100显示第一拍摄预览界面,第一拍摄预览界面包括第一预览框,第一预览框显示电子设备100的摄像头实时采集得到的画面。S2001 , the electronic device 100 displays a first shooting preview interface, the first shooting preview interface includes a first preview frame, and the first preview frame displays a picture captured by a camera of the electronic device 100 in real time.
其中,第一拍摄预览界面可以是上述图3B所示实施例中的拍摄界面320。在一些实施例中,第一拍摄预览界面还可以是上述图6A所示实施例中的拍摄界面320。具体内容,可以参考前述实施例,在此不再赘述。The first shooting preview interface may be the shooting interface 320 in the embodiment shown in FIG. 3B. In some embodiments, the first shooting preview interface may also be the shooting interface 320 in the embodiment shown in FIG. 6A above. For specific content, reference may be made to the foregoing embodiments, which will not be repeated here.
S2002、电子设备100检测到针对第一拍摄预览界面的第一操作后,电子设备100显示拍摄选项界面。其中,拍摄选项界面包括第一拍摄选项和第二拍摄选项。S2002. After the electronic device 100 detects the first operation on the first shooting preview interface, the electronic device 100 displays a shooting option interface. Wherein, the shooting option interface includes a first shooting option and a second shooting option.
该第一操作可以是上述图3B所示实施例中针对更多模式控件327G的操作,该拍摄选项界面可以是上述图3D所示实施例中的运镜模板选择界面340。在电子设备100检测到针对更多模式控件327G的操作后,电子设备100可以显示上述图3C中所示的模式选择页面330。电子设备100可以检测到针对模式选择页面330中的“智能运镜模式”控件331的操作(例 如单击),响应于该针对“智能运镜模式”控件331的操作,电子设备100可以显示该运镜模板选择界面340。例如,第一拍摄选项可以是上述图3D所示运镜模板选择界面340中的“旅行”运镜选项341A,第二拍摄选项可以是上述图3D所示运镜模板选择界面340中的“动感”运镜模板选项341C。The first operation may be the operation for the more mode control 327G in the embodiment shown in FIG. 3B , and the shooting option interface may be the lens movement template selection interface 340 in the embodiment shown in FIG. 3D . After the electronic device 100 detects an operation for the more mode control 327G, the electronic device 100 may display the mode selection page 330 shown in FIG. 3C described above. The electronic device 100 may detect an operation (eg, a single click) on the "Smart Mirror Mode" control 331 in the mode selection page 330, and in response to the operation on the "Smart Mirror Mode" control 331, the electronic device 100 may display the Lens motion template selection interface 340 . For example, the first shooting option may be the "travel" motion option 341A in the lens motion template selection interface 340 shown in FIG. 3D, and the second shooting option may be the "Motion" motion in the lens motion template selection interface 340 shown in FIG. 3D. ” Mirror template option 341C.
在一些实施例中,该第一操作可以是上述图3B所示实施例中针对更多模式控件327G的操作,该拍摄选项界面可以是上述图14A所示实施例中的运镜模板选择界面1410。在电子设备100检测到针对更多模式控件327G的操作后,电子设备100可以显示上述图3C中所示的模式选择页面330。电子设备100可以检测到针对模式选择页面330中的“智能运镜模式”控件331的操作(例如单击),响应于该针对“智能运镜模式”控件331的操作,电子设备100可以显示图14A中所示的运镜模板选择界面1410。例如,第一拍摄选项可以是上述图14A中所示的音乐片段1选项1421、第二拍摄选项可以是上述图14B中所示的音乐片段2选项。In some embodiments, the first operation may be the operation for the more mode control 327G in the embodiment shown in FIG. 3B , and the shooting option interface may be the lens movement template selection interface 1410 in the embodiment shown in FIG. 14A . . After the electronic device 100 detects an operation for the more mode control 327G, the electronic device 100 may display the mode selection page 330 shown in FIG. 3C described above. The electronic device 100 may detect an operation (eg, a single click) on the "Smart Mirror Mode" control 331 in the mode selection page 330, and in response to the operation on the "Smart Mirror Mode" control 331, the electronic device 100 may display a graph. Motion template selection interface 1410 shown in 14A. For example, the first shooting option may be the above-mentioned music piece 1 option 1421 shown in FIG. 14A , and the second shooting option may be the above-mentioned music piece 2 option shown in FIG. 14B .
S2003、在电子设备100检测到针对第一拍摄选项的第二操作后,电子设备100显示第二拍摄预览界面。其中,第二预览界面包括第二预览框,第二预览框显示电子设备100的摄像头实时采集得到的画面。S2003. After the electronic device 100 detects the second operation for the first shooting option, the electronic device 100 displays a second shooting preview interface. Wherein, the second preview interface includes a second preview frame, and the second preview frame displays an image captured by the camera of the electronic device 100 in real time.
该第二操作可以是针对上述图3D所示实施例中针对“旅行”运镜选项341A的操作(例如单击),该第二拍摄预览界面可以是上述图3I所示实施例中的录像界面360或上述图5B所示实施例中的拍摄界面510。在电子设备100检测到针对“旅行”运镜选项341A的操作后,电子设备100还可以检测到针对上述图3D或图3E或图5A所示实施例中运镜拍摄控件345的操作(例如单击),响应于该针对运镜拍摄控件345的操作,电子设备100可以显示上述录像界面360或上述拍摄界面510。The second operation may be an operation for the “travel” camera movement option 341A in the embodiment shown in FIG. 3D (for example, a single click), and the second shooting preview interface may be the video recording interface in the embodiment shown in FIG. 3I . 360 or the shooting interface 510 in the embodiment shown in FIG. 5B. After the electronic device 100 detects the operation on the “travel” camera movement option 341A, the electronic device 100 may also detect the operation on the camera movement control 345 in the embodiment shown in FIG. 3D or FIG. 3E or FIG. 5A (for example, a single click), and in response to the operation on the camera movement control 345, the electronic device 100 may display the above-mentioned recording interface 360 or the above-mentioned photographing interface 510.
S2004、电子设备100开始拍摄第一视频内容。S2004, the electronic device 100 starts to shoot the first video content.
在一种可能的实现方式中,在电子设备100开始拍摄第一视频内容之前,电子设备100检测到针对第二拍摄预览界面的第四操作。响应于该第四操作,电子设备100开始拍摄第一视频内容。In a possible implementation manner, before the electronic device 100 starts to capture the first video content, the electronic device 100 detects a fourth operation on the second capture preview interface. In response to the fourth operation, the electronic device 100 starts to capture the first video content.
示例性的,第二拍摄预览界面可以是上述图3I所示实施例中的录像界面360。第四操作可以是针对录像界面360中视频拍摄控件361的操作(例如单击),响应于该针对录像界面360中视频拍摄控件361的操作,电子设备100可以开始拍摄第一视频内容。Exemplarily, the second shooting preview interface may be the video recording interface 360 in the embodiment shown in FIG. 3I. The fourth operation may be an operation (eg, a single click) on the video capture control 361 in the video recording interface 360 , and in response to the operation on the video capture control 361 in the video recording interface 360 , the electronic device 100 may start to capture the first video content.
S2005、在开始拍摄第一视频内容后的第一时刻,电子设备100在第二预览框中显示电子设备100的摄像头实时采集得到的画面的第一部分。S2005 , at the first moment after starting to shoot the first video content, the electronic device 100 displays, in the second preview frame, the first part of the picture captured in real time by the camera of the electronic device 100 .
S2006、在开始拍摄第一视频内容后的第二时刻,电子设备100在第二预览框中显示电子设备100的摄像头实时采集得到的画面的第二部分。S2006 , at a second moment after starting to shoot the first video content, the electronic device 100 displays, in a second preview frame, the second part of the picture captured in real time by the camera of the electronic device 100 .
例如,电子设备100在开始拍摄第一视频内容后的第3秒,在第二预览框中显示出第一部分可以是上述图3J所示实施例中的裁剪图像372。电子设备100在开始拍摄第一视频内容后的第8秒,在第二预览框中显示出第二部分可以是上述图3K所示实施例中的裁剪图像373。For example, 3 seconds after the electronic device 100 starts shooting the first video content, the first part displayed in the second preview frame may be the cropped image 372 in the embodiment shown in FIG. 3J. Eight seconds after the electronic device 100 starts shooting the first video content, the second preview frame displays that the second part may be the cropped image 373 in the embodiment shown in FIG. 3K.
其中,该第二拍摄预览界面还包括第一窗口。电子设备100在该第一窗口中显示电子设备100的摄像头实时采集得到的画面。在开始拍摄该第一视频内容后的第一时刻,电子设备100在该第一窗口中显示该第一部分的边界框。在开始拍摄该第一视频内容后的第二时刻, 电子设备100在该第一窗口中显示该第二部分的边界框。这样,可以方便用户看到摄像头实时采集得到的画面,方便用户找到拍摄的主体。Wherein, the second shooting preview interface further includes a first window. The electronic device 100 displays the picture captured in real time by the camera of the electronic device 100 in the first window. At the first moment after starting to capture the first video content, the electronic device 100 displays the bounding box of the first part in the first window. At a second moment after starting to capture the first video content, the electronic device 100 displays the bounding box of the second portion in the first window. In this way, it is convenient for the user to see the picture captured by the camera in real time, and it is convenient for the user to find the subject to be photographed.
示例性的,第一窗口可以是上述图5B-图5E所示实施例中的取景展示窗口521。Exemplarily, the first window may be the viewfinder display window 521 in the embodiments shown in FIGS. 5B-5E.
在一种可能的实现方式中,在开始拍摄该第一视频内容后的第一时刻,电子设备100在该第一窗口中显示该第一拍摄选项对应的视频样片中在第一时刻时的视频画面。在开始拍摄该第一视频内容后的第二时刻,电子设备100在该第一窗口中显示该第一拍摄选项对应的视频样片中在第二时刻时的视频画面。这样,可以方便用户实时对比和视频样片中的拍摄效果。In a possible implementation manner, at the first moment after starting to shoot the first video content, the electronic device 100 displays the video at the first moment in the video sample corresponding to the first shooting option in the first window screen. At a second moment after starting to shoot the first video content, the electronic device 100 displays, in the first window, a video frame at the second moment in the video sample corresponding to the first shooting option. In this way, it is convenient for users to compare the shooting effects in real-time with the video samples.
示例性的,第一窗口可以是上述图3I-图3M所示实施例中的运镜模板预览窗口363。Exemplarily, the first window may be the mirror moving template preview window 363 in the embodiments shown in FIG. 3I-FIG. 3M.
其中,第一窗口和第二预览框的显示位置为以下任意一种:第一窗口的至少部分区域和第二预览框的显示区域重叠;或者,第一窗口显示在第二拍摄预览界面中第二预览框之外的位置;或者,第一窗口显示在第二预览框的右上角区域;或者,第一窗口显示在第二预览框的左上角区域。Wherein, the display position of the first window and the second preview frame is any one of the following: at least part of the first window overlaps with the display area of the second preview frame; or, the first window is displayed on the second shooting preview interface on the first Two positions outside the preview frame; or, the first window is displayed in the upper right area of the second preview frame; or, the first window is displayed in the upper left area of the second preview frame.
该第一窗口中包括有窗口关闭控件;电子设备100检测到针对该第一窗口中该窗口关闭控件的第八操作;响应于该第八操作,电子设备100关闭显示该第一窗口。这样,可以在用户无需第一窗口时,可以让用户手动触发关闭,保证电子设备100上显示的拍摄画面不被遮挡。The first window includes a window closing control; the electronic device 100 detects an eighth operation for the window closing control in the first window; in response to the eighth operation, the electronic device 100 closes and displays the first window. In this way, when the user does not need the first window, the user can be manually triggered to close, so as to ensure that the shooting picture displayed on the electronic device 100 is not blocked.
在电子设备100关闭显示该第一窗口后,电子设备100在该第二拍摄预览界面中显示窗口开启控件;电子设备100检测到针对该窗口开启控件的第九操作;响应于该第九操作,电子设备100在该第二拍摄预览界面上显示该第一窗口。这样,可以在用户需要调取小窗口时,由用户触发电子设备100重新显示该第一窗口。After the electronic device 100 closes and displays the first window, the electronic device 100 displays the window opening control in the second shooting preview interface; the electronic device 100 detects a ninth operation for the window opening control; in response to the ninth operation, The electronic device 100 displays the first window on the second shooting preview interface. In this way, the user can trigger the electronic device 100 to redisplay the first window when the user needs to call the widget.
具体内容,可以参考前述图4D-图4F所示实施例,在此不再赘述。For specific content, reference may be made to the foregoing embodiments shown in FIG. 4D to FIG. 4F , which will not be repeated here.
在一些实施例中,该第二拍摄预览界面还包括有第二窗口,电子设备100在该第二窗口中显示该第一拍摄选项对应的第一音乐片段的波形图。其中,在开始拍摄该第一视频内容后的第一时刻该波形图中的音频信息与在开始拍摄该第一视频内容后的第二时刻该波形图中的音频信息不同,该音频信息包括以下一种或多种:节奏信息、幅度信息和风格信息。In some embodiments, the second shooting preview interface further includes a second window, and the electronic device 100 displays the waveform diagram of the first music segment corresponding to the first shooting option in the second window. Wherein, the audio information in the waveform chart at the first moment after starting to shoot the first video content is different from the audio information in the waveform chart at the second moment after starting to shoot the first video content, and the audio information includes the following One or more of: tempo information, amplitude information, and style information.
其中,在电子设备100开始拍摄该第一视频内容之后,电子设备100可以播放该第一音乐片段。Wherein, after the electronic device 100 starts to shoot the first video content, the electronic device 100 may play the first music segment.
当电子设备100将该第一部分保存为视频文件中第一时刻的视频画面,将该第二部分保存为该视频文件中第二时刻的视频画面时,电子设备100将该第一音乐片段保存在该视频文件的音频数据中。When the electronic device 100 saves the first part as a video frame at the first moment in the video file, and saves the second part as a video frame at the second moment in the video file, the electronic device 100 saves the first music segment in the in the audio data of the video file.
示例性的,第二窗口可以是上述图14C-图14E所示实施例中的声音波形展示窗口1445。具体内容,可以参考前述图14C-图14E所示实施例,在此不再赘述。Exemplarily, the second window may be the sound waveform display window 1445 in the embodiment shown in FIG. 14C-FIG. 14E. For specific content, reference may be made to the foregoing embodiments shown in FIGS. 14C to 14E , which will not be repeated here.
其中,在电子设备100在该第二预览框中显示电子设备100的摄像头实时采集得到的画面的第二部分之后,电子设备100检测到针对该第二拍摄预览界面的第六操作。响应于该第六操作,电子设备100将第一部分保存为视频文件中第一时刻的视频画面,将第二部分保存为该视频文件中第二时刻的视频画面。这样,电子设备100可以拍摄出具有自动变焦或镜头 平移等效果的录像视频。The electronic device 100 detects a sixth operation on the second shooting preview interface after the electronic device 100 displays the second part of the picture captured by the camera of the electronic device 100 in real time in the second preview frame. In response to the sixth operation, the electronic device 100 saves the first part as a video frame at the first moment in the video file, and saves the second part as a video frame at the second moment in the video file. In this way, the electronic device 100 can shoot video recordings with effects such as automatic zooming or lens panning.
示例性的,该视频文件的播放画面可以参考前述图3N-图3Q所示实施例,在此不再赘述。Exemplarily, for the playback picture of the video file, reference may be made to the foregoing embodiments shown in FIGS. 3N-3Q , and details are not described herein again.
在一种可能的实现方式中,电子设备100在开始拍摄该第一视频内容后的第一时刻,检测到第七操作。响应于该第七操作,电子设备100将该第一部分保存为图片。例如,该第七操作,可以是针对上述图3J所示实施例中的拍照控件368的操作(例如单击)。具体内容,可以参考前述图3J所示实施例,在此不再赘述。In a possible implementation manner, the electronic device 100 detects the seventh operation at a first moment after starting to capture the first video content. In response to the seventh operation, the electronic device 100 saves the first part as a picture. For example, the seventh operation may be an operation (eg, a single click) for the photographing control 368 in the embodiment shown in FIG. 3J . For specific content, reference may be made to the aforementioned embodiment shown in FIG. 3J , which will not be repeated here.
S2007、电子设备100显示拍摄选项界面。S2007, the electronic device 100 displays a shooting option interface.
在一种可能的实现方式中,第二拍摄预览界面还包括选项切换控件;在电子设备100在该第二预览框中显示电子设备100的摄像头实时采集得到的画面的第二部分之后,电子设备100检测到针对该选项切换控件的第五操作。响应于该第五操作,电子设备100显示该拍摄选项界面。这样,可以在已选中一个拍摄选项后,为用户提供更换拍摄选项的入口,方便用户更换拍摄选项拍摄视频内容。In a possible implementation manner, the second shooting preview interface further includes an option switching control; after the electronic device 100 displays the second part of the picture captured in real time by the camera of the electronic device 100 in the second preview frame, the electronic device 100 100 A fifth operation for the option toggle control is detected. In response to the fifth operation, the electronic device 100 displays the photographing option interface. In this way, after a shooting option has been selected, the user can be provided with an entry for changing the shooting option, so that the user can change the shooting option to shoot video content.
示例性的,第五操作可以是上述图4A所示实施例中针对运镜模板切换控件362的操作(例如单击)。具体内容,可以参考前述图4A-图4D所示实施例,在此不再赘述。Exemplarily, the fifth operation may be an operation (eg, a single click) on the mirror movement template switching control 362 in the embodiment shown in FIG. 4A. For specific content, reference may be made to the foregoing embodiments shown in FIGS. 4A to 4D , which will not be repeated here.
S2008、在电子设备100检测到针对第二拍摄选项的第三操作后,电子设备100显示第三拍摄预览界面,第三拍摄预览界面包括第三预览框,第三预览框显示电子设备100的摄像头实时采集得到的画面。S2008, after the electronic device 100 detects the third operation for the second shooting option, the electronic device 100 displays a third shooting preview interface, the third shooting preview interface includes a third preview frame, and the third preview frame displays the camera of the electronic device 100 real-time captured images.
示例性的,第三拍摄预览界面可以为上述图4D所示的拍摄界面410。其中,不同拍摄选项对应的拍摄画面效果,可以参考上述图7A-图7F所示实施例,图8A-图8G所示实施例以及图9A-图9F所示实施例,在此不再赘述。Exemplarily, the third shooting preview interface may be the shooting interface 410 shown in FIG. 4D above. For the shooting screen effects corresponding to different shooting options, reference may be made to the embodiments shown in FIGS. 7A to 7F , the embodiments shown in FIGS. 8A to 8G and the embodiments shown in FIGS.
S2009、电子设备100开始拍摄第二视频内容。S2009, the electronic device 100 starts to shoot the second video content.
S2010、在开始拍摄第二视频内容后的第一时刻,电子设备100在第三预览框中显示电子设备100的摄像头实时采集得到的画面的第三部分。S2010 , at the first moment after starting to shoot the second video content, the electronic device 100 displays, in a third preview frame, the third part of the picture captured in real time by the camera of the electronic device 100 .
S2011、在开始拍摄第二视频内容后的第二时刻,电子设备100在第三预览框中显示电子设备100的摄像头实时采集得到的画面的第四部分。其中,第一部分、第二部分、第三部分和第四部分均不同。S2011 , at a second moment after starting to shoot the second video content, the electronic device 100 displays, in a third preview frame, the fourth part of the picture captured by the camera of the electronic device 100 in real time. Among them, the first part, the second part, the third part and the fourth part are all different.
其中,第一部分、第二部分、第三部分、第四部分的显示效果,可以参考上述图7A-图7F所示实施例,图8A-图8G所示实施例以及图9A-图9F所示实施例,在此不再赘述。Wherein, for the display effects of the first part, the second part, the third part and the fourth part, you can refer to the above-mentioned embodiments shown in FIGS. 7A-7F , the embodiments shown in FIGS. 8A-8G and FIGS. 9A-9F The embodiments are not repeated here.
在本申请实施例中,电子设备100在显示电子设备100的摄像头实时采集得到的画面之前,对该电子设备100的摄像头实时采集得到的画面进行稳像处理,该稳像处理包括以下一种或多种:电子稳像EIS处理、光学稳像处理、机械稳像处理。这样,可以使得拍摄画面平滑过度。In this embodiment of the present application, before displaying the image captured by the camera of the electronic device 100 in real time, the electronic device 100 performs image stabilization processing on the image captured in real time by the camera of the electronic device 100 , and the image stabilization processing includes one of the following or Various: electronic image stabilization EIS processing, optical image stabilization processing, mechanical image stabilization processing. In this way, the shooting picture can be made smooth and excessive.
在本申请实施例中,在电子设备100在该第二预览框中显示电子设备100的摄像头实时采集得到的画面的第一部分之前,该电子设备对该第一部分进行图像超分辨率重建。在该电子设备在该第二预览框中显示该电子设备的摄像头实时采集得到的画面的第二部分之前,该电子设备对该第二部分进行图像超分辨率重建。在该电子设备在该第三预览框中显示该电子 设备的摄像头实时采集得到的画面的第三部分之前,该电子设备对该第三部分进行图像超分辨率重建。在该电子设备在该第三预览框中显示该电子设备的摄像头实时采集得到的画面的第四部分之前,该电子设备对该第四部分进行图像超分辨率重建。这样,可以使得拍摄画面更加清晰。In this embodiment of the present application, before the electronic device 100 displays the first part of the picture captured in real time by the camera of the electronic device 100 in the second preview frame, the electronic device performs image super-resolution reconstruction on the first part. Before the electronic device displays the second part of the picture captured in real time by the camera of the electronic device in the second preview frame, the electronic device performs image super-resolution reconstruction on the second part. Before the electronic device displays the third part of the picture captured in real time by the camera of the electronic device in the third preview frame, the electronic device performs image super-resolution reconstruction on the third part. Before the electronic device displays the fourth part of the picture captured by the camera of the electronic device in real time in the third preview frame, the electronic device performs image super-resolution reconstruction on the fourth part. In this way, the shooting picture can be made clearer.
在一种可能的实现方式中,该电子设备的摄像头包括广角摄像头和非广角摄像头。该第一预览框显示该非广角摄像头实时采集得到的画面。该第二预览框显示该广角摄像头实时采集得到的画面。该第三预览框显示该广角摄像头实时采集得到的画面。这样,可以使得拍摄的画面具有更大的视角。In a possible implementation manner, the camera of the electronic device includes a wide-angle camera and a non-wide-angle camera. The first preview frame displays the image captured by the non-wide-angle camera in real time. The second preview frame displays the picture captured by the wide-angle camera in real time. The third preview frame displays the image captured by the wide-angle camera in real time. In this way, the captured picture can have a larger viewing angle.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: The technical solutions described in the embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (19)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, comprising:
    电子设备显示第一拍摄预览界面,所述第一拍摄预览界面包括第一预览框,所述第一预览框显示所述电子设备的摄像头实时采集得到的画面;The electronic device displays a first shooting preview interface, the first shooting preview interface includes a first preview frame, and the first preview frame displays a picture captured in real time by a camera of the electronic device;
    所述电子设备检测到针对所述第一拍摄预览界面的第一操作后,所述电子设备显示拍摄选项界面,所述拍摄选项界面包括第一拍摄选项和第二拍摄选项;After the electronic device detects the first operation on the first shooting preview interface, the electronic device displays a shooting option interface, and the shooting option interface includes a first shooting option and a second shooting option;
    所述电子设备检测到针对所述第一拍摄选项的第二操作后,所述电子设备显示第二拍摄预览界面,所述第二拍摄预览界面包括第二预览框,所述第二预览框显示所述电子设备的摄像头实时采集得到的画面;After the electronic device detects the second operation for the first shooting option, the electronic device displays a second shooting preview interface, the second shooting preview interface includes a second preview frame, and the second preview frame displays The picture acquired by the camera of the electronic device in real time;
    所述电子设备开始拍摄第一视频内容;The electronic device starts to shoot the first video content;
    在开始拍摄所述第一视频内容后的第一时刻,所述电子设备在所述第二预览框中显示所述电子设备的摄像头实时采集得到的画面的第一部分;At a first moment after starting to shoot the first video content, the electronic device displays, in the second preview frame, the first part of the picture captured in real time by the camera of the electronic device;
    在开始拍摄所述第一视频内容后的第二时刻,所述电子设备在所述第二预览框中显示所述电子设备的摄像头实时采集得到的画面的第二部分;At a second moment after starting to shoot the first video content, the electronic device displays, in the second preview frame, the second part of the picture captured in real time by the camera of the electronic device;
    所述电子设备显示所述拍摄选项界面;The electronic device displays the shooting option interface;
    所述电子设备检测到针对所述第二拍摄选项的第三操作后,所述电子设备显示第三拍摄预览界面,所述第三拍摄预览界面包括第三预览框,所述第三预览框显示所述电子设备的摄像头实时采集得到的画面;After the electronic device detects the third operation for the second shooting option, the electronic device displays a third shooting preview interface, the third shooting preview interface includes a third preview frame, and the third preview frame displays The picture acquired by the camera of the electronic device in real time;
    所述电子设备开始拍摄第二视频内容;the electronic device starts to shoot the second video content;
    在开始拍摄所述第二视频内容后的第一时刻,所述电子设备在所述第三预览框中显示所述电子设备的摄像头实时采集得到的画面的第三部分;At the first moment after starting to shoot the second video content, the electronic device displays, in the third preview frame, the third part of the picture captured in real time by the camera of the electronic device;
    在开始拍摄所述第二视频内容后的第二时刻,所述电子设备在所述第三预览框中显示所述电子设备的摄像头实时采集得到的画面的第四部分,其中,所述第一部分、所述第二部分、所述第三部分和所述第四部分均不同。At a second moment after starting to shoot the second video content, the electronic device displays, in the third preview frame, the fourth part of the picture captured by the camera of the electronic device in real time, wherein the first part , the second part, the third part and the fourth part are all different.
  2. 根据权利要求1所述的方法,其特征在于,在所述电子设备开始拍摄第一视频内容之前,所述方法还包括:The method according to claim 1, wherein before the electronic device starts to shoot the first video content, the method further comprises:
    所述电子设备检测到针对所述第二拍摄预览界面的第四操作;The electronic device detects a fourth operation for the second shooting preview interface;
    所述电子设备开始拍摄第一视频内容,具体包括:The electronic device starts to shoot the first video content, which specifically includes:
    响应于所述第四操作,所述电子设备开始拍摄所述第一视频内容。In response to the fourth operation, the electronic device starts to capture the first video content.
  3. 根据权利要求1所述的方法,其特征在于,所述第二拍摄预览界面还包括选项切换控件;在所述电子设备在所述第二预览框中显示所述电子设备的摄像头实时采集得到的画面的第二部分之后,所述方法还包括:The method according to claim 1, wherein the second shooting preview interface further comprises an option switching control; the electronic device displays in the second preview frame the data captured by the camera of the electronic device in real time. After the second portion of the picture, the method further includes:
    所述电子设备检测到针对所述选项切换控件的第五操作;the electronic device detects a fifth operation for the option switching control;
    所述电子设备显示所述拍摄选项界面,具体包括:The electronic device displays the shooting option interface, which specifically includes:
    响应于所述第五操作,所述电子设备显示所述拍摄选项界面。In response to the fifth operation, the electronic device displays the photographing option interface.
  4. 根据权利要求1或2所述的方法,其特征在于,在所述电子设备在所述第二预览框中显示所述电子设备的摄像头实时采集得到的画面的第二部分之后,所述方法还包括:The method according to claim 1 or 2, wherein after the electronic device displays the second part of the picture captured in real time by the camera of the electronic device in the second preview frame, the method further comprises: include:
    所述电子设备检测到针对所述第二拍摄预览界面的第六操作;The electronic device detects a sixth operation for the second shooting preview interface;
    响应于所述第六操作,所述电子设备将所述第一部分保存为视频文件中第一时刻的视频画面,将所述第二部分保存为所述视频文件中第二时刻的视频画面。In response to the sixth operation, the electronic device saves the first part as a video picture at a first moment in the video file, and saves the second part as a video picture at a second moment in the video file.
  5. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    所述电子设备在开始拍摄所述第一视频内容后的第一时刻,检测到第七操作;The electronic device detects a seventh operation at a first moment after starting to shoot the first video content;
    响应于所述第七操作,所述电子设备将所述第一部分保存为图片。In response to the seventh operation, the electronic device saves the first part as a picture.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述第二拍摄预览界面还包括第一窗口;所述方法还包括:The method according to any one of claims 1-5, wherein the second shooting preview interface further comprises a first window; the method further comprises:
    所述电子设备在所述第一窗口中显示所述电子设备的摄像头实时采集得到的画面;The electronic device displays, in the first window, a picture captured in real time by a camera of the electronic device;
    在开始拍摄所述第一视频内容后的第一时刻,所述电子设备在所述第一窗口中显示所述第一部分的边界框;At a first moment after starting to capture the first video content, the electronic device displays the bounding box of the first part in the first window;
    在开始拍摄所述第一视频内容后的第二时刻,所述电子设备在所述第一窗口中显示所述第二部分的边界框。At a second moment after starting to capture the first video content, the electronic device displays the bounding box of the second portion in the first window.
  7. 根据权利要求1-5所述的方法,其特征在于,所述第二拍摄预览界面还包括第一窗口;所述方法还包括:The method according to claims 1-5, wherein the second shooting preview interface further comprises a first window; the method further comprises:
    在开始拍摄所述第一视频内容后的第一时刻,所述电子设备在所述第一窗口中显示所述第一拍摄选项对应的视频样片中在第一时刻时的视频画面;At the first moment after starting to shoot the first video content, the electronic device displays the video frame at the first moment in the video sample corresponding to the first shooting option in the first window;
    在开始拍摄所述第一视频内容后的第二时刻,所述电子设备在所述第一窗口中显示所述第一拍摄选项对应的视频样片中在第二时刻时的视频画面。At a second moment after starting to shoot the first video content, the electronic device displays, in the first window, a video image at the second moment in the video sample corresponding to the first shooting option.
  8. 根据权利要求6或7所述的方法,其特征在于,所述第一窗口和所述第二预览框的显示位置为以下任意一种:The method according to claim 6 or 7, wherein the display position of the first window and the second preview frame is any one of the following:
    所述第一窗口的至少部分区域和所述第二预览框的显示区域重叠;或者,At least a partial area of the first window overlaps with the display area of the second preview frame; or,
    所述第一窗口显示在所述第二拍摄预览界面中所述第二预览框之外的位置;或者,The first window is displayed in a position outside the second preview frame in the second shooting preview interface; or,
    所述第一窗口显示在所述第二预览框的右上角区域;或者,The first window is displayed in the upper right area of the second preview frame; or,
    所述第一窗口显示在所述第二预览框的左上角区域。The first window is displayed in the upper left area of the second preview frame.
  9. 根据权利要求6-8任一项所述的方法,其特征在于,所述第一窗口中包括有窗口关闭控件;所述方法还包括:The method according to any one of claims 6-8, wherein the first window includes a window closing control; the method further comprises:
    所述电子设备检测到针对所述第一窗口中所述窗口关闭控件的第八操作;The electronic device detects an eighth operation for the window closing control in the first window;
    响应于所述第八操作,所述电子设备关闭显示所述第一窗口。In response to the eighth operation, the electronic device closes and displays the first window.
  10. 根据权利要求9所述的方法,其特征在于,在所述电子设备关闭显示所述第一窗口后,所述方法还包括:The method according to claim 9, wherein after the electronic device closes and displays the first window, the method further comprises:
    所述电子设备在所述第二拍摄预览界面中显示窗口开启控件;The electronic device displays a window opening control in the second shooting preview interface;
    所述电子设备检测到针对所述窗口开启控件的第九操作;The electronic device detects a ninth operation for the window opening control;
    响应于所述第九操作,所述电子设备在所述第二拍摄预览界面上显示所述第一窗口。In response to the ninth operation, the electronic device displays the first window on the second shooting preview interface.
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述第二拍摄预览界面还包括有 运镜模式关闭控件;所述方法还包括:The method according to any one of claims 1-10, wherein the second shooting preview interface further includes a mirror movement mode close control; the method further includes:
    所述电子设备检测到作用于所述运镜模式关闭控件的第十操作;the electronic device detects a tenth operation acting on the mirror movement mode closing control;
    响应于所述第十操作,所述电子设备显示所述第一拍摄预览界面。In response to the tenth operation, the electronic device displays the first shooting preview interface.
  12. 根据权利要求1-6任一项所述的方法,其特征在于,所述第二拍摄预览界面还包括有第二窗口,所述方法还包括:The method according to any one of claims 1-6, wherein the second shooting preview interface further includes a second window, and the method further includes:
    所述电子设备在所述第二窗口中显示所述第一拍摄选项对应的第一音乐片段的波形图;The electronic device displays the waveform diagram of the first music segment corresponding to the first shooting option in the second window;
    其中,在开始拍摄所述第一视频内容后的第一时刻所述波形图中的音频信息与在开始拍摄所述第一视频内容后的第二时刻所述波形图中的音频信息不同,所述音频信息包括以下一种或多种:节奏信息、幅度信息和风格信息。Wherein, the audio information in the waveform chart at the first moment after starting to shoot the first video content is different from the audio information in the waveform chart at the second moment after starting to shoot the first video content, so the audio information in the waveform chart is different. The audio information includes one or more of the following: rhythm information, amplitude information, and style information.
  13. 根据权利要求12所述的方法,其特征在于,在所述电子设备开始拍摄所述第一视频内容之后,所述方法还包括:The method according to claim 12, wherein after the electronic device starts to shoot the first video content, the method further comprises:
    所述电子设备播放所述第一音乐片段。The electronic device plays the first piece of music.
  14. 根据权利要求12或13所述的方法,其特征在于,所述方法还包括:The method according to claim 12 or 13, wherein the method further comprises:
    当所述电子设备将所述第一部分保存为视频文件中第一时刻的视频画面,将所述第二部分保存为所述视频文件中第二时刻的视频画面时,所述电子设备将所述第一音乐片段保存在所述视频文件的音频数据中。When the electronic device saves the first part as a video frame at the first moment in the video file and saves the second part as a video frame at the second moment in the video file, the electronic device saves the The first piece of music is stored in the audio data of the video file.
  15. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    所述电子设备在显示所述电子设备的摄像头实时采集得到的画面之前,对所述电子设备的摄像头实时采集得到的画面进行稳像处理,所述稳像处理包括以下一种或多种:电子稳像EIS处理、光学稳像处理、机械稳像处理。Before displaying the picture captured by the camera of the electronic device in real time, the electronic device performs image stabilization processing on the image captured in real time by the camera of the electronic device, and the image stabilization process includes one or more of the following: electronic Image stabilization EIS processing, optical image stabilization processing, mechanical image stabilization processing.
  16. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    在所述电子设备在所述第二预览框中显示所述电子设备的摄像头实时采集得到的画面的第一部分之前,所述电子设备对所述第一部分进行图像超分辨率重建;Before the electronic device displays, in the second preview frame, the first part of the picture captured by the camera of the electronic device in real time, the electronic device performs image super-resolution reconstruction on the first part;
    在所述电子设备在所述第二预览框中显示所述电子设备的摄像头实时采集得到的画面的第二部分之前,所述电子设备对所述第二部分进行图像超分辨率重建;Before the electronic device displays, in the second preview frame, the second part of the picture captured by the camera of the electronic device in real time, the electronic device performs image super-resolution reconstruction on the second part;
    在所述电子设备在所述第三预览框中显示所述电子设备的摄像头实时采集得到的画面的第三部分之前,所述电子设备对所述第三部分进行图像超分辨率重建;Before the electronic device displays, in the third preview frame, the third part of the picture captured by the camera of the electronic device in real time, the electronic device performs image super-resolution reconstruction on the third part;
    在所述电子设备在所述第三预览框中显示所述电子设备的摄像头实时采集得到的画面的第四部分之前,所述电子设备对所述第四部分进行图像超分辨率重建。Before the electronic device displays the fourth part of the picture captured in real time by the camera of the electronic device in the third preview frame, the electronic device performs image super-resolution reconstruction on the fourth part.
  17. 根据权利要求1所述的方法,其特征在于,所述电子设备的摄像头包括广角摄像头和非广角摄像头;The method according to claim 1, wherein the camera of the electronic device comprises a wide-angle camera and a non-wide-angle camera;
    所述第一预览框显示所述电子设备的摄像头实时采集得到的画面,具体包括:The first preview frame displays the picture captured in real time by the camera of the electronic device, which specifically includes:
    所述第一预览框显示所述非广角摄像头实时采集得到的画面;The first preview frame displays a picture acquired by the non-wide-angle camera in real time;
    所述第二预览框显示所述电子设备的摄像头实时采集得到的画面,具体包括:The second preview frame displays the picture captured in real time by the camera of the electronic device, which specifically includes:
    所述第二预览框显示所述广角摄像头实时采集得到的画面;The second preview frame displays the picture acquired by the wide-angle camera in real time;
    所述第三预览框显示所述电子设备的摄像头实时采集得到的画面,具体包括:The third preview frame displays the picture captured by the camera of the electronic device in real time, which specifically includes:
    所述第三预览框显示所述广角摄像头实时采集得到的画面。The third preview frame displays a picture acquired by the wide-angle camera in real time.
  18. 一种电子设备,其特征在于,包括:触控屏、摄像头、一个或多个处理器和一个或多个存储器;所述一个或多个处理器与所述触控屏、所述摄像头、所述一个或多个存储器耦合,所述一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,使得所述电子设备执行如权利要求1-17中的任一项所述的方法。An electronic device, characterized by comprising: a touch screen, a camera, one or more processors, and one or more memories; the one or more processors and the touch screen, the camera, the the one or more memories are coupled for storing computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device The method of any of claims 1-17 is performed.
  19. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-17中任一项所述的方法。A computer-readable storage medium comprising instructions, wherein when the instructions are executed on an electronic device, the electronic device is caused to perform the method of any one of claims 1-17.
PCT/CN2021/116944 2020-09-29 2021-09-07 Image processing method and related apparatus WO2022068537A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011053345.5 2020-09-29
CN202011053345.5A CN113556461B (en) 2020-09-29 2020-09-29 Image processing method, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2022068537A1 true WO2022068537A1 (en) 2022-04-07

Family

ID=78101639

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116944 WO2022068537A1 (en) 2020-09-29 2021-09-07 Image processing method and related apparatus

Country Status (2)

Country Link
CN (2) CN115379112A (en)
WO (1) WO2022068537A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115237297A (en) * 2022-09-21 2022-10-25 荣耀终端有限公司 Method for displaying schedule and related device
CN115379195A (en) * 2022-08-26 2022-11-22 维沃移动通信有限公司 Video generation method and device, electronic equipment and readable storage medium
CN115550559A (en) * 2022-04-13 2022-12-30 荣耀终端有限公司 Video picture display method, device, equipment and storage medium
CN116055868A (en) * 2022-05-30 2023-05-02 荣耀终端有限公司 Shooting method and related equipment
CN116051368A (en) * 2022-06-29 2023-05-02 荣耀终端有限公司 Image processing method and related device
CN116095262A (en) * 2023-04-11 2023-05-09 北京仁光科技有限公司 Mobile processing device, processing method and system for processing video signal source
CN116132790A (en) * 2022-05-25 2023-05-16 荣耀终端有限公司 Video recording method and related device
CN117119276A (en) * 2023-04-21 2023-11-24 荣耀终端有限公司 Underwater shooting method and electronic equipment
CN117135452A (en) * 2023-03-31 2023-11-28 荣耀终端有限公司 Shooting method and electronic equipment

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114187216A (en) * 2021-11-17 2022-03-15 海南乾唐视联信息技术有限公司 Image processing method and device, terminal equipment and storage medium
CN114222065B (en) * 2021-12-20 2024-03-08 北京奕斯伟计算技术股份有限公司 Image processing method, image processing apparatus, electronic device, storage medium, and program product
CN114500851A (en) * 2022-02-23 2022-05-13 广州博冠信息科技有限公司 Video recording method and device, storage medium and electronic equipment
CN114549712B (en) * 2022-04-25 2022-07-12 北京搜狐新媒体信息技术有限公司 Method and device for generating dynamic webp format picture
CN117441341A (en) * 2022-05-18 2024-01-23 北京小米移动软件有限公司 Image processing method, device, mobile terminal and storage medium
CN116088740B (en) * 2022-05-30 2023-10-31 荣耀终端有限公司 Interface processing method and device
CN116723416B (en) * 2022-10-21 2024-04-02 荣耀终端有限公司 Image processing method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110096204A1 (en) * 2009-10-22 2011-04-28 Canon Kabushiki Kaisha Image pickup apparatus
US20130076944A1 (en) * 2011-09-26 2013-03-28 Sony Mobile Communications Japan, Inc. Image photography apparatus
CN108900790A (en) * 2018-06-26 2018-11-27 努比亚技术有限公司 Method of video image processing, mobile terminal and computer readable storage medium
CN109361865A (en) * 2018-11-21 2019-02-19 维沃移动通信(杭州)有限公司 A kind of image pickup method and terminal
CN111093023A (en) * 2019-12-19 2020-05-01 维沃移动通信有限公司 Video shooting method and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102289837B1 (en) * 2017-01-06 2021-08-17 삼성전자주식회사 Method and electronic device for taking a photograph
CN109831622B (en) * 2019-01-03 2021-06-22 华为技术有限公司 Shooting method and electronic equipment
CN110381276B (en) * 2019-05-06 2021-08-13 华为技术有限公司 Video shooting method and electronic equipment
CN110445978B (en) * 2019-06-24 2020-12-15 华为技术有限公司 Shooting method and equipment
CN111083354A (en) * 2019-11-27 2020-04-28 维沃移动通信有限公司 Video recording method and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110096204A1 (en) * 2009-10-22 2011-04-28 Canon Kabushiki Kaisha Image pickup apparatus
US20130076944A1 (en) * 2011-09-26 2013-03-28 Sony Mobile Communications Japan, Inc. Image photography apparatus
CN108900790A (en) * 2018-06-26 2018-11-27 努比亚技术有限公司 Method of video image processing, mobile terminal and computer readable storage medium
CN109361865A (en) * 2018-11-21 2019-02-19 维沃移动通信(杭州)有限公司 A kind of image pickup method and terminal
CN111093023A (en) * 2019-12-19 2020-05-01 维沃移动通信有限公司 Video shooting method and electronic equipment

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115550559A (en) * 2022-04-13 2022-12-30 荣耀终端有限公司 Video picture display method, device, equipment and storage medium
CN115550559B (en) * 2022-04-13 2023-07-25 荣耀终端有限公司 Video picture display method, device, equipment and storage medium
CN116132790A (en) * 2022-05-25 2023-05-16 荣耀终端有限公司 Video recording method and related device
CN116132790B (en) * 2022-05-25 2023-12-05 荣耀终端有限公司 Video recording method and related device
CN116055868A (en) * 2022-05-30 2023-05-02 荣耀终端有限公司 Shooting method and related equipment
CN116055868B (en) * 2022-05-30 2023-10-20 荣耀终端有限公司 Shooting method and related equipment
CN116051368A (en) * 2022-06-29 2023-05-02 荣耀终端有限公司 Image processing method and related device
CN116051368B (en) * 2022-06-29 2023-10-20 荣耀终端有限公司 Image processing method and related device
CN115379195B (en) * 2022-08-26 2023-10-03 维沃移动通信有限公司 Video generation method, device, electronic equipment and readable storage medium
CN115379195A (en) * 2022-08-26 2022-11-22 维沃移动通信有限公司 Video generation method and device, electronic equipment and readable storage medium
CN115237297A (en) * 2022-09-21 2022-10-25 荣耀终端有限公司 Method for displaying schedule and related device
CN117135452A (en) * 2023-03-31 2023-11-28 荣耀终端有限公司 Shooting method and electronic equipment
CN116095262A (en) * 2023-04-11 2023-05-09 北京仁光科技有限公司 Mobile processing device, processing method and system for processing video signal source
CN116095262B (en) * 2023-04-11 2023-08-22 北京仁光科技有限公司 Mobile processing device, processing method and system for processing video signal source
CN117119276A (en) * 2023-04-21 2023-11-24 荣耀终端有限公司 Underwater shooting method and electronic equipment

Also Published As

Publication number Publication date
CN115379112A (en) 2022-11-22
CN113556461B (en) 2022-07-26
CN113556461A (en) 2021-10-26

Similar Documents

Publication Publication Date Title
WO2022068537A1 (en) Image processing method and related apparatus
WO2021093793A1 (en) Capturing method and electronic device
WO2020073959A1 (en) Image capturing method, and electronic device
US11856286B2 (en) Video shooting method and electronic device
CN112954219A (en) Multi-channel video recording method and equipment
CN113489894B (en) Shooting method and terminal in long-focus scene
WO2021244455A1 (en) Image content removal method and related apparatus
CN111669462B (en) Method and related device for displaying image
US20220417416A1 (en) Photographing method in telephoto scenario and mobile terminal
CN113497881B (en) Image processing method and device
CN113891009B (en) Exposure adjusting method and related equipment
CN113170037A (en) Method for shooting long exposure image and electronic equipment
WO2023273323A1 (en) Focusing method and electronic device
CN112637477A (en) Image processing method and electronic equipment
CN115484380A (en) Shooting method, graphical user interface and electronic equipment
CN113448658A (en) Screen capture processing method, graphical user interface and terminal
CN113542574A (en) Shooting preview method under zooming, terminal, storage medium and electronic equipment
WO2022228010A1 (en) Method for generating cover, and electronic device
WO2023160224A9 (en) Photographing method and related device
EP4277257A1 (en) Filming method and electronic device
WO2023036084A1 (en) Image processing method and related apparatus
WO2023185886A1 (en) Photographing method and electronic device
WO2021204103A1 (en) Picture preview method, electronic device, and storage medium
CN113452895A (en) Shooting method and equipment

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: 21874198

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21874198

Country of ref document: EP

Kind code of ref document: A1