CN113218419B - Method and device for detecting abnormality of gyroscope, electronic equipment and storage medium - Google Patents

Method and device for detecting abnormality of gyroscope, electronic equipment and storage medium Download PDF

Info

Publication number
CN113218419B
CN113218419B CN202110449273.4A CN202110449273A CN113218419B CN 113218419 B CN113218419 B CN 113218419B CN 202110449273 A CN202110449273 A CN 202110449273A CN 113218419 B CN113218419 B CN 113218419B
Authority
CN
China
Prior art keywords
gyroscope
information
action
action information
preset
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.)
Active
Application number
CN202110449273.4A
Other languages
Chinese (zh)
Other versions
CN113218419A (en
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.)
Vivo Mobile Communication Shenzhen Co Ltd
Original Assignee
Vivo Mobile Communication Shenzhen Co 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 Vivo Mobile Communication Shenzhen Co Ltd filed Critical Vivo Mobile Communication Shenzhen Co Ltd
Priority to CN202110449273.4A priority Critical patent/CN113218419B/en
Publication of CN113218419A publication Critical patent/CN113218419A/en
Application granted granted Critical
Publication of CN113218419B publication Critical patent/CN113218419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
    • G01C25/005Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass initial alignment, calibration or starting-up of inertial devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Studio Devices (AREA)
  • Adjustment Of Camera Lenses (AREA)

Abstract

The application discloses an anomaly detection method and device for a gyroscope, electronic equipment and a storage medium, and belongs to the field of electronic equipment. The method for detecting the abnormality of the gyroscope is applied to electronic equipment, the electronic equipment comprises the gyroscope and a shooting module, the shooting module comprises a lens and a motor for driving the lens to act, and the method comprises the following steps: under the condition that the shooting module works and the gyroscope acts according to the preset action information, acquiring first action information detected by the gyroscope; driving the lens to perform anti-shake compensation action by a motor according to the first action information; acquiring second motion information corresponding to the anti-shake compensation motion; and outputting prompt information for indicating gyroscope abnormality when the second action information is inconsistent with the preset action information. In the embodiment provided by the application, whether the gyroscope is abnormal or not can be detected after the gyroscope is assembled on the electronic equipment, so that the fault of the electronic equipment can be conveniently checked.

Description

Method and device for detecting abnormality of gyroscope, electronic equipment and storage medium
Technical Field
The application belongs to the field of electronic equipment, and particularly relates to an anomaly detection method and device of a gyroscope, electronic equipment and a storage medium.
Background
With the development of electronic technology, electronic devices have more and more functions. For example, a gyroscope is added on the electronic equipment, and the actions such as rotation, deflection and the like of the electronic equipment can be detected through the gyroscope, so that the actions of a user on the electronic equipment are analyzed, and then corresponding operations are carried out according to the actions of the user on the electronic equipment.
However, in the related art, whether the gyroscope is abnormal cannot be detected after the gyroscope is assembled to the electronic device, resulting in inconvenience in troubleshooting the malfunction of the electronic device.
Disclosure of Invention
An object of the embodiment of the application is to provide an abnormality detection method and device for a gyroscope, electronic equipment and a storage medium, which can solve the problem that whether the gyroscope is abnormal or not cannot be detected after the gyroscope is assembled on the electronic equipment, so that faults of the electronic equipment are inconvenient to be detected.
In order to solve the technical problems, the application is realized as follows:
in a first aspect, an embodiment of the present application provides a gyroscope anomaly detection method, which is applied to an electronic device, where the electronic device includes a gyroscope and a shooting module, and the shooting module includes a lens and a motor for driving the lens to act, and the method includes:
under the condition that the shooting module works and the gyroscope acts according to preset action information, first action information detected by the gyroscope is obtained;
driving the lens to perform anti-shake compensation action through the motor according to the first action information;
acquiring second motion information corresponding to the anti-shake compensation motion;
and outputting prompt information for indicating that the gyroscope is abnormal under the condition that the second action information is inconsistent with the preset action information.
In a second aspect, an embodiment of the present application provides a gyroscope anomaly detection apparatus, which is applied to an electronic device, the electronic device includes a gyroscope and a shooting module, the shooting module includes a lens and a motor for driving the lens to act, and the apparatus includes:
the first acquisition module is used for acquiring first action information detected by the gyroscope under the condition that the shooting module works and the gyroscope acts according to preset action information;
the compensation module is used for driving the lens to perform anti-shake compensation action through the motor according to the first action information;
the second acquisition module is used for acquiring second action information corresponding to the anti-shake compensation action;
the output module is used for outputting prompt information for indicating that the gyroscope is abnormal under the condition that the second action information is inconsistent with the preset action information.
In a third aspect, embodiments of the present application provide an electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, the program or instruction implementing the steps of the method according to the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement a method according to the first aspect.
In the embodiment of the application, under the condition that the shooting module works and the gyroscope acts according to the preset action information, the first action information detected by the gyroscope is acquired. Then, the lens is driven according to the first action information to perform anti-shake compensation action so as to perform anti-shake processing, and therefore the action of the gyroscope is fed back to the lens. And then, obtaining second action information of the lens when the anti-shake compensation action is carried out. Since the second motion information may reflect the motion of the gyroscope, if the second motion information does not coincide with the predetermined motion information, the presentation information indicating the gyroscope abnormality is output. Therefore, whether the gyroscope is abnormal or not can be detected after the gyroscope is assembled on the electronic equipment, and the fault of the electronic equipment can be conveniently checked.
Drawings
FIG. 1 is a schematic diagram of one embodiment of an electronic device provided herein;
FIG. 2 is a flow chart of one embodiment of a method for anomaly detection for a gyroscope provided herein;
FIG. 3 is a schematic diagram of one embodiment of a photographic interface provided herein;
FIG. 4 is a schematic view of another embodiment of a photographic interface provided herein;
FIG. 5 is a schematic diagram of one embodiment of a gyroscope detection results interface provided herein;
FIG. 6 is a schematic diagram of an embodiment of a gyroscope anomaly detection apparatus provided herein;
fig. 7 is a schematic hardware structure of an embodiment of an electronic device provided in the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
In the related art, before the gyroscope is assembled to the electronic device, a detection signal may be input to the gyroscope, and then whether the gyroscope is abnormal may be detected based on an output result of the gyroscope. However, whether the gyroscope is abnormal or not cannot be detected after the gyroscope is assembled on the electronic device, which results in inconvenience in troubleshooting the malfunction of the electronic device.
Based on the above technical problems, the present application provides a method for detecting an abnormality of a gyroscope, and the principle of the method for detecting an abnormality of a gyroscope provided in the present application is first described below.
As shown in fig. 1, the electronic device 100 includes a gyroscope 102, a processing module 104, and a photographing module 106. The gyroscope 102 may be any angular velocity detection device that can be used to detect angular velocity. The processing module 104 may be a processor, such as a central processing unit (Central Processing Unit, CPU). The photographing module 106 includes a lens 1064 and a motor 1062 for driving the lens 1064 to operate. The lens 1064 may not be limited to various fixed focus lenses, zoom lenses, wide angle lenses, standard lenses, and the like. The motor 1062 may be a voice coil motor 1062. The motor 1062 may drive the lens 1064 under control of the processing module 104.
In order to avoid the shake of the lens 1064 caused by the shake of the electronic device 100, and thus the blur of the shot image, when the shooting module 106 is operated, the first motion information is detected by the gyroscope 102, and the first motion information characterizes the motion of the gyroscope 102 when the shake occurs in the electronic device 100. Since the lens 1064 and the gyroscope 102 are relatively stationary while the electronic device 100 is shaking, the first motion information may also characterize the shaking motion of the lens 1064. Then, the processing module 104 calculates anti-shake compensation information of the lens 1064 according to the first motion information, and controls the motor 1062 to power up according to the anti-shake compensation information, so that the motor 1062 drives the lens 1064 to perform an anti-shake compensation operation under the control of the processing module 104, so as to implement anti-shake compensation on the lens 1064.
As can be seen, in the case of shaking the electronic device 100 during shooting, the gyroscope 102 will act accordingly, and the gyroscope 102 will detect the first action information. Then, the processing module 104 drives the lens 1064 to perform the anti-shake compensation according to the first motion information. Thus, the action of the gyroscope 102 is related to the anti-shake compensation action of the lens 1064.
In order to detect whether the gyroscope 102 is abnormal, the motion of the gyroscope 102 cannot be obtained, and the motion of the gyroscope 102 is fed back to the lens 1064, so that whether the gyroscope 102 is abnormal can be detected according to the motion of the lens 1064.
Based on the above analysis, the abnormality detection method of the gyroscope provided in the present application is described below with reference to the drawings. The gyroscope abnormality detection method is applied to electronic equipment, wherein the electronic equipment comprises a gyroscope and a shooting module, and the shooting module comprises a lens and a motor for driving the lens to act.
Fig. 2 is a flow chart of an embodiment of a method for detecting an anomaly of a gyroscope provided in the present application. As shown in fig. 2, the abnormality detection method 200 of the gyroscope includes: s202, S204, S206, and S208.
S202, when the shooting module works and the gyroscope operates according to the preset operation information, first operation information detected by the gyroscope is acquired.
The first motion information is motion information detected when the gyroscope performs motion according to predetermined motion information. As one example, the first motion information may include an angular velocity detected by a gyroscope.
S204, driving the lens to perform anti-shake compensation operation by the motor according to the first operation information.
As an example, S204 may specifically include: and determining that the lens shakes in the shooting process according to the first action information, calculating anti-shake compensation information of the lens according to the first action information, and controlling the motor to be electrified according to the anti-shake compensation information, so that the motor drives the lens to perform anti-shake compensation action, and anti-shake compensation of the lens is realized.
S206, second motion information corresponding to the anti-shake compensation motion is acquired. The second motion information is actual motion information when the lens is driven by the motor.
S208, when the second motion information does not match the predetermined motion information, the instruction information indicating that the gyroscope is abnormal is output.
As one example, S208 may include: comparing whether the second action information is consistent with the preset action information; and outputting prompt information for indicating gyroscope abnormality when the second action information is inconsistent with the preset action information. In addition, in the case where the second motion information matches the predetermined motion information, a presentation information for instructing that the gyroscope is normal may be output.
Comparing whether the second motion information is consistent with the predetermined motion information may specifically include: and comparing whether the movement track in the second action information is consistent with the movement track in the preset action information.
In the embodiment of the application, under the condition that the shooting module works and the gyroscope acts according to the preset action information, the first action information detected by the gyroscope is acquired. Then, the lens is driven according to the first action information to perform anti-shake compensation action so as to perform anti-shake processing, and therefore the action of the gyroscope is fed back to the lens. And then, obtaining second action information of the lens when the anti-shake compensation action is carried out. Since the second motion information may reflect the motion of the gyroscope, if the second motion information does not coincide with the predetermined motion information, the presentation information indicating the gyroscope abnormality is output. Therefore, whether the gyroscope is abnormal or not can be detected after the gyroscope is assembled on the electronic equipment, and the fault of the electronic equipment can be conveniently checked.
Although the action of the gyroscope is fed back to the lens, if the shooting module fails, the action of the gyroscope cannot be fed back to the lens accurately, so that whether the gyroscope is abnormal cannot be detected accurately. For example, the motor should drive the lens to rotate 5 ° clockwise, but the lens cannot rotate clockwise due to a malfunction of the lens, resulting in that the lens does not actually act. Thus, whether the gyroscope is abnormal or not cannot be accurately detected. Therefore, it is necessary to determine whether the photographing module fails.
In order to determine whether the photographing module fails, in one or more embodiments of the present application, before S208, the abnormality detection method 200 for a gyroscope may further include:
acquiring driving information of a motor to a lens;
if the second motion information matches the drive information, comparing whether the second motion information matches the predetermined motion information.
For example, the motor drives the lens to rotate 5 ° clockwise, but in reality, the lens does not perform the anti-shake compensation action, that is, the driving information of the motor to the lens is inconsistent with the second action information corresponding to the anti-shake compensation action, which indicates that the shooting module fails. Under the condition that the driving information of the motor to the lens is consistent with the second action information corresponding to the anti-shake compensation action, the lens is indicated to work normally under the driving of the motor, further, the shooting module is indicated to be normal and has no fault, and then, whether the second action information is consistent with the preset action information or not can be compared.
In the embodiment of the application, whether the shooting module fails or not can be determined, and whether the second action information is consistent with the preset action information or not is compared under the condition that the shooting module fails or not so as to accurately detect whether the gyroscope is abnormal or not.
In one or more embodiments of the present application, acquiring the first motion information detected by the gyroscope may include:
in the case where the electronic device is fixedly placed on a predetermined device to perform photographing and the predetermined device performs an action according to predetermined action information, first action information detected by a gyroscope is acquired.
As an example, the predetermined device may be a production line machine of the electronic device, or the predetermined device may be a maintenance machine of the electronic device. Here, the predetermined device is not limited to this, and the predetermined device may be operable according to predetermined operation information.
For example, after the electronic device is fixedly placed on the predetermined device, the predetermined device is controlled by a function to act according to predetermined action information. Since the electronic device is fixedly placed on the predetermined device, the electronic device performs the same operation in accordance with the operation of the predetermined device, and of course, the gyroscope in the electronic device also performs the same operation, and the gyroscope can detect the first operation information corresponding to the operation.
In the embodiment of the application, the electronic device can be fixedly placed on the preset device, so that the preset device can be controlled to act according to the preset action information, and the gyroscope can act according to the preset action information.
In one or more embodiments of the present application, before acquiring the first motion information detected by the gyroscope, the gyroscope anomaly detection method may further include:
in the shooting process of the shooting module, an action instruction is sent to the gyroscope, and the action instruction is used for indicating the gyroscope to act according to preset action information.
In the embodiment of the application, the action instruction may be sent to the gyroscope, so that the gyroscope acts according to the predetermined action information.
In one or more embodiments of the present application, before sending the action instruction to the gyroscope, the gyroscope anomaly detection method may further include:
receiving abnormality detection input of a user to a gyroscope;
sending an action instruction to the gyroscope, comprising:
in response to the anomaly detection input, an action command is sent to the gyroscope.
As one example, receiving user anomaly detection input to a gyroscope may include: and under the condition that the shooting interface is displayed on the electronic equipment and the gyroscope abnormality detection control is displayed on the shooting interface, receiving touch input of a user to the gyroscope abnormality detection control.
In the embodiment of the application, the user can send the action instruction to the gyroscope according to the own requirement so as to detect whether the gyroscope is abnormal at any time, thereby meeting the requirement of the user for detecting the gyroscope in an abnormal way.
In order to avoid false detection of the gyroscope, whether the gyroscope is abnormal or not may be confirmed from the definition of the picture photographed after the anti-shake compensation. Because only under the condition that the gyroscope is normal and the shooting module is normal, the anti-shake compensation can be accurately carried out on the lens, and the picture shot after the anti-shake compensation is clearer.
Based on this, in one or more embodiments of the present application, outputting the hint information for indicating the gyroscope anomaly in the case where the second action information does not coincide with the predetermined action information may include:
acquiring the definition of a target shooting picture, wherein the target shooting picture comprises a picture shot through a lens after performing anti-shake compensation action; and outputting prompt information for indicating gyroscope abnormality in the case that at least one of the second motion information and the predetermined motion information are inconsistent and the definition is not greater than a predetermined threshold is satisfied.
In addition, after obtaining the definition of the target shooting picture, the method may further include:
and outputting prompt information for indicating that the gyroscope is normal under the condition that the second action information is consistent with the preset action information and the definition is larger than a preset threshold value.
In the embodiment of the application, whether the gyroscope is abnormal can be further confirmed according to the definition of the picture shot after the anti-shake compensation, so that the gyroscope is prevented from being detected by mistake, and the detection result of the gyroscope is ensured.
The embodiments of the present application are described below by way of example.
In the case where the electronic device displays a photographing interface as shown in fig. 3, an input by the user for displaying more controls may be received, and then the photographing interface as shown in fig. 4, on which the gyro abnormality detection control is displayed, is displayed. And sending an action command to the gyroscope under the condition that the touch input of the user to the gyroscope abnormality detection control is received, so that the gyroscope acts according to a preset action track.
Under the condition that the gyroscope acts according to a preset action track, acquiring a first action track detected by the gyroscope; according to the first action track, the lens is driven by the motor to perform anti-shake compensation, after the lens is driven to perform anti-shake compensation, a target shooting picture is shot by the lens, and a second action track corresponding to the anti-shake compensation and driving information of the motor to the lens are acquired.
Then, according to the definition of the target shooting picture, whether the second motion track is consistent with the driving information, and whether the second motion track is consistent with the preset motion track, a gyroscope detection result interface as shown in fig. 5 is displayed, and a comparison result of the second motion track (namely, the lens motion track) and the preset motion track (namely, the initial input track) is displayed on the gyroscope detection result interface.
In order to reduce the occurrence of false detection of the gyroscope, whether the gyroscope is abnormal or not may be further confirmed according to the first motion information detected by the gyroscope. Since the predetermined motion information corresponding to the motion of the gyroscope is known, the gyroscope also detects the first motion information corresponding to the motion of the gyroscope, and the first motion information detected by the gyroscope and the predetermined motion information should be consistent when the gyroscope is normal.
Based on this analysis, in one or more embodiments of the present application, outputting the hint information indicating the gyroscope anomaly in the event that the second motion information does not agree with the predetermined motion information may include:
and outputting prompt information for indicating gyroscope abnormality when the second action information is inconsistent with the preset action information and the preset action information is inconsistent with the first action information.
In the embodiment of the application, when the second motion information is consistent with the preset motion information, the motion finally fed back to the lens is consistent with the preset motion information which is initially input; when the preset action information initially input to the gyroscope is consistent with the first action information detected by the gyroscope, the detection result of the gyroscope is correct. When the two conditions are not satisfied, a prompt message indicating that the gyroscope is abnormal is output. Since the conditions for detecting whether the gyroscope is abnormal are increased, the occurrence of false detection of the gyroscope can be reduced.
Corresponding to the gyroscope abnormality detection method provided by the application, the application also provides a gyroscope abnormality detection device, the gyroscope abnormality detection device is applied to electronic equipment, the electronic equipment comprises a gyroscope and a shooting module, and the shooting module comprises a lens and a motor for driving the lens to act.
Fig. 6 is a schematic structural diagram of an embodiment of a gyroscope anomaly detection apparatus provided in the present application. As shown in fig. 6, the gyro abnormality detection apparatus 300 includes:
the first obtaining module 302 is configured to obtain first motion information detected by the gyroscope when the shooting module works and the gyroscope performs motion according to predetermined motion information;
the compensation module 304 is configured to perform an anti-shake compensation operation by driving the lens through the motor according to the first motion information;
a second obtaining module 306, configured to obtain second motion information corresponding to the anti-shake compensation motion;
the output module 308 is configured to output a prompt message for indicating that the gyroscope is abnormal, if the second motion information is inconsistent with the predetermined motion information.
In the embodiment of the application, under the condition that the shooting module works and the gyroscope acts according to the preset action information, the first action information detected by the gyroscope is acquired. Then, the lens is driven according to the first action information to perform anti-shake compensation action so as to perform anti-shake processing, and therefore the action of the gyroscope is fed back to the lens. And then, obtaining second action information of the lens when the anti-shake compensation action is carried out. Since the second motion information may reflect the motion of the gyroscope, if the second motion information does not coincide with the predetermined motion information, the presentation information indicating the gyroscope abnormality is output. Therefore, whether the gyroscope is abnormal or not can be detected after the gyroscope is assembled on the electronic equipment, and the fault of the electronic equipment can be conveniently checked.
In one or more embodiments of the present application, the gyro abnormality detection apparatus 300 may further include:
the third acquisition module is used for acquiring driving information of the motor to the lens;
and the comparison module is used for comparing whether the second action information is consistent with the preset action information or not under the condition that the second action information is consistent with the drive information.
In one or more embodiments of the present application, the first obtaining module 302 may specifically be configured to:
in the case where the electronic device is fixedly placed on a predetermined device to perform photographing and the predetermined device performs an action according to predetermined action information, first action information detected by a gyroscope is acquired.
In one or more embodiments of the present application, the gyro abnormality detection apparatus 300 may further include:
the command sending module is used for sending an action command to the gyroscope in the process of shooting by the shooting module, and the action command is used for indicating the gyroscope to act according to the preset action information.
In one or more embodiments of the present application, the gyro abnormality detection apparatus 300 may further include:
the input receiving module is used for receiving the abnormality detection input of the gyroscope by a user;
the instruction sending module may be specifically configured to send an action instruction to the gyroscope in response to the abnormality detection input.
In one or more embodiments of the present application, the output module 308 may include:
an acquisition unit configured to acquire sharpness of a target photographed picture including a picture photographed through a lens after performing an anti-shake compensation action;
and an output unit configured to output information indicating that the gyroscope is abnormal, in a case where at least one of the second motion information and the predetermined motion information are inconsistent, and the sharpness is not greater than a predetermined threshold value.
In one or more embodiments of the present application, the output module 308 may be specifically configured to:
and outputting prompt information for indicating gyroscope abnormality when the second action information is inconsistent with the preset action information and the preset action information is inconsistent with the first action information.
In the above embodiments, the gyroscope anomaly detection method is described by taking the main execution body as the gyroscope anomaly detection device. However, the execution subject of the gyroscope anomaly detection method provided in the embodiment of the present application is not limited to the gyroscope anomaly detection apparatus, and may be a control module for executing the loaded gyroscope anomaly detection method in the gyroscope anomaly detection apparatus.
The gyroscope anomaly detection device in the embodiment of the application can be a device, and also can be a component, an integrated circuit or a chip in the device. The device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), and the like, and the non-mobile electronic device may be a personal computer (personal computer, PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not limited in particular.
The gyroscope anomaly detection device in the embodiment of the application may be a device with an operating system. The operating system may be an Android operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
The gyroscope anomaly detection device provided in the embodiment of the present application can implement each process in any embodiment of the foregoing method, and in order to avoid repetition, a description is omitted here.
The embodiment of the application further provides an electronic device, which comprises a processor, a memory, and a program or an instruction stored in the memory and capable of running on the processor, wherein the program or the instruction realizes each process of the gyroscope anomaly detection method embodiment when being executed by the processor, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted.
It should be noted that, the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 7 is a schematic hardware structure of an embodiment of an electronic device provided in the present application.
As shown in fig. 7, electronic device 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, and processor 410.
The input unit 404 may include a graphics processor 4041 and a microphone 4042, and in addition, the input unit 404 may further include a photographing module, where the photographing module includes a lens and a motor for driving the lens to perform actions. The sensor 405 may include a gyroscope. The display unit 406 includes a displayable panel 4061. The user input unit 407 may include a touch panel 4071 and other input devices 4072. Memory 409 may include application programs and an operating system.
Those skilled in the art will appreciate that the electronic device 400 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 410 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 7 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
Wherein the processor 410 is configured to perform the steps of:
under the condition that the shooting module works and the gyroscope acts according to the preset action information, acquiring first action information detected by the gyroscope;
driving the lens to perform anti-shake compensation action by a motor according to the first action information;
acquiring second motion information corresponding to the anti-shake compensation motion;
and outputting prompt information for indicating gyroscope abnormality when the second action information is inconsistent with the preset action information.
In the embodiment of the application, under the condition that the shooting module works and the gyroscope acts according to the preset action information, the first action information detected by the gyroscope is acquired. Then, the lens is driven according to the first action information to perform anti-shake compensation action so as to perform anti-shake processing, and therefore the action of the gyroscope is fed back to the lens. And then, obtaining second action information of the lens when the anti-shake compensation action is carried out. Since the second motion information may reflect the motion of the gyroscope, if the second motion information does not coincide with the predetermined motion information, the presentation information indicating the gyroscope abnormality is output. Therefore, whether the gyroscope is abnormal or not can be detected after the gyroscope is assembled on the electronic equipment, and the fault of the electronic equipment can be conveniently checked.
In one or more embodiments of the present application, the processor 410 is further configured to:
acquiring driving information of a motor to a lens;
if the second motion information matches the drive information, comparing whether the second motion information matches the predetermined motion information.
In one or more embodiments of the present application, the processor 410 may be configured to:
in the case where the electronic device is fixedly placed on a predetermined device to perform photographing and the predetermined device performs an action according to predetermined action information, first action information detected by a gyroscope is acquired.
In one or more embodiments of the present application, the processor 410 may also be configured to:
in the shooting process of the shooting module, an action instruction is sent to the gyroscope, and the action instruction is used for indicating the gyroscope to act according to preset action information.
In one or more embodiments of the present application, the user input unit 407 may be used to receive user anomaly detection input to the gyroscope;
processor 410 may be specifically configured to send motion instructions to the gyroscope in response to an anomaly detection input.
In one or more embodiments of the present application, the processor 410 may be specifically configured to:
acquiring the definition of a target shooting picture, wherein the target shooting picture comprises a picture shot through a lens after performing anti-shake compensation action;
in the case where at least one of the second motion information and the predetermined motion information are inconsistent and the sharpness is not greater than the predetermined threshold is satisfied, information indicating that the gyroscope is abnormal is output.
In one or more embodiments of the present application, the processor 410 may be specifically configured to:
and outputting prompt information for indicating gyroscope abnormality when the second action information is inconsistent with the preset action information and the preset action information is inconsistent with the first action information.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored, where the program or the instruction implements each process of the embodiment of the gyroscope anomaly detection method when executed by a processor, and the process can achieve the same technical effect, so that repetition is avoided, and no further description is given here.
The processor is a processor in the electronic device in the above embodiment. Examples of the readable storage medium include a computer-readable storage medium, such as a non-transitory computer-readable storage medium, e.g., a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk.
The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running a program or instructions, the processes of the embodiment of the gyroscope anomaly detection method can be realized, the same technical effects can be achieved, and in order to avoid repetition, the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
The application further provides a computer program product, the program product is stored in a nonvolatile storage medium, and the program product is executed by at least one processor to implement each process of the above gyroscope anomaly detection method embodiment, and the same technical effects can be achieved, so that repetition is avoided, and no further description is provided herein.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method of the embodiments of the present application.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (13)

1. The gyroscope anomaly detection method is applied to electronic equipment and is characterized in that the electronic equipment comprises a gyroscope and a shooting module, the shooting module comprises a lens and a motor for driving the lens to act, and the method comprises the following steps:
under the condition that the shooting module works and the gyroscope acts according to preset action information, first action information detected by the gyroscope is obtained;
driving the lens to perform anti-shake compensation action through the motor according to the first action information;
acquiring second motion information corresponding to the anti-shake compensation motion, wherein the second motion information and the preset motion information both comprise a moving track;
outputting prompt information for indicating that the gyroscope is abnormal when the second action information is inconsistent with the preset action information, wherein the second action information is inconsistent with the preset action information and comprises the following steps: the movement track in the second action information is inconsistent with the movement track in the preset action information.
2. The method according to claim 1, wherein, in the case where the second motion information is inconsistent with the predetermined motion information, before outputting the hint information indicating the gyroscope anomaly, the method further includes:
acquiring driving information of the motor to the lens;
and comparing whether the second motion information is identical to the predetermined motion information or not when the second motion information is identical to the driving information.
3. The method of claim 1, wherein the obtaining first motion information detected by the gyroscope comprises:
and acquiring the first action information detected by the gyroscope under the condition that the electronic equipment is fixedly placed on a preset equipment to shoot and the preset equipment acts according to the preset action information.
4. The method of claim 1, wherein prior to the obtaining the first motion information detected by the gyroscope, the method further comprises:
and in the process of shooting by the shooting module, sending an action instruction to the gyroscope, wherein the action instruction is used for indicating the gyroscope to act according to the preset action information.
5. The method of claim 4, wherein prior to sending the action instruction to the gyroscope, the method further comprises:
receiving an abnormality detection input of a user to the gyroscope;
the sending an action instruction to the gyroscope comprises the following steps:
and sending the action instruction to the gyroscope in response to the anomaly detection input.
6. The method according to claim 1, wherein the outputting of the hint information indicating the gyroscope anomaly in the case where the second action information does not coincide with the predetermined action information, includes:
acquiring the definition of a target shooting picture, wherein the target shooting picture comprises a picture shot through the lens after the anti-shake compensation action is performed;
and outputting prompt information for indicating that the gyroscope is abnormal in the case that at least one of the second action information and the preset action information are inconsistent and the definition is not more than a preset threshold value is met.
7. The method according to any one of claims 1 to 6, wherein the outputting of the prompt information indicating whether the gyroscope is abnormal in the case where the second motion information is inconsistent with the predetermined motion information, includes:
and outputting prompt information for indicating that the gyroscope is abnormal when the second action information is inconsistent with the preset action information and the preset action information is inconsistent with the first action information.
8. The utility model provides a gyroscope anomaly detection device, is applied to electronic equipment, its characterized in that, electronic equipment includes gyroscope and shoots the module, shoot the module including the camera lens and be used for driving the camera lens carries out the motor of action, the device includes:
the first acquisition module is used for acquiring first action information detected by the gyroscope under the condition that the shooting module works and the gyroscope acts according to preset action information;
the compensation module is used for driving the lens to perform anti-shake compensation action through the motor according to the first action information;
the second acquisition module is used for acquiring second motion information corresponding to the anti-shake compensation motion, wherein the second motion information and the preset motion information both comprise a moving track;
the output module is configured to output prompt information for indicating that the gyroscope is abnormal when the second motion information is inconsistent with the predetermined motion information, where the second motion information is inconsistent with the predetermined motion information includes: the movement track in the second action information is inconsistent with the movement track in the preset action information.
9. The apparatus of claim 8, wherein the apparatus further comprises:
a third acquisition module, configured to acquire driving information of the motor on the lens;
and the comparison module is used for comparing whether the second action information is consistent with the preset action information or not when the second action information is consistent with the driving information.
10. The apparatus of claim 8, wherein the first acquisition module is configured to:
and acquiring the first action information detected by the gyroscope under the condition that the electronic equipment is fixedly placed on a preset equipment to shoot and the preset equipment acts according to the preset action information.
11. The apparatus of claim 8, wherein the apparatus further comprises:
the command sending module is used for sending an action command to the gyroscope in the process of shooting by the shooting module, and the action command is used for indicating the gyroscope to act according to the preset action information.
12. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, the program or instruction when executed by the processor implementing the steps of the method for anomaly detection of a gyroscope according to any one of claims 1 to 7.
13. A readable storage medium, wherein a program or instructions are stored on the readable storage medium, which when executed by a processor, implement the steps of the anomaly detection method for gyroscopes according to any one of claims 1-7.
CN202110449273.4A 2021-04-25 2021-04-25 Method and device for detecting abnormality of gyroscope, electronic equipment and storage medium Active CN113218419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110449273.4A CN113218419B (en) 2021-04-25 2021-04-25 Method and device for detecting abnormality of gyroscope, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110449273.4A CN113218419B (en) 2021-04-25 2021-04-25 Method and device for detecting abnormality of gyroscope, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113218419A CN113218419A (en) 2021-08-06
CN113218419B true CN113218419B (en) 2024-04-12

Family

ID=77088853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110449273.4A Active CN113218419B (en) 2021-04-25 2021-04-25 Method and device for detecting abnormality of gyroscope, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113218419B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108413990A (en) * 2018-03-26 2018-08-17 上海摩软通讯技术有限公司 The gyroscope test device and test method of mobile terminal
CN109506673A (en) * 2017-09-15 2019-03-22 神讯电脑(昆山)有限公司 Gyroscope detection device
CN109842753A (en) * 2019-03-26 2019-06-04 Oppo广东移动通信有限公司 Camera stabilization system, method, electronic equipment and storage medium
CN110300263A (en) * 2019-06-28 2019-10-01 Oppo广东移动通信有限公司 Gyroscope treating method and apparatus, electronic equipment, computer readable storage medium
WO2019237977A1 (en) * 2018-06-15 2019-12-19 Oppo广东移动通信有限公司 Image compensation method, computer readable storage medium and electronic device
CN111246089A (en) * 2020-01-14 2020-06-05 Oppo广东移动通信有限公司 Jitter compensation method and apparatus, electronic device, computer-readable storage medium
CN111258236A (en) * 2020-03-20 2020-06-09 滁州安瑞电力自动化有限公司 Microcomputer relay protection device capable of identifying action and fault picture of primary electric power equipment
CN111912428A (en) * 2020-07-20 2020-11-10 北京京东乾石科技有限公司 Method and system for detecting gyroscope
CN112689094A (en) * 2020-12-28 2021-04-20 维沃移动通信有限公司 Camera anti-shake prompting method and device and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109506673A (en) * 2017-09-15 2019-03-22 神讯电脑(昆山)有限公司 Gyroscope detection device
CN108413990A (en) * 2018-03-26 2018-08-17 上海摩软通讯技术有限公司 The gyroscope test device and test method of mobile terminal
WO2019237977A1 (en) * 2018-06-15 2019-12-19 Oppo广东移动通信有限公司 Image compensation method, computer readable storage medium and electronic device
CN109842753A (en) * 2019-03-26 2019-06-04 Oppo广东移动通信有限公司 Camera stabilization system, method, electronic equipment and storage medium
CN110300263A (en) * 2019-06-28 2019-10-01 Oppo广东移动通信有限公司 Gyroscope treating method and apparatus, electronic equipment, computer readable storage medium
CN111246089A (en) * 2020-01-14 2020-06-05 Oppo广东移动通信有限公司 Jitter compensation method and apparatus, electronic device, computer-readable storage medium
CN111258236A (en) * 2020-03-20 2020-06-09 滁州安瑞电力自动化有限公司 Microcomputer relay protection device capable of identifying action and fault picture of primary electric power equipment
CN111912428A (en) * 2020-07-20 2020-11-10 北京京东乾石科技有限公司 Method and system for detecting gyroscope
CN112689094A (en) * 2020-12-28 2021-04-20 维沃移动通信有限公司 Camera anti-shake prompting method and device and electronic equipment

Also Published As

Publication number Publication date
CN113218419A (en) 2021-08-06

Similar Documents

Publication Publication Date Title
US20160242001A1 (en) Method and mobile terminal for displaying prompt information
CN112738402B (en) Shooting method, shooting device, electronic equipment and medium
US20130002718A1 (en) Image display apparatus, image display control method and program
CN104951377A (en) Exception handling method and device for smart home terminal
CN111829742A (en) Electronic equipment vibration testing method and device, electronic equipment and storage medium
CN112929860B (en) Bluetooth connection method and device and electronic equipment
EP3425533A1 (en) Displaying page
US11949986B2 (en) Anti-shake method, anti-shake apparatus, and electronic device
CN112712498A (en) Vehicle damage assessment method and device executed by mobile terminal, mobile terminal and medium
CN112954212A (en) Video generation method, device and equipment
US8587677B2 (en) Remote instruction system, remote instruction method, and program product therefor
CN115268817A (en) Screen-projected content display method, device, equipment and storage medium
CN113259592B (en) Shooting method and device, electronic equipment and storage medium
CN112770056B (en) Shooting method, shooting device and electronic equipment
CN113218419B (en) Method and device for detecting abnormality of gyroscope, electronic equipment and storage medium
CN112437231B (en) Image shooting method and device, electronic equipment and storage medium
WO2023179440A1 (en) Shooting apparatus control method and apparatus, shooting apparatus and electronic device
CN106792163B (en) Method and device for detecting video playing state
EP4373073A1 (en) Video playback method and apparatus, and electronic device
CN114281631A (en) Method and device for testing image processing chip and electronic equipment
CN104601884A (en) Photograph method and terminal
CN112291471A (en) Shooting control method, shooting control device, electronic device and readable storage medium
CN108509165B (en) Data processing method, data processing device and terminal equipment
CN111879331B (en) Navigation method and device and electronic equipment
KR20140030502A (en) Site monitoring system

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
GR01 Patent grant
GR01 Patent grant