CN115022548A - Control method, control device, electronic apparatus, and medium - Google Patents

Control method, control device, electronic apparatus, and medium Download PDF

Info

Publication number
CN115022548A
CN115022548A CN202210719145.1A CN202210719145A CN115022548A CN 115022548 A CN115022548 A CN 115022548A CN 202210719145 A CN202210719145 A CN 202210719145A CN 115022548 A CN115022548 A CN 115022548A
Authority
CN
China
Prior art keywords
shake compensation
camera module
current
control method
shake
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210719145.1A
Other languages
Chinese (zh)
Inventor
黎洪宋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210719145.1A priority Critical patent/CN115022548A/en
Publication of CN115022548A publication Critical patent/CN115022548A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The application discloses a control method, a control device, an electronic apparatus, and a medium. The control method comprises the following steps: determining a calibration value according to the current focal length of the camera module; determining anti-shake compensation quantity according to the current real-time posture of the camera module and the current filtering posture of the camera module; and controlling the camera module to move to perform anti-shake compensation according to the calibration value and the anti-shake compensation amount. According to the control method, the control device, the electronic equipment and the medium, the camera module can be controlled to move by combining with the current focal length of the camera module, the anti-shake compensation requirements under different focusing states can be met, stable and consistent shake compensation is guaranteed under different current focal lengths, and the anti-shake effect is guaranteed.

Description

Control method, control device, electronic apparatus, and medium
Technical Field
The present disclosure relates to the field of anti-shake technology, and more particularly, to a control method, a control device, an electronic device, and a medium.
Background
In the shooting process, if the shooting device shakes, the shot image is not clear, and the shooting difficulty for keeping the shooting device stable is high. Therefore, in the related art, an optical anti-shake technology is adopted to solve the problem of blurred shot images caused by shooting shake, however, some special scenes are not considered in the optical anti-shake technology, so that the image improvement effect under the special scenes is poor.
Disclosure of Invention
The embodiment of the application provides a control method, a control device, electronic equipment and a medium.
The control method of the embodiment of the application comprises the following steps: determining a calibration value according to the current focal length of the camera module; determining anti-shake compensation quantity according to the current real-time posture of the camera module and the current filtering posture of the camera module; and controlling the camera module to move to perform anti-shake compensation according to the calibration value and the anti-shake compensation amount.
The control device comprises a first processing module, a second processing module and a control module, wherein the first processing module is used for determining a calibration value according to the current focal length of the camera module; the second processing module is used for determining anti-shake compensation quantity according to the current real-time posture of the camera module and the current filtering posture of the camera module; the control module is used for controlling the camera module to move according to the calibration value and the anti-shake compensation amount so as to perform anti-shake compensation.
The electronic device according to an embodiment of the present application includes one or more processors and a memory, where the memory stores a computer program, and the computer program, when executed by the processors, implements the steps of the control method described above.
The computer-readable storage medium of the embodiments of the present application has stored thereon a computer program that, when executed by a processor, implements the steps of the control method described in the above-described embodiments.
According to the control method, the control device, the electronic equipment and the medium, the camera module can be controlled to move by combining with the current focal length of the camera module, the anti-shake compensation requirements under different focusing states can be met, stable and consistent shake compensation is guaranteed under different current focal lengths, and the anti-shake effect is guaranteed.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flow chart of a control method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a control device according to an embodiment of the present application;
FIG. 3 is a schematic diagram of the control method of an embodiment of the present application;
FIG. 4 is a schematic flow chart diagram of a control method according to an embodiment of the present application;
FIG. 5 is a schematic view of a control device according to an embodiment of the present application;
FIG. 6 is a schematic view of an electronic device according to an embodiment of the present application;
FIG. 7 is another schematic diagram of an electronic device of an embodiment of the present application;
FIG. 8 is yet another schematic view of an electronic device of an embodiment of the present application;
fig. 9 is a flowchart illustrating a control method according to an embodiment of the present application;
FIG. 10 is a schematic view of a control device according to an embodiment of the present application;
FIG. 11 is another schematic diagram of a control method according to an embodiment of the present application;
FIG. 12 is a schematic view of a control device according to an embodiment of the present application;
fig. 13 is a flowchart illustrating a control method according to an embodiment of the present application;
FIG. 14 is a schematic view of a control device according to an embodiment of the present application;
fig. 15 is a flowchart illustrating a control method according to an embodiment of the present application;
FIG. 16 is a schematic view of a control device according to an embodiment of the present application;
fig. 17 is a flowchart illustrating a control method according to an embodiment of the present application;
fig. 18 is a schematic diagram of a control device according to an embodiment of the present application;
fig. 19 is a flowchart illustrating a control method according to an embodiment of the present application;
FIG. 20 is a schematic view of a control device according to an embodiment of the present application;
fig. 21 is a flowchart illustrating a control method according to an embodiment of the present application;
fig. 22 is a schematic diagram of an electronic device according to an embodiment of the present application.
Description of the main element symbols:
the electronic device 100, the camera module 10, the lens 111, the lens barrel 1111, the image sensor 113, the first driving member 115, the first magnetic member 1151, the first coil 1153, the first magnetic induction sensor 1155, the first iron case 1157, the first ball bearing 1159, the second driving member 117, the second magnetic member 1171, the second coil 1173, the second magnetic induction sensor 1175, the second iron case 1177, the second ball bearing 1179, the image processor 119, the anti-shake driving circuit 121, the focus driving circuit 123, the memory 40, and the processor 50;
the control device 200, the first processing module 21, the first determining unit 211, the second determining unit 213, the second processing module 23, the control module 25, the first processing unit 251, the second processing unit 253, the first processing subunit 2531, the control subunit 2533, the third processing unit 255, the second processing subunit 2551, the third processing subunit 2553, the focusing module 27, the third processing module 29, and the fourth processing module 28.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are illustrative and are only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the embodiments of the present application, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to imply that the number of indicated technical features is significant. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the embodiments of the present application, "a plurality" means two or more unless specifically defined otherwise.
Referring to fig. 1, the control method includes:
01: determining a calibration value according to the current focal length of the camera module 10;
03: determining an anti-shake compensation amount according to the current real-time posture of the camera module 10 and the current filtering posture of the camera module 10;
05: and controlling the camera module 10 to move for anti-shake compensation according to the calibration value and the anti-shake compensation amount.
Referring to fig. 2, the control method according to the embodiment of the present application can be implemented by the control device 200 according to the embodiment of the present application, wherein step 01 can be implemented by the first processing module 21, step 03 can be implemented by the second processing module 23, and step 05 can be implemented by the control module 25. That is, the first processing module 21 can be used to determine the calibration value according to the current focal length of the camera module 10. The second processing module 23 can be used to determine the anti-shake compensation amount according to the current real-time pose of the camera module 10 and the current filtering pose of the camera module 10. The control module 25 can be used to control the camera module 10 to move for anti-shake compensation according to the calibration value and the anti-shake compensation amount.
The control method and the control device 200 according to the embodiment of the application can control the camera module 10 to move in combination with the current focal length of the camera module 10, can meet the anti-shake compensation requirements in different focusing states, and ensure stable and consistent shake compensation under different current focal lengths, thereby ensuring the anti-shake effect.
Specifically, taking the example of performing compensation and correction by moving the image sensor 113, the moving distance of the image sensor 113 is related to the focal length of the camera module 10, and in the related art, the anti-shake compensation is not performed in combination with the focal length of the camera module 10, which makes the anti-shake effect poor. This application combines current focus to carry out the anti-shake compensation, can realize better anti-shake compensation effect under the scene that the focus changes. For example, referring to fig. 3, in order to compensate for the same angle θ, when the focal length is f1, the distance that the image sensor 113 needs to move is X, and when the focal length is f2, the distance that the image sensor 113 needs to move is X + Δ X, so that the anti-shake compensation is performed in combination with the focal length of the camera module 10, and a good anti-shake compensation effect can be achieved in a scene where the focal length changes.
The camera module 10 can be applied to the electronic device 100. The electronic device 100 may include a smart phone, a tablet computer, a smart watch, a smart bracelet, and the like, which are not specifically limited herein. The electronic device 100 according to the embodiment of the present application is illustrated as a smart phone, and is not to be construed as a limitation to the present application.
The control device 200 can be applied to the electronic device 100, and the control device 200 can be used to control the camera module 10 to perform anti-shake compensation. The control device 200 may be integrated in the camera module 10, and is not limited in particular.
The current real-time pose is used to represent the current pose of the camera module 10 after shaking, and the current real-time pose may be obtained by a motion sensor, and specifically, the electronic device 100 may include a motion sensor. The motion sensor may include an accelerometer (Acc) that may be used to detect acceleration data of the camera module 10. The motion sensor may further include a gyroscope (Gyro), which may be used to detect and obtain angular velocity data of the camera module 10. Of course, the motion sensor may also include other motion sensors, which are not specifically limited herein.
The anti-shake compensation amount may represent a difference between the current real-time attitude and the current filtering attitude, i.e. the anti-shake compensation amount may be understood as a distance of shake. Specifically, Δ Q ═ Q i Qfilter, where Δ Q is the amount of anti-shake compensation, Q i And the current real-time attitude, Qfilter is the current filtering attitude. Where Δ Q is a vector (Δ x, Δ y, Δ z). Δ x, Δ y, Δ z represent anti-shake compensation amounts on XYZ axes, respectively.
It should be noted that the camera module 10 may include a lens 111 and an image sensor 113, and when the camera module 10 is controlled to move for anti-shake compensation, the lens 111 may be controlled to move for anti-shake compensation, the image sensor 113 may also be controlled to move for anti-shake compensation, and the lens 111 and the image sensor 113 may also be controlled to move for anti-shake compensation, which is not limited in this application. For example, when the camera module 10 shakes vertically upward as a whole, the lens 111 may be controlled to move vertically downward for anti-shake compensation, the image sensor 113 may be controlled to move vertically upward for anti-shake compensation, and the lens 111 may be controlled to move vertically downward and the image sensor 113 may be controlled to move vertically upward for anti-shake compensation.
For example, in an embodiment, referring to fig. 8, the electronic device 100 includes an image sensor 113 and a second driving element 117, and the second driving element 117 can drive the image sensor 113 to move under the action of a second driving current. Specifically, the second driving member 117 may be a voice coil motor. The second driving member 117 includes a second magnetic member 1171, a second Coil 1173(Coil), a second magnetic induction sensor 1175, a second iron case 1177 and a second ball bearing 1179, the second magnetic member 1171 is fixedly mounted on the image sensor 113, the second Coil 1173 and the second magnetic induction sensor 1175 are fixedly mounted on the second iron case 1177, the second Coil 1173 can drive the image sensor 113 to move under the action of a second driving current, the second magnetic induction sensor 1175 can measure the position of the image sensor 113 based on the change of the magnetic flux when the image sensor 113 moves, and the second ball bearing 1179 is disposed at the side of the image sensor 113 to control the stability when the image sensor 113 moves in the side direction. The second magnetic induction sensor 1175 may comprise a Hall sensor (Hall).
Referring to fig. 4, in some embodiments, the control method further includes:
07: when a shooting command is received, focusing operation is carried out;
09: when the focusing operation is completed, the current focal length of the camera module 10 is obtained.
Referring to fig. 5, in some embodiments, the control device 200 further includes a focusing module 27 and a third processing module 29, wherein step 01 can be implemented by the focusing module 27, and step 09 can be implemented by the third processing module 29. That is, the focusing module 27 may be used to perform a focusing operation upon receiving a photographing command. The third processing module 29 can be used to obtain the current focal length of the camera module 10 when the focusing operation is completed.
So, can focus and carry out anti-shake compensation after the operation is accomplished, for carrying out anti-shake compensation according to the focus and provide the basis, avoid focusing control and anti-shake compensation independent work during, because the shake compensation effect degradation that the signal asynchronous caused.
In some embodiments, the image sensor 113 performs exposure while controlling the camera module 10 to move for anti-shake compensation.
In addition, for example, the Optical Image Stabilization (OIS) is taken as an example, because the frequency of the anti-shake compensation is high and the compensation range is small, the method is generally used for suppressing motion blur, but not for Image Stabilization during video shooting, so that anti-shake is not required during a frame interval period and a reading period before exposure of the Image sensor 113, that is, the anti-shake compensation and the exposure timing are combined, thereby avoiding unnecessary power consumption overhead of the anti-shake compensation and improving the efficiency of the anti-shake compensation.
Specifically, referring to fig. 7, in an embodiment, the electronic device 100 includes an image processor 119, an image sensor 113, an anti-shake driving circuit 121, and a focus driving circuit 123, and after the focus driving circuit 123 returns a focus completion signal, the image processor 119 may send an anti-shake enabling command to the anti-shake driving circuit 121 to perform anti-shake compensation, and send an exposure enabling command to the image sensor 113 to expose the image sensor 113.
In one embodiment, referring to fig. 6 and 7, an electronic device 100 includes a lens 111 and an image sensor 113, the lens 111 includes a barrel 1111, the electronic device 100 further includes a first driving member 115, the first driving member 115 can drive the lens 111 to move along an axial direction of the barrel 1111 to achieve focusing, and the lens 111 further includes a lens, and the lens is fixedly mounted on the barrel 1111. Specifically, the first driving member 115 may include a ball type voice coil motor, a leaf spring type voice coil motor, a piezoelectric motor, and the like. The first driving member 115 may include a first magnetic member 1151, a first Coil 1153(Coil), a first magnetic induction sensor 1155, a first iron shell 1157 and a first ball bearing 1159, the first magnetic member 1151 is fixedly mounted to the lens barrel 1111, the first Coil 1153 and the first magnetic induction sensor 1155 are fixedly mounted to the first iron shell 1157, the first Coil 1153 is capable of driving the lens 111 to move under the action of a first driving current, the first magnetic induction sensor 1155 is capable of measuring the position of the lens 111 based on a change in magnetic flux when the lens 111 moves, and the first ball bearing 1159 is disposed on the lens barrel 1111 to control stability when the lens 111 moves along the axial direction of the lens barrel 1111. When the first coil 1153 is turned on by the changed first driving current, a lorentz force may be generated, and after the lorentz force acts on the first magnetic member 1151, the first magnetic member 1151 drives the lens 111 to move. Since the data measured by the first magnetic induction sensor 1155 is transmitted to the focus driving circuit 123 in real time, the first driving current can be continuously adjusted to ensure that the lens 111 reaches an accurate focus position.
It should be noted that the shooting command may be initiated by the user through the electronic device 100, for example, the user may initiate the shooting command in the form of a key, a touch, or a voice command. The shooting command may also be initiated by an Application (APP) installed by the electronic device 100. The capture command may include a photograph capture request or a video recording request.
In the focusing operation, it is understood that moving the lens 111 changes the focal length of the lens 111 so that the light reflected by the subject is captured by the image sensor 113 through the lens 111 to generate an original image with high sharpness. The focusing operation may be automatic focusing or manual focusing by a user, which is not limited herein. It is understood that the current focal length of the lens 111 can be automatically determined after the focusing operation is completed.
In some embodiments, referring to fig. 9, step 01 includes:
011: determining the current object distance according to the current focal length and a preset lookup table, wherein the preset lookup table comprises the corresponding relation between the current focal length and the current object distance;
013: and determining a calibration value according to the current focal length and the current object distance.
Referring to fig. 10, in some embodiments, the first processing module 21 includes a first determining unit 211 and a second determining unit 213. Step 011 can be implemented by the first determination unit 211 and step 013 can be implemented by the second determination unit 213. That is, the first determining unit 211 may be configured to determine the current object distance according to the current focal length and a preset lookup table, where the preset lookup table includes a corresponding relationship between the current focal length and the current object distance. The second determination unit 213 may be configured to determine a calibration value according to the current focal length and the current object distance.
Therefore, the calibration value can be determined according to the current focal length, and a basis is provided for anti-shake compensation by considering the current focal length.
Specifically, taking the example of performing the anti-shake compensation by moving the image sensor 113, the calibration value may be used to represent a corresponding relationship between the anti-shake compensation amount and the required movement distance of the image sensor 113, and the calibration value may be obtained through experiments, calculations, and the like, which is not limited in this application. It is understood that the focal length and the object distance have a corresponding relationship, and the preset lookup table may be set according to different af (Auto Focus) values, so that the current object distance is determined by the focal length and the preset lookup table. With the object distance and focal length known, the gaussian imaging formula can be substituted to obtain the image distance.
The calibration value can be expressed by the formula: F/(X + F) where F denotes an image distance and X denotes an object distance.
Further, the calibration value is the ratio of the current focal length to the current object distance.
Thus, the calibration value is convenient to calculate.
Specifically, when the calibration value is calculated by using the formula F/(X + F), the object distance needs to be obtained through the focal length, and then the image distance is obtained through the focal length and the object distance, which is complicated. In the present embodiment, the gaussian imaging formula is substituted into F/(X + F), the image-removing distance is reduced, and the calculation formula F of the calibration value is obtained 0 /X, wherein f 0 Indicating the focal length. In this way, the calibration values can be obtained faster.
It should be noted that, since the focal length and the object distance have the same corresponding relationship under the same af value, the calibration value is the same under the same af value. In one embodiment, the calibration value table is set according to the af value. Therefore, the calibration value table can be quickly searched according to the af value to obtain the calibration value, and the calculation speed of the anti-shake compensation is increased.
For ease of understanding, the following examples are given. Referring to fig. 11, the left side of fig. 11 shows the imaging state of the camera module 10 when it is not shaken, and the right side of fig. 11 isThe square represents the imaging state of the camera module 10 after shaking Δ L upward, the lower right side of fig. 11 represents the imaging state after anti-shake compensation, and the gaussian imaging formula is substituted into h ═ Δ L × [ F/(X + F)]Obtaining h ═ Δ L (f) 0 /X), where F denotes the image distance, X denotes the object distance, F 0 Denotes the focal length, f 0 EFL (Effective Focal Length) denotes an Effective Focal Length. In one embodiment, to compensate for Δ L of the jitter, the lens 111 is moved down by h, and the calibration value can be used to represent the corresponding relationship between Δ L and h in fig. 11. It is worth mentioning that in other embodiments, the anti-shake compensation may be implemented by moving the image sensor 113 up h.
In some embodiments, the control method further comprises:
and determining the current filtering attitude of the camera module 10 according to the current real-time attitude, the preset anti-shake intensity value and the preorder filtering attitude of the camera module 10.
Referring to fig. 12, in some embodiments, the control device 200 further includes a fourth processing module 28, and the steps can be implemented by the fourth processing module 28. That is, the fourth processing module 28 can be configured to determine the current filtering posture of the camera module 10 according to the current real-time posture, the preset anti-shake intensity value and the preamble filtering posture of the camera module 10.
Thus, the current filtering posture of the camera module 10 can be accurately determined according to the current real-time posture, the preset anti-shake intensity value and the preorder filtering posture, and a suitable anti-shake compensation amount can be determined according to the current real-time posture and the current filtering posture.
Specifically, the current real-time posture and the preamble filtering posture may be fused based on a preset anti-shake intensity value to obtain the current filtering posture. In some embodiments, the preset anti-shake intensity value may be used as weight information of the current real-time posture, the weight information corresponding to the preamble filtering posture may be determined according to the preset anti-shake intensity value, and the current real-time posture, the preamble filtering posture and the respective weight information may be subjected to fusion processing to obtain the current filtering posture, for example, the current real-time posture and the preamble filtering posture may be subjected to weighted summation based on the respective weight informationTo obtain the current filtering attitude. In one embodiment, Qfilter ═ F (alpha, Q) i ,Qfilter i-1 ) Wherein Qfilter is the current filtering attitude, F is the fusion processing algorithm, alpha is the preset anti-shake intensity value, Q i For the current attitude, Qfilter i-1 Is the preamble filter gesture. The preamble filter gesture may refer to a filter gesture of a preamble time, and the preamble time may refer to a time before the current time, and may be a time before the current time, a plurality of times before the current time, and a plurality of times before the current time, such as two times before, three times before, and the like. The preamble filtering attitude may be obtained by performing filtering processing on attitude information of the preamble time, for example, may be obtained by Kalman filtering (Kalman filtering) processing. The Kalman filtering is an algorithm for performing optimal estimation on the system state by using a linear system state equation and inputting and outputting observation data through a system.
Referring to fig. 13, in some embodiments, step 05 includes:
051: determining the anti-shake compensation stroke of the camera module 10 according to the anti-shake compensation amount and the calibration value;
053: and controlling the lens 111 to move for anti-shake compensation according to the current stroke position and the anti-shake compensation stroke of the lens 111 of the camera module 10.
In some embodiments, referring to fig. 14, the control module 25 includes a first processing unit 251 and a second processing unit 253, and step 051 can be implemented by the first processing unit 251, and step 053 can be implemented by the second processing unit 253. That is, the first processing unit 251 can be used to determine the anti-shake compensation stroke of the camera module 10 according to the anti-shake compensation amount and the calibration value. The second processing unit 253 is configured to control the lens 111 to move for anti-shake compensation according to the current stroke position and the anti-shake compensation stroke of the lens 111 of the camera module 10.
Thus, the anti-shake compensation stroke can be obtained according to the anti-shake compensation amount and the calibration value, and the lens 111 is controlled to move according to the anti-shake compensation stroke and the current stroke position of the lens 111 to realize anti-shake compensation.
Specifically, the optical anti-shake is realized by controlling the movement of the lens 111, and the lens 111 can be pushed in a first direction and a second direction, wherein the first direction and the second direction are perpendicular to each other. For example, the first direction is an X direction, the second direction is a Y direction, and the lens 111 can be pushed in the X direction and the Y direction, and the pushed stroke unit is code. The anti-shake compensation stroke refers to a stroke that is pushed in the X direction or the Y direction when the camera module 10 shakes, and the anti-shake compensation stroke is used for compensating for shaking of the camera module 10.
The stroke center position of the camera module 10 is generally a linear stroke, and the stroke center position can be used as a reference position, so that the precise anti-shake compensation of the lens 111 is easily realized. The anti-shake compensation stroke of the camera module 10 can be calculated according to the anti-shake compensation amount, the calibration value, and the stroke center position. In one embodiment, the product of the anti-shake compensation amount and the calibration value is summed with the stroke center position to obtain the anti-shake compensation stroke of the camera module 10. The anti-shake compensation stroke mainly refers to the anti-shake compensation stroke in the X direction and the Y direction, and the delta z can not participate in calculation. For example, the anti-shake compensation stroke of the camera module 10 includes an anti-shake compensation stroke Δ code _ X in the X direction and an anti-shake compensation stroke Δ code _ Y in the Y direction, the anti-shake compensation amount includes an anti-shake compensation amount Δ X in the X direction and an anti-shake compensation amount Δ Y in the Y direction, the calibration value includes a calibration value gain _ X in the X direction and a calibration value gain _ Y in the Y direction, the stroke center position includes a stroke center position center _ code _ X in the X direction and a stroke center position center _ code _ Y in the Y direction, and the calculation formula may specifically be: Δ code _ x ═ Δ x gain _ x) + center _ code _ x; Δ code _ y ═ Δ y × gain _ y) + center _ code _ y.
The current stroke position refers to an actual position of the lens 111 in the current stroke. The current stroke position of the lens 111 of the camera module 10 may be detected by a Hall sensor (Hall), and the anti-shake compensation stroke is pushed by the lens 111 from the current stroke position, so as to implement anti-shake compensation.
Further, referring to fig. 15, step 053 further includes:
0531: determining a target stroke position of the lens 111 according to the current stroke position and the anti-shake compensation stroke of the lens 111 of the camera module 10;
0533: the lens 111 is controlled to move to the target stroke position to achieve anti-shake compensation.
Referring to fig. 16, in some embodiments, the second processing unit 253 includes a first processing subunit 2531 and a control subunit 2533, and step 0531 may be implemented by the first processing subunit 2531 and step 0533 may be implemented by the control subunit 2533. That is, the first processing subunit 2531 can be used to determine the target stroke position of the lens 111 according to the current stroke position and the anti-shake compensation stroke of the lens 111 of the camera module 10. The control subunit 2533 can be used to control the lens 111 to move to the target stroke position to implement the anti-shake compensation.
Thus, the lens 111 can be controlled to the target stroke position to achieve precise optical anti-shake.
Specifically, the target stroke position refers to a position of the lens 111 after anti-shake compensation, and shake can be offset by adjusting the lens 111 from the current stroke position to the target stroke position. In one embodiment, the current stroke position comprises a current stroke position Hall _ X in an X direction and a current stroke position Hall _ Y in a Y direction, the anti-shake compensation stroke comprises an anti-shake compensation stroke Δ code _ X in the X direction and an anti-shake compensation stroke Δ code _ Y in the Y direction, and the target stroke position comprises a target stroke position target _ Hall _ X in the X direction and a target stroke position target _ Hall _ Y in the Y direction. The target stroke position target _ Hall _ X in the X direction can be obtained through calculation according to the current stroke position Hall _ X in the X direction and the anti-shake compensation stroke delta code _ X in the X direction, and the target stroke position target _ Hall _ Y in the Y direction can be obtained through calculation according to the current stroke position Hall _ Y in the Y direction and the anti-shake compensation stroke delta code _ Y in the Y direction. The lens 111 is controlled to move to the target stroke position target _ Hall _ X in the X direction and the target stroke position target _ Hall _ Y in the Y direction to realize the anti-shake compensation. In one embodiment, target _ Hall _ x ═ f (Δ code _ x, Hall _ x); target _ Hall _ y ═ f ([ delta ] code _ y, Hall _ y). f is a fusion algorithm, specifically may be a kalman filter algorithm, and may also be other algorithms, and is not specifically limited herein.
In some embodiments, referring to fig. 17, step 05, comprises:
051: determining the anti-shake compensation stroke of the camera module 10 according to the anti-shake compensation amount and the calibration value;
055: according to the current stroke position and the anti-shake compensation stroke of the image sensor 113 of the camera module 10, the image sensor 113 is controlled to move for anti-shake compensation.
In some embodiments, referring to fig. 18, the control module 25 includes a first processing unit 251 and a third processing unit 255, and step 051 can be implemented by the first processing unit 251 and step 055 can be implemented by the third processing unit 255. That is, the first processing unit 251 can be used to determine the anti-shake compensation stroke of the camera module 10 according to the anti-shake compensation amount and the calibration value. The third processing unit 255 may be configured to control the image sensor 113 to move for anti-shake compensation according to the current stroke position and the anti-shake compensation stroke of the image sensor 113 of the camera module 10.
In this way, it is possible to obtain the anti-shake compensation stroke from the anti-shake compensation amount and the calibration value, and to control the image sensor 113 to move to implement the anti-shake compensation based on the anti-shake compensation stroke and the current stroke position of the lens 111.
Further, referring to fig. 19, in some embodiments, step 055 comprises:
step 0551: determining a target travel position of the image sensor 113 according to the current travel position and the anti-shake compensation travel of the image sensor 113 of the camera module 10;
step 0553: the image sensor 113 is controlled to move to the target stroke position to achieve anti-shake compensation.
Referring to FIG. 20, in certain embodiments, the third processing unit 255 includes a second processing sub-unit 2551 and a third processing sub-unit 2553, and step 0551 can be implemented by the second processing sub-unit 2551 and step 0553 can be implemented by the third processing sub-unit 2553. That is, the second processing subunit 2551 can be used to determine the target stroke position of the image sensor 113 according to the current stroke position and the anti-shake compensation stroke of the image sensor 113 of the camera module 10. The third processing subunit 2553 may be configured to control the movement of the image sensor 113 to the target stroke position to achieve anti-shake compensation.
Specifically, the principle of controlling the image sensor 113 to move to realize the anti-shake compensation is similar to the principle of controlling the lens 111 to move to realize the anti-shake compensation, and detailed descriptions are omitted in this application.
Referring to fig. 21, fig. 21 is a schematic flow chart illustrating an anti-shake compensation method according to an embodiment. The anti-shake compensation method comprises the following steps:
obtaining the current real-time attitude Q according to the measured value of the acceleration sensor i Wherein Qi is a vector representing the attitude in the direction of axis X, Y, Z;
according to the current real-time attitude Q i A preset anti-shake intensity value alpha and a preorder filtering attitude Qfilter of the camera module 10 i-1 Determining the current filtering attitude Qfilter of the camera module 10, wherein the formula is as follows:
Qfilter=f(Q i ,alpha)
qfilter is Q i And Qfilter i-1 The result of the pose fusion, where alpha determines the real-time pose Q during the fusion process i And the filter attitude Qfilter at the previous moment i-1 The respective weights.
By real-time attitude Q i And calculating the anti-shake compensation quantity delta Q with the filtering attitude Qfilter at the current moment:
△Q=Q i -Qfilter
the anti-shake compensation quantity Δ Q is a vector, and may be a translational compensation quantity, or a fusion of an angular compensation quantity and a translational compensation quantity.
The anti-shake compensation amount Δ Q includes compensation amounts (Δ x, Δ y, Δ z) for translation in XYZ axes, and Δ x, Δ y, Δ z represent compensation amounts in XYZ directions, respectively. Where Δ z is not involved in calculating the target _ Hall value for the moment, since target _ Hall is a value in the XY direction.
Through the current focal length f 0 Obtaining the current object distance X and according to the current focal length f 0 And the current object distance X, obtaining calibration values gain _ X and gain _ y, wherein the formula is as follows:
gain_x=f 0 /X;
gain_y=f 0 /X。
calculating a target travel position target _ Hall according to the calibration values (gain _ x, gain _ y):
△code_x=(△x*gain_x)+center_code_x;
△code_y=(△y*gain_y)+center_code_y;
target_Hall_x=f(△code_x,Hall_x);
target_Hall_y=f(△code_y,Hall_y);
wherein center _ code _ x and center _ code _ y are the middle positions of the full stroke of the image sensor 113, and f is the fusion of the current stroke positions Hall _ x and Hall _ y of the current image sensor 113 and the calculated anti-shake compensation strokes Δ code _ x and Δ code _ y, and the fusion mode may be kalman filtering or other fusion algorithms.
And transmitting the target stroke position target _ Hall to a driving circuit, and enabling the motor VCM to push the image sensor 113 to the target stroke positions target _ Hall _ x and target _ Hall _ y to complete the anti-shake compensation at this time.
The anti-shake compensation processing flow can be realized by repeating the operations, so that the problem of unclear images caused by camera shake is solved.
Referring to fig. 22, the control method according to the embodiment of the present application can be implemented by the electronic device 100 according to the embodiment of the present application. Specifically, the electronic device 100 includes one or more processors 50 and memory 40. The memory 40 stores a computer program. The steps of the control method of any of the above embodiments are implemented when the computer program is executed by the processor 50.
For example, in the case where the computer program is executed by the processor 50, the steps of the following control method are implemented:
01: determining a calibration value according to the current focal length of the camera module 10;
03: determining an anti-shake compensation amount according to the current real-time posture of the camera module 10 and the current filtering posture of the camera module 10;
05: and controlling the camera module 10 to move to perform anti-shake compensation according to the calibration value and the anti-shake compensation amount.
The computer-readable storage medium of the embodiments of the present application stores thereon a computer program that, when executed by a processor, implements the steps of the control method of any of the embodiments described above.
For example, in the case where the program is executed by a processor, the steps of the following control method are implemented:
01: determining a calibration value according to the current focal length of the camera module 10;
03: determining an anti-shake compensation amount according to the current real-time posture of the camera module 10 and the current filtering posture of the camera module 10;
05: and controlling the camera module 10 to move for anti-shake compensation according to the calibration value and the anti-shake compensation amount.
It will be appreciated that the computer program comprises computer program code. The computer program code may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), software distribution medium, and the like. The Processor may be a central processing unit, or may be other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (12)

1. A control method, characterized in that the control method comprises:
determining a calibration value according to the current focal length of the camera module;
determining anti-shake compensation quantity according to the current real-time posture of the camera module and the current filtering posture of the camera module;
and controlling the camera module to move to perform anti-shake compensation according to the calibration value and the anti-shake compensation amount.
2. The control method according to claim 1, characterized by further comprising:
when a shooting command is received, performing focusing operation;
and when the focusing operation is finished, obtaining the current focal length of the camera module.
3. The control method according to claim 1, wherein the determining a calibration value according to the current focal length of the camera module comprises:
determining the current object distance according to the current focal length and a preset lookup table, wherein the preset lookup table comprises the corresponding relation between the current focal length and the current object distance;
and determining the calibration value according to the current focal length and the current object distance.
4. The control method according to claim 3, wherein the calibration value is a ratio of the current focal length to the current object distance.
5. The control method according to claim 1, characterized by further comprising:
and determining the current filtering attitude of the camera module according to the current real-time attitude, the preset anti-shake intensity value and the preorder filtering attitude of the camera module.
6. The control method according to claim 1, wherein the controlling the camera module to move for anti-shake compensation according to the calibration value and the anti-shake compensation amount comprises:
determining the anti-shake compensation stroke of the camera module according to the anti-shake compensation amount and the calibration value;
and controlling the lens to move to perform anti-shake compensation according to the current stroke position of the lens of the camera module and the anti-shake compensation stroke.
7. The control method according to claim 6, wherein the controlling the lens to move for anti-shake compensation according to the current stroke position of the lens of the camera module and the anti-shake compensation stroke comprises:
determining a target stroke position of a lens according to the current stroke position of the lens of the camera module and the anti-shake compensation stroke;
and controlling the lens to move to the target stroke position to realize anti-shake compensation.
8. The control method according to claim 1, wherein the controlling the camera module to move for anti-shake compensation according to the calibration value and the anti-shake compensation amount comprises:
determining the anti-shake compensation stroke of the camera module according to the anti-shake compensation amount and the calibration value;
and controlling the image sensor to move to perform anti-shake compensation according to the current stroke position of the image sensor of the camera module and the anti-shake compensation stroke.
9. The control method according to claim 8, wherein the controlling the image sensor of the camera module to move for anti-shake compensation according to the current stroke position of the image sensor and the anti-shake compensation stroke comprises:
determining a target travel position of an image sensor of the camera module according to the current travel position of the image sensor and the anti-shake compensation travel;
and controlling the image sensor to move to the target travel position to realize anti-shake compensation.
10. A control device, characterized in that the control device comprises:
the first processing module is used for determining a calibration value according to the current focal length of the camera module;
the second processing module is used for determining anti-shake compensation quantity according to the current real-time posture of the camera module and the current filtering posture of the camera module;
and the control module is used for controlling the camera module to move to perform anti-shake compensation according to the calibration value and the anti-shake compensation amount.
11. An electronic device, characterized in that the electronic device comprises one or more processors and a memory, the memory storing a computer program which, when executed by the processors, implements the steps of the control method of any one of claims 1 to 9.
12. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, carries out the steps of the control method according to any one of claims 1 to 9.
CN202210719145.1A 2022-06-23 2022-06-23 Control method, control device, electronic apparatus, and medium Pending CN115022548A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210719145.1A CN115022548A (en) 2022-06-23 2022-06-23 Control method, control device, electronic apparatus, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210719145.1A CN115022548A (en) 2022-06-23 2022-06-23 Control method, control device, electronic apparatus, and medium

Publications (1)

Publication Number Publication Date
CN115022548A true CN115022548A (en) 2022-09-06

Family

ID=83076984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210719145.1A Pending CN115022548A (en) 2022-06-23 2022-06-23 Control method, control device, electronic apparatus, and medium

Country Status (1)

Country Link
CN (1) CN115022548A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015041819A (en) * 2013-08-20 2015-03-02 キヤノン株式会社 Imaging apparatus and its control method, program, and storage medium
CN105100614A (en) * 2015-07-24 2015-11-25 小米科技有限责任公司 Optical anti-vibration realization method, apparatus and electronic equipment
CN111147757A (en) * 2020-01-03 2020-05-12 浙江大华技术股份有限公司 Optical anti-shake method and device for image pickup equipment
CN113472991A (en) * 2021-07-09 2021-10-01 Oppo广东移动通信有限公司 Control method, control device, camera assembly, electronic device and medium
CN114338994A (en) * 2021-12-30 2022-04-12 Oppo广东移动通信有限公司 Optical anti-shake method, optical anti-shake apparatus, electronic device, and computer-readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015041819A (en) * 2013-08-20 2015-03-02 キヤノン株式会社 Imaging apparatus and its control method, program, and storage medium
CN105100614A (en) * 2015-07-24 2015-11-25 小米科技有限责任公司 Optical anti-vibration realization method, apparatus and electronic equipment
CN111147757A (en) * 2020-01-03 2020-05-12 浙江大华技术股份有限公司 Optical anti-shake method and device for image pickup equipment
CN113472991A (en) * 2021-07-09 2021-10-01 Oppo广东移动通信有限公司 Control method, control device, camera assembly, electronic device and medium
CN114338994A (en) * 2021-12-30 2022-04-12 Oppo广东移动通信有限公司 Optical anti-shake method, optical anti-shake apparatus, electronic device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
JP6727791B2 (en) Tracking control device, tracking control method, and imaging device
CN104717403B (en) Image dithering correcting device and its control method, Optical devices and camera device
US20130010137A1 (en) Photographing apparatus
JP2008035308A (en) Electronic camera and lens unit
JP5335445B2 (en) LENS CONTROL DEVICE, OPTICAL DEVICE, AND LENS CONTROL METHOD
CN104714353A (en) Image shake correcting device and control method therefor, optical apparatus, and image pickup apparatus
JP2009145852A (en) Automatic focusing device, camera, automatic focusing method
US7791643B2 (en) Sequenced response image stabilization
CN113472991A (en) Control method, control device, camera assembly, electronic device and medium
JP6932531B2 (en) Image blur correction device, image pickup device, control method of image pickup device
JPH07295008A (en) Image blurring correction photographing device
CN105282434A (en) Image shake correction device, control method thereof, and image pickup apparatus
JP4356282B2 (en) Image stabilizer
US20060170783A1 (en) Adaptive response image stabilization
JP7098332B2 (en) Imaging device and its control method
CN115022548A (en) Control method, control device, electronic apparatus, and medium
JP2019109271A (en) Imaging device
JP2023071092A (en) Control unit, imaging apparatus, lens device, control method, and program
JP2016080892A (en) Image blur correction device, focus adjustment device, control unit, and optical instrument
JP2020118789A (en) Imaging apparatus, imaging system, control method of imaging apparatus, and program
JP2019095630A (en) Optical instrument having image tremor correction device
JP2019109270A (en) Imaging device
JP2019219529A (en) Control device, imaging device, control method, program, and storage medium
EP4250755A1 (en) Control apparatus, lens apparatus, image pickup apparatus, camera system, control method, and program
JP7451152B2 (en) Imaging device, control method and computer program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination