Camera shielding alarm method and device, electronic equipment and storage medium

By using speakers and microphones in the camera and using audio reconstruction technology to perform occlusion detection, the problems of large occlusion detection resources and high cost in the prior art are solved, and efficient and flexible occlusion detection is achieved.

CN119964327APending Publication Date: 2025-05-09ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311493601.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-09
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

In the prior art, occlusion detection occupies a large amount of system resources and has cost limitations.

Method used

The target mark sound source file is played through the speaker in the camera, and the reflected sound wave signal is received through the microphone, and the audio reconstruction is performed using the preset measurement matrix to determine the reflection angle of the sound wave signal, and then occlusion detection is performed.

Benefits of technology

The camera's own components are used for occlusion detection, saving system resources, avoiding cost increases, and improving detection flexibility and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119964327A_ABST
    Figure CN119964327A_ABST
Patent Text Reader

Abstract

The invention provides a camera shielding alarm method and device, electronic equipment and a storage medium, and relates to the technical field of video surveillance, and the method comprises the steps: obtaining a measurement sound wave signal received by a microphone in a camera and a timestamp corresponding to the measurement sound wave signal, the measurement sound wave signal is determined based on a sound wave signal reflected after a loudspeaker in the camera plays a target mark sound source file; audio reconstruction is carried out based on a preset measurement matrix and the measurement sound wave signal, a measurement reflection angle corresponding to the measurement sound wave signal is determined, the measurement matrix comprises an incidence relation between a marked sound source file and frequency response, and the frequency response is related to the reflection angle; and determining a shielding alarm result corresponding to the camera based on a shielding angle threshold value, the timestamp and the measurement reflection angle. Shielding detection can be achieved through components of the camera, system resources are saved, and cost increase is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video surveillance technology, and in particular to a camera blocking alarm method, device, electronic equipment and storage medium. Background Art

[0002] A camera is a device that converts optical signals into electrical signals for storage. Cameras are limited by their viewing angles, and in order to achieve a variety of detection functions, they are generally used with various sensors for auxiliary detection. For example, when monitoring moving targets such as electric vehicles entering confined spaces such as elevators, the camera is generally driven by a transmission device to rotate, and the camera's monitoring range is adjusted to automatically track and determine the moving target, and issue an alarm.

[0003] In the above application scenarios, in order to avoid the inability to monitor due to blocking of the camera, a distance sensor or brightness sensor is generally set in the camera. When the camera is blocked, the distance value or brightness value and other measurement values ​​are detected and compared with the threshold value. The blocking result is determined according to the comparison result, and an alarm is issued according to the blocking result. However, the above blocking detection occupies a lot of system resources and has cost limitations. Summary of the invention

[0004] The present invention provides a camera occlusion alarm method, device, electronic device and storage medium, which are used to solve the defects in the prior art that occlusion detection occupies a large amount of system resources and has cost limitations. The occlusion detection is realized by using the components of the camera itself, which saves system resources and avoids cost increase.

[0005] The present invention provides a camera blocking alarm method, comprising:

[0006] Acquire a measurement sound wave signal received by a microphone in a camera and a timestamp corresponding to the measurement sound wave signal, wherein the measurement sound wave signal is a sound wave signal reflected after a loudspeaker in the camera plays a target marked sound source file;

[0007] Performing audio reconstruction based on a preset measurement matrix and the measured sound wave signal to determine a measured reflection angle corresponding to the measured sound wave signal, wherein the measurement matrix includes an association relationship between a marked sound source file and a frequency response, and the frequency response is related to the reflection angle;

[0008] Based on the occlusion angle threshold, the timestamp and the measured reflection angle, an occlusion alarm result corresponding to the camera is determined.

[0009] According to the camera occlusion alarm method provided by the present invention, the occlusion alarm result corresponding to the camera is determined based on the occlusion angle threshold, the timestamp and the measured reflection angle, including:

[0010] Obtaining the playing time corresponding to the target marked sound source file played by the speaker;

[0011] Based on the playback time and the timestamp, determining a measurement time interval corresponding to the measured sound wave signal;

[0012] When the measurement duration interval is less than or equal to the occlusion duration threshold, the occlusion alarm result corresponding to the camera is determined based on the comparison result of the measured reflection angle and the occlusion angle threshold, and the occlusion duration threshold is determined based on the maximum occlusion distance from the preset occlusion position to the microphone.

[0013] According to the camera occlusion alarm method provided by the present invention, the determining of the occlusion alarm result corresponding to the camera based on the comparison result of the measured reflection angle and the occlusion angle threshold comprises:

[0014] When the comparison result is that the measured reflection angle is greater than or equal to the occlusion angle threshold, determining that the occlusion alarm result corresponding to the camera is that occlusion exists;

[0015] When the comparison result is that the measured reflection angle is smaller than the occlusion angle threshold, it is determined that the occlusion alarm result corresponding to the camera is that there is no occlusion.

[0016] According to the camera occlusion alarm method provided by the present invention, a modulation shell is arranged outside the microphone, and the modulation shell includes at least two overlapping shells, at least two partitions are randomly arranged between two adjacent layers of the shells, and at least two through holes are randomly arranged on each of the partitions, each of the through holes forms at least two sound wave channels in the shell, and the sound wave channels are used to frequency modulate the measurement sound wave signal.

[0017] According to the camera occlusion alarm method provided by the present invention, the method further includes:

[0018] Get all occlusion alarm results in the current detection cycle;

[0019] When all the occlusion alarm results are that there is no occlusion, a rotation control instruction is generated, and the rotation control instruction is used to control the rotation of the signal transceiver devices corresponding to the speaker and the microphone, so as to adjust the corresponding positions of the speaker and the microphone.

[0020] According to the camera occlusion alarm method provided by the present invention, the audio reconstruction based on the preset measurement matrix and the measurement sound wave signal, and determining the measurement reflection angle corresponding to the measurement sound wave signal, includes:

[0021] Determining the frequency spectrum amplitude corresponding to the measured sound wave signal;

[0022] Performing compressed sensing based on the spectrum amplitude and the preset measurement matrix to reconstruct a sparse vector corresponding to the initial signal;

[0023] Based on the sparse vector corresponding to the initial signal, a measurement reflection angle corresponding to the measurement sound wave signal is determined.

[0024] According to the camera occlusion alarm method provided by the present invention, the step of obtaining a measurement sound wave signal received by a microphone in the camera includes:

[0025] Acquire at least one sound wave signal received by the microphone, and determine the sound wave frequency corresponding to each of the sound wave signals;

[0026] Determine the marking frequency corresponding to the target marking sound source file;

[0027] For each of the sound wave frequencies, a sound wave signal whose sound wave frequency is greater than or equal to the marking frequency is determined as the measurement sound wave signal.

[0028] The present invention also provides a camera blocking alarm device, comprising:

[0029] An acquisition module, used for acquiring a measurement sound wave signal received by a microphone in a camera and a timestamp corresponding to the measurement sound wave signal, wherein the measurement sound wave signal is a sound wave signal reflected after a loudspeaker in the camera plays a target mark sound source file;

[0030] A first determination module is used to perform audio reconstruction based on a preset measurement matrix and the measured sound wave signal, and determine a measured reflection angle corresponding to the measured sound wave signal, wherein the measurement matrix includes an association relationship between a marked sound source file and a frequency response, and the frequency response is related to the reflection angle;

[0031] The second determination module is used to determine the occlusion alarm result corresponding to the camera based on the occlusion angle threshold, the timestamp and the measured reflection angle.

[0032] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned camera occlusion alarm methods is implemented.

[0033] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the camera occlusion alarm method as described above is implemented.

[0034] The camera occlusion alarm method, device, electronic device and storage medium provided by the present invention play a target marking sound source file through a speaker in a camera, determine a measurement sound wave signal and a timestamp of the measurement sound wave signal from the reflected sound wave signal through a microphone, perform audio reconstruction using a measurement matrix and the measurement sound wave signal, obtain a measurement reflection angle corresponding to the measurement sound wave signal, perform occlusion detection according to an occlusion angle threshold, a timestamp and the measurement reflection angle, determine an occlusion alarm result, and use the camera's own speaker and microphone to implement occlusion detection, thereby saving algorithm resources and avoiding cost limitations. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 This is one of the flow charts of the camera occlusion alarm method provided by an embodiment of the present invention;

[0037] Figure 2 is a schematic diagram of a confined space provided by an embodiment of the present invention being in an open state;

[0038] Figure 3 is a schematic diagram of an obstruction in a confined space provided by an embodiment of the present invention;

[0039] Figure 4 is a schematic structural diagram of a camera provided by an embodiment of the present invention;

[0040] Figure 5 is a schematic structural diagram of a modulation housing provided by an embodiment of the present invention;

[0041] Figure 6 It is a schematic diagram of a process of constructing a test matrix provided by an embodiment of the present invention;

[0042] Figure 7 is a schematic diagram of an occlusion angle threshold provided by an embodiment of the present invention;

[0043] Figure 8 This is a second flow chart of the camera occlusion alarm method provided by an embodiment of the present invention;

[0044] Fig. 9 is a schematic diagram of an example structure of a signal transceiver provided in an embodiment of the present invention;

[0045] Fig.10 is a structural schematic diagram of a camera blocking alarm device provided by an embodiment of the present invention;

[0046] Fig.11 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.

[0048] In view of the problem that the prior art occupies a large amount of system resources and has cost limitations, an embodiment of the present invention provides a camera occlusion alarm method. Figure 1 FIG. 1 is one of the flow charts of the camera occlusion alarm method provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0049] Step 110: obtaining a measurement sound wave signal received by a microphone in a camera and a timestamp corresponding to the measurement sound wave signal, wherein the measurement sound wave signal is determined based on a sound wave signal reflected after a speaker in the camera plays a target marker sound source file.

[0050] Specifically, in the embodiment of the present invention, after the target mark sound source file is played by the speaker of the camera itself, Figure 2 is a schematic diagram of a closed space provided by an embodiment of the present invention in an open state, such as Figure 2 As shown, if the enclosed space where the camera is located is relatively open, that is, there is no obstruction, the sound wave signal will propagate freely in the enclosed space, and as the propagation distance increases, the intensity of the sound wave signal gradually weakens until the sound wave signal propagates to the wall of the enclosed space. Due to being blocked by the wall and the sound wave signal being a high-frequency sound signal, the sound wave signal will be reflected. However, since the intensity of the sound wave signal before reflection has weakened, the energy of the sound wave signal after reflection is weak and cannot continue to propagate after reflection to be received by the microphone. Figure 3 is a schematic diagram of a closed space provided by an embodiment of the present invention in which an obstruction exists. Figure 3 As shown, if there is an obstruction in the enclosed space where the camera is located, since the sound wave signal is a high-frequency sound signal, the sound wave signal will be reflected in different directions after encountering the obstruction. The multiple reflected sound wave signals will be received by the microphone in the camera to obtain a measured sound wave signal and a timestamp corresponding to the measured sound wave signal. Audio reconstruction is performed based on the measured sound wave signal, and then occlusion detection is performed in combination with the timestamp.

[0051] Optionally, a marked sound source file can be arbitrarily selected from the sound source file library as the target marked sound source file, each marked sound source file is a high-frequency audio file, and the frequency range of each marked sound source file is greater than or equal to 20kHz, and the speaker can support 20kHz. When the target marked sound source file is played through the speaker, since the frequency of the target marked sound source file exceeds the user's hearing range, the user cannot feel it when the speaker plays the target marked sound source file. At the same time, high-frequency sound wave signals greater than or equal to 20kHz have good directionality during propagation, which can enhance the recognition effect during occlusion detection.

[0052] Optionally, the format of the target marker sound source file may include: MP3 (Moving Picture Experts Group Audio Layer III), WAV (WaveForm) and FLAC (Free Lossless Audio Codec), etc., which can store high-frequency audio, and the embodiment of the present invention does not impose any restrictions on this.

[0053] Optional, Figure 4 is a schematic diagram of the structure of a camera provided by an embodiment of the present invention, such as Figure 4 As shown, the camera may include a speaker, a microphone, a central processing unit, an alarm output port, a picture acquisition module and an external communication interface. In the prior art, the camera can perform occlusion detection through the picture acquisition module in combination with a distance sensor or a brightness sensor. In the embodiment of the present invention, the central processing unit in the camera controls the speaker to play the target mark sound source file, and the sound wave signal formed is reflected after encountering an obstruction, received by the microphone, and the reflected sound wave signal is filtered and transmitted to the central processing unit for occlusion detection. After determining the occlusion alarm result, the occlusion alarm result is output through the alarm output port to issue an alarm. In the embodiment of the present invention, the speaker and microphone for occlusion detection are independent of the lens corresponding to the picture acquisition module, and there is no need to add additional sensors, there is no cost limit, the occlusion detection is more flexible, and there is no need to process a large amount of video stream data for judgment, and the system resources occupied are relatively small.

[0054] Furthermore, Figure 5 is a schematic diagram of the structure of the modulation housing provided by an embodiment of the present invention, such as Figure 5As shown, the measured sound wave signal is obtained after the modulation shell arranged outside the microphone performs frequency modulation on the reflected sound wave signal, and the modulation shell includes at least two layers of overlapping shells, at least two partitions are randomly arranged between two adjacent layers of shells, and at least two through holes are randomly arranged on each of the partitions, and each of the through holes forms at least two sound wave channels in the shell, and the sound wave channels are used to perform frequency modulation on the reflected sound wave signal.

[0055] Specifically, before the microphone receives the measured sound wave signal, the reflected sound wave signal is first directional modulated by the modulation shell set outside the microphone and then received by the microphone. The modulation shell constructs the spatial frequency response of the microphone in a direction-dependent manner, that is, the modulation shell simulates the human ear hearing, and the sound will be scattered by the auricle before reaching the eardrum. Due to the irregular spatial structure of the scatterer, the sound perceived in the eardrum will change with the change of the direction of the sound source. The modulation shell complies with the above-mentioned anisotropic scattering mechanism. For example, taking the modulation shell including 4 layers of shell as an example, the modulation shell is trumpet-shaped, each layer of shell is truncated, and each layer of shell is overlapped, that is, the diameter of the shell decreases from the outside to the inside of the modulation shell. A partition is randomly arranged between two adjacent layers of shells, and the shape, number, size, distribution position and inclination angle of the partition are not exactly the same. At least two through holes are randomly arranged on the partition, and the number, size and position of the through holes on different partitions are not exactly the same. Each partition and through hole divides the sound receiving space of the microphone into multiple sound wave channels. After the reflected sound wave signal enters the sound wave channel, resonance will occur. The resonance frequency is related to the propagation path of the sound wave channel. The size, length and curvature of each sound wave channel will affect the propagation path of the reflected sound wave signal, and then the sound wave signal is frequency modulated to obtain a sound wave modulation signal, which is received by the microphone. The interaction between the sound wave modulation signal and the modulation shell can be: fm(ω)=fs(ω)⊙hi(ω), fm(ω) is the spectrum amplitude of the sound wave modulation signal collected by the microphone, fs(ω) is the spectrum amplitude of the initial signal, hi(ω) is the frequency response of the system and the direction-related function, ⊙ represents the Hadamard multiplication; therefore, even if the initial signals from two different directions are the same, the sound wave modulation signals received by the microphone are different.

[0056] It should be noted that the modulation shell can be made of acoustic metamaterials, and the heights of the shell layers can be the same or different, which is not limited in the embodiment of the present invention.

[0057] Furthermore, the step of obtaining the measurement sound wave signal received by the microphone in the camera includes:

[0058] Acquire at least one sound wave modulation signal received by the microphone, and determine the sound wave frequency corresponding to each of the sound wave modulation signals;

[0059] Determine the marking frequency corresponding to the target marking sound source file;

[0060] For each of the sound wave frequencies, a sound wave modulation signal whose sound wave frequency is greater than or equal to the marking frequency is determined as the measurement sound wave signal.

[0061] Specifically, after the speaker plays the target marker sound source file, since there may be other types of sound wave signals in the confined space that will be received by the microphone, after the microphone receives each sound wave modulation signal, by determining the sound wave frequency of each sound wave modulation signal and the marker frequency corresponding to the target marker sound source file played by the speaker, since the target marker sound source file is a high-frequency signal that cannot be perceived by the human ear, if the sound wave frequency is greater than or equal to the marker frequency, it indicates that the sound wave modulation signal is generated after the target marker sound source file is played; if the sound wave frequency is less than the marker frequency, it indicates that the sound wave modulation signal is not generated after the target marker sound source file is played, and it can be filtered out, leaving only the measured sound wave signal for subsequent audio reconstruction.

[0062] Optionally, after receiving each sound wave modulation signal, the microphone can filter through a filter chip or build a filter circuit to determine the measured sound wave signal. The filter chip can select the filter center frequency f0, but the ratio of the clock signal frequency fmain-clk to the filter center frequency f0 is required to be greater than 100:1, that is, if 20kHz filtering is required, the fmain-clk generated by the central processing unit is required to be approximately 2MHz. At the same time, for the passband, a limit of 100Hz can be made to further improve the accuracy of identification during filtering and occlusion detection. The passband width and quality factor Q value are determined by adjusting the resistance value of the filter chip. The central processing unit can select the path of the filter chip through a relay, and turn on high-pass filtering when a high frequency band is required.

[0063] In addition, the filter can also be connected to a power amplifier to amplify the measured sound wave signal obtained by filtering, so as to improve the recognition accuracy during occlusion detection.

[0064] It should be noted that the measured sound wave signal is a single mixed waveform.

[0065] Step 120: reconstruct the audio based on a preset measurement matrix and the measured sound wave signal to determine the measured reflection angle corresponding to the measured sound wave signal. The measurement matrix includes an association between the marked sound source file and the frequency response, and the frequency response is related to the reflection angle.

[0066] Specifically, after obtaining the measurement matrix and the measured sound wave signal, according to the compressed sensing model: y = As, where y represents the measured sound wave signal and A represents the measurement matrix, the sparse vector s of the initial signal can be reconstructed through optimization algorithms such as the gradient descent method, the iterative threshold method or the orthogonal matching pursuit algorithm. By determining the position of the non-zero elements in the sparse vector, the measured reflection angle corresponding to the measured sound wave signal can be determined.

[0067] also, Figure 6 is a flow chart of constructing a test matrix provided by an embodiment of the present invention, such as Figure 6 As shown, before playing the target marked sound source file, the reflection angle range near the microphone in the enclosed space is divided into 0°-90°, and each reflection angle and the occlusion position corresponding to the reflection angle are obtained. Since the positions of the microphone and the speaker are fixed, the minimum occlusion value of the occluder can be measured in advance, that is, the maximum occlusion distance of the occluder to the microphone. According to the minimum occlusion value, the occlusion angle threshold can be determined. Figure 7 is a schematic diagram of an occlusion angle threshold provided by an embodiment of the present invention, such as Figure 7 As shown, if the occlusion position is higher than or equal to the minimum occlusion value, that is, if the reflection angle is greater than or equal to the occlusion angle threshold, the sound wave signal reflected by the speaker after playing the target marked sound source file can be received by the microphone. If the occlusion position is lower than the minimum occlusion value, that is, if the reflection angle is less than the occlusion angle threshold, the sound wave signal reflected by the speaker after playing the target marked sound source file cannot be received by the microphone. Afterwards, each marked sound source file in the sound source file library is played at each occlusion position, and the preset sound wave modulation signal obtained after modulation by the modulation shell is collected. After fast Fourier transforming each preset sound wave modulation signal, the spectrum amplitude corresponding to each preset sound wave modulation signal can be obtained. The measurement matrix is ​​constructed through the spectrum amplitude of the preset signal of each marked sound source file at different occlusion angle thresholds and the spectrum amplitude corresponding to each preset sound wave modulation signal. The measurement ranging can be A=[A1, A2,..., Ak,..., Aq], wherein Ak=PCA{hi⊙fj}, hi represents the spectrum amplitude of the system H=[h1, h2,..., hn] at the i-th reflection angle, n represents the number of reflection angles, fj represents the spectrum amplitude of the preset signal corresponding to the j-th marked sound source file in the audio library F=[f1, f2,..., fm], m represents the number of marked sound source files in the sound source file library, and also represents the number of preset signals in the audio library, ⊙ represents Hadamard multiplication, after Hadamard multiplication of hi and fj, principal component analysis is performed on the Hadamard multiplication result, and the k-th element Ak in the measurement matrix A can be obtained, and k=(i-1)m+j, that is, the Hadamard multiplication result is mapped to the maximum variance direction, and the measurement matrix A can be constructed, and the preset signals in different directions can be better identified in the maximum variance direction.

[0068] Further, the audio reconstruction based on the preset measurement matrix and the measured sound wave signal to determine the measured reflection angle corresponding to the measured sound wave signal includes:

[0069] Determining the frequency spectrum amplitude corresponding to the measured sound wave signal;

[0070] Performing compressed sensing based on the spectrum amplitude and the preset measurement matrix to reconstruct a sparse vector corresponding to the initial signal;

[0071] Based on the sparse vector corresponding to the initial signal, a measurement reflection angle corresponding to the measurement sound wave signal is determined.

[0072] Specifically, when reconstructing the initial signal based on the compressed sensing model, first, the measured sound wave signal y is inversely transformed by principal component transformation through y=PCA{y0}, and the spectral amplitude y0 corresponding to the measured sound wave signal y can be obtained. By measuring the matrix A and the spectral amplitude y0, the sparse vector s of the initial signal can be reconstructed based on the above-mentioned optimization algorithm. By determining the position of the non-zero elements in the sparse vector s, the measured reflection angle corresponding to the measured sound wave signal can be determined.

[0073] Step 130: Determine an occlusion alarm result corresponding to the camera based on the occlusion angle threshold, the timestamp, and the measured reflection angle.

[0074] Specifically, after determining the timestamp, measuring the reflection angle and the occlusion angle threshold, the measured sound wave signal can be screened again according to the timestamp, and then based on the screening result and the comparison result of the measured reflection angle and the occlusion angle threshold, it is determined whether the reflected sound wave signal can be sensed by the microphone, thereby determining the occlusion alarm result corresponding to the camera.

[0075] Further, the determining the occlusion alarm result corresponding to the camera based on the occlusion angle threshold, the timestamp and the measured reflection angle includes:

[0076] Obtaining the playing time corresponding to the target marked sound source file played by the speaker;

[0077] Based on the playback time and the timestamp, determining a measurement time interval corresponding to the measured sound wave signal;

[0078] When the measurement duration interval is less than or equal to the occlusion duration threshold, the occlusion alarm result corresponding to the camera is determined based on the comparison result of the measured reflection angle and the occlusion angle threshold, and the occlusion duration threshold is determined based on the maximum occlusion distance from the preset occlusion position to the microphone.

[0079] Further, the determining the occlusion alarm result corresponding to the camera based on the comparison result of the measured reflection angle and the occlusion angle threshold includes:

[0080] When the comparison result is that the measured reflection angle is greater than or equal to the occlusion angle threshold, determining that the occlusion alarm result corresponding to the camera is that occlusion exists;

[0081] When the comparison result is that the measured reflection angle is smaller than the occlusion angle threshold, it is determined that the occlusion alarm result corresponding to the camera is that there is no occlusion.

[0082] Specifically, Figure 8 FIG. 2 is a flow chart of the camera occlusion alarm method provided by an embodiment of the present invention. Figure 8 As shown, after determining the minimum occlusion value, the maximum occlusion distance can be determined according to the coordinate data of the minimum occlusion value and the coordinate data of the microphone. The propagation speed of sound waves is 340m / s. The ratio of the maximum occlusion distance to the propagation speed of sound waves is calculated, and twice the ratio is determined as the occlusion duration threshold. At the same time, the playback time of the target marked sound source file played by the speaker and the timestamp of the microphone receiving the measured sound wave signal are obtained. According to the difference between the playback time and the timestamp, the measurement duration interval can be calculated. If the measurement duration interval is less than or equal to the occlusion duration threshold, it indicates that the measured sound wave signal may be a sound wave signal reflected due to the occlusion of the occlusion object. At this time, if the measured reflection angle is greater than or equal to the occlusion angle threshold, it indicates that there is occlusion in front of the camera, and an occlusion alarm result is generated, which is transmitted to the external alarm device through the alarm output port for alarm. If the measured reflection angle is less than the occlusion angle threshold, it indicates that there is no occlusion in front of the camera and no alarm is required. When there is no obstruction, the user can choose whether to turn on the low power consumption mode, which may include: not recording the picture when no one is around or using low-resolution and low-frame-rate bitstream recording and transmission when no one is around.

[0083] In addition, the detection cycle can be set, and the number of occlusion detections can be set in each detection cycle to avoid increased power consumption due to frequent detection.

[0084] Furthermore, the method further comprises:

[0085] Get all occlusion alarm results in the current detection cycle;

[0086] When all the occlusion alarm results are that there is no occlusion, a rotation control instruction is generated, and the rotation control instruction is used to control the rotation of the signal transceiver devices corresponding to the speaker and the microphone, so as to adjust the corresponding positions of the speaker and the microphone.

[0087] Specifically, the angle of the obstruction is different, and the reflection direction of the initial signal is different. When the obstruction is tilted, and the speaker is on the left and the microphone is on the right, if the left side of the obstruction is higher than the right side, any reflected sound wave signal can be received by the microphone. If the left side of the obstruction is lower than the right side, the direction of the reflected sound wave signal is in the opposite direction of the microphone. Therefore, if all the obstruction alarm results in the entire current detection cycle are that there is no obstruction, it may be due to the tilt of the obstruction that the direction of the reflected sound wave signal is in the opposite direction of the microphone. At this time, a rotation control instruction can be generated to control the motor body to drive the signal transceiver corresponding to the speaker and microphone to rotate, and adjust the position of the speaker and microphone. The rotation angle can be 180°.

[0088] For example, Fig. 9 is a schematic diagram of an exemplary structure of a signal transceiver provided in an embodiment of the present invention. Fig. 9 As shown, the signal transceiver device corresponding to the speaker and the microphone may include: a first guide rail, a second guide rail, a gear and a motor body, the first guide rail and the second guide rail are vertically arranged in the axial direction, the first guide rail is a fixed guide rail, and the inner side of the first guide rail is toothed, the second guide rail is arranged on the first guide rail, the gear is toothed on the side close to the first guide rail, the gear is meshed and connected with the inner side of the first guide rail, and the gear is connected to the motor body, and the motor body is fixedly arranged on the second guide rail. After the rotation control instruction is generated, the motor body is controlled to drive the gear to rotate, and through the meshing connection between the gear and the first guide rail, the driving gear drives the second guide rail to rotate in a clockwise or counterclockwise direction, thereby driving the speaker and the microphone to rotate to adjust the position of the speaker and the microphone. It should be noted that the relative distance between the speaker and the microphone remains unchanged before and after the rotation.

[0089] The camera occlusion alarm method provided by the embodiment of the present invention plays a target marking sound source file through a speaker in the camera, determines a measurement sound wave signal and a timestamp of the measurement sound wave signal from the reflected sound wave signal through a microphone, reconstructs the audio using a measurement matrix and the measurement sound wave signal, obtains a measurement reflection angle corresponding to the measurement sound wave signal, performs occlusion detection according to an occlusion angle threshold, a timestamp and the measurement reflection angle, determines an occlusion alarm result, and implements occlusion detection using the speaker and microphone of the camera itself, thereby saving algorithm resources and avoiding cost limitations.

[0090] The camera occlusion alarm device provided by the present invention is described below. The camera occlusion alarm device described below and the camera occlusion alarm method described above can be referred to each other.

[0091] The embodiment of the present invention also provides a camera blocking alarm device, Fig.10 is a schematic diagram of the structure of a camera blocking alarm device provided by an embodiment of the present invention, such as Fig.10 As shown, the camera blocking alarm device 1000 includes: an acquisition module 1010, a first determination module 1020 and a second determination module 1030, wherein:

[0092] An acquisition module 1010 is used to acquire a measurement sound wave signal received by a microphone in a camera and a timestamp corresponding to the measurement sound wave signal, wherein the measurement sound wave signal is determined based on a sound wave signal reflected after a speaker in the camera plays a target mark sound source file;

[0093] A first determination module 1020 is configured to perform audio reconstruction based on a preset measurement matrix and the measured sound wave signal, and determine a measured reflection angle corresponding to the measured sound wave signal, wherein the measurement matrix includes an association relationship between a marked sound source file and a frequency response, and the frequency response is related to the reflection angle;

[0094] The second determination module 1030 is used to determine the occlusion alarm result corresponding to the camera based on the occlusion angle threshold, the timestamp and the measured reflection angle.

[0095] The camera occlusion alarm device provided by the embodiment of the present invention plays a target marking sound source file through a speaker in the camera, determines a measurement sound wave signal and a timestamp of the measurement sound wave signal from the reflected sound wave signal through a microphone, reconstructs the audio using a measurement matrix and the measurement sound wave signal, obtains a measurement reflection angle corresponding to the measurement sound wave signal, performs occlusion detection according to an occlusion angle threshold, a timestamp and the measurement reflection angle, determines an occlusion alarm result, and implements occlusion detection using the speaker and microphone of the camera itself, thereby saving algorithm resources and avoiding cost limitations.

[0096] Optionally, the acquisition module 1010 is specifically configured to:

[0097] Acquire at least one sound wave modulation signal received by the microphone, and determine the sound wave frequency corresponding to each of the sound wave modulation signals;

[0098] Determine the marking frequency corresponding to the target marking sound source file;

[0099] For each of the sound wave frequencies, a sound wave modulation signal whose sound wave frequency is greater than or equal to the marking frequency is determined as the measurement sound wave signal.

[0100] Optionally, the first determining module 1020 is specifically configured to:

[0101] Determining the frequency spectrum amplitude corresponding to the measured sound wave signal;

[0102] Performing compressed sensing based on the spectrum amplitude and the preset measurement matrix to reconstruct a sparse vector corresponding to the initial signal;

[0103] Based on the sparse vector corresponding to the initial signal, a measurement reflection angle corresponding to the measurement sound wave signal is determined.

[0104] Optionally, the second determining module 1030 is specifically configured to:

[0105] Obtaining the playing time corresponding to the target marked sound source file played by the speaker;

[0106] Based on the playback time and the timestamp, determining a measurement time interval corresponding to the measured sound wave signal;

[0107] When the measurement duration interval is less than or equal to the occlusion duration threshold, the occlusion alarm result corresponding to the camera is determined based on the comparison result of the measured reflection angle and the occlusion angle threshold, and the occlusion duration threshold is determined based on the maximum occlusion distance from the preset occlusion position to the microphone.

[0108] Optionally, the second determining module 1030 is specifically configured to:

[0109] When the comparison result is that the measured reflection angle is greater than or equal to the occlusion angle threshold, determining that the occlusion alarm result corresponding to the camera is that occlusion exists;

[0110] When the comparison result is that the measured reflection angle is smaller than the occlusion angle threshold, it is determined that the occlusion alarm result corresponding to the camera is that there is no occlusion.

[0111] Optionally, the measured sound wave signal is obtained by frequency modulating the reflected sound wave signal by a modulation shell arranged outside the microphone, and the modulation shell includes at least two overlapping shells, at least two partitions are randomly arranged between two adjacent shells, and at least two through holes are randomly arranged on each partition, each of the through holes forms at least two sound wave channels in the shell, and the sound wave channels are used to frequency modulate the reflected sound wave signal.

[0112] Optionally, the camera blocking alarm device further includes an adjustment module, and the adjustment module is specifically used to:

[0113] Get all occlusion alarm results in the current detection cycle;

[0114] When all the occlusion alarm results are that there is no occlusion, a rotation control instruction is generated, and the rotation control instruction is used to control the rotation of the signal transceiver devices corresponding to the speaker and the microphone, so as to adjust the corresponding positions of the speaker and the microphone.

[0115] Fig.11 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Fig.11As shown, the electronic device may include: a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120 and the memory 1130 communicate with each other through the communication bus 1140. The processor 1110 may call the logic instructions in the memory 1130 to execute the camera occlusion alarm method, which includes:

[0116] Acquire a measurement sound wave signal received by a microphone in a camera and a timestamp corresponding to the measurement sound wave signal, wherein the measurement sound wave signal is determined based on a sound wave signal reflected after a target mark sound source file is played by a speaker in the camera;

[0117] Performing audio reconstruction based on a preset measurement matrix and the measured sound wave signal to determine a measured reflection angle corresponding to the measured sound wave signal, wherein the measurement matrix includes an association relationship between a marked sound source file and a frequency response, and the frequency response is related to the reflection angle;

[0118] Based on the occlusion angle threshold, the timestamp and the measured reflection angle, an occlusion alarm result corresponding to the camera is determined.

[0119] In addition, the logic instructions in the above-mentioned memory 1130 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0120] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the camera occlusion alarm method provided by the above methods, the method includes:

[0121] Acquire a measurement sound wave signal received by a microphone in a camera and a timestamp corresponding to the measurement sound wave signal, wherein the measurement sound wave signal is determined based on a sound wave signal reflected after a target mark sound source file is played by a speaker in the camera;

[0122] Performing audio reconstruction based on a preset measurement matrix and the measured sound wave signal to determine a measured reflection angle corresponding to the measured sound wave signal, wherein the measurement matrix includes an association relationship between a marked sound source file and a frequency response, and the frequency response is related to the reflection angle;

[0123] Based on the occlusion angle threshold, the timestamp and the measured reflection angle, an occlusion alarm result corresponding to the camera is determined.

[0124] In another aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the camera occlusion alarm method provided by the above methods is implemented, and the method includes:

[0125] Acquire a measurement sound wave signal received by a microphone in a camera and a timestamp corresponding to the measurement sound wave signal, wherein the measurement sound wave signal is determined based on a sound wave signal reflected after a target mark sound source file is played by a speaker in the camera;

[0126] Performing audio reconstruction based on a preset measurement matrix and the measured sound wave signal to determine a measured reflection angle corresponding to the measured sound wave signal, wherein the measurement matrix includes an association relationship between a marked sound source file and a frequency response, and the frequency response is related to the reflection angle;

[0127] Based on the occlusion angle threshold, the timestamp and the measured reflection angle, an occlusion alarm result corresponding to the camera is determined.

[0128] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0129] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A camera occlusion alarm method, characterized in that: include: Acquire a measurement sound wave signal received by a microphone in a camera and a timestamp corresponding to the measurement sound wave signal, wherein the measurement sound wave signal is determined based on a sound wave signal reflected after a target mark sound source file is played by a speaker in the camera; Performing audio reconstruction based on a preset measurement matrix and the measured sound wave signal to determine a measured reflection angle corresponding to the measured sound wave signal, wherein the measurement matrix includes an association relationship between a marked sound source file and a frequency response, and the frequency response is related to the reflection angle; Based on the occlusion angle threshold, the timestamp and the measured reflection angle, an occlusion alarm result corresponding to the camera is determined.

2. The camera occlusion alarm method according to claim 1, characterized in that: The determining, based on the occlusion angle threshold, the timestamp, and the measured reflection angle, an occlusion alarm result corresponding to the camera includes: Obtaining the playing time corresponding to the target marked sound source file played by the speaker; Based on the playback time and the timestamp, determining a measurement time interval corresponding to the measured sound wave signal; When the measurement duration interval is less than or equal to the occlusion duration threshold, the occlusion alarm result corresponding to the camera is determined based on the comparison result of the measured reflection angle and the occlusion angle threshold, and the occlusion duration threshold is determined based on the maximum occlusion distance from the preset occlusion position to the microphone.

3. The camera occlusion alarm method according to claim 2, characterized in that: The determining, based on a comparison result of the measured reflection angle and the occlusion angle threshold, an occlusion alarm result corresponding to the camera comprises: When the comparison result is that the measured reflection angle is greater than or equal to the occlusion angle threshold, determining that the occlusion alarm result corresponding to the camera is that occlusion exists; When the comparison result is that the measured reflection angle is smaller than the occlusion angle threshold, it is determined that the occlusion alarm result corresponding to the camera is that there is no occlusion.

4. The camera occlusion alarm method according to any one of claims 1 to 3, characterized in that: The measured sound wave signal is obtained after the modulation shell arranged outside the microphone performs frequency modulation on the reflected sound wave signal. The modulation shell includes at least two overlapping shells, at least two partitions are randomly arranged between two adjacent shells, and at least two through holes are randomly arranged on each of the partitions. Each of the through holes forms at least two sound wave channels in the shell, and the sound wave channels are used to perform frequency modulation on the reflected sound wave signal.

5. The camera occlusion alarm method according to any one of claims 1 to 3, characterized in that: The method further comprises: Get all occlusion alarm results in the current detection cycle; When all the occlusion alarm results are that there is no occlusion, a rotation control instruction is generated, and the rotation control instruction is used to control the rotation of the signal transceiver device corresponding to the speaker and the microphone to adjust the corresponding positions of the speaker and the microphone.

6. The camera occlusion alarm method according to any one of claims 1 to 3, characterized in that: The audio reconstruction based on the preset measurement matrix and the measured sound wave signal, and determining the measured reflection angle corresponding to the measured sound wave signal, includes: Determining the frequency spectrum amplitude corresponding to the measured sound wave signal; Performing compressed sensing based on the spectrum amplitude and the preset measurement matrix to reconstruct a sparse vector corresponding to the initial signal; Based on the sparse vector corresponding to the initial signal, a measurement reflection angle corresponding to the measurement sound wave signal is determined.

7. The camera occlusion alarm method according to any one of claims 1 to 3, characterized in that: The step of obtaining the measurement sound wave signal received by the microphone in the camera includes: Acquire at least one sound wave modulation signal received by the microphone, and determine the sound wave frequency corresponding to each of the sound wave modulation signals; Determine the marking frequency corresponding to the target marking sound source file; For each of the sound wave frequencies, a sound wave modulation signal whose sound wave frequency is greater than or equal to the marking frequency is determined as the measurement sound wave signal.

8. A camera blocking alarm device, characterized in that: include: An acquisition module, used for acquiring a measurement sound wave signal received by a microphone in a camera and a timestamp corresponding to the measurement sound wave signal, wherein the measurement sound wave signal is determined based on a sound wave signal reflected after a target mark sound source file is played by a speaker in the camera; A first determination module is used to perform audio reconstruction based on a preset measurement matrix and the measured sound wave signal, and determine a measured reflection angle corresponding to the measured sound wave signal, wherein the measurement matrix includes an association relationship between a marked sound source file and a frequency response, and the frequency response is related to the reflection angle; The second determination module is used to determine the occlusion alarm result corresponding to the camera based on the occlusion angle threshold, the timestamp and the measured reflection angle.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the camera occlusion alarm method as described in any one of claims 1-7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the camera occlusion alarm method according to any one of claims 1 to 7 is implemented.