CN115134522B - Camera control method, device, storage medium and terminal - Google Patents

Camera control method, device, storage medium and terminal Download PDF

Info

Publication number
CN115134522B
CN115134522B CN202210577906.4A CN202210577906A CN115134522B CN 115134522 B CN115134522 B CN 115134522B CN 202210577906 A CN202210577906 A CN 202210577906A CN 115134522 B CN115134522 B CN 115134522B
Authority
CN
China
Prior art keywords
audio
frequency value
camera
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.)
Active
Application number
CN202210577906.4A
Other languages
Chinese (zh)
Other versions
CN115134522A (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.)
Anker Innovations Co Ltd
Original Assignee
Anker Innovations 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 Anker Innovations Co Ltd filed Critical Anker Innovations Co Ltd
Priority to CN202210577906.4A priority Critical patent/CN115134522B/en
Publication of CN115134522A publication Critical patent/CN115134522A/en
Application granted granted Critical
Publication of CN115134522B publication Critical patent/CN115134522B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application discloses a camera control method, a 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 audio currently played by a terminal, acquiring the volume of the audio if the frequency value of the audio is identical to 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 led into the target current. According to the application, by introducing current into the coil of the camera motor, the ampere force generated by the coil current can counteract the force applied to the outside of the camera (caused by the audio played by the loudspeaker), that is, the lens vibration of the camera caused by the external force can be eliminated, and the problem of image shake caused by the lens vibration when the camera collects images can be avoided.

Description

Camera control method, device, storage medium and terminal
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and apparatus for controlling a camera, a storage medium, and a terminal.
Background
In the related art, most cameras of terminals have a focusing function, and application of a 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 direct current of the coil in the motor, so that the lens is driven to move up and down, namely, the distance between the lens and the imaging surface is changed, and when the object distance is changed, the distance can be properly changed to realize clear focusing in order to enable the imaging to be clear.
Disclosure of Invention
The embodiment of the application provides a camera control method, a camera control device, a computer storage medium and a terminal, which can eliminate camera vibration caused by audio played by a loudspeaker, and further can avoid the problem of picture jitter caused by the camera vibration when a camera collects pictures. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for controlling a camera, where the method includes:
acquiring a frequency value of audio currently played by a terminal when a camera acquires an image;
if the frequency value of the audio frequency is the same as the frequency value of the vibration frequency of the camera motor, acquiring the volume of the audio frequency;
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 electrified with the target current.
In a second aspect, an embodiment of the present application provides a camera control apparatus, including:
the frequency acquisition module is used for acquiring the frequency value of the audio currently played by the terminal when the camera acquires the 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 the coil of the camera motor to be led into 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-described 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 technical scheme provided by the embodiment of the application has the beneficial effects that at least:
when the scheme of the embodiment of the application is executed, under the condition that the camera acquires an image, acquiring the frequency value of the audio currently played by the 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, determining a target current based on the volume and the frequency value of the audio, and controlling the coil of the camera motor to be fed with the target current. According to the application, by introducing current into the coil of the camera motor, the ampere force generated by the coil current can counteract the force applied to the outside of the camera (caused by the audio played by the loudspeaker), that is, the lens vibration of the camera caused by the external force can be eliminated, and the problem of image shake caused by the lens vibration when the camera collects images can be avoided.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application and that other drawings may be obtained from them without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a camera control method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a camera control method according to an embodiment of the present application;
fig. 3 is a flowchart of another camera control method according to an 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 of 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 apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the present application, it should 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 should be noted that, unless expressly specified and limited otherwise, "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may 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 will be understood in specific cases by those of ordinary skill in the art. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is 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 in particular, the camera with the auto-focusing function realized by the voice coil motor. When the focusing system is at the natural frequency and the frequency value of the audio is near the frequency value of the natural frequency, external excitation is generated, so that the camera is caused to resonate, and further, clear and blurred picture jitter is caused when the image acquired by the camera appears.
Fig. 1 is a schematic view of a camera control method according to an embodiment of the present application.
As shown in fig. 1, includes: a first terminal and a second terminal.
In the embodiment of the application, the first terminal may be an intelligent device provided with hardware such as a camera and a speaker (except for a display screen), and the camera is placed in a cavity of the speaker. The second terminal may be an intelligent device with hardware such as a display, a camera, a speaker, a microphone, etc., such as a desktop computer, a notebook, a tablet, etc. The first terminal and the second terminal can be connected through a wireless communication technology, such as Bluetooth, wireless fidelity (Wireless Fidelity, wiFi for short) and the like; the first terminal and the second terminal may also be connected by a wired communication technology, such as a USB connection.
In the embodiment of the application, the first terminal can acquire the image through the camera and transmit the acquired image to the intelligent equipment connected with the first terminal, and the first terminal can play the audio file through the loudspeaker. For example, in a video call scenario, the first terminal and the second terminal shown in fig. 1 are in a connection state, the second terminal may perform video call with other intelligent devices, the first terminal may be used as a camera of the second terminal, may collect an image, and transmit the image to the second terminal for display, or transmit the image to the intelligent device that performs 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 collect images and transmit the images, but also can play audio files on the second terminal by using the loudspeaker, wherein the audio files can be audio files stored locally by the second terminal or can be audio files played on line by the second terminal.
In order to more clearly describe the technical solution of the embodiments of the present application, before the description, some concepts of the present application are described in detail so as to better understand the present solution.
And (3) a terminal: the smart device refers to a smart device with a camera, a speaker, and/or other hardware (except for a display screen), and can specifically refer to a first terminal in a 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 explanation, only the execution subject of each step will be described as a terminal.
Referring to fig. 2, a flow chart of a camera control method provided by an embodiment of the present application may include the following steps:
s201, when the camera collects images, the frequency value of the audio played by the terminal at present is obtained.
In some embodiments, under the condition that the camera collects an image, the terminal plays audio at the same time, and the audio signal of the audio can be identified through the frequency identification model, so that the frequency value of the audio can be obtained. The frequency identification model can be obtained by training a neural network model in advance, and when the frequency identification model is trained, the frequency identification model can be trained by collecting the audio signals covering the common audio frequency range as samples, so that the frequency identification model can output the frequency value of the audio signals according to the input audio signals.
S202, if the frequency value of the audio is identical to the frequency value of the vibration frequency of the camera motor, acquiring the volume of the audio.
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 nature of the system when the structural system is excited to move by the outside. In an embodiment of the application, there may be multiple natural frequencies for the camera motor.
In some embodiments, the terminal may store a plurality of natural frequencies of the camera motor in advance, and when judging whether the frequency value of the played audio is the same as the frequency value of the natural frequency of the camera motor, may directly acquire the frequency value of the stored natural frequency, then judge whether the frequency value of the audio is the same as the frequency value of any one natural frequency, and when the frequency value of any one natural frequency 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 obtained.
And 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 feed in the target current.
It is understood that there is a correspondence between the sound volume (the sound volume of the audio), the frequency value of the audio, and the current (the current of the coil of the camera motor). This is because, when a current is applied to the coil, an ampere force generated by the coil can cancel excitation of camera vibration caused by audio, and excitation caused by camera vibration caused by audio is mainly determined by a frequency value and a volume of audio. Therefore, in the embodiment of the application, the audio which causes the vibration of the camera can be played in advance, the volume of the audio is controlled, the current which is introduced into the coil is controlled at the same time, the current which can offset the vibration of the camera, the frequency value of the audio and the volume are recorded, and the corresponding relation among the three is stored. In general, 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, and in the adjustment process, the vibration condition of the camera is observed, and the current flowing into the coil is controlled so that the volume which can cause the vibration of the camera has a current value corresponding to the volume (can offset the vibration of the camera). Furthermore, in the actual 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 vibration of the camera can be eliminated.
When the scheme of the embodiment of the application is executed, under the condition that the camera acquires an image, acquiring the frequency value of the audio currently played by the 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, determining a target current based on the volume and the frequency value of the audio, and controlling the coil of the camera motor to be fed with the target current. According to the application, by introducing current into the coil of the camera motor, the ampere force generated by the coil current can counteract the force applied to the outside of the camera (caused by the audio played by the loudspeaker), that is, the lens vibration of the camera caused by the external force can be eliminated, and the problem of image shake caused by the lens vibration when the camera collects images can be avoided.
Referring to fig. 3, a flowchart of a camera control method provided by an embodiment of the present application may include the following steps:
s301, controlling the coils of the camera motor to be in a non-energized state, and respectively playing audio corresponding to each preset frequency value.
It is understood 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 state of no current, i.e. the current connected to the coil is 0, so that the coil cannot generate ampere force, in this state, audio corresponding to each preset frequency value may be played through the speaker of the terminal, i.e. the frequency value of the played audio is the preset frequency value. Specifically, the audio corresponding to each preset frequency value is played, and because only one preset frequency value of audio 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 the 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 frequency value set is a frequency value that can be the vibration frequency of the camera motor, that is, the natural frequency of the camera motor, where the natural frequency refers to a specific frequency that is determined only by the nature of the system when the structural system is excited by the outside to generate motion.
The first image may be an image acquired 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 collect one or more first images, and then the terminal may determine the vibration state of the first images, that is, determine whether the first images are in the vibration state or the no vibration state, where the first images are in the vibration state, which indicates that the first images have a problem of frame shake (the camera vibrates, which causes the collected images to have a problem of frame shake), and the first images are in the no vibration state, which indicates that the first images do not have a problem of frame shake (the camera does not vibrate, so the collected images do not have a problem of frame shake). As the manner of determining the vibration state of the first image, there are two determination manners: firstly, a manual judgment mode is adopted, under 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 back the vibration state of the first image to the second terminal, 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 judging mode is adopted, after the camera collects the first image, the terminal can identify the data of the first image by utilizing an algorithm configured by the terminal, can identify displacement changes and the like of objects in the first image in a short time, and then judges the vibration state of the first image. Further, according to the above-mentioned judgment result of the vibration state of the first image, the preset frequency value of the audio played by the first image with the vibration state when being collected may be used as one frequency value in the preset frequency value set. In the case where 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, the preset frequency value of the audio can be used as one frequency value in the preset frequency value set, and the accuracy of vibration state judgment can be improved through multiple samples in a mode of collecting the plurality of first images.
S303, respectively playing 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 a second image acquired by the camera under the test audio corresponding to each test volume.
S305, controlling the coil of the camera motor to supply each preset current based on the vibration state of the second image, and determining the vibration state of the third image acquired by the camera under each preset current.
S306, determining a test current corresponding to the test volume in each preset current based on the vibration state of the third image.
S303 to S306 are explained below.
It is understood that the test audio may be audio with a frequency value being a frequency value in a preset set of frequency values.
The preset volume range refers to a volume range from a volume minimum value to a volume maximum value on the terminal.
The second image may be an image acquired by the camera when the terminal plays the test audio with 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 acquired when the camera plays test audio with test volume at the terminal and a preset current is introduced into a coil of the camera motor. The vibration state of the third image may be a vibration state of the third image and a vibration-free 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, and only one test audio can be played in the same time period, and the following explanation is given by taking playing one test audio as an example: playing test audio corresponding to one frequency value in the 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 the camera under the test audio corresponding to the plurality of test volumes, controlling the coil of the camera motor to be electrified with preset currents based on the vibration state of the second image, determining the vibration state of a third image under the preset currents, and determining the test current corresponding to the test volume in the preset currents 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, and repeatedly executing the operations in sequence until all the vibration frequencies are finished executing the operations.
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 can 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 adjusting, that is, when the terminal plays the test audio of the test volume, the vibration state of the second image collected by the camera can be determined, and the specific vibration state determination method can refer to the description process in S302, which is not repeated herein. When the vibration state of the second image is determined to be the vibration state, each preset current can be sequentially introduced into the coil of the camera motor; when it is determined that the vibration state of the second image is the vibration-free state, the current in the coil may not be changed, and the current currently flowing in the coil may be maintained. Further, when the preset current is introduced into the coil, the terminal is still playing the test audio of the test volume, at this time, the vibration state of the third image collected by the camera can be determined, and the specific vibration state determination method can refer to the description process in S302, which is not repeated here. Only when the vibration of the third image is determined to be in a vibration-free state, a preset current flowing in the coil is used as a test current corresponding to the test volume.
It can be understood that the process of sequentially introducing each preset current into the coil may specifically be that each preset current may be sequentially introduced into the coil according to the order of the current value from large to small, after each current is introduced, the vibration state of the third image collected by the camera may be determined, after the vibration state of the third image is determined to be the vibration-free state, the process of introducing the preset current may be stopped, and the currently introduced preset current is used as the test current. The vibration state of the third image is determined to be a vibration-free state, which means that the current test current is introduced into the coil, and ampere force generated by the coil can offset the external force brought by the test audio frequency under the current test volume to the camera. This is because a system of Voice Coil motors (VCM for short) can be understood as an undamped single degree of freedom system, i.e., mx "+kx=F 0 e jwt If not cancel F 0 e jwt The external excitation caused will cause the VCM spring to vibrate, while the present solution changes the current in the VCM coil so that the ampere force can cancelExcitation of audio vibrations, vibration isolation being possible, i.e. F 1 =BIL=F 0 e jwt F in the formula 1 Excitation represents the ampere force generated by the coil, B represents the magnetic induction intensity, I represents the current flowing in the coil, L represents the length of the coil, and w represents the frequency value of the audio frequency.
S307, 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 is established.
From the above description, it is known that ampere force can counteract excitation of audio vibration, i.e. F 1 =BIL=F 0 e jwt Further, i=f can be obtained 0 e jwt BL, assuming a=f 0 BL, again, can yield i=ae jwt The A in the formula represents the amplitude, the amplitude is usually determined by the volume of the audio, the volume is represented by V, the A in the formula can be replaced by lambda V, and the relation between the current and the volume and the frequency value can be obtained, namely I=lambda Ve jwt . Therefore, based on the frequency value corresponding to the test audio, the test volume of the test audio, and the test current corresponding to the test volume obtained in S303 to S306, a mapping table between the three may be established, and the mapping table may be stored locally at the terminal.
S308, detecting whether the terminal is in a state of transmitting the image in real time when the camera acquires the image, and if so, acquiring the frequency value of the audio currently played by the terminal.
In some embodiments, the terminal may collect the image by the camera and play the audio, and further, the terminal may store the image collected by the camera locally, or may transmit the image collected by the camera to other terminals or servers. 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 acquiring the frequency value of the audio, if the relevant information of the audio is stored in the terminal, the frequency value of the audio can be searched from the relevant information; if the relevant information of the audio is not stored in the terminal, 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, the steps of the scheme are executed in the state that the terminal is in the image transmission implementation state, so that the resources of the terminal can be saved.
And 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, whether the frequency value of the audio is in the preset frequency value set may be detected, by determining whether a frequency value equal to the frequency value of the audio exists in the preset frequency value set, 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 acquiring the volume of the audio.
S310, determining a test current corresponding to the volume and the frequency value of the audio in the mapping table, taking the test current as a target current, and controlling a coil of the camera motor to feed in the target current.
In some embodiments, according to the mapping table obtained in S306, the value of the volume may be used as the value of the test volume in the mapping table, the frequency value of the audio may be used as the frequency value in the mapping table, then the frequency value and the test volume may be determined according to the foregoing description, and the test current corresponding to the frequency value and the test volume may be searched in the mapping table.
And S311, when the frequency value of the audio is detected not 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.
In some embodiments, according to the preset frequency value set obtained in S301 to S302, whether the frequency value of the audio is in the preset frequency value set may be detected, or not, specifically, the detecting mode may be that whether a frequency value equal to the frequency value of the audio exists in the preset frequency value set is determined, if not, it may be determined that the frequency value of the audio is not equal to the frequency value of the vibration frequency of the camera motor, that is, the audio may not cause the vibration of the camera, the exterior of the camera may not be excited by the audio, and the excitation may not be offset by an ampere force generated by the coil, so that the current currently introduced into the coil may not be changed, that is, the coil in the camera motor is controlled to keep the current currently introduced.
When the scheme of the embodiment of the application is executed, firstly, frequency values of vibration frequency which causes the vibration of the camera are tested under the condition that current is not conducted in the coil of the camera motor, the frequency values can form a preset frequency value set, then, the external excitation applied to the camera is tested by playing audio corresponding to each frequency value in the preset frequency value set and adjusting the volume of the audio, and corresponding current is conducted in the coil, so that ampere force generated by the coil can offset the external excitation with different magnitudes, 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 current values measured in advance according to the frequency value and the volume of the audio, and the current value is fed into a coil of a camera motor. In the testing process, the whole process only involves playing audio, adjusting the volume and changing the current, and in the application process, only the current value which is fed into the coil is 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 of the camera, a mode of physically isolating the external excitation is not required, the increased cost of physical vibration reduction is saved, and the problem of picture shake caused by vibration of a lens when the camera collects pictures is avoided.
Fig. 4 is a schematic structural diagram of a camera control device according to an embodiment of the present application. The camera control apparatus 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 acquisition module 410 is configured to acquire a frequency value of audio currently played by the terminal when the camera acquires an image;
the volume obtaining module 420 is configured to obtain the 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 the current determining module 430 is configured to determine a target current based on the volume and the frequency value of the audio, and control the coil of the camera motor to supply the target current.
Optionally, the volume acquisition module 420 includes:
the first frequency determining unit is used for obtaining 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 acquisition module 420 further includes:
the first frequency testing unit is used for controlling the coil of the camera motor to be in a state of no current flowing and playing audio corresponding to each preset frequency value respectively;
the second frequency testing unit is used for determining the vibration state of the 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 includes:
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 test module is used for 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;
the third audio test module is used for controlling the coil of the camera motor to be electrified with preset currents based on the vibration state of the second image, and determining the vibration state of a third image acquired by the camera under the preset currents;
a fourth audio test module, configured to determine a test current corresponding to the test volume from 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 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.
Optionally, the current determination module 430 includes:
and the current determining unit is used for determining a test current corresponding to the volume and the frequency value of the audio in the mapping table, and taking the test current as a target current corresponding to the camera motor.
Optionally, the frequency acquisition 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 acquires 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 is played by the terminal.
Optionally, the apparatus 400 further includes:
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 application. 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, a memory 505.
Wherein a communication bus 502 is used to enable connected communications between these components.
The user interface 503 may include a Camera (Camera), and the optional user interface 803 may further include a standard wired interface and a wireless interface.
The network interface 504 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 501 may include one or more processing cores. The processor 501 connects various parts within the overall terminal 500 using various interfaces and lines, performs various functions of the terminal 500 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 505, and invoking data stored in the memory 505. Alternatively, the processor 501 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 501 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 501 and may be implemented by a single chip.
The Memory 505 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 505 comprises a non-transitory computer readable medium (non-transitory computer-readable storage medium). 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 above-described various method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 505 may also optionally be at least one storage 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 as one type of computer storage medium.
In the terminal 500 shown in fig. 5, the processor 501 may be used to call a program of a camera control method stored in the memory 505, and specifically perform the following operations:
acquiring a frequency value of audio currently played by a terminal when a camera acquires an image;
if the frequency value of the audio frequency is the same as the frequency value of the vibration frequency of the camera motor, acquiring the volume of the audio frequency;
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 electrified with the target current.
In one embodiment, the processor 501, when executing 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, specifically executes the following operations:
acquiring a preset frequency value set corresponding to a camera motor;
when the frequency value of the audio is detected to be in the preset frequency value set, the frequency value of the audio is determined to be the same as the frequency value of the vibration frequency of the camera motor.
In one embodiment, before executing the acquiring the preset frequency value set corresponding to the camera motor, the processor 501 further executes the following operations:
controlling the coil of the camera motor to be in a non-current state, and respectively playing audio corresponding to each preset frequency value;
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, the processor 501, prior to performing the determining the target current based on the volume and the frequency value of 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 the camera motor to be electrified with preset currents based on the vibration state of the second image, and determining the vibration state of a third image acquired by the camera under the preset currents;
determining a test current corresponding to the test volume in each preset current 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.
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 volume and the frequency value of the audio in the mapping table, and taking the test current as a target current corresponding to the camera motor.
In one embodiment, the processor 501, when executing the step of acquiring the frequency value of the audio currently played by the terminal when the camera captures an image, specifically performs the following operations:
when a camera acquires an image, detecting whether a terminal is in a state of transmitting the image in real time;
if yes, executing the step of acquiring the frequency value of the audio currently played by the terminal.
In one embodiment, the processor 501 also performs the following operations:
and if the frequency value of the audio frequency is 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 structure of the terminal 500 illustrated in the above-described figures does not constitute a limitation of the terminal 500, and the terminal may include more or less components than illustrated, or may combine certain components, or may have 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 the like, which are not described herein.
The embodiment of the application also provides a computer readable storage medium, which stores at least one instruction for being executed by a processor to implement the camera control method according to the above embodiments.
Embodiments of the present application also provide a computer program product storing at least one instruction that is loaded and executed by the processor to implement the camera control method according to the above embodiments.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these 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 foregoing description of the preferred embodiments of the present application is not intended to limit the application, but rather, the application is to be construed as limited to the appended claims.

Claims (9)

1. A camera control method, the method comprising:
acquiring a frequency value of audio currently played by a terminal when a camera acquires an image;
acquiring a preset frequency value set corresponding to a camera motor, wherein the frequency value in the preset frequency set is the frequency value of the natural frequency of the camera motor, and the frequency value of the natural frequency of the camera motor is pre-stored in a terminal;
if 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, and 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 electrified with the target current.
2. The method according to claim 1, further comprising, before the obtaining the set of preset frequency values corresponding to the camera motor:
controlling the coil of the camera motor to be in a non-current state, and respectively playing audio corresponding to each preset frequency value;
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.
3. The method of any of claims 1-2, 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 the camera motor to be electrified with preset currents based on the vibration state of the second image, and determining the vibration state of a third image acquired by the camera under the preset currents;
determining a test current corresponding to the test volume in each preset current 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.
4. A method according to claim 3, wherein said determining a target current based on said volume and a frequency value of said audio comprises:
and determining a test current corresponding to the volume and the frequency value of the audio in the mapping table, and taking the test current as a target current.
5. The method of claim 1, wherein the acquiring the frequency value of the audio currently played by the terminal when the camera captures the image comprises:
when a camera acquires an image, detecting whether a terminal is in a state of transmitting the image in real time;
if yes, executing the step of acquiring the frequency value of the audio currently played by the terminal.
6. The method according to claim 1 or 5, characterized in that the method further comprises:
and if the frequency value of the audio frequency is different from the frequency value of the vibration frequency of the camera motor, controlling the coil of the camera motor to keep the current.
7. 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 the image;
the volume acquisition module is used for acquiring a preset frequency value set corresponding to the camera motor, wherein the frequency value in the preset frequency set is the frequency value of the natural frequency of the camera motor, and the frequency value of the natural frequency of the camera motor is pre-stored in the terminal;
if 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, and acquiring the volume of the audio;
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 the coil of the camera motor to be led into the target current.
8. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any one of claims 1 to 6.
9. 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-6.
CN202210577906.4A 2022-05-25 2022-05-25 Camera control method, device, storage medium and terminal Active CN115134522B (en)

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 CN115134522A (en) 2022-09-30
CN115134522B true 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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003215890A (en) * 2002-01-23 2003-07-30 Fuji Xerox Co Ltd Image forming device
JP2015081950A (en) * 2013-10-21 2015-04-27 キヤノン株式会社 Imaging device and control method of the same
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5094606B2 (en) * 2008-07-15 2012-12-12 キヤノン株式会社 Image shake correction apparatus, optical apparatus including the same, image pickup apparatus, and image shake correction apparatus control method
JP6399936B2 (en) * 2015-01-14 2018-10-03 キヤノン株式会社 Electronic device, control method of electronic device, program, and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003215890A (en) * 2002-01-23 2003-07-30 Fuji Xerox Co Ltd Image forming device
JP2015081950A (en) * 2013-10-21 2015-04-27 キヤノン株式会社 Imaging device and control method of the same
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
CN115134522A (en) 2022-09-30

Similar Documents

Publication Publication Date Title
US20130287215A1 (en) Apparatus and method for outputting audio
CN106504770A (en) The test system and method for testing of speech quality, test device
CN104052917A (en) Notification control device, notification control method and storage medium
JP7162683B2 (en) Image denoising model training method, image denoising method, device and medium
US20190265798A1 (en) Information processing apparatus, information processing method, program, and information processing system
CN106021092A (en) Method and device for determining starting duration of application program
US9491401B2 (en) Video call method and electronic device supporting the method
KR20200072196A (en) Electronic device audio enhancement and method thereof
CN107749306B (en) Vibration optimization method and mobile terminal
CN107684787B (en) Dust removal method and dust removal device for mobile terminal
EP3757722B1 (en) Information processing device, information processing method, and computer program
CN115134522B (en) Camera control method, device, storage medium and terminal
CN111045945A (en) Live broadcast simulating method, device, terminal, storage medium and program product
CN106804010B (en) Incoming call processing method and device based on virtual reality equipment and virtual reality equipment
CN104200817B (en) Sound control method and system
CN107483855B (en) Television audio control method, television and computer readable storage medium
JP6071054B2 (en) Communication device and method for controlling voice input / output unit
CN105245898B (en) Image data recording method and device
CN109471683A (en) A kind of information displaying method, electronic equipment and storage medium
US20220095009A1 (en) Method and apparatus for controlling audio sound quality in terminal using network
KR20220015306A (en) Electronic device and control method thereof
CN103489464A (en) Effect control device, effect control method, and program
CN113676826A (en) Testing method, device and system of multi-horn module and storage medium
US20190122687A1 (en) Method for processing audio signal and electronic device for supporting the same
CN100481883C (en) Image pickup terminal

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