CN115134522A - Camera control method and device, storage medium and terminal - Google Patents
Camera control method and device, storage medium and terminal Download PDFInfo
- Publication number
- CN115134522A CN115134522A CN202210577906.4A CN202210577906A CN115134522A CN 115134522 A CN115134522 A CN 115134522A CN 202210577906 A CN202210577906 A CN 202210577906A CN 115134522 A CN115134522 A CN 115134522A
- Authority
- CN
- China
- Prior art keywords
- audio
- camera
- frequency value
- frequency
- volume
- 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.)
- Granted
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Studio Devices (AREA)
Abstract
The embodiment of the application discloses a camera control method, a camera control device, a storage medium and a terminal, wherein the method comprises the following steps: when a camera acquires an image, acquiring a frequency value of an audio currently played by a terminal, acquiring the volume of the audio if the frequency value of the audio is determined to be the same as the frequency value of the vibration frequency of a camera motor, determining a target current corresponding to the camera motor based on the volume and the frequency value of the audio, and controlling a coil of the camera motor to be connected with the target current. This application lets in the electric current through the coil at the camera motor for the ampere power that the coil current produced can offset the outside power that receives of camera (that audio frequency that the speaker broadcast arouses), that is to say, can eliminate the camera because the camera lens vibration that the outside atress arouses, and then can avoid the camera to appear the problem of picture shake because the camera lens vibration when gathering the picture.
Description
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a camera control method, an apparatus, a storage medium, and a terminal.
Background
In the related art, most cameras of the terminals have a focusing function, and the application of the voice coil motor is a relatively wide method for realizing automatic focusing. The main principle is that in a permanent magnetic field, the stretching position of the spring piece is controlled by changing the size of direct current of a coil in a motor, so that a lens is driven to move up and down, namely, the distance between the lens and an imaging surface is changed, and when the object distance is changed, the distance can be properly changed to realize focusing clearness.
Disclosure of Invention
The embodiment of the application provides a camera control method and device, a computer storage medium and a terminal, which can eliminate camera vibration caused by audio played by a loudspeaker and further avoid the problem of picture shake caused by camera vibration when a picture is collected by a camera. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a camera control method, where the method includes:
when a camera collects an image, acquiring a frequency value of an audio currently played by a terminal;
if the frequency value of the audio is determined to be the same as the frequency value of the vibration frequency of the camera motor, acquiring the volume of the audio;
and determining a target current based on the volume and the frequency value of the audio, and controlling a coil of the camera motor to be connected with the target current.
In a second aspect, an embodiment of the present application provides a camera control device, where the device includes:
the frequency acquisition module is used for acquiring the frequency value of the audio currently played by the terminal when the camera acquires an image;
the volume acquisition module is used for acquiring the volume of the audio if the frequency value of the audio is determined to be the same as the frequency value of the vibration frequency of the camera motor;
and the current determining module is used for determining a target current based on the volume and the frequency value of the audio frequency and controlling a coil of the camera motor to be connected with the target current.
In a third aspect, embodiments of the present application provide a computer storage medium having a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides a terminal, which may include: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the memory and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
when the scheme of the embodiment of the application is executed, under the condition that a camera collects images, the frequency value of the audio currently played by the terminal is obtained, if the frequency value of the audio is determined to be the same as the frequency value of the vibration frequency of the camera motor, the volume of the audio is obtained, a target current is determined based on the volume and the frequency value of the audio, and the coil of the camera motor is controlled to be connected with the target current. This application lets in the electric current through the coil at the camera motor for the ampere power that the coil current produced can offset the outside power that receives of camera (that audio frequency that the speaker broadcast arouses), that is to say, can eliminate the camera because the camera lens vibration that the outside atress arouses, and then can avoid the camera to appear the problem of picture shake because the camera lens vibration when gathering the picture.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is also possible for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a scene schematic diagram of a camera control method provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a camera control method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another camera control method provided in the embodiment of the present application;
fig. 4 is a schematic structural diagram of a camera control device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is to be noted that, unless otherwise explicitly specified and limited, the words "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. In addition, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In the related art, when the camera is placed in the cavity of the audio speaker, the camera resonates due to the played audio, and particularly, the camera with the automatic focusing function realized by the voice coil motor. When the focusing system is at the natural frequency and the frequency value of the audio frequency is near the frequency value of the natural frequency, external excitation can be generated to cause camera resonance, and further, clear and fuzzy picture jittering can be caused when an image acquired by the camera appears.
Fig. 1 is a schematic view of a scene of a camera control method according to an embodiment of the present disclosure.
As shown in fig. 1, includes: a first terminal and a second terminal.
In this embodiment, the first terminal may be a smart device having hardware such as a camera and a speaker (except for a display screen), and the camera is disposed in a cavity of the speaker. The second terminal may be a smart device with hardware such as a display screen, a camera, a speaker, a microphone, and the like, such as a desktop computer, a notebook, a tablet, and the like. The first terminal and the second terminal may be connected through a Wireless communication technology, such as bluetooth, Wireless Fidelity (WiFi for short), and the like; the connection between the first terminal and the second terminal may also be made by a wired communication technique, such as a USB connection line.
In this application embodiment, the first terminal can gather the image through the camera to and transmit the image of gathering to the smart machine who is connected with it, first terminal can also play audio file through the speaker. For example, in a video call scene, the first terminal and the second terminal shown in fig. 1 are in a connected state, the second terminal can perform a video call with other intelligent devices, the first terminal can be used as a camera of the second terminal, can collect an image, and transmit the image to the second terminal for display, or transmit the image to the intelligent device performing a call with the second terminal for display. The first terminal can be used as a camera and a loudspeaker of the second terminal, not only can images be collected and transmitted, but also audio files on the second terminal can be played by using the loudspeaker, and the audio files can be stored locally by the second terminal or played online by the second terminal.
Before describing the technical solutions of the embodiments of the present application more clearly, some concepts in the present application are described in detail to better understand the present solution.
A terminal: the method refers to a smart device with a camera, a speaker, and other hardware (except for a display screen), and specifically may refer to the first terminal in the scene diagram shown in fig. 1.
The present application will be described in detail with reference to specific examples.
In the following embodiments, for convenience of description, only the main subject of execution of each step is described as a terminal.
Referring to fig. 2, a schematic flow chart of a camera control method according to an embodiment of the present disclosure is shown, where the method according to the embodiment of the present disclosure may include the following steps:
s201, when the camera collects images, obtaining the frequency value of the audio currently played by the terminal.
In some embodiments, when the camera captures an image, the terminal plays an audio at the same time, and the audio signal of the audio can be identified by the frequency identification model, so that the frequency value of the audio can be obtained. The frequency identification model can be obtained by adopting a neural network model for training in advance, and when the frequency identification model is trained, an audio signal covering a common audio frequency range can be collected to be used as a sample to train the frequency identification model, so that the frequency identification model can output the frequency value of the audio signal according to the input audio signal.
S202, if the frequency value of the audio is determined to be the same as the frequency value of the vibration frequency of the camera motor, the volume of the audio is obtained.
It is understood that the vibration frequency refers to the natural frequency of the camera motor, and the natural frequency refers to a specific frequency determined only by the properties of the system when the structural system is excited by the outside to generate motion. In the present embodiment, there may be multiple natural frequencies of the camera motor.
In some embodiments, the terminal may store a plurality of natural frequencies of the camera motor in advance, and may directly acquire the stored frequency value of the natural frequency when determining whether the frequency value of the played audio is the same as the frequency value of the natural frequency of the camera motor, and then determine whether the frequency value of the audio is the same as any one of the natural frequency values, and when any one of the natural frequency values is the same as the frequency value of the audio, may determine the frequency value of the audio and the frequency value of the natural frequency (vibration frequency) of the camera motor of the terminal. Further, the volume of the currently played audio may be acquired.
S203, determining a target current based on the volume and the frequency value of the audio, and controlling a coil of the camera motor to be connected with the target current.
It is understood that there is a correspondence between the volume (volume of audio), the frequency value of audio, and the current (current of the coil of the camera motor). This is because, when the current is passed through the coil, the ampere force generated by the coil can cancel the excitation of the camera vibration caused by the audio frequency, and the excitation generated by the camera vibration caused by the audio frequency is mainly determined by the frequency value and the volume of the audio frequency. Therefore, in the embodiment of the application, the audio frequency causing the vibration of the camera can be played in advance, the volume of the audio frequency is controlled, the current introduced into the coil is controlled at the same time, the current capable of offsetting the vibration of the camera, the frequency value of the audio frequency and the volume are recorded, and the corresponding relation among the current, the frequency value and the volume is stored. Generally, when the frequency value of the audio is fixed, the volume of the audio can be adjusted from the lowest value to the highest value, in the adjusting process, the vibration condition of the camera is observed, and the current led into the coil is controlled, so that the volume which can cause the camera to vibrate has a current value corresponding to the volume (can counteract the camera vibration). Further, in the practical application process, after the frequency value and the volume of the played audio are determined, the target current corresponding to the frequency value and the volume can be searched from the determined corresponding relation, and then the target current is introduced into the coil of the camera motor, so that the camera vibration can be eliminated.
When the scheme of the embodiment of the application is executed, under the condition that a camera collects images, the frequency value of the audio currently played by the terminal is obtained, if the frequency value of the audio is determined to be the same as the frequency value of the vibration frequency of the camera motor, the volume of the audio is obtained, a target current is determined based on the volume and the frequency value of the audio, and the coil of the camera motor is controlled to be connected with the target current. This application lets in the electric current through the coil at the camera motor for the ampere power that the coil current produced can offset the outside power that receives of camera (that the audio frequency that the speaker broadcast arouses), that is to say, can eliminate the camera because the camera lens vibration that outside atress arouses, and then can avoid the camera because the camera lens vibration appears the problem of picture shake when gathering the picture.
Referring to fig. 3, a schematic flow chart of a camera control method according to an embodiment of the present disclosure is shown, where the method according to the embodiment of the present disclosure may include the following steps:
s301, controlling a coil of a camera motor to be in a non-electrified current state, and respectively playing audio corresponding to each preset frequency value.
It will be appreciated that the preset frequency value may be a frequency value in the frequency range of 20Hz to 20 KHz.
In some embodiments, the coil in the camera motor may be controlled to be in a non-current state, that is, if the current connected to the coil is 0, the coil cannot generate an ampere force, and in this state, the audio corresponding to each preset frequency value may be played through the speaker of the terminal, that is, the frequency value of the played audio is the preset frequency value. Specifically, since only one audio with a preset frequency value can be played in the same time period, the audio with different preset frequency values can be played randomly and in different time periods.
S302, determining the vibration state of a first image acquired by a camera under each audio frequency, and determining a preset frequency value set corresponding to a camera motor in each preset frequency value based on the vibration state of the first image.
It can be understood that the frequency value in the preset set of frequency values is a frequency value that can be a vibration frequency of the camera motor, i.e. a frequency value of a natural frequency of the camera motor, where the natural frequency is a specific frequency determined only by the properties of the system when the structural system is excited by the outside to generate motion.
The first image may be an image collected by the camera when the terminal plays audio.
The vibration state may include a vibration state and a non-vibration state.
In some embodiments, during the process that the terminal is playing an audio, the camera may capture one or more first images, and then the terminal may determine a vibration state of the first images, that is, determine whether the first images are in a vibration state or a non-vibration state, where the first images are in a vibration state to indicate that there is a picture shaking problem in the first images (the camera vibrates, which causes the captured images to have a picture shaking problem), and the first images are in a non-vibration state to indicate that there is no picture shaking problem in the first images (the camera does not vibrate, which causes the captured images to have no picture shaking problem). As for the manner of determining the vibration state of the first image, there may be two determination manners: firstly, a manual judgment mode is adopted, in the application scene shown in fig. 1, a first image acquired by a camera of a terminal (a first terminal) can be displayed on a second terminal, a technician can observe the first image on the second terminal and then judge the vibration state of the first image, the technician can feed the vibration state of the first image back to the second terminal, and further, the second terminal can send the vibration state of the first image to the terminal, and the terminal can determine the vibration state of the first image; and secondly, an automatic judgment mode is adopted, after the camera collects the first image, the terminal can identify the data of the first image by utilizing the self-configured algorithm, can identify the displacement change and the like of the object in the first image in a short time, and then judges the vibration state of the first image. Further, according to the judgment result of the vibration state of the first image, a preset frequency value of an audio frequency played by the first image with the vibration state when being collected is used as a frequency value in a preset frequency value set. It should be noted that, for the case that only one first image is acquired, only the vibration state of the first image may be determined; for the case that a plurality of first images are collected, the vibration states of the plurality of first images can be judged, when the number of the images in the vibration states exceeds a number threshold value, a preset frequency value of an audio frequency can be used as a frequency value in a preset frequency value set, and the accuracy of vibration state judgment can be improved through diversity by collecting the plurality of first images.
S303, respectively playing the test audio corresponding to each frequency value in the preset frequency value set.
S304, sequentially adjusting the volume of each test audio according to a preset volume range to obtain each test volume, and determining the vibration state of the second image acquired by the camera under the test audio corresponding to each test volume.
And S305, controlling a coil of the camera motor to be connected with each preset current based on the vibration state of the second image, and determining the vibration state of a third image acquired by the camera under each preset current.
And S306, determining a test current corresponding to the test volume in the preset currents based on the vibration state of the third image.
S303 to S306 will be explained below.
It will be appreciated that the test audio may be audio having frequency values that are frequency values from a set of preset frequency values.
The preset volume range refers to a volume range from the minimum volume value to the maximum volume value on the terminal.
The second image may be an image collected by the camera when the terminal plays the test audio of the test volume. The vibration state of the second image may be a vibration state of the second image and a non-vibration state of the second image.
The third image can be an image collected when the camera plays a test audio of the test volume at the terminal and a coil of a motor of the camera is connected with a preset current. The vibration state of the third image may be a vibration state of the third image and a non-vibration state of the third image.
The preset current can be preset current values with different magnitudes.
It should be noted that, S303 to S306 describe the execution steps of playing a plurality of test audios, only one test audio can be played in the same time period, and the following explanation takes playing one test audio as an example: playing a test audio corresponding to one frequency value in a preset frequency value set, adjusting the volume of the test audio according to a preset volume range to obtain a plurality of test volumes, determining the vibration state of a second image acquired by a camera under the test audio corresponding to the plurality of test volumes, controlling a coil of a motor of the camera to be connected with each preset current based on the vibration state of the second image, determining the vibration state of a third image under each preset current, and determining the test current corresponding to the test volume in each preset current based on the vibration state of the third image. And playing the test audio corresponding to other frequency values in the preset frequency value set respectively, and repeating the operation in sequence until all the vibration frequencies are finished executing the operation.
Specifically, when the terminal plays the test audio corresponding to one frequency value in the preset frequency value set, the volume of the test audio may be adjusted from the minimum volume value to the maximum volume value. In the process of adjusting the volume, when a test volume is obtained by each adjustment, that is, when the terminal plays the test audio of the test volume, the vibration state of the second image acquired by the camera may be determined, and the specific vibration state determination method may refer to the description process in S302, which is not described herein again. When the vibration state of the second image is determined to be a vibration state, sequentially passing each preset current into a coil of a camera motor; when the vibration state of the second image is determined to be a non-vibration state, the current in the coil may not be changed, and the current currently supplied to the coil may be maintained. Further, when the coil is supplied with the preset current, the terminal also plays the test audio of the test volume, and at this time, the vibration state of the third image acquired by the camera may be determined, and the specific vibration state determination method may refer to the description process in S302, which is not described herein again. And taking the preset current introduced into the coil as the test current corresponding to the test volume only when the vibration of the third image is determined to be in a non-vibration state.
It can be understood that, the process of sequentially passing each preset current through the coil may specifically be that the preset current may be sequentially passed through the coil according to a sequence of current values from large to smallAnd when each preset current is input, the vibration state of the third image acquired by the camera can be determined after each current is input, the process of inputting the preset current can be stopped after the vibration state of the third image is determined to be a non-vibration state, and the currently input preset current is used as the test current. Determining that the vibration state of the third image is a non-vibration state means that the current test current is introduced into the coil, and the ampere force generated by the coil can counteract the external force brought to the camera by the test audio under the current test volume. This is because a system constituted by a Voice Coil Motor (VCM) can be understood as an undamped single degree of freedom system, that is, mx "+ kx ═ F 0 e jwt If F cannot be cancelled out 0 e jwt The external excitation that causes will arouse the vibration of VCM shell fragment, and this scheme changes the electric current in the VCM coil for ampere force can offset the excitation of audio vibration, can accomplish vibration isolation, namely F gets 1 =BIL=F 0 e jwt In the formula F 1 The excitation represents the ampere force generated by the coil, B represents the magnetic induction intensity, I represents the current led in the coil, L represents the length of the coil, and w represents the frequency value of the audio frequency.
S307, establishing a mapping table among the frequency value corresponding to the test audio, the test volume corresponding to the test audio and the test current corresponding to the test volume.
From the above description, it can be seen that the ampere force is able to cancel the excitation of the audio vibration, i.e. F 1 =BIL=F 0 e jwt Further, I ═ F can be obtained 0 e jwt BL, let A ═ F 0 BL, in turn, can obtain I ═ Ae jwt In the formula, a represents the amplitude, usually the amplitude is determined by the volume of the audio, V represents the volume, a in the formula may be replaced by λ V, and the relationship between the current and the volume and frequency values, i.e., I ═ λ Ve, may be obtained jwt . Therefore, based on the frequency value corresponding to the test audio obtained in S303 to S306, the test volume of the test audio, and the test current corresponding to the test volume, a mapping table between the three may be established, and the mapping table may be stored locally in the terminal.
S308, when the camera collects the image, whether the terminal is in a state of transmitting the image in real time is detected, and if yes, the frequency value of the audio currently played by the terminal is obtained.
In some embodiments, the terminal may play audio while the camera collects the image, and further, the terminal may store the image collected by the camera locally, or may transmit the image collected by the camera to another terminal or a server. In the scheme, when the terminal is determined to be in a state of transmitting the image acquired by the camera to other terminals in real time, the frequency value of the audio currently played by the terminal can be acquired. For the mode of obtaining the frequency value of the audio, if the terminal stores the relevant information of the audio, the frequency value of the audio can be searched from the relevant information; if the terminal does not store the relevant information of the audio, the audio can be identified by adopting a pre-trained frequency identification model, so that the frequency value of the audio can be obtained. Therefore, when the terminal is in a state of implementing image transmission, the steps of the scheme are executed, and the resources of the terminal can be saved.
S309, when the frequency value is detected to be in the preset frequency value set, determining that the frequency value is the same as the frequency value of the vibration frequency of the camera motor, and acquiring the volume of the audio.
In some embodiments, according to the preset frequency value set obtained in S301 to S302, it may be detected whether the frequency value of the audio is in the preset frequency value set, where the specific detection manner may be to determine whether a frequency value equal to the frequency value of the audio exists in the preset frequency value set, and if the frequency value equal to the frequency value of the audio exists, it may be determined that the frequency value of the audio is equal to the frequency value of the vibration frequency of the camera motor, that is, the audio may cause the camera to vibrate, and then obtain the volume of the audio.
S310, determining a test current corresponding to the frequency values of the volume and the audio in the mapping table, taking the test current as a target current, and controlling a coil of the camera motor to be connected with the target current.
In some embodiments, according to the mapping table obtained in S306, the value of the volume may be used as a value of a test volume in the mapping table, the frequency value of the audio frequency may be used as a frequency value in the mapping table, and then, according to the determined frequency value and the test volume, a test current corresponding to the frequency value and the test volume at the same time may be searched in the mapping table, and further, the test current may be used as a target current corresponding to the camera motor, and the target current is passed through a coil of the camera motor.
S311, when the frequency value of the audio is not detected to be in the preset frequency value set, determining that the frequency value of the audio is different from the frequency value of the vibration frequency of the camera motor, and controlling a coil in the camera motor to keep the current which is currently conducted.
In some embodiments, according to the preset frequency value set obtained in S301 to S302, it may be detected whether the frequency value of the audio frequency is in the preset frequency value set, where the specific detection manner may be that whether a frequency value equal to the frequency value of the audio frequency exists in the preset frequency value set is determined, and if the frequency value does not exist, it may be determined that the frequency value of the audio frequency is not equal to the frequency value of the vibration frequency of the camera motor, that is, the audio frequency does not cause the camera to vibrate, the exterior of the camera is not excited by the audio frequency, and an ampere force generated by the coil is not required to counteract the excitation, so that a current currently passed through the coil is not changed, that is, the coil in the camera motor is controlled to maintain the current passed through the coil.
When the scheme of the embodiment of the application is executed, firstly, under the state that no current is conducted in the coil of the camera motor, the frequency values of the vibration frequency causing the camera to vibrate are obtained through testing, the frequency values can form a preset frequency value set, then, the audio frequency corresponding to each frequency value in the preset frequency value set is played, the external excitation of the camera is tested by adjusting the volume of the audio frequency, and the corresponding current is conducted in the coil, so that the ampere force generated by the coil can counteract the external excitation of different sizes, and therefore, the current value for eliminating the external excitation of the camera can be obtained. In practical application, namely the camera collects images, the terminal is in a state of transmitting the images, and under the condition that the terminal plays audio, a proper current value can be selected from the current values measured in advance according to the frequency value and the volume of the audio and is led into a coil of a motor of the camera. In the testing process, the whole process only involves playing audio, adjusting volume and changing current, and in the application process, only the current value introduced into the coil needs to be selected according to the frequency value and the volume of the audio, so that the ampere force generated by the coil eliminates the external excitation on the camera, a physical isolation external excitation mode is not needed, the cost for increasing physical vibration reduction can be saved, and the problem of picture jitter caused by lens vibration when the camera collects a picture can be avoided.
Fig. 4 is a schematic structural diagram of a camera control device according to an embodiment of the present disclosure. The camera control device 400 may be implemented as all or a part of the terminal by software, hardware, or a combination of both. The apparatus 400 comprises:
the frequency obtaining module 410 is configured to obtain a frequency value of an audio currently played by the terminal when the camera collects an image;
a volume obtaining module 420, configured to obtain a volume of the audio if it is determined that the frequency value of the audio is the same as the frequency value of the vibration frequency of the camera motor;
and a current determining module 430, configured to determine a target current based on the volume and the frequency value of the audio, and control a coil of the camera motor to apply the target current.
Optionally, the volume obtaining module 420 includes:
the first frequency determining unit is used for acquiring a preset frequency value set corresponding to the camera motor;
and the second frequency determining unit is used for determining that the frequency value of the audio is the same as the frequency value of the vibration frequency of the camera motor when the frequency value of the audio is detected to be in the preset frequency value set.
Optionally, the volume obtaining module 420 further includes:
the first frequency testing unit is used for controlling a coil of the camera motor to be in a non-electrified current state and respectively playing audio corresponding to each preset frequency value;
and the second frequency testing unit is used for determining the vibration state of a first image acquired by the camera under each audio frequency, and determining a preset frequency value set corresponding to the camera motor in each preset frequency value based on the vibration state of the first image.
Optionally, the apparatus 400 further comprises:
the first audio test module is used for respectively playing test audio corresponding to each frequency value in the preset frequency value set;
the second audio testing module is used for sequentially adjusting the volume of each testing audio according to a preset volume range to obtain each testing volume and determining the vibration state of a second image collected by the camera under the testing audio corresponding to each testing volume;
the third audio test module is used for controlling a coil of the camera motor to be connected with each preset current based on the vibration state of the second image and determining the vibration state of a third image acquired by the camera under each preset current;
the fourth audio test module is used for determining a test current corresponding to the test volume in the preset currents based on the vibration state of the third image;
and the fifth audio test module is used for establishing a mapping table among a frequency value corresponding to the test audio, test volume corresponding to the test audio and test current corresponding to the test volume.
Optionally, the current determining module 430 includes:
and the current determining unit is used for determining a test current corresponding to the frequency values of the volume and the audio in the mapping table, and taking the test current as a target current corresponding to the camera motor.
Optionally, the frequency obtaining module 410 includes:
the first state detection module is used for detecting whether the terminal is in a state of transmitting the image in real time when the camera collects the image;
and the second state detection module is used for executing the step of acquiring the frequency value of the audio currently played by the terminal if the audio currently played by the terminal is the audio currently played by the terminal.
Optionally, the apparatus 400 further comprises:
and the current control module is used for controlling a coil in the camera motor to keep the current which is currently introduced if the frequency value of the audio frequency is determined to be different from the frequency value of the vibration frequency of the camera motor.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure. As shown in fig. 5, the terminal 500 may include: at least one processor 501, at least one communication bus 502, a user interface 503, at least one network interface 504, and memory 505.
Wherein a communication bus 502 is used to enable connective communication between these components.
Where user interface 503 may include a Camera (Camera), optional user interface 803 may also include a standard wired interface, a wireless interface.
The network interface 504 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
The Memory 505 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable medium. The memory 505 may be used to store instructions, programs, code sets, or instruction sets. The memory 505 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 505 may alternatively be at least one memory device located remotely from the processor 501. As shown in fig. 5, a program of an operating system, a network communication module, a user interface module, and a camera control method may be included in the memory 505, which is a kind of computer storage medium.
In the terminal 500 shown in fig. 5, the processor 501 may be configured to call a program of a camera control method stored in the memory 505, and specifically perform the following operations:
when a camera collects an image, acquiring a frequency value of an audio currently played by a terminal;
if the frequency value of the audio is the same as the frequency value of the vibration frequency of the camera motor, acquiring the volume of the audio;
and determining a target current based on the volume and the frequency value of the audio, and controlling a coil of the camera motor to be connected with the target current.
In one embodiment, the processor 501 specifically performs the following operations when performing the step of determining that the frequency value of the audio is the same as the frequency value of the vibration frequency of the camera motor:
acquiring a preset frequency value set corresponding to a camera motor;
and when the frequency value of the audio is detected to be in the preset frequency value set, determining that the frequency value of the audio is the same as the frequency value of the vibration frequency of the camera motor.
In one embodiment, before performing the acquiring of the preset set of frequency values corresponding to the camera motor, the processor 501 further performs the following operations:
controlling a coil of a camera motor to be in a non-electrified current state, and respectively playing audio corresponding to each preset frequency value;
and determining the vibration state of a first image acquired by the camera under each audio frequency, and determining a preset frequency value set corresponding to the camera motor in each preset frequency value based on the vibration state of the first image.
In one embodiment, processor 501, prior to performing the determining the target current based on the frequency value of the volume and the audio, further performs the following:
respectively playing test audio corresponding to each vibration frequency in the preset frequency value set;
sequentially adjusting the volume of each test audio according to a preset volume range to obtain each test volume, and determining the vibration state of a second image acquired by the camera under the test audio corresponding to each test volume;
controlling a coil of a camera motor to be connected with each preset current based on the vibration state of the second image, and determining the vibration state of a third image acquired by the camera under each preset current;
determining a test current corresponding to the test volume in the preset currents based on the vibration state of the third image;
and establishing a mapping table among a frequency value corresponding to the test audio, test volume corresponding to the test audio and test current corresponding to the test volume.
In one embodiment, the processor 501, when executing the step of determining the target current based on the volume and the frequency value of the audio, specifically performs the following operations:
and determining a test current corresponding to the frequency values of the volume and the audio in the mapping table, and taking the test current as a target current corresponding to the camera motor.
In an embodiment, when the processor 501 executes the step of acquiring the frequency value of the audio currently played by the terminal when the camera captures the image, the following operations are specifically executed:
when a camera collects an image, detecting whether a terminal is in a state of transmitting the image in real time;
if so, executing the step of obtaining the frequency value of the audio currently played by the terminal.
In one embodiment, processor 501 also performs the following operations:
and if the frequency value of the audio frequency is determined to be different from the frequency value of the vibration frequency of the camera motor, controlling a coil in the camera motor to keep the current which is currently introduced.
In addition, those skilled in the art will appreciate that the configuration of terminal 500 illustrated in the above-described figures is not intended to be limiting, and that terminal 500 may include more or less components than those illustrated, or some components may be combined, or a different arrangement of components. For example, the terminal 500 further includes a radio frequency circuit, an audio circuit, a WiFi component, a power supply, a bluetooth component, and other components, which are not described herein again.
The embodiment of the present application further provides a computer-readable storage medium, where at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is used for being executed by a processor to implement the camera control method according to the above embodiments.
The embodiment of the present application further provides a computer program product, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the camera control method according to the above embodiments.
Those skilled in the art will recognize that the functionality described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof, in one or more of the examples described above. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims (10)
1. A camera control method, characterized in that the method comprises:
when a camera collects an image, acquiring a frequency value of an audio currently played by a terminal;
if the frequency value of the audio is the same as the frequency value of the vibration frequency of the camera motor, acquiring the volume of the audio;
and determining a target current based on the frequency values of the volume and the audio, and controlling a coil of the camera motor to be connected with the target current.
2. The method of claim 1, wherein determining that the frequency value of the audio is the same as the frequency value of the vibration frequency of the camera motor comprises:
acquiring a preset frequency value set corresponding to a camera motor;
and when the frequency value of the audio is detected to be in the preset frequency value set, determining that the frequency value of the audio is the same as the frequency value of the vibration frequency of the camera motor.
3. The method according to claim 2, wherein before acquiring the preset set of frequency values corresponding to the camera motor, the method further comprises:
controlling a coil of a camera motor to be in a non-electrified current state, and respectively playing audio corresponding to each preset frequency value;
and determining the vibration state of a first image acquired by the camera under each audio frequency, and determining a preset frequency value set corresponding to the camera motor in each preset frequency value based on the vibration state of the first image.
4. The method of any of claims 1-3, wherein prior to determining a target current based on the volume and the frequency value of the audio, further comprising:
respectively playing test audio corresponding to each frequency value in the preset frequency value set;
sequentially adjusting the volume of each test audio according to a preset volume range to obtain each test volume, and determining the vibration state of a second image acquired by the camera under the test audio corresponding to each test volume;
controlling a coil of a camera motor to be connected with each preset current based on the vibration state of the second image, and determining the vibration state of a third image acquired by the camera under each preset current;
determining a test current corresponding to the test volume in the preset currents based on the vibration state of the third image;
and establishing a mapping table among the frequency value corresponding to the test audio, the test volume corresponding to the test audio and the test current corresponding to the test volume.
5. The method of claim 4, wherein determining a target current based on the frequency values of the volume and the audio comprises:
and determining a test current corresponding to the frequency values of the volume and the audio in the mapping table, and taking the test current as a target current.
6. The method of claim 1, wherein the obtaining a frequency value of audio currently played by the terminal when the camera captures the image comprises:
when a camera collects an image, detecting whether a terminal is in a state of transmitting the image in real time;
if so, executing the step of obtaining the frequency value of the audio currently played by the terminal.
7. The method of claim 1 or 6, further comprising:
and if the frequency value of the audio frequency is determined to be different from the frequency value of the vibration frequency of the camera motor, controlling a coil of the camera motor to keep the current which is currently introduced.
8. A camera control apparatus, the apparatus comprising:
the frequency acquisition module is used for acquiring the frequency value of the audio currently played by the terminal when the camera acquires an image;
the volume acquisition module is used for acquiring the volume of the audio if the frequency value of the audio is determined to be the same as the frequency value of the vibration frequency of the camera motor;
and the current determining module is used for determining a target current based on the volume and the frequency value of the audio and controlling a coil of the camera motor to be connected with the target current.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 7.
10. A terminal, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210577906.4A CN115134522B (en) | 2022-05-25 | 2022-05-25 | Camera control method, device, storage medium and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210577906.4A CN115134522B (en) | 2022-05-25 | 2022-05-25 | Camera control method, device, storage medium and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115134522A true CN115134522A (en) | 2022-09-30 |
CN115134522B CN115134522B (en) | 2023-09-01 |
Family
ID=83376733
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210577906.4A Active CN115134522B (en) | 2022-05-25 | 2022-05-25 | Camera control method, device, storage medium and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115134522B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003215890A (en) * | 2002-01-23 | 2003-07-30 | Fuji Xerox Co Ltd | Image forming device |
US20100013937A1 (en) * | 2008-07-15 | 2010-01-21 | Canon Kabushiki Kaisha | Image stabilization control apparatus and imaging apparatus |
JP2015081950A (en) * | 2013-10-21 | 2015-04-27 | キヤノン株式会社 | Imaging device and control method of the same |
US20160202821A1 (en) * | 2015-01-14 | 2016-07-14 | Canon Kabushiki Kaisha | Electronic device and method for controlling electronic device |
CN113497882A (en) * | 2020-03-20 | 2021-10-12 | 华为技术有限公司 | Control method, voice coil motor, lens module and electronic equipment |
CN114125659A (en) * | 2021-10-29 | 2022-03-01 | 歌尔科技有限公司 | Volume real-time compensation method, electronic device and readable storage medium |
-
2022
- 2022-05-25 CN CN202210577906.4A patent/CN115134522B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003215890A (en) * | 2002-01-23 | 2003-07-30 | Fuji Xerox Co Ltd | Image forming device |
US20100013937A1 (en) * | 2008-07-15 | 2010-01-21 | Canon Kabushiki Kaisha | Image stabilization control apparatus and imaging apparatus |
JP2015081950A (en) * | 2013-10-21 | 2015-04-27 | キヤノン株式会社 | Imaging device and control method of the same |
US20160202821A1 (en) * | 2015-01-14 | 2016-07-14 | Canon Kabushiki Kaisha | Electronic device and method for controlling electronic device |
CN113497882A (en) * | 2020-03-20 | 2021-10-12 | 华为技术有限公司 | Control method, voice coil motor, lens module and electronic equipment |
CN114125659A (en) * | 2021-10-29 | 2022-03-01 | 歌尔科技有限公司 | Volume real-time compensation method, electronic device and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115134522B (en) | 2023-09-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102045618B (en) | Automatically adjusted microphone array, method for automatically adjusting microphone array, and device carrying microphone array | |
CN108259925A (en) | Music gifts processing method, storage medium and terminal in net cast | |
CN104052917A (en) | Notification control device, notification control method and storage medium | |
US9491401B2 (en) | Video call method and electronic device supporting the method | |
CN106033248B (en) | A kind of information processing method and electronic equipment | |
CN107205116A (en) | Image-selecting method and Related product | |
US10795442B2 (en) | Method of providing vibration and electronic device for supporting same | |
US11331569B2 (en) | Information processing device, information processing method, program, and information storage medium | |
CN109062535A (en) | Sounding control method, device, electronic device and computer-readable medium | |
CN111045945A (en) | Live broadcast simulating method, device, terminal, storage medium and program product | |
CN107749306B (en) | Vibration optimization method and mobile terminal | |
KR20200072196A (en) | Electronic device audio enhancement and method thereof | |
EP3757722B1 (en) | Information processing device, information processing method, and computer program | |
CN111447365A (en) | Shooting method and electronic equipment | |
CN103685935B (en) | Method and apparatus for controlling camera image capture | |
CN115134522B (en) | Camera control method, device, storage medium and terminal | |
CN109671425B (en) | Audio classification method, device and storage medium | |
CN107251541A (en) | Imaging control apparatus, image formation control method and imaging control system | |
CN114303365B (en) | Robot, control processing method, and storage medium | |
CN109144461A (en) | Sounding control method, device, electronic device and computer-readable medium | |
CN114760574A (en) | Audio playing method and laser projection equipment | |
CN109951341B (en) | Content acquisition method, device, terminal and storage medium | |
CN108766486B (en) | Control method and device and electronic equipment | |
JP2022129927A (en) | Image capturing apparatus, control method, and program | |
CN115474080B (en) | Wired screen-throwing control method and device |
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 |