Shooting method, device, electronic device and storage medium
By adjusting the position of the lens module in multi-frame shooting mode, the problem of poor image quality and object tailing caused by equipment jitter during shooting is solved, achieving better anti-shake effect and image quality.
Patent Information
- Application Number
- CN202211034905.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-08-26
AI Technical Summary
During the shooting process, due to the movement of the photographed object or the shaking of the handheld device, the lens module loses its anti-shake function after reaching the anti-shake stroke boundary, resulting in poor image quality and object tailing.
In the multi-frame shooting mode, after completing the exposure of the Nth frame image, obtain the exposure time and vertical synchronization signal time of the (N+A)th frame image, and control the lens mode when the (N+A)th frame image begins to expose. The group performs a return-to-center action and adjusts its position to ensure that the lens module always has a large anti-shake stroke.
It effectively avoids the problem of the lens module moving to the edge of travel due to equipment shaking, improves the anti-shake effect, reduces object tailing, and improves image quality.
Smart Images

Figure CN115361502B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of photographing technology, and specifically relates to a photographing method, device, electronic device and storage medium. Background Art
[0002] With the development of imaging technology, more and more users frequently use electronic devices with cameras to take photos or videos to record their lives.
[0003] When shooting, due to the movement of the object being shot or the inevitable shaking of the photographer holding the electronic device, the object trails, resulting in ghosting in the captured photos / videos, that is, the phenomenon of object trailing in the photos / videos.
[0004] Currently, if Figure 1 As shown, for the ordinary OIS function, after the lens module reaches the anti-shake travel limit in a certain direction ( Figure 1 The solid line in the figure represents the movement trajectory of the lens module, the dotted line represents the shaking trend, and the two dotted lines above and below represent the movement range of the lens module). If the next exposure still moves in this direction, there is no available space for anti-shake, and the anti-shake function is temporarily lost, the anti-shake effect is poor, and the image quality is poor. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a shooting method, device, electronic device and storage medium, which can solve the problem of poor image quality of some frames during the shooting process.
[0006] In a first aspect, an embodiment of the present application provides a shooting method, the method comprising:
[0007] In the multi-frame shooting mode, after the exposure of the Nth frame image is completed, the exposure time of the (N+A)th frame image is obtained, and the vertical synchronization signal time of the Nth frame image is obtained;
[0008] After the (N+A)th frame image starts to be exposed, controlling the lens module to perform a return-to-center action in a target time period;
[0009] Wherein, N is a positive integer; A represents pipeline delay; the target time period is determined based on rolling shutter time, shooting frame rate, exposure time of the (N+A)th frame image and vertical synchronization signal time of the Nth frame image; the return to center action refers to the action of moving the lens module to the first position; when the lens module is in the first position, the optical axis of the lens module coincides with the optical center of the image sensor.
[0010] In a second aspect, an embodiment of the present application provides a photographing device, the device comprising:
[0011] An acquisition module, used for acquiring the exposure time of the (N+A)th frame image after the exposure of the Nth frame image is completed in a multi-frame shooting mode, and acquiring the vertical synchronization signal time of the Nth frame image;
[0012] A control module, used for controlling the lens module to perform a centering action in a target time period after the (N+A)th frame image starts to be exposed;
[0013] Wherein, N is a positive integer; A represents pipeline delay; the target time period is determined based on rolling shutter time, shooting frame rate, exposure time of the (N+A)th frame image and vertical synchronization signal time of the Nth frame image; the return to center action refers to the action of moving the lens module to the first position; when the lens module is in the first position, the optical axis of the lens module coincides with the optical center of the image sensor.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0017] In an embodiment of the present application, after completing the exposure of the Nth frame image in the multi-frame shooting mode, the exposure time of the (N+A)th frame image is obtained, and the vertical synchronization signal time of the Nth frame image is obtained. After the (N+A)th frame image starts to be exposed, the lens module is controlled to perform a centering action in the target time period. It can be achieved that starting from the (A+1)th frame image, the time when the image sensor is not working during the shooting process of each frame image is used to perform a centering action of the lens module to adjust the position of the lens module and leave more anti-shake stroke, so that when shooting each frame image, the lens module always has a large anti-shake stroke, avoiding the problem of the lens module moving to the edge of the stroke and being restricted in movement due to shaking of the electronic device in the multi-frame shooting mode, so that the shooting device has a better anti-shake effect, can avoid or reduce the object tailing phenomenon, and thus can obtain each frame of the image with better image quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1It is a schematic diagram of the movement trajectory of the lens module in the common OIS function in the prior art;
[0019] Figure 2 is a flowchart of a shooting method provided in an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of the movement trajectory of the lens module in the shooting method provided in an embodiment of the present application;
[0021] Figure 4 It is a schematic diagram of the process of capturing images by the capturing method provided in an embodiment of the present application;
[0022] Figure 5 is a schematic diagram of the interaction process between the image sensor and the driving circuit of the OIS function in the shooting method provided in an embodiment of the present application;
[0023] Figure 6 It is a schematic diagram of the process of performing multi-frame shooting using the shooting method provided in an embodiment of the present application;
[0024] Figure 7 is a schematic diagram of the structure of a photographing device provided in an embodiment of the present application;
[0025] Figure 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0026] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0028] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0029] The following, in conjunction with the accompanying drawings, describes in detail the shooting method, device, electronic device and storage medium provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0030] Figure 2 The following is a flow chart of the shooting method provided in the embodiment of the present application. Figure 2 The shooting method provided by the embodiment of the present application is described. Figure 2 As shown, the method includes: step 201 and step 202.
[0031] Optionally, the execution subject of the shooting method provided in the embodiment of the present application may be a shooting device. The shooting device is an electronic device with a shooting function.
[0032] The shooting device can be implemented in various forms. For example, the shooting device described in the embodiments of the present application may include mobile terminals such as mobile phones, smart phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), navigation devices, smart bracelets, smart watches, digital cameras, etc., and fixed terminals such as desktop computers, televisions, etc. Below, it is assumed that the shooting device is a mobile terminal. However, it will be understood by those skilled in the art that the construction according to the embodiments of the present application can also be applied to fixed type terminals.
[0033] Exemplarily, the photographing device may be a digital camera, or a mobile phone, a smart watch, or a tablet computer with at least one camera.
[0034] The shooting device may include a lens module (Lens) and an image sensor (Sensor). When the lens module is in a first position, the optical axis of the lens module coincides with the optical center of the image sensor.
[0035] Step 201, in a multi-frame shooting mode, after the exposure of the Nth frame image is completed, the exposure time of the (N+A)th frame image is obtained, and the vertical synchronization signal time of the Nth frame image is obtained; wherein N is a positive integer; and A represents pipeline delay.
[0036] Optionally, the photographing device can provide the user with multiple photographing modes, for example, at least one of a panoramic mode, a beauty mode, a portrait mode, and a multi-frame photographing mode, etc. Similarly, in the embodiment of the present application, the camera application of the photographing device includes a multi-frame photographing mode.
[0037] The multi-frame shooting mode may be shooting multiple frames of images with different exposure parameters. The exposure parameter may be, for example, exposure time. That is, the multi-frame shooting mode may be shooting multiple frames of images continuously with different exposure times.
[0038] The multi-frame shooting mode can be an HDR (High-Dynamic Range) shooting mode, which specifically refers to shooting high-dynamic range images using high-dynamic range imaging technology. Compared with ordinary images, high-dynamic range images can provide more dynamic range and image details, and often reflect the brightness contrast of the real world better than low-dynamic range images, and are closer to the image effect seen by the human eye. Among them, HDR shooting modes include multi-frame HDR mode and Stagger HDR mode.
[0039] After the image sensor completes the exposure of the Nth frame image, the shooting device can obtain the exposure time N_A_exptime of the (N+A)th frame image based on any automatic exposure (AE) method. The embodiment of the present application does not specifically limit the specific automatic exposure method used.
[0040] Optionally, the automatic exposure module may perform light measurement, and based on the light measurement result and according to the automatic exposure method, acquire the exposure time N_A_exptime of the (N+A)th frame image.
[0041] The exposure time N_A_exptime of the (N+A)th frame image is the exposure time of the image sensor during the process of capturing the (N+A)th frame image.
[0042] The receiving time of the vertical synchronization (VSync) signal of the Nth frame image can be obtained as the vertical synchronization signal time V_nt of the Nth frame image. It can be understood that the vertical synchronization signal time of the Nth frame image obtained in step 201 is the actual value of the vertical synchronization signal time of the Nth frame image.
[0043] A represents pipeline delay, that is, the exposure setting of the Nth frame image corresponds to the electrical signal of the (N+A)th frame image output by the image sensor. A is a positive integer.
[0044] Optionally, in the embodiment of the present application, A can be 2 or 3, etc.
[0045] Step 202: after the (N+A)th frame image starts to be exposed, control the lens module to perform a re-centering action in a target time period; wherein the target time period is determined based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image; the re-centering action refers to the action of moving the lens module to the first position; when the lens module is in the first position, the optical axis of the lens module coincides with the optical center of the image sensor.
[0046] Optionally, the target time period is a time period during which the image sensor is not working after the (N+A)th frame image starts to be exposed and before the (N+A+1)th frame image starts to be exposed. Based on this, during the time period during which the image sensor is not working between shooting two frames of images, the lens module is controlled to perform a return-to-center action, which can ensure that the lens module has a larger anti-shake stroke, so as to avoid the problem that the lens module moves to the edge of the stroke and is restricted in movement due to shaking of the electronic device in the multi-frame shooting mode, thereby improving the anti-shake effect.
[0047] The VSync signal is a common signal for all image sensors. When the vertical synchronization signal of the (N+A)th frame image is received, the lens module can be controlled to perform a return-to-center action within a predetermined target time period, thereby facilitating preparation for the next anti-shake operation.
[0048] The VSync signal may be a hardware synchronization signal of a circuit linked to the hardware. Optionally, the VSync signal may be transmitted to a driver IC for implementing the OIS function through the image sensor.
[0049] Optionally, the target time period can be calculated based on a rolling shutter time N_rs, a shooting frame rate (Frame Per Second, FPS), an exposure time N_A_exptime of the (N+A)th frame image, and a vertical synchronization signal time V_nt of the Nth frame image.
[0050] Optionally, the rolling shutter time may be a preset value or may be obtained through an interface.
[0051] Optionally, the rolling shutter time N_rs of the channel can be obtained according to the matedata interface. For example, the specific code can be as follows:
[0052] / / / <Get rolling shutter skew aka sensor readout duration。
[0053] Optionally, the shooting frame rate may be a preset value or may be obtained through an interface.
[0054] Optionally, the shooting frame rate FPS in the current mode can be obtained according to the interface pData. For example, the specific code can be as follows:
[0055] pData=ChiNodeUtils::GetMetaData(0,(g_vendorTagId.targetFPSTagId|UsecaseMetadataSectionMask),ChiMetadataDynamic,&g_ChiNodeInterface,m_hChiSession).
[0056] Optionally, the exposure time N_exptime of the Nth frame image can be obtained according to the interface / / Sensor exposure time. For example, the specific code can be as follows:
[0057] N_exptime=ChiNodeUtils::GetMulticamDynamicMetaByCamId(frameNum,ExposureTimeTagId,ChiMetadataDynamic,&g_ChiNodeInterface,m_hChiSession,cameraId,typeId).
[0058] like Figure 3 As shown, based on the shooting method provided in the embodiment of the present application, an active O+E function is realized. After the OIS function moves the lens module, the lens is pulled back to the center position when the image sensor is not working, thereby ensuring that the OIS function is realized for each frame of the image, and the lens module has a return stroke.
[0059] The O+E function refers to the optical image stabilization (OIS) plus the electronic image stabilization (EIS) function.
[0060] Figure 3 The solid broken line in the figure represents the movement trajectory of the lens module, the dotted line represents the shaking trend, the upper and lower dotted lines represent the movement range of the lens module, and the middle dotted line represents the first position.
[0061] It is understandable that after the (N+A)th frame image is returned to the center, the OIS function still has a normal anti-shake stroke when the (N+A+1)th frame image is exposed. This ensures that the OIS function has a complete anti-shake stroke for each frame image, and that the OIS function has an anti-shake stroke regardless of the motion state. This ensures that motion blur can be optimized for each frame image, ensuring that the video has better performance in suppressing motion blur.
[0062] Optionally, Figure 4The process of capturing an image using the capturing method provided in the embodiment of the present application is shown. Figure 4 As shown, the signal collected by the image sensor (Senor) (which can be processed by the 3A algorithm) is then processed by the OIS module, IFE (Image Front End) module, EIS module and IPE (Image Processing Engine) module in sequence to obtain the preview result and the video.
[0063] The 3A algorithm includes AWB (Auto White Balance), AE algorithm and AF (Auto Focus) algorithm.
[0064] The OIS module can adopt the processing method provided in the embodiment of the present application. In the multi-frame shooting mode, after completing the exposure of the Nth frame image, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image are obtained; after the (N+A)th frame image starts to be exposed, the lens module is controlled to perform a return to center action in the target time period.
[0065] The EIS module can transmit O+E data based on the OIS module.
[0066] Alternatively, if Figure 5 As shown, the driver IC of the OIS function can synchronize the VSync signal of the image sensor (Senor) through the hardware connection line; the driver IC of the OIS function controls the movement of the lens module to perform the return action.
[0067] Figure 6 A process of performing actual multi-frame shooting based on the shooting method provided in an embodiment of the present application is shown. Figure 6 The following is a diagram showing the working sequence of the hardware abstraction layer (HAL), kernel, image sensor, and integrated circuit (OIS IC) for implementing the OIS function when A=2. Figure 6 As shown. Among them, req5, req6, ..., req11 represent the 5th request, the 6th request, ..., the 11th exposure request respectively; set represents setting; exposure represents exposure; frame represents frame; update exposure represents update exposure; SOF (Start Of Frame) represents frame start time; EOF (End Of Frame) represents frame start time; readout time represents readout time; Vblank time represents image sensor non-working time.
[0068] The embodiment of the present application obtains the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image after completing the exposure of the Nth frame image in the multi-frame shooting mode, and controls the lens module to perform a centering action in the target time period after the (N+A)th frame image starts to be exposed. It can be achieved that starting from the (A+1)th frame image, the lens module can perform a centering action by utilizing the time when the image sensor is not working during the shooting of each frame image to adjust the position of the lens module and leave more anti-shake stroke, so that when shooting each frame image, the lens module always has a large anti-shake stroke, avoiding the problem of the lens module moving to the edge of the stroke and being restricted in movement due to shaking of the electronic device in the multi-frame shooting mode, so that the shooting device has a better anti-shake effect, can avoid or reduce the object tailing phenomenon, and thus can obtain each frame image with better image quality.
[0069] Optionally, before controlling the lens module to perform the re-centering action in the target time period, it also includes: determining the target time period based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image.
[0070] Specifically, between step 101 and step 102, the target time period can be calculated based on the rolling shutter time N_rs, the shooting frame rate (Frame Per Second, FPS), the exposure time N_A_exptime of the (N+A)th frame image and the vertical synchronization signal time V_nt of the Nth frame image.
[0071] The embodiment of the present application determines the target time period based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image. It can start from the Ath frame image and use the time when the image sensor is not working during the shooting of each frame image to perform a centering action of the lens module to adjust the position of the lens module and leave more anti-shake stroke. When shooting each frame image, the lens module always has a large anti-shake stroke, avoiding the problem of the lens module moving to the edge of the stroke and being restricted in movement due to the shaking of the electronic device in the multi-frame shooting mode. The shooting device has a better anti-shake effect, can avoid or reduce the object tailing phenomenon, and can obtain each frame image with better image quality.
[0072] Optionally, based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image, the target time period is determined, including: determining the start time based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image.
[0073] Optionally, the frame interval time t_fps may be acquired based on a shooting frame rate FPS. The shooting frame rate FPS indicates the number of frames of an image shot per second.
[0074] Optionally, when seconds are selected as the unit of the frame interval time t_fps, the calculation formula of the frame interval time t_fps may be t_fps=1 / FPS.
[0075] Optionally, when milliseconds (ms) are selected as the unit of the frame interval time t_fps, the calculation formula of the frame interval time t_fps may be t_fps=1000 / FPS.
[0076] Optionally, the start time T_start of the target time period can be determined based on the rolling shutter time N_rs, the frame interval time t_fps, the exposure time N_A_exptime of the (N+A)th frame image, and the vertical synchronization signal time V_nt of the Nth frame image. The start time T_start of the target time period can be called the return start time of the (N+A)th frame image.
[0077] Optionally, a calculation formula for the start time T_start of the target time period may be T_start=V_nt+N_A_exptime+N_rs+(A-1)*t_fps.
[0078] The end time is determined based on the rolling shutter time, the shooting frame rate, and the vertical synchronization signal time of the Nth frame image.
[0079] Optionally, the end time T_end of the target time period can be determined based on the rolling shutter time N_rs, the frame interval time t_fps and the vertical synchronization signal time V_nt of the Nth frame image. The end time T_end of the target time period can be called the return end time of the (N+A)th frame image.
[0080] Optionally, the calculation formula for the end time T_end of the target time period may be T_end=V_nt+A*t_fps+N_rs.
[0081] Based on the start time and end time, determine the target time period.
[0082] Optionally, the target time period may be determined based on a start time T_start of the target time period and an end time T_end of the target time period. The target time period is a time period from the start time to the end time.
[0083] Optionally, the target time period is the image sensor non-working time Vblanktime corresponding to the (N+A)th frame image. The calculation formula of the VB_t duration of the target time period is VB_t=T_end-T_start.
[0084] The embodiment of the present application determines the start time of the target time period based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image, and determines the end time of the target time period based on the rolling shutter time, the shooting frame rate and the vertical synchronization signal time of the Nth frame image, thereby determining the target time period. Starting from the (A+1)th frame image, the lens module is returned to the center by utilizing the time when the image sensor is not working during the shooting process of each frame image, so as to adjust the position of the lens module and leave more anti-shake stroke. When shooting each frame image, the lens module always has a large anti-shake stroke, so as to avoid the problem that the lens module is restricted from moving to the edge of the stroke due to shaking of the electronic device in the multi-frame shooting mode, so that the shooting device has a better anti-shake effect, and can avoid or reduce the object tailing phenomenon, so as to obtain each frame image with better image quality.
[0085] Optionally, controlling the lens module to perform a return action in a target time period includes: obtaining a receiving time of a vertical synchronization signal of the (N+A)th frame image as an actual value of the vertical synchronization signal time of the (N+A)th frame image.
[0086] Optionally, the receiving time of the vertical synchronization signal of the (N+A)th frame image refers to the actual time of receiving the vertical synchronization signal of the (N+A)th frame image.
[0087] The actual time of receiving the vertical synchronization signal of the (N+A)th frame image can be recorded to obtain the receiving time of the vertical synchronization signal of the (N+A)th frame image; after obtaining the receiving time of the vertical synchronization signal of the (N+A)th frame image, the receiving time of the vertical synchronization signal of the (N+A)th frame image can be used as the actual value of the vertical synchronization signal time of the (N+A)th frame image.
[0088] Based on the actual value, the target time period is revised.
[0089] Optionally, determination of the start time T_start of the target time period and the end time T_end of the target time period is related to the theoretical value of the vertical synchronization signal time of the (N+A)th frame image. Therefore, based on the deviation between the actual value of the vertical synchronization signal time of the (N+A)th frame image and the theoretical value of the vertical synchronization signal time of the (N+A)th frame image, the start time T_start of the target time period and the end time T_end of the target time period can be corrected to obtain a corrected target time period.
[0090] It should be noted that, usually, the actual value of the vertical synchronization signal time of the (N+A)th frame image is the same as the theoretical value of the vertical synchronization signal time of the (N+A)th frame image.
[0091] Based on the deviation between the actual value of the vertical synchronization signal time of the (N+A)th frame image and the theoretical value of the vertical synchronization signal time of the (N+A)th frame image, the start time T_start of the target time period and the end time T_end of the target time period are corrected. The deviation can be used to compensate for the start time T_start of the target time period and the end time T_end of the target time period, thereby realizing the correction of the start time T_start of the target time period and the end time T_end of the target time period.
[0092] The lens module is controlled to perform a return-to-center action in the corrected target time period.
[0093] Optionally, the lens module may be controlled to perform a centering action in the corrected target time period to implement an active O+E function.
[0094] The embodiment of the present application corrects the target time period based on the actual value of the vertical synchronization signal time of the (N+A)th frame image, and controls the lens module to perform a return-to-center action in the corrected target time period, thereby leaving more anti-shake strokes. Therefore, when shooting each frame of the image, the lens module always has a larger anti-shake stroke, thereby avoiding the problem of the lens module being restricted in movement due to the shaking of the electronic device causing the lens module to move to the edge of the stroke in the multi-frame shooting mode. This enables the shooting device to have a better anti-shake effect, avoids or reduces the object tailing phenomenon, and thereby obtains each frame of the image with better image quality.
[0095] Optionally, before controlling the lens module to perform the re-centering action in the target time period, the method further includes: determining a theoretical value of the vertical synchronization signal time of the (N+A)th frame image based on the shooting frame rate and the vertical synchronization signal time of the Nth frame image.
[0096] Optionally, the theoretical value of the vertical synchronization signal time of the (N+A)th frame image may be calculated based on the vertical synchronization signal time V_nt of the Nth frame image.
[0097] The calculation formula of the theoretical value of the vertical synchronization signal time of the (N+A)th frame image is V_nat=V_nt+A*t_fps.
[0098] Exemplarily, when A=2, the theoretical value of the vertical synchronization signal time of the (N+2)th frame image is calculated as V_n2t=V_nt+2*t_fps. Correspondingly, the theoretical value of the vertical synchronization signal time of the (N+3)th frame image is calculated as V_n3t=V_nt+3*t_fps=V_n2t+t_fps.
[0099] The target time period is corrected based on the actual value, including: when a deviation between the actual value and the theoretical value is greater than a preset threshold, the target time period is corrected based on the actual value.
[0100] Optionally, it may be determined whether the deviation between the actual value and the theoretical value is greater than a preset threshold.
[0101] Optionally, when the deviation between the actual value and the theoretical value is greater than a preset threshold, the target time period can be corrected based on the actual value; when the deviation between the actual value and the theoretical value is less than or equal to the preset threshold, the target time period may not be corrected.
[0102] The preset threshold can be set according to actual conditions. The specific value of the preset threshold is not specifically limited in the embodiment of the present application.
[0103] Optionally, the preset threshold may be 0.
[0104] T_start=V_nt+N_A_exptime+N_rs+(A-1)*t_fps=V_nat-t_fps+N_A_exptime+N_rs.
[0105] T_end=V_nt+A*t_fps+N_rs=V_nat+N_rs.
[0106] The actual value of the vertical synchronization signal time of the (N+A)th frame image can be substituted into the above two formulas to correct the start time T_start of the target time period and the end time T_end of the target time period to obtain the corrected start time T_start of the target time period and the corrected end time T_end of the target time period.
[0107] Based on the revised start time T_start of the target time period and the revised end time T_end of the target time period, the target time period may be revised.
[0108] The embodiment of the present application determines the theoretical value of the vertical synchronization signal time of the (N+A)th frame image based on the shooting frame rate and the vertical synchronization signal time of the Nth frame image. When the deviation between the actual value and the theoretical value is greater than a preset threshold, the target time period is corrected based on the actual value to control the lens module to perform a return action in the corrected target time period, thereby leaving more anti-shake stroke, so that when shooting each frame of the image, the lens module always has a larger anti-shake stroke, avoiding the problem of the lens module moving to the edge of the stroke and being restricted in movement due to shaking of the electronic device in the multi-frame shooting mode, so that the shooting device has a better anti-shake effect, can avoid or reduce the object tailing phenomenon, and thus can obtain each frame of the image with better image quality.
[0109] The shooting method provided in the embodiment of the present application can be executed by a shooting device. In the embodiment of the present application, the shooting method is executed by a shooting device as an example to illustrate the shooting device provided in the embodiment of the present application.
[0110] Figure 7 is a schematic diagram of the structure of the photographing device provided in the embodiment of the present application. Figure 7 As shown, the device includes an acquisition module 701 and a control module 702, wherein:
[0111] The acquisition module 701 is used to acquire the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image after the exposure of the Nth frame image is completed in the multi-frame shooting mode;
[0112] The control module 702 is used to control the lens module to perform a return-to-center action in a target time period after the (N+A)th frame image starts to be exposed;
[0113] Wherein, N is a positive integer; A represents pipeline delay; the target time period is determined based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image; the return to center action refers to the action of moving the lens module to the first position; when the lens module is in the first position, the optical axis of the lens module coincides with the optical center of the image sensor.
[0114] Optionally, the acquisition module 701 and the control module 702 may be electrically connected.
[0115] After the image sensor completes the exposure of the Nth frame image, the acquisition module 701 may acquire the exposure time N_A_exptime of the (N+A)th frame image based on any automatic exposure (AE) method.
[0116] After the image sensor completes the exposure of the Nth frame image, the acquisition module 701 may also acquire the reception time of the vertical synchronization signal of the Nth frame image as the vertical synchronization signal time V_nt of the Nth frame image.
[0117] The control module 702 can control the lens module to perform a return-to-center action within a target time period, thereby ensuring that the lens module has a larger anti-shake stroke to avoid the problem of the lens module being restricted from moving to the edge of the stroke due to shaking of the electronic device in a multi-frame shooting mode, thereby improving the anti-shake effect.
[0118] Optionally, the photographing device may further include:
[0119] The first determination module is used to determine the target time period based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image.
[0120] Optionally, the first determination module can be specifically used to determine the start time based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image; determine the end time based on the rolling shutter time, the shooting frame rate and the vertical synchronization signal time of the Nth frame image; and determine the target time period based on the start time and the end time.
[0121] Optionally, the control module 702 may include:
[0122] An acquiring unit, used for acquiring a receiving time of a vertical synchronization signal of an (N+A)-th frame image as an actual value of a vertical synchronization signal time of an (N+A)-th frame image;
[0123] A correction unit, used for correcting the target time period based on the actual value;
[0124] The control unit is used to control the lens module to perform a centering action in the corrected target time period.
[0125] Optionally, the photographing device may further include:
[0126] A second determination module is used to determine a theoretical value of a vertical synchronization signal time of an (N+A)th frame image based on a shooting frame rate and a vertical synchronization signal time of an Nth frame image;
[0127] The correction unit may be specifically configured to correct the target time period based on the actual value when the deviation between the actual value and the theoretical value is greater than a preset threshold.
[0128] The embodiment of the present application obtains the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image after completing the exposure of the Nth frame image in the multi-frame shooting mode, and controls the lens module to perform a centering action in the target time period after the (N+A)th frame image starts to be exposed. It can be achieved that starting from the (A+1)th frame image, the lens module can perform a centering action by utilizing the time when the image sensor is not working during the shooting of each frame image to adjust the position of the lens module and leave more anti-shake stroke, so that when shooting each frame image, the lens module always has a large anti-shake stroke, avoiding the problem of the lens module moving to the edge of the stroke and being restricted in movement due to shaking of the electronic device in the multi-frame shooting mode, so that the shooting device has a better anti-shake effect, can avoid or reduce the object tailing phenomenon, and thus can obtain each frame image with better image quality.
[0129] The shooting device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.
[0130] The shooting device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0131] The photographing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0132] The shooting device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0133] The shooting device provided in the embodiment of the present application can achieve Figures 2 to 6 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0134] Alternatively, if Figure 8 As shown, an embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores programs or instructions that can be executed on the processor 801, and when the program or instructions are executed by the processor 801, the various steps of the above-mentioned shooting method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described again here.
[0135] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0136] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application.
[0137] The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.
[0138] Those skilled in the art will appreciate that the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0139] The processor 910 may be configured to obtain, in a multi-frame shooting mode, an exposure time of an (N+A)th frame image after completing exposure of an Nth frame image, and obtain a vertical synchronization signal time of the Nth frame image;
[0140] The processor 910 may also be used to control the lens module to perform a return-to-center action in a target time period after the (N+A)th frame image begins to be exposed;
[0141] Wherein, N is a positive integer; A represents pipeline delay; the target time period is determined based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image; the return to center action refers to the action of moving the lens module to the first position; when the lens module is in the first position, the optical axis of the lens module coincides with the optical center of the image sensor.
[0142] The embodiment of the present application obtains the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image after completing the exposure of the Nth frame image in the multi-frame shooting mode, and controls the lens module to perform a centering action in the target time period after the (N+A)th frame image starts to be exposed. It can be achieved that starting from the (A+1)th frame image, the lens module can perform a centering action by utilizing the time when the image sensor is not working during the shooting of each frame image to adjust the position of the lens module and leave more anti-shake stroke, so that when shooting each frame image, the lens module always has a large anti-shake stroke, avoiding the problem of the lens module moving to the edge of the stroke and being restricted in movement due to shaking of the electronic device in the multi-frame shooting mode, so that the shooting device has a better anti-shake effect, can avoid or reduce the object tailing phenomenon, and thus can obtain each frame image with better image quality.
[0143] Optionally, the processor 910 may also be configured to determine a target time period based on a rolling shutter time, a shooting frame rate, an exposure time of an (N+A)th frame image, and a vertical synchronization signal time of an Nth frame image.
[0144] Optionally, the processor 910 can also be specifically used to determine the start time based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image; determine the end time based on the rolling shutter time, the shooting frame rate and the vertical synchronization signal time of the Nth frame image; and determine the target time period based on the start time and the end time.
[0145] Optionally, the processor 910 can also be used to obtain the receiving time of the vertical synchronization signal of the (N+A)th frame image as the actual value of the vertical synchronization signal time of the (N+A)th frame image; based on the actual value, correct the target time period; and control the lens module to perform a return to center action in the corrected target time period.
[0146] Optionally, the processor 910 may also be configured to determine a theoretical value of a vertical synchronization signal time of an (N+A)th frame of image based on a shooting frame rate and a vertical synchronization signal time of an Nth frame of image;
[0147] The processor 910 may also be specifically configured to modify the target time period based on the actual value when the deviation between the actual value and the theoretical value is greater than a preset threshold.
[0148] It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0149] The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0150] The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.
[0151] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned shooting method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0152] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0153] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned shooting method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0154] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0155] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned shooting method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0156] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0158] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A shooting method, It is characterized in that include: In the multi-frame shooting mode, after the exposure of the Nth frame image is completed, the exposure time of the (N+A)th frame image is obtained, and the vertical synchronization signal time of the Nth frame image is obtained; After the (N+A)th frame image starts to be exposed, controlling the lens module to perform a return-to-center action in a target time period; Wherein, N is a positive integer; A represents pipeline delay, and the pipeline delay refers to the correspondence between the exposure setting of the Nth frame image and the electrical signal of the (N+A)th frame image output by the image sensor; the target time period is determined based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image; the return-to-center action refers to the action of the lens module moving to the first position; when the lens module is in the first position, the optical axis of the lens module coincides with the optical center of the image sensor; The target time period includes a start time and end time ; ; ; in, represents the vertical synchronization signal time, represents the exposure time of the (N+A)th frame image, represents the rolling shutter time, Indicates the frame interval time.
2. The photographing method according to claim 1, It is characterized in that Before the control lens module performs the return-to-center action in the target time period, the method further includes: The target time period is determined based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image, and the vertical synchronization signal time of the Nth frame image.
3. The shooting method according to any one of claims 1 to 2, It is characterized in that The controlling the lens module to perform a return-to-center action in a target time period includes: Acquire the reception time of the vertical synchronization signal of the (N+A)th frame image as the actual value of the vertical synchronization signal time of the (N+A)th frame image; Based on the actual value, modify the target time period; The lens module is controlled to perform a return-to-center action in the corrected target time period.
4. The photographing method according to claim 3, It is characterized in that Before the control lens module performs the return-to-center action in the target time period, the method further includes: Determine a theoretical value of the vertical synchronization signal time of the (N+A)th frame image based on the shooting frame rate and the vertical synchronization signal time of the Nth frame image; The modifying the target time period based on the actual value includes: When the deviation between the actual value and the theoretical value is greater than a preset threshold, the target time period is corrected based on the actual value.
5. A photographing device, It is characterized in that include: An acquisition module, used for acquiring the exposure time of the (N+A)th frame image after the exposure of the Nth frame image is completed in a multi-frame shooting mode, and acquiring the vertical synchronization signal time of the Nth frame image; A control module, used for controlling the lens module to perform a centering action in a target time period after the (N+A)th frame image starts to be exposed; Wherein, N is a positive integer; A represents pipeline delay, and the pipeline delay refers to the correspondence between the exposure setting of the Nth frame image and the electrical signal of the (N+A)th frame image output by the image sensor; the target time period is determined based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image and the vertical synchronization signal time of the Nth frame image; the return-to-center action refers to the action of the lens module moving to the first position; when the lens module is in the first position, the optical axis of the lens module coincides with the optical center of the image sensor; The target time period includes a start time and end time ; ; ; in, represents the vertical synchronization signal time, represents the exposure time of the (N+A)th frame image, represents the rolling shutter time, Indicates the frame interval time.
6. The photographing device according to claim 5, It is characterized in that Also includes: The first determining module is configured to determine the target time period based on the rolling shutter time, the shooting frame rate, the exposure time of the (N+A)th frame image, and the vertical synchronization signal time of the Nth frame image.
7. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the shooting method according to any one of claims 1 to 4 is implemented.
8. A readable storage medium, It is characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the shooting method according to any one of claims 1 to 4 is implemented.
