Photographing method and device, electronic equipment and storage medium

By resetting the lens to the initial position and performing optical image stabilization during the imaging period when the camera scene is a preset target in an electronic device, the problem of the inability to continue to perform optical image stabilization during shaking or moving of the device is solved, and imaging stability and clarity are improved.

CN119893293APending Publication Date: 2025-04-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311394651.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When existing electronic devices are jitter or motion amplitude greater than the maximum compensation angle designed, they cannot continue to perform optical anti-shake, resulting in poor imaging effects.

Method used

By determining the imaging period of the image frame when the photographing scene is taken as a preset target, and controlling the lens to reset to the preset initial position within the non-exposure time of the imaging period, optical image stabilization is achieved by controlling the movement of the lens at the preset initial position within the exposure time of the imaging period.

Benefits of technology

The imaging stability and image clarity in jitter or motion are improved, the suppression effect of optical anti-shake is enhanced, the resolution of the target image is improved, and the noise is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893293A_ABST
    Figure CN119893293A_ABST
Patent Text Reader

Abstract

The invention relates to a photographing method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a photographing request; determining a current photographing scene according to the photographing request; determining an imaging period of an image frame in response to the fact that the photographing scene is a preset target photographing scene; wherein the imaging period comprises exposure duration and non-exposure duration; controlling a lens to reset to a preset initial position within the non-exposure duration of the imaging period; and controlling the lens to perform exposure acquisition within the exposure duration of the imaging period to obtain a target image. Through the method, the success rate of enabling anti-shake exposure can be improved, and the imaging effect is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of imaging technology, and in particular to a photographing method and device, an electronic device, and a storage medium. Background Art

[0002] Currently, electronic devices such as mobile phones, cameras, tablets, and wearable devices are based on optical image stabilization (OIS) technology. When the built-in gyroscope of the electronic device senses vibration, the vibration signal is fed back to the OIS controller, which then drives the lens to move through a motor, thereby offsetting the image deviation caused by the shaking, so that the electronic device can still maintain stable imaging under shaking conditions; among them, the larger the optical image stabilization compensation angle that drives the lens to move, the stronger the imaging stability, and the corresponding better the motion blur suppression effect.

[0003] However, due to the limited hardware design space of electronic devices, the maximum compensation angle (such as 1.5 degrees) is limited. When the electronic device shakes or moves with an amplitude greater than the designed maximum compensation angle, the OIS compensation limit is reached, resulting in the inability to continue optical image stabilization and poor imaging effects. Summary of the invention

[0004] The present invention provides a photographing method and device, an electronic device, and a storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a photographing method, comprising:

[0006] Get photo request;

[0007] Determining a current photographing scene according to the photographing request;

[0008] In response to the photographing scene being a preset target photographing scene, determining an imaging period of an image frame; wherein the imaging period includes an exposure duration and a non-exposure duration;

[0009] Controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle;

[0010] The lens exposure acquisition is controlled within the exposure duration of the imaging cycle to obtain a target image.

[0011] In some embodiments, in response to the photographing scene being a preset target photographing scene, determining an imaging period of an image frame includes:

[0012] Acquiring exposure parameters of the lens; wherein the exposure parameters include the exposure duration and / or exposure delay;

[0013] In response to the photographing scene being the preset target photographing scene, determining a reset duration of the lens corresponding to the preset target photographing scene;

[0014] An imaging period of an image frame is determined based on the reset duration of the lens, the exposure duration and / or the exposure delay parameter.

[0015] In some embodiments, the exposure parameters include the exposure duration and the exposure delay; and determining the imaging period of the image frame based on the reset duration of the lens, the exposure duration and / or the exposure delay includes:

[0016] When the sum of the lens reset time, the exposure time and the exposure delay is greater than a preset imaging period, determining the sum as the imaging period of the image frame;

[0017] In a case where the sum value is less than or equal to the preset imaging period, the preset imaging period is determined as the imaging period of the image frame.

[0018] In some embodiments, the method further comprises:

[0019] In response to the photographing scene being the preset target photographing scene, determining a target image frame sequence number of a lens position to be reset;

[0020] The controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle includes:

[0021] The lens is controlled to reset to the preset initial position within the non-exposure duration of the imaging cycle to which the target image frame sequence number belongs.

[0022] In some embodiments, the preset target photographing scene includes a super-resolution photographing scene; and in response to the photographing scene being the preset target photographing scene, determining the target image frame sequence number of the lens position to be reset includes:

[0023] In response to the photographing scene being the super-resolution photographing scene, the image frame sequence numbers at intervals of a first preset number are used as the target image frame sequence numbers.

[0024] In some embodiments, in response to the photographing scene being the super-resolution photographing scene, taking the image frame sequence numbers of each interval of a first preset number as the target image frame sequence numbers includes:

[0025] In response to the photographing scene being the super-resolution photographing scene, an odd number or an even number among a second preset number of consecutive image frame numbers is used as the target image frame number.

[0026] In some embodiments, the target image frame sequence number includes a plurality of frames; and controlling the lens exposure acquisition within the exposure duration of the imaging cycle to obtain the target image includes:

[0027] When the photographing scene is the super-resolution photographing scene, controlling the lens to capture images within the exposure duration of the imaging cycle to which each target image frame number belongs, to obtain a plurality of images;

[0028] Based on the multiple images, determining a reference image frame;

[0029] An image other than the reference image frame among the multiple images is superimposed on the reference image frame to obtain a target image in the super-resolution photography scene.

[0030] In some embodiments, the preset target photographing scene includes a night scene; in response to the photographing scene being the preset target photographing scene, determining the target image frame sequence number of the lens position to be reset includes:

[0031] In response to the photographing scene being the night scene, an image frame sequence number greater than a third preset number is used as the target image frame sequence number.

[0032] In some embodiments, the method further comprises:

[0033] Using the first thread to issue a lens position reset instruction for the imaging cycle to which the target image frame number belongs, and using the second thread to issue a lens position maintenance instruction for the imaging cycle to which the image frame number other than the target image frame number belongs;

[0034] The controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle includes:

[0035] Based on the lens position reset instruction issued by the first thread, the lens is controlled to be reset to the preset initial position within the non-exposure duration of the imaging cycle.

[0036] In some embodiments, the method further comprises:

[0037] Obtaining data stream attributes of each image frame;

[0038] The using the first thread to issue the lens position reset instruction of the imaging period to which the target image frame sequence number belongs includes:

[0039] When the data stream attribute of the image frame corresponding to the target image frame serial number is a photographing data stream, the first thread is used to issue the lens position reset instruction of the imaging period to which the target image frame serial number belongs.

[0040] According to a second aspect of an embodiment of the present disclosure, there is provided a photographing device, including:

[0041] A first acquisition module is used to obtain a photo request;

[0042] A first determining module, used to determine a current photographing scene according to the photographing request;

[0043] A second determination module is used to determine an imaging period of an image frame in response to the photographing scene being a preset target photographing scene; wherein the imaging period includes an exposure duration and a non-exposure duration;

[0044] A reset module, used for controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle;

[0045] The photographing module is used to control the exposure acquisition of the lens within the exposure duration of the imaging cycle to obtain a target image.

[0046] In some embodiments, the second determination module is used to obtain exposure parameters of the lens; wherein the exposure parameters include the exposure duration and / or exposure delay; in response to the photographing scene being the preset target photographing scene, determining the reset duration of the lens corresponding to the preset target photographing scene; based on the reset duration of the lens, the exposure duration and the exposure delay, determining the imaging period of the image frame.

[0047] In some embodiments, the exposure parameters include the exposure duration and the exposure delay; the second determination module is used to determine the sum of the reset duration of the lens, the exposure duration and the exposure duration as the imaging period of the image frame when the sum is greater than a preset imaging period; and to determine the preset imaging period as the imaging period of the image frame when the sum is less than or equal to the preset imaging period.

[0048] In some embodiments, the apparatus further comprises:

[0049] A third determining module, configured to determine a target image frame sequence number for resetting the lens position in response to the photographing scene being the preset target photographing scene;

[0050] The reset module is used to control the lens to reset to the preset initial position within the non-exposure duration of the imaging cycle to which the target image frame sequence number belongs.

[0051] In some embodiments, the preset target photographing scene includes a super-resolution photographing scene; the third determination module is used to respond to the photographing scene being the super-resolution photographing scene and use the image frame number of each interval of a first preset number as the target image frame number.

[0052] In some embodiments, the third determination module is used to use an odd number or an even number among a second preset number of consecutive image frame numbers as the target image frame number in response to the photographing scene being the super-resolution photographing scene.

[0053] In some embodiments, the target image frame number includes multiple ones; the photographing module is used to control the lens to capture images within the exposure time of the imaging cycle to which each target image frame number belongs when the photographing scene is the super-resolution photographing scene, so as to obtain multiple images; based on the multiple images, a reference image frame is determined; and images other than the reference image frame in the multiple images are superimposed on the reference image frame to obtain the target image in the super-resolution photographing scene.

[0054] In some embodiments, the preset target photographing scene includes a night scene; and the third determining module is configured to, in response to the photographing scene being the night scene, use an image frame number greater than a third preset number as the target image frame number.

[0055] In some embodiments, the apparatus further comprises:

[0056] a sending module, configured to send a lens position reset instruction for an imaging cycle to which the target image frame sequence number belongs by using a first thread, and to send a lens position maintenance instruction for an imaging cycle to which an image frame sequence number other than the target image frame sequence number belongs by using a second thread;

[0057] The reset module is used to control the lens to reset to the preset initial position within the non-exposure time of the imaging cycle based on the lens position reset instruction issued by the first thread.

[0058] In some embodiments, the apparatus further comprises:

[0059] A second acquisition module is used to acquire data stream attributes of each image frame;

[0060] The sending module is used to use the first thread to send the lens position reset instruction of the imaging period to which the target image frame sequence number belongs when the data stream attribute of the image frame corresponding to the target image frame sequence number is a photographing data stream.

[0061] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0062] A processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method as described in the first aspect above.

[0063] According to a fourth aspect of an embodiment of the present disclosure, there is provided a storage medium, including:

[0064] When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as described in the first aspect above.

[0065] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0066] Since the photographing scene is a preset target photographing scene, such as a night scene photographing scene, where light and shadow smear is prone to occur, and motion blur is prone to occur in the photographing scene screen due to the movement of the subject or the movement of the photographing device, etc., there is a high possibility of suppressing image blur by controlling the movement of the lens based on technologies such as optical image stabilization within the exposure duration of the imaging cycle. Compared with the situation where the image blur suppression cannot be enabled because the lens cannot continue to move in the current imaging cycle after moving to the extreme displacement or extreme angle in the historical imaging cycle, the embodiment of the present disclosure resets the lens to the preset initial position within the non-exposure duration of the imaging cycle, so that the movement of the lens at the preset initial position can be controlled within the exposure duration of the imaging cycle, so that image blur suppression can be enabled for each exposed image frame, thereby improving the success rate of enabling image blur suppression, thereby improving the resolution of the target image and reducing noise.

[0067] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0069] Figure 1 This is an example of the imaging result after switching to the motion capture function in the related technology Figure 1 .

[0070] Figure 2 This is an example of the imaging result after switching to the motion capture function in the related technology Figure 2 .

[0071] Figure 3 An example of a photographing method process shown in the embodiment of the present disclosure Figure 1 .

[0072] Figure 4 An example diagram of an exposure timing sequence is shown in an embodiment of the present disclosure.

[0073] Figure 5 This is an example diagram of a lens position offset shown in an embodiment of the present disclosure.

[0074] Figure 6 This is an example diagram of image comparison taken in night scenes using the photographing method provided in an embodiment of the present disclosure.

[0075] Figure 7 This is an example diagram of image comparison taken when the subject is in motion provided by an embodiment of the present disclosure.

[0076] Figure 8 An example diagram for comparing images taken by a camera in motion is provided for the embodiment of the present disclosure.

[0077] Fig. 9 An example of a photographing method process shown in the embodiment of the present disclosure Figure 2 .

[0078] Fig.10 A diagram of a photographing device according to an embodiment of the present disclosure is shown.

[0079] Fig.11 The present invention is a block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0080] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0081] In the related art, during the process of electronic device taking photos, if a moving object is detected in the camera's sight or the electronic device is in a moving state, the scene detection mechanism will be triggered. When the camera scene is detected to be a multi-frame noise reduction (MFNR) camera scene or a super-resolution (SR) camera scene, the camera will switch to the motion capture function and use the motion capture algorithm to complete the photo processing. The motion capture algorithm may synthesize multiple exposed images to obtain the target image for taking photos, or use the highest definition image among multiple images as the target image for taking photos.

[0082] The specific implementation process of the above-mentioned related technical solutions is as follows: turn on the camera, detect the current photo scene according to user instructions or automatically, and send a photo request to the framework layer; wherein the photo request carries a photo scene identifier; after receiving the photo request, the framework layer generates exposure information according to the current photo scene identifier, wherein the photo scene identifier is such as super-resolution photo scene SR, multi-frame noise reduction photo scene MFNR, high dynamic range photo scene HDR, night scene, etc.; if the current photo focal length is above 1.4x, the SR scene is enabled by default. If a moving object is detected or the mobile phone is in motion while the SR scene is enabled, the motion capture scene is automatically jumped (the motion capture function is started) for imaging; in the motion capture scene, the motion capture algorithm is called to capture the moving subject, and image processing operations are performed on the subject to output a raw image; after the raw image is color-coded, the final image is output to the album for user viewing.

[0083] However, although the above method can effectively record the image of moving objects, it cannot enable multi-frame noise reduction algorithms or super-resolution algorithms, resulting in reduced image clarity and increased noise. In addition, if the subject is not moving but the electronic device is moving, serious smearing will occur during the process of shooting light objects, resulting in motion blur in the image.

[0084] like Figure 1 As shown, Figure 1 This is an example of the imaging result after switching to the motion capture function in the related technology Figure 1 ; Figure 2 This is an example of the imaging result after switching to the motion capture function in the related technology Figure 2 , Figure 2 L1 indicates the image after the camera is switched to the motion capture function during the motion of the camera, and L2 indicates the image after the camera is switched to the motion capture function during the stillness of the camera. Figure 1 As can be seen from Figure 2, the imaging process cannot accurately reduce noise due to switching to the motion capture function, and the resulting film has blurred shadows. Among them, the blur effect caused by the light source object during the photo shooting is the most serious, which greatly reduces the user experience and the effect of the film.

[0085] In this regard, the embodiment of the present disclosure provides an application photographing method, the execution subject of which may be a photographing device, such as a user equipment (UE), a mobile device, a user terminal, a mobile phone, a tablet computer, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the photographing method may be implemented by a processor in the photographing device calling a computer-readable instruction stored in a memory.

[0086] Figure 3 This is an example of a photographing method process shown in the embodiment of the present disclosure. Figure 1 ,Depend on Figure 3 It can be seen that the following steps are included:

[0087] S11, obtaining a photo taking request;

[0088] S12, determining a current photographing scene according to the photographing request;

[0089] S13, in response to the photographing scene being a preset target photographing scene, determining an imaging period of an image frame; wherein the imaging period includes an exposure time and a non-exposure time;

[0090] S14, controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle;

[0091] S15, controlling the lens exposure acquisition within the exposure duration of the imaging cycle to obtain a target image.

[0092] In step S11, the photographing device obtains a photographing request, such as obtaining a user operation instruction to take a photo based on a display component (such as a display screen) of the photographing device, or obtaining a user voice instruction to take a photo based on a sound receiving component of the photographing device, etc. The embodiments of the present disclosure are not limited to this.

[0093] The photo request in the disclosed embodiment is used to indicate triggering photo taking; in addition, the photo request may also carry a photo scene identifier. For example, based on a button component representing a photo scene displayed on a display screen, after a user clicks the button component, a photo request carrying the photo scene identifier corresponding to the button component is obtained; wherein the photo scenes include ordinary photo scenes, static photo scenes, super-resolution photo scenes (SR), multi-frame noise reduction photo scenes (MFNR), high dynamic range photo scenes (High Dynamic Range Imaging, HDR), night scene photo scenes (Super-Night, SN), etc.

[0094] Taking a smartphone as an example, when the camera device is opened, the camera application in the smartphone triggers a super-resolution photo scene or a night scene photo scene based on the user's use of the display screen, and the camera application sends a photo request carrying a photo scene identifier; wherein the identifier corresponding to the super-resolution photo scene is SR, and the identifier corresponding to the night scene photo scene is SN. The hardware description layer in the mobile phone creates a corresponding functional flow according to the photo request sent by the camera application, and updates the image quality adjustment parameter (tuning mode) value corresponding to the photo scene; wherein the image quality adjustment parameter includes the photo scene (feature2mode) value, for example, the feature2mode corresponding to the SR scene is 26, and the feature2mode value corresponding to the SN scene is 60; in addition, the image quality adjustment parameter may also include white balance parameters, noise reduction parameters, etc. The photo request carrying the tuning mode filled by each layer is sent to the image sensor node (sensor node), and the image sensor node reads the feature2mode value in the tuning mode to determine the current photo scene.

[0095] It is understandable that super-resolution photography (SR), multi-frame noise reduction (MFNR), and high dynamic range (HDR) photography are applicable to situations where the subject or the camera moves; night scene photography is applicable to situations where light and shadow smear is likely to occur in night scenes. By using photography scenes applicable to different situations, the resolution of the photographic image can be improved, thereby improving the imaging effect.

[0096] In step S12, the photographing device determines the current photographing scene according to the photographing request; in some embodiments, if the photographing request carries a photographing scene identifier, the photographing device can determine the photographing scene corresponding to the photographing scene identifier as the current photographing scene based on the photographing scene identifier carried by the photographing request.

[0097] In some embodiments, if the photographing request does not carry a photographing scene identifier, the photographing device may use a preset default photographing scene as the current photographing scene.

[0098] In some embodiments, if the photo request does not carry a photo scene identifier, the photo device can automatically detect the current photo scene after receiving the photo request based on a preset scene automatic detection algorithm. Exemplarily, when the current amount of light entering the lens is less than a preset light threshold, the current photo scene is determined to be a night scene; when the subject is detected to be moving based on the preview screen before taking the photo, the current photo scene is determined to be a high dynamic range photo scene; when the motion sensor built into the photo device detects the motion of the photo device, the current photo scene is determined to be a super-resolution photo scene; wherein the motion sensor is such as a gyroscope, an angular velocity sensor, a displacement sensor, etc.

[0099] In step S13, when the current photographing scene is a preset target photographing scene, the imaging cycle of the image frame is determined; wherein the imaging cycle includes the exposure time and the non-exposure time for exposing the image frame; the target photographing scene includes at least one of the following: a super-resolution photographing scene, a multi-frame noise reduction photographing scene, a high dynamic range photographing scene, and a night scene photographing scene. For example, based on the preset non-exposure time, the sum of the preset non-exposure time and the first preset time increment is determined as the increased non-exposure time, and the imaging cycle of the image frame including the increased non-exposure time and the exposure time is obtained. Or, after the increased non-exposure time is obtained based on the above method, the sum of the preset exposure time and the second preset time increment is determined as the increased exposure time, thereby obtaining the imaging cycle of the image frame including the increased exposure time and the increased non-exposure time.

[0100] For example, after determining the initial imaging period based on preset parameters such as the aperture, the weighting coefficient corresponding to the current photographing scene is determined using the correspondence between the preset photographing scene and the weighting coefficient; the third preset time increment is weighted using the weighting coefficient corresponding to the photographing scene, and the sum of the initial imaging period and the weighted time increment is determined as the imaging period of the image frame.

[0101] In step S14, the camera device controls the lens to reset to a preset initial position during the non-exposure time of the imaging cycle by controlling a voice coil motor or other driving device for controlling the movement of the lens; wherein the preset initial position can be the center position of the moving range of the lens in a preset direction (such as the front-to-back direction, the left-to-right direction, etc.), and / or the center position within a preset rotation angle range, or a position less than a preset distance threshold from the center position, etc.

[0102] In step S15, the photographing device controls the lens exposure acquisition within the exposure duration of the imaging cycle to obtain a target image; wherein, the exposure and acquisition image frames within the exposure duration can continue to be exposed with the current exposure parameters (such as aperture size, focal length, etc.); or, based on technologies such as OIS optical image stabilization, the vibration signal can be fed back to the controller, so that the controller drives the lens to move a certain displacement and / or rotate a certain angle through a motor based on the vibration signal and expose the image; wherein the vibration signal can be a signal of the movement of the photographing device detected by the motion sensor, a signal of the movement of the subject detected based on the preview screen, etc.

[0103] It is understandable that light and shadow smear is likely to appear in the pictures taken in night scenes (applicable to the aforementioned night scene photography scenes); motion blur is likely to appear in the pictures taken when the subject is moving or the photography device is moving (applicable to the aforementioned super-resolution photography scenes, multi-frame noise reduction photography scenes, and high dynamic range photography scenes). Through OIS optical image stabilization technology, the lens is driven to move for optical image stabilization, thereby improving the clarity of the image frame.

[0104] It should be noted that if the non-exposure duration in the imaging cycle is earlier than the exposure duration, then after resetting the lens position during the non-exposure duration of the imaging cycle, optical image stabilization can be achieved by moving the lens position during the exposure duration of the same imaging cycle to obtain the target image. If the exposure duration in the imaging cycle is earlier than the non-exposure duration, then after resetting the lens position during the non-exposure duration of the imaging cycle, optical image stabilization can be achieved by moving the lens position during the exposure duration of the next imaging cycle to obtain the target image. The target image can be an image frame obtained for each imaging cycle, or it can be an image finally captured, and this embodiment does not impose any specific restrictions on this.

[0105] Figure 4 FIG. 1 is an example diagram of an exposure timing sequence shown in an embodiment of the present disclosure, Figure 4 It can be seen that exposure is performed during exposure duration 1, exposure duration 2, exposure duration 3, ... to obtain image frames; the lens is controlled to reset to a preset initial position during the non-exposure time from the end time of the frame to the start time of the next exposure duration, so that anti-shake imaging can be successfully performed by moving the lens position during the next exposure duration.

[0106] Figure 5 This is an example diagram of a lens position offset shown in an embodiment of the present disclosure. Figure 5 In , the horizontal axis represents the imaging time, and the vertical axis represents the offset, wherein the offset of 0 corresponds to the preset initial position of the lens. Figure 5 It can be seen that the lens shift mainly occurs in the Y-axis direction. As the exposure process proceeds, the lens shifts within the exposure time to enable anti-shake, and resets to the preset initial position within the non-exposure time.

[0107] Figure 6 This is an example diagram of image comparison taken by the photographing method provided in an embodiment of the present disclosure under night scenes. Figure 6 In the figure, L3 indicates the imaging under night scene in the related art, and L4 indicates the imaging after using the photographing method provided by the embodiment of the present disclosure. Figure 6 It can be seen that the photographing method provided by the embodiment of the present disclosure has less light and shadow smear in night scenes and better imaging effect.

[0108] Figure 7 This is an example diagram of image comparison taken when the subject is moving provided by an embodiment of the present disclosure. Figure 7 In the figure, L5 indicates the image after switching to the motion capture function when the subject is detected to move in the related art, and L6 indicates the image after using the photo taking method provided by the embodiment of the present disclosure. Figure 7 It can be seen that the photographing method provided by the embodiment of the present disclosure has higher imaging clarity and better imaging effect when the subject is moving.

[0109] Figure 8 An example diagram of image comparison taken by a camera in motion is provided for the embodiment of the present disclosure. Figure 8 In the figure, L7 indicates the image after switching to the motion capture function when the camera is detected to move in the related art, and L8 indicates the image after using the camera method provided by the embodiment of the present disclosure. Figure 8 It can be seen that the photographing method provided by the embodiment of the present disclosure has higher imaging clarity and better imaging effect when the photographing device is in motion.

[0110] It is understandable that, since the photographing scene is a preset target photographing scene, such as a night scene photographing scene, where light and shadow smear is prone to occur, and motion blur is prone to occur in the photographing scene screen such as the movement of the subject or the movement of the photographing device, there is a high possibility of suppressing image blur by controlling the movement of the lens based on technologies such as optical image stabilization within the exposure duration of the imaging cycle. Compared with the situation where the image blur suppression cannot be enabled because the lens cannot continue to move in the current imaging cycle after moving to the extreme displacement or extreme angle in the historical imaging cycle, the embodiment of the present disclosure resets the lens to the preset initial position within the non-exposure duration of the imaging cycle, so that the movement of the lens at the preset initial position can be controlled within the exposure duration of the imaging cycle, so that image blur suppression can be enabled for each exposed image frame, thereby improving the success rate of enabling image blur suppression, thereby improving the resolution of the target image and reducing noise.

[0111] In some embodiments, in response to the photographing scene being a preset target photographing scene, determining an imaging period of an image frame includes:

[0112] Acquiring exposure parameters of the lens; wherein the exposure parameters include the exposure duration and / or exposure delay;

[0113] In response to the photographing scene being the preset target photographing scene, determining a reset duration of the lens corresponding to the preset target photographing scene;

[0114] An imaging period of an image frame is determined based on the reset duration of the lens, the exposure duration and / or the exposure delay.

[0115] In the embodiment of the present disclosure, the photographing device obtains the exposure parameters of the lens including the exposure time and / or the exposure delay; wherein the exposure time and the exposure delay of the lens may be preset, so that the photographing device may directly obtain the exposure time and the exposure delay of the lens in the memory. In addition, the photographing device may also determine the exposure time of the lens based on the conversion relationship between the exposure time, the aperture parameters of the lens, the shutter parameters, and the sensitivity; or may determine the exposure time and the exposure delay based on information such as the amount of light entering the lens, such as the automatic exposure (AE) technology, and the present disclosure does not limit this.

[0116] In response to the photographing scene being a preset target photographing scene, the photographing device of the disclosed embodiment determines the reset time length of the lens corresponding to the preset target photographing scene; wherein the preset target photographing scene and the reset time length have a corresponding relationship, for example, the reset time length corresponding to the super-resolution photographing scene is 10 milliseconds (ms), and the reset time length corresponding to the night scene photographing scene is 17ms. It can be understood that the reset time length of the lens of the disclosed embodiment belongs to the non-exposure time length.

[0117] After determining the reset time of the lens corresponding to the preset target photographing scene, the photographing device determines the imaging period of the image frame based on the reset time of the lens and the exposure parameter. For example, the sum of the reset time of the lens and at least one of the exposure parameters is determined as the imaging period of the image frame; or, the reset time of the lens and at least one of the exposure parameters are processed based on a preset nonlinear function to obtain the imaging period of the image frame; wherein the preset nonlinear function can be obtained by fitting different exposure imaging tests.

[0118] It is understandable that since resetting the lens takes a certain amount of time, the embodiment of the present disclosure determines the imaging period of the image frame based on the reset duration of the lens and the exposure parameters, so as to achieve a situation in which there is sufficient time (reset duration of the lens) for resetting the lens position based on the imaging period of the image frame; in addition, considering the exposure delay, the imaging period is determined based on the exposure parameters including the exposure delay, so as to improve the exposure reliability.

[0119] In some embodiments, the exposure parameters include the exposure duration and the exposure delay; and determining the imaging period of the image frame based on the reset duration of the lens, the exposure duration and / or the exposure delay includes:

[0120] When the sum of the lens reset time, the exposure time and the exposure delay is greater than a preset imaging period, determining the sum as the imaging period of the image frame;

[0121] In a case where the sum value is less than or equal to the preset imaging period, the preset imaging period is determined as the imaging period of the image frame.

[0122] In the embodiment of the present disclosure, the preset imaging period may be pre-set, or may be determined based on the sum of the exposure period determined as described above and the preset exposure interval duration, and the embodiment of the present disclosure does not limit this.

[0123] In the case where the sum of the lens reset time, the exposure time and the exposure delay is greater than the preset imaging period, the photographing device of the embodiment of the present disclosure determines the sum as the imaging period of the image frame, which can be expressed by the following formula (1):

[0124] oissyncFrameDuration=rollingShutterSkew+exposureTime+MinOisSyncNoExposureTime; (1)

[0125] Among them, oissyncFrameDuration represents the imaging period of the image frame, rollingShutterSkew represents the exposure delay, exposureTime represents the exposure duration, and MinOisSyncNoExposureTime represents the reset duration of the lens.

[0126] In the case where the sum value is less than or equal to the preset imaging period, the embodiment of the disclosure determines the preset imaging period as the imaging period of the image frame, that is, the embodiment of the disclosure determines the larger one of the sum value and the preset imaging period as the imaging period of the image frame. Through this solution, on the basis of having enough time to reset the lens, the larger one of the sum value and the preset imaging period is determined as the imaging period of the image frame, so that there is enough time for exposure, thereby improving exposure reliability.

[0127] In addition, in the embodiment of the present disclosure, if the preset imaging cycle is less than the sum of the exposure cycle and the preset exposure interval, the imaging cycle of the image frame based on the sum is converted into exposure row data required for the image sensor to expose and image, and the exposure row data converted by the imaging cycle of the image frame is sent to the image sensor, so that the image sensor performs imaging based on the exposure row data. Among them, the exposure row data converted by the imaging cycle of the image frame is greater than the initial exposure row data converted by the initial imaging cycle, which can be expressed by the following formula (2):

[0128] currentCompensatedBlankLines=OisSyncFrameLengthLine-currentFrameLengthLines; (2)

[0129] Among them, currentCompensatedBlankLines represents the difference between the exposure line data converted from the imaging period of the image frame and the initial exposure line data, which is a positive value; OisSyncFrameLengthLine represents the exposure line data converted from the imaging period of the image frame, and currentFrameLengthLines represents the initial exposure line data.

[0130] In some embodiments, the method further comprises:

[0131] In response to the photographing scene being the preset target photographing scene, determining a target image frame sequence number of a lens position to be reset;

[0132] The controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle includes:

[0133] The lens is controlled to reset to the preset initial position within the non-exposure duration of the imaging cycle to which the target image frame sequence number belongs.

[0134] In an embodiment of the present disclosure, when the current photographing scene is a preset target photographing scene, the photographing device determines the target image frame number to be reset. In some embodiments, the target image frame number can be determined based on a preset sequence number rule; for example, the preset sequence number rule includes a fixed interval value, so that the image frame number with the fixed interval value is determined as the target image frame number; if the preset sequence number rule includes a sequentially increasing interval value, the image frame number with the sequentially increasing interval value is determined as the target image frame number.

[0135] In some embodiments, based on the preset image frame selection duration and the exposure duration of the image frame, the sequence number of the image frame corresponding to the exposure duration of each image frame within the preset image frame selection duration can be determined as the target image frame sequence number.

[0136] After determining the target image frame sequence number, the photographing device controls the lens to reset to a preset initial position within the non-exposure duration of the imaging cycle to which the target image frame sequence number belongs.

[0137] It can be understood that compared to resetting the lens position during the non-exposure time in each imaging cycle, the embodiment of the present disclosure only resets the lens position during the non-exposure time in the imaging cycle to which the target image frame number belongs, which can reduce the time spent on resetting the lens position and improve the imaging performance of the camera.

[0138] In some embodiments, the preset target photographing scene includes a super-resolution photographing scene; and in response to the photographing scene being the preset target photographing scene, determining the target image frame sequence number of the lens position to be reset includes:

[0139] In response to the photographing scene being the super-resolution photographing scene, the image frame sequence numbers at intervals of a first preset number are used as the target image frame sequence numbers.

[0140] The preset target photographing scene in the disclosed embodiment includes a super-resolution photographing scene; when the photographing scene is a super-resolution photographing scene, the photographing device uses the image frame numbers at intervals of the first preset number as the target image frame numbers, that is, the target image frame numbers are spaced by the first preset number; wherein the first preset number is a natural number.

[0141] It can be understood that since resetting the lens position is time-consuming, compared with the target image frame numbers being continuous numbers, the target image frame numbers in the embodiment of the present disclosure are spaced by a first preset number, which can reduce the frequency of resetting the lens position during the non-exposure time in the imaging cycle to which the target image frame numbers belong, thereby improving the imaging performance of the photographic device.

[0142] In some embodiments, in response to the photographing scene being the super-resolution photographing scene, taking the image frame sequence numbers of each interval of a first preset number as the target image frame sequence numbers includes:

[0143] In response to the photographing scene being the super-resolution photographing scene, an odd number or an even number among a second preset number of consecutive image frame numbers is used as the target image frame number.

[0144] In the embodiment of the present disclosure, when the photographing scene is a super-resolution photographing scene, the odd or even number of the second preset number of consecutive image frame numbers is used as the target image frame number; illustratively, the second preset number is 8, so that when the photographing scene is a super-resolution photographing scene, the photographing device uses the frame numbers 1, 3, 5, 7 (or 2, 4, 6, 8) of the 8 consecutive image frame numbers as the target image frame number. Through this solution, on the basis of reducing the frequency of resetting the lens position, the total number of times the lens position is reset is controlled based on the second preset number, thereby further improving the imaging performance of the photographing device.

[0145] In some embodiments, the target image frame sequence number includes a plurality of frames; and controlling the lens exposure acquisition within the exposure duration of the imaging cycle to obtain the target image includes:

[0146] When the photographing scene is the super-resolution photographing scene, controlling the lens to capture images within the exposure duration of the imaging cycle to which each target image frame number belongs, to obtain a plurality of images;

[0147] Based on the multiple images, determining a reference image frame;

[0148] An image other than the reference image frame among the multiple images is superimposed on the reference image frame to obtain a target image in the super-resolution photography scene.

[0149] In an embodiment of the present disclosure, when the photographing scene is a super-resolution photographing scene, the photographing device controls the lens to capture images within the exposure time of the imaging cycle to which each target image frame number belongs, obtains multiple images, and determines a reference image frame from the multiple images captured by exposure; for example, the photographing device determines the resolution of each image frame based on the pixel value of each pixel point in the image frame, and determines the image frame corresponding to the maximum resolution as the reference image frame; or, determines any image frame among the multiple image frames whose resolution is greater than a preset resolution threshold as the reference image frame, etc.

[0150] After determining the reference image frame, the disclosed embodiment superimposes images other than the reference image frame among the multiple images exposed on the reference image frame to obtain the target image in the super-resolution photography scene. The target image can be obtained by fusing other image frames to the reference image frame based on a fusion algorithm on the reference image frame; or, for each pixel point in the reference image frame, the pixel value of the pixel point with the same coordinate position in the other image frames is compared with the pixel value of the pixel point at the coordinate position in the reference image frame. If the difference in pixel values ​​is less than a preset difference threshold, the average of the pixel values ​​of the pixel points at the coordinate position with a difference less than the preset difference threshold is used as the pixel value of the pixel point at the coordinate position in the imaging result to obtain the target image.

[0151] Exemplarily, one photographing action exposes 8 images, among which frames 2, 4, 6, and 8 are the target image frame numbers; the photographing device uses the image with the maximum clarity as the reference image frame (such as the 6th frame) among the 2nd, 4th, 6th, and 8th images, and superimposes other images on the 6th image frame to obtain the target image.

[0152] In addition, the photographing device of the embodiment of the present disclosure can also convert the result of superimposing multiple image frames in the raw domain into the RGB domain or the YUV domain, etc., to obtain the target image.

[0153] Furthermore, the photographing device of the embodiment of the present disclosure can also perform white balance correction, noise reduction and other processing on the result of superimposing multiple image frames to obtain the final imaging result, thereby further improving the imaging effect.

[0154] It can be understood that in the case of the super-resolution photography scene of the embodiment of the present disclosure, superimposing an image other than the reference image frame on the reference image frame representing a relatively stable photography can improve the imaging effect of the target image.

[0155] In some embodiments, the preset target photographing scene includes a night scene; in response to the photographing scene being the preset target photographing scene, determining the target image frame sequence number of the lens position to be reset includes:

[0156] In response to the photographing scene being the night scene, an image frame sequence number greater than a third preset number is used as the target image frame sequence number.

[0157] The preset target photographing scene of the embodiment of the present disclosure includes a night scene; when the photographing scene is a night scene, the image frame number greater than the third preset number is used as the target image frame number; for example, each frame number starting from the 3rd frame is used as the target image frame number.

[0158] It is understandable that since it takes a certain amount of time for the photo request to be sent to the bottom layer (such as the image sensor layer) and for the lens to be driven to move, the embodiment of the present disclosure uses an image frame number greater than a third preset number as the target image frame number when the photo scene is a night scene, which can increase the necessity of subsequently resetting the lens position based on the target image frame.

[0159] In some embodiments, the method further comprises:

[0160] Using the first thread to issue a lens position reset instruction for the imaging cycle to which the target image frame number belongs, and using the second thread to issue a lens position maintenance instruction for the imaging cycle to which the image frame number other than the target image frame number belongs;

[0161] The controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle includes:

[0162] Based on the lens position reset instruction issued by the first thread, the lens is controlled to be reset to the preset initial position within the non-exposure duration of the imaging cycle.

[0163] In the embodiment of the present disclosure, the photographing device uses a first thread to issue a lens position reset instruction for an imaging cycle to which a target image frame number belongs, and uses a different second thread to issue a lens position maintenance instruction for an imaging cycle to which an image frame number other than the target image frame number belongs, thereby controlling the lens to be reset to a preset initial position within the non-exposure duration of the imaging cycle based on the lens position reset instruction; and maintaining (not moving) the lens position within the imaging cycle based on the lens position maintenance instruction.

[0164] Among them, the lens position reset instruction and the lens position maintenance instruction can be different instruction identifiers or different values ​​of the same instruction identifier; for example, the instruction identifier is OisSyncmode, if the value of OisSyncmode is SceneFilterOn, it corresponds to the lens position reset instruction; if the value of OisSyncmode is SceneFilterOff, it indicates the lens position maintenance instruction.

[0165] It can be understood that the embodiment of the present disclosure issues lens position reset instructions and lens position maintenance instructions based on different threads, thereby controlling whether the lens position moves to a preset initial position based on asynchronous operations, thereby improving the reliability of control.

[0166] In some embodiments, the method further comprises:

[0167] Obtaining data stream attributes of each image frame;

[0168] The using the first thread to issue the lens position reset instruction of the imaging period to which the target image frame sequence number belongs includes:

[0169] When the data stream attribute of the image frame corresponding to the target image frame serial number is a photographing data stream, the first thread is used to issue the lens position reset instruction of the imaging period to which the target image frame serial number belongs.

[0170] In the disclosed embodiment, the photographing device obtains the attribute identifier carried by the data stream of each image frame, and obtains the data stream attributes of each image frame; wherein the data stream attributes include a photographing data stream and a preview data stream; if the data stream data collected after the user clicks a button such as "take a photo", it is a photographing data stream; the data stream attribute previewed after the user finishes taking the photo is a preview data stream.

[0171] In the embodiment of the present disclosure, when the data stream attribute of the image frame corresponding to the target image frame number is a photographing data stream, a first thread is used to issue a lens position reset instruction for the imaging period to which the target image frame number belongs; when the data stream attribute of the image frame corresponding to the image frame number is a preview data stream, a second thread is used to issue a lens position maintenance instruction for the imaging period to which the image frame number belongs.

[0172] Taking the super-resolution photography scene as an example, the photography scene identifier carried in the photography request is SR. When the data stream attribute of the image frame is the photography data stream, OisSyncmode = SceneFilterOff is set for the imaging period to which the first image frame belongs; when the second image frame is detected, OisSyncmode = SceneFilterOn is set for the imaging period to which the first image frame belongs, and then SceneFilterOn is negated, OisSyncmode is set to SceneFilterOff, and the switching operation is repeated in the 3rd to 8th frames to implement the sending of the lens maintenance instruction in the interval frame imaging period and the sending of the lens reset instruction in the interval frame imaging period. When the 9th image frame is detected, if the data stream attribute of the 9th image frame is the preview data stream, OisSyncmode = SceneFilterOff is set, and the continuous suppression of image blur of this photography is completed, and the final imaging result is obtained.

[0173] It can be understood that since the photographing process usually includes photographing and previewing, in this regard, the photographing device of the embodiment of the present disclosure, when the data stream attribute of the image frame corresponding to the target image frame number is a photographing data stream, uses the first thread to issue the lens position reset instruction of the imaging period to which the target image frame number belongs, thereby reducing the time and performance loss caused by performing the lens reset operation on the preview data stream that does not need to perform the photographing operation.

[0174] Fig. 9 An example of a photographing method process shown in the embodiment of the present disclosure Figure 2 ,Depend on Fig. 9 It can be seen that the following steps are included:

[0175] S201, obtaining a photo request;

[0176] In the disclosed embodiment, the photographing device obtains a user operation instruction to take a photo based on a display component (such as a display screen) of the photographing device, or obtains a user voice instruction to take a photo based on a sound receiving component of the photographing device, etc. The photo request carries a photo scene identifier.

[0177] S202, updating tuning mode information according to the photographing scene identifier;

[0178] In the disclosed embodiment, the hardware description layer of the photographing device creates a corresponding functional process according to the photographing request sent by the camera application, and updates the image quality adjustment parameter (tuning mode) value corresponding to the photographing scene; wherein the image quality adjustment parameter includes the photographing scene (feature2mode) value, for example, the feature2mode corresponding to the SR scene is 26, and the feature2mode value corresponding to the SN scene is 60; in addition, the image quality adjustment parameter may also include white balance parameters, noise reduction parameters, etc.

[0179] S203, image sensor;

[0180] In the disclosed embodiment, the photographing device sends the updated tuning mode information to the image sensor.

[0181] S204, obtain feature2mode;

[0182] In the embodiment of the present disclosure, the feature2mode value in the tuning mode information is obtained based on the hardware description layer to determine the current photographing scene.

[0183] S205, determining an imaging period of an image frame;

[0184] In an embodiment of the present disclosure, the photographing device determines an imaging period of an image frame when the current photographing scene is a preset target photographing scene; wherein the imaging period includes an exposure time and a non-exposure time for exposing the image frame; the target photographing scene includes at least one of the following: a super-resolution photographing scene, a multi-frame noise reduction photographing scene, a high dynamic range photographing scene, and a night scene photographing scene.

[0185] S206, converting the imaging cycle into exposure row data;

[0186] In the embodiment of the present disclosure, when the imaging period is greater than a preset imaging period, the imaging period is converted into exposure line data.

[0187] S207, the exposure row data converted by the imaging cycle is greater than the preset exposure row data;

[0188] In the embodiment of the present disclosure, the exposure row data converted by the imaging cycle is greater than the exposure row data converted by the preset imaging cycle.

[0189] S208, determining the target image frame sequence number according to the photographing scene;

[0190] In an embodiment of the present disclosure, the photographing device determines the target image frame sequence number according to the photographing scene, such as determining the target image frame sequence number based on a preset sequence number rule; or determining the target image frame sequence number based on a preset image frame selection duration and an exposure duration of the image frame, and determining the image frame sequence number corresponding to the exposure duration of each image frame within the preset image frame selection duration as the target image frame sequence number.

[0191] S209, in a super-resolution scenario, the target image frame number interval is a preset value;

[0192] In the embodiment of the present disclosure, when the photographing scene is a super-resolution scene, the image frame number of each interval with a preset value is used as the target image frame number.

[0193] S210, when a photo frame is detected, a lens position reset instruction is issued in the imaging cycle to which the target image frame number belongs; when a preview frame is detected, a lens position maintenance instruction is issued;

[0194] In the embodiment of the present disclosure, since the photographing process usually includes photographing and previewing, the data stream attribute of each image frame of the photographing device of the embodiment of the present disclosure, when the data stream attribute of the image frame corresponding to the target image frame sequence number is a photographing data stream, the lens position reset instruction of the imaging period to which the target image frame sequence number belongs is issued by the first thread, thereby reducing the time and performance loss caused by performing the lens reset operation on the preview data stream that does not need to perform the photographing operation.

[0195] S211, sent to imaging hardware;

[0196] In an embodiment of the present disclosure, the photographing device sends an imaging cycle, a lens position reset instruction or a lens position maintenance instruction to the imaging hardware; wherein the imaging hardware includes an image sensor, a lens, a voice coil motor, an aperture, etc.

[0197] S212, draw the picture.

[0198] In the embodiment of the present disclosure, the lens is controlled to expose and capture image frames within the exposure duration of the imaging cycle based on an imaging cycle, a lens position reset instruction, or a lens position maintenance instruction, and the lens is controlled to reset to a preset initial position within the non-exposure duration of the imaging cycle to which the target image frame sequence number belongs, so that anti-shake exposure can be achieved by moving the lens position within the exposure duration of the next imaging cycle to obtain the final target image.

[0199] Fig.10 is a diagram of a photographing device shown in an embodiment of the present disclosure, comprising Fig.10 It is known that, including:

[0200] A first acquisition module 101 is used to acquire a photo request;

[0201] A first determining module 102, configured to determine a current photographing scene according to the photographing request;

[0202] A second determination module 103 is used to determine an imaging period of an image frame in response to the photographing scene being a preset target photographing scene; wherein the imaging period includes an exposure duration and a non-exposure duration;

[0203] A reset module 104, used for controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle;

[0204] The photographing module 105 is used to control the lens exposure acquisition within the exposure duration of the imaging cycle to obtain a target image.

[0205] In some embodiments, the second determination module 103 is used to obtain exposure parameters of the lens; wherein the exposure parameters include the exposure duration and / or exposure delay; in response to the photographing scene being the preset target photographing scene, determining the reset duration of the lens corresponding to the preset target photographing scene; based on the reset duration of the lens, the exposure duration and the exposure delay, determining the imaging period of the image frame.

[0206] In some embodiments, the exposure parameters include the exposure duration and the exposure delay; the second determination module 103 is used to determine the sum of the reset duration of the lens, the exposure duration and the exposure duration as the imaging period of the image frame when the sum is greater than a preset imaging period; and to determine the preset imaging period as the imaging period of the image frame when the sum is less than or equal to the preset imaging period.

[0207] In some embodiments, the apparatus further comprises:

[0208] A third determining module 106, configured to determine a target image frame sequence number for resetting the lens position in response to the photographing scene being the preset target photographing scene;

[0209] The resetting module 104 is used to control the lens to reset to the preset initial position within the non-exposure duration of the imaging cycle to which the target image frame sequence number belongs.

[0210] In some embodiments, the preset target photographing scene includes a super-resolution photographing scene; the third determination module 106 is used to respond to the photographing scene being the super-resolution photographing scene, and to use the image frame number of each interval of the first preset number as the target image frame number.

[0211] In some embodiments, the third determination module 106 is configured to use an odd number or an even number among a second preset number of consecutive image frame numbers as the target image frame number in response to the photographing scene being the super-resolution photographing scene.

[0212] In some embodiments, the target image frame number includes multiple ones; the photographing module 105 is used to control the lens to capture images within the exposure time of the imaging cycle to which each target image frame number belongs when the photographing scene is the super-resolution photographing scene, so as to obtain multiple images; based on the multiple images, a reference image frame is determined; and images other than the reference image frame in the multiple images are superimposed on the reference image frame to obtain the target image in the super-resolution photographing scene.

[0213] In some embodiments, the preset target photographing scene includes a night scene; the third determining module 106 is used to, in response to the photographing scene being the night scene, use an image frame number greater than a third preset number as the target image frame number.

[0214] In some embodiments, the apparatus further comprises:

[0215] The sending module 107 is used to send the lens position reset instruction of the imaging cycle to which the target image frame number belongs by using the first thread, and send the lens position maintenance instruction of the imaging cycle to which the image frame number other than the target image frame number belongs by using the second thread;

[0216] The resetting module 104 is configured to control the lens to be reset to the preset initial position within the non-exposure duration of the imaging cycle based on the lens position resetting instruction issued by the first thread.

[0217] In some embodiments, the apparatus further comprises:

[0218] A second acquisition module 108, used to acquire data stream attributes of each image frame;

[0219] The sending module 107 is used to use the first thread to send the lens position reset instruction of the imaging period to which the target image frame sequence number belongs when the data stream attribute of the image frame corresponding to the target image frame sequence number is a photographing data stream.

[0220] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0221] Fig.11 8 is a block diagram of an electronic device 800 shown in an embodiment of the present disclosure. For example, the electronic device 800 may be a mobile phone, a mobile computer, etc.

[0222] Reference Fig.11 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0223] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0224] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0225] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0226] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0227] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0228] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0229] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0230] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as Wi-Fi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0231] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0232] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0233] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the aforementioned photographing method.

[0234] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims above.

[0235] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A photographing method, characterized in that: The method comprises: Get photo request; Determining a current photographing scene according to the photographing request; In response to the photographing scene being a preset target photographing scene, determining an imaging period of an image frame; wherein the imaging period includes an exposure duration and a non-exposure duration; Controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle; The lens exposure acquisition is controlled within the exposure duration of the imaging cycle to obtain a target image.

2. The method according to claim 1, characterized in that In response to the photographing scene being a preset target photographing scene, determining an imaging period of an image frame includes: Acquiring exposure parameters of the lens; wherein the exposure parameters include the exposure duration and / or exposure delay; In response to the photographing scene being the preset target photographing scene, determining a reset duration of the lens corresponding to the preset target photographing scene; An imaging period of an image frame is determined based on the reset duration of the lens, the exposure duration and / or the exposure delay.

3. The method according to claim 2, characterized in that The exposure parameters include the exposure duration and the exposure delay; and determining the imaging period of the image frame based on the reset duration of the lens, the exposure duration and / or the exposure delay includes: When the sum of the lens reset time, the exposure time and the exposure delay is greater than a preset imaging period, determining the sum as the imaging period of the image frame; In a case where the sum value is less than or equal to the preset imaging period, the preset imaging period is determined as the imaging period of the image frame.

4. The method according to claim 1, characterized in that: The method further comprises: In response to the photographing scene being the preset target photographing scene, determining a target image frame sequence number of a lens position to be reset; The controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle includes: The lens is controlled to reset to the preset initial position within the non-exposure duration of the imaging cycle to which the target image frame sequence number belongs.

5. The method according to claim 4, characterized in that The preset target photographing scene includes a super-resolution photographing scene; and in response to the photographing scene being the preset target photographing scene, determining the target image frame sequence number to be reset the lens position includes: In response to the photographing scene being the super-resolution photographing scene, the image frame sequence numbers at intervals of a first preset number are used as the target image frame sequence numbers.

6. The method according to claim 5, characterized in that In response to the photographing scene being the super-resolution photographing scene, taking the image frame sequence numbers of each interval of a first preset number as the target image frame sequence numbers, including: In response to the photographing scene being the super-resolution photographing scene, an odd number or an even number among a second preset number of consecutive image frame numbers is used as the target image frame number.

7. The method according to claim 5, characterized in that The target image frame sequence number includes a plurality of frame sequence numbers; the lens exposure acquisition is controlled within the exposure duration of the imaging cycle to obtain the target image, including: When the photographing scene is the super-resolution photographing scene, controlling the lens to capture images within the exposure duration of the imaging cycle to which each target image frame number belongs, to obtain a plurality of images; Based on the multiple images, determining a reference image frame; An image other than the reference image frame among the multiple images is superimposed on the reference image frame to obtain a target image in the super-resolution photography scene.

8. The method according to claim 4, characterized in that The preset target photographing scene includes a night scene; and in response to the photographing scene being the preset target photographing scene, determining the target image frame sequence number of the lens position to be reset includes: In response to the photographing scene being the night scene, an image frame sequence number greater than a third preset number is used as the target image frame sequence number.

9. The method according to claim 1, characterized in that: The method further comprises: Using the first thread to issue a lens position reset instruction for the imaging cycle to which the target image frame number belongs, and using the second thread to issue a lens position maintenance instruction for the imaging cycle to which the image frame number other than the target image frame number belongs; The controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle includes: Based on the lens position reset instruction issued by the first thread, the lens is controlled to be reset to the preset initial position within the non-exposure duration of the imaging cycle.

10. The method according to claim 9, characterized in that The method further comprises: Obtaining data stream attributes of each image frame; The using the first thread to issue the lens position reset instruction of the imaging period to which the target image frame sequence number belongs includes: When the data stream attribute of the image frame corresponding to the target image frame serial number is a photographing data stream, the first thread is used to issue the lens position reset instruction of the imaging period to which the target image frame serial number belongs.

11. A photographing device, characterized in that: The device comprises: A first acquisition module, used to acquire a photo request; A first determining module, used to determine a current photographing scene according to the photographing request; A second determination module is used to determine an imaging period of an image frame in response to the photographing scene being a preset target photographing scene; wherein the imaging period includes an exposure duration and a non-exposure duration; A reset module, used for controlling the lens to reset to a preset initial position during the non-exposure time of the imaging cycle; The photographing module is used to control the exposure acquisition of the lens within the exposure duration of the imaging cycle to obtain a target image.

12. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 10.

Citation Information

Cited By

  • Electronic device and image stabilization method thereof

    US20260129296A1