A kind of method and device inhibiting the intelligent sound box camera-shake with cameraTechnical field
This application involves Smart Home technical fields, more particularly to inhibit the intelligent sound box camera-shake with cameraMethod and device, electronic equipment, computer readable storage medium.
Background technique
In recent years, smart home technology is quickly grown, and the various smart home device layers such as intelligent air condition, intelligent door and window go out notThoroughly.There is the intelligent sound box with camera function in smart home field at present, has not only realized the function of intelligent sound box, but also realizesThe function of monitoring camera-shooting.
Product, the components such as loudspeaker, circuit board, camera are each attached to intelligent sound box with camera as a wholeTogether.When playing sound, since the production principle of sound is vibration, product branch will be passed through by the vibration that loudspeaker generate in this wayFrame or shell are conducted to CCD camera assembly, cause the vibration of camera.
The slight vibration general user of camera is difficult to discover, and some slight vibrations can by optical anti-vibration orDigital Image Processing algorithm is handled, but some vibrations by a relatively large margin, passes through optical anti-vibration or Digital Image ProcessingAlgorithm can not be solved effectively.
The intensity of vibration can be characterized with amplitude, and amplitude is bigger, and the vibration of camera is more violent, with the increasing of amplitudeGreatly, optical anti-vibration or the efficiency of Digital Image Processing algorithm sharply decline.After reaching certain amplitude, optical anti-vibration or numberThe failure of word image processing algorithm, at this point, user can be clearly felt that the shake of video image, it is smudgy, video can not be recognizedOr the content of image.Especially when intelligent sound box broadcasts the big volume sound more than amplification of volume sound, especially low frequency components,Jitter phenomenon is particularly evident.This is because speaker vibration amplitude caused by the big volume sound of low frequency is larger, and low-frequency jitter phaseIt is easier to be felt by human hair compared with high dither.
It would therefore be highly desirable to solve camera-shake when intelligent sound box broadcasts amplification of volume sound and cause shooting video image fuzzy notThe problem of can not even watching clearly.
Summary of the invention
Based on above-mentioned technical problem, the application provides a kind of method for inhibiting the intelligent sound box camera-shake with cameraAnd device carries out gain inhibition to the frequency point for having violent oscillatory motion, reduces amplitude when discovery camera has and significantly shakes,Mitigate or avoid the shake of video image.
Wherein, technical solution used by the application are as follows:
The application first aspect provides a kind of method for inhibiting the intelligent sound box camera-shake with camera, will accelerateIt spends sensor rigid and connects the camera, which comprises
The acceleration value that the acceleration transducer measures is converted to the amplitude of each frequency point;
The amplitude is compared with preset amplitude threshold, when the amplitude of some frequency point is more than that the frequency point is presetWhen amplitude threshold, gain adjustment is carried out, to reduce the amplitude of the frequency point.
As a kind of perferred technical scheme, the setting method of the amplitude threshold are as follows:
When the intelligent sound box does not play sound, test the camera central area horizontal definition RH and/Or vertical resolution RV;
After the intelligent sound box is transferred to max volume, the sinusoidal sound signal of some fixed frequency is inputted, it will be describedThe amplitude of the sinusoidal sound signal of input is ascending to be incremented by, and the horizontal definition RH or the vertical resolution RV is anyOne attenuation amplitude reaches amplitude A when m%LfAs the initial amplitude value for shooting image degradation under the fixed frequency;
The sinusoidal sound signal for inputting other fixed frequencies, obtains corresponding amplitude threshold;
Obtain amplitude threshold curve ALf-f。
As a kind of perferred technical scheme, the carry out gain adjustment specifically: carried out by generating new EQ curveGain adjustment,
In formula, EQRawFor former EQ curve values, ALfFor the corresponding amplitude threshold of frequency f, AfFor the corresponding amplitude of frequency f, f(Af) it is correction function.
As a kind of perferred technical scheme, the correction function are as follows: f (Af)=K (AHf-ALf)(Af-ALf)+b
In formula, AHfFor the corresponding limit amplitude threshold value of frequency f, K, b are corrected parameter.
As a kind of perferred technical scheme, the setting method of the limit amplitude threshold value are as follows:
When the intelligent sound box does not play sound, test the camera central area horizontal definition RH and/Or vertical resolution RV;
After the intelligent sound box is transferred to max volume, the sinusoidal sound signal of some fixed frequency is inputted, it will be describedThe amplitude of the sinusoidal sound signal of input is ascending to be incremented by, and the horizontal definition RH or the vertical resolution RV is anyOne attenuation amplitude reaches amplitude A when n%HfAs the limit amplitude threshold value under the fixed frequency;
The sinusoidal sound signal for inputting other fixed frequencies obtains corresponding limit amplitude threshold value;
Obtain limit amplitude threshold curve AHf-f。
As a kind of perferred technical scheme, the selection range of the fixed frequency is 20Hz~1KHz.
As a kind of perferred technical scheme, the acceleration value that the acceleration transducer is measured is converted to each frequencyThe amplitude of point specifically:
Acquire the acceleration transducer X-axis, Y-axis, the real time acceleration value on Z axis;
The real time acceleration value is filtered, filter out null offset and or high-frequency noise;
By Digital Signal Processing, amplitude is obtained.
The application second aspect provides a kind of device for inhibiting intelligent sound box camera-shake, by acceleration transducer rigidityThe camera is connected, described device includes:
Measure converting unit: the acceleration value for measuring the acceleration transducer is converted to the amplitude of each frequency pointValue;
Comparing unit: for the amplitude to compare with preset amplitude threshold;
Gain adjusting unit: when the amplitude of some frequency point amplitude threshold preset more than the frequency point, for being increasedBenefit adjustment, reduces the amplitude of the frequency point.
The application third aspect provides a kind of electronic equipment, including processor and memory, stores on the memoryThere is computer-readable instruction, realizes that the inhibition of first aspect has when the computer-readable instruction is executed by the processor and take the photographAs the method for the intelligent sound box camera-shake of head.
The application fourth aspect provides a kind of computer readable storage medium, is stored thereon with computer program, describedRealize the inhibition of first aspect with the method for the intelligent sound box camera-shake of camera when computer program is executed by processor.
Acceleration transducer is rigidly connected camera, the acceleration value that the acceleration transducer measures is converted to respectivelyThe amplitude of frequency point compares the amplitude with preset amplitude threshold, when the amplitude of some frequency point is more than the frequency pointWhen preset amplitude threshold, carrying out gain adjustment can be solved with reducing the amplitude of the frequency point using method provided by the present applicationCertainly intelligent sound box when broadcasting amplification of volume sound and opening camera function, shake by the camera due to caused by speaker vibration, makesThe problem of can not normally being watched at the video of recording.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, notThe application can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the applicationExample, and in specification it is used to explain the principle of the application together.
Fig. 1 is a kind of a kind of method of intelligent sound box camera-shake of inhibition with camera shown in exemplary embodimentFlow chart;
Fig. 2 is the setting method of amplitude threshold shown according to an exemplary embodiment;
Fig. 3 is a kind of schematic diagram of resolution chart shown according to an exemplary embodiment;
Fig. 4 is the setting method of limit amplitude threshold value shown according to an exemplary embodiment;
Fig. 5 is the device shown according to an exemplary embodiment for inhibiting the intelligent sound box camera-shake with cameraStructural schematic diagram.
Through the above attached drawings, it has been shown that the specific embodiment of the application will be hereinafter described in more detail, these attached drawingsIt is not intended to limit the range of the application design in any manner with verbal description, but is by referring to specific embodimentsThose skilled in the art illustrate the concept of the application.
Specific embodiment
Here will the description is performed on the exemplary embodiment in detail, the example is illustrated in the accompanying drawings.Following description is related toWhen attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodimentDescribed in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appendedThe example of the consistent device and method of some aspects be described in detail in claims, the application.
Embodiment one:
Fig. 1 is a kind of a kind of side of intelligent sound box camera-shake of inhibition with camera shown in exemplary embodimentMethod.In the intelligent sound box with camera, acceleration transducer is rigidly connected camera,
Acceleration transducer be the sensitive element inside sensor because the effect by external force causes deformation occurs, soIts deflection of apparatus measures is utilized afterwards, deflection is converted into voltage output followed by relevant circuit, and is corresponded toAcceleration signal, therefore acceleration can be measured.After acceleration transducer and camera rigid connection, it can be ensured that addVelocity sensor is identical as the vibration of both cameras, so that acceleration transducer can accurately correspond to the vibration of cameraRange value.As a kind of perferred technical scheme, directly acceleration transducer can be mounted on the circuit board of camera, withEnsure that acceleration transducer vibrates together with camera, naturally it is also possible to realize acceleration transducer and camera shooting by other meansThe rigid connection of head, it is not limited here.Meanwhile connecting acceleration transducer with processor, acceleration is read by processorThe detection signal of sensor.
Step 101: the acceleration value that acceleration transducer measures is converted to the amplitude of each frequency point.
Its acceleration value a (n) in x-axis, y-axis, z-axis is acquired by acceleration transducer first;
Acceleration value is filtered, with filter out null offset and or high-frequency noise;
By Digital Signal Processing, the amplitude of frequency point is obtained, specifically:
Acceleration value a (n) is done into FFT (Fast Fourier Transformation), i.e. fast Fourier transform is found outIts frequency spectrum A (k):
The amplitude of each acceleration harmonic component is calculated by formula (2)Circular frequency ωkAnd initial phase angle
The amplitude of each displacement harmonic component is calculated by formula (3)And initial phase angle
Vibration displacement value d is found out by formula (4):
The method of the amplitude of above-mentioned acquisition frequency point is a preferred embodiment of the present application, naturally it is also possible to pass through otherMethod realizes the amplitude that the acceleration value that acceleration transducer measures is converted to frequency point, it is not limited here.
The frequency range of human auditory is 20Hz~20kHz, is obtained by a series of experiment, influences taking the photograph for intelligent sound boxAs head shoot audio range be generally 20Hz~1kHz, therefore, by acceleration transducer acquisition frequency point amplitude when,Only choose the amplitude for obtaining the frequency point of 20Hz~1kHz frequency band.
Step 102: amplitude being compared with preset amplitude threshold, when the amplitude of some frequency point is more than that the frequency point is pre-If amplitude threshold when, carry out gain adjustment, to reduce the amplitude of the frequency point.
As a kind of perferred technical scheme, as shown in Fig. 2, the setting method of amplitude threshold are as follows:
Step 102a: when intelligent sound box does not play sound, according to 6.1 resolving power defineds in 1128 standard of GA/TMethod test camera central area horizontal definition RH and/or vertical resolution RV;It is not played in intelligent sound boxWhen sound, the maximum line number that can be differentiated on picture centre wedge in equipment or graphics workstation is shown with visual method reading terminals.Fig. 3It show the schematic diagram of electronic still picture resolution test card.
Step 102b: after intelligent sound box is transferred to max volume, some inputted in 20Hz~1kHz frequency band is fixedThe sinusoidal sound signal (for example, sinusoidal sound signal that input fixed frequency is 20Hz herein) of frequency, just by inputThe amplitude of twang sound signal is ascending to be incremented by, and by horizontal definition RH or vertical resolution RV, any one attenuation amplitude reachesAmplitude A when to m%LfAs the amplitude threshold for shooting image degradation under the fixed frequency;
Attenuation amplitude m% needs are set according to the requirement to product quality, such as setting 2%, 5%, 10% etc., are producedProduct quality requirements are higher, then attenuation amplitude setting just should be smaller, when product quality requirement is relatively low, the attenuation amplitudeSetting can be with more relatively large.Here, being illustrated for 2%, it may be assumed that after intelligent sound box is transferred to max volume, input 20HzFixed frequency in~1kHz frequency band is the sinusoidal sound signal of 20Hz, by the amplitude of the sinusoidal sound signal of input by it is small toBig to be incremented by, when any one attenuation amplitude in horizontal definition RH or vertical resolution RV is reached 2% amplitude ALfAsThe amplitude threshold of image degradation is shot under fixed frequency 20Hz.
Appearance level is not divided yet after reaching maximum value as defined in product specification such as the amplitude of the sinusoidal sound signal when inputWhen distinguishing that any one attenuation amplitude reaches required value in power RH or vertical resolution RV, illustrate the Oscillation Amplitude of the frequency point to imageQuality is without influence.A can be setLfFor maximum, i.e. measured value never surmounts.
Step 102c: the sinusoidal sound signal of other fixed frequencies is inputted, corresponding amplitude threshold is obtained;
Method by shooting the amplitude threshold of image degradation under the determination fixed frequency 20Hz that records above, determines 20HzThe amplitude threshold of some other fixed frequency in~1kHz frequency band, i.e. some other fixation in input 20Hz~1kHz frequency bandThe sinusoidal sound signal of frequency, such as input fixed frequency are the sinusoidal sound of 40Hz, 60Hz, 80Hz, 100Hz, 120Hz etc.Signal, it is respectively that the amplitude of the sinusoidal sound signal of input is ascending incremental, by horizontal definition RH or vertical resolution RVThe attenuation amplitude of any one reaches amplitude A when 2%LfAs the initial amplitude for shooting image degradation under the fixed frequencyValue.
Step 102d: having obtained a series of frequency f amplitude threshold corresponding with frequency f by the above method, thusObtain amplitude threshold curve ALf-f。
When inputting the sinusoidal sound signal of other fixed frequencies, the sinusoidal letter of other fixed frequencies can be inputted by frequency sweepNumber, frequency sweep is divided into two ways, and one is linear frequency sweeps, and one is frequency multiplication frequency sweep, the frequency sweep of both modes can be appliedInto the embodiment of this application.
In view of different product raw material or assembly can have differences, in order to enable amplitude threshold curve is suitable for differenceProduct get the multiple groups amplitude threshold curve A of different product as another preferred technical solutionLf- f passes through statisticsMethod fits ALfThe average value curve of-f, as amplitude threshold curve ALf-f。
As a kind of perferred technical scheme, the carry out gain adjustment specifically: carried out by generating new EQ curveGain adjustment,
In formula, EQRawFor former EQ curve values, ALfFor the corresponding amplitude threshold of frequency f, AfFor the corresponding amplitude of frequency f, f(Af) it is correction function.
As a kind of perferred technical scheme, the correction function are as follows: f (Af)=K (AHf-ALf)(Af-ALf)+b
In formula, AHfFor the corresponding limit amplitude threshold value of frequency f, K, b are corrected parameter.
As a kind of perferred technical scheme, as shown in figure 4, the setting method of the limit amplitude threshold value are as follows:
Step 102a ': when intelligent sound box does not play sound, the horizontal definition RH of camera central area is testedAnd/or vertical resolution RV;
Step 102a ' is identical as step 102a, and this will not be repeated here.
Step 102b ': after intelligent sound box is transferred to max volume, inputting the sinusoidal sound signal of some fixed frequency,The amplitude of the sinusoidal sound signal of the input is ascending incremental, by the horizontal definition RH or the vertical resolutionAny one attenuation amplitude of RV reaches amplitude A when n%HfAs the limit amplitude threshold value under the fixed frequency;
Attenuation amplitude n% needs are set according to the requirement to product quality, such as setting 2%, 5%, 10% etc., againN=2m or n=3m etc. is either set, product quality requirement is higher, then attenuation amplitude setting just should be smaller, product productWhen matter requires relatively low, attenuation amplitude setting can be with more relatively large.For example, by taking n%=2m%=4% as an example, it may be assumed thatAfter intelligent sound box is transferred to max volume, the sinusoidal sound that the fixed frequency inputted in 20Hz~1kHz frequency band is 20Hz is believedNumber, the amplitude of the sinusoidal sound signal of input is ascending incremental, it will be any in horizontal definition RH or vertical resolution RVOne attenuation amplitude reaches amplitude A when 4%HfAs fixed frequency 20Hz limit inferior amplitude threshold, pole mentioned hereLimit amplitude threshold refers to the unacceptable amplitude of picture quality that camera takes.
Appearance level is not divided yet after reaching maximum value as defined in product specification such as the amplitude of the sinusoidal sound signal when inputWhen distinguishing that any one attenuation amplitude reaches required value in power RH or vertical resolution RV, illustrate the Oscillation Amplitude of the frequency point to imageQuality is without influence.It may be set to AHfMaximum, i.e. measured value never surmount.
Step 102c ': inputting the sinusoidal sound signal of other fixed frequencies, obtains corresponding limit amplitude threshold value.
By shooting the unacceptable limit amplitude threshold value of picture quality under the determination fixed frequency 20Hz that records aboveMethod determines the limit amplitude threshold value of some other fixed frequency in 20Hz~1kHz frequency band, i.e. input 20Hz~1kHz frequencyThe sinusoidal sound signal of some other fixed frequency in rate section, for example, input fixed frequency be 40Hz, 60Hz, 80Hz, 100Hz,The sinusoidal sound signal of 120Hz etc., it is respectively that the amplitude of the sinusoidal sound signal of input is ascending incremental, by horizontal resolutionAny one attenuation amplitude of power RH or vertical resolution RV reaches amplitude A when 4%HfIt shakes as the fixed frequency limit inferiorWidth threshold value.
Step 102d ': having obtained a series of frequency f limit amplitude threshold value corresponding with frequency f by the above method,To obtain limit amplitude threshold curve AHf-f。
In view of different product raw material or assembly can have differences, in order to enable amplitude threshold curve is suitable for differenceProduct get the multiple groups limit amplitude threshold curve A of different product as another preferred technical solutionHf- f passes throughStatistical method fits AHfThe average value curve of-f, as limit amplitude threshold curve AHf-f。
Embodiment two:
Fig. 5 is a kind of device for inhibiting intelligent sound box camera-shake shown according to an exemplary embodiment, described deviceInclude:
Acquiring unit 501: the acceleration value for measuring the acceleration transducer is converted to the amplitude of each frequency point;
Comparing unit 502: for the amplitude to compare with preset amplitude threshold;
Gain adjusting unit 503: when the amplitude of some frequency point amplitude threshold preset more than the frequency point, for carrying outGain adjustment reduces the amplitude of the frequency point.
It should be noted that method provided by device provided by above-described embodiment and above-described embodiment belongs to same structureThink, the concrete mode that wherein modules execute operation is described in detail in embodiment of the method, no longer superfluous hereinIt states.
In one exemplary embodiment, a kind of electronic equipment, comprising:
Processor;And
Memory, wherein computer-readable instruction is stored on memory, which is executed by processorThe method of the inhibition intelligent sound box camera-shake of Shi Shixian above-described embodiment one.
In one exemplary embodiment, a kind of computer readable storage medium, is stored thereon with computer program, the calculatingMachine program realizes the inhibition intelligent sound box camera-shake of above-described embodiment one method when being executed by processor.
Above content, only the preferable examples embodiment of the application, the embodiment for being not intended to limit the application, thisField those of ordinary skill can very easily carry out corresponding flexible or repair according to the central scope and spirit of the applicationChange, therefore the protection scope of the application should be subject to protection scope required by claims.