Image shooting method and electronic equipment
By introducing event cameras into electronic devices and using event data to adjust the position of the lens group in real time, the problem of poor film quality when shooting moving objects with traditional cameras is solved, high-quality shooting of moving objects is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202410296257.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2025-09-16
AI Technical Summary
Traditional cameras produce poor quality images when shooting moving objects, and existing technologies are difficult to effectively reduce motion blur, which affects user experience.
An event camera is introduced into electronic devices, and the event data output by the event pixel array is used to adjust the position of the lens group in real time to achieve optical image stabilization. The visible light pixel array is combined to perform image fusion and lightweight deblurring processing.
It improves the shooting quality of moving objects, reduces motion blur, and enhances user experience.
Smart Images

Figure CN120658944A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to an image capturing method and electronic device. Background Art
[0002] With the advancement of technology, more and more users are using cameras in electronic devices (e.g., mobile phones) to capture images. Currently, these cameras are typically traditional cameras (e.g., RGB cameras). Traditional cameras have poor image quality in some scenarios (e.g., capturing moving objects), resulting in poor image quality and impacting user experience. Summary of the Invention
[0003] The embodiments of the present application provide an image capturing method and an electronic device, which can improve the capturing quality of moving objects.
[0004] In a first aspect, an image capture method is provided for use in an electronic device, wherein the electronic device includes a visible light pixel array and an event pixel array, wherein the visible light pixel array corresponds to a first lens group. The method comprises: outputting event data via the event pixel array; and driving the first lens group to move position based on the event data to achieve optical image stabilization.
[0005] In embodiments of the present application, electronic devices can utilize event data output by an event camera for optical image stabilization (OIS). Because event cameras can accurately capture moving objects in real time, utilizing event data for optical image stabilization reduces motion blur in captured images, improving the quality of captured images of moving objects.
[0006] In one possible design, the electronic device includes a first camera and a second camera, the visible light pixel array is located in the first camera, the event pixel array is located in the second camera, and the shooting ranges of the first camera and the second camera overlap.
[0007] In the embodiment of the present application, the visible light pixel array and the event pixel array may be designed to be separated, that is, located in different cameras.
[0008] In one possible design, the electronic device includes a third camera, the third camera includes a hybrid image sensor, and the hybrid image sensor includes the visible light pixel array and the event pixel array.
[0009] In an embodiment of the present application, the visible light pixel array and the event pixel array may be an integrated design. For example, the visible light pixel array and the event pixel array are located in a hybrid image sensor.
[0010] In one possible design, driving the first lens group to move according to the event data includes: mapping the event data at a first moment from a first position in a first coordinate system to a second position in a second coordinate system; mapping the event data at a second moment from a third position in the first coordinate system to a fourth position in the second coordinate system, wherein the first coordinate system is a coordinate system of the event pixel array, the second coordinate system is a coordinate system of the visible light pixel array, the second moment and the first moment are both within the exposure period of the visible light image, and the second moment is after the first moment; and adjusting the position of the first lens group according to a first displacement and / or a first speed between the second position and the fourth position, wherein the first speed is determined according to the first displacement and the time difference between the first moment and the second moment.
[0011] In the embodiment of the present application, considering that the coordinate systems of the event pixel array and the visible light pixel array are different, the electronic device can convert the event data into the coordinate system corresponding to the visible light pixel array, and adjust the displacement of the first lens group based on the displacement and / or speed between different positions in the coordinate system to improve accuracy.
[0012] In one possible design, event data at a first moment is mapped from a first position of a first coordinate system to a second position of a second coordinate system, including: mapping the event data at the first moment from the first position of the first coordinate system to the second position of the second coordinate system according to the calibration results of the visible light pixel array and the event pixel array; and event data at a second moment is mapped from a third position of the first coordinate system to a fourth position of the second coordinate system, including: mapping the event data at the second moment from the third position of the first coordinate system to the fourth position of the second coordinate system according to the calibration results of the visible light pixel array and the event pixel array.
[0013] In an embodiment of the present application, the electronic device can use the calibration results between the visible light pixel array and the event pixel array to perform coordinate conversion to improve the accuracy of the coordinate conversion.
[0014] In one possible design, adjusting the position of the first lens group based on a first displacement between the second position and the fourth position includes: determining a second displacement of the first lens group based on the first displacement and a first correspondence relationship, the first correspondence relationship being used to describe the relationship between the displacement of the moving object on the optical image and the displacement of the first lens group; and adjusting the position of the first lens group based on the second displacement.
[0015] In an embodiment of the present application, the electronic device can convert event data into a coordinate system corresponding to the visible light pixel array, and determine how much the first lens group needs to move based on the displacement between different positions in the coordinate system, thereby improving the accuracy of the lens group position adjustment.
[0016] In one possible design, adjusting the position of the first lens group according to a first speed between the second position and the fourth position includes: determining a second speed of the first lens group according to the first speed and a second correspondence, where the second correspondence is used to describe the relationship between the speed of the moving object on the optical image and the speed of the first lens group; and adjusting the position of the first lens group according to the second speed.
[0017] In an embodiment of the present application, the electronic device can convert event data into a coordinate system corresponding to the visible light pixel array, determine the movement speed of the moving target on the visible light image based on different positions within the coordinate system, and then determine the movement speed of the first lens group to ensure that the first lens group can follow the movement of the moving target in real time as much as possible, thereby improving the accuracy of OIS.
[0018] In a possible design, the method further includes: when it is determined that the posture of the electronic device has changed, adjusting the position of the first lens group according to the posture change information of the electronic device.
[0019] In an embodiment of the present application, the electronic device can also perform optical image stabilization according to the device posture to improve image capture quality.
[0020] In one possible design, before driving the first lens group to move according to the event data, the method further includes: determining whether at least one of the following conditions is satisfied: the current shooting scene is a preset shooting scene; or the moving target satisfies a preset condition; or the current shooting mode is a first shooting mode, which is a mode for shooting a moving target using the event pixel array.
[0021] In an embodiment of the present application, when the electronic device determines that the conditions are met, it uses the event data output by the event camera to perform optical image stabilization to avoid the time camera being used all the time and wasting resources.
[0022] In one possible design, when there is only one moving target, the moving target satisfies at least one of the preset conditions, including: the position of the moving target in the visible light image is within a preset range, the speed of the moving target is greater than a preset speed, and the area occupied by the moving target in the visible light image is greater than a preset area; when there are multiple moving targets, the moving target satisfies at least one of the preset conditions, including: the movement directions of the multiple moving targets are consistent, the positions of the multiple moving targets in the visible light image are all within the preset positions, the speeds of the multiple moving targets are all greater than the preset speed, and the areas occupied by the multiple moving targets in the visible light image are all greater than a preset area.
[0023] In an embodiment of the present application, when the electronic device determines that the conditions are met, it uses the event data output by the event camera to perform optical image stabilization to avoid wasting resources.
[0024] In one possible design, before driving the first lens group to move according to the event data, the method further includes: when it is determined that a condition is met, the electronic device enters a first shooting mode, and the first shooting mode is a mode for shooting images using the event pixel array.
[0025] In an embodiment of the present application, the electronic device includes a first shooting mode. When conditions are met, the electronic device enters the first shooting mode and uses event data output by the event camera to perform optical image stabilization to improve shooting quality.
[0026] In one possible design, the method further includes: storing at least one of a first image, a second image, and a third image; the first image includes the visible light image; the second image includes an image obtained based on event data output by the event pixel array; and the third image includes a fused image of the first image and the second image.
[0027] In the embodiment of the present application, after the electronic device stores at least one of the first image, the second image, and the third image, it is convenient for the user to view it, and the user experience is good.
[0028] In one possible design, the electronic device further includes a synchronization module. Before driving the first lens group to move according to the event data, the method further includes: during an exposure period of the first lens group, the synchronization module outputs at least one synchronization signal; and based on the at least one synchronization signal, time-aligning the event data stream output by the event pixel array with the visible light image stream output by the visible light pixel array.
[0029] In an embodiment of the present application, the electronic device can time-align the event data stream output by the event pixel array with the visible light image stream output by the visible light pixel array, and then use the event data output by the event camera to perform optical image stabilization to improve the accuracy of OIS and thereby improve the shooting quality.
[0030] In one possible design, the event data stream output by the event pixel array is time-aligned with the visible light image stream output by the visible light pixel array according to the at least one synchronization signal, including: printing a timestamp according to the at least one synchronization signal, wherein the timestamp is used to embed the event data stream; and time-aligning the event data stream and the visible light image stream output by the visible light pixel array according to the timestamp in the event data stream.
[0031] In an embodiment of the present application, the electronic device can time-align the event data stream output by the event pixel array with the visible light image stream output by the visible light pixel array by printing a timestamp, and then use the event data output by the event camera to perform optical image stabilization to improve the accuracy of OIS and thereby improve the shooting quality.
[0032] In one possible design, the event data includes synchronous event data and / or asynchronous event data.
[0033] In a second aspect, an image capture device is also provided, comprising: a visible light pixel array, an event pixel array, and a processing unit, wherein the visible light pixel array corresponds to a first lens group; the event pixel array is used to output event data, wherein the event data is used to describe the motion state of a moving target in a captured scene; and the processing unit is used to adjust the position of the first lens group according to the event data so that the degree of motion blur of the moving target in the visible light image output by the visible light pixel array is lower than a threshold.
[0034] In one possible design, the electronic device includes a first camera and a second camera, the visible light pixel array is located in the first camera, the event pixel array is located in the second camera, the shooting ranges of the first camera and the second camera overlap, and the moving target is located in the overlapping shooting range.
[0035] In one possible design, the electronic device includes a third camera, the third camera includes a hybrid image sensor, and the hybrid image sensor includes the visible light pixel array and the event pixel array.
[0036] In one possible design, the processing unit is specifically used to: map event data at a first moment from a first position in a first coordinate system to a second position in a second coordinate system; map event data at a second moment from a third position in the first coordinate system to a fourth position in the second coordinate system, wherein the first coordinate system is a coordinate system of the event pixel array, the second coordinate system is a coordinate system of the visible light pixel array, the second moment and the first moment are both within the exposure period of the visible light image, and the second moment is after the first moment; and adjust the position of the first lens group according to a first displacement and / or a first speed between the second position and the fourth position, wherein the first speed is determined according to the first displacement and the time difference between the first moment and the second moment.
[0037] In one possible design, the processing unit is specifically used to: map the event data at the first moment from the first position of the first coordinate system to the second position of the second coordinate system according to the calibration results of the visible light pixel array and the event pixel array; and map the event data at the second moment from the third position of the first coordinate system to the fourth position of the second coordinate system according to the calibration results of the visible light pixel array and the event pixel array.
[0038] In one possible design, the processing unit is specifically configured to: determine a second displacement of the first lens group based on a first displacement between the second position and the fourth position, and a first correspondence relationship, where the first correspondence relationship is used to describe the relationship between the displacement of the moving object on the optical image and the displacement of the first lens group; and adjust the position of the first lens group based on the second displacement.
[0039] In one possible design, the processing unit is specifically configured to: determine a second speed of the first lens group based on a first speed between the second position and the fourth position, and a second correspondence relationship, where the second correspondence relationship is used to describe the relationship between the speed of the moving target on the optical image and the speed of the first lens group; and adjust the position of the first lens group based on the second speed.
[0040] In one possible design, the electronic device includes an OIS motor, which is connected to the first lens group and the processing unit respectively. The processing unit is specifically used to: control the OIS motor according to the event data so that the OIS motor pushes the first lens group to move its position.
[0041] In one possible design, the electronic device also includes a motion sensor, which is used to detect the posture of the electronic device. The processing unit is also used to: when it is determined that the posture of the electronic device has changed, adjust the position of the first lens group according to the posture change information of the electronic device.
[0042] In one possible design, the electronic device further includes a main chip, wherein the main chip is configured to: acquire at least one of the first image, the second image, and the third image, and display and / or store the at least one image;
[0043] The first image includes the visible light image;
[0044] The second image includes an image obtained based on event data output by the event pixel array;
[0045] The third image includes a fused image of the first image and the second image.
[0046] In one possible design, the electronic device further includes a motion sensor, which is used to detect the posture of the electronic device, and the main chip is further used to:
[0047] When it is determined that the posture of the electronic device has changed, deblurring processing is performed on the at least one image according to the posture change information of the electronic device.
[0048] In a third aspect, the present application provides an image capture device comprising modules / units for executing the method corresponding to any one of the designs in the first aspect. These modules / units may be implemented in hardware, or in hardware executing corresponding software implementations.
[0049] In a fourth aspect, the present application provides an electronic device, comprising: an image capture device, wherein the image capture device is configured to execute the method as described in any one of the above-mentioned first aspects.
[0050] In a fifth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by at least one processor, it implements the method as described in any one of the above-mentioned first aspects.
[0051] In a sixth aspect, the present application provides a chip comprising a processor and an interface; the processor is configured to read instructions through the interface to execute a method as described in any one of the above-mentioned first aspects.
[0052] In a seventh aspect, the present application provides a computer program product, which includes a computer program. When the computer program is run on a computer, the computer can execute the method as described in any one of the above-mentioned first aspects.
[0053] The beneficial effects of the design in any of the second to seventh aspects can refer to the beneficial effects of the corresponding design in the first aspect, and this application will not elaborate on them one by one. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A schematic diagram of a hybrid sensor provided in one embodiment of the present application;
[0055] Figure 2 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;
[0056] Figure 3 Another structural diagram of an electronic device provided in one embodiment of the present application;
[0057] Figure 4 A schematic diagram of a processing flow of a processing unit provided in one embodiment of the present application;
[0058] Figure 5 A schematic diagram of a user specifying a moving subject target according to an embodiment of the present application;
[0059] Figure 6 Another structural diagram of an electronic device provided in one embodiment of the present application;
[0060] Figure 7 A schematic diagram of aligning RGB data with event data clocks provided in one embodiment of the present application;
[0061] Figure 8 Another schematic diagram of aligning RGB data with event data clock according to an embodiment of the present application;
[0062] Figure 9 A schematic diagram of the ROI mapping process provided in one embodiment of the present application;
[0063] Figure 10 A schematic diagram of an image captured by the image capturing method provided in one embodiment of the present application;
[0064] Figure 11 A schematic diagram of a setting process of a panning mode provided in an embodiment of the present application;
[0065] Figure 12 Another schematic diagram of a process for setting a panning mode according to an embodiment of the present application;
[0066] 13A to 13B A schematic diagram of automatically entering a panning mode according to an embodiment of the present application;
[0067] Figure 14Another structural diagram of an electronic device provided in one embodiment of the present application;
[0068] Figure 15 Another structural diagram of an electronic device provided in one embodiment of the present application;
[0069] Figure 16 Another structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0070] Below, some terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0071] The at least one involved in the embodiments of the present application includes one or more; wherein, more means greater than or equal to two. In addition, it should be understood that, in the description of this specification, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as expressing or implying relative importance, nor can they be understood as expressing or implying order. For example, the first position and the second position do not represent the importance of the two or the order of the two, but are only for distinguishing the description. In the embodiments of the present application, "and / or" is only a description of the association relationship, 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 objects related to each other are in an "or" relationship.
[0072] The directional terms mentioned in the embodiments of the present application, such as "up", "down", "left", "right", "inside", "outside", etc., are only references to the directions in the drawings. Therefore, the directional terms used are for better and clearer explanation and understanding of the embodiments of the present application, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.
[0073] References to "one embodiment," "in some examples," or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the specification. Thus, phrases such as "in some examples," "in one embodiment," "in some other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0074] The technical solutions provided by the embodiments of the present application are described below with reference to the accompanying drawings.
[0075] The imaging process of a traditional camera (for example, an RGB camera) can generally include: there are objects in the real environment, and light shines on the surface of the object to form reflected light. During the camera's exposure time, the shutter opens, and the reflected light is transmitted through the camera lens to the photosensitive element in the camera. The photosensitive element senses the light signal to generate an electrical signal, and transmits the electrical signal to the image signal processor (ISP). After the ISP converts the electrical signal into image data, it outputs the image data at a certain frame rate. It should be noted that during the imaging process, exposure needs to be continued for a period of time so that the photosensitive element accumulates a certain amount of photons. During the exposure time, if the photographed object moves relative to the camera, motion blur will occur on the captured image, affecting the output effect.
[0076] One solution is to use a deblurring algorithm to deblur the motion-blurred image captured by the camera after the user presses the camera button, resulting in a clearer image for the user. This solution requires the use of an image post-processing algorithm (i.e., a deblurring algorithm). Complex and computationally intensive algorithms can lead to extended image processing times, impacting the user experience. Furthermore, the algorithm's improvement in clarity is limited, resulting in suboptimal image quality.
[0077] To reduce the complexity of image post-processing, another solution is to include a target tracking algorithm in the electronic device. This algorithm uses the RGB image output by a traditional camera to calculate the displacement of the moving target and then adjusts the camera lens position based on the target's displacement. During this lens adjustment process, the motion blur of the moving target in the RGB image obtained through the lens is reduced. This approach eliminates the need for complex image post-processing algorithms (i.e., deblurring algorithms) and produces images with reduced motion blur. However, this approach has certain drawbacks: the target tracking algorithm uses the RGB image output by a traditional camera to calculate the displacement of the moving target. Due to the limited frame rate of traditional cameras, the target tracking algorithm takes a long time to calculate, resulting in a delay in the camera system. If the moving target is very fast, it cannot be tracked quickly and accurately, causing the target to flash by and be unable to capture a clear image. Even using high-performance (high-frame-rate) traditional cameras, there will still be millisecond-level latency, making it impossible to accurately track the moving target.
[0078] In view of this, an embodiment of the present application provides a solution by introducing an event camera into an electronic device, utilizing the low-latency (subtle level) target tracking characteristics of the event camera to adjust the lens in real time to follow the movement of the moving target, thereby improving the electronic device's ability to shoot moving targets.
[0079] For ease of understanding, let's briefly explain event cameras. Event cameras can also be called dynamic vision sensors (DVS) or neuromorphic vision sensors. Unlike traditional cameras, each pixel in an event camera is used to capture changes in brightness. For example, an event camera includes an event pixel array, in which each event pixel can output an event signal based on brightness changes. For example, for each event pixel, an "event" is output when the brightness of the event pixel changes and the change reaches a certain threshold. An "event" consists of three elements: a timestamp, pixel coordinates, and polarity, expressed as (x, y, p, t). x and y are the pixel coordinates, i.e., the horizontal and vertical coordinates of the event pixel; t is the timestamp, which indicates the time when the brightness of the event pixel changed; and p is the polarity, which indicates whether the brightness of the event pixel increased or decreased. Polarity can be positive or negative, with positive indicating an increase in brightness at the event pixel and negative indicating a decrease in brightness at the event pixel. Therefore, each event pixel has a corresponding four-dimensional data packet (x, y, p, t). The event data output by the event camera has a high resolution, which can reach an accuracy of 1 microsecond (us). Compared with traditional cameras, it has a lower latency and can be used to capture high-speed moving objects. And because there is no concept of exposure time, the event camera has no motion blur.
[0080] In the embodiment of the present application, after an event camera is introduced into an electronic device, the electronic device includes a traditional camera and an event camera.
[0081] In some embodiments, the event camera and the traditional camera in the electronic device may be integrated into one unit. For example, the electronic device may include a hybrid image sensor, which includes an event camera portion and a traditional camera portion.
[0082] For example, see Figure 1, is a schematic diagram of a hybrid sensor provided in one embodiment of the present application. The hybrid sensor includes: a traditional camera part and an event camera part. The traditional camera part includes an RGB pixel array and an RGB pixel readout circuit. The RGB pixel array includes at least one RGB pixel, which is used to generate a current signal when sensing light. The RGB pixel readout circuit is used to read out the current obtained by the RGB pixel array when sensing light, and output RGB data. Regarding the principle of the traditional camera part, the embodiment of the present application will not be elaborated in detail. The event camera part includes an event pixel array and an event pixel readout circuit. The event pixel array includes at least one event pixel, which is used to capture the brightness change of the pixel and generate a current signal. The event pixel readout circuit is used to read out the current obtained by the event pixel when sensing light, and output event data, that is, a four-dimensional data packet of (x, y, p, t).
[0083] It should be noted that Figure 1 In the example of the traditional camera part being an RGB camera, it is understandable that in addition to RGB cameras, other visible light cameras can also be used. In other words, Figure 1 The RGB pixel array can also be other visible light pixel arrays, which is not limited in the present embodiment. In addition, the present embodiment does not limit the number of RGB pixels in the RGB pixel array and the number of event pixels in the event pixel array, which can be the same or different. Figure 1 In the example above, the RGB pixel readout circuit and the event pixel readout circuit are located inside the hybrid sensor. Optionally, the RGB pixel readout circuit and the event pixel readout circuit may also be located outside the hybrid sensor, which is not limited in the embodiment of the present application.
[0084] As an example, a hybrid sensor can share a set of lenses ( Figure 1 (not shown), the set of lenses may include one or more lenses. For example, Figure 1 In the hybrid sensor shown, the traditional camera part and the event camera part share a set of lenses.
[0085] For example, see Figure 2 , is a design diagram of an electronic device. Figure 2 As shown, the electronic device includes a camera, which includes a lens group (shared lens group) and a hybrid sensor. The structure of the hybrid sensor can be as follows Figure 1 shown. Figure 2In the hybrid sensor, when light passes through the shared lens, the RGB pixel array in the hybrid sensor senses light and generates a current signal. The RGB pixel readout circuit reads the current sensed by the RGB pixel array to obtain RGB data. Similarly, when light passes through the shared lens and reaches the hybrid sensor, the event pixel array in the hybrid sensor captures the brightness change of the pixel and generates a current signal. The event pixel readout circuit reads the current sensed by the event pixel array to obtain event data. It should be noted that Figure 2 The camera is taken as an example of a rear camera, but it can also be a front camera. Figure 2 The camera shown can be a normal camera, or a wide-angle or telephoto camera, which is not limited in the present embodiment. Figure 2 Only one rear camera is shown in the figure. It is understandable that the number of rear cameras on the electronic device can be multiple. In this case, Figure 2 The camera can be any one of multiple rear cameras, or the main camera or sub-main camera among multiple rear cameras.
[0086] See Figure 3 , is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. The electronic device includes a hybrid sensor module and a main chip. The hybrid sensor module includes a lens assembly, a hybrid sensor, a processing unit, and an optical image stabilization (OIS) module.
[0087] The lens group can be a shared lens group of a hybrid sensor. The lens group can include at least one lens. The lens group can be of a movable design. For example, the lens group can move its position under the control of the OIS module, and can include 2-axis translation, 3-axis translation, 5-axis translation, 6-axis translation, etc., which is not limited in the embodiments of the present application. 2-axis translation can include translation in the x-axis and y-axis directions. 2-axis translation can include translation in the x-axis, y-axis, and z-axis directions. 5-axis translation can include translation in the x-axis and y-axis directions, as well as translation in the pitch, yaw, and roll axes. 6-axis translation can include translation in the x-axis, y-axis, and z-axis directions, as well as translation in the pitch, yaw, and roll axes.
[0088] The hybrid sensor includes a traditional camera part and an event camera part. Its structure can be seen in Figure 1 shown.
[0089] The processing unit can be connected to the event pixel part in the Hybrid sensor module, for example, connected to the event pixel readout circuit in the event pixel part, and can obtain the event data output by the event pixel readout circuit. In an embodiment of the present application, the processing unit can guide the OIS module to drive the lens group to move according to the event data. It should be understood that since the event data can describe the real-time motion state of the moving target (for example, motion displacement, motion speed), the processing unit can use the event data to control the lens group to follow the moving target in real time to compensate for the motion blur of the moving target. It should be noted that Figure 3 In this example, the processing unit is located within the hybrid sensor module. In this case, the event data output by the event camera can be sent directly to the processing unit without data encoding. This reduces the time required to encode and decode the event data and lowers system latency. It is understood that the processing unit can also be located outside the hybrid sensor module. When the processing unit is located outside the hybrid sensor module, the event data generated by the event camera can be transmitted to the processing unit after data encoding. There are various data encoding methods, such as Mobile Industry Processor Interface (MIPI) encoding. Optionally, the processing unit may include one or more processors or one or more integrated circuits. For example, the processor unit may include one or more Field-Programmable Gate Arrays (FPGAs) or one or more Advanced RISC Machines (ARM) microprocessors. The processing unit may be a dedicated processing unit, for example, one specifically dedicated to processing event data. Of course, the processing unit may also be a non-dedicated processing unit, which is not limited in the present embodiments.
[0090] The OIS module is used to push the lens group to move. In an embodiment of the present application, the OIS module is connected to the processing unit. Under the guidance of the processing unit, the OIS module pushes the lens group to move to compensate for the motion blur caused by the moving target. As an example, a hybrid sensor can share an OIS module, that is, the traditional camera part and the event camera part of the hybrid sensor share an OIS module. Alternatively, the traditional camera part and the event camera part of the hybrid sensor can each correspond to an OIS module. Alternatively, only the traditional camera part corresponds to an OIS module, and the event camera part may not have an OIS module.
[0091] As an example, the OIS module may include an OIS drive unit and an OIS motor (not shown in FIG3 ). The OIS drive unit may be connected to the processing unit and may, under the guidance of the processing unit, drive the lens group to move via the OIS motor. Optionally, the OIS drive unit may include one or more OIS driver integrated circuits (driver ICs).
[0092] The main chip can be a system-on-chip (SOC) in an electronic device and can include one or more processors, one or more memories, and other components. For example, the main chip can integrate processors such as a central processing unit (CPU), an image signal processor (ISP), and an event signal processor (ESP). The ISP can process the RGB data output by the traditional camera portion of the hybrid sensor module (e.g., perform noise reduction). The ESP can process the event data output by the event camera portion of the hybrid sensor module (e.g., perform noise reduction).
[0093] As previously mentioned, the processing unit uses event data to instruct the OIS module to drive the lens group to follow the moving target. As the lens group moves, light passes through the lens group and reaches the hybrid sensor. The hybrid sensor's traditional camera outputs RGB data. After the ISP processes this RGB data, the resulting RGB image exhibits minimal motion blur for moving targets.
[0094] For example, by Figure 3 When the electronic device shown captures a moving vehicle, the vehicle's motion blur is low in the captured image. Figure 3 The degree of motion blur of a moving object (e.g., a vehicle) in an image captured by the electronic device may be below a threshold. The threshold may include threshold A. Threshold A may be the degree of motion blur of the moving object in an RGB image output by the RGB camera when capturing the same scene (e.g., capturing the same vehicle at the same speed) without directing the lens group to follow the movement of the moving object according to the event camera.
[0095] Figure 3In the process, it is considered that there will be certain deviations in the hybrid sensor module during mass production. Even if the OIS module has controlled the lens group to follow the moving target, when the light passes through the lens group and the hybrid sensor to the main chip, the output RGB image still has a certain amount of motion blur. In order to avoid this situation, the main chip can perform a certain amount of deblurring on the RGB image. Since there is only slight motion blur on the RGB image obtained by the main chip, the deblurring here is very lightweight and only requires slight deblurring. The amount of calculation is not large and will not cause a large delay in the system. The deblurring on the main chip can be based on the deblur algorithm. The deblur algorithm can be arbitrary and is not limited in the embodiments of this application. Since the deblur algorithm is dispensable, Figure 3 denoted by dashed lines. Optionally, the deblur algorithm may further perform deblurring based on information about the electronic device's posture change. For example, the deblur algorithm may obtain the electronic device's posture information from a motion sensor (e.g., a gyroscope) and perform state estimation. When a posture change of the electronic device is determined, the image may be deblurred based on the posture change information. The image processed by the deblur algorithm may be displayed and / or stored.
[0096] As an example, Figure 3 In the ISP, the RGB image output can be displayed and / or stored separately.
[0097] As another example, Figure 3 In [1], the RGB image output by the ISP can be fused with the event data output by the ESP, and the resulting image can be displayed and / or stored. Since event data only contains object outlines, fusion of event data and RGB image can be achieved by superimposing the event data on the RGB image to form a stylized image.
[0098] As another example, Figure 3 In the embodiment of the present invention, the event data output by the ESP can also be displayed and / or stored separately. Since the event data only contains the outline of the object, the event data can be displayed and / or stored as a special image (for example, a cartoon or sketch image).
[0099] It should be noted that Figure 3 The following are just some of the components in the electronic equipment. In actual application, the electronic equipment may include Figure 3 More or fewer components. For example, although Figure 3Although not shown in the figure, the hybrid sensor module may further include auto-focus (AF), variable aperture (VA), fixed focus (FF), etc.
[0100] In the above embodiment, the processing unit instructs the OIS module to move the lens group according to the event data. The following is a detailed description of this process. For example, see Figure 4 , is a flow chart of the processing unit guiding the OIS module to move the lens group according to the event data. Figure 4 , the process may include:
[0101] S1, determining a region of interest (ROI). The ROI may include one or more moving targets.
[0102] In some embodiments, the processing unit may determine which moving targets are included in the captured image. Assuming that there are N moving targets, where N is a positive integer, the processing unit may determine the ROI based on the N moving targets. Optionally, when determining which moving targets are included in the captured image, the processing unit may use event data or RGB data, which is not limited in this embodiment of the present application.
[0103] For example, the processing unit may determine the region where N moving targets are located in the captured image as the ROI. For example, within the captured image, each of the N moving targets occupies a region. The region occupied by each moving target may be the region enclosed by the edge outline of the moving target, or the region enclosed by the minimum circumscribed polygon (e.g., a square or rectangle) of the edge outline of the moving target. The ROI may be the sum of the N regions occupied by the N moving targets.
[0104] For another example, the processing unit can determine a moving subject from N moving targets, and the region corresponding to the moving subject is the ROI. The moving subject can include one or more of the N moving targets. This approach requires determining the moving subject from the N moving targets. It is understood that if N = 1, the only moving target is determined to be the moving subject; if N > 1, one or more moving targets are determined from multiple moving targets as the moving subject.
[0105] For example, the processing unit may determine, from N moving targets, a moving target that meets certain conditions as a moving subject. The conditions may include at least one of: being located at a preset position within the captured image (e.g., the middle area of the captured image), occupying an area greater than a preset area within the captured image (e.g., 1 / 3 of the total area of the captured image), moving at a speed greater than a preset speed, or belonging to a preset object category (e.g., a person, an animal, etc.).
[0106] For another example, the processing unit may determine a moving subject from N moving targets based on the characteristic information of historical moving subjects. A historical moving subject may be understood as a moving target that has been historically determined to be a moving subject. The processing unit may store characteristic information of historical moving subjects, such as edge contours and object categories of historical moving subjects. The processing unit may determine whether the characteristic information of a moving target among the N moving targets matches the characteristic information of the historical moving subject, and if so, determine that the moving target is the moving subject.
[0107] For another example, the processing unit may determine the moving subject among N moving targets according to the user specified operation. Figure 5 , the shooting screen (for example, the preview interface) includes two moving targets. Optionally, the two moving targets can be marked with target frames. Optionally, the electronic device can output a prompt message: Please select the moving subject. The user can specify the moving subject through various types of operations such as clicking, drawing a circle, and long pressing. It should be noted that, Figure 5 This is only an example of a user specifying a moving subject. The user may specify the subject in other ways, which is not limited in the embodiments of the present application.
[0108] In other embodiments, the processing unit does not need to determine which moving targets are included in the captured image. Instead, it can simply determine an approximate region within the captured image that contains the moving targets. This region is referred to as the ROI. The ROI determined here differs from the ROI determined in the above embodiments. In the above embodiments, the ROI is determined when the moving targets are known. The ROI here is the approximate region within the captured image where the moving targets are present, but the specific moving targets within the ROI are unknown. As an example, the processing unit can perform an optical flow calculation on the captured image to obtain an optical flow calculation result. The optical flow calculation result can be used to determine the approximate region within the captured image that contains the moving targets. For example, based on the optical flow calculation result, the processing unit can determine the motion intensity and direction of each region within the entire captured image. Then, based on the motion intensity and direction of each region, the processing unit selects the region with the largest area in the captured image that has the same motion direction and speed, and determines this region as the ROI. The detailed process of the optical flow calculation is not described in detail herein. Moreover, the optical flow calculation result can be a sparse optical flow result or a dense optical flow result, which is not limited in the present embodiments. Optionally, when determining the ROI based on the optical flow calculation results, the processing unit may also make a comprehensive judgment based on historical optical flow calculation results. The historical optical flow calculation results can be understood as the optical flow calculation results obtained by performing optical flow calculations on the captured images in the past. The historical optical flow calculation results may include historical optical flow calculation results obtained based on historical event data and / or historical RGB data.
[0109] S2, track the ROI.
[0110] S3, maps the ROI to the RGB image and calculates the displacement and velocity of the ROI on the RGB image.
[0111] It can be understood that the tracking result of the ROI in S2 is an event data stream that can describe the motion state of the ROI. The event data stream is represented in the event camera coordinate system (for the convenience of distinction, referred to as the first coordinate system). The processing unit can convert the event data stream from the first coordinate system to the second coordinate system, which is the RGB camera coordinate system. This process can be simply referred to as ROI mapping.
[0112] It should be noted that because the frame rate of the RGB camera is lower than that of the event camera, the processing unit can first perform clock alignment (also known as time synchronization) between the RGB data and the event data before performing ROI mapping. The following describes the time synchronization process and the ROI mapping process in turn.
[0113] 1. Time Synchronization
[0114] Time synchronization methods may include soft synchronization and hard synchronization. The embodiments of the present application are mainly described using hard synchronization as an example.
[0115] In some embodiments, event data and RGB data can be hard synchronized within the Hybrid sensor. For example, see Figure 6 , is another structural diagram of an electronic device provided in one embodiment of the present application. Figure 3 compared to, Figure 6 In the hybrid sensor, a synchronization module is added. The synchronization module can be connected to both the traditional camera and the event camera. For example, the synchronization module is connected to the RGB pixel array in the traditional camera and to the event pixel readout circuit in the event camera. The synchronization module generates a synchronization signal based on the exposure time of the RGB pixels and the event data readout method (synchronous readout or asynchronous readout). This synchronization signal is transmitted to the event pixel readout circuit, which timestamps the event data to achieve clock alignment with the RGB data.
[0116] Taking asynchronous readout as an example, when the brightness value of an event pixel changes and exceeds a set threshold, an event signal is generated, and the event signal is marked with address information and timestamp information, and a four-dimensional data packet is output, thereby obtaining an asynchronous event data stream. Figure 7 , is a schematic diagram of aligning RGB data with event data clocks provided by an embodiment of the present application. Each frame of RGB image has an exposure time, which includes the exposure start time and the exposure end time. Taking the RGB image using the local exposure method as an example, Figure 8 As shown, the exposure time of the Kth frame RGB image is from the exposure moment of the 1st row to the exposure end moment of the last row of the Kth frame RGB image. Similarly, the exposure time of the K+1th frame is from the exposure moment of the 1st row to the exposure end moment of the last row of the K+1th frame. In this case, the synchronization module can: send a synchronization signal for each frame of RGB image, and the sending time of the synchronization signal can be any time within the exposure period of the frame of RGB image. For example, Figure 8 As shown, the synchronization module can send a synchronization signal at the end of the exposure of the first row of pixels in each frame of RGB image. When the synchronization signal output by the synchronization module is passed to the event pixel readout circuit, the event pixel readout circuit performs a clock alignment. For example, each time the event pixel readout circuit receives a synchronization signal, it prints a timestamp, and the timestamp can be embedded in the event data. For example, Figure 8As shown, the synchronization signal of the Kth frame RGB image corresponds to timestamp 1. Thus, the event data after timestamp 1 is aligned with timestamp 1. The synchronization signal of the K+1th frame RGB image corresponds to timestamp 2. Thus, the event data after timestamp 2 is aligned with timestamp 2.
[0117] It should be noted that Figure 8 In the example, the synchronization module sends one synchronization signal for each RGB image frame. In other embodiments, the synchronization module can send two or more synchronization signals for each RGB image. In this way, the clock alignment can be performed twice or more for each RGB image frame to improve accuracy. Figure 8 In the embodiment, the synchronization module can send a synchronization signal when the exposure of the first row of pixels of the K-th frame RGB image ends, and send another synchronization signal when the exposure of the last row of pixels of the RGB image ends.
[0118] For example, in synchronous readout, when the brightness of an event pixel changes and exceeds a set threshold, an event signal is output. Address information is then added to the event signal, and the event data is read out in the form of event frames, resulting in a synchronized event frame data stream. Each event frame can share a timestamp. Unlike asynchronous readout, synchronous readout reads event data in the form of event frames, and each event frame can share a timestamp. In asynchronous readout, there is no event frame probability; each event signal corresponds to a timestamp. See [Note: The following sentences appear to be unrelated and should likely be omitted.] Figure 8 , is another schematic diagram of aligning RGB data with event data clock provided by an embodiment of the present application. Figure 8 Let’s continue to take the local exposure method for RGB images as an example. Figure 8 The synchronization module can generate two synchronization signals for each frame of RGB image. For example, Figure 8 In the example, for the K-th frame of RGB image, the synchronization module sends a synchronization signal at the start of exposure of the first row of RGB pixels and also sends a synchronization signal at the end of exposure of the last row of RGB pixels. The same principle applies to the K+1-th frame of RGB image. Each time the synchronization module outputs a synchronization signal, the synchronization signal is transmitted to the event pixel readout circuit to trigger the event pixel readout circuit to perform a clock alignment. For example, Figure 9In the example, the event pixel readout circuit prints a timestamp each time it receives a synchronization signal. Since each RGB image frame sends two synchronization signals, each RGB image frame corresponds to two timestamps. The two synchronization signals of the K-th RGB image frame correspond to timestamp 1 and timestamp 2, respectively. In other words, the event data in the K-th event frame shares timestamp 1. The event data between the K-th event frame and the K+1-th event frame shares timestamp 2. Similarly, the two synchronization signals of the K+1-th RGB image frame correspond to timestamp 3 and timestamp 4, respectively. Therefore, the event data in the K+1-th event frame shares timestamp 3. The event data between the K+1-th event frame and the K+2-th event frame shares timestamp 4.
[0119] 2. ROI Mapping
[0120] ROI mapping can be understood as mapping the position information of event data in a first coordinate system to the position of RGB data in a second coordinate system. The first coordinate system is the event camera coordinate system, and the second coordinate system is the RGB camera coordinate system. If the event camera and RGB camera components are integrated into a hybrid sensor, the position information of the event data in the first coordinate system will be mapped to the same position in the second coordinate system. For example, if the event data is (x1, y1, p1, t1), the position mapped to the second coordinate system is (x1, y1). This is because the event camera and RGB camera components of the hybrid sensor see the same position for the same moving target, so the coordinate position of the event data does not require correction and can be directly mapped to the same position on the RGB image. If the event camera and RGB camera components are separate, the event data coordinates will see different positions for the same moving target, so the position of the event data needs to be corrected and mapped to the corresponding position on the RGB image. Continuing with the example of event data (x1, y1, p1, t1), the corrected position is (x1 , , y1 , , p1, t1), the corrected position is mapped to (x1 in the second coordinate system , , y1 , Optionally, the position of the event data may be corrected based on the calibration results of the RGB camera coordinate system and the event camera coordinate system. The calibration process may be performed before the hybrid sensor module leaves the factory, or before the electronic device leaves the factory. Various calibration methods are possible, such as dual-target calibration, which is not limited in the present embodiment.
[0121] For example, see Figure 9When the RGB data and event data clocks are synchronized, the processing unit can guide the OIS module to recommend movement of the lens group based on the event data during the exposure period of the Kth RGB image frame (T1-T2), so that the motion blur of the ROI on the Kth RGB image frame is reduced. Similarly, the processing unit can also guide the OIS module to recommend movement of the lens group based on the event data during the exposure period of the K+1th frame (T3-T4), so that the motion blur of the ROI on the K+1th RGB image frame is reduced. Optionally, during the exposure interval between the Kth and K+1th frames (T2-T3), the lens group may or may not move. If it moves, it can move in accordance with the event data during the exposure interval between the two frames (T2-T3).
[0122] For ease of understanding, the following description will be made by taking the lens movement during the exposure period of the K+1th frame of RGB image as an example.
[0123] like Figure 9 As shown, starting from the exposure start time of the first line of the K+1 frame (i.e., T3), the processing unit starts to guide the OIS module to push the lens group to move according to the event data. For example, the event data corresponding to the exposure start time of the first line (i.e., T3) is event data 1. The processing unit can guide the OIS module to push the lens according to event data 1. Since event data 1 is represented in the event camera coordinate system, event data 1 can be mapped to the RGB camera coordinate system. For example, Figure 9 In , event data 1 is mapped to the position (x2, y2) in the RGB camera coordinate system.
[0124] Assume that the event data corresponding to the exposure end time (i.e. T2) of the last line of the Kth frame is event data 2, such as Figure 9 , event data 2 is mapped to the position (x1, y1) in the RGB camera coordinate system.
[0125] Therefore, during the exposure interval between two frames (T2-T3), the displacement of the ROI on the RGB image is (dx, dy), where dx = x2-x1 and dy = y2-y1. The velocity of the ROI is (dx / dT, dy / dT), where dT = T2-T1.
[0126] The processing unit can instruct the OIS module to move the lens assembly based on the displacement and speed of the ROI on the RGB image. For example, the processing unit can send the displacement and speed of the ROI to the OIS module. The OIS module then moves the lens assembly based on the displacement and speed of the ROI.
[0127] For ease of explanation, the displacement of the ROI on the RGB image, i.e., (dx, dy), is referred to as the first displacement. The OIS module can determine the second displacement of the lens assembly based on the first displacement and the first correspondence relationship. The first correspondence relationship describes the correspondence between the displacement of the ROI on the RGB image and the displacement of the lens assembly. For example, the first correspondence relationship can be configured when the hybrid sensor module or electronic device leaves the factory.
[0128] For ease of explanation, the velocity of the ROI on the RGB image (dx / dT, dy / dT) is referred to as the first velocity. The OIS module can determine the second velocity of the lens assembly based on the first velocity and the second correspondence. The second correspondence describes the correspondence between the velocity of the ROI on the RGB image and the velocity of the lens assembly. For example, the second correspondence can be configured when the hybrid sensor module or electronic device leaves the factory.
[0129] After the OIS module determines the second displacement and the second speed of the lens group, it can control the OIS motor so that the OIS motor pushes the lens group to perform the second displacement at the second speed. Optionally, before the OIS module controls the OIS motor, it can first determine the code value of the OIS motor corresponding to the second displacement based on the second displacement of the lens group and the third corresponding relationship. A code value corresponds to a current value, and the magnitude of the current value affects the displacement of the lens group driven by the OIS motor. The third corresponding relationship is used to describe the correspondence between the displacement of the lens group and the code value of the OIS motor. Exemplarily, the third corresponding relationship can be configured when the Hybridsensor module leaves the factory or when the electronic device leaves the factory. After the OIS module determines the code value of the OIS motor, it controls the OIS motor to operate based on the determined code value so that the OIS motor pushes the lens group to perform the second displacement.
[0130] In the above embodiment, the processing unit drives the lens movement based on event data 1 at the exposure start time of the first line of the K+1 frame (i.e., time T3). During the entire exposure period of the K+1 frame, the processing unit can drive the lens movement based on the event data in real time, and the principle is the same. Continuing with time T5 after T3 as an example, the event data corresponding to time T5 is event data 3. At time T5, the processing unit can drive the lens movement based on event data 3. For example, the processing unit maps event data 3 to the RGB camera coordinate system to obtain a position, and maps event data 1 at the previous moment to the RGB camera coordinate system to obtain a position. These two positions can be used to determine the displacement and velocity of the ROI on the RGB image. The lens group is then driven based on this displacement and velocity, and so on, until the exposure of the last line of the K+1 frame ends at time T4.
[0131] It should be noted that Figure 9 The K+1th frame is taken as an example for description, and the same principle applies to other frames.
[0132] Through the above embodiment, the OIS module can control the lens group to move in accordance with the target movement. During the process of the lens group moving in accordance with the target movement, when light passes through the lens group to the hybrid sensor, the traditional camera part of the hybrid sensor outputs RGB data. The RGB data is processed by the ISP in the main chip to obtain an RGB image. The degree of motion blur in this RGB image is low. For example, the clarity of the ROI (such as a moving vehicle, a walking pedestrian, or a flying bird) in the RGB image is high. For example, see Figure 10 , which is a schematic diagram of an image captured using the above-mentioned shooting method. Taking a moving vehicle as an example, since the lens system follows the vehicle in real time, the vehicle is sharp in the image and the background is blurred, reflecting a sense of motion and achieving a good film quality.
[0133] In other embodiments, considering that the posture of the electronic device (especially a handheld electronic device) may change (for example, shake) during the image capture process, the OIS module can also push the lens group to move according to the posture change of the electronic device. For example, the OIS module can obtain the posture change information of the electronic device, and according to the posture change information of the electronic device, push the lens group to move to compensate for the posture change of the electronic device. For example, the posture change information can be obtained by a motion sensor in the electronic device, and the motion sensor can be a gyroscope, an acceleration sensor, etc., which is not limited in the embodiments of the present application.
[0134] Therefore, in the embodiment of the present application, the OIS module can drive the lens group to move according to event data, or it can drive the lens group to move according to the posture change information of the electronic device. The order of the two is not limited in the embodiment of the present application.
[0135] In the above embodiment, after the electronic device incorporates an event camera, the event data output by the event camera can be used to guide the movement of the RGB camera's lens group, thereby ensuring a clearer image of moving objects in the RGB image output by the RGB camera. This shooting mode is referred to as the first shooting mode (also known as panning mode or snapshot mode). The electronic device can enter the first shooting mode in the following manner.
[0136] In the first manner, the electronic device may enter the first shooting mode according to a manual operation of the user.
[0137] For example, see Figure 11(a) is a schematic diagram of a shooting interface of an electronic device, which includes a button 1101 for indicating a panning mode. When the electronic device receives an operation on the button 1101, it enters the first shooting mode.
[0138] For another example, see Figure 11 (a) is a schematic diagram of the shooting interface of the electronic device, which includes a "more" button. When the electronic device receives an operation for the "more" button, it displays the following Figure 11 The interface shown in (b) includes a button 1102 for indicating the panning mode. When the electronic device receives an operation on the button 1102, it enters the first shooting mode.
[0139] In the second manner, the electronic device may automatically enter the first shooting mode.
[0140] For example, the electronic device can determine whether the current shooting scene is a preset scene. If so, it automatically enters the first shooting mode. The preset scenes may include shooting scenes that use the panning mode (i.e., the first shooting mode) more frequently. For example, the electronic device frequently uses the panning mode when shooting scenes such as a basketball court, a stage, and a highway. These shooting scenes are preset scenes. Exemplarily, the electronic device can store a list that includes identifiers of each preset scene. The identifiers can be keywords used to describe the preset scenes, such as basketball court, stage, and high speed. The electronic device can identify the current shooting scene through image semantic recognition and obtain a recognition result. The recognition result can include keywords used to describe the current shooting scene. The electronic device determines whether the current shooting scene exists in the list based on the recognition result. If so, it determines that the current shooting scene is a preset scene. Otherwise, it determines that the current shooting scene is not a preset scene. Optionally, the list can be a system default (e.g., configured at the factory), or set by the user, or self-learned by the electronic device, which is not limited in the embodiments of the present application.
[0141] For another example, the electronic device can also determine whether there is a moving target in the current shooting picture, and if so, automatically enter the first shooting mode. For example, see 12, which is a flow chart of an image shooting method provided in an embodiment of the present application. Figure 12 As shown, the process includes:
[0142] S1201: Display a camera preview interface, which includes a preview image. The preview image may be an RGB image stream output by an RGB image.
[0143] S1202: The current shooting mode is a second shooting mode. The second shooting mode is a shooting mode other than the first shooting mode.
[0144] S1203: Determine whether there is a moving target in the preview image. If there is no moving target, execute S1202. If there is a moving target, execute S1204 or S1205.
[0145] The electronic device can determine whether there are moving targets and the number of moving targets in the preview image through the event data output by the event camera and / or the RGB data output by the RGB camera. For the specific implementation process, please refer to the previous description and will not be repeated here.
[0146] S1204: If there is a moving target in the preview image and the number of the moving targets is 1, determine whether the moving target meets the first condition. If yes, execute S1206; otherwise, execute S1202.
[0147] Optionally, the first condition may include at least one of: an area of the moving target in the preview image is larger than a preset area, the moving target is centered in the preview image, and a moving speed of the moving target is greater than a preset speed.
[0148] S1205: If there are moving targets in the preview image and the number of moving targets is greater than 1, determine whether the moving targets meet the second condition. If yes, execute S1206; otherwise, execute S1202.
[0149] Optionally, the second condition may include: the area of the multiple moving targets in the preview image is larger than a preset area, the positions of the multiple moving targets in the preview image are relatively centered, the moving speeds of the multiple moving targets are greater than a preset speed, and the moving directions of the multiple moving targets are the same.
[0150] S1206, entering the first shooting mode.
[0151] After the electronic device enters the first shooting mode, it can use the image shooting method provided in the above embodiment to shoot, that is, use the event data output by the event camera part to guide the movement of the lens group so that the motion blur of the moving target in the image output by the RGB camera part is lower.
[0152] S1207: Detect that the user clicks the capture button.
[0153] S1208, capture an image.
[0154] Figure 12 In the embodiment shown, the electronic device can enter the first shooting mode when in the preview interface, so that the preview image seen by the user is an image of the moving target with high definition, which provides a better experience.
[0155] Optional, Figure 12In the process shown, S1204 and S1205 may not be executed, that is, after S1203, S1206 may be executed directly. Figure 12 S1204 and S1205 are indicated by dashed lines. Alternatively, only S1204 may be executed without S1205. For example, if the preview image includes a moving target, if there is only one moving target, the moving target is determined to be the moving subject. If there are multiple moving targets, the moving subject is determined from the multiple moving targets, and then it is determined whether the moving subject meets the first condition (i.e., S1204). If so, S1206 is executed.
[0156] Optional, Figure 12 In the illustrated process, step S1207 can be executed in advance, for example, before step S1203 or before step S1206. Taking the example of step S1207 being executed before step S1203, the electronic device does not need to use the first shooting mode when previewing the interface. After detecting that the user has clicked the capture button, if it determines that there is a moving object in the preview image, the electronic device can use the first shooting mode to capture the image.
[0157] In the above, the electronic device may automatically enter the first shooting mode. In some embodiments, before the electronic device automatically enters the first shooting mode, it may first enable the function of automatically entering the first shooting mode.
[0158] For example, see Figure 13A (a), the shooting interface includes an AI shooting button 1301. When the electronic device receives an operation on the button 1301, the button 1301 is in a selected state, and at this time, the function of automatically entering the first shooting mode is turned on, such as Figure 13A (b), the electronic device may output a prompt message: the automatic panning mode is turned on.
[0159] For another example, see Figure 13B (a), the shooting interface includes a setting button. When the electronic device receives an operation for the setting button, it displays the following Figure 13B The setting interface shown in (b) includes an option to automatically enter the panning mode, through which the function of automatically entering the first shooting mode can be activated.
[0160] In the above embodiments, the event camera part and the traditional camera part of the electronic device are taken as an example of an integrated design (for example, a hybrid sensor). In other embodiments, the event camera part and the traditional camera part can also be a separate design (or called an independent design). For example, see Figure 14 , is another structural diagram of an electronic device provided in one embodiment of the present application. Figure 14The electronic device includes two cameras, camera 1410 and camera 1420. Camera 1410 includes a conventional camera portion, for example, the image sensor in camera 1410 includes an RGB pixel array. Camera 1420 includes an event camera portion, for example, the image sensor in camera 1420 includes an event pixel array. The two cameras each correspond to a lens group.
[0161] It should be noted that the camera 1410 includes an OIS module ( Figure 14 (not shown), it is possible to control the movement of the lens group of the camera 1410. The camera 1420 may or may not include an OIS module, which is not limited in the embodiment of the present application.
[0162] In the embodiment of the present application, the electronic device may further include a processing unit ( Figure 14 (not shown). The processing unit is connected to camera 1420 and can obtain event data output by camera 1420. The processing unit is also connected to camera 1410 and can instruct the OIS module in camera 1410 to move the lens based on the event data output by camera 1420. The process by which the processing unit instructs the OIS module to move the lens based on the event data is described above and will not be repeated here.
[0163] Figure 14 In the embodiment, camera 1410 and camera 1420 may both be rear cameras, or both be front cameras. The shooting ranges of camera 1410 and camera 1420 overlap, for example, the openings of camera 1410 and camera 1420 are relatively close. If there is a moving target within the overlapping shooting range, camera 1420 may output event data describing the motion state (e.g., speed, displacement, etc.) of the moving target. The event data may be used to guide the OIS module in camera 1410 to move the lens so that the motion blur of the moving target in the RGB image output by camera 1410 is lower.
[0164] Optional, Figure 14 In the example above, an electronic device includes two cameras. In actual production, the electronic device may include a larger number of cameras, which is not limited in the embodiments of the present application.
[0165] See Figure 15 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may be the electronic device mentioned above, for example Figure 2 or Figure 14 The mobile phone shown. Figure 15As shown, the electronic device 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.
[0166] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the electronic device. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces the processor 110's waiting time, and thus improves system efficiency.
[0167] In some embodiments, the processor 110 may execute the image capture method provided in the embodiments of the present application. For example, the processor 110 may adjust the position of the lens group of the RGB camera portion based on the event data output by the event camera portion so that the degree of motion blur of the moving object in the RGB image output by the RGB camera portion is lower than a threshold.
[0168] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include 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 subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0169] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0170] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.
[0171] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0172] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.
[0173] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0174] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0175] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.
[0176] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0177] The wireless communication function of the electronic device can be implemented using antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antenna can be used in conjunction with a tuning switch.
[0178] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied in electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0179] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0180] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that the electronic device can communicate with the network and other devices through wireless communication technology.
[0181] The display screen 194 is used to display the display interface of the application, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0182] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor, etc. Among them, the ISP is used to process the data fed back by the camera 193.
[0183] In some embodiments, the camera 193 may include one or more cameras. For example, Figure 2 The camera shown in the figure includes a hybrid image sensor, and the hybrid image sensor includes an event camera part and a traditional camera part (for example, an RGB camera part). Moreover, the camera 193 also includes an OIS module and a lens group (which can be a shared lens group), and the OIS module can push the lens group to move its position. The electronic device 100 includes a processing unit (for example, a processor 110), and the processing unit can guide the OIS module to push the lens group to move its position based on the event data output by the event camera part. Take the example of a camera 193 including two cameras, for example Figure 14Two cameras are shown. One camera includes an event camera portion, and the other camera includes an RGB camera portion. Each camera corresponds to a lens group. A processing unit (e.g., processor 110) in electronic device 100 can direct the lens group corresponding to the RGB camera portion to move position based on event data output by the event camera portion, so that the degree of motion blur of moving objects in the RGB image output by the RGB camera portion is reduced.
[0184] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and the software code of at least one application, etc. The data storage area can store data (such as images, videos, etc.) generated during the use of the electronic device. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory, etc.
[0185] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as pictures and videos can be stored on the external memory card.
[0186] The electronic device can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0187] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0188] The speaker 170A, also called a "speaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to external speaker scenarios such as hands-free calls through one or more speakers 170A.
[0189] The receiver 170B, also called "earpiece", can be one or more and is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be heard by placing the receiver 170B close to the human ear.
[0190] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0191] The headphone jack 170D is used to connect a wired headphone.
[0192] The pressure sensor 180A is used to sense pressure signals and convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .
[0193] The gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the gyro sensor 180B can be used to determine the angular velocity of the electronic device around three axes (i.e., the x, y, and z axes). The gyro sensor 180B can also be used for anti-shake photography.
[0194] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
[0195] The magnetic sensor 180D includes a Hall sensor, and the electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip cover.
[0196] The acceleration sensor 180E can detect the magnitude of the electronic device's acceleration in various directions (generally three axes) and the magnitude and direction of gravity when the electronic device is stationary.
[0197] The distance sensor 180F is used to measure distance. The electronic device can measure distance using infrared or laser.
[0198] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light through the light emitting diode. The electronic device uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.
[0199] The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness.
[0200] The fingerprint sensor 180H is used to collect fingerprints.
[0201] The temperature sensor 180J is used to detect temperature.
[0202] The touch sensor 180K, also known as a "touch panel," can be mounted on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event.
[0203] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone mass in a human vocal part.
[0204] The buttons 190 include a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device can receive button input and generate key signal input related to the user settings and function control of the electronic device. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the electronic device by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195.
[0205] It is understandable that Figure 15 The components shown do not constitute a specific limitation on the electronic device. The electronic device in the embodiment of the present invention may include Figure 15 More or fewer components. In addition, Figure 15 The combination / connection relationship between the components can also be adjusted and modified.
[0206] Figure 16 The electronic device 1600 is a schematic diagram of the structure of the electronic device 1600 provided in the embodiment of the present application. The electronic device 1600 may be the electronic device mentioned above (for example, Figure 2 or Figure 14 as shown). Figure 16As shown, the electronic device 1600 may include: one or more processors 1601; one or more memories 1602; a communication interface 1603, and one or more computer programs 1604. The above components may be connected via one or more communication buses 1605. The one or more computer programs 1604 are stored in the above memory 1602 and configured to be executed by the one or more processors 1601. The one or more computer programs 1604 include instructions. For example, when the electronic device 1600 is the electronic device mentioned above, the instructions may be used to execute the above corresponding Figures 1 to 14 The communication interface 1603 is used to implement communication between the electronic device 1600 and other devices. For example, the communication interface can be a transceiver.
[0207] In the embodiments provided in the present application above, the method provided in the embodiment of the present application is introduced from the perspective of an electronic device (e.g., a mobile phone) as an execution subject. In order to implement the various functions in the method provided in the embodiment of the present application above, the electronic device may include a hardware structure and / or a software module to implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
[0208] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)). In the absence of conflict, the solutions of the above embodiments can be used in combination.
[0209] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0210] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0211] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0212] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0213] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.
Claims
1. An image capturing method, characterized in that: Applied to an electronic device, the electronic device includes a visible light pixel array and an event pixel array, the visible light pixel array corresponds to a first lens group, and the method includes: outputting event data via the event pixel array; According to the event data, the first lens group is driven to move to achieve optical image stabilization.
2. The method according to claim 1, characterized in that The electronic device includes a first camera and a second camera, the visible light pixel array is located in the first camera, the event pixel array is located in the second camera, and the shooting ranges of the first camera and the second camera overlap.
3. The method according to claim 1, characterized in that The electronic device includes a third camera, the third camera includes a hybrid image sensor, and the hybrid image sensor includes the visible light pixel array and the event pixel array.
4. The method according to any one of claims 1 to 3, characterized in that Driving the first lens group to move according to the event data includes: Mapping event data at a first moment from a first position in a first coordinate system to a second position in a second coordinate system; Mapping event data at a second moment from a third position in a first coordinate system to a fourth position in a second coordinate system, where the first coordinate system is a coordinate system of the event pixel array, the second coordinate system is a coordinate system of the visible light pixel array, the second moment and the first moment are both within an exposure period of the visible light image, and the second moment is after the first moment; The position of the first lens group is adjusted according to a first displacement and / or a first speed between the second position and the fourth position, wherein the first speed is determined according to the first displacement and a time difference between the first moment and the second moment.
5. The method according to claim 4, characterized in that Mapping event data at a first moment from a first position in a first coordinate system to a second position in a second coordinate system includes: Mapping event data at a first moment from a first position in a first coordinate system to a second position in a second coordinate system according to a calibration result of the visible light pixel array and the event pixel array; Mapping the event data at the second moment from the third position of the first coordinate system to the fourth position of the second coordinate system includes: According to the calibration result of the visible light pixel array and the event pixel array, the event data at the second moment is mapped from the third position of the first coordinate system to the fourth position of the second coordinate system.
6. The method according to claim 4, characterized in that Adjusting the position of the first lens group according to a first displacement between the second position and the fourth position includes: determining a second displacement of the first lens group according to the first displacement and a first corresponding relationship, wherein the first corresponding relationship is used to describe a relationship between the displacement of the moving object on the optical image and the displacement of the first lens group; The position of the first lens group is adjusted according to the second displacement.
7. The method according to claim 4, characterized in that Adjusting the position of the first lens group according to a first speed between the second position and the fourth position includes: determining a second speed of the first lens group according to the first speed and a second corresponding relationship, wherein the second corresponding relationship is used to describe a relationship between a speed of the moving object on the optical image and a speed of the first lens group; According to the second speed, the position of the first lens group is adjusted.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: When it is determined that the posture of the electronic device has changed, the position of the first lens group is adjusted according to the posture change information of the electronic device.
9. The method according to any one of claims 1 to 8, characterized in that Before driving the first lens group to move according to the event data, the method further includes: determining whether at least one of the following conditions is satisfied: The current shooting scene is a preset shooting scene; or, There is a moving target in the current shooting scene and the moving target meets the preset conditions; or, The current shooting mode is the first shooting mode, which is a mode for shooting a moving target using the event pixel array.
10. The method according to claim 9, characterized in that When there is only one moving target, the moving target satisfies at least one of the following conditions: the position of the moving target in the visible light image is within a preset range, the speed of the moving target is greater than a preset speed, and the area occupied by the moving target in the visible light image is greater than a preset area; When there are multiple moving targets, the moving targets satisfy at least one of the following conditions: the moving directions of the multiple moving targets are consistent, the positions of the multiple moving targets in the visible light image are all within the preset positions, the speeds of the multiple moving targets are all greater than the preset speed, and the areas occupied by the multiple moving targets in the visible light image are all greater than the preset area.
11. The method according to any one of claims 1 to 10, characterized in that Before driving the first lens group to move according to the event data, the method further includes: When it is determined that the condition is met, the electronic device enters a first shooting mode, where the first shooting mode is a mode for shooting images using the event pixel array.
12. The method according to any one of claims 1 to 11, characterized in that The method further comprises: storing at least one of the first image, the second image, and the third image; The first image includes the visible light image; The second image includes an image obtained based on event data output by the event pixel array; The third image includes a fused image of the first image and the second image.
13. The method according to any one of claims 1 to 12, characterized in that The electronic device includes a synchronization module. Before driving the first lens group to move according to the event data, the method further includes: During the exposure period of the first lens group, the synchronization module outputs at least one synchronization signal; The event data is time-aligned with a visible light image output by the visible light pixel array according to the at least one synchronization signal.
14. The method according to claim 13, characterized in that Time-aligning the event data with a visible light image output by the visible light pixel array according to the at least one synchronization signal comprises: printing a timestamp according to the at least one synchronization signal, wherein the timestamp is used to be embedded in the event data; The event data is time-aligned with the visible light image according to the timestamp in the event data.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 14 is implemented.
16. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.
17. A computer program product, characterized in that The computer program product comprises a computer program, which enables the computer to perform the method according to any one of claims 1 to 14 when the computer program is run on a computer.