A method, device, electronic device and storage medium for PTZ boundary positioning
By obtaining and comparing the audio data during the rotation of the gimbal in real time, accurately determining the gimbal boundary is solved, and the problems of gimbal hardware loss and noise in the existing technology are improved, and user experience and equipment life are improved.
Patent Information
- Application Number
- CN202410203787.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-23
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-02-23
AI Technical Summary
During the calibration process of existing gimbal cameras, the motor and gears have a long-term confrontation, resulting in hardware loss and noise problems, affecting the user experience.
By obtaining the target audio during the rotation of the gimbal in real time and comparing it with the pre-acquisitioned target audio sample, when the similarity reaches the preset threshold, it is determined that the gimbal rotates to the boundary.
It reduces the loss of gimbal hardware, reduces noise, improves user experience, and extends the life of gimbal rotating mechanism.
Smart Images

Figure CN117935861B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pan / tilt calibration, and in particular to a pan / tilt boundary positioning method, device, electronic equipment and storage medium. Background Art
[0002] With the development of monitoring technology, PTZ cameras are increasingly being used in all walks of life. PTZ cameras refer to cameras that are equipped with a PTZ. The PTZ is a camera stabilizer that can rotate to balance and stabilize the camera. PTZ cameras have a wide monitoring viewing angle and low cost. They can also be rotated to the corresponding angle according to user needs.
[0003] The pan-tilt camera rotates according to user needs. Usually, the user specifies the corresponding angle, and the pan-tilt automatically rotates to the corresponding angle based on the pan-tilt boundary. Therefore, it is very important to accurately locate the pan-tilt boundary before leaving the factory.
[0004] In the related technology, the gimbal is usually operated to rotate excessively, such as operating the gimbal motor to rotate left for 30 seconds, or operating the gimbal stepper motor to rotate 360°. Since the rotation time or rotation angle far exceeds the time or angle for the gimbal to rotate to its boundary, and the gimbal cannot rotate after it rotates to the boundary, the subsequent rotation is the confrontation between the motor and the gear, and will not affect the rotation of the gimbal. Therefore, after the excessive rotation ends, the position of the gimbal is the boundary position.
[0005] However, this method requires the gimbal motor and gears to fight for a long time, which will reduce the life of the gears and motor. During calibration, it will generate long-term harsh noise, affecting the user experience. Summary of the invention
[0006] In view of this, the embodiments of the present invention provide a gimbal boundary positioning method, device, electronic device and storage medium to reduce the gimbal hardware loss during the calibration process, reduce noise and improve user experience.
[0007] According to one aspect of the present invention, a method for locating a gimbal boundary is provided, the method comprising:
[0008] Acquire the target audio in real time during the pan / tilt rotation process;
[0009] Comparing the target audio with a pre-collected target audio sample, wherein the target audio sample is audio data collected when the motor and gear of the pan / tilt start to fight against each other;
[0010] When the similarity between the target audio and the target audio sample reaches a preset similarity threshold, it is determined that the pan / tilt head rotates to a boundary.
[0011] In a possible embodiment, there are multiple audio samples, and the method further includes:
[0012] Determining a target direction in which the pan / tilt head rotates;
[0013] The audio sample collected in the target direction is determined as the target audio sample.
[0014] In a possible embodiment, the pan / tilt platform includes: an audio acquisition device; the audio sample is pre-acquired by the following steps:
[0015] Using the audio acquisition device to collect a first audio sample within a preset time after the pan / tilt head rotates in the first direction until the motor and the gear of the pan / tilt head start to fight against each other;
[0016] The audio collection device is used to collect a second audio sample within the preset time length after the pan / tilt head rotates in the second direction until the motor and the gear of the pan / tilt head start to confront each other.
[0017] In a possible embodiment, the real-time acquisition of target audio during the pan / tilt rotation process includes:
[0018] The audio of the pan / tilt head rotating for the preset time period is acquired in real time as the target audio.
[0019] In a possible embodiment, the first audio sample and the second audio sample are both in the form of sound waves;
[0020] The method further comprises:
[0021] Performing phase flipping on the first audio sample and the second audio sample to obtain a first flipped audio sample and a second flipped audio sample;
[0022] The step of determining the audio sample collected in the target direction as the target audio sample includes:
[0023] The flipped audio sample corresponding to the audio sample collected in the target direction is determined as the target audio sample.
[0024] In a possible embodiment, comparing the target audio with a pre-collected target audio sample includes:
[0025] Interfering the target audio and the target audio sample to obtain a target interference waveform;
[0026] When the similarity between the target audio and the target audio sample reaches a preset similarity threshold, determining that the pan / tilt head rotates to a boundary includes:
[0027] When the amplitude of the target interference waveform reaches a preset amplitude threshold, it is determined that the pan / tilt platform has rotated to a boundary.
[0028] According to another aspect of the present invention, a device for locating a PTZ boundary is provided, the device comprising:
[0029] An acquisition module is used to acquire the target audio in real time during the pan / tilt rotation process;
[0030] A comparison module, used to compare the target audio with a pre-collected target audio sample, wherein the target audio sample is audio data collected when the motor and gear of the pan / tilt start to fight against each other;
[0031] The determination module is used to determine that the pan / tilt head rotates to a boundary when the similarity between the target audio and the target audio sample reaches a preset similarity threshold.
[0032] In a possible embodiment, the device further includes: a target audio sample determination module, configured to determine a target direction in which the pan / tilt head rotates; and determine that an audio sample collected in the target direction is a target audio sample;
[0033] The pan-tilt platform includes: an audio acquisition device; the device also includes: an acquisition module, which is used to use the audio acquisition device to collect a first audio sample within a preset time after the pan-tilt platform rotates in a first direction until the motor of the pan-tilt platform and the gear start to fight against each other; and use the audio acquisition device to collect a second audio sample within the preset time after the pan-tilt platform rotates in a second direction until the motor of the pan-tilt platform and the gear start to fight against each other;
[0034] The real-time acquisition of target audio during the pan / tilt rotation process includes:
[0035] Acquire in real time the audio of the pan / tilt head rotating for the preset time period as the target audio;
[0036] The first audio sample and the second audio sample are both in the form of sound waves; the acquisition module is used to perform phase flipping on the first audio sample and the second audio sample to obtain a first flipped audio sample and a second flipped audio sample;
[0037] The step of determining the audio sample collected in the target direction as the target audio sample includes:
[0038] Determine the flipped audio sample corresponding to the audio sample collected in the target direction as the target audio sample;
[0039] The comparison module is used to interfere the target audio and the target audio sample to obtain a target interference waveform;
[0040] When the similarity between the target audio and the target audio sample reaches a preset similarity threshold, determining that the pan / tilt head rotates to a boundary includes:
[0041] When the amplitude of the target interference waveform reaches a preset amplitude threshold, it is determined that the pan / tilt platform has rotated to a boundary.
[0042] According to another aspect of the present invention, there is provided an electronic device, comprising:
[0043] Processor; and
[0044] Memory for storing programs,
[0045] Wherein, the program includes instructions, and when the instructions are executed by the processor, the processor executes any of the above-mentioned gimbal boundary positioning methods.
[0046] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute any of the above-mentioned gimbal boundary positioning methods.
[0047] One or more technical solutions provided in the embodiments of the present invention collect target audio samples when the pan-tilt motor and gear begin to confront each other in advance, collect target audio when the pan-tilt rotates to the boundary, and determine that the pan-tilt rotates to the boundary when the similarity between the target audio and the target audio sample reaches a preset similarity threshold. Applying the embodiments of the present invention, the pan-tilt motor and gear begin to confront each other, indicating that the pan-tilt rotates to the boundary. Therefore, based on the target audio sample and the similarity of the target audio, it can be more accurately determined whether the pan-tilt rotates to the boundary. In addition, since the target audio sample is collected when the pan-tilt motor and gear begin to confront each other, the duration is short. Therefore, during the calibration process, when the pan-tilt rotates to the boundary and the pan-tilt motor and gear begin to confront each other, it can be determined based on the target audio and the target audio sample that the pan-tilt reaches the boundary. That is, the pan-tilt boundary can be determined when the confrontation time between the pan-tilt motor and the gear is short, reducing the confrontation time between the motor and the gear during the calibration process, reducing the motor overheating and gear wear caused by invalid rotation, that is, reducing the loss of pan-tilt hardware, increasing the life of the pan-tilt rotation mechanism, reducing the generation of noise during excessive rotation, and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0049] Figure 1 A schematic diagram of a process flow of a pan / tilt boundary positioning method provided by an embodiment of the present invention;
[0050] Figure 2A schematic diagram of a process of obtaining a first flipped audio sample and a second flipped audio sample in an embodiment of the present invention;
[0051] Figure 3 A schematic diagram of another process of the pan / tilt boundary positioning method provided by an embodiment of the present invention;
[0052] Figure 4 A waveform diagram of an audio OL in an embodiment of the present invention;
[0053] Figure 5 A waveform diagram of audio C in an embodiment of the present invention;
[0054] Figure 6 A waveform diagram of a target interference waveform obtained after interfering with the audio OL and the audio C in an embodiment of the present invention;
[0055] Figure 7 A schematic diagram of a structure of a pan / tilt boundary positioning device provided in an embodiment of the present invention;
[0056] Figure 8 A block diagram of an exemplary electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0057] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0058] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0059] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0060] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0061] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0062] In order to reduce the hardware loss of the gimbal during the gimbal calibration process and reduce noise, the present invention provides a gimbal boundary positioning method, device, electronic device and storage medium. The gimbal boundary positioning method provided in the embodiment of the present invention can be applied to any electronic device with a gimbal positioning function, and the electronic device can be a server, a computer or a mobile terminal. In a possible embodiment, the gimbal boundary positioning method provided in the embodiment of the present invention can be applied to a control unit in the gimbal. The following describes the scheme of the present invention with reference to the accompanying drawings:
[0063] Figure 1 A schematic flow chart of a method for locating a PTZ boundary provided by an embodiment of the present invention, the method may include the following steps:
[0064] S101, real-time acquisition of target audio during the pan / tilt rotation process;
[0065] S102, comparing the target audio with a pre-collected target audio sample, wherein the target audio sample is audio data collected when the motor and gear of the pan / tilt start to fight against each other;
[0066] S103: When the similarity between the target audio and the target audio sample reaches a preset similarity threshold, determine that the pan / tilt head rotates to a boundary.
[0067] In an embodiment of the present invention, by pre-collecting the target audio sample when the pan-tilt motor and the gear begin to confront each other, the target audio is collected during the pan-tilt rotation to the boundary, and when the similarity between the target audio and the target audio sample reaches a preset similarity threshold, it is determined that the pan-tilt has rotated to the boundary. In the application of the embodiment of the present invention, the pan-tilt motor and the gear begin to confront each other, indicating that the pan-tilt has rotated to the boundary. Therefore, based on the target audio sample and the similarity of the target audio, it can be more accurately determined whether the pan-tilt has rotated to the boundary. In addition, since the target audio sample is collected when the pan-tilt motor and the gear begin to confront each other, the duration is short. Therefore, during the calibration process, when the pan-tilt rotates to the boundary and the pan-tilt motor and the gear begin to confront each other, it can be determined based on the target audio and the target audio sample that the pan-tilt has reached the boundary. In other words, the pan-tilt boundary can be determined when the confrontation time between the pan-tilt motor and the gear is short, reducing the confrontation time between the motor and the gear during the calibration process, reducing the motor overheating and gear wear caused by invalid rotation, that is, reducing the loss of pan-tilt hardware, increasing the life of the pan-tilt rotation mechanism, reducing the generation of noise during excessive rotation, and improving the user experience.
[0068] The above S101-S103 are exemplarily described below:
[0069] The gimbal generally includes a control unit, a storage unit, an external button, a display screen, and firmware such as motors and gears. In a possible embodiment, a rotation instruction can be input through the external button or display screen, and the rotation instruction can be input to the control unit of the gimbal, and the control unit of the gimbal drives the gimbal motor and gears to move, thereby realizing the rotation of the gimbal.
[0070] In a possible embodiment, a MIC (microphone) device may be used to collect target audio during the rotation of the pan-tilt head. The MIC device may be a microphone head, a miniature microphone, etc. As a possible implementation, the MIC device may be placed close to the pan-tilt head to collect audio of the gear rotation during the rotation of the pan-tilt head. The MIC device may be placed 2 cm, 3 cm, etc. away from the pan-tilt head. As another possible implementation, a gear MIC device may be added inside the pan-tilt head, and the gear MIC device may collect audio of the gear rotation during the rotation of the pan-tilt head. The above-mentioned MIC device may be connected to an electronic device for communication, and transmit the collected target audio to the electronic device.
[0071] The above-mentioned target audio samples are collected in advance, specifically when the pan-tilt head rotates to the boundary, that is, when the pan-tilt head motor and the gear just begin to conflict. In one possible embodiment, the instantaneous audio can be collected as the target audio sample when the motor and the gear begin to conflict and generate noise. In another possible embodiment, the collection time can be pre-set, such as 1s, 2s, etc., and the audio of the motor and the gear conflict within the preset time can be collected after the motor and the gear begin to conflict. The above-mentioned target audio samples can be collected by the above-mentioned MIC device placed outside or inside the pan-tilt head, and stored inside the pan-tilt head. As a possible implementation method, the target audio samples can be stored in a storage unit inside the pan-tilt head.
[0072] In practical applications, the rotation angle of the pan / tilt can be determined based on a fixed unilateral boundary, such as the left boundary or the right boundary of the pan / tilt. In one possible embodiment, the target audio sample can be collected at the unilateral boundary. In another possible embodiment, the rotation angle of the pan / tilt can be determined based on either side boundary, such as the left boundary or the right boundary. Accordingly, in this embodiment, audio samples can be collected at both the left and right side boundaries, and the target audio sample can be determined therefrom during the calibration process.
[0073] As a possible implementation manner, an audio acquisition device, such as the microphone, is installed inside the above-mentioned gimbal. Accordingly, when collecting audio samples at the bilateral boundaries, the audio acquisition device can be used to collect a first audio sample within a preset time length after the gimbal rotates in a first direction until the motor and gear of the gimbal start to confront each other; and the audio acquisition device can be used to collect a second audio sample within the preset time length after the gimbal rotates in a second direction until the motor and gear of the gimbal start to confront each other.
[0074] The first direction and the second direction can be divided by a preset reference point. As a possible implementation, the center of the boundary line on both sides of the gimbal can be used as a reference point, and the two sides of the reference point are divided into the first direction and the second direction. In another possible embodiment, the first direction can be divided by the current position of the gimbal, and the present invention does not specifically limit this. The preset duration can be set according to actual needs, such as 1s, 2s, etc.
[0075] In a possible embodiment, the audio sample may be stored in correspondence with the direction in which the audio sample is collected. Exemplarily, the first audio sample may be stored in correspondence with the identifier of the first direction, and the second audio sample may be stored in correspondence with the identifier of the second direction. The identifiers of the directions may be set according to actual needs, such as setting the identifier of the first direction to "1" and setting the identifier of the second direction to "2".
[0076] In a possible embodiment, during the process of collecting the target audio and audio samples, the pan / tilt head may be placed in a quiet environment, such as an environment with a decibel level less than 2 or 3, to reduce the impact of ambient noise on the target audio.
[0077] In a possible embodiment, when there are multiple audio samples, the method may further include: determining a target direction of rotation of the pan / tilt head;
[0078] The audio sample collected in the target direction is determined as the target audio sample.
[0079] As a possible implementation, a direction flag of the pan / tilt rotation may be set, such as setting the flag of the pan / tilt rotation in the first direction to "1" and setting the flag of the pan / tilt rotation in the second direction to "2". The control unit may determine the target direction of the pan / tilt rotation based on the flag contained in the received rotation instruction, and obtain the audio sample collected in the target direction as the target audio sample. Exemplarily, when it is detected that the pan / tilt rotates in the first direction, the first audio sample may be used as the target sample.
[0080] In a possible embodiment, the target audio collected in real time can be compared with the target audio sample, such as the instantaneous target audio sample and the instantaneous target audio can be compared. In another possible embodiment, as described above, the target audio sample is collected during the preset duration of the pan-tilt rotation, so the target audio of the preset duration of the pan-tilt rotation can be obtained in real time, and the preset duration is the same as the preset duration of collecting the target audio sample, such as 1s, 2s, etc. As a possible implementation method, the audio generated by the gear caused by the pan-tilt rotation within the preset duration can be obtained at intervals of the preset duration as the target audio. In a possible embodiment, the pan-tilt rotation can be controlled for a preset duration, and the audio within the preset duration can be collected as the target audio, and the target audio and the target audio sample can be compared. If the comparison is not successful, that is, the similarity between the target audio and the target audio sample is not greater than the preset similarity threshold, then the pan-tilt rotation is continued to be controlled for the preset duration, and the present invention does not specifically limit this.
[0081] In a possible embodiment, the target audio and audio samples may be stored in an audio file format. In a possible embodiment, the target audio and audio samples may both be stored in a sound wave file format, which is not specifically limited in the present invention.
[0082] When comparing the similarity between the target audio and the target audio sample, in a possible embodiment, the neural network model can be used to collect the voiceprint features of the target audio and the target audio sample, and the similarity between the two voiceprint features can be compared. When the similarity exceeds a preset similarity threshold, it is determined that the target audio and the target audio sample are consistent, and it can be determined that the pan / tilt head has rotated to the boundary, and the position of the pan / tilt head at this time is recorded. The similarity threshold can be determined according to actual needs, such as 0.85, 0.9, etc.
[0083] As described above, the target audio and the target audio sample can be stored in a sound wave file format. In a possible embodiment, the target audio and the target audio sample can be interfered to compare the similarity of the target audio and the target audio sample. According to the interference principle of waves, waves with opposite phases will cancel each other out after interference. As a possible implementation, the first audio sample and the second audio sample can be phase-flipped to increase the comparison speed of the target audio and the target audio sample.
[0084] Specifically, the first audio sample and the second audio sample can be phase-flipped to obtain a first flipped audio sample and a second flipped audio sample, and the corresponding flipped audio sample can be determined as the target audio sample according to the target direction of the pan-tilt rotation. The determination process is the same as the process of determining the audio sample corresponding to the target direction, and will not be repeated here.
[0085] In a possible embodiment, the target audio and the target audio sample may be interfered to obtain a target interference waveform; when the amplitude of the target interference waveform reaches a preset amplitude threshold, it is determined that the pan / tilt head has rotated to a boundary, and the position of the pan / tilt head at this time is recorded.
[0086] If the target audio sample and the target audio are highly similar, the amplitude of the obtained target interference waveform will be much smaller than that of the target audio waveform or the target audio sample waveform. Therefore, an amplitude threshold can be preset, and when the amplitude of the target interference waveform is less than the amplitude threshold, it is determined that the target audio is consistent with the target audio sample, that is, the pan / tilt rotates to the boundary. The above-mentioned preset amplitude threshold can be set according to actual needs. Since environmental noise may not be avoided, the amplitude threshold can be set to 20% of the amplitude of the corresponding position of the target audio or target audio sample, that is, the amplitude of the target interference waveform at the same position is reduced by 80% compared with the target audio or the target audio sample, which can determine that the comparison between the target audio and the target audio sample is successful, and the pan / tilt rotates to the boundary.
[0087] Figure 2 The flowchart of generating the first flipped audio sample and the second flipped audio sample in an embodiment of the present invention may include the following steps:
[0088] S201. Use a microphone to record audio. Rotate the gimbal to the left boundary so that the gimbal motor and the gear fight against each other for 5 seconds. Take the 1 second audio L at the beginning of the fight.
[0089] S202. Use a microphone to record audio. Rotate the gimbal to the right boundary so that the gimbal motor and the gear fight against each other for 5 seconds. Take the 1 second audio R at the beginning of the fight.
[0090] The gimbal is placed in a quiet environment to reduce the impact of ambient sound on the collected audio.
[0091] S203 , performing phase flipping on the audio L and the audio R to obtain a first flipped audio sample OL and a second flipped audio sample OR.
[0092] S204, store OL and OR in the PTZ storage unit.
[0093] Figure 3 This is a schematic diagram of a specific process of performing boundary positioning on a pan / tilt platform in an embodiment of the present invention, which may include the following steps:
[0094] S301. Turn the pan / tilt head to the left for 1 second, and use a microphone to record the audio C of the pan / tilt head rotation.
[0095] S302, interfering with audio C and OL.
[0096] S303, determine whether the audio intensity is reduced by 80% after the interference, if so, execute S304, if not, return to S301.
[0097] S304, rotate the pan / tilt head to the right for 1 second, and use a microphone to record the audio C of the pan / tilt head rotation.
[0098] S305, interfering with audio C and OR.
[0099] S306, determine whether the audio intensity after interference is reduced by 80%, if so, the calibration is completed and the left and right boundaries are determined, if not, return to S304.
[0100] See also Figures 4 to 6 , Figure 4 Schematic diagram of the waveform of audio OL obtained by phase flipping audio L. Figure 5 This is a waveform diagram of audio C. Figure 6 It is a schematic diagram of the target interference waveform obtained after interfering with the audio OL and the audio C. Figures 4 to 6 The horizontal axis represents the audio time, and the vertical axis represents the audio waveform amplitude. Figure 6 It can be seen that compared with the waveform intensity of audio OL and the waveform intensity of audio C, the target interference waveform intensity is greatly weakened. Therefore, it can be judged that the PTZ has reached the boundary.
[0101] By applying the embodiments of the present invention, the gimbal is calibrated according to the sound waves, and there is no need to excessively rotate the specified angle or the specified time for calibration, which reduces the gear confrontation time during calibration, thereby reducing the loss of gears and motors, reducing the noise generated, and improving the user experience. In addition, in the embodiments of the present invention, only the gear MIC needs to be added to the original gimbal, and the modification is relatively small, which reduces the difficulty and cost of redesign.
[0102] Based on the same inventive concept, the embodiment of the present invention also provides a pan / tilt platform boundary positioning device, such as Figure 7 As shown, the apparatus 700 may include:
[0103] An acquisition module 701 is used to acquire the target audio in real time during the pan / tilt rotation process;
[0104] A comparison module 702 is used to compare the target audio with a pre-collected target audio sample, wherein the target audio sample is audio data collected when the motor and gear of the pan / tilt start to fight against each other;
[0105] The determination module 703 is configured to determine that the pan / tilt head rotates to a boundary when the similarity between the target audio and the target audio sample reaches a preset similarity threshold.
[0106] In a possible embodiment, the device may further include: a target audio sample determination module 704, configured to determine a target direction of rotation of the pan / tilt head; determine an audio sample collected in the target direction as a target audio sample;
[0107] The pan-tilt platform includes: an audio acquisition device; the device also includes: an acquisition module 705, which is used to use the audio acquisition device to collect a first audio sample within a preset time after the pan-tilt platform rotates in a first direction until the motor of the pan-tilt platform and the gear start to fight against each other; and use the audio acquisition device to collect a second audio sample within the preset time after the pan-tilt platform rotates in a second direction until the motor of the pan-tilt platform and the gear start to fight against each other;
[0108] The real-time acquisition of target audio during the pan / tilt rotation process includes:
[0109] Acquire in real time the audio of the pan / tilt head rotating for the preset time period as the target audio;
[0110] The first audio sample and the second audio sample are both in the form of sound waves; the acquisition module 705 is used to perform phase flipping on the first audio sample and the second audio sample to obtain a first flipped audio sample and a second flipped audio sample;
[0111] The step of determining the audio sample collected in the target direction as the target audio sample includes:
[0112] Determine the flipped audio sample corresponding to the audio sample collected in the target direction as the target audio sample;
[0113] The comparison module is used to interfere the target audio and the target audio sample to obtain a target interference waveform;
[0114] When the similarity between the target audio and the target audio sample reaches a preset similarity threshold, determining that the pan / tilt head rotates to a boundary includes:
[0115] When the amplitude of the target interference waveform reaches a preset amplitude threshold, it is determined that the pan / tilt platform has rotated to a boundary.
[0116] The exemplary embodiment of the present invention further provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to enable the electronic device to perform a method according to an embodiment of the present invention when executed by the at least one processor.
[0117] Exemplary embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present invention.
[0118] An exemplary embodiment of the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform a method according to an embodiment of the present invention.
[0119] refer to Figure 8 , a block diagram of an electronic device 800 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0120] like Figure 8As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0121] A plurality of components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 may be any type of device capable of inputting information to the electronic device 800, and the input unit 806 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 807 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 808 may include, but is not limited to, a disk, an optical disk. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0122] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above. For example, in some embodiments, the above-mentioned gimbal boundary positioning method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. In some embodiments, the computing unit 801 may be configured to perform the above-mentioned gimbal boundary positioning method by any other appropriate means (e.g., by means of firmware).
[0123] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0124] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 of the foregoing.
[0125] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0126] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0127] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0128] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
Claims
1. A method for PTZ boundary positioning, characterized in that: The method comprises: Acquire the target audio in real time during the pan / tilt rotation process; Comparing the target audio with a pre-collected target audio sample, wherein the target audio sample is obtained by phase-flipping the collected audio sample, and the audio sample is collected at the time when the motor and gear of the pan-tilt head start to confront each other, or within a preset time after the motor and gear of the pan-tilt head start to confront each other; When the similarity between the target audio and the target audio sample reaches a preset similarity threshold, determining that the pan / tilt head rotates to a boundary; The comparing the target audio with a pre-collected target audio sample includes: Interfering the target audio and the target audio sample to obtain a target interference waveform; When the similarity between the target audio and the target audio sample reaches a preset similarity threshold, determining that the pan / tilt head rotates to a boundary includes: When the amplitude of the target interference waveform reaches a preset amplitude threshold, it is determined that the pan / tilt platform has rotated to a boundary.
2. The method according to claim 1, characterized in that There are multiple audio samples, and the method further includes: Determining a target direction in which the pan / tilt head rotates; The audio sample collected in the target direction is determined as the target audio sample.
3. The method according to claim 2, characterized in that The pan / tilt platform includes: an audio acquisition device; the audio samples are pre-acquired by the following steps: Using the audio acquisition device to collect a first audio sample within a preset time after the pan / tilt head rotates in the first direction until the motor and the gear of the pan / tilt head start to fight against each other; The audio collection device is used to collect a second audio sample within the preset time length after the pan / tilt head rotates in the second direction until the motor and the gear of the pan / tilt head start to confront each other.
4. The method according to claim 3, characterized in that The real-time acquisition of target audio during the pan / tilt rotation process includes: The audio of the pan / tilt head rotating for the preset time period is acquired in real time as the target audio.
5. The method according to claim 3, characterized in that: The first audio sample and the second audio sample are both in the form of sound waves; The method further comprises: Performing phase flipping on the first audio sample and the second audio sample to obtain a first flipped audio sample and a second flipped audio sample; The step of determining the audio sample collected in the target direction as the target audio sample includes: The flipped audio sample corresponding to the audio sample collected in the target direction is determined as the target audio sample.
6. A pan / tilt platform boundary positioning device, characterized in that: The device comprises: An acquisition module is used to acquire the target audio in real time during the pan / tilt rotation process; A comparison module is used to compare the target audio with a pre-collected target audio sample, wherein the target audio sample is obtained by phase-flipping the collected audio sample, and the audio sample is collected at the time point when the motor and gear of the pan-tilt head start to confront each other, or is collected within a preset time after the motor and gear of the pan-tilt head start to confront each other; comparing the target audio with the pre-collected target audio sample includes: interfering the target audio and the target audio sample to obtain a target interference waveform; A determination module is used to determine that the pan-tilt head rotates to a boundary when the similarity between the target audio and the target audio sample reaches a preset similarity threshold; the determination that the pan-tilt head rotates to a boundary when the similarity between the target audio and the target audio sample reaches a preset similarity threshold includes: determining that the pan-tilt head rotates to a boundary when the amplitude of the target interference waveform reaches a preset amplitude threshold.
7. The device according to claim 6, characterized in that The device further comprises: a target audio sample determination module, which is used to determine the target direction of the pan / tilt rotation; and to determine the audio sample collected in the target direction as the target audio sample; The pan-tilt platform includes: an audio acquisition device; the device also includes: an acquisition module, which is used to use the audio acquisition device to collect a first audio sample within a preset time after the pan-tilt platform rotates in a first direction until the motor of the pan-tilt platform and the gear start to fight against each other; and use the audio acquisition device to collect a second audio sample within the preset time after the pan-tilt platform rotates in a second direction until the motor of the pan-tilt platform and the gear start to fight against each other; The real-time acquisition of target audio during the pan / tilt rotation process includes: Acquire in real time the audio of the pan / tilt head rotating for the preset time period as the target audio; The first audio sample and the second audio sample are both in the form of sound waves; the acquisition module is used to perform phase flipping on the first audio sample and the second audio sample to obtain a first flipped audio sample and a second flipped audio sample; The step of determining the audio sample collected in the target direction as the target audio sample includes: The flipped audio sample corresponding to the audio sample collected in the target direction is determined as the target audio sample.
8. An electronic device, characterized in that: The electronic device comprises: Processor; and Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 5.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-5.
Citation Information
Patent Citations
Pan-tilt motor limiting method and device, pan-tilt camera and storage medium
CN111447362A
Monitoring and early warning system for influence of high-speed rail operation on ultrahigh steep dangerous rock above tunnel portal
CN113724480A