Camera module control method and device, electronic equipment and storage medium

By controlling the energy-saving mode of the anti-shake module according to the motion state of the electronic device where the camera module is located, the problems of high power consumption and short service life in the prior art are solved, more efficient power consumption management and longer service life are achieved, and user experience is improved.

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

Patent Information

Application Number
CN202311390671.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

The existing camera module control methods have problems such as high power consumption and short service life, which affects the user experience.

Method used

By determining the motion state of the electronic device where the camera module is located, it controls whether the anti-shake module is in the energy-saving mode. If the motion state is static, the anti-shake module switches to the energy-saving mode; if the motion state is shaking, the anti-shake module switches to the non-power-saving mode.

Benefits of technology

While ensuring imaging quality, it achieves power consumption and extends service life and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893272A_ABST
    Figure CN119893272A_ABST
Patent Text Reader

Abstract

The invention relates to a control method and device of a camera module, electronic equipment and a storage medium, the camera module comprises an anti-shake module, and the control method of the camera module comprises the following steps: determining a motion state of the electronic equipment where the camera module is located; and controlling whether the anti-shake module is in an energy-saving mode or not according to the motion state. By determining the motion state of the electronic equipment where the camera module is located, whether the anti-shake module is in the energy-saving mode or not can be controlled according to the motion state, and the anti-shake module can be controlled to be in the non-energy-saving mode under the condition that the motion state indicates that the anti-shake module needs to work; and when the motion state indicates that the anti-shake module does not need to work, the anti-shake module is controlled to be in an energy-saving mode, so that the imaging quality is ensured, the effects of saving power consumption and prolonging the service life are achieved, and the user experience 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 electronic equipment, and in particular to a control method and device for a camera module, an electronic device, and a storage medium. Background Art

[0002] In recent years, with the rapid development of hardware such as camera modules and image acquisition and processing technologies, camera modules equipped with different functional modules have been widely used in electronic devices with photo or video functions. Today's camera modules are usually equipped with an anti-shake module with an optical image stabilization function, which effectively suppresses the impact of the body shake of the electronic device on the imaging, thereby improving the imaging quality.

[0003] However, the use of related control methods to control the camera module has problems such as high power consumption and short service life, which affects the user experience. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a control method, device, electronic device and storage medium of a camera module.

[0005] According to a first aspect of an embodiment of the present disclosure, a method for controlling a camera module is provided, wherein the camera module includes an anti-shake module, and the method for controlling the camera module includes:

[0006] Determine the motion state of the electronic device where the camera module is located;

[0007] According to the motion state, whether the anti-shake module is in a power saving mode is controlled.

[0008] In some embodiments of the present disclosure, controlling the anti-shake module to be in energy-saving mode or turning off the energy-saving mode according to the motion state includes:

[0009] If the motion state is a stationary state, controlling the anti-shake module to be in the energy-saving mode;

[0010] If the motion state is a shaking state, the anti-shake module is controlled to be in a non-energy-saving mode.

[0011] In some embodiments of the present disclosure, the anti-shake module is a memory alloy anti-shake module or a spring-type anti-shake module, and the controlling whether the anti-shake module is in the energy-saving mode according to the motion state includes:

[0012] In response to the motion state switching from the shaking state to the static state, controlling each functional unit in the anti-shake module to be turned off, so that the anti-shake module directly switches to the energy-saving mode;

[0013] In response to the motion state switching from the static state to the shaking state, each of the functional units in the anti-shake module is controlled to be turned on, so that the anti-shake module directly switches to the non-energy-saving mode.

[0014] In some embodiments of the present disclosure, the anti-shake module is a ball-type anti-shake module, and controlling whether the anti-shake module is in energy-saving mode according to the motion state includes:

[0015] In response to the motion state switching from the shaking state to the static state, controlling the coil voltage passing through the anti-shake module to gradually decrease from the first voltage to the second voltage, so that the anti-shake module switches to the energy-saving mode;

[0016] In response to the movement state switching from the static state to the shaking state, the coil voltage passing through the anti-shake module is controlled to gradually increase from the second voltage to the first voltage, so that the anti-shake module switches to the non-energy-saving mode.

[0017] In some embodiments of the present disclosure, before determining the motion state of the electronic device where the camera module is located, the control method of the camera module further includes:

[0018] In response to starting the photo-taking function, the anti-shake module is controlled to start the non-energy-saving mode.

[0019] In some embodiments of the present disclosure, determining the motion state of the electronic device where the camera module is located includes:

[0020] Acquire at least one motion data set, each of the motion data sets including motion data corresponding to multiple moments;

[0021] Based on each of the motion data sets, the motion state is determined.

[0022] In some embodiments of the present disclosure, determining the motion state based on each of the motion data sets includes:

[0023] Calculate the average value of the motion data of each of the motion data sets within a first preset time range;

[0024] If each of the average values ​​is less than or equal to the corresponding motion data threshold, it is determined that the motion state is a stationary state;

[0025] If at least one of the average values ​​is greater than the corresponding motion data threshold, it is determined that the motion state is a shaking state.

[0026] In some embodiments of the present disclosure, the acquiring at least one motion data set includes:

[0027] Acquire motion data from at least one sensor, wherein each piece of motion data acquired by the sensor constitutes a set of motion data;

[0028] The sensor includes an acceleration sensor and / or a gyroscope.

[0029] In some embodiments of the present disclosure, when the anti-shake module is in the energy-saving mode, each functional unit in the anti-shake module is in a closed state, and the micro-control unit in the anti-shake module is in a sleep state.

[0030] According to a second aspect of an embodiment of the present disclosure, a control device for a camera module is provided, wherein the camera module includes an anti-shake module, and the control device for the camera module includes:

[0031] A determination module, the determination module is used to determine the motion state of the electronic device where the camera module is located;

[0032] A first control module, wherein the first control module is used to control whether the anti-shake module is in a power saving mode according to the motion state.

[0033] In some embodiments of the present disclosure, the control device of the camera module further includes:

[0034] The second control module is used for controlling the anti-shake module to start a non-energy-saving mode in response to starting a camera function.

[0035] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:

[0036] processor;

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

[0038] Wherein, the processor is configured to:

[0039] Determine the motion state of the electronic device where the camera module is located;

[0040] According to the motion state, whether the anti-shake module is in the energy-saving mode is controlled.

[0041] According to a fourth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute a method for controlling a camera module. The method for controlling the camera module includes:

[0042] Determine the motion state of the electronic device where the camera module is located;

[0043] According to the motion state, whether the anti-shake module is in the energy-saving mode is controlled.

[0044] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by determining the motion state of the electronic device where the camera module is located, it is possible to control whether the anti-shake module is in energy-saving mode according to the motion state; and when the motion state indicates that the anti-shake module does not need to work, the anti-shake module can be controlled to be in energy-saving mode, thereby achieving the effect of saving power consumption and extending service life while ensuring image quality, thereby improving user experience.

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

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

[0047] Figure 1 The figure is a flow chart of a method for controlling a camera module according to an exemplary embodiment.

[0048] Figure 2 The flowchart of controlling whether the anti-shake module is in the energy-saving mode according to the motion state is shown according to an exemplary embodiment.

[0049] Figure 3 is a flowchart showing how to control whether an anti-shake module is in a power-saving mode according to a motion state according to another exemplary embodiment.

[0050] Figure 4 It is a comparison chart of the angular acceleration of the electronic device and the displacement of the anti-shake module under a control method.

[0051] Figure 5 It is a schematic diagram of the jumping of the shooting picture under a control method.

[0052] Figure 6 It is a comparison diagram of the angular acceleration of the electronic device and the displacement of the anti-shake module under the control method of the camera module according to an exemplary embodiment.

[0053] Figure 7 The present invention is a flowchart for determining the motion state of an electronic device where a camera module is located according to an exemplary embodiment.

[0054] Figure 8 The invention is a flowchart of determining a motion state based on each motion data set according to an exemplary embodiment.

[0055] Fig. 9 is a flowchart of a method for controlling a camera module according to another exemplary embodiment.

[0056] Fig.10 is a block diagram of a control device for a camera module according to an exemplary embodiment.

[0057] Fig.11 is a block diagram of an electronic device according to an exemplary embodiment.

[0058] In the figure:

[0059] 10-determination module; 20-first control module; 101-processing module; 102-memory; 103-power module; 104-multimedia module; 105-audio module; 106-input / output interface; 107-sensor module; 108-communication module; 109-processor. DETAILED DESCRIPTION

[0060] 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 invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0061] In recent years, with the rapid development of hardware components such as camera modules and image acquisition and processing technologies, camera modules equipped with a variety of different functional modules have been widely used in electronic devices with photo or video functions, such as mobile phones, digital cameras, tablet computers, etc. Since the body shake is inevitable when shooting with handheld electronic devices, the image sensor will receive different light at the same position and superimpose them, resulting in blurred images.

[0062] To solve the above problems, an anti-shake module with an optical anti-shake function is provided in the camera module, which can offset the shaking of the body through the reverse movement of the anti-shake module, thereby effectively suppressing the impact of the body shaking of the electronic device on the image, thereby improving the image quality. However, the control method of the related technology used to control the camera module cannot determine the mode of the anti-shake module according to the actual scene, so that the anti-shake module is in a high power consumption working mode for a long time, resulting in high power consumption, short device life and other problems, affecting the user experience.

[0063] Based on this, the exemplary embodiment of the present disclosure provides a control method for a camera module. By determining the motion state of the electronic device where the camera module is located, whether the anti-shake module is in a power-saving mode can be controlled according to the motion state. When the motion state indicates that the anti-shake module needs to work, the anti-shake module can be controlled to be in a non-power-saving mode; when the motion state indicates that the anti-shake module does not need to work, the anti-shake module can be controlled to be in a power-saving mode, thereby achieving the effect of saving power consumption and extending service life while ensuring imaging quality, thereby improving user experience.

[0064] In an exemplary embodiment, a control method for a camera module is provided, wherein the camera module is arranged in an electronic device having a photo taking or video taking function, and the camera module is used to acquire an image. Exemplarily, the camera module may include components such as an aperture, a lens, a focus module, and an anti-shake module, wherein the anti-shake module has an optical anti-shake function, and the anti-shake module may be, for example, an optical image stabilizer (Optical Image Stabilizer, OIS), and the anti-shake module may include, for example, a plurality of functional units and a micro controller unit (Micro Controller Unit, MCU). The functional unit may include, for example, a voice coil motor (VCM), a coil, a wire made of a shape memory alloy, a spring structure, and a ball structure in the anti-shake module for realizing the optical anti-shake function. The micro controller unit is connected to the chip of the camera module, and the camera module is connected to the main chip of the electronic device through an integrated circuit bus (Inter Integrated Circuit, IIC), so that the electronic device can control the opening and closing of each functional unit through the micro controller unit.

[0065] refer to Figure 1 As shown, the control method of the camera module includes:

[0066] S100: Determine the motion state of the electronic device where the camera module is located.

[0067] In step S100, the camera module is set in the electronic device. First, the motion state of the electronic device where the camera module is located is determined. The motion state of the electronic device may include a static state and a shaking state. Exemplarily, when the electronic device is set on a tripod for fixing, the motion state of the electronic device is a stable static state. When the user holds the electronic device and shakes it to a certain extent, the motion state of the electronic device is an unstable shaking state.

[0068] S200: Control whether the anti-shake module is in a power saving mode according to the motion state.

[0069] In step S200, whether the anti-shake module is in energy-saving mode can be controlled according to the determined motion state of the electronic device, and the power consumption of the anti-shake module in the energy-saving mode is less than the power consumption of the anti-shake module in the non-energy-saving mode.

[0070] Exemplarily, when the anti-shake module is not in the energy-saving mode, that is, the anti-shake module is in the non-energy-saving mode, each unit in the anti-shake module can be in a fully turned-on state, and the anti-shake module works normally. According to the displacement information of the monitored body shaking, the anti-shake module can generate a reverse movement to offset the shaking. At this time, the power consumption generated by the anti-shake module is the total power consumption of each functional unit and the micro-control unit.

[0071] When the anti-shake module is in energy-saving mode, the functional units in the anti-shake module can be completely turned off, and the power consumption generated by each functional unit is almost 0. The micro-control unit in the anti-shake module is in a dormant state, and the power consumption generated by the micro-control unit is relatively low, which is only 5% to 10% of the total power consumption of the anti-shake module when the functional units are turned on.

[0072] In this embodiment, by determining the motion state of the electronic device where the camera module is located, it is possible to control whether the anti-shake module is in energy-saving mode according to the motion state. When the motion state indicates that the anti-shake module needs to work, the anti-shake module can be controlled to be in non-energy-saving mode; when the motion state indicates that the anti-shake module does not need to work, the anti-shake module can be controlled to be in energy-saving mode, thereby achieving the effect of saving power consumption and extending service life while ensuring imaging quality, thereby improving user experience.

[0073] In some embodiments, according to the motion state, controlling the anti-shake module to be in energy-saving mode or turning off the energy-saving mode includes:

[0074] S210: If the motion state is a static state, control the anti-shake module to be in a power saving mode.

[0075] In step S210, if the motion state of the electronic device is a stationary state, it indicates that the electronic device is in a relatively stable fixed state, such as a scenario where the electronic device is set on a tripod for fixing. At this time, there is no need for optical image stabilization during shooting through the anti-shake module. The anti-shake module is controlled to be in energy-saving mode so that the power consumption generated by the anti-shake module is lower, thereby reducing the overall power consumption of the camera module.

[0076] S220: If the motion state is a shaking state, control the anti-shake module to be in a non-energy-saving mode.

[0077] In step S220, if the motion state of the electronic device is a shaking state, it indicates that the electronic device is in an unstable shaking state, such as a scene when a user holds the electronic device. At this time, optical image stabilization is required during shooting through the anti-shake module. The anti-shake module is controlled to be in a non-energy-saving mode so that the anti-shake module can generate reverse movement to offset the shaking according to the displacement information of the monitored body shaking, so as to achieve optical image stabilization and ensure the final imaging quality.

[0078] In this embodiment, if the motion state is a stationary state, the anti-shake module is controlled to be in an energy-saving mode, and if the motion state is a shaking state, the anti-shake module is controlled to be in a non-energy-saving mode, thereby realizing the control of whether the anti-shake module is in an energy-saving mode according to the motion state. When the electronic device is in a shaking state, the non-energy-saving mode is selected to realize optical anti-shake during shooting, thereby ensuring the final image quality, and when the electronic device is in a shaking state, the energy-saving mode is selected to reduce the overall power consumption of the camera module, thereby achieving the effect of saving power consumption and extending the service life while ensuring the image quality, thereby improving the user experience.

[0079] In some embodiments, the anti-shake module is a memory alloy anti-shake module or a spring-type anti-shake module, and the memory alloy anti-shake module or the spring-type anti-shake module is provided with multiple functional units for realizing the optical anti-shake function and a micro-control unit for controlling each functional unit.

[0080] Exemplarily, the memory alloy anti-shake module realizes optical image stabilization through a shape memory alloy (Shape Memory Alloys, SMA) structure, for example, a wire connected to the lens is made of a shape memory alloy that can be trained to remember a specific shape, and the temperature of the wire is controlled by electric current to control the rotation and movement of the lens in the camera module, so as to keep the relative position of the lens and the optical path fixed to realize optical image stabilization. The shrapnel anti-shake module suspends the lens through a spring structure, and controls the movement of the lens in the camera module by passing electric current into the coil to generate magnetic force, so as to keep the relative position of the lens and the optical path fixed to realize optical image stabilization.

[0081] refer to Figure 2 As shown, according to the motion state, whether the anti-shake module is in energy-saving mode is controlled, including:

[0082] S230 , in response to the motion state switching from the shaking state to the static state, controlling each functional unit in the anti-shake module to be turned off, so that the anti-shake module directly switches to the energy-saving mode.

[0083] In step S230, when the motion state of the electronic device switches from a shaking state to a stationary state, the functional units in the anti-shake module are controlled to be turned off. For example, the memory alloy anti-shake module can be controlled to stop supplying current to the wire made of shape memory alloy, so that the functional units in the memory alloy anti-shake module are all in a closed state with a fixed position. The spring-type anti-shake module can be controlled to stop supplying current to the coil, so that the functional units in the spring-type anti-shake module are all in a closed state with a fixed position. It should be noted that when the functional units in the anti-shake module are controlled to be turned off, the micro-control unit in the anti-shake module is in a dormant state, and the anti-shake module still has the lower power consumption generated by the micro-control unit. When the functional units in the anti-shake module are controlled to be turned off, the anti-shake module directly switches to the energy-saving mode within a shorter response time.

[0084] S240 , in response to the motion state switching from the static state to the shaking state, controlling each functional unit in the anti-shake module to be turned on, so that the anti-shake module directly switches to a non-energy-saving mode.

[0085] In step S230, when the motion state of the electronic device switches from a static state to a shaking state, each functional unit in the anti-shake module is controlled to be turned on. For example, the memory alloy anti-shake module can be controlled to pass a corresponding current into the wire made of shape memory alloy, and the temperature of the wire is controlled by the current to control the connection structure and the rotation and movement of the lens in the camera module. The spring-type anti-shake module can be controlled to pass a current into the coil, and the connection structure and the movement of the lens in the camera module are controlled by the magnetic force generated by the coil. It should be noted that when each functional unit in the anti-shake module is controlled to be turned on, the micro-control unit in the anti-shake module is in a wake-up state, and the overall power consumption of the anti-shake module at this time includes the power consumption generated by each functional unit and the micro-control unit. When each functional unit in the anti-shake module is controlled to be turned on, the anti-shake module directly switches to a non-energy-saving mode within a short response time.

[0086] In this embodiment, if the anti-shake module is a memory alloy anti-shake module or a spring-type anti-shake module, in response to the switching between the static state and the shaking state, by controlling the opening and closing of each functional unit in the anti-shake module, the anti-shake module can be directly switched between the energy-saving mode and the non-energy-saving mode, so that the working mode of the anti-shake module can be consistent with the motion state of the electronic device, and the response speed of the mode switching is improved, while ensuring the imaging quality, the effect of saving power consumption and extending the service life is achieved, and the user experience is improved. In addition, by turning off each functional unit in the anti-shake module so that the anti-shake module is directly switched to the energy-saving mode, since the memory alloy anti-shake module or the spring-type anti-shake module can still ensure the stability of the overall structure after turning off each functional unit, that is, stopping the power supply, the lens can still remain fixed, avoiding the picture jumping and affecting the imaging quality.

[0087] It is understandable that when the anti-shake module is a memory alloy anti-shake module or a spring-type anti-shake module, if the motion state of the electronic device continues to remain in a static state, the functional units in the anti-shake module are controlled to remain in a closed state, so that the anti-shake module remains in a power-saving mode. If the motion state of the electronic device continues to remain in a shaking state, the functional units in the anti-shake module are controlled to remain in an open state, so that the anti-shake module remains in a non-power-saving mode.

[0088] In some other embodiments, the anti-shake module is a ball-type anti-shake module, which is provided with a plurality of functional units for realizing the optical anti-shake function and a micro-control unit for controlling each functional unit.

[0089] Exemplarily, the ball-type anti-shake module is provided with a ball structure and a slide groove structure, and a magnetic force is generated by passing current through the coil to push the magnet. The thrust generated enables the lens to move through the ball structure and the slide groove structure to keep the relative position of the lens and the optical path fixed to achieve optical image stabilization.

[0090] refer to Figure 3 As shown, according to the motion state, whether the anti-shake module is in energy-saving mode is controlled, including:

[0091] S250, in response to the motion state switching from the shaking state to the static state, controlling the coil voltage passing through the anti-shake module to gradually decrease from the first voltage to the second voltage, so that the anti-shake module switches to the energy-saving mode.

[0092] In step S250, when the motion state of the electronic device switches from the shaking state to the static state, the coil voltage passing through the anti-shake module is controlled to gradually drop from the first voltage to the second voltage. The coil voltage is the voltage in the coil passing through the ball-type anti-shake module. The magnitude of the coil voltage determines the magnitude of the magnetic force generated by the coil and thus controls the movement of the lens. Exemplarily, the first voltage is, for example, 5V, and the second voltage is, for example, 0V. When the motion state of the electronic device switches from the shaking state to the static state, the coil voltage passing through the anti-shake module is controlled to gradually drop from 5V to 0V within a preset time of, for example, 1s. When the coil voltage drops to the second voltage, the anti-shake module switches to the energy-saving mode.

[0093] S260, in response to the motion state switching from the static state to the shaking state, controlling the coil voltage passing through the anti-shake module to gradually increase from the second voltage to the first voltage, so that the anti-shake module switches to a non-energy-saving mode.

[0094] In step S260, when the motion state of the electronic device switches from the static state to the shaking state, the coil voltage passing through the anti-shake module is controlled to gradually increase from the second voltage to the first voltage. Exemplarily, when the motion state of the electronic device switches from the shaking state to the static state, the coil voltage passing through the anti-shake module is controlled to gradually increase from 0V to 5V within a preset time of, for example, 1s, and when the coil voltage increases to the first voltage, the anti-shake module switches to the non-energy-saving mode.

[0095] It should be noted that the ball-type anti-shake module is different from the memory alloy anti-shake module or the spring-type anti-shake module. Affected by the ball structure and the slide groove structure, when the ball-type anti-shake module is not powered on, the ball-type anti-shake module is in a free state to a certain extent and cannot be fixed in position, causing the lens to be in a free state as well.

[0096] refer to Figure 4 As shown, Figure 4 The upper part of the diagram is a schematic diagram of the angular acceleration of the electronic device in the x and y directions, where the horizontal axis represents time, with one unit representing, for example, 10 ms, and the vertical axis represents angular acceleration, with one unit representing, for example, 1 rad / s. Figure 4 The lower part of the figure is a displacement diagram of the corresponding anti-shake module, where the horizontal axis represents time, one unit represents 10ms, for example, and the vertical axis represents displacement, one unit represents 0.0014μm, for example. Figure 4 As shown in FIG. 1 , if the functional units in the ball-type anti-shake module are directly turned off when the electronic device is in a stationary state, that is, the coil is directly stopped from being powered, the ball-type anti-shake module will produce a large displacement in a very short time, thereby producing the following Figure 5 The displacement between two adjacent frames is the problem of picture jitter. Figure 5 The left half of the image is the picture taken when the ball-type anti-shake module turns on various functional units. Figure 5 The right half of the figure shows the shooting picture when the functional units of the ball-type anti-shake module are directly turned off, that is, the coil is directly stopped from being powered on.

[0097] Therefore, when controlling the anti-shake module to switch modes, it is necessary to gradually adjust the coil voltage passed into the anti-shake module. Figure 6 As shown, Figure 6 The upper part of the diagram is a schematic diagram of the angular acceleration of the electronic device in the x and y directions, where the horizontal axis represents time, with one unit representing, for example, 10 ms, and the vertical axis represents angular acceleration, with one unit representing, for example, 1 rad / s. Figure 6 The lower part of the figure is a displacement diagram of the corresponding anti-shake module, where the horizontal axis represents time, one unit represents 10ms, for example, and the vertical axis represents displacement, one unit represents 0.0014μm, for example. Figure 6As shown, if the electronic device is in a stationary state, the coil voltage of the anti-shake module is gradually reduced from the first voltage to the second voltage. If the electronic device is in a shaking state, the coil voltage of the anti-shake module is gradually increased from the second voltage to the first voltage. This can prevent the anti-shake module from generating a large displacement in a very short time, ensure smooth movement of the lens, and further ensure that the captured image is a gradually changing process.

[0098] In this embodiment, if the anti-shake module is a ball-type anti-shake module, in response to the switching between the static state and the shaking state, the anti-shake module can be switched between the energy-saving mode and the non-energy-saving mode by controlling the gradual decrease or increase of the coil voltage passed into the anti-shake module, so that the working mode of the anti-shake module can be consistent with the motion state of the electronic device, while ensuring the imaging quality, achieving the effect of saving power consumption and extending the service life, thereby improving the user experience. In addition, controlling the coil voltage to gradually increase or decrease can avoid the problem of the anti-shake module causing a large displacement in a very short time and causing the shooting picture to jump, thereby ensuring the imaging quality during the mode switching process.

[0099] It can be understood that, when the anti-shake module is a ball-type anti-shake module, if the motion state of the electronic device continues to remain in a static state, the coil voltage passed into the anti-shake module is controlled to remain at the second voltage, so that the anti-shake module remains in energy-saving mode. If the motion state of the electronic device continues to remain in a shaking state, the coil voltage passed into the anti-shake module is controlled to remain at the first voltage, so that the anti-shake module remains in non-energy-saving mode.

[0100] In some embodiments, before determining the motion state of the electronic device where the camera module is located, the control method of the camera module also includes: in response to turning on the photo-taking function, controlling the anti-shake module to turn on a non-energy-saving mode.

[0101] Among them, before determining the motion state of the electronic device where the camera module is located, in response to the activation of the photo function, the anti-shake module is first controlled to activate the non-energy-saving mode. The activation of the photo function can be achieved by the user executing a preset operation. When the photo function is activated, the entire camera module starts to work. At this time, the optical image stabilization during shooting is required by the anti-shake module by default, and the anti-shake module is controlled to activate the non-energy-saving mode, so that the anti-shake module can generate reverse movement to offset the shaking according to the displacement information of the body shaking monitored, so as to achieve optical image stabilization to ensure the image quality. After the anti-shake module is controlled to activate the non-energy-saving mode, the motion state of the electronic device is determined again. If the electronic device is detected to be in a shaking state, the anti-shake module is controlled to maintain the non-energy-saving mode. If the electronic device is detected to be in a stationary state, the anti-shake module is controlled to switch to the non-energy-saving mode.

[0102] In this embodiment, before determining the motion state of the electronic device, the anti-shake module is first controlled to turn on the non-energy-saving mode when the camera function is turned on. While the camera function is turned on, optical image stabilization can be achieved during shooting through the anti-shake module, thereby avoiding blurred images caused by taking pictures without turning on the functional units of the anti-shake module during the process of determining the motion state of the electronic device. This ensures the stability of the image quality during the entire shooting process after the camera function is turned on, thereby improving the user experience.

[0103] In some embodiments, reference Figure 7 As shown, determining the motion state of the electronic device where the camera module is located includes:

[0104] S110. Obtain at least one motion data set, each motion data set including motion data corresponding to multiple moments.

[0105] In step S110, one or more motion data sets are obtained, each of which includes motion data corresponding to multiple moments, and the motion data corresponding to each moment may be one or more, and the motion data may be, for example, acceleration data or angular acceleration data, and other motion data that characterize acceleration. Exemplarily, the motion data set includes an acceleration data set and an angular acceleration data set, and the acceleration data set includes three-axis acceleration data corresponding to each moment, and the angular acceleration data set includes three-axis angular velocity data corresponding to each moment.

[0106] S120: Determine the motion state based on each motion data set.

[0107] In step S120, since each motion data set includes motion data that can characterize acceleration or other parameters, the motion state of the electronic device can be determined based on each motion data set, providing a basis for the subsequent control mode of the anti-shake module.

[0108] In this embodiment, by acquiring a motion data set, the motion state of the electronic device can be determined according to the motion data set, thereby achieving the determination of the motion state of the electronic device and providing a basis for the subsequent control mode of the anti-shake module. Each motion data set includes motion data corresponding to multiple moments, which ensures the accuracy of the motion state determination, can accurately distinguish between the static state and the shaking state, and makes the control of the anti-shake module suitable for different scenarios.

[0109] In some embodiments, reference Figure 8 As shown, based on each set of motion data, the motion state is determined, including:

[0110] S121, calculating the average value of the motion data of each motion data set within a first preset time range.

[0111] In step S121, for each motion data set, the average value of the motion data of the motion data set within the first preset time range is calculated. The end time of the first preset time range may be, for example, the current time. When there are multiple motion data corresponding to each time, the average values ​​corresponding to the multiple motion data are calculated respectively. Exemplarily, for the angular acceleration motion data set, each time corresponds to angular acceleration data of three different axes, and the average value of the angular acceleration data of each axis within the 3s time range is calculated respectively.

[0112] S122: If each average value is less than or equal to the corresponding motion data threshold, determine that the motion state is a stationary state.

[0113] In step S122, one or more average values ​​can be obtained for each motion data set, and each average value corresponding to at least one motion data set has a motion data threshold value corresponding thereto. If each average value is less than or equal to the corresponding motion data threshold value, the motion state of the electronic device is determined to be a stationary state. Exemplarily, the motion data threshold value corresponding to the average values ​​of the angular acceleration data of three different axes is 0.05 rad / s. If each average value is less than or equal to 0.05 rad / s, it is determined that at the end time of the first preset time range, i.e., the current time, the motion state of the electronic device is a stationary state.

[0114] S123: If at least one of the average values ​​is greater than the corresponding motion data threshold, determine that the motion state is a shaking state.

[0115] In step S123, if at least one of the average values ​​is greater than the corresponding motion data threshold, the motion state of the electronic device is determined to be a shaking state. Exemplarily, the motion data threshold corresponding to the average values ​​of the angular acceleration data of three different axes is 0.05 rad / s. If one, two or three of the three average values ​​are greater than 0.05 rad / s, it is determined that at the end time of the first preset time range, that is, the current etching, the motion state of the electronic device is a shaking state.

[0116] In this embodiment, by calculating the average value of the motion data of each motion data set within the first preset time range, the motion state can be determined as a stationary state or a shaking state according to the comparison result of each average value and the corresponding motion data threshold, thereby realizing the determination of the motion state of the electronic device. By calculating the average value of the motion data of each motion data set within the first preset time range, the motion data anomaly caused by device noise can be avoided, the interference of abnormal data on the calculation result can be eliminated, and the accuracy of the motion state determination can be ensured.

[0117] In some embodiments, obtaining at least one motion data set includes: obtaining motion data from at least one sensor, wherein the motion data obtained by each sensor constitutes a motion data set; the sensor includes an acceleration sensor, or the sensor includes a gyroscope, or the sensor includes an acceleration sensor and a gyroscope.

[0118] Wherein, the motion data is acquired through sensors, and the motion data acquired by different sensors constitute different motion data sets, and the sensor includes an acceleration sensor for acquiring acceleration data and a gyroscope for acquiring angular acceleration data. Exemplarily, the acceleration data acquired through the acceleration sensor constitutes an acceleration motion data set, and the angular acceleration data acquired through the gyroscope constitutes an angular acceleration motion data set, so as to acquire two motion data sets.

[0119] In this embodiment, by acquiring motion data through sensors, the motion data acquired by different sensors can constitute different motion data sets, thereby achieving the acquisition of multiple motion data sets. By setting the sensor as an acceleration sensor and a gyroscope, motion data sets representing acceleration and angular acceleration can be acquired respectively, so that the motion state of the electronic device can be analyzed based on the acceleration and angular acceleration of the electronic device, further improving the accuracy of determining the motion state of the electronic device.

[0120] In some embodiments, when the anti-shake module is in the energy-saving mode, each functional unit in the anti-shake module is in a closed state, and the micro-control unit in the anti-shake module is in a dormant state.

[0121] For each type of anti-shake module, when the anti-shake module is in energy-saving mode, each functional unit in the anti-shake module is in a closed state, and the power consumption generated by each functional unit is almost 0. However, the micro-control unit in the anti-shake module needs to maintain connection with the camera module and the chip of the electronic device to keep the electronic device controlling the anti-shake module. The micro-control unit is in a sleep state, and the power consumption generated by the micro-control unit is low, so that the power consumption generated by the anti-shake module when it is in energy-saving mode is low.

[0122] In this embodiment, when the anti-shake module is in energy-saving mode, by setting each functional unit to a closed state and the micro-control unit to a sleep state, the power consumption generated by the anti-shake module can be reduced as much as possible while maintaining the electronic device's control over the anti-shake module, thereby reducing the overall power consumption of the camera module, extending the service life of each unit of the anti-shake module, and improving the user experience.

[0123] In an exemplary embodiment, reference Fig. 9 As shown, a control method of a camera module is provided, and the control method of the camera module includes:

[0124] S1, in response to starting the camera function, controlling the anti-shake module to start a non-energy-saving mode;

[0125] S2. Acquire at least one motion data set;

[0126] S3, calculating the average value of the motion data of each motion data set within the first preset time range;

[0127] S4, judging the motion state of the electronic device where the camera module is located according to each average value and the corresponding motion data threshold, if the motion state is a stationary state, executing S5, if the motion state is a shaking state, executing S6;

[0128] S5, control the anti-shake module to be in energy-saving mode;

[0129] S6. Control the anti-shake module to be in non-energy-saving mode.

[0130] In this embodiment, by determining the motion state of the electronic device where the camera module is located, it is possible to control whether the anti-shake module is in energy-saving mode according to the motion state. When the motion state indicates that the anti-shake module needs to work, the anti-shake module can be controlled to be in non-energy-saving mode; when the motion state indicates that the anti-shake module does not need to work, the anti-shake module can be controlled to be in energy-saving mode, thereby achieving the effect of saving power consumption and extending service life while ensuring imaging quality, thereby improving user experience.

[0131] In an exemplary embodiment, reference Fig.10 As shown, a control device for a camera module is provided, the camera module includes an anti-shake module, and the control device for the camera module includes a determination module 10 and a first control module 20. The determination module 10 is used to determine the motion state of the electronic device where the camera module is located, and the first control module 20 is used to control whether the anti-shake module is in energy-saving mode according to the motion state.

[0132] In this embodiment, the motion state of the electronic device where the camera module is located is determined by determining module 10, and whether the anti-shake module is in energy-saving mode can be controlled by the first control module 20 according to the motion state. When the motion state indicates that the anti-shake module needs to work, the anti-shake module can be controlled to be in non-energy-saving mode; when the motion state indicates that the anti-shake module does not need to work, the anti-shake module can be controlled to be in energy-saving mode, thereby achieving the effect of saving power consumption and extending service life while ensuring imaging quality, thereby improving user experience.

[0133] In one embodiment, the determination module 10 is further used to: obtain at least one motion data set, each motion data set including motion data corresponding to multiple moments; and determine the motion state based on each motion data set.

[0134] In one embodiment, the determination module 10 is also used to: calculate the average value of the motion data of each motion data set within a first preset time range; if each average value is less than or equal to the corresponding motion data threshold, determine that the motion state is a stationary state; if at least one average value among the average values ​​is greater than the corresponding motion data threshold, determine that the motion state is a shaking state.

[0135] In one embodiment, the determination module 10 is further used to: acquire motion data from at least one sensor, and the motion data acquired by each sensor constitutes a motion data set; the sensor includes an acceleration sensor and / or a gyroscope.

[0136] In one embodiment, the first control module 20 is further used to: if the motion state is a stationary state, control the anti-shake module to be in an energy-saving mode; if the motion state is a shaking state, control the anti-shake module to be in a non-energy-saving mode.

[0137] In one embodiment, the anti-shake module is a memory alloy anti-shake module or a spring-type anti-shake module, and the first control module 20 is further used to: in response to the motion state switching from the shaking state to the static state, control each functional unit in the anti-shake module to turn off, so that the anti-shake module directly switches to the energy-saving mode. In response to the motion state switching from the static state to the shaking state, control each functional unit in the anti-shake module to turn on, so that the anti-shake module directly switches to the non-energy-saving mode.

[0138] In one embodiment, the anti-shake module is a ball-type anti-shake module, and the first control module 20 is also used to: in response to the motion state switching from a shaking state to a static state, control the coil voltage passed into the anti-shake module to gradually decrease from the first voltage to the second voltage, so that the anti-shake module switches to a power-saving mode; in response to the motion state switching from a static state to a shaking state, control the coil voltage passed into the anti-shake module to gradually increase from the second voltage to the first voltage, so that the anti-shake module switches to a non-energy-saving mode.

[0139] In some embodiments, the control device of the camera module also includes a second control module, and the second control module is used to control the anti-shake module to turn on the non-energy-saving mode in response to turning on the photo-taking function.

[0140] In the present embodiment, before determining the state of motion of the electronic device, when turning on the photographing function, the anti-shake module is first controlled by the second control module to turn on the non-energy-saving mode. When the photographing function is turned on, the anti-shake module can realize optical image stabilization during shooting, thereby avoiding blurred imaging caused by taking a photo when the functional units of the anti-shake module are not turned on during the process of determining the state of motion of the electronic device. This ensures the stability of the imaging quality during the entire shooting process after the photographing function is turned on, thereby improving the user experience.

[0141] In an exemplary embodiment, an electronic device is provided. The electronic device may be a shooting device with photo or video recording functions such as a mobile phone, a digital camera, or a tablet computer. The shooting device is provided with a camera module, and the camera module includes an anti-shake module. The electronic device may also be other devices with data processing capabilities connected to the shooting device.

[0142] refer to Fig.11 As shown, the electronic device may include one or more of the following modules: a processing module 101 , a memory 102 , a power module 103 , a multimedia module 104 , an audio module 105 , an input / output (I / O) interface 106 , a sensor module 107 , and a communication module 108 .

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

[0144] The memory 102 is configured to store various types of data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc. The memory 102 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.

[0145] The power module 103 provides power to various modules of the electronic device. The power module 103 may include a power management system, one or more power supplies, and other modules associated with generating, managing, and distributing power to the electronic device.

[0146] The multimedia module 104 includes a screen that provides an output interface between the electronic device 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 module 104 includes a front camera and / or a rear camera. When the electronic device 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 the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0147] The audio module 105 is configured to output and / or input audio signals. For example, the audio module 105 includes a microphone (MIC), and when the electronic device is in an operation 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 102 or sent via the communication module 108. In some embodiments, the audio module 105 also includes a speaker for outputting audio signals.

[0148] The I / O interface 106 provides an interface between the processing module 101 and the peripheral interface module, which may be a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0149] The sensor module 107 includes one or more sensors for providing various aspects of status assessment for the electronic device. For example, the sensor module 107 can detect the on / off state of the electronic device, the relative positioning of the modules, such as the display and keypad of the electronic device, and the sensor module 107 can also detect the position change of the electronic device or a module of the electronic device, the presence or absence of user contact with the electronic device, the orientation or acceleration / deceleration of the electronic device and the temperature change of the electronic device. The sensor module 107 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor module 107 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor module 107 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

[0150] The communication module 108 is configured to facilitate wired or wireless communication between the electronic device and other devices. The device 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 module 108 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication module 108 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.

[0151] In an exemplary embodiment, the electronic device can 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 execute the above-mentioned control method of the camera module applied to the electronic device.

[0152] In an exemplary embodiment, a non-temporary computer-readable storage medium including instructions is also provided, such as a memory 102 including instructions, and the above instructions can be executed by a processor 109 of an electronic device to complete the above-mentioned control method of a camera module applied to the electronic device. For example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc. When the instructions in the storage medium are executed by the processor 109 of the electronic device, the electronic device is enabled to execute the control method of the camera module shown in the above-mentioned embodiment.

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

[0154] It should be understood that the present invention is not limited to the exact construction that has 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 invention is limited only by the appended claims.

Claims

1. A method for controlling a camera module, characterized in that: The camera module includes an anti-shake module, and the control method of the camera module includes: Determine the motion state of the electronic device where the camera module is located; According to the motion state, whether the anti-shake module is in a power saving mode is controlled.

2. The camera module control method according to claim 1, characterized in that: The controlling, according to the motion state, whether the anti-shake module is in the energy-saving mode comprises: If the motion state is a stationary state, controlling the anti-shake module to be in the energy-saving mode; If the motion state is a shaking state, the anti-shake module is controlled to be in a non-energy-saving mode.

3. The control method of the camera module according to claim 2, characterized in that: The anti-shake module is a memory alloy anti-shake module or a spring-type anti-shake module, and the controlling whether the anti-shake module is in the energy-saving mode according to the motion state includes: In response to the motion state switching from the shaking state to the static state, controlling each functional unit in the anti-shake module to be turned off, so that the anti-shake module directly switches to the energy-saving mode; In response to the motion state switching from the static state to the shaking state, each of the functional units in the anti-shake module is controlled to be turned on, so that the anti-shake module directly switches to the non-energy-saving mode.

4. The control method of the camera module according to claim 2, characterized in that: The anti-shake module is a ball-type anti-shake module, and controlling whether the anti-shake module is in energy-saving mode according to the motion state includes: In response to the motion state switching from the shaking state to the static state, controlling the coil voltage passing through the anti-shake module to gradually decrease from the first voltage to the second voltage, so that the anti-shake module switches to the energy-saving mode; In response to the movement state switching from the static state to the shaking state, the coil voltage passing through the anti-shake module is controlled to gradually increase from the second voltage to the first voltage, so that the anti-shake module switches to the non-energy-saving mode.

5. The camera module control method according to claim 2, characterized in that: Before determining the motion state of the electronic device where the camera module is located, the control method of the camera module further includes: In response to starting the photo-taking function, the anti-shake module is controlled to start the non-energy-saving mode.

6. The camera module control method according to claim 1, characterized in that: The determining the motion state of the electronic device where the camera module is located includes: Acquire at least one motion data set, each of the motion data sets including motion data corresponding to multiple moments; Based on each of the motion data sets, the motion state is determined.

7. The control method of the camera module according to claim 6, characterized in that: The determining the motion state based on each of the motion data sets includes: Calculate the average value of the motion data of each of the motion data sets within a first preset time range; If each of the average values ​​is less than or equal to the corresponding motion data threshold, it is determined that the motion state is a stationary state; If at least one of the average values ​​is greater than the corresponding motion data threshold, it is determined that the motion state is a shaking state.

8. The camera module control method according to claim 7, characterized in that: The obtaining of at least one motion data set comprises: Acquire motion data from at least one sensor, wherein each piece of motion data acquired by the sensor constitutes a set of motion data; The sensor includes an acceleration sensor and / or a gyroscope.

9. The camera module control method according to any one of claims 1 to 8, characterized in that: When the anti-shake module is in the energy-saving mode, all functional units in the anti-shake module are in a closed state, and the micro-control unit in the anti-shake module is in a dormant state.

10. A control device for a camera module, characterized in that: The camera module includes an anti-shake module, and the control device of the camera module includes: A determination module, the determination module is used to determine the motion state of the electronic device where the camera module is located; A first control module, wherein the first control module is used to control whether the anti-shake module is in a power saving mode according to the motion state.

11. The control device of the camera module according to claim 10, characterized in that: The control device of the camera module also includes: The second control module is used for controlling the anti-shake module to start a non-energy-saving mode in response to starting a camera function.

12. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Determine the motion state of the electronic device where the camera module is located; According to the motion state, whether the anti-shake module is in the energy-saving mode is controlled.

13. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of the electronic device, the electronic device is enabled to execute a method for controlling a camera module, the method for controlling the camera module comprising: Determine the motion state of the electronic device where the camera module is located; According to the motion state, whether the anti-shake module is in the energy-saving mode is controlled.