Please refer to
In addition, a beam sensor 16 receives a beam signal B(t). A beam transmitter 14 constantly emits electromagnetic beams, and the beam signal B(t) represents the beams that are reflected back to the beam sensor 16 when the beams are obstructed by an object. For example, the beam transmitter 14 and the beam sensor 16 can utilize infrared beams, ultrasonic beams, laser beams, microwave beams, or other similar types of electromagnetic beams. The beam sensor is used to roughly estimate the distance between a user and the object in use. After receiving the reflected signal B(t), the beam sensor 16 needs to analyze the signal strength. Consequently, a rough distance between the user and the object in use is estimated.
The present invention makes use of both face detection and beam sensing to adaptively adjust the gain of the object in use. The face detecting unit 12 is set as the default mechanism to evaluate the gain. When certain conditions are met, the beam sensor 16 is instead the mechanism used to determine the gain.
The face detecting unit 12 outputs the number of faces detected and the size of the detected faces to a quantizer 18. In addition, the quantizer 18 also receives the beam signal strength output from the beam sensor 16. The quantizer 18 quantizes the face data and/or the beam data and outputs the quantized data to a controller 20. The quantizer 18 can be either a uniform quantizer or a non-uniform quantizer.
The controller 20 utilizes the data from the face detecting unit 12 and/or the beam sensor 16 to determine how the gain should be adjusted, as will be explained below. The controller 20 uses this data to estimate the overall distance between the users and the object in use, and outputs a decision signal to a gain regulator 22. The gain regulator 22 then adjusts the gain of the object in use according to the decision signal.
A flowchart summarizing a method of adjusting the gain according to the present invention is illustrated in
In step 50, the controller 20 receives data from the face detecting unit 12 and the beam sensor 16. In step 52, the controller 20 analyzes the face data provided by the face detecting unit 12 to determine if any faces have been captured. If so, the controller 20 determines if number of faces captured by the face detector is greater than a predetermined value. If yes, the controller uses the face data from the face detector and ignores the data from bean sensor. In this embodiment, the predetermined value is set to be one. That is, when more than one face has been captured, the data from the beam sensor 16 is ignored and the face data is instead used to determine the decision signal according to a calculated result which will be described below.
In step 56 the controller 20 compares the current size of the faces with the initial face size calculated when the system is powered on. The face size data is used to generate a first ratio R1 in step 57, where RI is a ratio of the number of face sizes that are different from the initial face sizes to the total number of faces. R1 represents that some of the users detected by the face detector have moved away or closer from the speaker/microphone since the time the system was powered on. If R1 is less than a threshold value, the gain does not have to be adjusted. That means minor part of the users has been moved so the system will not be adjusted. On the other hand, if the number of face sizes that have changed is greater than a first threshold value, two ratios are calculated in step 58. R2 represents the ratio of the number of faces that are smaller than the initial face size to the total number of detected faces. A higher value of R2 represents that more users have moved farther away from the speaker/microphone since it was powered on. Another ratio R3 represents the ratio of the number of faces that are larger than the initial face size to the total number of detected faces. A higher value of R3 represents that more users have moved closer to the speaker/microphone since it was powered on. R2 and R3 are initially equal to zero when the system is powered on since the initial face size is computed at this time and users have not had a chance to move closer to or farther from the object in use.
In step 60, both R2 and R3 are compared to respective second and third threshold values. If either R2 is greater than the second threshold or if R3 is greater than the third threshold value, the gain is adjusted in step 62. If R2 is greater than the second threshold, the gain should be increased since most of the users have moved farther from the object in use. On the other hand, if R3 is greater than the third threshold, the gain should be decreased since most of the users have moved closer to the object in use. If neither R2 nor R3 are greater than their respective threshold values, the gain is maintained at its initial value in step 66.
Back to the decision signal output from the controller 20, in the embodiment above, the decision signal is determined according to either R2 or R3 and the compared results with the threshold values. That is, if R2 is greater than the second threshold, the decision signal will be indicative of increasing the gain; if R3 is greater than the third threshold, the decision signal will be indicative of decreasing the gain.
If during steps 52 and 54 it is determined that no faces were captured or that only one face was captured, step 64 is instead executed for comparing the strength of the beam signal to a beam threshold value to estimate an overall distance of the users from the speaker/microphone. If the strength of the beam signal has changed from the initial beam signal strength by more than the beam threshold value, then the gain is adjusted accordingly in step 62. If the beam signal has become weaker than the initial bean signal, the gain is increased since this indicates that the user has moved farther away. On the other hand, if the beam signal has become stronger, the gain should be decreased since the user has moved closer to the object in use. If the beam signal strength is still close to the initial beam signal strength, then the gain is maintained at its initial value in step 66.
Decision signal in the embodiment above is determined according to the beam signals and the compared results with the threshold values. That is, if the beam signal is weaker than the initial bean signal, the decision signal is indicative of increasing the gain; if the beam is stronger, the decision signal is indicative of decreasing the gain.
The threshold values mentioned above can be set by various ways. Users can set the thresholds to adjust their speaker volume or microphone gains based on personal preferences. Also, these thresholds can be set by computer based on average human hearing.
In summary, the present invention gain adjusting system 10 and related adjusting method free the users from having to manually adjust the gain of the object in use. Instead, the controller 20 automatically adjusts the gain according to the distance that the users are from the object in use. Both face detection and beam signal strength measurements can be used to ensure that the distance between the users and the object in use is estimated accurately in different kinds of situations.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.