Image processing method and device, storage medium and electronic equipment

By monitoring the deviation of the lens module during the photography process and performing the back-up action, the image distortion caused by jitter during handheld shooting is solved, and the image clarity and anti-shake effect are improved.

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

Patent Information

Application Number
CN202311396285.0
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

During handheld shooting in dark environments, hand shaking causes the lens module to deviate from the preset position, causing image distortion and poor anti-shake effect.

Method used

By monitoring whether the lens module deviates from the first preset position during the photographing process, and controlling the lens module to perform a back-back action upon deviation, it is ensured that the lens module is moved back to the first preset position before the generation of the original image of the current frame is completed.

Benefits of technology

This improves the sharpness of the image, increases the number of clear original images, and thus increases the clarity of the final generated target image, thereby improving the anti-shake effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893283A_ABST
    Figure CN119893283A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and provides an image processing method and device, a storage medium and electronic device.The image processing method comprises the steps that in the photographing process, whether a lens module deviates from a first preset position or not is determined; if it is determined that the lens module deviates from the first preset position, the lens module is controlled to execute a centering action, so that the lens module is moved to the first preset position before generation of a current frame original image is finished, and the current frame original image refers to an original image generated when the lens module deviates from the first preset position; and generating a target image according to a preset frame original image generated in the photographing process. After the lens module returns to the first preset position, collection of the next frame of original image is not affected by the jitter, so that the definition of the later generated original image is ensured, the number of clear original images generated in the photographing process is increased, the definition of the finally generated target image is improved, and the anti-jitter effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] When taking photos in a dark environment, in order to obtain an image with appropriate brightness, the exposure time also needs to be longer. If the camera used at this time is a handheld shooting device, the inherent shaking of the human hand will inevitably affect the shooting process.

[0003] In the related art, the signal is generally suppressed by a filter to reduce the impact of jitter, but the image generated after suppression is easily distorted and the anti-shake effect is poor. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides an image processing method, device, storage medium and electronic device.

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

[0006] During the photographing process, determining whether the lens module deviates from the first preset position;

[0007] If it is determined that the lens module deviates from the first preset position, the lens module is controlled to perform a return action to move the lens module to the first preset position before the current frame original image is generated, and the current frame original image refers to the original image generated when the lens module deviates from the first preset position;

[0008] Generate a target image based on the preset frame original image generated during this shooting process.

[0009] Optionally, the image processing method further includes:

[0010] If it is determined that the lens module deviates from the first preset position, determining a deviation start time of the lens module deviating from the first preset position;

[0011] The step of generating a target image according to the preset frame original image generated during the current photographing process includes:

[0012] Obtain the generation time information of each frame of original image generated during this shooting process;

[0013] Determine a first original image according to the generation time information of each frame of the original image and the deviation starting time;

[0014] A target image is generated according to the first original image.

[0015] Optionally, the generation time information includes a generation start time and a generation end time, and the step of obtaining the generation time information of each frame of the original image generated during the current photographing process includes:

[0016] For each frame of the original image, the frame exposure duration and exposure readout time of the frame of the original image are obtained to obtain the generation start time of the frame of the original image, wherein the generation start time of the frame of the original image is the generation end time of the previous frame of the original image of the frame of the original image.

[0017] Optionally, determining the first original image according to the generation time information of each frame of the original image and the deviation starting time includes:

[0018] According to the generation time information of each frame of the original image and the deviation start time, the original image that does not include the generation time interval of the deviation start time is determined as the first original image, and the generation time interval of the original image is determined according to the generation start time and the generation end time of the original image.

[0019] Optionally, determining the first original image according to the generation time information of each frame of the original image and the deviation starting time includes:

[0020] Determining an identifier of the first original image according to the generation time information of each frame of the original image and the deviation starting time;

[0021] The step of generating a target image according to the first original image comprises:

[0022] The first original image is acquired according to the identifier of the first original image, and a target image is generated according to the first original image.

[0023] Optionally, the image processing method further includes:

[0024] In response to receiving a photo-taking instruction, the lens module is controlled to perform a centering action so as to move the lens module to the first preset position before the start time of generating the first frame of the original image.

[0025] Optionally, during the photographing process, determining whether the lens module deviates from the first preset position includes:

[0026] During the photo shooting process, monitor the position of the lens module;

[0027] According to the position of the lens module, it is determined whether the lens module deviates from a first preset position.

[0028] Optionally, determining whether the lens module deviates from a first preset position according to the moving position of the lens module includes:

[0029] If the position of the lens module is not located at the first preset position and the duration is greater than the preset duration, it is determined that the lens module deviates from the first preset position.

[0030] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, including:

[0031] A first processing module is configured to determine whether the lens module deviates from a first preset position during the photographing process;

[0032] a second processing module configured to control the lens module to perform a centering action if it is determined that the lens module deviates from the first preset position, so as to move the lens module to the first preset position before the current frame original image is generated, wherein the current frame original image refers to the original image generated when the lens module deviates from the first preset position;

[0033] The third processing module is configured to generate a target image according to the preset frame original image generated during this photographing process.

[0034] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of any image processing method provided in the first aspect of the present disclosure are implemented.

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

[0036] processor;

[0037] a memory for storing processor-executable instructions;

[0038] Wherein, the processor is configured to:

[0039] Execute any one of the steps of the image processing method provided in the first aspect of the present disclosure.

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

[0041] During the photographing process, it is determined whether the lens module deviates from the first preset position, and when it is determined that the lens module deviates from the first preset position, the lens module is controlled to execute a return action, so as to move the lens module back to the first preset position before the current frame original image is generated. In this way, after the lens module returns to the first preset position, the next frame original image of the frame original image is captured, and the next frame original image generated will not be affected by the current jitter, thereby ensuring the clarity of the original image generated thereafter, increasing the number of clear original images generated during this photographing process, and further increasing the clarity of the target image finally generated, thereby improving the anti-shake effect.

[0042] 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

[0043] 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.

[0044] Figure 1 The figure is a flowchart of an image processing method according to an exemplary embodiment.

[0045] Figure 2 The figure is a schematic diagram of a lens module centering according to an exemplary embodiment.

[0046] Figure 3 is a flowchart of another image processing method according to an exemplary embodiment.

[0047] Figure 4 The figure is a schematic diagram showing how to obtain generation time information according to an exemplary embodiment.

[0048] Figure 5 is a flowchart of another image processing method according to an exemplary embodiment.

[0049] Figure 6 According to an exemplary embodiment, Figure 1 Flowchart of sub-steps of step S1 in FIG.

[0050] Figure 7 is a schematic diagram of a Hall signal according to an exemplary embodiment.

[0051] Figure 8 is a block diagram of an image processing apparatus according to an exemplary embodiment.

[0052] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0053] 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.

[0054] The terms "first", "second", etc. used in the present disclosure are to distinguish one element from another element and have no order or importance. In addition, in the following description, when referring to the drawings, unless otherwise explained, the same reference numerals in different drawings represent the same or similar elements.

[0055] When taking photos in a dark environment, in order to obtain an image with appropriate brightness, the exposure time also needs to be longer. If the camera used at this time is a handheld shooting device, the inherent shaking of the human hand will inevitably affect the shooting process.

[0056] In the related art, the signal is generally suppressed by a filter to reduce the impact of jitter, but the image generated after suppression is easily distorted and the anti-shake effect is poor.

[0057] In order to solve the above technical problems, the embodiment of the present disclosure determines whether the lens module deviates from the first preset position during the photographing process, and controls the lens module to perform a return action when it is determined that the lens module deviates from the first preset position, so as to move the lens module back to the first preset position before the current frame original image is generated. In this way, after the lens module returns to the first preset position, the next frame original image of the frame original image is captured, and the next frame original image generated will not be affected by the current jitter, thereby ensuring the clarity of the original image generated thereafter, increasing the number of clear original images generated during this photographing process, and then improving the clarity of the target image finally generated, thereby improving the anti-shake effect.

[0058] Figure 1 is a flowchart of an image processing method according to an exemplary embodiment. Figure 1 As shown, the image processing method can be used in an electronic device including a lens module, and the image processing method can include steps S1 to S3.

[0059] Step S1, during the photographing process, determining whether the lens module deviates from a first preset position.

[0060] The photographing process may refer to the process from pressing the shutter button to finally generating the target image.

[0061] When stationary and without shaking, the optical axis of the lens module coincides with the optical center of the image sensor, and the lens module is in its original position.

[0062] The first preset position may be a position within the circumference of a circle with the original position as the center and the preset distance as the radius. The preset distance may be set according to actual conditions, and this embodiment does not limit this.

[0063] During the photographing process, the inherent shaking of human hands may cause the lens module to deviate from the original position. In the case of strong shaking, the lens module may even exceed the first preset position, that is, deviate from the first preset position.

[0064] Step S2: If it is determined that the lens module deviates from the first preset position, the lens module is controlled to perform a return action.

[0065] The lens module is moved to the first preset position before the current frame original image is generated. The current frame original image refers to the original image generated when the lens module deviates from the first preset position.

[0066] The return-to-center action may be an action in which the lens module moves toward the first preset position.

[0067] Furthermore, the return-to-center action may also be an action in which the lens module moves to a second preset position within the first preset position, wherein the second preset position is smaller than the first preset position, and both the first preset position and the second preset position are centered on the original position.

[0068] Furthermore, the return-to-center action may also be an action in which the lens module moves to an original position in the first position preset position.

[0069] The lens module can be controlled by the driving mechanism to perform the return action. Figure 2 Taking the lens module shown as an example, the return-to-center action may be, for example, an action in which the lens module moves from the left edge of the stroke to the stroke center where the original position is located.

[0070] It should be understood that the re-centering action of the lens module should be completed before the generation of the original image of the current frame is completed, that is, before the generation of the original image of the next frame begins.

[0071] It should be understood that after pressing the shutter button, the optical sensor of the image acquisition device, for example, a CMOS (Complementary Metal-Oxide-Semiconductor) or CCD (Charge-coupled Device) image sensor, starts to acquire the original image, and acquires the preset frame original image during the entire photo shooting process, and then obtains the final target image based on the preset frame original image. However, if the lens module deviates from the first preset position during the process of the optical sensor acquiring the current frame original image, the acquired current frame original image will be unclear. In the present disclosure, if it is determined that the lens module has reached the first preset position, the lens module will be controlled to perform a return action to move the lens module to the first preset position before the current frame original image is generated. In this way, when the optical sensor starts to acquire the next frame original image, the lens module has returned to the first preset position, thereby ensuring that the next frame original image acquired is clear.

[0072] Step S3, generating a target image according to the preset frame original image generated in this photographing process.

[0073] As shown above, in the multi-frame shooting mode, by pressing the shutter button, multiple frames of original images can be generated in one shooting. The number of the multiple frames of original images is the preset frames. For example, the preset frames may be 8 frames.

[0074] The original images of a preset number of frames generated during this photographing process may be fused to generate a target image.

[0075] During the photographing process, it is determined whether the lens module deviates from the first preset position, and when it is determined that the lens module deviates from the first preset position, the lens module is controlled to execute a return action, so as to move the lens module back to the first preset position before the current frame original image is generated. In this way, after the lens module returns to the first preset position, the next frame original image of the frame original image is captured, and the next frame original image generated will not be affected by the current jitter, thereby ensuring the clarity of the original image generated thereafter, increasing the number of clear original images generated during this photographing process, and further increasing the clarity of the target image finally generated, thereby improving the anti-shake effect.

[0076] In one possible implementation, since the return-to-center processing is due to deviation from the first preset position, the original image corresponding to the return-to-center processing will be blurred and unclear. In order to further improve the clarity of the final generated target image, the original image of the frame where the return-to-center processing is located in the preset frame original image can be discarded, that is, the blurred original image is discarded, and the remaining high-definition original image is used to generate the target image. Figure 3is a flowchart of another image processing method according to an exemplary embodiment. Figure 3 As shown, the image processing method may include steps S201 to S206:

[0077] Step S201, during the photographing process, determining whether the lens module deviates from a first preset position.

[0078] Step S202: If it is determined that the lens module deviates from the first preset position, then determine the starting time when the lens module deviates from the first preset position.

[0079] The deviation starting time is the time when the lens module deviates beyond the first preset position.

[0080] Step S203: If it is determined that the lens module deviates from the first preset position, the lens module is controlled to perform a return to center action.

[0081] The lens module is moved to the first preset position before the current frame original image is generated. The current frame original image refers to the original image generated when the lens module deviates from the first preset position.

[0082] Step S204, obtaining the generation time information of each frame of original image generated in the current photographing process.

[0083] The generation time information of the original image may include the generation start time of the original image and the generation end time of the original image.

[0084] In a dark environment, when taking multi-frame long exposure photos, multiple frames of original images are continuously captured with different exposure times. For each frame of the original image, the generation process of the original image includes three stages, exposure, exposure readout, and idle. The start time and end time of the generation of the original image can be determined based on the stage time information of the generation process.

[0085] Specifically, for each frame of the original image, the frame exposure duration and exposure readout time of the frame of the original image are obtained to obtain the generation start time of the frame of the original image, wherein the generation start time of the frame of the original image is the generation end time of the previous frame of the original image of the frame of the original image.

[0086] See also Figure 4In the figure, the white rectangular box represents frame exposure, and the black rectangular box represents exposure readout. According to the exposure readout time of the first frame and the frame exposure duration of the first frame, the generation start time of the first frame can be determined, and the generation start time of the first frame = the exposure readout time of the first frame - the frame exposure duration of the first frame. Similarly, the generation start time of the second frame, the generation start time of the third frame, and the generation start time of each subsequent frame of the original image can be obtained. Moreover, the generation start time of the second frame is the generation end time of the first frame, and the generation start time of the third frame is the generation end time of the second frame. The generation end time of the last frame of the original image can be calculated by adding the generation start time of the last frame of the original image to the generation cycle of the second to last frame of the original image.

[0087] The photo frame hardware synchronization signal Vsync signal can be obtained through hardware wiring and sensorhub (intelligent sensor hub). The VSync signal is the hardware synchronization signal used by the lens module to connect WIDE and UW. Use hardware flying wires to connect the Vsync signal to the free port of the general purpose input / output port (GPIO) on the sensorhub, and obtain the exposure readout moment through interrupt event triggering.

[0088] Step S205 , determining the first original image according to the generation time information of each frame of the original image and the deviation start time.

[0089] The first original image may be an original image with high definition that has not been processed during a single photo shoot.

[0090] According to the generation time information and the deviation start time of each frame of the original image, the original image that does not include the generation time interval that deviates from the start time can be determined as the first original image, and the generation time interval of the original image is determined according to the generation start time and the generation end time of the original image.

[0091] Specifically, the generation time interval is determined according to the generation start time and the generation end time in the generation time information, the generation time interval of the deviation start time is compared with each frame of the original image, and the original image corresponding to the generation time interval that does not include the deviation start time is determined as the first original image.

[0092] In other embodiments, the generation time interval may be determined according to the generation start time and the generation end time in the generation time information, the generation time interval of each frame of the original image is compared with the deviation start time, and the original image corresponding to the generation time interval including the deviation start time is determined as the second original image, and the second original image may be a blurred original image after back-processing. In a photo-taking process, except for the second original image, the remaining is the first original image.

[0093] Step S206: Generate a target image according to the first original image.

[0094] It should be understood that if only one frame of the first original image is obtained during a photographing process, then the first original image is the target image. If multiple frames of the first original image are obtained during a photographing process, all the first original images during this photographing process are fused to generate the target image.

[0095] By discarding a small number of blurred original images, the clarity of most original images is ensured, and the fragmentation rate and clarity of the first original image in the preset frame original image are guaranteed, thereby ensuring the clarity of the target image finally generated.

[0096] It should be noted that the detailed description of step S201 and step S202 may refer to step S1 and step S2, and will not be repeated in this embodiment.

[0097] In one possible implementation, see Figure 5 , Figure 5 is a flowchart of another image processing method according to an exemplary embodiment. Figure 5 As shown, the image processing method may include steps S301 to S306:

[0098] Step S301, during the photographing process, determining whether the lens module deviates from a first preset position.

[0099] Step S302: If it is determined that the lens module deviates from the first preset position, then determine the starting time when the lens module deviates from the first preset position.

[0100] Step S303: If it is determined that the lens module deviates from the first preset position, the lens module is controlled to perform a return to center action.

[0101] The lens module is moved to the first preset position before the current frame original image is generated. The current frame original image refers to the original image generated when the lens module deviates from the first preset position.

[0102] Step S304, obtaining the generation time information of each frame of original image generated in the current photographing process.

[0103] Step S305 , determining the identifier of the first original image according to the generation time information and the deviation start time of each frame of the original image.

[0104] Step S306, acquiring the first original image according to the identifier of the first original image, and generating a target image according to the first original image.

[0105] The identifier of the first original image may be a frame sequence number of the first original image, or a timestamp, etc.

[0106] Specifically, in a photographing process, the number of preset frames is 8, that is, there are 8 frames of original images, and each frame of the original image is marked with a frame number in chronological order to distinguish different original images. The frame number of the first original image that has not been processed in the 8 frames is determined, and the first original image is obtained according to the frame number, and then all the first original images in this photographing process are fused to generate a target image.

[0107] It should be noted that the detailed description of some steps in step S301 to step S306 can refer to step S201 to step S206, and will not be repeated in this embodiment.

[0108] In a possible implementation, the image processing method may further include:

[0109] In response to receiving a photo-taking instruction, the lens module is controlled to perform a centering action so as to move the lens module to a first preset position before the start time of generating the first frame of the original image.

[0110] After the user presses the shutter button to take a picture, the electronic device responds to the received photo command and performs a centering before generating the first frame exposure, ensuring that the lens module is located in the center position at the beginning of the photo shooting, thereby providing a larger anti-shake range, reducing the probability of the lens module deviating from the first preset position during the photo shooting, ensuring the clarity of the original image, and further improving the clarity of the target image finally generated, thereby improving the anti-shake effect.

[0111] In one possible implementation, see Figure 6 In step S1, determining whether the lens module deviates from the first preset position may include step S11 and step S12:

[0112] Step S11, during the photographing process, monitoring the position of the lens module.

[0113] Step S12: determining whether the lens module deviates from a first preset position according to the position of the lens module.

[0114] The position of the lens module can be monitored by a gyroscope. For example, the gyroscope signal output by the gyroscope is integrated and calculated to obtain a Hall signal. The Hall signal is used to determine whether the lens module deviates from the first preset position. The Hall signal is compared with the first preset position. When the Hall signal is in the first preset position, it is determined that the lens module has not deviated from the first preset position. When the Hall signal is not in the first preset position, it is determined that the lens module deviates from the first preset position.

[0115] In order to improve the accuracy of judgment, the duration of the deviation of the lens module from the first preset position can be further increased for judgment, that is, if the position of the lens module is not at the first preset position and the duration is greater than the preset duration, it is determined that the lens module deviates from the first preset position.

[0116] The timing is started from the deviation start time when the lens module is not in the first preset position, and the duration of the position of the lens module not in the first preset position is obtained.

[0117] The preset duration may be defined according to actual conditions. For example, the preset duration may be 1 / 2 of the exposure duration.

[0118] When the duration is greater than the preset duration, that is, once the duration is greater than the preset duration, it is determined that the lens module deviates from the first preset position, and the step of controlling the lens module to perform a return to center action can be executed.

[0119] See also Figure 7 The first preset position can be 500-3500. When the Hall signal deviates from the first preset position and the duration is greater than the preset duration, a one-step return action is performed.

[0120] Based on the same inventive concept, the embodiment of the present disclosure also provides an image processing device, which is applied to electronic equipment. Figure 8 FIG. 1 is a block diagram of an image processing apparatus according to an exemplary embodiment. Figure 8 As shown, the image processing device 500 may include:

[0121] The first processing module 501 is configured to determine whether the lens module deviates from the first preset position during the photographing process;

[0122] The second processing module 502 is configured to control the lens module to perform a centering action if it is determined that the lens module deviates from the first preset position, so as to move the lens module to the first preset position before the current frame original image is generated, and the current frame original image refers to the original image generated when the lens module deviates from the first preset position;

[0123] The third processing module 503 is configured to generate a target image according to the preset frame original image generated in the current photographing process.

[0124] Optionally, the image processing device 500 further includes:

[0125] The fourth processing module is configured to determine a starting time of the lens module deviating from the first preset position if it is determined that the lens module deviates from the first preset position;

[0126] The third processing module 503 includes:

[0127] The first sub-processing module is configured to obtain generation time information of each frame of original image generated during this photographing process;

[0128] The second sub-processing module is configured to determine the first original image according to the generation time information of each frame of the original image and the deviation starting time;

[0129] The third sub-processing module is configured to generate a target image according to the first original image.

[0130] Optionally, the generation time information includes a generation start time and a generation end time, and the first sub-processing module is specifically configured to:

[0131] For each frame of the original image, the frame exposure duration and exposure readout time of the frame of the original image are obtained to obtain the generation start time of the frame of the original image, wherein the generation start time of the frame of the original image is the generation end time of the previous frame of the original image of the frame of the original image.

[0132] Optionally, the second sub-processing module is specifically configured as follows:

[0133] According to the generation time information and the deviation start time of each frame of the original image, the original image that does not include the generation time interval that deviates from the start time is determined as the first original image. The generation time interval of the original image is determined according to the generation start time and the generation end time of the original image.

[0134] Optionally, the second sub-processing module is specifically configured as follows:

[0135] Determine the identifier of the first original image according to the generation time information of each frame of the original image and the deviation starting time;

[0136] The third sub-processing module is specifically configured as follows:

[0137] The first original image is acquired according to the identifier of the first original image, and a target image is generated according to the first original image.

[0138] Optionally, the image processing device further includes:

[0139] The fifth processing module is configured to control the lens module to perform a re-centering action in response to receiving a photo-taking instruction, so as to move the lens module to a first preset position before the start time of generating the first frame of the original image.

[0140] Optionally, the first processing module 501 includes:

[0141] The fourth sub-processing module is configured to monitor the position of the lens module during the photographing process;

[0142] The fifth sub-processing module is configured to determine whether the lens module deviates from the first preset position according to the position of the lens module.

[0143] Optionally, the fifth sub-processing module is specifically configured as follows:

[0144] If the position of the lens module is not located at the first preset position and the duration is greater than the preset duration, it is determined that the lens module deviates from the first preset position.

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

[0146] In another exemplary embodiment, a computer-readable storage medium is further provided, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of the above-mentioned image processing method are implemented.

[0147] Fig. 9 is a block diagram of an electronic device according to an exemplary embodiment. Fig. 9 , 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 interface 812 , a sensor component 814 , and a communication component 816 .

[0148] 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 image processing 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.

[0149] 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.

[0150] 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.

[0151] 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.

[0152] 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.

[0153] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0154] 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.

[0155] 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 WiFi, 2G or 3G, 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.

[0156] 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-mentioned image processing method.

[0157] 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-mentioned image processing 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.

[0158] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned image processing method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, such as the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction may be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned image processing method may be implemented; alternatively, the integrated circuit or chip may receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned image processing method.

[0159] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-mentioned image processing method when executed by the programmable device.

[0160] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. 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 as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0161] 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. An image processing method, characterized in that: include: During the photographing process, determining whether the lens module deviates from the first preset position; If it is determined that the lens module deviates from the first preset position, the lens module is controlled to perform a return action to move the lens module to the first preset position before the current frame original image is generated, and the current frame original image refers to the original image generated when the lens module deviates from the first preset position; Generate a target image based on the preset frame original image generated during this shooting process.

2. The image processing method according to claim 1, characterized in that: The image processing method further comprises: If it is determined that the lens module deviates from the first preset position, determining a deviation start time of the lens module deviating from the first preset position; The step of generating a target image according to the preset frame original image generated during the current photographing process includes: Obtain the generation time information of each frame of original image generated during this shooting process; Determine a first original image according to the generation time information of each frame of the original image and the deviation starting time; A target image is generated according to the first original image.

3. The image processing method according to claim 2, characterized in that: The generation time information includes a generation start time and a generation end time, and the generation time information of each frame of the original image generated during the current photographing process is obtained, including: For each frame of the original image, the frame exposure duration and exposure readout time of the frame of the original image are obtained to obtain the generation start time of the frame of the original image, wherein the generation start time of the frame of the original image is the generation end time of the previous frame of the original image of the frame of the original image.

4. The image processing method according to claim 2, characterized in that: The determining of the first original image according to the generation time information of each frame of the original image and the deviation starting time includes: According to the generation time information of each frame of the original image and the deviation start time, the original image that does not include the generation time interval of the deviation start time is determined as the first original image, and the generation time interval of the original image is determined according to the generation start time and the generation end time of the original image.

5. The image processing method according to claim 2, characterized in that: The determining of the first original image according to the generation time information of each frame of the original image and the deviation starting time includes: Determining an identifier of the first original image according to the generation time information of each frame of the original image and the deviation starting time; The step of generating a target image according to the first original image comprises: The first original image is acquired according to the identifier of the first original image, and a target image is generated according to the first original image.

6. The image processing method according to claim 1, characterized in that: The image processing method further comprises: In response to receiving a photo-taking instruction, the lens module is controlled to perform a centering action so as to move the lens module to the first preset position before the start time of generating the first frame of the original image.

7. The image processing method according to claim 1, characterized in that: During the photographing process, determining whether the lens module deviates from the first preset position includes: During the photo shooting process, monitor the position of the lens module; According to the position of the lens module, it is determined whether the lens module deviates from a first preset position.

8. The image processing method according to claim 7, characterized in that: The step of determining whether the lens module deviates from a first preset position according to the moving position of the lens module comprises: If the position of the lens module is not located at the first preset position and the duration is greater than the preset duration, it is determined that the lens module deviates from the first preset position.

9. An image processing device, characterized in that: include: A first processing module is configured to determine whether the lens module deviates from a first preset position during the photographing process; a second processing module configured to control the lens module to perform a centering action if it is determined that the lens module deviates from the first preset position, so as to move the lens module to the first preset position before the current frame original image is generated, wherein the current frame original image refers to the original image generated when the lens module deviates from the first preset position; The third processing module is configured to generate a target image according to the preset frame original image generated during this photographing process.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the image processing method described in any one of claims 1 to 8 are implemented.

11. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Execute the steps of the image processing method according to any one of claims 1 to 8.