Video recording control method of camera device, controller, camera device and storage medium
By using positioning elements in the camera device to detect the target position and trigger recording in the key areas, the problem of short battery life of the camera device is solved, and longer recording time and higher battery life are achieved.
Patent Information
- Application Number
- CN202510470162.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-08
AI Technical Summary
The existing camera devices have a short battery life in the recording state, and the cost of replacing or upgrading the battery is high, which cannot meet the long-term battery life needs.
By setting the position information of the positioning element to detect the target in the imaging device, recording is only started when a target event is triggered in the key area in the monitoring area. The positioning element such as a radar or ultrasonic sensor determines whether the target is located in the first area, and stops recording when the target leaves, reducing unnecessary recording time.
The battery life of the camera device is improved, unnecessary recording time is reduced, energy consumption is reduced, and the integrity and waterproofness of the camera device are enhanced.
Smart Images

Figure CN120282021A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of security video surveillance, and particularly to a video recording control method, a controller, a camera device, and a storage medium for a camera device. Background Art
[0002] With the development of computer technology, mobile Internet technology, and image processing technology, camera devices are widely used in various security surveillance systems. To meet the requirements of uninterrupted operation of security surveillance systems and considering various complex situations in practical applications, camera devices are required to have a certain battery life. For a camera device powered by a battery, if the camera device continuously records video, the battery power of the camera device will be consumed too quickly, resulting in a short battery life of the camera device. If a large-capacity battery is configured for the camera device to increase the battery life of the camera device, since this method involves hardware improvement of the camera device, the cost is relatively high. How to extend the battery life of the camera device without replacing or upgrading the battery of the camera device is a problem that needs to be solved. Summary of the Invention
[0003] In view of the above problems, the embodiments of the present application provide a video recording control method, a controller, a camera device, and a storage medium for a camera device, which are used to solve the problem of short battery life of the camera device existing in the prior art.
[0004] According to one aspect of the embodiments of the present application, a video recording control method for a camera device is provided. The method includes: determining whether a target event is triggered in a first area within the monitoring area of the camera device, where the first area is smaller than the monitoring area; and when it is determined that a target event is triggered in the first area, controlling the camera device to start recording video for the monitoring area.
[0005] In an optional manner, the determining whether a target event is triggered in a first area within the monitoring area of the camera device includes: detecting a target within the monitoring area through a positioning element and determining the position information of the target; determining whether the target is located in the first area according to the position information; and if the target is located in the first area, determining that a target event is triggered in the first area.
[0006] In an optional manner, the if the target is located in the first area, determining that a target event is triggered in the first area includes: if the target is located within the first area, determining a first motion law of the target based on the position information of the target corresponding to multiple moments determined by the positioning element; determining whether the first motion law satisfies a preset motion law; and when it is determined that the first motion law satisfies the preset motion law, determining that a target event is triggered within the first area.
[0007] In an alternative manner, determining that a target event is triggered in the first region when the target is located in the first region includes: if the target is located within the first region, determining a first motion pattern of the target based on the position information corresponding to the target at multiple moments determined by the positioning element; determining whether the first motion pattern is consistent with a preset second motion pattern, where the second motion pattern is a pattern contrary to the motion characteristics of the monitored target; and if the first motion pattern is inconsistent with the second motion pattern, determining that a target event is triggered within the first region.
[0008] In an alternative manner, after determining that a target event is triggered in the first region and controlling the imaging device to start recording the monitored area, the method further includes: when it is determined that the target leaves the first region, controlling the imaging device to stop recording the monitored area.
[0009] In an alternative manner, the first region is a region in the coordinate system of the positioning element, and the first region is determined through the following steps: obtaining a configured image after a user configures a second region in the image, where the image is an image obtained by the imaging device capturing the monitored area; selecting a plurality of first reference points and a plurality of first edge points from the configured image, where the first reference points are points of a reference object and the first edge points are points on the edge of the second region; determining the first region in the coordinate system of the positioning element according to the plurality of first reference points and the plurality of first edge points; and determining whether the target is located in the first region according to the position information includes: determining whether the target is located in the first region in the coordinate system of the positioning element according to the position information, where the position information is position information in the coordinate system of the positioning element.
[0010] In an alternative manner, determining the first region in the positioning element coordinate system according to the plurality of first reference points and the plurality of first edge points includes: for each first edge point, determining a first distance ratio corresponding to the first edge point according to the configured image, where the first distance ratio is a ratio of distance information between the first edge point and each of the first reference points among the plurality of first reference points; determining a plurality of second reference points corresponding to the plurality of first reference points in the positioning element coordinate system; determining a second edge point corresponding to the first edge point in the positioning element coordinate system, where a second distance ratio corresponding to the second edge point is equal to the first distance ratio, and the second distance ratio is a ratio of distance information between the second edge point and each of the second reference points among the plurality of second reference points; after determining the plurality of second edge points corresponding to the plurality of first edge points, determining the first region in the positioning element coordinate system according to the plurality of second edge points.
[0011] In an alternative manner, the positioning element includes a radar, and the first reference point is a point of a static object.
[0012] According to another aspect of the embodiments of the present application, a controller is provided, and the controller is configured to execute the video recording control method of the imaging device as described above.
[0013] According to still another aspect of the embodiments of the present application, an imaging device is provided, and the imaging device includes a positioning element, an image acquisition unit, and the controller as described above; the positioning element is configured to detect a target in a monitoring area of the imaging device, determine position information of the target, and transmit the position information to the controller; the controller is configured to control the image acquisition unit to record video of the monitoring area.
[0014] According to still another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the video recording control method of the imaging device as described above is implemented.
[0015] In the embodiments of the present application, by determining whether a target event is triggered in the first area, the camera device is controlled to start recording the monitoring area only when a target event is triggered in the first area, thereby reducing unnecessary recording and improving the battery life of the camera device. Specifically, since the camera device includes a positioning element for detecting the position information of the target, the position information of the target located in the monitoring area is detected by the positioning element, and it is determined whether the target is located in the first area according to the position information. If the target is located in the first area, the camera device is controlled to start recording the monitoring area. Since the camera device is controlled to record the monitoring area only when the target is located in the first area, and when the target is located in other areas of the monitoring area except the first area, the camera device is not controlled to record the monitoring area, unnecessary recording is reduced, and the battery life of the camera device is improved.
[0016] The above description is only an overview of the technical solutions of the embodiments of the present application. In order to be able to understand the technical means of the embodiments of the present application more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features and advantages of the embodiments of the present application more obvious and understandable, the specific embodiments of the present application are given below. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings are only used to illustrate the embodiments and are not considered to be a limitation of the present application. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0018] Figure 1 A schematic diagram of the monitoring area and the first area provided by the embodiments of the present application is shown;
[0019] Figure 2 A schematic diagram of the camera device provided by the embodiments of the present application is shown;
[0020] Figure 3 A flowchart of the video recording control method of the camera device provided by the embodiments of the present application is shown;
[0021] Figure 4 Shows Figure 3 A sub-step flowchart of step 110 in;
[0022] Figure 5 A flowchart of the method for determining the first area provided by the embodiments of the present application is shown;
[0023] Figure 6 A schematic diagram of the positional relationship of the first reference point, the first edge point, the second reference point, and the second edge point in the coordinate system provided by the embodiments of the present application is shown;
[0024] Figure 7The figure shows a schematic structural diagram of a video recording control device of a camera device provided by an embodiment of the present application. Detailed implementation manners
[0025] 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.
[0026] To increase the battery life of the camera device, an induction unit capable of sensing infrared radiation, such as a Passive Infrared (PIR) unit, can be provided in the camera device. The induction unit is used to detect whether a human body or an animal enters the monitoring area of the camera device. Only after the induction unit senses an infrared heat source radiated by a human body or an animal in the monitoring area, the camera device is triggered to record the monitoring area. If the induction unit does not detect a human body or an animal in the monitoring area, the camera device is not triggered to record the monitoring area, thereby reducing the recording duration of the camera device for the monitoring area and increasing the battery life of the camera device.
[0027] When the manufacturer of the camera device integrates the induction unit into the camera device, it is necessary to synchronously set the induction area of the induction unit. To ensure that the camera device can be applied to diverse application scenarios and meet the needs of different users, the induction area of the induction unit is usually designed to be an area that matches the monitoring area of the camera device (for example, the induction area is usually set to be the same as the monitoring area), so as to ensure that the induction unit can sense the human body and animals in the monitoring area, and then trigger the camera device to record the monitoring area to monitor the activities of the human body and animals in the monitoring area. After recording, the camera device can save the recorded content to the user device or the server, and / or send a prompt message to the user device.
[0028] For a camera device provided with an induction unit, although the camera device is triggered to record the monitoring area only when the induction unit senses a human body or an animal in the induction area, thereby improving the battery life of the camera device, since the induction area is set by the manufacturer of the camera device and the user cannot customize the induction area when using the camera device, if the user is not interested in some areas in the monitoring area (i.e., non-key monitoring areas where no recording is required when a human body or an animal enters these areas), but these non-key monitoring areas are still within the induction area, then when the induction unit senses a human body or an animal in the non-key monitoring area, the camera device will also be triggered to record, thereby increasing unnecessary recording and reducing the battery life of the camera device.
[0029] Figure 1 The figure shows a schematic diagram of a monitoring area and a first area provided by an embodiment of the present application. AsFigure 1 As shown, the monitoring area 1 is the field of view of the imaging device, and this range is jointly determined by the installation position and angle of the imaging device, etc. The first area 2 is within the monitoring area 1 of the imaging device, and the first area 2 is smaller than the monitoring area 1. Among them, the first area 2 is the key monitoring area of the user, that is, only when a human body or an animal enters the first area 2, does the imaging device need to record the monitoring area 1. If the human body or animal is in other areas of the monitoring area 1 except the first area 2, there is no need to record the monitoring area 1, achieving the effect of accurate recording.
[0030] As introduced above, for an imaging device provided with an induction unit, the manufacturer usually sets the induction area of the induction unit as the monitoring area 1. However, when a human body or an animal is in other areas of the monitoring area 1 except the first area 2, the imaging device will be triggered to record the monitoring area 1 after the induction unit senses the human body or animal, thus increasing unnecessary recordings and resulting in a reduction in the battery life of the imaging device.
[0031] It can be understood that the key monitoring areas of different users may be different. Therefore, when the manufacturer of the imaging device sets the induction area of the induction unit, it cannot meet the personalized needs of different users at the same time.
[0032] Based on the above considerations, in order to improve the battery life of the imaging device, the present application proposes an imaging device and a video recording control method for the imaging device. Figure 2 The figure shows a schematic diagram of the imaging device provided by the embodiment of the present application. As Figure 2As shown, the imaging device 3 includes a battery 10, a switch unit 20, a controller 30, a positioning element 40, an image acquisition unit 50, an audio acquisition unit 60, and a photoresistor 70. Specifically, the controller 30 may include a slave control unit 31 and a master control unit 32. Among them, the slave control unit 31 may be a microcontroller unit (MCU), and the master control unit 32 may be a system on chip (SOC). To improve the battery life of the imaging device 3, under normal circumstances, the master control unit 32 is in a sleep state, and the slave control unit 31 is in a working state. The positioning element 40 transmits the detected position information of the target to the slave control unit 31. When the slave control unit 31 processes the position information and determines that there is a target event triggered in the first area 2 based on the position information, the slave control unit 31 wakes up the master control unit 32, so that the master control unit 32 is converted from the sleep state to the working state. When the master control unit 32 is in the working state, the master control unit 32 controls the imaging device 3 to start recording. Through the above settings, the energy consumption of the imaging device 3 can be reduced, and the battery life of the imaging device 3 can be improved. Specifically, the positioning element 40 detects the target located in the monitoring area 1, obtains the position information of the target, and transmits the position information to the slave control unit 31, so that the slave control unit 31 determines whether the target is located in the first area 2. Among them, the target refers to a human body, an animal, a vehicle, etc. The positioning element 40 may be a radar, an ultrasonic sensor, a microwave sensor, or other devices that can detect and locate the specific position of the target. The battery 10 provides working power to the slave control unit 31, and the battery 10 also provides working power to the master control unit 32 through the switch unit 20. The slave control unit 31 controls the switch unit 20 to control the master control unit 32 to access the working power provided by the battery 10 through the switch unit 20. For example, if the slave control unit 31 determines that the target is located in the first area 2, it controls the switch unit 20 to conduct, so that the master control unit 32 accesses the working power provided by the battery 10 through the switch unit 20 and enters the working state. After the master control unit 32 enters the working state, it controls the image acquisition unit 50 to acquire images of the monitoring area and obtains the image data acquired by the image acquisition unit 50, and controls the audio acquisition unit 60 to acquire audio of the monitoring area and obtains the audio data acquired by the audio acquisition unit 60. After the master control unit 32 obtains the image data and audio data of the monitoring area, it encodes the data into a video stream and stores the video stream in the storage unit ( Figure 2 not shown in the figure) of the imaging device 3 or in a server communicatively connected to the imaging device 3, so that the user can subsequently playback the video stream data stored in the storage unit or the server.
[0033] Among them, the photoresistor 70 is a cadmium sulfide (CdS) photoresistor, which is a resistor made using the photoelectric effect of semiconductor materials. Its resistance value changes with the intensity of the incident light. Specifically, the CdS photoresistor works based on the internal photoelectric effect. When light irradiates the CdS material, electrons in the valence band absorb photon energy and transition to the conduction band, becoming free electrons, and at the same time, holes are generated. The appearance of electron-hole pairs makes the resistivity decrease. The stronger the light, the more electron-hole pairs are generated by light, and the lower the resistance value. The CdS photoresistor can be used to monitor the ambient light intensity, thereby adjusting the gain of the camera to ensure that the brightness and contrast of the image remain consistent when the light changes. In a darker environment, the gain increases; in a stronger light environment, the gain decreases. By detecting the ambient light, the CdS photoresistor can help the camera system determine the opening time of the shutter, thereby controlling the exposure amount to ensure that the image is not overexposed or underexposed.
[0034] Figure 3 FIG. shows a flowchart of a video recording control method for a camera device provided by an embodiment of the present application. Among them, this method is executed by Figure 2 the provided camera device 3. As Figure 3 shown, this method includes the following steps:
[0035] Step 110: Determine whether a target event is triggered in the first area 2. If so, go to step 120; if not, repeat this step to continuously monitor whether a target event is triggered in the first area.
[0036] Figure 4 FIG. shows Figure 3 a schematic sub-step flow diagram of step 110 in Figure 4 FIG. As
[0037] shown, step 110 includes the following steps 101 to step 104.
[0038] In an embodiment of the present invention, the positioning element 40 is a radar. The radar sends detection information to each position in the monitoring area 1. The signals reflected by targets located at different positions to the radar are different. Therefore, the radar can determine the position information of the target based on the signals reflected back by the target. After the radar detects the position information of the target, it transmits this position information to the slave control unit 31. Therefore, in this step, specifically, the slave control unit 31 detects the target in the monitoring area 1 through the radar and determines the position information of the target.
[0039] In another embodiment of the present invention, the positioning element 40 is an ultrasonic sensor. Since an ultrasonic sensor has a built-in transducer (usually a piezoelectric crystal), when a voltage is applied, the piezoelectric crystal vibrates and generates ultrasonic pulses. These ultrasonic pulses propagate in a medium (such as air, water, or a solid) at a certain frequency (usually between several tens of kilohertz and several hundreds of kilohertz). When the ultrasonic waves encounter an object, they are reflected back from the surface of the object. This process is similar to an echo, that is, the sound waves are reflected back after encountering an obstacle. The transducer in the ultrasonic sensor can not only emit ultrasonic waves but also receive the reflected ultrasonic waves. When the reflected wave reaches the sensor, the piezoelectric crystal converts the sound wave into an electrical signal. The sensor records the time when the ultrasonic pulse is emitted and the time when the reflected wave is received. Since the propagation speed of the sound wave in the medium is known (for example, approximately 343 m / s in air at 20 °C), the distance between the sensor and the target can be calculated by the following formula: Distance = (Reflected wave reception time - Ultrasonic wave emission time) × Sound speed / 2. Through the above steps, the ultrasonic sensor can obtain the distance information of the target relative to the sensor. If multiple ultrasonic sensors are used to form an array, or a mechanical device is combined to make a single sensor emit ultrasonic waves in different directions, the position information of the target in two-dimensional or three-dimensional space can be determined.
[0040] Step 102: Determine whether the target is located in the first area 2 according to the position information. If so, go to step 103; if not, go to step 104.
[0041] Among them, as introduced above, the first area 2 is a key monitoring area preset by the user. Since the first area 2 is preset, in this step, after the slave control unit 31 determines the position information of the target through the positioning element 40, it can directly determine whether the target is located within the first area 2. For example, if the position information of the target and the position information of the first area 2 are both coordinate information under the same coordinate system (such as the positioning element coordinate system established based on the positioning element 40), the slave control unit 31 can determine whether the target is located within the first area 2 by judging whether the coordinates of the target belong to the coordinates within the first area 2.
[0042] Step 103: Determine that a target event is triggered in the first area.
[0043] Among them, if the target is located within the first area 2, it is determined that a target event is triggered in the first area 2.
[0044] Step 104: Determine that no target event is triggered in the first area.
[0045] Among them, if the target is not located within the first area 2, it is determined that no target event is triggered in the first area 2.
[0046] To improve the accuracy of determining whether a target event is triggered in the first region, it is possible to determine whether a target event is triggered in the first region through the following steps a1 to a3.
[0047] Step a1: Determine the first motion law of the target based on the position information of the target corresponding to multiple moments determined by the positioning element 40.
[0048] In the embodiment of the present application, the positioning element 40 will detect the position information of the target located in the monitoring region in real time and transmit it to the slave control unit 31. In this step, the slave control unit 31 determines the first motion law of the target according to the position information of the same target at multiple different moments.
[0049] Step a2: Determine whether the first motion law satisfies a preset motion law.
[0050] Among them, the preset motion law is a law that conforms to the motion characteristics of the monitoring target. For example, if a person needs to be monitored, since a person can perform behaviors such as standing still, wandering, walking, running, or jumping, in the embodiment of the present application, the preset motion laws include a standing still law, a wandering law, a walking law, a running law, and a jumping law, etc.
[0051] Within a preset time period, if the distance moved by the target is less than or equal to the preset still threshold, it can be determined that the target is performing a standing still behavior; within a preset time period, if the distance moved by the target is greater than or equal to the preset running threshold, it can be determined that the target is performing a running behavior; within a preset time period, if the distance moved by the target is greater than the preset still threshold and less than the preset running threshold, it can be determined that the target is performing a walking behavior; within a preset time period, if the position height of the target changes, it can be determined that the target is performing a jumping behavior; within a preset time period, if the target repeatedly passes through the same position (that is, the position information of the target at multiple non-adjacent different moments is the same), it can be determined that the target is performing a wandering behavior.
[0052] Therefore, in this step, specifically, the preset motion law can be set as follows: within the preset duration, the distance that the target moves is less than or equal to the preset static threshold; or within the preset duration, the distance that the target moves is greater than or equal to the preset running threshold; or within the preset duration, the distance that the target moves is greater than the preset static threshold and less than the preset running threshold; or within the preset duration, the distance by which the position height of the target changes is greater than or equal to the preset jumping threshold; or at multiple non-adjacent different moments within the preset duration, the position information of the target is the same. Among them, the preset duration, the preset static threshold, the preset running threshold, and the preset jumping threshold can all be set as needed. For example, the preset duration can be set to 30s, 1min, 2min, etc.; the preset static threshold can be set to 3cm, 5cm, 10cm, etc.; the preset running threshold can be set to 30cm, 60cm, 80cm, etc.; the preset jumping threshold can be set to 5cm, 10cm, 20cm, etc.
[0053] If the first motion law satisfies that the distance that the target moves within the preset duration is less than or equal to the preset static threshold, it is determined that the first motion law satisfies the preset motion law. If the first motion law satisfies that the distance that the target moves within the preset duration is greater than or equal to the preset running threshold, it is determined that the first motion law satisfies the preset motion law. If the first motion law satisfies that the distance that the target moves within the preset duration is greater than the preset static threshold and less than the preset running threshold, it is determined that the first motion law satisfies the preset motion law. If the first motion law satisfies that the distance by which the position height of the target changes within the preset duration is greater than or equal to the preset jumping threshold, it is determined that the first motion law satisfies the preset motion law. If the first motion law satisfies that the position information of the target is the same at multiple non-adjacent different moments within the preset duration, it is determined that the first motion law satisfies the preset motion law.
[0054] Step a3: When it is determined that the first motion law satisfies the preset motion law, it is determined that there is a target event triggered in the first area 2. When it is determined that the first motion law does not satisfy the preset motion law, it is determined that there is no target event triggered in the first area 2.
[0055] Among them, if the first motion law satisfies the preset motion law, it indicates that the target belongs to the target that needs to be monitored. Therefore, at this time, it is determined that there is a target event triggered in the first area, and the camera device needs to start recording the monitoring area. If the first motion law does not satisfy the preset motion law, it indicates that the target does not belong to the target that needs to be monitored. Therefore, at this time, it is determined that there is no target event triggered in the first area, and there is no need for the camera device to record the monitoring area.
[0056] In an embodiment of the present invention, it is also possible to determine whether there is a target event triggered in the first area through the following steps b1 to b3.
[0057] Step b1: Determine the first motion law of the target based on the position information of the target corresponding to multiple moments determined by the positioning element 40.
[0058] For the principle and specific implementation method of this step, reference can be made to step a1, which will not be elaborated here.
[0059] Step b2: Determine whether the first motion law is consistent with the preset second motion law.
[0060] Among them, the second motion law is a law that is contrary to the motion characteristics of the monitored target. Specifically, the second motion law refers to the motion law of the target when there is no need to control the camera device 3 to record the monitoring area 1. For example, if people and animals running need to be monitored, the second motion law can be the motion laws of stationary people and animals and other objects in motion except people and animals, such as the law of raindrops falling when it is raining, the law of the movement of leaves when the wind blows the leaves, etc.
[0061] Step b3: If the first motion law is inconsistent with the second motion law, determine that a target event is triggered in the first area 2. If the first motion law is consistent with the second motion law, determine that no target event is triggered in the first area 2.
[0062] Among them, if the first motion law is inconsistent with the second motion law, it means that the target belongs to the target that needs to be monitored. Therefore, at this time, it is determined that a target event is triggered in the first area, and the camera device needs to start recording the monitoring area. If the first motion law is consistent with the second motion law, it means that the target does not belong to the target that needs to be monitored. Therefore, at this time, it is determined that no target event is triggered in the first area, and there is no need for the camera device to record the monitoring area.
[0063] When there are situations such as raindrops falling and leaves moving in the first area, since the positioning element 40 can detect targets such as raindrops and leaves in the first area when detecting targets, but raindrops and leaves do not pose a threat to the safety of the monitoring area. Therefore, when only situations such as rain and leaf movement occur in the first area and no people or animals enter the first area, there is no need to control the camera device 3 to record the monitoring area. Therefore, in the embodiment of the present application, after the slave control unit 31 determines the first movement law of the target through the position information of the target at multiple moments, it judges whether the first movement law of the target is consistent with the second movement law. For example, it judges whether the first movement law of the target belongs to movement laws such as rain and leaf movement. If the first movement law of the target belongs to the second movement law, the camera device 3 is not controlled to record the monitoring area. Only when the first movement law of the target does not belong to the second movement law, the camera device 3 is controlled to record the monitoring area, thereby avoiding the situation that the camera device 3 is also controlled to record the monitoring area when only scenes such as rain and leaf movement occur in the first area and no people or animals enter the first area, reducing unnecessary recording, and further improving the battery life of the camera device 3.
[0064] Step 120: Control the camera device 3 to start recording the monitoring area 1.
[0065] Specifically, if the slave control unit 31 determines that the target is located in the first area 2, the slave control unit 31 controls the switch unit 20 to conduct, so that the main control unit 32 accesses the working power supply provided by the battery 10 through the switch unit 20, thereby entering the working state, and then controls the image acquisition unit 50 to acquire images of the monitoring area 1, controls the audio acquisition unit 60 to acquire audio of the monitoring area 1, and obtains the image data acquired by the image acquisition unit 50 and the audio data acquired by the audio acquisition unit 60, and encodes the obtained image data and audio data into a video stream.
[0066] In the embodiment of the present application, by determining whether a target event is triggered in the first area, the camera device is controlled to start recording the monitoring area only when a target event is triggered in the first area, thereby reducing unnecessary recording and increasing the battery life of the camera device 3. Specifically, since the camera device 3 includes a positioning element 40 for detecting the position information of the target, after the positioning element 40 detects the position information of the target located in the monitoring area 1 and transmits the position information to the slave control unit 31, the slave control unit 31 determines whether the target is located in the first area 2 based on the position information. If the target is located in the first area 2, the switch unit 20 is controlled to conduct, so that the main control unit 32 accesses the working power supply provided by the battery 10 through the switch unit 20, and thus the main control unit 32 enters the working state to control the camera device 3 to start recording the monitoring area 1. Since the camera device 3 is controlled to record the monitoring area 1 only when the target is located in the first area 2, when the target is located in other areas of the monitoring area 1 except the first area 2, the camera device 3 is not controlled to record the monitoring area 1, thereby reducing unnecessary recording and increasing the battery life of the camera device 3.
[0067] Moreover, since the PIR needs to detect the infrared heat source of the target through a lens, the lens will reduce the integrity of the overall structure design of the camera device. In the embodiment of the present application, by using the positioning device 40 (such as a radar) instead of the PIR, since the antenna of the radar can be directly integrated into the interior of the camera device, the integrity of the camera device is better, and there will be no problem of poor waterproofness at the joint between the lens and the camera device.
[0068] To further increase the battery life of the camera device 3, in the embodiment of the present application, after step 120, it further includes: when it is determined that the target leaves the first area 2, controlling the camera device 3 to stop recording the monitoring area 1. Among them, when the slave control unit 31 obtains the position information of the target sent by the positioning element 40, if it is determined according to the position information of the target that the target has left the first area, the switch unit 20 is controlled to be in the off state to disconnect the working power supply accessed by the main control unit 32 through the switch unit 20, so that the main control unit 32 is in the off state, and thus the camera device 3 stops recording the monitoring area. In the embodiment of the present application, when the target leaves the first area, by timely controlling the camera device 3 to stop recording the monitoring area, the battery life of the camera device 3 can be increased.
[0069] When the positioning element 40 is a radar, in order to improve the accuracy of the result obtained when determining whether the target is located in the first area 2 Figure 5 shows a flowchart of a method for determining the first area provided by the embodiment of the present application. As Figure 5 shown, the first area 2 is determined through the following steps:
[0070] Step 210: Obtain the configured image after the user configures the second area in the image.
[0071] Wherein, the image is an image obtained by the imaging device 3 photographing the monitoring area 1. In this step, specifically, the imaging device 3 transmits the image to an electronic device (such as a mobile phone, a computer, etc.) communicatively connected to the imaging device 3. After the electronic device displays the image, the user sets a second area on the image to form a configured image, and then the electronic device transmits the configured image to the imaging device 3, and the imaging device 3 can obtain the configured image. Wherein, the second area is an area that the user sets according to needs for key monitoring.
[0072] Step 220: Select a plurality of first reference points and a plurality of first edge points from the configured image.
[0073] Specifically, the main control unit 32 selects a plurality of first reference points from the reference objects in the configured image, and selects a plurality of first edge points from the edge of the second area. Wherein, the reference object refers to an object in the configured image. Preferably, the reference object is a static object, such as a tree, a building, etc. in the image. The plurality of first reference points can be points belonging to the same reference object, or points belonging to different reference objects. The number of the first reference points and the first edge points can be determined according to needs and is not limited herein. For example, 5, 8 or 10 first reference points can be selected, and 10, 15 or 20 first edge points can be selected.
[0074] For the convenience of subsequently determining the first area 2 based on the first reference points, in the embodiment of the present application, preferably, the first reference point is a representative point of the reference object. For example, the first reference point is the highest point, the lowest point, the center point, the leftmost point or the rightmost point, etc. of the reference object.
[0075] Step 230: Determine the first area 2 in the radar coordinate system according to the plurality of first reference points and the plurality of first edge points.
[0076] Specifically, this step includes the following steps c1 to c4:
[0077] Step c1: For each first edge point, determine the first distance ratio corresponding to the first edge point according to the calibrated image.
[0078] Among them, the first distance ratio is the ratio of the distance information between the first edge point and each of the multiple first reference points. For example, there are 5 first reference points and 10 first edge points. In this step, for each first edge point (for example, the i-th first edge point among the 10 first edge points), the ratio of the distance information between the i-th first edge point and each of the 5 first reference points is determined to obtain the first distance ratio corresponding to the i-th first edge point. Where i is a positive integer and i ≤ 10. The distance information can be the spacing or the number of pixel points. Accordingly, the first distance ratio can be determined based on the spacing between the i-th first edge point and each first reference point in the calibrated image, or based on the number of pixel points between the i-th first edge point and each first reference point.
[0079] In order to improve the accuracy of the first region determined based on the first edge points in the subsequent process, in the embodiments of the present application, preferably, the first distance ratio corresponding to each first edge point in the horizontal direction and the vertical direction is determined respectively. Taking the i-th first edge point as an example, for example, in the horizontal direction, in the calibrated image, the spacings between the i-th first edge point and each of the first reference points are 1 cm, 2 cm, 3 cm, 4 cm, and 5 cm respectively, then the first distance ratio corresponding to the i-th first edge point is 1:2:3:4:5. Or in the horizontal direction, in the calibrated image, the numbers of pixel points between the i-th first edge point and each of the first reference points are 50, 60, 70, 80, and 90 respectively, then the first distance ratio corresponding to the i-th first edge point is 50:60:70:80:90. The first distance ratio in the vertical direction is similar to that in the horizontal direction. Therefore, the determination method of the first distance ratio in the vertical direction can refer to the determination method of the first distance ratio in the horizontal direction, which will not be elaborated here.
[0080] Step c2: Determine multiple second reference points corresponding to the multiple first reference points in the radar coordinate system.
[0081] Among them, since the radar can obtain the signals reflected by objects at various positions after emitting detection signals in various directions within the monitoring area 1, and then can draw a three-dimensional scene of the monitoring area 1 in the radar coordinate system based on the received reflected signals. Therefore, after the main control unit 32 selects multiple first reference points from the configuration image, it transmits the position information of the multiple first reference points to the slave control unit 31, and the slave control unit 31 can determine the second reference points corresponding to the first reference points in the three-dimensional scene of the monitoring area 1 in the radar coordinate system. For example, taking one of the first reference points as an example, if the first reference point is the highest point of a tree located in the upper left corner of the monitoring area 1, after the main control unit 32 transmits this information to the slave control unit 31, the slave control unit 31 can directly determine the highest point of the tree located in the upper left corner in this three-dimensional scene, and this point is the second reference point corresponding to this first reference point.
[0082] Step c3: Determine the second edge point corresponding to the first edge point in the radar coordinate system.
[0083] Among them, the second distance ratio corresponding to each second edge point is equal to the first distance ratio corresponding to the first edge point corresponding to this second edge point (for example, the second distance ratio corresponding to the i-th second edge point is equal to the first distance ratio corresponding to the i-th first edge point), and the second distance ratio is the ratio of the distance information between the second edge point and each second reference point among the multiple second reference points.
[0084] Among them, the second distance ratio is similar to the first distance ratio. The main difference is that the first distance ratio is determined in the calibration image, and the second distance ratio is determined in the radar coordinate system. Therefore, the second distance ratio will not be elaborated here.
[0085] After determining the second reference point corresponding to the first reference point in the radar coordinate system, by determining the point that satisfies the first distance ratio with the second reference point in the radar coordinate system, this point is the second edge point corresponding to the first edge point corresponding to this first distance ratio in the radar coordinate system.
[0086] Figure 6 The figure shows a schematic diagram of the positional relationship between the first reference point, the first edge point, the second reference point, and the second edge point provided in the embodiment of the present application in the coordinate system. Among them, here only four first reference points, one first edge point, four second reference points corresponding to the four first reference points, and the second edge point corresponding to this first edge point are taken as examples for introduction, and the quantities of the first reference point, the first edge point, the second reference point, and the second edge point are not limited. As Figure 6 shown, Figure 6 the left figure in it is the coordinate system established based on the calibration image, and the right figure is the radar coordinate system. The four first reference points are respectively Q 11 、Q 12 、Q13 and Q 14 , the first edge point is P1. In the coordinate system established based on the calibrated image, horizontally, the first edge point P1 and the first first reference point Q 11 , the second first reference point Q 12 , the third first reference point Q 13 and the fourth first reference point Q 14 The number of pixel points between them are d11, d12, d13, and d14 respectively. Vertically, the first edge point P1 and the first first reference point Q 11 , the second first reference point Q 12 , the third first reference point Q 13 and the fourth first reference point Q 14 The number of pixel points between them are h11, h12, h13, and h14 respectively. Among them, d11:d12:d13:d14 is the first distance ratio corresponding to the first edge point P1 in the horizontal direction. h11:h12:h13:h14 is the first distance ratio corresponding to the first edge point P1 in the vertical direction.
[0087] In the radar coordinate system, determine the first first reference point Q 11 , the second first reference point Q 12 , the third first reference point Q 13 and the fourth first reference point Q 14 corresponding first second reference point Q 21 , the second second reference point Q 22 , the third second reference point Q 23 and the fourth second reference point Q 24 . Then, in order to determine the second edge point P2 corresponding to the first edge point P1, determine the horizontal direction in the radar coordinate system and the first second reference point Q 21 , the second second reference point Q 22 , the third second reference point Q 23 and the fourth second reference point Q 24 The spacings are d21, d22, d23, and d24 respectively, and in the vertical direction with the first second reference point Q 21 , the second second reference point Q 22 , the third second reference point Q 23 and the fourth second reference point Q 24Points with spacings of h21, h22, h23, and h24 respectively, and this point is the second edge point P2 corresponding to the first edge point P1. Among them, d21:d22:d23:d24 is the second distance ratio corresponding to the second edge point P2 in the horizontal direction. h21:h22:h23:h24 is the second distance ratio corresponding to the second edge point P2 in the vertical direction. And d21:d22:d23:d24 = d11:d12:d13:d14, h21:h22:h23:h24 = h11:h12:h13:h14.
[0088] Step c4: After determining multiple second edge points corresponding to multiple first edge points, determine the first region according to the multiple second edge points in the radar coordinate system.
[0089] Among them, in this step, the region surrounded by the second edge points can be determined as the first region.
[0090] Since the position information of the target determined by the radar is usually the position information in the radar coordinate system, in the embodiment of the present application, by determining the first region in the radar coordinate system, since the position information of the target and the first region are both in the radar coordinate system, the slave control unit 31 can directly and accurately determine whether the target is located within the first region according to the position information of the target.
[0091] Moreover, in the embodiment of the present application, in order to determine the first region in the radar coordinate system, by determining multiple first reference points and multiple first edge points in the configuration image, and then determining the first distance ratio corresponding to each first edge point, and then determining the second reference point corresponding to the first reference point in the radar coordinate system, based on the second reference point and the first distance ratio, the second edge point corresponding to the first edge point can be accurately determined in the radar coordinate system, thereby improving the accuracy of the first region determined according to the second edge point in the radar coordinate system, and also improving the accuracy of the judgment result when judging whether the target is located within the first region.
[0092] It should be noted that when the positioning element 40 is not a radar, but an ultrasonic sensor, a microwave sensor, or other devices that can detect and locate the specific position of the target, the method of determining the coordinate system of the positioning element is similar to the method of determining the radar coordinate system above. Therefore, the methods of determining the coordinate systems of the ultrasonic sensor, the microwave sensor, and other devices that can detect and locate the specific position of the target can refer to the method of determining the radar coordinate system above, and will not be elaborated here.
[0093] Figure 7 Shows the structural schematic diagram of the video control device of the camera device provided by the embodiment of the present application. As Figure 7As shown in the figure, the video recording control device 300 of the camera device includes: a determination module 301 and a video recording control module 302. Among them, the determination module 301 is used to determine whether a target event is triggered in a first area within the monitoring area of the camera device, and the first area is smaller than the monitoring area. The video recording control module 302 is used to control the camera device to start video recording of the monitoring area when it is determined that a target event is triggered in the first area.
[0094] The video recording control device 300 of the camera device provided in this embodiment is used to execute the technical solution of the video recording control method of the camera device in the foregoing method embodiment, and its implementation principle and technical effects are similar, and will not be described in detail here.
[0095] It should be noted that the video recording control device of the camera device provided in this embodiment further includes other modules for executing the respective steps of the foregoing method embodiment of the video recording control method of the camera device, which will not be described in detail here.
[0096] The embodiment of the present application provides a computer-readable storage medium, and the storage medium stores a computer program, and when the computer program is executed by a processor, it implements the foregoing method embodiment of the video recording control method of the camera device.
[0097] The embodiment of the present application provides a computer program, and the computer program can be executed by a processor to implement the foregoing method embodiment of the video recording control method of the camera device.
[0098] The embodiment of the present application provides a computer program product, and the computer program product includes a computer program, and when the computer program is executed by a processor, it implements the foregoing method embodiment of the video recording control method of the camera device.
[0099] In several embodiments provided by 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 such an understanding, all or part 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 several instructions for causing a computer device (which may be an electronic device such as a personal computer, a server, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. And the foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store computer program codes.
[0100] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. A variety of general-purpose systems may also be used in conjunction with the teachings based herein. The structure required to construct such systems will be apparent from the above description. Additionally, the embodiments of the present application are not directed to any particular programming language. It should be understood that the content of the present application described herein can be implemented using a variety of programming languages, and the description of a particular language above is for the purpose of disclosing the best mode of the present application.
[0101] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a claim listing several devices, several units or modules of these devices may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
[0102] The above-described embodiments merely represent several implementation manners of the present application, and the description thereof is relatively specific and detailed, but should not be construed as a limitation on the patent scope of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, 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 appended claims.
Claims
1. A video control method for a camera device, characterized in that The method includes: Determining whether a target event is triggered in a first area within the monitoring area of the imaging device, where the first area is smaller than the monitoring area; When it is determined that a target event is triggered in the first area, controlling the imaging device to start recording the monitoring area.
2. The method according to claim 1, characterized in that, The determining whether a target event is triggered in a first area within the monitoring area of the imaging device includes: Detecting a target within the monitoring area through a positioning element and determining the position information of the target; Determining whether the target is located in the first area according to the position information; If the target is located in the first area, determining that a target event is triggered in the first area.
3. The method according to claim 2, wherein If the target is located in the first area, determining that a target event is triggered in the first area includes: If the target is within the first area, determining a first motion law of the target based on the position information corresponding to the target at multiple moments determined by the positioning element; Determining whether the first motion law satisfies a preset motion law; When it is determined that the first motion law satisfies the preset motion law, determining that a target event is triggered within the first area.
4. The method according to claim 2, wherein If the target is located in the first area, determining that a target event is triggered in the first area includes: If the target is within the first area, determining a first motion law of the target based on the position information corresponding to the target at multiple moments determined by the positioning element; Determining whether the first motion law is consistent with a preset second motion law, where the second motion law is a law contrary to the motion characteristics of the monitoring target; If the first motion law is inconsistent with the second motion law, determining that a target event is triggered within the first area.
5. The method according to claim 1, characterized in that, After controlling the imaging device to start recording the monitoring area when it is determined that a target event is triggered in the first area, the method further includes: When it is determined that the target leaves the first area, controlling the imaging device to stop recording the monitoring area.
6. The method according to claim 2, wherein The first area is an area in the positioning element coordinate system, and the first area is determined through the following steps: Obtaining a configured image after a user configures a second area in the image, where the image is an image obtained by the imaging device shooting the monitoring area; Selecting a plurality of first reference points and a plurality of first edge points from the configured image, where the first reference points are points of a reference object and the first edge points are points on the edge of the second area; Determining the first area in the positioning element coordinate system according to the plurality of first reference points and the plurality of first edge points; The determining whether the target is located in the first area according to the position information includes: Determining whether the target is located in the first area in the positioning element coordinate system according to the position information, where the position information is the position information in the positioning element coordinate system.
7. The method according to claim 6, wherein The determining the first area in the positioning element coordinate system according to the plurality of first reference points and the plurality of first edge points includes: For each first edge point, determine a first distance ratio corresponding to the first edge point according to the configured image, where the first distance ratio is a ratio of distance information between the first edge point and each of the plurality of first reference points among the plurality of first reference points; Determine a plurality of second reference points corresponding to the plurality of first reference points in the positioning element coordinate system; Determine a second edge point corresponding to the first edge point in the positioning element coordinate system, where the second distance ratio corresponding to the second edge point is equal to the first distance ratio, and the second distance ratio is a ratio of distance information between the second edge point and each of the plurality of second reference points among the plurality of second reference points; After determining the plurality of second edge points corresponding to the plurality of first edge points, determine the first region according to the plurality of second edge points in the positioning element coordinate system.
8. The method according to claim 6, characterized in that, The positioning element includes a radar; The first reference point is a point of a static object.
9. A controller, characterized in that, The controller is used to execute the video recording control method of the imaging device according to any one of claims 1 to 8.
10. An imaging device, characterized in that, The imaging device includes a positioning element, an image acquisition unit, and a controller according to claim 9; The positioning element is used to detect a target in the monitoring area of the imaging device, determine the position information of the target, and transmit the position information to the controller; The controller is used to control the image acquisition unit to record video of the monitoring area.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the video recording control method of the imaging device according to any one of claims 1 to 8.
Citation Information
Cited By
Image processing method and electronic equipment
CN121640397A
Image processing method and electronic device
CN121640397B