Method for adjusting detection angle of PIR device, camera and storage medium

By introducing a driving mechanism and blade structure into the PIR device and automatically adjusting the detection angle, the problem of the inability to adjust the detection angle of the traditional PIR device is solved, the monitoring accuracy and efficiency of the camera are improved, and the battery power is avoided.

CN118982890APending Publication Date: 2024-11-19SHENZHEN BAICHUAN SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411190327.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

The detection angle of traditional PIR devices cannot be adjusted, resulting in the camera being unable to accurately detect specific areas when auto-zooming, causing unnecessary induction recognition interference and waste of battery power.

Method used

By introducing a driving mechanism and a blade structure into the PIR device, the detection angle is automatically adjusted to match the monitoring view angle of the camera, and dynamic setting of angle adjustment and wake-up threshold is achieved using a computer program.

Benefits of technology

It improves the monitoring accuracy and efficiency of the camera, avoids waste of battery power, and adjusts the detection angle according to specific needs to meet different monitoring needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118982890A_ABST
    Figure CN118982890A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of video monitoring, and discloses a PIR device detection angle adjusting method, a camera and a storage medium, and the PIR device detection angle adjusting method comprises the steps: obtaining a current detection angle, a target detection angle and an environment temperature of a PIR device; determining an angle adjustment value according to the current detection angle and the target detection angle; determining a corresponding wake-up threshold value of the PIR device at the target detection angle according to the environment temperature; starting a driving mechanism according to the angle adjustment value to drive the blades to slide around the axis of the fixing ring; acquiring a real-time detection angle of the PIR device, wherein the real-time detection angle is a detection angle determined after the PIR device is awakened; and determining whether the detection angle of the PIR device continues to be adjusted according to the real-time detection angle and the target detection angle. Through the mode, the automatic adjustment of the detection angle of the PIR device can be realized, the monitoring accuracy and efficiency of the camera are improved, and meanwhile, the waste of the electric quantity of a battery is also avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of video surveillance technology, and in particular to a method for adjusting the detection angle of a PIR device, a camera, and a storage medium. Background Art

[0002] Passive Infra-Red (PIR sensor) is a sensor that can detect infrared rays emitted by human body or other heat source and output electrical signals. Specifically, PIR sensor can detect the change of infrared energy radiated by human body or other heat source in non-contact form and convert it into voltage signal output. By amplifying this voltage signal, it can drive various control circuits, such as power switch control, anti-theft and fire alarm, etc.

[0003] Low-power battery cameras have high requirements for energy saving and usually use PIR technology. The PIR device with integrated PIR sensor responds to the infrared radiation emitted by the human body or other heat source to wake up the detection and identification of movement, which can avoid the continuous video recording and data transmission of the camera. Specifically, the PIR device consumes very little energy in the dormant state. When a human body or other heat source enters its detection range, the infrared radiation emitted by the human body or other heat source is enhanced by the filter and concentrated on the sensing element of the PIR sensor. The sensing element usually uses a passive pyroelectric probe element. After receiving the temperature change caused by the infrared radiation emitted by the human body or other heat source, this element can break the charge balance state inside the element and release the charge outward. If the change of the electrical signal is recognized as a valid signal by the internal circuit, the PIR device is awakened. Then, the PIR device generates an alarm signal after being awakened, thereby activating the camera to enter the working state and conduct real-time monitoring and recording of the target area.

[0004] Traditional PIR devices can manually adjust their detection sensitivity and detection distance, but their detection angles are mostly fixed and cannot be adjusted. The detection angle of PIR devices is often larger than the monitoring angle of the camera. Therefore, in the actual application of low-power battery cameras, the detection angle of PIR devices usually cannot fully match the monitoring angle of the camera. For example, when the camera performs the automatic zoom function, the user may only need to accurately detect and alarm a specific area within the telephoto field of view, but because the detection angle of the PIR device is larger than the monitoring angle of the camera, the detection angle of the PIR device is easy to cover the adjacent areas outside the camera's field of view, causing the alarms of these non-target areas to overlap with the target areas that really need attention. When an abnormality occurs in an area outside the monitoring angle but within the detection angle of the PIR device, unnecessary induction and recognition interference is triggered, resulting in the false awakening of the camera, prompting the camera to trigger the recording mechanism when there is no actual heat source entering its effective monitoring field of view, which not only reduces the accuracy and efficiency of monitoring, but also leads to a waste of battery power. Summary of the invention

[0005] In view of the above problems, the embodiments of the present application provide a method for adjusting the detection angle of a PIR device, a camera and a storage medium, which can realize automatic adjustment of the detection angle of the PIR device, improve the monitoring accuracy and efficiency of the camera, and avoid wasting battery power.

[0006] According to one aspect of an embodiment of the present application, a method for adjusting the detection angle of a PIR device is provided, the method being applied to a camera, the camera comprising a PIR device, the PIR device comprising a fixing ring, a driving mechanism, a blade and a PIR sensor, the blade being slidably arranged on the fixing ring, the driving mechanism being rotatably connected to the blade to drive the blade to slide around the axis of the fixing ring, the blade being arranged opposite to a photosensitive surface of the PIR sensor to shield the photosensitive surface of the PIR sensor; the method comprising: obtaining a current detection angle, a target detection angle and an ambient temperature of the PIR device; determining an angle adjustment value according to the current detection angle and the target detection angle; determining a wake-up threshold corresponding to the PIR device at the target detection angle according to the ambient temperature; starting the driving mechanism according to the angle adjustment value to drive the blade to slide around the axis of the fixing ring to change the shielding area of ​​the blade on the photosensitive surface of the PIR sensor until the infrared signal strength value detected by the PIR device is greater than the wake-up threshold; obtaining a real-time detection angle of the PIR device, the real-time detection angle being a detection angle determined after the PIR device is awakened; and determining whether to continue adjusting the detection angle of the PIR device according to the real-time detection angle and the target detection angle.

[0007] In an optional manner, determining whether to continue adjusting the detection angle of the PIR device according to the real-time detection angle and the target detection angle further includes: acquiring a preset error range; determining an angle difference between the real-time detection angle and the target detection angle; judging whether the angle difference is within the preset error range; if the angle difference is within the preset error range, stopping adjusting the detection angle of the PIR device; if the angle difference is not within the preset error range, continuing to adjust the detection angle of the PIR device according to the angle difference until the angle difference is within the preset error range.

[0008] In an optional manner, starting a driving mechanism according to the angle adjustment value drives the blade to slide around the axis of the fixing ring, including: starting a first timer, the first timer is used to indicate the duration of adjusting the detection angle of the PIR device; starting the driving mechanism according to the angle adjustment value to drive the blade to slide around the axis of the fixing ring; determining whether to continue to adjust the detection angle of the PIR device according to the real-time detection angle and the target detection angle, including: obtaining a preset error range; determining an angle difference between the real-time detection angle and the target detection angle; adjusting the real-time detection angle until the angle difference is within the preset error range or the first timer times out, and stopping adjusting the detection angle of the PIR device.

[0009] In an optional manner, the method further includes: when the first timer times out, determining whether the angle difference is within a preset error range; if the angle difference is not within the preset error range, determining whether the timing time of the first timer is received; if the timing time of the first timer is received, starting the second timer, and proceeding to the step of obtaining the real-time detection angle of the PIR device until the angle difference is within the preset error range; wherein the second timer is used to indicate the duration of adjusting the detection angle of the PIR device; if the timing time of the first timer is not received, restarting the first timer, and proceeding to the step of obtaining the real-time detection angle of the PIR device.

[0010] In an optional manner, the method further includes: when the second timer times out, determining whether the angle difference is within a preset error range; if the angle difference is within the preset error range, stopping adjusting the detection angle of the PIR device; if the angle difference is not within the preset error range, stopping adjusting the detection angle of the PIR device, and generating a fault instruction, wherein the fault instruction is used to indicate that the detection angle adjustment of the PIR device has failed.

[0011] In an optional manner, the driving mechanism includes a blade driving ring and a driving assembly, the blade driving ring is coaxially arranged with the fixed ring, and the blade driving ring is slidingly connected to the side of the blade facing away from the fixed ring, and the driving assembly is rotationally connected to the blade driving ring; starting the driving mechanism according to the angle adjustment value to drive the blade to slide around the axis of the fixed ring includes: starting the driving assembly according to the angle adjustment value to drive the blade driving ring to rotate, thereby driving the blade to slide around the axis of the fixed ring.

[0012] In an optional manner, the driving component includes a motor and a gear, the gear is mounted on the driving shaft of the motor, and the gear is meshed with the edge of the blade driving ring; starting the driving component according to the angle adjustment value to drive the blade driving ring to rotate includes: starting the motor according to the angle adjustment value, that is, driving the driving shaft to drive the gear to rotate, so that the gear drives the blade driving ring to rotate.

[0013] In an optional manner, a slide hole is provided on the blade drive ring, a slide groove is provided on the ring axis of the fixed ring, and a sliding rod adapted to the slide hole and a slider adapted to the slide groove are respectively provided on both sides of the blade, and the sliding rod is passed through the slide hole; the sliding rod and the slider slide in the slide hole and the slide groove respectively when the blade drive ring rotates, so that the blade slides around the axis of the fixed ring.

[0014] According to another aspect of an embodiment of the present application, a camera is provided, comprising a camera unit and a PIR device, wherein the camera unit is communicatively connected to the PIR device; the camera unit comprises a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the detection angle adjustment method of the PIR device provided in any of the above embodiments, and adjusts the detection angle of the PIR device.

[0015] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for adjusting the detection angle of the PIR device provided in any of the above embodiments is implemented.

[0016] The detection angle adjustment method of the PIR device provided in the embodiment of the present application determines the angle adjustment value by the current detection angle of the PIR device and the target detection angle, and can start the driving mechanism according to the angle adjustment value to drive the blade to slide around the axis of the fixed ring, change the shielding area of ​​the blade on the photosensitive surface of the PIR sensor, thereby adjusting the detection angle of the PIR device, and determining the corresponding wake-up threshold of the PIR device at the target detection angle by the target detection angle. In the process of adjusting the detection angle of the PIR device from the current detection angle to the target detection angle, the detection angle of the PIR device can be gradually adjusted to the target detection angle by the infrared signal intensity detected by the PIR device reaching the wake-up threshold; by obtaining the real-time detection angle determined after the PIR device is awakened, and determining the detection angle adjustment status of the PIR device by the real-time detection angle and the target detection angle, it can be further determined whether the detection angle of the PIR device needs to be corrected. In the above manner, the camera can realize the automatic adjustment of the detection angle of the PIR device, which not only makes the detection angle of the PIR device match the monitoring angle of the camera unit, improves the accuracy and efficiency of the camera monitoring, and avoids the waste of battery power, but also allows the user to adjust the detection angle of the PIR device according to specific needs to meet the different monitoring needs of the camera.

[0017] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present application. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:

[0019] Figure 1 A schematic diagram of the structure of a camera provided in an embodiment of the present application is shown;

[0020] Figure 2 A three-dimensional diagram of a PIR device provided in an embodiment of the present application is shown;

[0021] Figure 3 An exploded view of a PIR device provided in an embodiment of the present application is shown;

[0022] Figure 4 An exploded view of an aperture module provided in an embodiment of the present application is shown;

[0023] Figure 5 A schematic diagram of the structure of a PIR device provided in an embodiment of the present application is shown;

[0024] Figure 6 A schematic diagram of the structure of a PIR device provided in an embodiment of the present application is shown;

[0025] Figure 7 A schematic diagram of the structure of a PIR device provided in an embodiment of the present application is shown;

[0026] Figure 8 A schematic diagram of a flow chart of a method for adjusting the detection angle of a PIR device provided in an embodiment of the present application is shown;

[0027] Fig. 9 A schematic diagram of the sub-step flow of step S160 is shown;

[0028] Fig.10 A schematic flow chart of a method for adjusting the detection angle of a PIR device provided in another embodiment of the present application is shown;

[0029] Fig.11 A schematic flow chart of a method for adjusting the detection angle of a PIR device provided in another embodiment of the present application is shown. DETAILED DESCRIPTION

[0030] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.

[0031] The present application embodiment provides a method for adjusting the detection angle of a PIR device, which is applied to a low-power camera integrated with a PIR sensor. Figure 1 The schematic diagram of the structure of the camera provided in the embodiment of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the camera. Figure 1 As shown, the camera 1 includes a camera unit 10 and a PIR device 20 , wherein the PIR device 20 is communicatively connected with the camera unit 10 , and the camera unit 10 may include a processor 102 and a memory 104 .

[0032] like Figure 1 As shown, the memory 104 is used to store a computer program 106. The memory 104 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. The computer program 106 may include computer executable instructions.

[0033] The processor 102 is configured to execute the computer program 106 to implement the above-mentioned method embodiment for adjusting the detection angle of the PIR device.

[0034] The processor 102 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the camera unit 10 may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.

[0035] Among them, the camera unit 10 can take pictures and record videos of a specific area, and the PIR device 20 can detect infrared signals in a specific area. When a human body or other heat source enters the detection area of ​​the PIR device 20, the PIR device 20 can sense the change in infrared radiation and generate a signal. When the intensity of the infrared radiation reaches the wake-up threshold of the PIR device 20, the PIR device 20 and the camera unit 10 will be awakened, and the PIR device 20 transmits the signal to the processor of the camera unit 10 for processing. The processor determines whether it is necessary to trigger shooting or recording according to a preset algorithm. If necessary, the camera unit 10 starts shooting or recording, and stores the image in a corresponding storage device.

[0036] At the same time, the camera unit 10 can also control the PIR device 20 through the processor 102, for example, the processor 102 sends an operation instruction to the PIR device 20 to instruct the PIR device 20 to adjust its detection angle, etc. In the embodiment of the present application, the PIR device 20 also includes a PIR sensor 21 and an aperture module 22. In order to enable the camera unit 10 to adjust the detection angle of the PIR device 20 and meet different monitoring requirements of the camera 1, the aperture module 22 is electrically connected to the camera unit 10, receives the driving signal sent by the camera unit 10 when the processor 102 executes the computer program 106, and adjusts the shielding area of ​​the photosensitive surface of the PIR sensor 21 under the control of the driving signal, thereby adjusting the detection angle of the PIR device 20.

[0037] The above-mentioned camera 1 can be applied in a variety of scenarios. For example, in home security, the camera 1 can be installed at key locations such as doorways and windows to prevent intruders; in commercial places, the camera 1 can be used to monitor customer behavior and prevent theft; in the industrial field, the camera 1 can be used to monitor the operating status of equipment and personnel safety on the production line.

[0038] In the application scenario of the embodiment of the present application, the camera 1 can be connected to the terminal device through Wi-Fi, Bluetooth and mobile network (such as 4G, 5G), wherein the terminal device can be a touch-screen mobile phone, a smart phone, a tablet computer, a computer or a portable terminal device. In some application scenarios, the user can adjust the shooting angle and focal length of the camera unit 10, and adjust the sensitivity, detection distance and detection angle of the PIR device 20 on the application by downloading and installing the corresponding application on the terminal device. In addition, the user can also remotely view and control the monitoring screen of the camera unit 10 and the detection range of the PIR device 20 through the application. In some other application scenarios, the user can also set the detection angle of the PIR device 20 to match the shooting angle of the camera unit 10. When the user adjusts the shooting angle or focal length of the camera unit 10, the camera unit 10 will automatically adjust the detection angle of the PIR device 20 to adjust the detection angle of the PIR device 20 to a detection angle that matches the camera unit 10.

[0039] Figure 2 A three-dimensional diagram of a PIR device provided in an embodiment of the present application is shown. Figure 3 An exploded view of a PIR device provided in an embodiment of the present application is shown. Figure 4 FIG. 4 shows an exploded view of the aperture module provided in an embodiment of the present application. Figure 2-Figure 4 As shown, the PIR device 20 includes a PIR sensor 21 and an aperture module 22. The aperture module 22 includes a fixing ring 221, a driving mechanism 222 and a blade 223. The blade 223 is slidably arranged on the fixing ring 221. The driving mechanism 222 is rotatably connected to the blade 223 to drive the blade 223 to slide around the axis of the fixing ring 221. The blade 223 is arranged opposite to the photosensitive surface 211 of the PIR sensor 21 to shield the photosensitive surface 211 of the PIR sensor 21.

[0040] like Figure 3 As shown, the PIR device 20 also includes a circuit board PCB, and the overall structure of the PIR sensor 21 and the aperture module 22 are fixed on the circuit board PCB and are electrically connected to the driving control module of the camera unit 10.

[0041] Specifically, the fixing ring 221 is a structure with a channel for the infrared light source to pass through at the center. The inner ring of the fixing ring 221 can be set to an equilateral polygon, for example, it can be set to an equilateral pentagon or an equilateral hexagon. This application does not specifically limit the shape of the outer ring of the fixing ring 221.

[0042] The number of blades 223 is set to be multiple, for example, it can be set to 5 or 6. The two sides of the multiple blades 223 abut against each other, and are arranged around the axis of the fixed ring 221, so that the multiple blades 223 can jointly cover part of the inner ring of the fixed ring 221. For example, a guide structure (not shown in the figure) can be arranged around the inner ring of the fixed ring 221, and a guide sliding structure is arranged on each blade 223. Through the cooperation of the guide structure and the guide sliding structure, the multiple blades 223 can slide around the axis of the fixed ring 221.

[0043] The driving mechanism 222 can be a gear structure driven by a motor. The driving structure 222 is electrically connected to the driving control module of the camera unit 10 and rotates under the driving signal sent by the driving control module, thereby driving the blade 223 rotatably connected to the driving mechanism 222 to slide around the axis of the fixed ring 221.

[0044] like Figure 4 As shown, a filter, such as a Fresnel filter, is disposed on the photosensitive surface 211 of the PIR sensor 21. By adjusting the shielding area of ​​the photosensitive surface 211 of the PIR sensor 21, the infrared light sources of different angles in the detection area of ​​the PIR sensor 21 leading to the sensing element of the PIR sensor 21 can be limited, thereby realizing the adjustment of the detection angle of the PIR device 20. The PIR sensor 21 is disposed on the side of the blade 223 away from the fixing ring 221, and the photosensitive surface 211 of the PIR sensor 21 is disposed opposite to the blade 223, so that the photosensitive surface 211 of the PIR sensor 21 is disposed opposite to the axis of the fixing ring 221, so that when the blade 223 slides around the axis of the fixing ring 221, the blade 233 can open outward or close inward, thereby increasing or decreasing the shielding area of ​​the photosensitive surface 211 of the PIR sensor 21, thereby adjusting the detection angle of the PIR device 20.

[0045] For example, when the blades 223 are opened outward, that is, the blades 223 are opened from Figure 5 The open state shown opens to Figure 6 In the open state shown, the blades 223 increase the shielding area of ​​the photosensitive surface 211 of the PIR sensor 21 , thereby increasing the detection angle of the PIR device 20 .

[0046] Alternatively, if Figure 2 and Figure 7As shown, the driving mechanism 222 may include a blade driving ring 2221 and a driving assembly 2222, and the blade driving ring 2221 is rotatably connected to the driving assembly 2222. Wherein, the blade driving ring 2221 is coaxially arranged with the fixing ring 221, so that the inner ring axis of the fixing ring 221 and the blade driving ring 2221 can form a channel for the infrared signal to pass through. The blade driving ring 2221 can be a ring gear, or a ring structure with teeth on the outer ring. The driving assembly 2222 may include a motor 2222a and a gear 2222b, and the gear 2222b is sleeved on the driving shaft of the motor 2222a. Wherein, the motor 2222a is electrically connected to the driving control module of the camera unit 10, and the driving shaft of the motor 2222a rotates under the control of the driving signal sent by the driving control module, thereby driving the gear 2222b on the driving shaft to rotate. The driving assembly 2222 is rotatably connected to the blade driving ring 2221, and the gear 2222b may be meshed with the blade driving ring 2221, so that the blade driving ring 2221 can rotate with the rotation of the gear 2222b. The motor 2222a drives the gear 2222b to rotate, and then drives the blade driving ring 2221 to rotate to achieve the sliding of the blade 223, which not only meets the high integration requirements of the PIR device, but also realizes the precise control of the detection angle of the PIR device 20.

[0047] Alternatively, if Figure 7 As shown, in order to enable the blade 223 to increase or decrease the area of ​​the photosensitive surface 211 of the PIR sensor 21, a slide groove 2211 can be provided along the inner ring edge of the fixing ring 221 and around the axis of the fixing ring 221, and a plurality of slide holes 2221a can be provided on the blade driving ring 2221, wherein each slide hole 2221a extends from the inner ring of the blade driving ring 2221 to the outer ring of the blade driving ring 2221, and further, a slider 2231 adapted to the slide groove 2221 is provided on one side of each blade 223, and a slider 2231 adapted to the slide groove 2221 is provided on the other side of each blade 223. 21a is equipped with a sliding rod 2232 that matches with 21a, and the sliding rod 2232 is inserted into the slide hole 2221a, so that the sliding rod 2232 and the slider 2231 of the blade 223 can slide in the slide hole 2221a and the slide groove 2211 respectively when the blade driving ring 2221 rotates, so that all the blades 223 can slide along the slide groove 2211 around the axis of the fixed ring 221, so that all the blades 223 can open outward or close inward at the same time, thereby increasing or decreasing the channel area of ​​the infrared light source and realizing the adjustment of the shielding area of ​​the photosensitive surface 211 of the PIR sensor 21.

[0048] like Figure 1 and Figure 2As shown, in some embodiments, in order to ensure that the blade drive ring 2221 is always coaxial with the fixed ring 221 during the rotation process, and smoothly drive the blade 223 to slide on the fixed ring 221, a limiter 2212 is provided on the fixed ring 221, and the limiter 2212 can limit the position of the blade drive ring 2221, thereby preventing the blade drive ring 2221 from rotating off the axis. It should be noted that the present application does not specifically limit the shape and size of the limiter 2212.

[0049] In some embodiments, after the detection angle of the PIR device 20 is adjusted, in order to ensure that the detection angle of the PIR device 20 is a fixed value, the motor 2222a can use a motor with a gear self-locking function to ensure that the motor 2222a does not regress or slide after the detection angle of the PIR device 20 is adjusted, thereby ensuring that the adjusted detection angle of the PIR device 20 does not change.

[0050] The fixed ring 221 is slidably connected to the blade 223, and the blade 223 is rotationally connected to the driving mechanism 222, so that the blade 223 can slide around the axis of the fixed ring 221 when the driving mechanism 222 rotates, so that the shielding area of ​​the photosensitive surface 211 of the PIR sensor 21 can be automatically adjusted through a simple structure, and the detection angle of the PIR device 20 can be flexibly adjusted at a low cost.

[0051] In order to solve the technical problems existing in the prior art in the process of adjusting the detection angle of the PIR device, the present application provides a method for adjusting the detection angle of the PIR device, which is executed by the camera unit 10 of the camera 1 to adjust the detection angle of the above-mentioned PIR device 20.

[0052] Figure 8 The flowchart of the method for adjusting the detection angle of the PIR device provided in the embodiment of the present application is shown. The method is executed by the camera unit 10 of the camera 1 to adjust the detection angle of the PIR device. Figure 8 As shown, the method comprises the following steps:

[0053] Step S110: Acquire the current detection angle, target detection angle and ambient temperature of the PIR device.

[0054] In an embodiment of the present application, when a user needs to adjust the detection angle of the PIR device, the user can send a detection angle adjustment instruction to the PIR device through an application. After receiving the detection angle adjustment instruction, the PIR device generates a wake-up signal and sends the wake-up signal to the camera unit to wake up the camera unit to obtain the current detection angle and target detection angle of the PIR device.

[0055] Among them, the current detection angle of the PIR device can be the maximum detection angle of the PIR device, that is, when the blades in the aperture module are in a fully open state, the infrared signal can pass through the filter of the PIR sensor unimpeded. In this case, since the camera unit pre-stores the maximum detection angle of the PIR device, the camera unit can directly obtain the current detection angle of the PIR device.

[0056] The current detection angle of the PIR device may also be the detection angle after the PIR device last adjusted the detection angle. In this case, when the PIR device sends the wake-up signal, the current detection angle of the PIR device is sent to the camera unit together.

[0057] The target detection angle is the detection angle of the PIR device that the user wants to obtain. Generally, the target detection angle can be the shooting angle of the shooting unit, or it can be any detection angle input by the user through the application.

[0058] When the user uses the camera for monitoring, when the current detection angle of the PIR device is the maximum detection angle of the PIR device and is inconsistent with the shooting angle of the camera unit, the application can prompt the user on the interface whether to match the detection angle of the PIR device with the shooting angle of the camera unit. If the user chooses to match, the shooting angle of the camera unit is directly obtained and used as the target detection angle. Of course, the user can also set the target detection angle through the application according to their own needs.

[0059] The ambient temperature is the temperature of the surrounding environment when the PIR device is installed and operated. For example, when the PIR device is installed indoors, the ambient temperature is the indoor temperature. When the PIR device is installed in a yard or at a door, the ambient temperature is the outdoor temperature.

[0060] Step S120: determining an angle adjustment value according to the current detection angle and the target detection angle.

[0061] After receiving the current detection angle and target detection angle of the PIR device, the camera unit can calculate the difference between the current detection angle and the target detection angle, and determine the difference as the angle adjustment value of the PIR device. If the current detection angle is P0 and the target detection angle is P1, the angle adjustment value P2 = P0-P1.

[0062] For example, when the current detection angle is 120° and the target detection angle is 90°, the angle adjustment value is 30°, then the detection angle of the PIR device is adjusted from large to small, and the detection angle of the PIR device is gradually adjusted from 120° to 90°; when the current detection angle is 90° and the target detection angle is 120°, the angle adjustment value is -30°, then the detection angle of the PIR device is adjusted from small to large, and the detection angle of the PIR device is gradually adjusted from 90° to 120°.

[0063] Step S130: determining a wake-up threshold corresponding to the PIR device at the target detection angle according to the ambient temperature.

[0064] In PIR technology, the wake-up threshold refers to the infrared signal intensity threshold used to trigger an alarm, wake up the camera to take pictures, record videos, or perform other response actions. When the infrared signal intensity emitted by the human body or other heat source reaches or exceeds the wake-up threshold, the PIR device will be awakened to generate an output signal. Generally, the wake-up threshold of the PIR device can be adjusted to meet different security requirements and environmental conditions. For example, a lower wake-up threshold can increase the sensitivity of the PIR device, making it easier to detect small movements of the human body or other heat sources, but it may also increase the risk of false alarms, while a higher wake-up threshold can reduce false alarms, but may miss some real movements of the human body or other heat sources.

[0065] Generally speaking, the ambient temperature will affect the intensity of infrared radiation, and thus affect the working effect of the camera. Therefore, in order to ensure the working effect of the camera, the wake-up threshold of the PIR device needs to be adjusted appropriately. Taking the room temperature of 25°C as an example, assuming that the wake-up threshold of the PIR device has an upper threshold V1 and a lower threshold V2, since a larger or fast-moving target requires a lower wake-up threshold to wake up the PIR device for target detection, when the infrared signal strength in the detection area of ​​the PIR device is lower than the lower threshold V2, the PIR device cannot be woken up for target detection. When it is higher than the lower threshold V2 and lower than the upper threshold V1, the PIR device may be woken up for target detection, and when it is higher than the upper threshold V1, the PIR device will definitely be woken up for target detection.

[0066] In order to ensure that the detection angle adjustment of the PIR device is not affected by the wake-up threshold interval, that is, to prevent the infrared signal strength from appearing within the wake-up threshold interval, avoid the problem of randomly waking up the PIR device in the process of adjusting the detection angle of the PIR device from the current detection angle to the target detection angle, and ensure that after the detection angle of the PIR device is adjusted according to the angle adjustment value, the real-time detection angle of the PIR device can be infinitely close to the target detection angle, the embodiment of the present application sets corresponding wake-up thresholds for different detection angles and ambient temperatures, thereby improving the accuracy of waking up the PIR device at different detection angles and avoiding the error caused by the wake-up threshold interval.

[0067] Since the temperature will affect the intensity of the infrared signal released by the heat source, for the same heat source, the infrared signal intensity detected by the PIR device at a low ambient temperature cannot wake up the PIR device, but it may wake up at a high ambient temperature. Therefore, in the embodiment of the present application, the ambient temperature corresponds to the upper and lower thresholds of the infrared signal intensity corresponding to the ambient temperature of the PIR device, and the target detection angle corresponds to the wake-up threshold of the PIR device. Affected by environmental factors, at the same ambient temperature, the upper and lower thresholds are the same, and different target detection angles correspond to different wake-up thresholds of the PIR device; at different ambient temperatures, the upper and lower thresholds are different, and the same target detection angle corresponds to different wake-up thresholds of the PIR device. For example, in a 25°C environment, the upper and lower thresholds are V1 and V2 respectively, the wake-up threshold corresponding to target detection angle 1 is V01, and the wake-up threshold corresponding to target detection angle 2 is V02. In a 30°C environment, the upper and lower thresholds are V3 and V4 respectively, and the wake-up threshold corresponding to target detection angle 1 is V03.

[0068] For example, the upper and lower thresholds of the infrared signal strength corresponding to the ambient temperature of the PIR device are obtained, and then the target detection angle, the upper and lower thresholds are substituted into the threshold calculation formula to calculate the wake-up threshold corresponding to the target detection angle.

[0069] For example, the wake-up threshold V0 can be calculated by the following formula:

[0070] V0=P1×(V1-V2) / 100-V2, Formula 1

[0071] Wherein, V1 and V2 represent the upper and lower thresholds of the infrared signal strength corresponding to the ambient temperature of the PIR device, respectively, and V1>100, V1-V2>100, and P1 represents the target detection angle of the PIR device.

[0072] For example, when the target detection angle P1 is 80°, the upper threshold V1 is 180°, and the lower threshold V2 is 45°, the wake-up threshold V0 can be calculated to be 63 by substituting into Formula 1.

[0073] It should be noted that the present application may also determine the wake-up threshold according to other formulas and is not limited to the above formula 1.

[0074] By setting the wake-up threshold, the problem of changes in the wake-up threshold of most PIR devices at different temperatures can be solved, ensuring that in the process of adjusting the detection angle of the PIR device from the current detection angle to the target detection angle, the error between the real-time detection angle when the PIR device is awakened and the target detection angle is minimized.

[0075] Step S140: starting the driving mechanism according to the angle adjustment value to drive the blade to slide around the axis of the fixing ring to change the shielding area of ​​the blade to the photosensitive surface of the PIR sensor until the infrared signal strength value detected by the PIR device is greater than the wake-up threshold.

[0076] Specifically, the camera unit sends a driving signal to the driving mechanism 222 according to the angle adjustment value to drive the driving mechanism 222 to rotate, and then the driving mechanism 222 drives the blade 223 to slide around the axis of the fixed ring 221, so that the blade 223 changes the blocking area of ​​the photosensitive surface 211 of the PIR sensor 21, so as to shield the infrared light source with different incident angles incident on the photosensitive surface 211 of the PIR sensor 21, thereby realizing the adjustment of the detection angle of the PIR device. For example, in the process of adjusting the detection angle of the PIR device from the current detection angle of 120° to the target detection angle of 90°, after determining the angle adjustment value of 30°, the camera unit inputs the angle adjustment value of 30° into the drive control module, and the drive control module generates a drive signal according to the angle adjustment value of 30°, and sends the drive signal to the drive mechanism 222, so that the drive mechanism 222 drives the blades 233 to gradually reduce the area of ​​the photosensitive surface 211 of the PIR sensor 21, and first allows the large-angle infrared signal to enter the energy attenuation area until the infrared signal intensity detected by the PIR device is greater than the current wake-up threshold of the PIR device.

[0077] It can be seen from Formula 1 that the smaller the target detection angle, the smaller the corresponding wake-up threshold of the PIR device at the target detection angle. For example, in the process of adjusting the detection angle of the PIR device from the current detection angle of 120° to the target detection angle of 90°, when the detection angle of the PIR device is 120°, the corresponding wake-up threshold of the PIR device at 120° is V01, and the infrared signal strength detected by the PIR device at 120° cannot reach the wake-up threshold V01, the PIR device cannot be awakened, and the detection angle of the PIR device begins to be adjusted. When the detection of the PIR device is adjusted to 100°, the corresponding wake-up threshold of the PIR device at 100° is V02, and the infrared signal strength detected by the PIR device at 100° still cannot reach the wake-up threshold V02, the PIR device cannot be awakened, and the detection angle of the PIR device continues to be adjusted. When the detection angle of the PIR device is adjusted to 91°, the corresponding wake-up threshold of the PIR device at 91° is V03, and when the infrared signal strength detected by the PIR device at 100° is greater than or equal to the wake-up threshold V03, the PIR device is awakened. In the above example, as the detection angle is adjusted from 120 degrees to 91 degrees, the detection angle gradually decreases, and its corresponding wake-up threshold also gradually decreases, that is, the wake-up threshold V01>V02>V03. When the external infrared signal strength and ambient temperature remain unchanged, the wake-up threshold of the PIR device is gradually reduced as the detection angle decreases, and the infrared signal strength is more likely to meet its wake-up threshold at a small angle, thereby waking up the PIR device.

[0078] Step S150: obtaining a real-time detection angle of the PIR device, where the real-time detection angle is a detection angle determined after the PIR device is awakened.

[0079] After the detection angle of the PIR device is adjusted in step S140, the detection angle of the PIR device may not be adjusted properly due to the inaccurate control of the driving structure 222 by the camera unit during the detection angle adjustment of the PIR device, or the PIR device may be mistakenly awakened due to the activity of a heat source with a large infrared signal intensity in the detection area of ​​the PIR device, resulting in the detection angle of the PIR device not being adjusted properly. In this case, the embodiment of the present application obtains the real-time detection angle of the PIR device after it is awakened, so as to determine whether the detection angle of the PIR device is adjusted properly.

[0080] Step S160: determining whether to continue adjusting the detection angle of the PIR device according to the real-time detection angle and the target detection angle.

[0081] Specifically, the detection angle of the PIR device can be determined by comparing the real-time detection angle with the target detection angle to determine whether the detection angle of the PIR device is adjusted in place, so as to determine whether to continue to adjust the detection angle of the PIR device. For example, when the real-time detection angle is greater than or less than the target detection angle, the detection angle of the PIR device can be adjusted until the real-time detection angle determined by the PIR device is equal to the target detection angle; when the real-time detection angle is equal to the target detection angle, it proves that the detection angle of the PIR device has been adjusted in place, and the detection angle of the PIR device can be stopped.

[0082] Optionally, in order to improve the adjustment efficiency of the detection angle of the PIR device, it is possible to directly determine whether the detection angle of the PIR device is adjusted in place by calculating the angle difference between the real-time detection angle and the target detection angle, such as Fig. 9 As shown, step S160 may specifically include the following steps:

[0083] Step S161: Obtain a preset error range.

[0084] Step S162: Determine the angle difference between the real-time detection angle and the target detection angle.

[0085] Step S163: Determine whether the angle difference is within a preset error range, if so, execute step S164, if not, execute step S165.

[0086] Step S164: stop adjusting the detection angle of the PIR device.

[0087] Step S165: Continue to adjust the detection angle of the PIR device according to the angle difference, and go to step S162.

[0088] The preset error range is a small deviation between the actual detection angle of the PIR device obtained after adjusting the detection angle and the target detection angle, and can be set to, for example, 0 to 2°. As long as it is within this range, it can be determined that the adjustment is in place.

[0089] Specifically, when the angle difference is within the preset error range, for example, 0°≤angle difference≤2°, it proves that the detection angle of the PIR device is adjusted in place, and the detection angle of the PIR device is stopped. When the angle difference is not within the preset error range, for example, the angle difference>2°, it proves that the detection angle of the PIR device is not adjusted in place, and the detection angle of the PIR device continues to be adjusted. Specifically, the driving mechanism 222 is started according to the angle difference to drive the blade 223 to shield more infrared light sources incident on the photosensitive surface 211 of the PIR sensor 21, so as to continue to adjust the detection angle of the PIR device, and the real-time detection angle of the PIR device is continuously obtained during the adjustment process, and the detection angle of the PIR device is adjusted by the angle difference between the real-time detection angle and the target detection angle, until the angle difference is within the preset error range.

[0090] Through the real-time detection angle determined by the PIR device after being awakened, the adjustment degree of the detection angle of the PIR device can be timely grasped, so that the detection angle of the PIR device can be corrected in time when the detection angle of the PIR device is not adjusted in place, thereby avoiding the detection angle adjustment of the PIR device from being affected by external environmental factors and its own components, and accurately adjusting the detection angle of the PIR device to the target detection angle.

[0091] The method for adjusting the detection angle of a PIR device provided in an embodiment of the present application determines an angle adjustment value by using the current detection angle of the PIR device and the target detection angle. The driving mechanism 222 can be started according to the angle adjustment value to drive the blade 223 to slide around the axis of the fixing ring 221, thereby changing the shielding area of ​​the blade 223 on the photosensitive surface 211 of the PIR sensor 21, thereby adjusting the detection angle of the PIR device. The wake-up threshold corresponding to the PIR device at the target detection angle is determined by the target detection angle. In the process of adjusting the detection angle of the PIR device from the current detection angle to the target detection angle, the detection angle of the PIR device can be gradually adjusted to the target detection angle by the infrared signal strength detected by the PIR device reaching the wake-up threshold. By acquiring the real-time detection angle determined after the PIR device is awakened, and determining the detection angle adjustment status of the PIR device by using the real-time detection angle and the target detection angle, it can be further determined whether the detection angle of the PIR device needs to be corrected. Through the above method, the camera can realize automatic adjustment of the detection angle of the PIR device, which not only makes the detection angle of the PIR device match the monitoring angle of the camera unit, improves the accuracy and efficiency of camera monitoring, and avoids wasting battery power, but also allows users to adjust the detection angle of the PIR device according to specific needs to meet different monitoring needs of the camera.

[0092] In order to avoid the camera unit constantly adjusting the detection angle of the PIR device, Fig.10FIG. 2 is a flow chart of a method for adjusting the detection angle of a PIR device provided by another embodiment of the present application, and the method is executed by the camera unit 10 of the camera 1. Figure 7 As shown, the method comprises the following steps:

[0093] Step S210: Acquire the current detection angle, target detection angle and ambient temperature of the PIR device.

[0094] Step S220: determining an angle adjustment value according to the current detection angle and the target detection angle.

[0095] Step S230: determining a wake-up threshold corresponding to the PIR device at the target detection angle according to the ambient temperature.

[0096] Step S240: Start the first timer.

[0097] Step S250: starting the driving mechanism according to the angle adjustment value to drive the blades to slide around the axis of the fixing ring.

[0098] Step S260: Acquire the real-time detection angle of the PIR device, where the real-time detection angle is the detection angle determined after the PIR device is awakened.

[0099] Step S270: Obtain a preset error range.

[0100] Step S280: Determine the angle difference between the real-time detection angle and the target detection angle.

[0101] Step S290: adjusting the real-time detection angle until the angle difference is within a preset error range or the first timer times out, and then stopping adjusting the detection angle of the PIR device.

[0102] In order to ensure that the detection angle of the PIR device is adjusted to the right position within the timing time of the first timer, the timing time of the first timer can be set longer, for example, it can be set to 10s, 15s or 20s, etc., to ensure that the camera unit has enough time to adjust the detection angle of the PIR device.

[0103] Taking the timing time of the first timer of 10s as an example, before the first timer times out, when the infrared signal strength detected by the PIR device reaches the current wake-up threshold of the PIR device, the PIR device is awakened. At this time, since the first timer has not timed out, it can be determined whether the angle difference between the real-time detection angle and the target detection angle is within the preset error range (for example, 0-2°). When the angle difference is within the preset error range, that is, 0°≤angle difference≤2°, the detection angle of the PIR device is stopped from being adjusted; when the angle difference is not within the preset error range, that is, the angle difference>2°, the detection angle of the PIR device is continuously adjusted according to the angle difference until the angle difference is within the preset error range or the first timer times out.

[0104] When the first timer times out, that is, when the timing time of the first timer is 10s, it is determined again whether the angle difference between the real-time detection angle and the target detection angle is within a preset error range (for example, 0-2°). When 0°≤angle difference≤2°, it indicates that the detection angle of the PIR device has been adjusted in place, and the detection angle of the PIR device is stopped from being adjusted; when the angle difference is greater than 2°, it indicates that the detection angle of the PIR device has not been adjusted in place within the timing time of the first timer, and the detection angle of the PIR device is stopped from being adjusted, and a fault instruction is generated, and then the fault instruction is uploaded to the application of the terminal device to notify the user that the detection angle adjustment of the PIR device has failed, so that the user can check the camera unit, the PIR device, or the signal transmission function between the camera unit and the PIR device.

[0105] The specific implementation process, principles and references of the above steps Figure 8 and Fig. 9 The embodiments shown will not be described in detail here.

[0106] In order to ensure that the camera unit has enough time to adjust the detection angle of the PIR device and to avoid the camera unit constantly adjusting the detection angle of the PIR device when the first timer fails, Fig.11 FIG. 4 is a flow chart showing a method for adjusting the detection angle of a PIR device provided in another embodiment of the present application. Fig.11 As shown, the above step S290 includes the following steps:

[0107] Step S291: when the first timer times out, determine whether the angle difference is within a preset error range, if so, execute step S292: stop adjusting the detection angle of the PIR device, if not, execute step S293.

[0108] Step S293: Determine whether the timing time of the first timer is received, if so, execute step S294, if not, execute step S295.

[0109] Step S294: Start the second timer and go to step S260 until the angle difference is within the preset error range.

[0110] Step S295: Restart the first timer and go to step S260.

[0111] Under normal circumstances, when the first timer reaches the timing time, the camera unit will receive the timing time of the first timer.

[0112] Therefore, when the first timer times out, if the camera unit does not receive the timing time of the first timer, it indicates that the first timer is not working properly and may fail. At this time, the camera unit restarts the first timer, and obtains the real-time detection angle of the PIR device within the timing time of the first timer, and re-adjusts the detection angle of the PIR device according to the angle difference between the real-time detection angle and the target detection angle.

[0113] When the camera unit receives the timing of the first timer, it indicates that the first timer is working normally. At this time, since the detection angle of the PIR device has not been adjusted within the timing of the first timer, the second timer is started, and the real-time detection angle of the PIR device is obtained within the timing of the second timer. The detection angle of the PIR device is re-adjusted according to the angle difference between the real-time detection angle and the target detection angle until the angle difference is within the preset error range or the second timer times out.

[0114] It should be noted that in order to ensure that the detection angle of the PIR device is adjusted within the timing time of the second timer, the timing time of the second timer can be set longer, for example, it can be set to 10s, 15s or 20s, etc., to ensure that the camera unit has enough time to adjust the detection angle of the PIR device.

[0115] In some embodiments, when the camera unit receives the timing time of the first timer, it can also determine whether the first timer is working properly by judging whether the timing time of the first timer is equal to the set timing time. For example, the set timing time is 10s, when the timing time of the first timer received is 10s, it indicates that the first timer is working properly and no failure has occurred, and the second timer is started to continue to adjust the detection angle of the PIR device; when the timing time of the first timer received is 12s, it indicates that the first timer is not working properly and a failure may occur, and the first timer is restarted to continue to adjust the detection angle of the PIR device.

[0116] Optionally, in order to prevent the camera unit from constantly adjusting the detection angle of the PIR device, please continue to refer to Fig.11 ,like Fig.11 As shown, the above step S294 includes the following steps:

[0117] Step S296: When the second timer times out, determine whether the angle difference is within a preset error range, if so, execute step S297, if not, execute step S298.

[0118] Step S297: Stop adjusting the detection angle of the PIR device.

[0119] Step S298: stop adjusting the detection angle of the PIR device and generate a fault instruction, where the fault instruction is used to indicate that the detection angle adjustment of the PIR device has failed.

[0120] Taking the timing time of the second timer of 15s as an example, before the second timer times out, it is possible to continuously determine whether the angle difference between the real-time detection angle and the target detection angle is within a preset error range (e.g., 0-2°) during the process of adjusting the detection angle of the PIR device. When the angle difference is within the preset error range, that is, 0°≤angle difference≤2°, the detection angle of the PIR device is stopped from being adjusted; when the angle difference is not within the preset error range, that is, the angle difference>2°, the detection angle of the PIR device is continuously adjusted according to the angle difference until the angle difference is within the preset error range or the second timer times out.

[0121] When the second timer times out, that is, when the timing time of the second timer is 10s, it is determined again whether the angle difference between the real-time detection angle and the target detection angle is within a preset error range (for example, 0-2°). When 0°≤angle difference≤2°, it indicates that the detection angle of the PIR device has been adjusted in place, and the detection angle of the PIR device is stopped from being adjusted; when the angle difference is greater than 2°, it indicates that the detection angle of the PIR device is still not adjusted in place within the timing time of the second timer, and the detection angle of the PIR device is stopped from being adjusted, and a fault instruction is generated, and then the fault instruction is uploaded to the application of the terminal device to notify the user that the detection angle adjustment of the PIR device has failed, so that the user can check the camera unit, the PIR device, or the signal transmission function between the camera unit and the PIR device.

[0122] An embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for adjusting the detection angle of the PIR device is implemented.

[0123] An embodiment of the present application provides a computer program, which can be executed by a processor to implement the above-mentioned method embodiment for adjusting the detection angle of the PIR device.

[0124] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned method for adjusting the detection angle of the PIR device is implemented.

[0125] In several embodiments provided in the present application, if any function is implemented in the form of a software function module / unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, part or all of the technical solution of the present application 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, server or other electronic device) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (RandomAccess Memory, RAM), disk or optical disk and other media that can store computer program code.

[0126] The algorithm or display provided here are not inherently related to any specific computer, virtual system or other equipment. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the present application embodiment is not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the present application described here, and the above description of specific languages ​​is to disclose the best mode of implementation of the present application.

[0127] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the claims that list several devices, several units or modules in these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

[0128] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for adjusting the detection angle of a PIR device, It is characterized in that The method is applied to a camera, wherein the camera comprises a PIR device, wherein the PIR device comprises a fixing ring, a driving mechanism, a blade and a PIR sensor, wherein the blade is slidably arranged on the fixing ring, the driving mechanism is rotatably connected to the blade to drive the blade to slide around the axis of the fixing ring, and the blade is arranged opposite to a photosensitive surface of the PIR sensor to shield the photosensitive surface of the PIR sensor; The method comprises: Get the current detection angle, target detection angle and ambient temperature of the PIR device; Determining an angle adjustment value according to the current detection angle and the target detection angle; Determine, according to the ambient temperature, a wake-up threshold corresponding to the PIR device at the target detection angle; The driving mechanism is started according to the angle adjustment value to drive the blade to slide around the axis of the fixing ring, so as to change the shielding area of ​​the blade on the photosensitive surface of the PIR sensor, until the infrared signal strength value detected by the PIR device is greater than the wake-up threshold; Obtaining a real-time detection angle of the PIR device, where the real-time detection angle is a detection angle determined after the PIR device is awakened; Determine whether to continue adjusting the detection angle of the PIR device according to the real-time detection angle and the target detection angle.

2. The method according to claim 1, It is characterized in that The determining whether to continue adjusting the detection angle of the PIR device according to the real-time detection angle and the target detection angle further includes: Get the preset error range; Determining an angle difference between the real-time detection angle and the target detection angle; Determining whether the angle difference is within the preset error range; If the angle difference is within the preset error range, stop adjusting the detection angle of the PIR device; If the angle difference is not within the preset error range, the detection angle of the PIR device continues to be adjusted according to the angle difference until the angle difference is within the preset error range.

3. The method according to claim 1, It is characterized in that The step of starting the driving mechanism according to the angle adjustment value to drive the blade to slide around the axis of the fixing ring includes: Starting a first timer, the first timer is used to indicate the duration of adjusting the detection angle of the PIR device; The driving mechanism is activated according to the angle adjustment value to drive the blade to slide around the axis of the fixing ring; The determining whether to continue adjusting the detection angle of the PIR device according to the real-time detection angle and the target detection angle includes: Get the preset error range; Determining an angle difference between the real-time detection angle and the target detection angle; The real-time detection angle is adjusted until the angle difference is within the preset error range or the first timer times out, and the detection angle of the PIR device is stopped from being adjusted.

4. The method according to claim 3, It is characterized in that The method further comprises: When the first timer times out, determining whether the angle difference is within the preset error range; If the angle difference is not within the preset error range, determining whether the timing time of the first timer is received; If the timing time of the first timer is received, the second timer is started, and the step of obtaining the real-time detection angle of the PIR device is performed until the angle difference is within the preset error range; wherein the second timer is used to indicate the duration of adjusting the detection angle of the PIR device; If the timing time of the first timer is not received, the first timer is restarted and the process proceeds to the step of obtaining the real-time detection angle of the PIR device.

5. The method according to claim 4, It is characterized in that The method further comprises: When the second timer times out, determining whether the angle difference is within the preset error range; If the angle difference is within the preset error range, stop adjusting the detection angle of the PIR device; If the angle difference is not within the preset error range, the detection angle of the PIR device is stopped from being adjusted, and a fault instruction is generated, where the fault instruction is used to indicate that the detection angle adjustment of the PIR device has failed.

6. The method according to claim 1, It is characterized in that The driving mechanism comprises a blade driving ring and a driving assembly, wherein the blade driving ring is coaxially arranged with the fixing ring, and the blade driving ring is slidably connected to a side of the blade away from the fixing ring, and the driving assembly is rotatably connected to the blade driving ring; The step of starting the driving mechanism according to the angle adjustment value to drive the blade to slide around the axis of the fixing ring comprises: The driving assembly is activated according to the angle adjustment value to drive the blade driving ring to rotate, thereby driving the blade to slide around the axis of the fixing ring.

7. The method according to claim 6, It is characterized in that The driving assembly includes a motor and a gear, wherein the gear is sleeved on a driving shaft of the motor and meshes with an edge of the blade driving ring; Starting the driving assembly according to the angle adjustment value to drive the blade driving ring to rotate includes: The motor is started according to the angle adjustment value, which in turn drives the drive shaft to drive the gear to rotate, so that the gear drives the blade drive ring to rotate.

8. The method according to claim 6, It is characterized in that A slideway hole is provided on the blade driving ring, a slideway groove is provided on the axis of the upper ring of the fixing ring, a sliding rod adapted to the slideway hole and a sliding block adapted to the slideway groove are respectively provided on both sides of the blade, and the sliding rod is inserted into the slideway hole; The sliding rod and the sliding block slide in the slideway hole and the slide groove respectively under the rotation of the blade driving ring, so that the blade slides around the axis of the fixing ring.

9. A camera, It is characterized in that The camera comprises a camera unit and a PIR device, wherein the camera unit is communicatively connected with the PIR device; The camera unit includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the method for adjusting the detection angle of the PIR device according to any one of claims 1 to 8, and adjusts the detection angle of the PIR device.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method for adjusting the detection angle of the PIR device according to any one of claims 1 to 8 is implemented.