Volume compensation optimization method, device, electronic device and readable storage medium
By detecting the distance and sound pressure level between the smart camera and the target to be detected, calculating and applying the volume compensation value, the problem of poor listening effect of the smart camera sound system at different distances is solved, and a more uniform and clear volume of the sound system is achieved. output.
Patent Information
- Application Number
- CN202111277317.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2041-10-29
AI Technical Summary
The sound system of the smart camera is not effective in listening at different distances, resulting in too loud sound when the user is close to the camera and too low when it is far away.
By detecting the actual distance between the smart camera and the target to be detected, and obtaining the current sound pressure level of the sound system, calculating the volume compensation value, and then performing volume compensation on the sound system to match the sound pressure level and distance.
It improves the listening effect of the smart camera's sound system at different distances, ensuring that the sound is clear and consistent, and overcoming the problem of too loud or too small sounds caused by distance changes.
Smart Images

Figure CN114063964B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of sound processing technology, and in particular to a volume compensation optimization method, device, electronic device and readable storage medium. Background Art
[0002] With the rapid development of science and technology, more and more smart products are applied to home environments. At present, smart cameras are usually installed with a sound system, which includes a microphone and a speaker, which can realize calls within the family. However, when the user is close to the camera, the sound heard is usually louder, and when the user is far away from the smart camera, the sound heard is usually smaller, that is, the sound system of the smart camera has a poor listening effect. Summary of the invention
[0003] The main purpose of the present application is to provide a volume compensation optimization method, device, electronic device and readable storage medium, aiming to solve the technical problem of poor listening effect of the sound system of smart cameras in the prior art.
[0004] To achieve the above purpose, the present application provides a volume compensation optimization method, which is applied to a smart camera. The volume compensation optimization method includes:
[0005] Detecting the actual distance between the smart camera and the target to be detected, and obtaining the current sound pressure level of the sound system in the smart camera;
[0006] Determining a volume compensation value according to the current sound pressure level and the actual distance;
[0007] According to the volume compensation value, volume compensation is performed on the sound system in the smart camera.
[0008] Optionally, the step of determining a volume compensation value according to the current sound pressure level and the actual distance includes:
[0009] Obtaining a preset suitable distance corresponding to the current sound pressure level;
[0010] Determining whether the preset appropriate distance matches the actual distance;
[0011] If the preset suitable distance does not match the actual distance, determining a volume compensation value according to the current sound pressure level and the actual distance;
[0012] If the preset suitable distance matches the actual distance, no volume compensation is performed on the sound system in the smart camera.
[0013] Optionally, the step of determining a volume compensation value according to the current sound pressure level and the actual distance includes:
[0014] Determining a suitable sound pressure level at the actual distance according to a mapping relationship between the sound pressure level and the distance;
[0015] Calculating a difference between the current sound pressure level and the appropriate sound pressure level to obtain a sound pressure level difference;
[0016] The volume compensation value is calculated according to the sound pressure level difference.
[0017] Optionally, the step of calculating the volume compensation value according to the sound pressure level difference includes:
[0018] Determining whether the sound pressure level difference is less than a preset sound pressure level threshold;
[0019] If the sound pressure level difference is not less than the preset sound pressure level threshold, calculating the ratio between the sound pressure level difference and the preset sound pressure level threshold to obtain the volume compensation value;
[0020] If the sound pressure level difference is less than the preset sound pressure level threshold, no volume compensation is performed on the sound system in the smart camera.
[0021] Optionally, the step of determining the appropriate sound pressure level at the actual distance according to the mapping relationship between the sound pressure level and the distance includes:
[0022] According to the mapping relationship between the sound pressure level and the distance, query the preset sound pressure level corresponding to the actual distance;
[0023] Detecting the current human posture of the target to be detected by the smart camera, and determining sound pressure level compensation according to the current human posture;
[0024] The appropriate sound pressure level is determined according to the sound pressure level compensation and the preset sound pressure level.
[0025] Optionally, the step of detecting the actual distance between the smart camera and the target to be detected includes:
[0026] Measuring the distance between the smart camera and the target to be detected by using an infrared device on the smart camera to obtain a measured distance;
[0027] Detecting the current human posture of the target to be detected by the smart camera, and determining a distance compensation value according to the current human posture;
[0028] The actual distance is calculated according to the distance compensation value and the measured distance.
[0029] Optionally, the step of detecting the current human posture of the target to be detected by the smart camera includes:
[0030] Acquire an image of the target to be detected taken by the smart camera;
[0031] Classifying the captured image according to a preset image classification model to obtain an image classification label;
[0032] The current human body posture is determined according to the image classification label.
[0033] The present application also provides a volume compensation optimization device, which is applied to a smart camera and includes:
[0034] A detection and acquisition module, used to detect the actual distance between the smart camera and the target to be detected, and to acquire the current sound pressure level of the sound system in the smart camera;
[0035] A compensation determination module, used to determine a volume compensation value according to the current sound pressure level and the actual distance;
[0036] The volume compensation module is used to perform volume compensation on the sound system in the smart camera according to the volume compensation value.
[0037] Optionally, the compensation determination module is further used to:
[0038] Obtaining a preset suitable distance corresponding to the current sound pressure level;
[0039] Determining whether the preset appropriate distance matches the actual distance;
[0040] If the preset suitable distance does not match the actual distance, determining a volume compensation value according to the current sound pressure level and the actual distance;
[0041] If the preset suitable distance matches the actual distance, no volume compensation is performed on the sound system in the smart camera.
[0042] Optionally, the compensation determination module is further used to:
[0043] Determining a suitable sound pressure level at the actual distance according to a mapping relationship between the sound pressure level and the distance;
[0044] Calculating a difference between the current sound pressure level and the appropriate sound pressure level to obtain a sound pressure level difference;
[0045] The volume compensation value is calculated according to the sound pressure level difference.
[0046] Optionally, the compensation determination module is further used to:
[0047] Determining whether the sound pressure level difference is less than a preset sound pressure level threshold;
[0048] If the sound pressure level difference is not less than the preset sound pressure level threshold, calculating the ratio between the sound pressure level difference and the preset sound pressure level threshold to obtain the volume compensation value;
[0049] If the sound pressure level difference is less than the preset sound pressure level threshold, no volume compensation is performed on the sound system in the smart camera.
[0050] Optionally, the compensation determination module is further used to:
[0051] According to the mapping relationship between the sound pressure level and the distance, query the preset sound pressure level corresponding to the actual distance;
[0052] Detecting the current human posture of the target to be detected by the smart camera, and determining sound pressure level compensation according to the current human posture;
[0053] The appropriate sound pressure level is determined according to the sound pressure level compensation and the preset sound pressure level.
[0054] Optionally, the detection and acquisition module is further used for:
[0055] Measuring the distance between the smart camera and the target to be detected by using an infrared device on the smart camera to obtain a measured distance;
[0056] Detecting the current human posture of the target to be detected by the smart camera, and determining a distance compensation value according to the current human posture;
[0057] The actual distance is calculated according to the distance compensation value and the measured distance.
[0058] Optionally, the detection and acquisition module is further used for:
[0059] Acquire an image of the target to be detected taken by the smart camera;
[0060] Classifying the captured image according to a preset image classification model to obtain an image classification label;
[0061] The current human body posture is determined according to the image classification label.
[0062] The present application also provides an electronic device, comprising: a memory, a processor, and a program of the volume compensation optimization method stored in the memory and executable on the processor, wherein the program of the volume compensation optimization method can implement the steps of the volume compensation optimization method as described above when executed by the processor.
[0063] The present application also provides a readable storage medium, which is a computer-readable storage medium. A program for implementing a volume compensation optimization method is stored on the computer-readable storage medium. When the program of the volume compensation optimization method is executed by a processor, the steps of the volume compensation optimization method as described above are implemented.
[0064] The present application also provides a computer program product, including a computer program, which implements the steps of the volume compensation optimization method as described above when executed by a processor.
[0065] The present application provides a volume compensation optimization method, device, electronic device and readable storage medium, that is, detecting the actual distance between the smart camera and the target to be detected, and obtaining the current sound pressure level of the sound system in the smart camera, and then determining the volume compensation value according to the current sound pressure level and the actual distance, so as to achieve the determination of the volume compensation value required for the current volume according to the current volume and the actual distance, and then performing volume compensation on the sound system in the smart camera according to the volume compensation value, so as to achieve the purpose of performing volume compensation on the current sound pressure level emitted by the sound system in the smart camera according to the actual distance between the target to be detected and the smart camera, so that the sound emitted by the sound system in the smart camera matches the actual distance, and thus can provide a better listening effect for the target to be detected, and overcome the technical defect that when the user is close to the camera, the sound heard is usually louder, and when the user is far away from the smart camera, the sound heard is usually smaller, so as to improve the listening effect of the sound system of the smart camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0068] Figure 1 This is a flow chart of the first embodiment of the volume compensation optimization method of the present application;
[0069] Figure 2 This is a flow chart of a second embodiment of the volume compensation optimization method of the present application;
[0070] Figure 3 Schematic diagram of the device structure of the hardware operating environment involved in the volume compensation optimization method in the embodiment of the present application.
[0071] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0072] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0073] Embodiment 1
[0074] The present application embodiment provides a volume compensation optimization method. In the first embodiment of the volume compensation optimization method of the present application, refer to Figure 1 , the volume compensation optimization method comprises:
[0075] Step S10, detecting the actual distance between the smart camera and the target to be detected, and acquiring the current sound pressure level of the sound system in the smart camera;
[0076] In this embodiment, it should be noted that the volume compensation optimization method is applied to a smart camera, and the smart camera is deployed with a sound system, which includes a speaker and a microphone, for realizing calls between smart cameras in different monitoring areas. For example, in a family residence, calls can be realized between rooms on the first floor and rooms on the second floor monitored by a smart camera.
[0077] The current sound pressure level is the sound pressure level of the sound emitted by the current sound system, wherein the sound pressure level is a parameter describing the volume, and the unit is decibel. The target to be detected is the target person served by the sound system in the smart camera.
[0078] Detect the actual distance between the smart camera and the target to be detected, and obtain the current sound pressure level of the sound system in the smart camera. Specifically, detect the actual distance between the smart camera and the target to be detected by an infrared device on the smart camera, and obtain the current sound pressure level of the sound system in the smart camera.
[0079] Wherein, the step of detecting the actual distance between the smart camera and the target to be detected further includes:
[0080] The target to be detected is photographed by the smart camera to obtain a photographed image, and the actual distance between the smart camera and the target to be detected is detected by the photographed image and the focal length of the smart camera.
[0081] Step S20, determining a volume compensation value according to the current sound pressure level and the actual distance;
[0082] In this embodiment, the volume compensation value is determined according to the current sound pressure level and the actual distance. Specifically, according to the mapping relationship between the sound pressure level and the distance, the target sound pressure level corresponding to the actual distance is queried, and then the volume compensation value is determined according to the difference between the current sound pressure level and the target sound pressure level.
[0083] Wherein, the step of determining the volume compensation value according to the current sound pressure level and the actual distance comprises:
[0084] Step S21, obtaining a preset suitable distance corresponding to the current sound pressure level;
[0085] In this embodiment, the preset appropriate distance corresponding to the current sound pressure level is obtained. Specifically, according to the mapping relationship between the sound pressure level and the distance, the preset appropriate distance corresponding to the current sound pressure level is queried. It should be noted that the embodiment of the present application determines the mapping relationship between the sound pressure level and the distance corresponding to the sound system in the smart camera by performing a sound test on the smart camera in advance.
[0086] Step S22, determining whether the preset appropriate distance matches the actual distance;
[0087] In this embodiment, it is determined whether the preset appropriate distance matches the actual distance. Specifically, it is determined whether the difference between the preset appropriate distance and the actual matrix is within a preset error range. If the difference between the preset appropriate distance and the actual matrix is within the preset error range, it is determined that the preset appropriate distance matches the actual distance; if the difference between the preset appropriate distance and the actual matrix is not within the preset error range, it is determined that the preset appropriate distance does not match the actual distance.
[0088] Step S23, if the preset appropriate distance does not match the actual distance, determining a volume compensation value according to the current sound pressure level and the actual distance;
[0089] Step S24: If the preset appropriate distance matches the actual distance, no volume compensation is performed on the sound system in the smart camera.
[0090] In this embodiment, specifically, if the preset appropriate distance does not match the actual distance, according to the mapping relationship between the sound pressure level and the distance, the appropriate sound pressure level corresponding to the actual distance is queried, and then the volume compensation value is determined according to the difference between the current sound pressure level and the appropriate sound pressure level; if the preset appropriate distance matches the actual distance, the sound system in the smart camera is not compensated for the volume.
[0091] Wherein, the step of determining the volume compensation value according to the current sound pressure level and the actual distance comprises:
[0092] Step A10, determining the appropriate sound pressure level at the actual distance according to the mapping relationship between the sound pressure level and the distance;
[0093] In this embodiment, specifically, according to the mapping relationship between the sound pressure level and the distance, the preset sound pressure level corresponding to the actual distance is queried, and the preset sound pressure level is used as the appropriate sound pressure level.
[0094] Wherein, the step of determining the appropriate sound pressure level at the actual distance according to the mapping relationship between the sound pressure level and the distance comprises:
[0095] Step A11, querying a preset sound pressure level corresponding to the actual distance according to the mapping relationship between the sound pressure level and the distance;
[0096] Step A12, detecting the current human posture of the target to be detected by the smart camera, and determining the sound pressure level compensation according to the current human posture;
[0097] Step A13: determining the appropriate sound pressure level according to the sound pressure level compensation and the preset sound pressure level.
[0098] In this embodiment, it should be noted that since the sound is heard by the ear of the person, and the actual distance measured by infrared is the distance from the point on the target to be detected that is closest to the camera to the smart camera, when the target to be detected is in different human postures, it will affect the determination of the appropriate sound pressure level. The preset sound pressure level is the appropriate sound pressure level corresponding to the actual distance under the standard human posture, wherein the standard human posture can be set to a standing posture, and other human postures are non-standard human postures, such as a lying posture with the head facing the smart camera, a lying posture with the head away from the smart camera, and a squatting posture.
[0099] Specifically, according to the mapping relationship between the sound pressure level and the distance, the preset sound pressure level corresponding to the actual distance under the standard human posture is queried; the current human posture of the target to be detected is detected by the smart camera, and according to the mapping relationship between the current human posture and the volume compensation value, the sound pressure level compensation corresponding to the current human posture is queried; according to the sound pressure level compensation and the preset sound pressure level, the appropriate sound pressure level is determined. Therefore, the purpose of determining the appropriate sound pressure level of the target to be detected at the actual distance according to the current human posture of the target to be detected is achieved, the accuracy of determining the appropriate sound pressure level of the target to be detected at the actual distance is improved, and then the accuracy of volume compensation is improved.
[0100] The sound pressure level compensation may be a specific sound pressure level compensation value or a specific sound pressure level compensation coefficient, and the step of determining the appropriate sound pressure level based on the sound pressure level compensation and the preset sound pressure level includes:
[0101] When the sound pressure level compensation is a sound pressure level compensation value, the sound pressure level compensation and the preset sound pressure level are summed to obtain a suitable sound pressure level.
[0102] When the sound pressure level compensation is a sound pressure level compensation coefficient, the sound pressure level compensation and the preset sound pressure level are multiplied to obtain a suitable sound pressure level.
[0103] Step A20, calculating the difference between the current sound pressure level and the appropriate sound pressure level to obtain a sound pressure level difference;
[0104] Step A30: Calculate the volume compensation value according to the sound pressure level difference.
[0105] In this embodiment, specifically, the difference between the current sound pressure level and the appropriate sound pressure level is calculated to obtain the sound pressure level difference, and the ratio between the sound pressure level difference and a preset sound pressure level threshold is calculated to obtain a volume compensation value, wherein the preset sound pressure level threshold is a preset sound pressure level change value corresponding to a one-grid volume change.
[0106] Wherein, the step of calculating the volume compensation value according to the sound pressure level difference comprises:
[0107] Step A31, determining whether the sound pressure level difference is less than a preset sound pressure level threshold;
[0108] Step A32, if the sound pressure level difference is not less than the preset sound pressure level threshold, calculating the ratio between the sound pressure level difference and the preset sound pressure level threshold to obtain the volume compensation value;
[0109] Step A33: If the sound pressure level difference is less than the preset sound pressure level threshold, then the volume compensation is not performed on the sound system in the smart camera.
[0110] In this embodiment, specifically, it is determined whether the sound pressure level difference is less than a preset sound pressure level threshold value; if the sound pressure level difference is not less than the preset sound pressure level threshold value, it is proved that the sound pressure level difference is not less than the sound pressure level change value required for a one-grid change in volume, and then the ratio between the sound pressure level difference and the preset sound pressure level threshold value is calculated to obtain the volume compensation value; if the sound pressure level difference is less than the preset sound pressure level threshold value, it is proved that the sound pressure level difference is less than the sound pressure level change value required for a one-grid change in volume, and then there is no need to perform volume compensation on the sound system in the smart camera.
[0111] Step S30: performing volume compensation on the sound system in the smart camera according to the volume compensation value.
[0112] In this embodiment, specifically, the volume compensation value is compensated to the microphone and speaker of the sound system in the smart camera.
[0113] The embodiments of the present application provide a volume compensation optimization method, device, electronic device and readable storage medium, that is, detecting the actual distance between the smart camera and the target to be detected, and obtaining the current sound pressure level of the sound system in the smart camera, and then determining the volume compensation value according to the current sound pressure level and the actual distance, so as to achieve the determination of the volume compensation value required for the current volume according to the current volume and the actual distance, and then performing volume compensation on the sound system in the smart camera according to the volume compensation value, so as to achieve the purpose of performing volume compensation on the current sound pressure level emitted by the sound system in the smart camera according to the actual distance between the target to be detected and the smart camera, so that the sound emitted by the sound system in the smart camera matches the actual distance, so as to provide a better listening effect for the target to be detected, and overcome the technical defect that when the user is close to the camera, the sound heard is usually louder, and when the user is far away from the smart camera, the sound heard is usually smaller, so as to improve the listening effect of the sound system of the smart camera.
[0114] Embodiment 2
[0115] Further, refer to Figure 2 Based on the first embodiment of the present application, in another embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. On this basis, the step of detecting the actual distance between the smart camera and the target to be detected includes:
[0116] Step S11, measuring the distance between the smart camera and the target to be detected by an infrared device on the smart camera to obtain a measured distance;
[0117] In this embodiment, the infrared device on the smart camera transmits infrared rays to the target to be detected, and receives the infrared rays reflected by the target to be detected, thereby determining the time interval from the infrared device transmitting the infrared rays to receiving the infrared rays reflected by the target to be detected. Based on the time interval, the distance between the smart camera and the target to be detected is calculated to obtain the measured distance.
[0118] Step S12, detecting the current human posture of the target to be detected by the smart camera, and determining a distance compensation value according to the current human posture;
[0119] In this embodiment, it should be noted that since the sound is listened to by the ears of a person, and the actual distance measured by infrared is the distance from the point on the target to be detected that is closest to the camera to the smart camera, there will be a certain error when volume compensation is performed directly based on the distance measured by the infrared device.
[0120] The current human posture of the target to be detected is detected by the smart camera, and the distance compensation value is determined according to the current human posture. Specifically, the current human posture of the target to be detected is detected by the smart camera. If the current human posture is consistent with the standard human posture, the measured distance is directly used as the actual distance. If the current human posture is inconsistent with the standard human posture, the distance compensation value corresponding to the current human posture is queried according to the mapping relationship between human posture and distance compensation, wherein the standard human posture is a human posture in which the human head is not far away from the camera, for example, a standing posture or a lying posture with the head facing the camera, etc., and the non-standard human posture is a human posture in which the human head is far away from the camera, for example, a lying posture with the head far away from the camera, etc.
[0121] Wherein, the step of detecting the current human posture of the target to be detected by the smart camera includes:
[0122] Step S121, obtaining an image of the target to be detected taken by the smart camera;
[0123] In this embodiment, the target to be detected is photographed by the smart camera to obtain a photographed image.
[0124] Step S122, classifying the captured image according to a preset image classification model to obtain an image classification label;
[0125] In this embodiment, it should be noted that the preset image classification model is a machine learning model for classifying human posture images, and the preset image classification model may be a convolutional neural network model. The preset image classification model may be a multi-classification model.
[0126] Step S123, determining the current human body posture according to the image classification label.
[0127] In this embodiment, according to a preset image classification model, feature extraction is performed on the pixel matrix corresponding to the captured image to obtain captured image features, and then the captured image features are fully connected to obtain an image classification label; the human body posture corresponding to the image classification label is used as the current human body posture.
[0128] Step A13, calculating the actual distance according to the distance compensation value and the measured distance.
[0129] In this embodiment, it should be noted that the distance compensation value may be a specific distance value or a compensation coefficient.
[0130] The actual distance is calculated according to the distance compensation value and the measured distance. Specifically, the distance compensation value and the measured distance are summed to obtain the actual distance; or the distance compensation value and the measurement matrix are multiplied to obtain the actual distance.
[0131] The embodiment of the present application provides a method for measuring the actual distance between a target to be detected and a smart camera based on human body posture, wherein the distance between the smart camera and the target to be detected is measured by an infrared device on the smart camera to obtain a measured distance; the current human body posture of the target to be detected is detected by the smart camera, and a distance compensation value is determined based on the current human body posture; the actual distance is calculated based on the distance compensation value and the measured distance. Considering that the sound is heard by human ears, the distance measured by the infrared device is compensated by detecting the human body posture of the target to be detected, so the accuracy of measuring the distance between the target to be detected and the smart camera is improved, and the distance measurement error for volume compensation caused by human body posture is eliminated, so the accuracy of volume compensation is improved.
[0132] Embodiment 3
[0133] The embodiment of the present application further provides a volume compensation optimization device, which is applied to a smart camera and includes:
[0134] A detection and acquisition module, used to detect the actual distance between the smart camera and the target to be detected, and to acquire the current sound pressure level of the sound system in the smart camera;
[0135] A compensation determination module, used to determine a volume compensation value according to the current sound pressure level and the actual distance;
[0136] The volume compensation module is used to perform volume compensation on the sound system in the smart camera according to the volume compensation value.
[0137] Optionally, the compensation determination module is further used to:
[0138] Obtaining a preset suitable distance corresponding to the current sound pressure level;
[0139] Determining whether the preset appropriate distance matches the actual distance;
[0140] If the preset suitable distance does not match the actual distance, determining a volume compensation value according to the current sound pressure level and the actual distance;
[0141] If the preset suitable distance matches the actual distance, no volume compensation is performed on the sound system in the smart camera.
[0142] Optionally, the compensation determination module is further used to:
[0143] Determining a suitable sound pressure level at the actual distance according to a mapping relationship between the sound pressure level and the distance;
[0144] Calculating a difference between the current sound pressure level and the appropriate sound pressure level to obtain a sound pressure level difference;
[0145] The volume compensation value is calculated according to the sound pressure level difference.
[0146] Optionally, the compensation determination module is further used to:
[0147] Determining whether the sound pressure level difference is less than a preset sound pressure level threshold;
[0148] If the sound pressure level difference is not less than the preset sound pressure level threshold, calculating the ratio between the sound pressure level difference and the preset sound pressure level threshold to obtain the volume compensation value;
[0149] If the sound pressure level difference is less than the preset sound pressure level threshold, no volume compensation is performed on the sound system in the smart camera.
[0150] Optionally, the compensation determination module is further used to:
[0151] According to the mapping relationship between the sound pressure level and the distance, query the preset sound pressure level corresponding to the actual distance;
[0152] Detecting the current human posture of the target to be detected by the smart camera, and determining sound pressure level compensation according to the current human posture;
[0153] The appropriate sound pressure level is determined according to the sound pressure level compensation and the preset sound pressure level.
[0154] Optionally, the detection and acquisition module is further used for:
[0155] Measuring the distance between the smart camera and the target to be detected by using an infrared device on the smart camera to obtain a measured distance;
[0156] Detecting the current human posture of the target to be detected by the smart camera, and determining a distance compensation value according to the current human posture;
[0157] The actual distance is calculated according to the distance compensation value and the measured distance.
[0158] Optionally, the detection and acquisition module is further used for:
[0159] Acquire an image of the target to be detected taken by the smart camera;
[0160] Classifying the captured image according to a preset image classification model to obtain an image classification label;
[0161] The current human body posture is determined according to the image classification label.
[0162] The volume compensation optimization device provided by the present invention adopts the volume compensation optimization method in the above-mentioned embodiment 1 or embodiment 2 to solve the technical problem that the sound system of the smart camera has poor listening effect. Compared with the prior art, the beneficial effects of the volume compensation optimization device provided by the embodiment of the present invention are the same as the beneficial effects of the volume compensation optimization method provided by the above-mentioned embodiment, and other technical features in the volume compensation optimization device are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0163] Embodiment 5
[0164] An embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the volume compensation optimization method in the above-mentioned embodiment 1.
[0165] Reference below Figure 3 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0166] like Figure 3 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0167] Typically, the following systems can be connected to the I / O interface: input devices including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices including, for example, a magnetic tape, a hard disk, etc.; and communication devices. The communication device can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0168] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0169] The electronic device provided by the present invention adopts the volume compensation optimization method in the above-mentioned embodiment 1 or embodiment 2 to solve the technical problem of poor listening effect of the sound system of the smart camera. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the present invention are the same as the beneficial effects of the volume compensation optimization method provided by the above-mentioned embodiment 1, and other technical features in the electronic device are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0170] It should be understood that the various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0171] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0172] Embodiment 6
[0173] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the volume compensation optimization method in the above-mentioned embodiment 1.
[0174] The computer-readable storage medium provided in the embodiment of the present invention may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0175] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0176] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device: detects the actual distance between the smart camera and the target to be detected, and obtains the current sound pressure level of the sound system in the smart camera; determines a volume compensation value according to the current sound pressure level and the actual distance; and performs volume compensation on the sound system in the smart camera according to the volume compensation value.
[0177] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0178] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0179] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.
[0180] The computer-readable storage medium provided by the present invention stores computer-readable program instructions for executing the above-mentioned volume compensation optimization method, which solves the technical problem of poor listening effect of the sound system of the smart camera. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present invention are the same as the beneficial effects of the volume compensation optimization method provided by the above-mentioned embodiment 1 or embodiment 2, and will not be repeated here.
[0181] Embodiment 7
[0182] The present application also provides a computer program product, including a computer program, which implements the steps of the volume compensation optimization method as described above when executed by a processor.
[0183] The computer program product provided by the present application solves the technical problem of poor listening effect of the sound system of the smart camera. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present invention are the same as the beneficial effects of the volume compensation optimization method provided by the above-mentioned embodiment 1 or embodiment 2, and will not be repeated here.
[0184] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A volume compensation optimization method, characterized in that: Applied to a smart camera, the volume compensation optimization method includes: Detecting the actual distance between the smart camera and the target to be detected, and obtaining the current sound pressure level of the sound system in the smart camera; Determining a volume compensation value according to the current sound pressure level and the actual distance; According to the volume compensation value, performing volume compensation on the sound system in the smart camera; The step of detecting the actual distance between the smart camera and the target to be detected comprises: Measuring the distance between the smart camera and the target to be detected by using an infrared device on the smart camera to obtain a measured distance; Detecting the current human posture of the target to be detected by the smart camera, and determining a distance compensation value according to the current human posture; Calculating the actual distance according to the distance compensation value and the measured distance; The step of detecting the current human posture of the target to be detected by the smart camera comprises: Acquire an image of the target to be detected taken by the smart camera; Classifying the captured image according to a preset image classification model to obtain an image classification label; Determining the current human body posture according to the image classification label; The step of determining the volume compensation value according to the current sound pressure level and the actual distance comprises: Obtaining a preset suitable distance corresponding to the current sound pressure level; Determining whether the preset appropriate distance matches the actual distance; If the preset appropriate distance does not match the actual distance, determining the appropriate sound pressure level at the actual distance according to a mapping relationship between the sound pressure level and the distance; Calculating a difference between the current sound pressure level and the appropriate sound pressure level to obtain a sound pressure level difference; Calculating the volume compensation value according to the sound pressure level difference; If the preset suitable distance matches the actual distance, no volume compensation is performed on the sound system in the smart camera; The step of determining the appropriate sound pressure level at the actual distance according to the mapping relationship between the sound pressure level and the distance comprises: According to the mapping relationship between the sound pressure level and the distance, query the preset sound pressure level corresponding to the actual distance; Detecting the current human posture of the target to be detected by the smart camera, and determining sound pressure level compensation according to the current human posture; The appropriate sound pressure level is determined according to the sound pressure level compensation and the preset sound pressure level.
2. The volume compensation optimization method according to claim 1, characterized in that: The step of calculating the volume compensation value according to the sound pressure level difference comprises: Determining whether the sound pressure level difference is less than a preset sound pressure level threshold; If the sound pressure level difference is not less than the preset sound pressure level threshold, calculating the ratio between the sound pressure level difference and the preset sound pressure level threshold to obtain the volume compensation value; If the sound pressure level difference is less than the preset sound pressure level threshold, no volume compensation is performed on the sound system in the smart camera.
3. A volume compensation optimization device, characterized in that: Applied to a smart camera, the volume compensation optimization device comprises: A detection and acquisition module, used to detect the actual distance between the smart camera and the target to be detected, and to acquire the current sound pressure level of the sound system in the smart camera; A compensation determination module, used to determine a volume compensation value according to the current sound pressure level and the actual distance; A volume compensation module, used to perform volume compensation on the sound system in the smart camera according to the volume compensation value; The detection and acquisition module is also used for: Measuring the distance between the smart camera and the target to be detected by using an infrared device on the smart camera to obtain a measured distance; Detecting the current human posture of the target to be detected by the smart camera, and determining a distance compensation value according to the current human posture; Calculating the actual distance according to the distance compensation value and the measured distance; The detection and acquisition module is also used for: Acquire an image of the target to be detected taken by the smart camera; Classifying the captured image according to a preset image classification model to obtain an image classification label; Determining the current human body posture according to the image classification label; The compensation determination module is also used for: Obtaining a preset suitable distance corresponding to the current sound pressure level; and determining whether the preset suitable distance matches the actual distance; If the preset appropriate distance does not match the actual distance, determining the appropriate sound pressure level at the actual distance according to the mapping relationship between the sound pressure level and the distance; calculating the difference between the current sound pressure level and the appropriate sound pressure level to obtain the sound pressure level difference; and calculating the volume compensation value according to the sound pressure level difference; If the preset suitable distance matches the actual distance, no volume compensation is performed on the sound system in the smart camera; The compensation determination module is also used for: According to the mapping relationship between the sound pressure level and the distance, a preset sound pressure level corresponding to the actual distance is queried; the current human posture of the target to be detected is detected by the smart camera, and the sound pressure level compensation is determined according to the current human posture; and the appropriate sound pressure level is determined according to the sound pressure level compensation and the preset sound pressure level.
4. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the volume compensation optimization method according to any one of claims 1 to 2.
5. A readable storage medium, characterized in that: The readable storage medium stores a program for implementing the volume compensation optimization method, and the program for implementing the volume compensation optimization method is executed by a processor to implement the steps of the volume compensation optimization method as claimed in any one of claims 1 to 2.
Citation Information
Patent Citations
Volume adjustment method and mobile terminal
CN106331371A
Playing parameter adjustment method and device, electronic equipment and memory medium
CN109639893A
Audio adjustment method and device, storage medium and electronic equipment
CN112631542A
Method and device for automatically adjusting volume of voice equipment and voice equipment
CN112637733A