Time-lapse photography method and related equipment
By providing a preview interface and user setting shooting parameters and filter effects in time-lapse photography mode, the problem of fixed time-lapse photography effect and large power consumption in the existing technology is solved, and flexible time-lapse photography effect and low power consumption are achieved. video shooting improves user experience.
Patent Information
- Application Number
- CN202311138044.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-08-31
AI Technical Summary
In the prior art, the video shooting effect of the time-lapse photography method is fixed, which cannot meet the needs of different scenarios and users, and has a large power consumption, affecting the performance of the equipment.
Provides a time-lapse photography method, which allows users to manually set shooting parameters and filter effects by displaying the preview interface in time-lapse photography mode, generates and stores target video streams, reduces power consumption and improves image quality.
It realizes adjusting the time-lapse photography effect according to user needs, meeting diversified needs, reducing power consumption, and improving the image quality and user experience of video.
Smart Images

Figure CN117714850B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminals, and in particular, to a time-lapse photography method and related equipment. Background Art
[0002] With the development of shooting functions in electronic devices, more and more camera shooting functions are being added to electronic devices. For example, electronic devices may have multiple shooting functions such as night scene shooting, portrait shooting, and time-lapse photography. Among them, time-lapse photography can be understood as time-lapse photography, which can synthesize images recorded for several minutes, hours, or even days into a video, and then reproduce the process of time flow and changes of different objects in a short time.
[0003] In the prior art, the terminal device usually samples at a fixed frame rate during time-lapse photography, and then synthesizes the sampled data frames into a time-lapse video. However, the video shooting effect obtained by the above time-lapse photography method is fixed and cannot meet the needs of different scenes and users. Summary of the invention
[0004] The present application provides a time-lapse photography method and related equipment, which can flexibly meet the different needs of users, improve the image quality of time-lapse photography and reduce power consumption.
[0005] In a first aspect, a time-lapse photography method is provided, the method comprising:
[0006] A preview interface in the time-lapse photography mode is displayed, wherein the preview interface includes a shooting parameter setting control, a shooting control and a preview window, wherein the preview window displays a preview stream; a first operation on the shooting parameter setting control is detected; in response to the first operation, a shooting parameter setting sub-process is triggered, wherein the shooting parameter setting sub-process is used to set shooting parameters, wherein the shooting parameters include a capture rate in a video recording; a second operation on the shooting control is detected; in response to the second operation, shooting is performed based on the shooting parameters, and a target video stream is generated and stored.
[0007] The time-lapse photography method provided in this application can be used to shoot a variety of scenes such as construction, urban scenery, natural scenery, astronomical phenomena, urban life or biological evolution.
[0008] In an embodiment of the present application, after entering the time-lapse photography mode, the user can set the shooting parameters by operating the shooting parameter setting controls on the display interface; in this way, before shooting, the user can manually adjust the specific shooting parameters involved in the time-lapse photography in advance based on his or her own needs, and then, when shooting, the electronic device shoots based on the adjusted shooting parameters, so that time-lapse videos corresponding to different effects can be adaptively obtained, meeting the diverse needs of users and improving the user experience.
[0009] In combination with the first aspect, in certain implementations of the first aspect, the preview interface also includes: a filter control; before detecting a second operation on the shooting control, the method also includes: detecting a third operation on the filter control; in response to the third operation, triggering a filter setting sub-process, the filter setting sub-process being used to set a target filter effect.
[0010] In this implementation, after entering the time-lapse photography mode, the user can also set the filter by operating the filter controls on the display interface; in this way, before shooting, the user can manually adjust the specific filters involved in the time-lapse photography based on their own needs, and then, when shooting, the electronic device shoots based on the adjusted target filter effect, so that time-lapse videos corresponding to different effects can be adaptively obtained to meet the diverse needs of users and improve user experience.
[0011] In combination with the first aspect, in certain implementations of the first aspect, in response to the second operation, shooting is performed based on the shooting parameters, and a target video stream is generated and stored, including: in response to the second operation, a recording request and a snapshot request in the recording are received, the snapshot request in the recording includes a snapshot rate in the recording; based on the recording request, an initial video stream is obtained and discarded; based on the snapshot request in the recording, an initial snapshot stream is obtained; the initial snapshot stream is processed and encoded, and the target video stream is generated and stored.
[0012] In this implementation, the capture rate in the video can be set in advance, so after starting to shoot, the electronic device can obtain the corresponding time-lapse video based on the rate set by the user; in this process, only the corresponding images obtained at this rate need to be processed; compared with the prior art method of first obtaining a large number of images, and then extracting frames to generate time-lapse videos after image processing, the method provided by this application can reduce a lot of power consumption. In addition, since the target video stream is obtained based on the captured image processing, the image quality is higher than that of the prior art.
[0013] In combination with the first aspect, in certain implementations of the first aspect, when the method includes triggering a filter setting sub-process in response to a third operation, processing and encoding the initial snapshot stream, generating and storing a target video stream, including: processing and encoding the initial snapshot stream in combination with a target filter effect, generating and storing a target video stream.
[0014] In this implementation, the target filter effect can be set in advance, so after starting shooting, the electronic device can obtain the corresponding time-lapse video based on the target filter effect set by the user; in this process, it is only necessary to perform filter processing on the image corresponding to the set shooting parameters. The number of processed images is small, the power consumption is small, and it can meet the needs of different shooting effects.
[0015] In combination with the first aspect, in certain implementations of the first aspect, the initial snapshot stream includes an initial snapshot image and anti-shake parameters; the initial snapshot stream is processed and encoded to generate and store a target video stream, including: processing the initial snapshot image in combination with the anti-shake parameters; format conversion and encoding the processed initial snapshot stream to generate and store the target video stream.
[0016] Exemplarily, the anti-shake parameters may include gyro sensor (gyro) data, image feature points, etc.
[0017] Exemplarily, the format conversion may indicate converting an image in the RAW domain into an image in the YUV domain.
[0018] In this implementation, combined with anti-shake processing, the impact of jitter on the image during the camera module acquisition process can be eliminated, and the image clarity can be improved. After the format conversion, the amount of image data in the YUV domain is less than that in the RAW domain, which can increase the speed of subsequent transmission.
[0019] In combination with the first aspect, in certain implementations of the first aspect, before format conversion and encoding of the processed initial captured stream and generating and storing the target video stream, the method further includes: processing the initial captured image in combination with the target filter effect.
[0020] In this implementation, when the user adjusts the filter effect, the initial captured image can be processed in combination with the set target filter effect, thereby obtaining a target video stream carrying the corresponding filter effect.
[0021] In combination with the first aspect, in certain implementations of the first aspect, in response to a first operation, a shooting parameter setting sub-process is triggered, including: in response to the first operation, a first shooting parameter setting interface is displayed, the first shooting parameter setting interface includes a sub-shooting parameter control and corresponding subsidiary controls; in response to a fourth operation on the subsidiary control, a second shooting parameter setting interface is displayed, the second shooting parameter setting interface corresponds to the set shooting parameters; and switching to a preview interface.
[0022] In this implementation, the first shooting parameter setting interface can be triggered to display by operating the shooting parameter setting control, and then specific parameter settings can be performed. After setting the shooting parameters, the preview interface can be returned.
[0023] In combination with the first aspect, in certain implementations of the first aspect, in response to a third operation, a filter setting sub-process is triggered, including: in response to the third operation, a first filter setting interface is displayed, the first filter setting interface includes multiple filter effect options; in response to a fifth operation for multiple filter effect options, a target filter effect is determined, and a second filter setting interface is displayed in combination with the target filter effect; and a preview interface is switched.
[0024] In this implementation, the filter setting control can be operated to trigger the display of the first filter setting interface, and then specific filter settings can be performed. After the filter is set, the preview interface can be returned.
[0025] In combination with the first aspect, in some implementations of the first aspect, the method further includes: receiving a preview request; obtaining an initial preview stream based on the preview request; and processing and encoding the initial preview stream to generate a preview stream.
[0026] In this implementation, in the time-lapse photography mode, a preview request can be issued before and after shooting starts to obtain and generate a preview stream.
[0027] In combination with the first aspect, in certain implementations of the first aspect, when the method includes triggering a filter setting sub-process in response to a third operation, processing and encoding the initial preview stream to generate a preview stream, including: processing and encoding the initial preview stream in combination with a target filter effect to generate a preview stream.
[0028] In this implementation, in the time-lapse photography mode, after the filter is set before shooting begins, the initial preview image can be processed in combination with the target filter effect, so that the displayed preview stream can be combined with the set target filter effect.
[0029] In combination with the first aspect, in certain implementations of the first aspect, the shooting parameters also include: recording time, zoom ratio, and filming time.
[0030] In a second aspect, an electronic device is provided, the electronic device comprising: a processor and a memory; the memory is used to store a computer program that can be run on the processor, and the processor is used to execute:
[0031] Display a preview interface in the time-lapse photography mode; detect a first operation on a shooting parameter setting control; in response to the first operation, trigger a shooting parameter setting sub-process, the shooting parameter setting sub-process is used to set shooting parameters, the shooting parameters including the capture rate in the video; detect a second operation on the shooting control; in response to the second operation, shoot based on the shooting parameters, generate and store a target video stream.
[0032] It should be understood that the expansion, limitation, explanation and description of the relevant contents in the above-mentioned first aspect also apply to the same contents in the second aspect.
[0033] In a third aspect, a chip is provided. The chip is applied to an electronic device. The chip includes one or more processors. The processor is used to call computer instructions so that the electronic device executes any one of the time-lapse photography methods in the first aspect.
[0034] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the electronic device executes any one of the time-lapse photography methods in the first aspect.
[0035] In a fifth aspect, a computer program product is provided, comprising: a computer program code, which, when executed by an electronic device, enables the electronic device to execute any one of the time-lapse photography methods in the first aspect.
[0036] In an embodiment of the present application, after entering the time-lapse photography mode, the user can set shooting parameters and / or filter settings by operating the relevant controls on the display interface; in this way, before shooting, the user can manually adjust the specific shooting parameters and filters involved in the time-lapse photography based on his or her own needs, and then, when shooting, the electronic device shoots based on the adjusted shooting parameters and / or target filter effects, so that time-lapse videos with different effects can be adaptively shot according to different needs, thereby meeting the diverse needs of users and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a schematic diagram of a hardware system of an electronic device applicable to the present application;
[0038] Figure 2 It is a schematic diagram of a software system of an electronic device provided by a related art;
[0039] Figure 3 is a schematic diagram of a graphical user interface applicable to an embodiment of the present application;
[0040] Figure 4 is a schematic diagram of another graphical user interface applicable to an embodiment of the present application;
[0041] Figure 5 is a schematic diagram of another graphical user interface applicable to an embodiment of the present application;
[0042] Figure 6 is a schematic flow chart of a time-lapse photography method provided in an embodiment of the present application;
[0043] Figure 7 is a schematic flow chart of another time-lapse photography method provided in an embodiment of the present application;
[0044] Figure 8 is a schematic flow chart of a shooting parameter setting sub-process provided in an embodiment of the present application;
[0045] Fig. 9 yes Figure 8 A schematic diagram of an interface for setting shooting parameters involved;
[0046] Fig.10 yes Figure 8 Another interface schematic diagram of the shooting parameter setting interface involved;
[0047] Fig.11 yes Figure 8 A schematic diagram of another interface of the shooting parameter setting interface involved;
[0048] Fig.12 yes Figure 8 A schematic diagram of another interface of the shooting parameter setting interface involved;
[0049] Fig.13 is a schematic flow chart of the filter setting sub-process provided in an embodiment of the present application;
[0050] Fig.14 yes Fig.13 Schematic diagram of the filter setting interface involved;
[0051] Fig.15 It is a schematic diagram of a software architecture provided by an embodiment of the present application;
[0052] Fig.16 It is a schematic diagram of the structure of each module in the hardware abstraction layer provided in the embodiment of the present application;
[0053] Fig.17 It is an example of an initial preview stream, an initial video stream, and an initial snapshot stream provided in an embodiment of the present application;
[0054] Fig.18 is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0055] Fig.19 It is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In the embodiments of the present application, the following terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present embodiment, unless otherwise specified, "plurality" means two or more.
[0057] In order to facilitate the understanding of the embodiments of the present application, the relevant concepts involved in the embodiments of the present application are first briefly described.
[0058] Shooting parameters may include shutter, exposure time, aperture value (AV), exposure value (EV) and ISO, which are introduced below.
[0059] The shutter is a device that controls the length of time light enters the camera to determine the exposure time of the image. The longer the shutter remains open, the more light enters the camera and the longer the corresponding exposure time of the image. Conversely, the shorter the shutter remains open, the less light enters the camera and the shorter the corresponding exposure time of the image.
[0060] Exposure time refers to the time the shutter is open in order to project light onto the photosensitive surface of the camera's photosensitive material. The exposure time is determined by the sensitivity of the photosensitive material and the illumination on the photosensitive surface. The longer the exposure time, the more light enters the camera, and the shorter the exposure time, the less light enters the camera. Therefore, a long exposure time is required in a dark scene, and a short exposure time is required in a backlit scene.
[0061] The aperture value is the ratio of the focal length of the lens in the camera to the diameter of the lens. The larger the aperture value, the more light enters the camera. The smaller the aperture value, the less light enters the camera.
[0062] The exposure value is a combination of exposure time and aperture value to represent the light transmission capacity of the camera lens. The exposure value can be defined as:
[0063]
[0064] Where N is the aperture value; t is the exposure time in seconds.
[0065] ISO is used to measure the sensitivity of film to light, i.e., sensitivity or gain. For insensitive film, a longer exposure time is required to achieve an image with the same brightness as sensitive film. For sensitive film, a shorter exposure time is required to achieve an image with the same brightness as insensitive film.
[0066] Among the shooting parameters, shutter, exposure time, aperture value, exposure value and ISO, the electronic device can implement at least one of auto focus (AF), automatic exposure (AE), and auto white balance (AWB) through an algorithm to achieve automatic adjustment of these shooting parameters.
[0067] Autofocus means that the electronic device adjusts the position of the focusing lens to obtain the highest image frequency component to obtain a higher image contrast. Among them, focusing is a continuous accumulation process. The electronic device compares the contrast of images taken by the lens in different positions to obtain the position of the lens when the image contrast is the largest, and then determines the focal length for focusing.
[0068] Automatic exposure refers to the electronic device automatically setting the exposure value according to the available light conditions. The electronic device can automatically set the shutter speed and aperture value according to the exposure value of the current captured image to achieve automatic exposure setting.
[0069] The color of an object will change due to the color of the projected light, and the images captured by electronic devices will have different color temperatures under different light colors. White balance is closely related to the surrounding light. Regardless of the ambient light, the camera of an electronic device can recognize white and restore other colors based on white. Automatic white balance allows electronic devices to adjust the fidelity of image colors according to light source conditions. 3A refers to auto focus, auto exposure, and auto white balance.
[0070] Exemplarily, the exposure value may be any one of -24, -4, -3, -2, -1, 0, 1, 2, 3, 4, and 24.
[0071] The exposure image corresponding to EV0 is used to indicate that when the electronic device implements exposure through an algorithm, the exposure image is captured by the determined exposure value 0. The exposure image corresponding to EV-2 is used to indicate that when the electronic device implements exposure through an algorithm, the exposure image is captured by the determined exposure value -2. The exposure image corresponding to EV1 is used to indicate that when the electronic device implements exposure through an algorithm, the exposure image is captured by the determined exposure value 1. The rest is by analogy and will not be repeated here.
[0072] Among them, every increase of 1 in the exposure value will change the exposure by one stop, that is, the exposure amount (referring to the integral of the light intensity received by a certain surface element on the surface of the object within the time t) is doubled, such as doubling the exposure time or the aperture area. Then, the increase in the exposure value will correspond to a slower shutter speed and a smaller f-value. It can be seen that EV0 has an increase of 2 in the exposure value relative to EV-2, which changes the exposure by two stops; similarly, EV1 has an increase of 1 in the exposure value relative to EV0, which changes the exposure by one stop.
[0073] Here, when the exposure value EV is equal to 0, the exposure value is generally the best exposure value under the current lighting conditions. Accordingly, the exposure image correspondingly acquired by the electronic device under the condition of EV0 is the best exposure image under the current lighting conditions, and the best exposure image can also be called a reference exposure image.
[0074] Figure 1 A hardware system of an electronic device suitable for the present application is shown.
[0075] The electronic device 100 can be a mobile phone, a smart screen, a tablet computer, a wearable electronic device, an in-vehicle electronic device, an augmented reality (AR) device, a virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a projector, etc. The embodiment of the present application does not impose any restrictions on the specific type of the electronic device 100.
[0076] 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, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. 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, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0077] It should be noted that Figure 1 The structure shown does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include Figure 1 More or fewer components than those shown, or the electronic device 100 may include Figure 1Combinations of some of the components shown, or the electronic device 100 may include Figure 1 Subassemblies of some of the components shown. Figure 1 The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0078] Exemplarily, the processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and a neural-network processing unit (NPU). Among them, different processing units may be independent devices or integrated devices. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
[0079] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0080] In some embodiments, the processor 110 may include one or more interfaces. For example, the processor 110 may include at least one of the following interfaces: an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and a USB interface.
[0081] Figure 1 The connection relationship between the modules shown is only a schematic illustration and does not constitute a limitation on the connection relationship between the modules of the electronic device 100. Optionally, the modules of the electronic device 100 may also adopt a combination of multiple connection modes in the above embodiments.
[0082] The wireless communication function of the electronic device 100 can be implemented through components such as the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
[0083] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0084] The electronic device 100 can realize the display function through the GPU, the display screen 194 and the application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0085] Display screen 194 may be used to display images or videos.
[0086] Optionally, the display screen 194 can be used to display images or videos. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a micro OLED (Micro OLED) or a quantum dot light emitting diode (QLED). In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0087] Exemplarily, the electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0088] Exemplarily, the ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted to the camera photosensitive element through the camera, and the light signal is converted into an electrical signal. The camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can perform algorithmic optimization on the noise, brightness and color of the image, and the ISP can also optimize the exposure and color temperature of the shooting scene and other parameters. In some embodiments, the ISP can be set in the camera 193.
[0089] Exemplarily, the camera 193 (also referred to as a lens) is used to capture static images or videos. It can be triggered to start by an application instruction to realize the photo function, such as taking an image of any scene. The camera may include components such as an imaging lens, a filter, and an image sensor. The light emitted or reflected by the object enters the imaging lens, passes through the filter, and finally converges on the image sensor. The imaging lens is mainly used to converge the light emitted or reflected by all objects in the photographing angle (also referred to as the scene to be photographed, the target scene, or the scene image that the user expects to shoot) to form an image; the filter is mainly used to filter out excess light waves in the light (for example, light waves other than visible light, such as infrared); the image sensor can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The image sensor is mainly used to perform photoelectric conversion on the received light signal, convert it into an electrical signal, and then transmit 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. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, etc. format.
[0090] Exemplarily, the digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0091] Exemplarily, a video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0092] Exemplarily, the gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x-axis, the y-axis, and the z-axis) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used in scenes such as navigation and somatosensory games.
[0093] For example, the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally the x-axis, y-axis, and z-axis). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 180E can also be used to identify the posture of the electronic device 100 as an input parameter for applications such as horizontal and vertical screen switching and pedometers.
[0094] Exemplarily, the distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, for example, in a shooting scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0095] Exemplarily, the ambient light sensor 180L is used to sense the brightness of the ambient light. 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 to prevent accidental touches.
[0096] For example, the fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement functions such as unlocking, accessing application locks, taking photos, and answering calls.
[0097] Exemplarily, the touch sensor 180K is also referred to as a touch control device. 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, which is also referred to as a touch control screen. The touch sensor 180K is used to detect a touch operation acting on or near it. The touch sensor 180K may pass the detected touch operation to the application processor to determine the type of touch event. A visual output related to the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, and may be disposed at a different position from the display screen 194.
[0098] It should be understood that the above is merely an example of the hardware system of the electronic device provided in the present application, and does not impose any limitation on the hardware system of the electronic device of the present application.
[0099] Figure 2 A schematic diagram of a software system of an electronic device provided by a related art is shown.
[0100] like Figure 2 As shown, in the prior art, a camera application is opened, and in response to a start shooting operation for time-lapse photography in the camera application, the camera application can send a preview request and a recording request; after the data obtained by the camera module undergoes relevant image processing, one path can generate a preview stream for display, and the other path can be processed for frame sampling and encoding, and a preview callback stream can be generated as the obtained time-lapse photography video.
[0101] In this way, the frame rate of frame extraction is fixed and must be set in the frame extraction and encoding module in advance. Then, when processing in the frame extraction and encoding module, frame sampling and encoding will be performed according to the fixed frame rate. Therefore, the electronic device uses a fixed frame rate for frame sampling and encoding for different shooting contents or different shooting scenes, resulting in a relatively fixed shooting effect that cannot meet the needs of different scenes; the quality of the video obtained by processing the preview stream with poor quality is also relatively poor, affecting the user experience; in addition, the method of first obtaining the initial preview stream, processing it, and then extracting the frame also consumes relatively large power consumption, affecting the performance of the electronic device.
[0102] In view of this, the present application provides a time-lapse photography method and related equipment. In an embodiment of the present application, after entering the time-lapse photography mode, the user can set shooting parameters and / or filter settings by operating the relevant controls provided on the display interface; in this way, before shooting, the user can manually adjust the specific shooting parameters and filters involved in the time-lapse photography in advance based on their own needs; then, when shooting, the electronic device shoots based on the adjusted shooting parameters and / or target filter effects, so that time-lapse videos with different effects can be adaptively shot according to different needs, meeting the diverse needs of users and improving user experience.
[0103] The time-lapse photography method provided in this application can be used to shoot a variety of scenes such as construction, urban scenery, natural scenery, astronomical phenomena, urban life or biological evolution.
[0104] Exemplarily, the time-lapse photography method provided in the present application can be applied to photographing sunrise, sunset, flower growth, traffic, the Milky Way, and the starry sky, etc.
[0105] For example, the time-lapse photography method provided in the present application can also be applied to a streamer shutter (B shuttersnapshot) scene or a streamer shutter function. The streamer shutter indicates a shooting method through a longer exposure time, aiming to create a flow effect.
[0106] In an embodiment of the present application, a time-lapse photography method and related equipment are provided. The time-lapse photography method provided according to the embodiment of the present application can solve the problem that the shooting parameters of the electronic device are fixed and the frame extraction processing power consumption is high, so that the electronic device can obtain high-quality time-lapse photography videos in a low-power manner in accordance with different needs.
[0107] Optionally, the time-lapse photography method in the embodiment of the present application can be applied to the movie mode of the camera application; or, the time-lapse photography method in the embodiment of the present application can be applied to the time-lapse photography mode of the camera application.
[0108] Figure 3 is a schematic diagram of a graphical user interface suitable for an embodiment of the present application.
[0109] Exemplarily, after the electronic device runs the camera application, it displays the preview interface 11, such as Figure 3As shown in (a); the preview interface 11 includes a preview image, mode options, a thumbnail display control, a camera flip control, a zoom control and a shooting control X1; wherein the mode options include large aperture, night scene, portrait, photo, video, movie, professional and more options. When different mode options are moved to the center line of the preview interface 11, it indicates that the mode is the currently selected shooting mode; the thumbnail display control is used to display a thumbnail image of the last completed image shot; the camera flip control is used to switch between the front camera and the rear camera. Here, after the electronic device runs the camera application, the photo mode is selected by default, and the zoom ratio displayed by the zoom control is the zoom ratio corresponding to the photo mode.
[0110] The electronic device detects a sliding operation on a mode option, such as Figure 3 As shown in (a) of FIG. 1 , when it is detected that the currently selected mode is “movie” after sliding, a preview interface 12 is displayed, such as Figure 3 As shown in (b), the shooting control displayed in the preview interface 12 is switched from X1 to X2; here, since the mode has been switched from the photo mode to the movie mode, the zoom control displays the zoom multiple corresponding to the movie mode, and the preview interface 12 may not display the camera flip control. In addition, when switching to the movie mode, the top status bar of the preview interface 12 may display the control Y1, which is used to indicate whether the time-lapse photography mode is turned on or off. It can be understood that the time-lapse photography mode is entered from the preview interface entrance corresponding to the movie mode, which is equivalent to the secondary mode in the movie mode.
[0111] Based on the preview interface 12, the electronic device can detect a click operation on the control Y1, such as Figure 3 As shown in (c) in FIG. 1 , a preview interface 13 is displayed. Figure 3 As shown in (d), the shooting control displayed in the preview interface 13 is switched from X2 to X3; here, since the mode is switched from the movie mode to the time-lapse photography mode, a prompt Y2 may be displayed in the preview interface 13, such as displaying "Time-lapse photography is turned on" to prompt the user that the time-lapse photography mode has been turned on under the click operation, and the time-lapse photography mode may be used for related shooting next.
[0112] Figure 4 is a schematic diagram of another graphical user interface suitable for an embodiment of the present application.
[0113] Exemplarily, after the electronic device runs the camera application, it displays the preview interface 21, such as Figure 4 For the introduction of the preview interface 21, please refer to the introduction of the preview interface 11, which will not be repeated here.
[0114] The electronic device detects a sliding operation on a mode option, such as Figure 4 When it is detected that the currently selected mode after sliding is "more", a preview interface 22 is displayed, such as Figure 4 As shown in (b) in the figure, the preview interface 22 adds a mask on the original preview interface 21, and at the same time, a control Y1 indicating time-lapse photography and a control indicating HDR photography are displayed on the mask; in addition, compared with the preview interface 21, the preview interface 22 may not display thumbnail display controls, camera flip controls, zoom controls, and shooting controls, etc. The display content on the preview interface 22 can be specifically set as needed, and this application does not limit this.
[0115] Based on the preview interface 22, the electronic device detects a click operation on the control Y1, such as Figure 4 As shown in (c) in FIG. 1 , a preview interface 23 is displayed. Figure 4 As shown in (d) in the figure, the shooting control X3 is displayed in the preview interface 23; here, since the mode is the time-lapse photography mode, the preview interface 23 can display "Time-lapse photography" to prompt the user that it is in the time-lapse photography mode, or a prompt Y2 can be displayed, such as displaying "Time-lapse photography is turned on" to prompt the user that the time-lapse photography mode has been turned on under the click operation, and the time-lapse photography mode can be used for related shooting next.
[0116] Figure 5 is a schematic diagram of another graphical user interface suitable for the embodiment of the present application.
[0117] For example, Figure 5 As shown in (a) of FIG. 1 , in response to a click operation on a camera application, after the electronic device runs the camera application, a preview interface 31 is displayed by default, such as Figure 5 Alternatively, after the electronic device runs the camera application, it displays the preview interface 11, and the photo mode is selected by default, such as Figure 5 After the electronic device detects a sliding operation on the mode option, when the currently selected mode is changed to "time-lapse photography", a preview interface 31 is displayed, such as Figure 5 As shown in (c) in .
[0118] Preview interface 31 and Figure 4 The controls included in the preview interface 23 shown in (d) are similar, and the details can be referred to the above description of the preview interface 23, which will not be repeated here.
[0119] Understandably, relative to Figure 3 and Figure 4 , Figure 5 The time-lapse photography mode in is equivalent to the option in the first-level interface after the camera application is opened. This setting method makes it easier for users to select the time-lapse photography mode for shooting and shortens the depth of the trigger path.
[0120] Based on the above three trigger time-lapse photography modes, on the one hand, Figure 3 As shown in (d) Figure 4 As shown in (d) and Figure 5 As shown in (c) in the figure, when the time-lapse photography mode is triggered to turn on, the preview interface 13, the preview interface 23 and the preview interface 31 may also display a shooting parameter setting control Y3, and the shooting parameter setting control Y3 is used to indicate that the user can adjust the shooting parameters related to the time-lapse photography. For details, please refer to the relevant introduction in the time-lapse photography method provided later, which will not be repeated here.
[0121] On the other hand, a filter control Y4 can also be displayed in the top status bar of the preview interface 13 and the preview interface 23. The filter control Y4 is used to indicate that when the time-lapse photography mode is triggered, the user can also add different filters or remove filters according to the shooting content. For details, please refer to the relevant introduction in the time-lapse photography method provided later, which will not be repeated here.
[0122] It should be understood that the shooting parameters of electronic devices in the time-lapse photography mode in the related art are all pre-set before leaving the factory. In this way, when the user uses the electronic device, the shooting parameters are fixed, and thus the time-lapse photography mode cannot adapt to different shooting needs and cannot be adjusted and changed. In contrast, the present application allows the user to manually adjust the shooting parameters and select filters, so different shooting needs can be met, and time-lapse videos corresponding to different effects can be obtained, thereby improving the user experience.
[0123] It should be understood that the above is an example of the triggering entry of the time-lapse photography mode and does not impose any limitation on the triggering entry of the time-lapse photography mode of the present application.
[0124] Combine the following Figure 6 The time-lapse photography method provided in the embodiment of the present application is described in detail.
[0125] Figure 6 is a schematic flow chart of a time-lapse photography method provided in an embodiment of the present application. The method 200 may be Figure 1 The electronic device 100 shown executes; the method 200 includes S210 to S250, and S210 to S250 are described in detail below.
[0126] S210: Displaying a preview interface in the time-lapse photography mode.
[0127] The preview interface includes a shooting parameter setting control, a shooting control and a preview window, and the preview window is used to display a preview image. The preview image is an image generated by image processing of an initial preview image collected by the electronic device.
[0128] like Figure 2 As shown, the camera module can capture an initial preview image and send it to the camera hardware abstraction layer, and the camera hardware abstraction layer sends the initial preview stream including the initial preview image to the image processing module for processing to generate a preview stream.
[0129] For example, the preview interface is as follows: Figure 3 In the preview interface 13 shown in (d), the shooting parameter setting controls are as follows: Figure 3 The control Y3 shown in (d) in FIG. 1 , the shooting control is such as the control X3, and the preview window is such as Figure 3 The local area shown in (d) is used to display the preview image, and the preview image is Figure 3 The moon and the sea shown in (d).
[0130] Optionally, a camera application may be run before S310 .
[0131] For example, the user may instruct the electronic device to run the camera application by clicking the icon of the “Camera” application.
[0132] Exemplarily, when the electronic device is in the lock screen state, the user can instruct the electronic device to run the camera application by sliding the gesture to the right on the display screen of the electronic device. Alternatively, the electronic device is in the lock screen state, and the lock screen interface includes an icon of the camera application. The user instructs the electronic device to run the camera application by clicking the icon of the camera application. Alternatively, when the electronic device is running other applications, the application has the permission to call the camera application; the user can instruct the electronic device to run the camera application by clicking the corresponding control. For example, when the electronic device is running an instant messaging application, the user can instruct the electronic device to run the camera application by selecting the control of the camera function.
[0133] It should be understood that the above is an example of the operation of running a camera application; the electronic device may also run a camera application through voice instructions or other operations; this application does not impose any limitation on this.
[0134] It should also be understood that running the camera application may refer to launching the camera application.
[0135] S220: Detect a first operation on a shooting parameter setting control.
[0136] The first operation is used to indicate entering the shooting parameter sub-process and start setting shooting parameters, where the shooting parameters include the capture rate in the video.
[0137] Optionally, the first operation may be a click operation on a shooting parameter setting control.
[0138] For example, Figure 3 As shown in (d) in FIG. 1 , the shooting parameter setting control is control Y3, and the first operation is a click operation on control Y3.
[0139] Optionally, in an embodiment of the present application, the above description is given by taking the first operation as a click operation as an example; in an embodiment of the present application, the first operation may also be an operation of setting shooting parameters through voice instructions; or, an operation of starting to set shooting parameters through other instructions; the present application does not impose any limitation on this.
[0140] S230: In response to the first operation, trigger a shooting parameter setting sub-process, where the shooting parameter setting sub-process is used to set shooting parameters, where the shooting parameters include a capture rate in the video.
[0141] It should be understood that the shooting parameter setting sub-process includes setting the capture rate in the video recording, and the shooting parameters may also include other parameters, which are not limited in this application.
[0142] After triggering the shooting parameter setting sub-process, the user can set one or more shooting parameters.
[0143] In an embodiment of the present application, in response to the first operation, after triggering the shooting parameter setting sub-process, the user can adaptively set and adjust the specific shooting parameters in advance based on his or her own needs, so that he or she can subsequently shoot time-lapse videos with different effects according to his or her own needs.
[0144] For example, Figures 9 to 11 That is, the user display interface involved in the shooting parameter setting sub-process. Fig. 9 A parameter setting interface for adjusting recording duration and zoom ratio; Fig.10 A parameter setting interface for adjusting the capture rate in video recording; Fig.11 A parameter setting interface for adjusting the duration of a film; Fig.12 This is a parameter setting interface for adjusting the metering mode M, ISO sensitivity, shutter speed S, automatic exposure shooting parameters EV, auto focus shooting parameters AF, white balance WB, etc. Figures 9 to 11 The sub-process for setting the shooting parameters is completed.
[0145] S240: Detect a second operation on the shooting control.
[0146] The second operation is used to instruct to start shooting, and the shooting includes video recording and snapshot in video recording.
[0147] It should be understood that the second operation includes a video recording operation and a snapshot operation during video recording.
[0148] For example, Figure 3 As shown in (d), the shooting control is control X3, and the second operation is a click operation on control X3.
[0149] Optionally, in an embodiment of the present application, the above description is given by taking the second operation as a click operation as an example; in an embodiment of the present application, the second operation may also be an operation of starting shooting through voice instructions; or, an operation of starting shooting through other instructions; the present application does not impose any limitation on this.
[0150] S250: In response to the second operation, perform shooting based on the shooting parameters, and generate and store a target video stream.
[0151] The shooting parameters are the shooting parameters set in S230.
[0152] In an embodiment of the present application, after the electronic device detects a click operation on the shooting control, it can trigger the camera application to send a video recording request and a snapshot request in the video recording together, and the snapshot request in the video recording carries the set shooting parameters; in response to the video recording request and the snapshot request in the video recording, the present application can obtain the initial video stream and the initial snapshot stream, and then discard the initial video stream, and obtain the target video stream after processing the initial snapshot stream.
[0153] Since the capture rate in the video is set first in the embodiment of the present application, the electronic device can obtain the corresponding time-lapse video based on the capture rate in the video set by the user; in this process, only the captured images corresponding to the rate need to be processed; compared with the prior art method of first obtaining a large number of preview images and then extracting frames to generate a time-lapse video after processing, the method provided by the present application can reduce a lot of power consumption.
[0154] In addition, since the target video stream is obtained based on captured image processing, the image quality is higher than that of the video stream obtained by the preview image.
[0155] In a possible implementation, the image quality may include image detail information, image texture information, image brightness, or an image quality assessment result obtained by any image quality assessment algorithm; the present application does not impose any limitation on this.
[0156] Combine the following Figures 7 to 13 The implementation method of the embodiment of the present application is described in detail.
[0157] Exemplarily, when the electronic device detects a shooting parameter adjustment operation and a shooting operation, the electronic device generates a target video stream. The shooting parameter adjustment operation may be, for example, an operation of clicking a shooting parameter setting control and further operations performed on an auxiliary control; the shooting operation may be, for example, an operation of clicking a shooting control.
[0158] Figure 7 is a schematic flow chart of another time-lapse photography method provided in an embodiment of the present application. The method 300 may be Figure 1 The electronic device shown is executed; the method includes S310 to S360, and S310 to S360 are described in detail below.
[0159] S310, running the camera application.
[0160] Exemplarily, a user can instruct an electronic device to run a camera application by clicking on the icon of the "Camera" application. Alternatively, when the electronic device is in a lock screen state, the user can instruct the electronic device to run a camera application by sliding to the right on the display screen of the electronic device. Alternatively, the electronic device is in a lock screen state, and the lock screen interface includes an icon of a camera application, and the user instructs the electronic device to run the camera application by clicking on the icon of the camera application. Alternatively, when the electronic device is running other applications, the application has the permission to call the camera application; the user can instruct the electronic device to run the camera application by clicking on the corresponding control. For example, when the electronic device is running an instant messaging application, the user can instruct the electronic device to turn on the camera application by selecting the control of the camera function.
[0161] It should be understood that the above description is an example of the operation of running a camera application; the electronic device may also run a camera application through voice instructions or other operations; this application does not impose any limitation on this.
[0162] It should also be understood that running the camera application may refer to launching the camera application.
[0163] S320, entering the time-lapse photography mode and displaying a preview interface.
[0164] Optionally, S320 is described by automatically entering the time-lapse photography mode when the camera application is turned on; S320 may also include: after the camera application is turned on, an operation indicating entering the time-lapse photography mode is detected; in response to the operation, entering the time-lapse photography mode; or, after the camera application is turned on, when it is detected that the scene to be photographed includes a preset photographing object or a preset photographing gesture, entering the time-lapse photography mode. Entering the time-lapse photography mode may also be referred to as starting the time-lapse photography mode.
[0165] Among them, the preset shooting objects may include streets, flowing water, forests, buildings (such as high-rise buildings, overpasses, etc.) and the starry sky, and the preset shooting gestures may include sliding the index finger down, clenching a fist, etc. The preset shooting objects and preset shooting gestures can be preset as needed, and this application does not impose any restrictions on this.
[0166] Optionally, the preview interface may include a shooting parameter setting control, a filter control, a shooting control and a preview window; wherein the shooting parameter setting control is a control for indicating shooting parameter adjustment, the filter control is a control for indicating adjustment of filter effects (also referred to as image modes), and the shooting control is a control for indicating shooting; the preview window is used to display a preview image, which may include a first preview image, which is an image generated after processing an initial preview image captured by the electronic device, and the initial preview image is an image captured in real time by the electronic device.
[0167] It should be understood that when the electronic device captures the initial preview image, it can use the recognition method provided by the relevant technology to identify the content in the initial preview image. When the preset shooting object or the preset shooting gesture is recognized, the current shooting mode is switched to the time-lapse photography mode, and a preview interface including the first preview image is displayed.
[0168] For example, Figure 3 As shown in (c) and Figure 4 As shown in (c) of FIG. 1 , the electronic device can detect the user's operation on the control Y1 corresponding to the time-lapse photography mode, such as a click operation; in response to the operation, the time-lapse photography mode is entered, and the display is as follows Figure 3 The preview interface 13 of (d) or Figure 4 The preview interface 23 shown in (d) in FIG.
[0169] The preview interface 13 and the preview interface 23 are both preview interfaces; the shooting parameter setting control may refer to the control Y3 in the preview interface 13 and the preview interface 23; the filter control may refer to the control Y4 in the preview interface 13 and the preview interface 23; the shooting control may refer to the control X3 in the preview interface 13 and the preview interface 23; the preview image may refer to the image displayed in the preview interface 13 or the preview interface 23. The local display area in the preview interface 13 and the preview interface 23 for displaying the preview image is the preview window.
[0170] For example, Figure 5 As shown in (b) of FIG. 1 , the electronic device can detect the user's operation on the preview interface 11, such as a sliding operation; in response to the operation, when the time-lapse photography mode is the currently selected mode, the time-lapse photography mode is entered, and the display is as follows Figure 5 The preview interface 31 shown in (c) in FIG.
[0171] The preview interface 31 is a preview interface; the shooting parameter setting control may refer to the control Y3 in the preview interface 31; the filter control may refer to the control Y4 in the preview interface 31; the shooting control may refer to the control X3 in the preview interface 31; and the first preview image may refer to the image displayed in the preview interface 31. It is understandable that a local area in the preview interface 31 may be used to display the first preview image, and this application does not limit this.
[0172] It should be understood that the above description uses the example that the preview interface includes shooting parameter setting controls, filter controls, shooting controls and the first preview image. The preview interface may also include shooting parameter setting controls, shooting controls and the first preview image; or, the preview interface may also include filter controls, shooting controls and the first preview image.
[0173] In an embodiment of the present application, when the electronic device displays a preview interface, the user can trigger the first process S330 or the second process S340. The first process S330 is a process for the electronic device to set shooting parameters in the time-lapse photography mode, and the second process S340 is a process for the electronic device to set filters in the time-lapse photography mode.
[0174] Optionally, the first process S330 may be triggered first and then the second process S340, that is, shooting parameters are set first and then filters are set; or, the second process S340 may be triggered first and then the first process S330, that is, filters are set first and then shooting parameters are set.
[0175] Exemplarily, the first process S330 includes S331 and S332; S331 and S332 are described in detail below.
[0176] S331: Detect a click operation on a shooting parameter setting control.
[0177] Optionally, S331 is illustrated by the operation of clicking on a shooting parameter setting control; S331 may also be an operation of detecting an instruction to start shooting parameter setting; for example, instructing the electronic device to set shooting parameters through voice or other instruction information.
[0178] S332. In response to a click operation on a shooting parameter setting control, trigger a shooting parameter setting sub-process (S3321 to S3323).
[0179] The shooting parameter setting sub-process indicates a process in which the electronic device adjusts one or more shooting parameters based on the user's operation on the sub-shooting parameter control in the time-lapse photography mode.
[0180] In the embodiment of the present application, the shooting parameter setting sub-process may include: a click operation on any sub-shooting parameter control and a sliding operation, a click operation, and an input operation on a subsidiary control corresponding to the sub-shooting parameter control.
[0181] Exemplarily, the shooting parameter setting sub-process may include S3321 to S3323; Figure 8 As shown, S3321 to S3323 are described in detail below.
[0182] S3321. In response to a click operation on a shooting parameter setting control in the preview interface, display a first shooting parameter setting interface.
[0183] The first shooting parameter setting interface may be referred to as a first-level interface in the shooting parameter setting sub-process.
[0184] Optionally, the first shooting parameter setting interface includes four sub-shooting parameter controls, which can be respectively referred to as a first sub-shooting parameter control, a second sub-shooting parameter control, a third sub-shooting parameter control, and a fourth sub-shooting parameter control. Of course, the first shooting parameter setting interface can also include other sub-shooting parameter controls, which is not limited in the present embodiment of the application.
[0185] It should be noted that, when a sub-shooting parameter control is in a selected state, the subsidiary control corresponding to the sub-shooting parameter control in the selected state may be displayed in the first shooting parameter setting interface; when a sub-shooting parameter control is in an unselected state, the first shooting parameter setting interface may not display any subsidiary control corresponding to the sub-shooting parameter control. For example, when the icon corresponding to the sub-shooting parameter control is white, it indicates that it is in a selected state, and when the icon is gray, it indicates that it is in an unselected state.
[0186] Among them, the first sub-shooting parameter control may refer to a control for entering a secondary interface corresponding to setting the recording duration and magnification, the second sub-shooting parameter control may refer to a control for entering an interface corresponding to setting the rate (or called the capture rate), the third sub-shooting parameter control may refer to a control for entering an interface corresponding to setting the film duration, and the fourth sub-shooting parameter control may refer to a control for entering an interface corresponding to setting shooting parameters such as the metering mode M, sensitivity ISO, shutter speed S, automatic exposure shooting parameter EV, automatic focus shooting parameter AF, white balance WB, etc.
[0187] Among them, the metering mode M can include three types, such as the first one is matrix metering, which is suitable for wide landscape photos; the second one is central metering, which is suitable for scenes with a main body in the middle; the third one is spot metering, which is suitable for stage photography.
[0188] For example, Figure 5In the preview interface shown in (c) of FIG. 1 , in response to a click operation on the shooting parameter setting control Y3, the electronic device may display a shooting parameter setting interface 901, such as Fig. 9 As shown in (a) of FIG. 1 , the shooting parameter setting interface 901 is the first shooting parameter setting interface; wherein the first sub-shooting parameter control Y51 is in a selected state; when the first sub-shooting parameter control Y51 is in a selected state, the shooting parameter setting interface 901 may include subsidiary controls corresponding to the first sub-shooting parameter control Y51, such as Fig. 9 The control Y52 shown in (a) may indicate a sliding axis corresponding to the recording duration, and the sliding axis is used to provide the user with a means to adjust the recording duration in the time-lapse photography mode.
[0189] In addition, optionally, when the first sub-shooting parameter control is in a selected state, the shooting parameter setting interface 901 may further include another subsidiary control corresponding to the first sub-shooting parameter control, such as Fig. 9 The control Y53 shown in (a) in FIG. 1 may indicate multiple zoom ratio options, which are used to provide users with the zoom ratio in the time-lapse photography mode. The multiple zoom ratios may also be displayed in the form of a sliding axis.
[0190] For example, Figure 5 In the preview interface shown in (c) of FIG. 1 , in response to a click operation on the shooting parameter setting control Y3, the electronic device may display a shooting parameter setting interface 1001, such as Fig.10 As shown in (a) of FIG. 1 , the shooting parameter setting interface 1001 is the first shooting parameter setting interface; wherein the second sub-shooting parameter control Y61 is in a selected state; when the second sub-shooting parameter control Y61 is in a selected state, the shooting parameter setting interface 1001 also includes an auxiliary control corresponding to the second sub-shooting parameter control Y61, such as Fig.10 As shown in (a) in the figure, the control Y62 can indicate a sliding axis corresponding to the rate, and the sliding axis is used to provide the user with the ability to adjust the capture rate in the video recording under the time-lapse photography mode.
[0191] For example, Figure 5 In the preview interface shown in (c) of FIG. 1 , in response to a click operation on the shooting parameter setting control Y3, the electronic device may display a shooting parameter setting interface 1101, such as Fig.11 As shown in (a) of FIG. 1 , the shooting parameter setting interface 1101 is the first shooting parameter setting interface; wherein the third sub-shooting parameter control Y71 is in a selected state. When the third sub-shooting parameter control Y71 is in a selected state, the shooting parameter setting interface 1101 further includes an auxiliary control corresponding to the third sub-shooting parameter control Y71, such as Fig.11As shown in (a) in the figure, control Y72 can indicate a sliding axis corresponding to the filming time, and the sliding axis is used to provide the user with the ability to adjust the filming time in the time-lapse photography mode.
[0192] For example, Figure 5 In the preview interface shown in (c) of FIG. 1 , in response to a click operation on the shooting parameter setting control Y3, the electronic device may display a shooting parameter setting interface 1201, such as Fig.12 As shown in (a) of FIG. 1 , the shooting parameter setting interface 1201 is the first shooting parameter setting interface; wherein the fourth sub-shooting parameter control Y81 is in a selected state. When the fourth sub-shooting parameter control Y81 is in a selected state, the shooting parameter setting interface 1201 further includes an auxiliary control corresponding to the fourth sub-shooting parameter control, such as Fig.12 The control Y82 shown in (a) may indicate multiple professional shooting parameter names and corresponding default methods or default values, and is used to provide users with methods or values corresponding to the professional shooting parameters in the time-lapse photography mode.
[0193] The first shooting parameter setting interface may further include shooting controls, a preview window, and a preview image displayed in the preview window; for the introduction of the shooting controls, the preview window, and the preview image, reference may be made to the description in S320 above, which will not be repeated here.
[0194] Optionally, in S3321, by clicking on the shooting parameter setting control, the shooting parameter setting interface 901 when the first sub-shooting parameter control is in a selected state is directly displayed, or the shooting parameter setting interface 1001 when the second sub-shooting parameter control is in a selected state is directly displayed, or the shooting parameter setting interface 1101 when the third sub-shooting parameter control is in a selected state is directly displayed, or the shooting parameter setting interface 1201 when the third sub-shooting parameter control is in a selected state is directly displayed. S3321 may also display an interface including four sub-shooting parameter controls in a non-selected state (for example, the icons corresponding to the four controls are all gray), based on which, in response to the user's click operation on any sub-shooting parameter control, the shooting parameter setting interface corresponding to the sub-shooting parameter control in a selected state may be displayed.
[0195] It should be understood that when displaying Fig. 9 As shown in (a) Fig.10 As shown in (a) Fig.11 As shown in (a) and Fig.12 In the case of the shooting parameter setting interface shown in (a), in response to a user clicking operation on any other non-selected control, the subsidiary controls displayed in the shooting parameter setting interface can be switched.
[0196] S3322. In response to a user operation on an auxiliary control in the first shooting parameter setting interface, display a second shooting parameter setting interface and change corresponding shooting parameters.
[0197] It should be understood that the electronic device can display different second shooting parameter setting interfaces for operating the subsidiary controls in different first shooting parameter setting interfaces. The second shooting parameter setting interface includes the same subsidiary controls as the corresponding first shooting parameter setting interface, and the second shooting parameter setting interface also includes a preview image.
[0198] It should be understood that user operations include sliding operations, input operations, etc., and this application does not impose any limitations on this.
[0199] For example, Fig. 9 As shown in (a) of FIG. 9 , for the subsidiary control (control Y52) corresponding to the first sub-shooting parameter control in the shooting parameter setting interface 901, when a sliding operation on the control Y52 is detected, the electronic device may display the following Fig. 9 In the shooting parameter setting interface 902 shown in (b), the sliding operation is a user operation on the subsidiary control, and the shooting parameter setting interface 902 is the second shooting parameter setting interface.
[0200] Among them, the shooting parameter setting interface 902 includes a control Y52, and the top status bar of the shooting parameter setting interface 902 can also display the adjusted recording time and other shooting parameters, such as the default capture rate in the video is 15x, the film length is unlimited, and in response to the sliding operation on the control Y52, the adjusted recording time is 30min. Subsequently, when the sliding operation on the control Y52 continues to be detected, the value corresponding to the recording time in the top status bar also changes accordingly. The shooting parameter setting interface 902 also includes a control Y53. When the control Y53 changes in response to another sliding operation of the user, the zoom factor also changes accordingly.
[0201] For example, Fig.10 As shown in (a) of FIG. 1 , for the subsidiary control (control Y62) corresponding to the second sub-shooting parameter control in the shooting parameter setting interface 1001, when a sliding operation of the user on the control Y62 is detected, the electronic device may display the following Fig.10 In the shooting parameter setting interface 1002 shown in (b), the sliding operation is a user operation on the subsidiary control, and the shooting parameter setting interface 1002 is the second shooting parameter setting interface.
[0202] Among them, the shooting parameter setting interface 1002 includes a control Y62, and the top status bar of the shooting parameter setting interface 1002 can also display the adjusted rate and other shooting parameters. For example, in combination with the above example, the recording time has been adjusted to 30 minutes (min), the filming time is unlimited, and in response to the sliding operation on the control Y62, the adjusted rate is 90x. Subsequently, when the sliding operation on the control Y62 continues to be detected, the value corresponding to the rate in the top status bar also changes accordingly.
[0203] For example, Fig.11 As shown in (a) of FIG. 1 , for the subsidiary control (control Y72) corresponding to the third sub-shooting parameter control in the shooting parameter setting interface 1101, when a sliding operation of the user on the control Y72 is detected, the electronic device may display the following Fig.11 In the shooting parameter setting interface 1102 shown in (b), the sliding operation is a user operation on the subsidiary control, and the shooting parameter setting interface 1102 is the second shooting parameter setting interface.
[0204] Among them, the shooting parameter setting interface 1102 includes a control Y72, and the top status bar of the shooting parameter setting interface 1102 can also display the adjusted film duration and other shooting parameters. For example, in combination with the above two examples, the rate has been adjusted to 90x, the recording duration has been adjusted to 30min, and in response to the sliding operation on the control Y72, the adjusted film duration is 3min. Subsequently, when the sliding operation on the control Y72 continues to be detected, the value corresponding to the film duration in the top status bar also changes accordingly.
[0205] It should be explained that the recording duration indicates the duration of the video recorded by the electronic device, and the film duration indicates the duration of the generated target video stream. In the time-lapse photography mode provided in the embodiment of the present application, the film duration is shorter than the recording duration.
[0206] For example, Fig.12 As shown in (a) of FIG. 1 , for the subsidiary control (control Y82) corresponding to the fourth sub-shooting parameter control in the shooting parameter setting interface 1201, when detecting a user clicking operation on a specific shooting parameter name or value in the control Y82, the electronic device may display the following Fig.12 Based on the shooting parameter setting interface 1202, the user can change the value corresponding to any shooting parameter in the control Y82. The click operation and input operation are user operations on the auxiliary control, and the shooting parameter setting interface 1202 is the second shooting parameter setting interface.
[0207] The shooting parameter setting interface 1202 includes a control Y82, and the value corresponding to each shooting parameter included in the control Y82 can be changed based on the input operation. The top status bar of the shooting parameter setting interface 1202 can also display other shooting parameters. In combination with the above three examples, the rate has been adjusted to 90x, the recording time has been adjusted to 30 minutes, and the filming time has been adjusted to 3 minutes.
[0208] S3323: Switch to the preview interface. When an adjustment operation on the shooting parameters is detected, the shooting parameters corresponding to the preview interface returned are the adjusted shooting parameters.
[0209] It should be understood that when the user triggers the shooting parameter setting sub-process but does not actually adjust the shooting parameters, the returned preview interface has the same shooting parameters as the preview interface displayed previously.
[0210] For example, Fig. 9 As shown in (b) of FIG. 1 , when the electronic device detects that the sliding operation stops or stops for a preset time, it automatically switches to the following Figure 5 In the preview interface shown in (c), at this time, the shooting parameters corresponding to the preview interface 31 after switching are different from the shooting parameters corresponding to the preview interface 31 before adjustment.
[0211] For example, Fig. 9 As shown in (b), when the electronic device detects that the sliding operation stops, it returns to the shooting parameter setting interface where all four sub-shooting parameter controls are unselected. At this time, the shooting parameter setting interface 901 may also include a return control, such as a cross next to the time-lapse photography, which is used to indicate a return to the previous level associated interface. Thus, when a click operation on the return control is detected, the shooting parameter setting interface where all four sub-shooting parameter controls are unselected can be returned to the preview interface, such as preview interface 31; or, when a click operation on control X3 in the shooting parameter setting interface where all four sub-shooting parameter controls are unselected is detected, the shooting parameter setting interface can be returned to the preview interface.
[0212] The above Fig. 9 Take the example of returning to the first shooting parameter setting interface after adjusting the shooting parameters. Fig.10 , Fig.11 The process of returning to the first shooting parameter setting interface after the corresponding shooting parameters are adjusted can be referred to the above description, which will not be repeated here.
[0213] It should be understood that through the shooting parameter setting sub-process introduced in S3321 to S3323 above, multiple shooting-related shooting parameters involved in the time-lapse photography scene can be manually adjusted and set, thereby subsequently performing time-lapse photography based on user needs to improve user experience.
[0214] Exemplarily, the second process S340 includes S341 and S342; S341 and S342 are described in detail below.
[0215] S341. A click operation on the filter control is detected.
[0216] Optionally, S341 is illustrated by the operation of clicking a filter control; S341 may also be an operation of detecting an instruction to start filter setting; for example, instructing the electronic device to start filter setting through voice or other instruction information.
[0217] S342. In response to a click operation on the filter control, trigger the filter setting sub-process (S3421 to S3423).
[0218] The filter setting sub-process indicates the process of the electronic device calling a certain filter effect based on the user's operation on the filter control in the time-lapse photography mode.
[0219] In an embodiment of the present application, the filter setting sub-process may include: a click operation on any icon indicating a filter effect and a sliding operation on multiple icons indicating different filter effects, etc.
[0220] Exemplarily, the filter setting sub-process may include S3421 and S3423; Fig.13 As shown, S3421 to S3423 are described in detail below.
[0221] S3421. In response to a click operation on a filter control in the preview interface, display a first filter setting interface.
[0222] Optionally, the first filter setting interface includes auxiliary controls of the filter control, such as: multiple filter effect options and an option of not adding filter effects, which may also be referred to as an original image option. The multiple filter effects may include vivid, blue, medium gray, etc.
[0223] For example, Fig.14 As shown in (a) in FIG. 1 , in response to a click operation on the filter control, the electronic device may display a filter setting interface 24; Fig.14 As shown in (b) in FIG. 2 , the filter setting interface 24 is the first filter setting interface. In response to the click operation, the filter control Y4 is turned on. At the same time, the filter setting interface 24 also displays the subsidiary control (control Y9) corresponding to the filter control, such as multiple icons indicating different filter effects and icons corresponding to the original image options. When the filter effect is turned on, the default effect is the original image.
[0224] S3422: In response to a user operation on an auxiliary control in the first filter setting interface, determine a target filter effect, and display a second filter setting interface in combination with the target filter effect.
[0225] It should be understood that by operating the auxiliary controls in the first filter setting interface, the electronic device can display the second filter setting interface, and the preview image in the second filter setting interface can correspond to different filter effects.
[0226] The second filter setting interface includes the same subsidiary controls as the first filter setting interface, but since the target filter effect is set, the preview image included in the second filter setting interface has a different filter effect from the original preview image, but the image content is the same.
[0227] It should be understood that user operations include sliding operations or clicking operations, etc., and this application does not impose any limitations on this.
[0228] For example, Fig.14 As shown in (b) of FIG. 2 , for the filter setting interface 24, the electronic device can detect the user's sliding operation on the auxiliary control (control Y9); when the user's sliding operation on the control Y9 is detected and it is determined that the user selects "Effect 1" as the target filter effect, the electronic device displays the following Fig.14 The filter setting interface 25 shown in (c) in FIG. 1 is a filter setting interface 25. The sliding operation is a user operation on the subsidiary control, and the filter setting interface 25 is a second filter setting interface. The preview image displayed in the filter setting interface 25 is combined with the target filter effect corresponding to "Effect 1", which is equivalent to the preview image displayed in the filter setting interface 24, and the display effect is different. Here, "Effect 1" can be used to indicate "bright", "Effect 2" is used to indicate "blue", and "Effect 3" is used to indicate "medium gray".
[0229] S3423, switching to the preview interface. When the adjustment operation on the filter is detected, the filter effect corresponding to the preview image in the returned preview interface is the target filter effect.
[0230] It should be understood that when the user triggers the filter setting sub-process but does not actually adjust the filter, the returned preview interface has the same effect as the preview interface previously displayed, both of which are the original image effect or the same filter effect.
[0231] For example, Fig.14 As shown in (c) in FIG. 1 , when the electronic device detects that the sliding operation stops or stops for a preset time, it automatically switches to the following Fig.14 The interface 26 shown in (d) is a preview interface; or Fig.14As shown in (c) in FIG. 1 , in response to a click operation on the filter control Y4, the filter setting interface 25 can be switched to the interface 26; or, in response to a click operation on an area other than the control Y9 in the filter setting interface 25, the filter setting interface 25 can be switched to the interface 26. At this time, the filter effect corresponding to the interface 26 is different from the filter effect corresponding to the preview interface before adjustment.
[0232] For example, Fig.14 In the filter setting interface 25 shown in (c), a return control can also be set to indicate the return to the previous level associated interface; thus, after adjusting the filter effect, the user can also return to the preview interface from the filter setting interface 25 by clicking the return control, but the filter effect corresponding to the preview image in the preview interface after returning is the target filter effect.
[0233] It should be understood that through the filter setting sub-process introduced in the above S3421 to S3423, the filter effects involved in the time-lapse photography scene can be manually adjusted, thereby subsequently performing time-lapse photography based on user needs to improve the user experience.
[0234] S350: Detect a click operation on a shooting control.
[0235] Optionally, S350 is illustrated by the operation of clicking a shooting control; S350 may also be an operation of detecting an instruction to start shooting; for example, instructing the electronic device to start shooting through voice or other instruction information.
[0236] S360: In response to the click operation, shoot based on the set shooting parameters and / or filters, and generate and store a target video stream.
[0237] Optionally, the first process and the second process can also be performed after S350, that is, after starting to shoot, the shooting parameters and / or filter settings are performed. It should be understood that in this way, the shooting parameters and filter effects will only be combined and reflected in the part of the video stream obtained after the settings are completed.
[0238] It should be noted that S310 to S360 are exemplified by the process in which the electronic device detects the user's adjustment of shooting parameters and filter adjustment. Optionally, as an implementation, the electronic device may only perform S310 to S330, S350 and S360, that is, the electronic device may only detect the process in which the user adjusts the shooting parameters and shoots. As another implementation, the electronic device may only perform S310, S320, S340, S350 and S360, that is, the electronic device may only detect the process in which the user adjusts the filter and shoots.
[0239] In an embodiment of the present application, after entering the time-lapse photography mode, the user can set shooting parameters and / or filters by operating the relevant controls on the display interface; in this way, before shooting, the user can manually adjust the specific shooting parameters and filters involved in the time-lapse photography in advance based on his or her own needs, and then, when shooting, the electronic device shoots based on the adjusted shooting parameters and / or target filter effects, so that time-lapse videos with different effects can be adaptively shot according to different needs, thereby meeting the diverse needs of users and improving the user experience.
[0240] Since the shooting parameters and filters are variable and the setting method is simple, for example, the capture rate in the video can be set in advance, then, in the time-lapse photography mode, the electronic device can obtain the corresponding time-lapse video based on the rate set by the user; in this process, only the images corresponding to the rate need to be processed; compared with the prior art method of first acquiring a large number of images and then extracting frames after image processing to generate a time-lapse video, the method provided in the present application can reduce a lot of power consumption. In addition, since the target video stream is obtained based on the captured image processing, the image quality is higher than that of the prior art.
[0241] Combine the following Fig.15 The implementation process involved in the above step S360 is described in detail.
[0242] Fig.15 This is a software architecture diagram provided by the embodiment of the present application. Fig.15 As shown, the software architecture provided by the embodiment of the present application may include an application layer, an application framework layer, a hardware abstraction layer and a hardware layer.
[0243] Exemplarily, the application layer may include a series of application packages. Fig.15 As shown, the application package may include a camera application and a gallery application.
[0244] The application layer is at the top of the entire framework and is responsible for interacting directly with the user. Once it receives a user's shooting or recording request, it will send the request to the application framework layer through the interface and wait for the application framework layer to return the processing result. Fig.15 As shown, in the embodiment of the present application, the result includes a preview stream and a target video stream, and then the application layer feeds back the result to the user.
[0245] The application framework layer is located between the application layer and the hardware abstraction layer. The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0246] The application framework layer is the framework of the application, and developers can develop some applications based on the application framework layer in accordance with the development principles of the application framework. In the embodiment of the present application, the application framework layer includes an access interface corresponding to the camera application, etc.
[0247] The hardware abstraction layer is used to abstract the hardware and provide a virtual hardware usage platform for the operating system.
[0248] For example, Fig.15 As shown, the hardware abstraction layer may include a camera hardware abstraction layer and an image processing module. The functions of each module will be described in detail in subsequent embodiments and will not be repeated here.
[0249] For example, Fig.15 As shown, the hardware layer mainly includes a display screen and a camera module (such as camera 193), etc.
[0250] Next, to detect that the user follows Figure 7 After setting the shooting parameters according to the first process shown in the figure and setting the filters according to the second process, take the shooting control as an example and click it. Fig.15 The software architecture diagram shown describes in detail the interaction process between various modules in the electronic device.
[0251] S411: After detecting the set shooting parameters and the set filters, the camera application receives a click operation of the user on the shooting control.
[0252] For example, Fig.14 As shown in (d) in the figure, the user has manually set the shooting parameters and filters in the time-lapse photography mode, such as setting the rate to 90x, the recording time to 30 minutes, and the filter to the vivid filter indicated by "Effect 1"; after setting, the user clicks on the control X3 to instruct the electronic device to shoot according to the shooting parameters and target filter effects just set.
[0253] S412: In response to the click operation, the camera application generates and sends a video recording request to the hardware abstraction layer.
[0254] The above S412 may specifically include: in response to the click operation, the camera application generates and sends a video recording request to the application framework layer, and after receiving the video recording request, the application framework layer sends the video recording request to the hardware abstraction layer.
[0255] It should be noted that the shooting parameters involved in the video recording request are based on the original settings of the camera, and this application does not make any changes to this. For example, the default recording rate in the time-lapse photography mode is 240x, so the shooting parameter carried by the video recording request sent is 240x.
[0256] S413: In response to the click operation, the camera application generates and sends a capture request in the video to the hardware abstraction layer.
[0257] It should be understood that the photo request sent by the camera application includes the set shooting parameters and the set filters.
[0258] It should also be understood that the time-lapse photography mode is equivalent to a special case of the recording mode. Therefore, the prior art usually responds to the user's operation on the shooting control and sends a recording request, which corresponds to the acquisition and processing of the video stream as a time-lapse video; but in this application, compared with the prior art, while sending the recording request, a capture request in the recording is also sent, which is used to indicate that while acquiring the video stream, the capture and processing are combined with the set shooting parameters, set filters and other information. For example, assuming that the rate set by the user is 90x, the capture rate value in the recording included in the capture request in the recording is 90x.
[0259] The video recording request and the snapshot request in the video recording can be collectively referred to as the capture request.
[0260] S414: The hardware abstraction layer sends the video recording request and the snapshot request in the video recording to the hardware layer, and receives two data streams (such as the first data stream and the second data stream) returned by the hardware layer.
[0261] The above S414 may specifically include: the hardware abstraction layer sends the video recording request and the snapshot request in the video recording to the camera module in the hardware layer through the included camera hardware abstraction layer, and after the camera module collects the image data, it returns the result to the camera hardware abstraction layer.
[0262] It should be understood that the two data streams correspond to video recording and photo taking respectively; the camera module is equivalent to obtaining image data related to video recording requests while obtaining image data related to photo taking requests; in other words, the camera module is equivalent to using the video recording channel to transmit the data stream corresponding to the video recording and the data stream corresponding to the photo taking.
[0263] Exemplarily, the first data stream sent by the camera module to the camera hardware abstraction layer can be used to generate a video stream, which is a video obtained by shooting using default shooting parameters corresponding to the electronic device in the time-lapse photography mode.
[0264] Exemplarily, the second data stream sent by the camera module to the camera hardware abstraction layer can be used to generate a photo stream, which is a multi-frame image or photo stream obtained by shooting using the shooting parameters set by the user in the time-lapse photography mode.
[0265] S415: After the hardware abstraction layer generates an initial video stream based on the first data stream, the initial video stream is discarded.
[0266] Specifically, the camera hardware abstraction layer in the hardware abstraction layer generates an initial video stream based on the first data stream, and discards the initial video stream but does not delete it; or, it may also be deleted.
[0267] Exemplarily, the initial video stream may include multiple frames of initial video images in the RAW domain.
[0268] It should be understood that since this application is equivalent to just using the video recording channel to take pictures, the initial video stream obtained based on the video recording request is not the data of the final video obtained, and there is no need to process it. Therefore, after the initial video stream is generated, it can be discarded.
[0269] S416: After the hardware abstraction layer generates an initial snapshot stream based on the second data stream, it processes the initial snapshot stream.
[0270] Optionally, the hardware abstraction layer includes an image processing module in addition to the camera hardware abstraction layer.
[0271] Specifically, the camera hardware abstraction layer in the hardware abstraction layer generates an initial snapshot stream based on the second data stream, and transmits the initial snapshot stream to the image processing module for processing.
[0272] Exemplarily, the initial captured stream may include multiple frames of initial captured images in the RAW domain.
[0273] It should be understood that the present application is equivalent to taking pictures using a video recording channel, and the corresponding shooting parameters are collected based on the shooting parameters set by the user. Therefore, the corresponding photo stream will be collected according to the user's needs based on the shooting parameters set by the user, without causing any waste of resources.
[0274] Moreover, this method of taking photos using the video recording channel does not affect the original functions of the relevant chips involved in the electronic device. The function of taking snapshots during video recording is bound to the video recording function. This application does not require chip modification. Only the chip needs to be applied to the scenario of this application to implement this solution, which has a lower implementation cost.
[0275] For example, Fig.16 A schematic diagram of the structure of each module in the hardware abstraction layer provided in the embodiment of the present application, such as Fig.16As shown in (a), the chip involved in this application may be a Qualcomm chip of the CamX-CHI architecture, which includes a case (Usecase) corresponding to the time-lapse photography mode in the camera application; Usecase includes Feature 2, and Feature2 includes a corresponding pipeline (Pipeline). When the camera hardware abstraction layer receives a shooting request, Feature2 can be used to send the result returned by the hardware layer to the Pipeline for processing to obtain the video stream and the photo stream, and realize the functions of recording and taking photos during recording.
[0276] Optionally, S415 and S416 may be executed simultaneously. For example, when the shooting control is clicked, in response to the issued recording request and the snapshot request in the recording, the initial video stream and the initial snapshot stream are acquired, and the initial video stream is discarded and the initial snapshot is processed.
[0277] Optionally, the image processing module includes a captured image processing module.
[0278] Specifically, after receiving the initial captured stream, the captured image processing module in the image processing module processes the initial captured stream to improve the image quality.
[0279] Optionally, the captured image processing module may include a first filter submodule, and at least one of an anti-shake processing submodule and a first format conversion submodule.
[0280] For example, Fig.16 As shown in (b) in the figure, when setting the filter, if the target filter effect is set to "bright", in the processing of the present application, the first filter submodule can be processed in combination with the set filter effect, so that the image included in the processed initial snapshot stream carries the "bright" filter effect. In other words, the first filter submodule is used to process the input image in combination with the filter effect set by the user to generate an image with the filter effect.
[0281] It should be noted that if the user does not set a filter effect, the first filter submodule does not need to process the input image and this step can be skipped.
[0282] For example, Fig.16 As shown in (b), the initial snapshot stream includes not only the initial snapshot image, but also other data such as gyro sensor (gyro) data and image feature points. Based on this, the anti-shake processing submodule can combine these data to perform anti-shake processing on the initial snapshot image in the initial snapshot stream or the image processed by the first filter submodule, so as to eliminate the impact of the shaking on the image during the camera module acquisition process and improve the image clarity.
[0283] Gyroscope sensor data can be acquired based on the gyroscope sensor; image feature points can be extracted using a network model provided by related technologies; and the anti-shake algorithm can use an intra-frame anti-shake algorithm provided by related technologies, which is not limited in this application.
[0284] For example, Fig.16 As shown in (b), the first format conversion submodule is used to perform format conversion on the initial snapshot stream, the image output by the first filter submodule, or the image output by the anti-shake processing submodule, and convert the image in the RAW domain into an image in the YUV domain. In this way, the processed initial snapshot stream can include multiple frames of images in the YUV domain.
[0285] The amount of image data in the YUV domain is less than that in the RAW domain, thereby increasing the speed of subsequent transmission. Of course, the first format conversion submodule can also perform other format conversions, which are not limited in this application.
[0286] Exemplarily, the captured image processing module may further include a buffer submodule, which is used to temporarily store data in the processing process, such as all or part of the images in the processed initial captured stream.
[0287] It should be understood that if the rate is set when setting the shooting parameters, the number of image frames included in the processed initial snapshot stream is the same as the number of image frames included in the initial snapshot stream, that is, it corresponds to the rate in the shooting parameters set by the user. In this way, in the processing process of this application, the snapshot image processing module does not need to perform frame extraction processing.
[0288] It should be understood that Fig.16 This is only an example of the captured image processing module. The captured image processing module may also include other functional sub-modules, and this application does not impose any limitation on this.
[0289] S417: The hardware abstraction layer returns the processed initial snapshot stream to the gallery application.
[0290] S418. The gallery application encodes the processed initial captured stream to generate a target video stream for storage.
[0291] The target video stream may also be referred to as a time-lapse video, which is a resultant video obtained in response to a user's click operation on a shooting control in a time-lapse photography mode.
[0292] In S411, after the user clicks the shooting control, the shooting control in the display interface can be switched to an end control; before S417, the user can click the end control to end shooting; as a method, in response to the click operation on the end control, the camera module stops acquiring data related to the initial video stream and the initial snapshot stream, and the hardware abstraction layer returns the processed initial snapshot stream generated between clicking the shooting control and clicking the end control to the gallery application; the gallery application can use the first encoding module to encode the processed initial snapshot stream to generate a target video stream for storage.
[0293] As another way, the hardware abstraction layer can return the processed images in the initial captured stream to the gallery application in real time, and the first encoding module in the gallery application encodes them; in response to the operation on the end control, the gallery application stores the generated target video stream.
[0294] Optionally, the application also includes:
[0295] S419: The camera application sends a preview request to the hardware abstraction layer.
[0296] It should be understood that preview is required after the camera application is turned on, when switching to time-lapse photography mode from other modes and before shooting starts, and in time-lapse photography mode, after shooting starts in response to a click operation on the shooting control and before shooting ends. Therefore, during this process, the camera application needs to issue a preview request.
[0297] S420: The hardware abstraction layer sends a preview request to the hardware layer, and receives a data stream (third data stream) returned by the hardware layer.
[0298] The above S420 may specifically include: the hardware abstraction layer sends the preview request to the camera module in the hardware layer through the included camera hardware abstraction layer, and after the camera module collects the image data, it returns the result to the camera hardware abstraction layer.
[0299] It should be understood that the data stream corresponds to a preview image, and the data stream can be acquired based on the default preview shooting parameters of the electronic device.
[0300] S421: After the hardware abstraction layer generates an initial preview stream for the hardware layer based on the third data stream, the hardware abstraction layer processes the initial preview stream.
[0301] Exemplarily, the initial preview stream may include multiple frames of initial preview images in the RAW domain.
[0302] Optionally, the hardware abstraction layer includes an image processing module, and the image processing module includes a preview image processing module.
[0303] Specifically, after receiving the initial preview stream, the preview image processing module processes the initial preview stream to improve the image quality.
[0304] Optionally, the preview image processing module may include a second filter submodule.
[0305] For example, Fig.16 As shown in (c), if the filter is set to "vivid" when setting the filter above, in the processing of the present application, after setting the filter, the second filter submodule can be used to process the input image in combination with the filter effect set by the user to generate an image with the filter effect.
[0306] It should be noted that if the user does not turn on the filter effect or before setting the filter effect, the preview image processing module does not need to process the input image and skips this step.
[0307] Optionally, the preview image processing module may further include a second format conversion submodule.
[0308] Exemplarily, the second format conversion submodule may be used to perform format conversion on the initial preview stream or the output image of the second filter submodule, and convert the image in the RAW domain into an image in the YUV domain.
[0309] The amount of image data in the YUV domain is smaller than that in the RAW domain, which can increase the rate of subsequent transmission. Of course, the second format conversion submodule can also perform other format conversions, which are not limited in this application.
[0310] S422: The hardware abstraction layer returns the processed initial preview stream to the camera application.
[0311] S423: The camera application encodes the processed initial preview stream and generates a preview stream for display.
[0312] The camera application can use the second encoding module to encode the processed initial snapshot stream and generate a preview stream for display.
[0313] For example, Fig.17 The examples of the initial preview stream, initial video stream and initial snapshot stream provided in the embodiments of the present application are not the same. The initial preview stream and the initial video stream can be obtained according to the default shooting parameters, while the initial snapshot stream can be obtained according to the shooting parameters set by the user.
[0314] In the embodiment of the present application, since in a professional video recording channel, photos can be captured simultaneously during the video recording process, the present application utilizes this implementation method. In the time-lapse photography mode, after setting the shooting parameters and filters, the initial video stream and the initial snapshot stream are obtained based on this method, and then the initial video stream is discarded without any processing, thereby saving a lot of power consumption; in addition, the initial snapshot stream obtained according to the shooting parameters is processed in combination with the set filters, etc., so that the corresponding time-lapse video can be obtained according to user needs; when user needs change, it can also be adaptively adjusted, thereby meeting the shooting needs of different effects and improving user experience.
[0315] In addition, the shooting parameters and filters are simple to set, and the user threshold is low; when taking pictures according to the shooting parameters set by the user, it is only necessary to process the images obtained by the set shooting parameters. Compared with the method of obtaining a large number of images and extracting frames after processing in the prior art, the processing method provided by the present application can reduce unnecessary power consumption, improve processing efficiency, and thereby improve the response speed of electronic devices.
[0316] In addition, the images processed by this application are images captured using a professional video recording channel, and the processing method is also for photographed images, and is combined with anti-shake and other steps. Therefore, compared with the prior art of simply processing the preview image to obtain a time-lapse video, the time-lapse video obtained by this application has higher quality.
[0317] Combination of the above Figures 1 to 17 The time-lapse photography method provided by the embodiment of the present application is described in detail; Figure 18 to Figure 19 The device embodiments of the present application are described in detail. It should be understood that the device in the embodiments of the present application can execute the various methods of the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.
[0318] Fig.18 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 500 includes a display module 510 and a processing module 520 .
[0319] The display module 510 is used to display a preview interface in the time-lapse photography mode.
[0320] The processing module 520 is used to detect a first operation on a shooting parameter setting control; in response to the first operation, trigger a shooting parameter setting sub-process, which is used to set shooting parameters, including the capture rate in the video; and is also used to detect a second operation on the shooting control; in response to the second operation, shoot based on the shooting parameters, and generate and store a target video stream.
[0321] It should be noted that the electronic device 500 is implemented in the form of a functional module. The term "module" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.
[0322] For example, a "module" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.
[0323] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0324] Fig.19 A structural schematic diagram of an electronic device provided by the present application is shown. Fig.19 The dotted line in the figure indicates that the unit or the module is optional; the electronic device 600 can be used to implement the time-lapse photography method described in the above method embodiment.
[0325] The electronic device 600 includes one or more processors 601, which can support the electronic device 600 to implement the time-lapse photography method in the method embodiment. The processor 601 can be a general-purpose processor or a special-purpose processor. For example, the processor 601 can be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.
[0326] Optionally, the processor 601 may be used to control the electronic device 600, execute software programs, and process data of the software programs. The electronic device 600 may also include a communication unit 605 to implement input (reception) and output (transmission) of signals.
[0327] For example, the electronic device 600 may be a chip, the communication unit 605 may be an input and / or output circuit of the chip, or the communication unit 605 may be a communication interface of the chip, and the chip may be a component of a terminal device or other electronic devices.
[0328] For another example, the electronic device 600 may be a terminal device, the communication unit 605 may be a transceiver of the terminal device, or the communication unit 605 may be one or more memories 602 in the terminal device, on which a program 604 is stored. The program 604 may be executed by the processor 601 to generate instructions 603, so that the processor 601 executes the time-lapse photography method described in the above method embodiment according to the instructions 603.
[0329] Optionally, data may also be stored in the memory 602 .
[0330] Optionally, the processor 601 may also read data stored in the memory 602 . The data may be stored at the same storage address as the program 604 , or may be stored at a different storage address from the program 604 .
[0331] Optionally, the processor 601 and the memory 602 may be provided separately or integrated together, for example, integrated on a system on chip (SOC) of the terminal device.
[0332] Optionally, the present application also provides a computer program product, which, when executed by the processor 601, implements the time-lapse photography method in any method embodiment of the present application.
[0333] For example, the computer program product may be stored in the memory 602 , such as a program 604 , which is finally converted into an executable target file that can be executed by the processor 601 after preprocessing, compiling, assembling, and linking.
[0334] Optionally, the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the time-lapse photography method of any method embodiment in the present application is implemented. The computer program can be a high-level language program or an executable target program.
[0335] For example, the computer-readable storage medium is, for example, a memory 602. The memory 602 may be a volatile memory or a non-volatile memory, or the memory 602 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0336] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0337] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0338] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the embodiments of the electronic device described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0339] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0340] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0341] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0342] In addition, the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0343] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0344] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims. In short, the above are only preferred embodiments of the technical solution of the present application, and are not used to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A time-lapse photography method, characterized in that: The method comprises: Displaying a preview interface in a time-lapse photography mode, wherein the preview interface includes a shooting parameter setting control, a shooting control, and a preview window, wherein the preview window displays a preview stream; detecting a first operation on the shooting parameter setting control; In response to the first operation, triggering a shooting parameter setting sub-process, the shooting parameter setting sub-process is used to set shooting parameters, the shooting parameters including the capture rate in the video; detecting a second operation on the shooting control; In response to the second operation, receiving a shooting request, the shooting request including a video recording request and a snapshot request in the video recording, the snapshot request in the video recording including a snapshot rate in the video recording; Based on the video recording request, an initial video stream is obtained by using a video recording channel and discarded but not deleted, wherein the initial video stream includes multiple frames of initial video images in a RAW domain; At the same time, based on the snapshot request in the video, the video recording channel is multiplexed to obtain an initial snapshot stream, the initial snapshot stream includes multiple frames of initial snapshot images in the RAW domain, and the initial snapshot images in the initial snapshot stream are the same as part of the initial video images in the initial video stream; The initial captured stream is processed and encoded to generate and store a target video stream.
2. The time-lapse photography method according to claim 1, characterized in that: The preview interface also includes: filter controls; Before detecting a second operation on the shooting control, the method further includes: detecting a third operation on the filter control; In response to the third operation, a filter setting sub-process is triggered, and the filter setting sub-process is used to set a target filter effect.
3. The time-lapse photography method according to claim 2, characterized in that: When the method includes triggering a filter setting sub-process in response to the third operation, processing and encoding the initial captured stream to generate and store the target video stream includes: The initial captured stream is processed and encoded in combination with the target filter effect to generate and store the target video stream.
4. The time-lapse photography method according to claim 3, characterized in that: The initial snapshot stream also includes anti-shake parameters; The processing and encoding of the initial captured stream to generate and store the target video stream includes: Processing the initial captured image in combination with the anti-shake parameter; The processed initial captured stream is format converted and encoded to generate and store the target video stream.
5. The time-lapse photography method according to claim 4, characterized in that: Before performing format conversion and encoding on the processed initial captured stream and generating and storing the target video stream, the method further includes: The initial captured image is processed in combination with the target filter effect.
6. The time-lapse photography method according to any one of claims 1 to 5, characterized in that: In response to the first operation, a shooting parameter setting sub-process is triggered, including: In response to the first operation, displaying a first shooting parameter setting interface, wherein the first shooting parameter setting interface includes a sub-shooting parameter control and a corresponding subsidiary control; In response to a fourth operation on the subsidiary control, displaying a second shooting parameter setting interface, the second shooting parameter setting interface corresponding to the set shooting parameters; Switch to the preview interface.
7. The time-lapse photography method according to claim 2 or 3, characterized in that: In response to the third operation, a filter setting sub-process is triggered, including: In response to the third operation, displaying a first filter setting interface, wherein the first filter setting interface includes a plurality of filter effect options; In response to a fifth operation on the plurality of filter effect options, determining the target filter effect, and displaying a second filter setting interface in combination with the target filter effect; Switch to the preview interface.
8. The time-lapse photography method according to claim 7, characterized in that: The method further comprises: Receive preview request; Based on the preview request, obtaining an initial preview stream; The initial preview stream is processed and encoded to generate the preview stream.
9. The time-lapse photography method according to claim 8, characterized in that: When the method includes triggering a filter setting sub-process in response to the third operation, processing and encoding the initial preview stream to generate the preview stream includes: The initial preview stream is processed and encoded in combination with the target filter effect to generate the preview stream.
10. The time-lapse photography method according to any one of claims 1 to 5, 8 and 9, characterized in that: The shooting parameters also include: recording time, zoom ratio, and filming time.
11. An electronic device, characterized in that: including a processor and a memory; The memory is used to store a computer program executable on the processor; The processor is used to execute the time-lapse photography method according to any one of claims 1 to 10.
12. A chip, characterized in that: The chip is applied to an electronic device, and the chip includes one or more processors, and the processor is used to call computer instructions so that the electronic device executes the time-lapse photography method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the electronic device executes the time-lapse photography method according to any one of claims 1 to 10.
