A gimbal control method and device, electronic device and storage medium
By controlling the rotation speed of the pan-tilt unit by comparing differences in video images, the problem of constant rotation speed of dome cameras when monitoring the same scene is solved, resulting in better monitoring display effects and marking of difference areas, and improving the intelligence and automation capabilities of monitoring equipment.
Patent Information
- Application Number
- CN202211607513.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2042-12-14
AI Technical Summary
In existing technologies, dome cameras cannot adjust their rotation speed according to changes in the image when monitoring the same scene, resulting in poor monitoring and display effects and failing to effectively mark differences in the image.
By comparing the differences in video images captured at different times, the pan-tilt unit is controlled to rotate at different speeds. For areas with differences, the rotation speed is reduced, the display time is extended, and the areas with differences are marked.
It improves the monitoring display effect, enhances the attention to changes in the screen and the intuitiveness of differences in areas, and strengthens the intelligence and automation functions of the monitoring equipment.
Smart Images

Figure CN116249005B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video surveillance, and in particular to a pan-tilt-zoom (PTZ) control method, apparatus, electronic device, and storage medium. Background Technology
[0002] Cameras are commonly used devices in the field of intelligent security video surveillance. With the development of video surveillance systems, features such as intelligence and unattended operation have become major trends in the development of surveillance systems. As front-end devices, cameras play a crucial role in monitoring systems. In conjunction with back-end software, they can achieve more intelligent and automated functions. Taking a dome camera as an example, to ensure that the dome camera can move in all directions, it needs to be mounted on a pan-tilt unit. The movement of the camera is driven by the motor and drive chain on the pan-tilt unit, enabling flexible monitoring of the area to be monitored.
[0003] After setting the pan-tilt-zoom (PTZ) speed of the dome camera, it typically rotates at a constant speed during cruise, without adjusting the speed based on changes in the monitoring image when repeatedly passing the same location. However, users are often more concerned about changing images / scenes and therefore desire a reduced PTZ speed to extend the display time, allowing sufficient time for detailed observation. Furthermore, the technology lacks differential analysis and labeling to display differences in changing images / scenes, resulting in low intuitiveness of image differences and poor monitoring image display quality.
[0004] Currently, no effective solution has been proposed for improving the monitoring display effect when video images of the same scene captured by monitoring equipment at different times show differences. Summary of the Invention
[0005] This application provides a PTZ control method, device, electronic device, and storage medium to at least address the problem in related technologies of how to improve the monitoring display effect when video images of the same scene collected by monitoring equipment at different times show differences.
[0006] In a first aspect, embodiments of this application provide a gimbal control method.
[0007] In some embodiments, the method is applied to video surveillance equipment and includes the following steps:
[0008] Determine the first capture position, acquire the first video image captured at the first capture position at the first moment, and the second video image captured at the first capture position at the second moment;
[0009] If the second video image is identical to the first video image, control the gimbal to rotate at the first target speed;
[0010] If there is a difference between the second video image and the first video image, the gimbal is controlled to rotate at a second target speed, wherein the second target speed is less than the first target speed.
[0011] In some embodiments, the step of controlling the gimbal to rotate at a second target speed when there is a difference between the first video image and the second video image includes:
[0012] Determine a second capture position located after the first capture position in the rotation direction of the gimbal, and acquire a third video image captured at the second capture position;
[0013] Based on the third video image and the second video image, determine whether there is a first moving target in the first monitoring area between the first capture position and the second capture position;
[0014] If the first moving target is determined to exist within the first monitoring area, the pan-tilt unit is controlled to rotate at a third target speed, wherein the third target speed is less than the second target speed.
[0015] In some embodiments, the method further includes:
[0016] Determine the first preset position of the gimbal, control the gimbal to stay at the first preset position for a first preset time and acquire multiple preset position video images;
[0017] Based on the multiple preset position video images, determine whether there is a second moving target in the second monitoring area corresponding to the first preset position of the PTZ;
[0018] If it is determined that the second moving target exists in the second monitoring area, the pan-tilt unit is controlled to stay at the first pan-tilt unit preset position for a second preset time.
[0019] In some embodiments, after determining whether a second moving target exists within a second monitoring area corresponding to the first pan-tilt-zoom preset position based on the plurality of preset position video images, the method further includes:
[0020] If it is determined that there is no second moving target in the second monitoring area, a fourth video image is acquired at the preset position of the first PTZ at the third moment, and a fifth video image is acquired at the preset position of the first PTZ at the fourth moment.
[0021] If there is a difference between the fifth video image and the fourth video image, the gimbal is controlled to stay at the first gimbal preset position for a third preset time, wherein the third preset time is less than the second preset time.
[0022] If the fifth video image is identical to the fourth video image, control the gimbal to rotate to the first capture position.
[0023] In some embodiments, the method further includes:
[0024] In the case where the second video image differs from the first video image, a first difference region is marked in the first video image to determine the first difference video image, and a second difference region is marked in the second video image to determine the second difference video image;
[0025] Store the first difference video image and the second difference video image.
[0026] In some embodiments, after storing the first difference video image and the second difference video image, the following is further included:
[0027] A second gimbal preset position is determined such that at least one of the first capture positions is included on the path of the gimbal rotating from the second gimbal preset position to the first gimbal preset position.
[0028] Based on the distance between each of the first capture positions and the preset position of the second gimbal, the first difference video image and the second difference video image corresponding to each of the first capture positions are sequentially displayed on the display device.
[0029] In some embodiments, the method further includes:
[0030] In response to a gimbal preset position switching command, the gimbal is controlled to rotate from the second gimbal preset position to the first gimbal preset position;
[0031] When the pan-tilt unit rotates to the first capture position, an alarm message is sent, and other devices besides the video surveillance device are activated.
[0032] Secondly, embodiments of this application provide a gimbal control device.
[0033] In some embodiments, the device includes an image acquisition module, a first control module, and a second control module:
[0034] The image acquisition module is used to determine the first capture position, acquire a first video image captured at the first capture position at a first moment, and a second video image captured at the first capture position at a second moment.
[0035] The first control module is used to control the gimbal to rotate at a first target speed when there is no difference between the second video image and the first video image;
[0036] The second control module is used to control the gimbal to rotate at a second target speed when there is a difference between the second video image and the first video image, wherein the second target speed is less than the first target speed.
[0037] Thirdly, embodiments of this application provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the gimbal control method as described in the first aspect above.
[0038] Fourthly, embodiments of this application provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the gimbal control method as described in the first aspect above.
[0039] Compared to related technologies, the PTZ control method, apparatus, electronic device, and storage medium provided in this application, by determining a first capture position, acquiring a first video image captured at the first capture position at a first moment, and a second video image captured at the first capture position at a second moment, and comparing the differences between the second video image and the first video image, controls the PTZ to rotate at a first target speed when there is no difference between the second video image and the first video image, and controls the PTZ to rotate at a second target speed when there is a difference between the second video image and the first video image, wherein the second target speed is less than the first target speed, solves the problem of how to improve the monitoring display effect when there are differences in the video images of the same scene captured by the monitoring device at different times, and improves the monitoring display effect.
[0040] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0041] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0042] Figure 1This is a hardware structure block diagram of a terminal for a gimbal control method according to an embodiment of this application;
[0043] Figure 2 This is a flowchart of a gimbal control method according to an embodiment of this application;
[0044] Figure 3 This is a flowchart of another gimbal control method according to an embodiment of this application;
[0045] Figure 4 This is a flowchart of another gimbal control method according to an embodiment of this application;
[0046] Figure 5 This is a flowchart of a gimbal control method according to a preferred embodiment of this application;
[0047] Figure 6 This is a structural block diagram of a gimbal control device according to an embodiment of this application. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application. Furthermore, it is understood that although the efforts made in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, modifications to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0049] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0050] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application means two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The terms “first,” “second,” “third,” etc., used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0051] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. Taking running on a terminal as an example, Figure 1 This is a hardware structure block diagram of the terminal of the gimbal control method according to an embodiment of the present invention. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0052] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the gimbal control method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0053] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0054] This embodiment provides a gimbal control method. Figure 2 This is a flowchart of a gimbal control method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0055] Step S201: Determine the first capture position, acquire the first video image captured at the first capture position at the first moment, and the second video image captured at the first capture position at the second moment.
[0056] Taking a spherical camera mounted on a pan-tilt unit as an example, as the pan-tilt unit rotates, the spherical camera simultaneously monitors the area it passes through. Multiple preset positions can be pre-set along the pan-tilt unit's rotation path. The first capture position is determined to be a position between two of these preset positions. Each time the pan-tilt unit rotates to the first capture position, the camera captures (collects) a video image. In this way, the first video image captured at the first capture position at the first moment and the second video image captured at the first capture position at the second moment are obtained.
[0057] The gimbal's rotation is periodic. Each rotation cycle can be called a cycle, which can repeatedly cycle between two preset positions (each cycle's rotation angle is less than 360 degrees), or a cycle can be completed after the gimbal rotates 360 degrees. Therefore, the first moment and the second moment can be the moment when the gimbal passes the first capture position in different cycle periods. For example, the second moment is the moment when the gimbal passes the first capture position in the current cycle, and the first moment is the moment when the gimbal passes the first capture position in the previous cycle. Furthermore, the cycle periods corresponding to the first and second moments are not necessarily continuous; they can also be intervals, such as the first and third cycle periods, or the second and fifth cycle periods. Also, the cycle period corresponding to the second moment is not necessarily the current cycle period. For example, if the current cycle is the fifth cycle, the first moment could be the moment when the gimbal passed the first capture position in the second cycle period, or the moment when the gimbal passed the first capture position in the fourth cycle period.
[0058] In step S202, if there is no difference between the second video image and the first video image, control the gimbal to rotate at the first target speed.
[0059] Compare the second video image with the first video image to determine if the features of the two images are the same. If the second video image and the first video image are indistinguishable, it means that there is no target that needs special attention in the monitoring area corresponding to the first capture position. Then, control the pan-tilt unit to rotate at a higher first target speed to quickly pass through and improve efficiency.
[0060] Step S203: If there is a difference between the second video image and the first video image, control the gimbal to rotate at a second target speed, wherein the second target speed is less than the first target speed.
[0061] When the second video image differs from the first video image, it indicates that a discrepancy area / target requiring close monitoring has appeared within the monitored area corresponding to the first capture position. Therefore, the pan-tilt unit (PTZ) is controlled to rotate at a lower speed relative to the second target to facilitate user observation and improve the monitoring display effect. The speed of the second target is less than the speed of the first target; for example, if the speed of the first target is V, the speed of the second target is V / 2. Furthermore, the PTZ is constantly rotating during the comparison and processing of the acquired video images. Therefore, when the PTZ is controlled, it often has already rotated a certain angle; that is, the PTZ will only be controlled after the comparison result is obtained.
[0062] Through the above steps, this embodiment of the application selects video images of the same monitoring area collected at different times for comparison. For monitoring areas with no change / difference, the pan-tilt unit (PTZ) is controlled to rotate quickly to improve efficiency. For monitoring areas with change / difference, the PTZ is controlled to rotate at a lower speed, extending the image display time and facilitating user observation of the different areas / targets. This optimizes the PTZ control speed, improves the efficiency of PTZ operation, and enhances the monitoring display effect when video images of the same scene collected at different times show differences.
[0063] In some embodiments, the method further includes the following after step S203:
[0064] Step S204: Determine the second capture position located after the first capture position in the rotation direction of the gimbal, and acquire the third video image captured at the second capture position.
[0065] Determine the second capture position, located after the first capture position, in the rotation direction of the gimbal. Continuing from the previous steps, when the gimbal rotates to the second capture position at the second target speed, acquire the third video image captured at the second capture position. Obviously, the third video image can be a video frame several frames after the second video image.
[0066] Step S205: Based on the third video image and the second video image, determine whether there is a first moving target within the first monitoring area corresponding to the first capture position and the second capture position.
[0067] Based on the third video image and the second video image, a moving target detection algorithm can be used to calculate whether a moving target appears in the second video image and the third video image, thereby determining whether a first moving target exists in the first monitoring area corresponding to the first capture position and the second capture position.
[0068] Step S206: If it is determined that there is a first moving target in the first monitoring area, control the pan-tilt unit to rotate at the speed of the third target, wherein the speed of the third target is less than the speed of the second target.
[0069] Once a moving target is identified within the first monitoring area, and considering that moving targets inherently possess speed and are often personnel / vehicles requiring closer monitoring, the pan-tilt unit (PTZ) is controlled to rotate at a lower target speed. For example, if the second target's speed is V / 2, the third target's speed is V / 4. Furthermore, when the comparison results are obtained, the PTZ has actually rotated a certain position, turning a certain angle relative to the video image acquisition position. This allows for recording the target's movement trend and PTZ parameters, facilitating rapid subsequent rotation to a designated position.
[0070] Through the above steps, this embodiment of the application controls the pan-tilt unit to rotate at a lower speed in monitoring areas where there are active targets, making it easier for users to carefully observe key objects of interest and improving the monitoring display effect.
[0071] This embodiment also provides a gimbal control method. Figure 3 This is a flowchart of another gimbal control method according to an embodiment of this application, such as... Figure 3 As shown, based on steps S201 to S206, the process further includes the following steps:
[0072] Step S301: Determine the first preset position of the PTZ, control the PTZ to stay at the first preset position for a first preset time and acquire multiple preset position video images.
[0073] A pan-tilt-zoom (PTZ) preset position refers to a location on the PTZ's rotation path that is pre-set according to requirements for monitoring, capturing, and recording images. Several preset positions are typically set as needed. The process involves determining the first preset PTZ position, controlling the PTZ to remain at that position for a first preset duration, and capturing multiple video images from that preset position. Furthermore, multiple preset video images can be stored. For example, the first preset duration could be one second, during which three preset video images of the monitored area corresponding to the preset position are captured.
[0074] Step S302: Based on multiple preset position video images, determine whether there is a second moving target in the second monitoring area corresponding to the preset position of the first PTZ.
[0075] Based on the multiple preset video images collected, a moving target detection algorithm can be used to determine whether a second moving target exists in the second monitoring area corresponding to the preset position of the first PTZ.
[0076] Step S303: If it is determined that there is a second moving target in the second monitoring area, control the pan-tilt unit to stay at the first pan-tilt unit preset position for a second preset time.
[0077] If a second moving target is identified within the second monitoring area, it indicates a need for close monitoring. Therefore, the PTZ (pan-tilt unit) is controlled to remain at the first PTZ preset position for a second preset duration. For example, the second preset duration can be preset to T.
[0078] Through the above steps, if the present application embodiment determines that there is a moving target at the preset location, it will continue to monitor until the preset dwell time is reached, thereby improving the monitoring efficiency and display effect of the moving target at the preset location.
[0079] In some embodiments, the method further includes the following after step S302:
[0080] Step S304: If it is determined that there is no second moving target in the second monitoring area, acquire the fourth video image captured at the preset position of the first PTZ at the third time, and the fifth video image captured at the preset position of the first PTZ at the fourth time.
[0081] If it is determined that there is no second moving target within the second monitoring area, a fourth video image is acquired at a third time from a preset position on the first pan-tilt-zoom (PTZ) unit, and a fifth video image is acquired at the fourth time from the same preset position on the first PTZ unit. Similar to the aforementioned, the fourth and fifth video images are video images acquired at the preset position on the first PTZ unit during different patrol cycles.
[0082] Step S305: If there is a difference between the fifth video image and the fourth video image, control the pan-tilt unit to stay at the first pan-tilt preset position for a third preset duration, wherein the third preset duration is less than the second preset duration.
[0083] The fifth video image is compared with the fourth video image. If there are differences between the fifth and fourth video images, it indicates that the current monitored area needs to be monitored. Therefore, the pan-tilt unit is controlled to stay at the first pan-tilt preset position for a third preset time, where the third preset time is shorter than the second preset time. For example, the second preset time is T, and the third preset time is T / 5. Furthermore, if an active target is detected within the third preset time, the monitoring time is extended for continuous monitoring until the second preset time is reached.
[0084] Step S306: If there is no difference between the fifth video image and the fourth video image, control the gimbal to rotate to the first capture position.
[0085] If the fifth video image is identical to the fourth video image, the pan-tilt unit (PTZ) is controlled to rotate to the first capture position, i.e., the PTZ returns to a non-preset location where the image differs, thereby monitoring the area corresponding to that non-preset location. Furthermore, after rotating the PTZ to the first capture position, a preset capture and recording time can be established, for example, one second. After the preset capture and recording time, the PTZ rotates again at high speed (e.g., the speed of a first target) to the first preset PTZ location. Additionally, a second preset PTZ location can be determined so that the path of the PTZ from the second preset location to the first preset location includes at least one first capture position. If no active target or differing area appears during the rotation from the second preset location to the first preset location, the PTZ repeatedly cruises between the second and first preset locations at high speed until a second preset time is reached, after which it rotates to the next preset location.
[0086] Through the above steps, when it is determined that there is no moving target at the preset location, this embodiment of the application further determines whether there is a difference between the two video images collected by the pan-tilt unit when it passes the preset location twice. If there is a difference, it briefly stops monitoring; if there is no difference, it returns to the non-preset location with the difference for monitoring. This takes into account the monitoring of non-preset locations and improves monitoring efficiency and accuracy.
[0087] This embodiment also provides a gimbal control method. Figure 4 This is a flowchart of another gimbal control method according to an embodiment of this application, such as... Figure 4 As shown, this process, based on the aforementioned embodiments, also includes the following steps:
[0088] Step S401: If there is a difference between the second video image and the first video image, mark a first difference region in the first video image to determine a first difference video image, and mark a second difference region in the second video image to determine a second difference video image.
[0089] If it is determined that there is a difference between the second video image and the first video image, the first difference region is marked in the first video image to determine the first difference video image by drawing a rectangle or an outline of the difference region, and the second difference region is marked in the second video image to determine the second difference video image.
[0090] Step S402: Store the first difference video image and the second difference video image.
[0091] The first and second difference video images after being marked are stored as switching reference data when switching cruise preset positions next time.
[0092] Through the above steps, the present application embodiment marks the difference regions in the video images with differences and the comparison video images, and stores the marked difference video images for subsequent search and display. The display of difference regions / targets is intuitive and highly feasible.
[0093] In some embodiments, step S402 is followed by:
[0094] Step S403: Determine the second gimbal preset position so that the path of the gimbal rotating from the second gimbal preset position to the first gimbal preset position includes at least one first capture position.
[0095] A second gimbal preset position is determined in the gimbal rotation direction, located before the first gimbal preset position, so that on the path of the gimbal rotating from the second gimbal preset position to the first gimbal preset position (hereinafter referred to as the cruise route), at least one first capture position is included, that is, multiple first capture positions may exist between the second gimbal preset position and the first gimbal preset position.
[0096] Step S404: Based on the distance between each first capture position and the preset position of the second gimbal, the first difference video image and the second difference video image corresponding to each first capture position are sequentially displayed on the display device.
[0097] The distance between each first capture position and the second preset position of the gimbal is calculated. The first and second difference video images corresponding to each first capture position are then displayed on the display device in order of distance. For example, the closer the distance to the first capture position, the closer the corresponding first and second difference video images are displayed on the left side of the display device. Specifically, if the differences are concentrated at a certain position on the cruise route, they are displayed. Alternatively, if two preset positions are close and there is only one field of view between them that can be stored, then the position corresponding to that scene is the first capture position, and all differences / active targets on it are recorded and displayed. Or, when there are multiple first capture positions, they can be connected to form a trajectory for display. If the capture points on the cruise route have the same horizontal position, several horizontal angle images are stitched together to form a trajectory route and displayed horizontally. If the horizontal / vertical angles of the capture points are different, the corresponding difference video images are calculated based on PTZ coordinates and displayed at different angles / positions.
[0098] Through the above steps, this embodiment of the application determines the cruise route of the gimbal from the second gimbal preset position to the first gimbal preset position, and sequentially displays the marked difference images. Users can quickly view the changes or targets that appear in multiple rounds of the screen, which is more intuitive and clear, and further improves the display effect.
[0099] In some embodiments, step S404 is followed by:
[0100] Step S405: In response to the gimbal preset position switching command, control the gimbal to rotate from the second gimbal preset position to the first gimbal preset position.
[0101] In response to the PTZ preset position switching command, control the PTZ to rotate from the second PTZ preset position to the first PTZ preset position to perform the PTZ preset position switching, and view the monitoring video during the switching process.
[0102] In step S406, when the pan-tilt unit rotates to the first capture position, an alarm message is sent and other devices other than the video surveillance equipment are activated.
[0103] When the pan-tilt head rotates to the first snapshot position, it is analyzed that there is a difference on the cruise route or a moving target exists, so as to send an alarm message, and link with other devices outside the video surveillance equipment to notify the other devices of the activity trend direction of the moving target. In this way, associating cameras and the like at other positions in the surveillance system helps to further improve the surveillance efficiency and accuracy.
[0104] In addition, the method provided by the present application is not limited to pan-tilt cameras, and can also be applied to, for example, preset positions set by electronic zoom in fixed box cameras and panoramic cameras; it can also be applied to, for example, cameras mounted on unmanned aerial vehicles, that is, control methods for other imaging devices with the same or similar functions all fall within the protection scope of the present application.
[0105] The embodiments of the present application are described and explained below through preferred embodiments.
[0106] Figure 5 is a flowchart of a pan-tilt head control method according to a preferred embodiment of the present application, as Figure 5 shown, this preferred pan-tilt head control method includes the following steps:
[0107] Step S501: determining a first snapshot position, and acquiring a first video image collected at the first snapshot position at a first moment, and a second video image collected at the first snapshot position at a second moment.
[0108] Step S502: when there is no difference between the second video image and the first video image, controlling the pan-tilt head to rotate at a first target speed.
[0109] Step S503: when there is a difference between the second video image and the first video image, controlling the pan-tilt head to rotate at a second target speed, where the second target speed is less than the first target speed.
[0110] Step S504: determining a second snapshot position located after the first snapshot position in the rotation direction of the pan-tilt head, and acquiring a third video image collected at the second snapshot position.
[0111] Step S505: based on the third video image and the second video image, determining whether a first moving target exists in the first monitoring area corresponding to the space between the first snapshot position and the second snapshot position.
[0112] Step S506: when it is determined that the first moving target exists in the first monitoring area, controlling the pan-tilt head to rotate at a third target speed, where the third target speed is less than the second target speed.
[0113] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0114] This embodiment also provides a gimbal control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0115] Figure 6 This is a structural block diagram of a gimbal control device according to an embodiment of this application, such as... Figure 6 As shown, the device includes an image acquisition module 10, a first control module 20, and a second control module 30.
[0116] The image acquisition module 10 is used to determine the first capture position, acquire a first video image captured at the first capture position at a first moment, and a second video image captured at the first capture position at a second moment.
[0117] The first control module 20 is used to control the pan-tilt unit to rotate at a first target speed when there is no difference between the second video image and the first video image.
[0118] The second control module 30 is used to control the pan-tilt unit to rotate at a second target speed when there is a difference between the second video image and the first video image, wherein the second target speed is less than the first target speed.
[0119] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0120] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0121] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0122] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0123] Determine the first capture position, acquire the first video image captured at the first capture position at the first moment, and the second video image captured at the first capture position at the second moment;
[0124] If the second video image is identical to the first video image, control the gimbal to rotate at the first target speed;
[0125] If there is a difference between the second video image and the first video image, control the gimbal to rotate at a second target speed, wherein the second target speed is less than the first target speed.
[0126] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0127] Furthermore, in conjunction with the gimbal control methods in the above embodiments, this application embodiment can provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the gimbal control methods in the above embodiments.
[0128] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0129] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0130] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A pan-tilt-zoom (PTZ) control method, applied to video surveillance equipment, characterized in that, Includes the following steps: Determine the first capture position, acquire a first video image captured at the first capture position at a first moment, and a second video image captured at the first capture position at a second moment, wherein the first moment and the second moment are the times when the gimbal passes the first capture position during different rounds of inspection; If the second video image is identical to the first video image, control the gimbal to rotate at the first target speed; If there is a difference between the second video image and the first video image, the gimbal is controlled to rotate at a second target speed, wherein the second target speed is less than the first target speed; Determine a first gimbal preset position and a second gimbal preset position so that at least one of the first capture positions is included on the path of the gimbal rotating from the second gimbal preset position to the first gimbal preset position. A first difference video image corresponding to the first video image and a second difference video image corresponding to the second video image are determined. Based on the distance between each first capture position and the preset position of the second gimbal, the first difference video image and the second difference video image corresponding to each first capture position are sequentially displayed on the display device.
2. The gimbal control method according to claim 1, characterized in that, The step of controlling the gimbal to rotate at a second target speed when there is a difference between the first video image and the second video image includes: Determine a second capture position located after the first capture position in the rotation direction of the gimbal, and acquire a third video image captured at the second capture position; Based on the third video image and the second video image, determine whether there is a first moving target in the first monitoring area between the first capture position and the second capture position; If the first moving target is determined to exist within the first monitoring area, the pan-tilt unit is controlled to rotate at a third target speed, wherein the third target speed is less than the second target speed.
3. The gimbal control method according to claim 2, characterized in that, The method further includes: Determine the first preset position of the gimbal, control the gimbal to stay at the first preset position for a first preset time and acquire multiple preset position video images; Based on the multiple preset position video images, determine whether there is a second moving target in the second monitoring area corresponding to the first preset position of the PTZ; If it is determined that the second moving target exists in the second monitoring area, the pan-tilt unit is controlled to stay at the first pan-tilt unit preset position for a second preset time.
4. The gimbal control method according to claim 3, characterized in that, After determining whether a second moving target exists within the second monitoring area corresponding to the first PTZ preset position based on the plurality of preset position video images, the method further includes: If it is determined that there is no second moving target in the second monitoring area, a fourth video image is acquired at the preset position of the first PTZ at the third moment, and a fifth video image is acquired at the preset position of the first PTZ at the fourth moment. If there is a difference between the fifth video image and the fourth video image, the gimbal is controlled to stay at the first gimbal preset position for a third preset time, wherein the third preset time is less than the second preset time. If the fifth video image is identical to the fourth video image, control the gimbal to rotate to the first capture position.
5. The gimbal control method according to any one of claims 1 to 4, characterized in that, The method further includes: In the case where the second video image differs from the first video image, a first difference region is marked in the first video image to determine the first difference video image, and a second difference region is marked in the second video image to determine the second difference video image; Store the first difference video image and the second difference video image.
6. The gimbal control method according to claim 5, characterized in that, The step of sequentially displaying the first difference video image and the second difference video image corresponding to each first capture position on the display device based on the distance between each first capture position and the preset position of the second gimbal includes: In response to a gimbal preset position switching command, the gimbal is controlled to rotate from the second gimbal preset position to the first gimbal preset position; When the pan-tilt unit rotates to the first capture position, an alarm message is sent, and other devices besides the video surveillance device are activated.
7. A gimbal control device for implementing the gimbal control method as described in any one of claims 1 to 6, characterized in that, It includes an image acquisition module, a first control module, and a second control module: The image acquisition module is used to determine the first capture position, acquire a first video image captured at the first capture position at a first moment, and a second video image captured at the first capture position at a second moment. The first control module is used to control the gimbal to rotate at a first target speed when there is no difference between the second video image and the first video image; The second control module is used to control the gimbal to rotate at a second target speed when there is a difference between the second video image and the first video image, wherein the second target speed is less than the first target speed.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the gimbal control method according to any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is executed by a processor to perform the gimbal control method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Intelligent video monitoring system
CN101370128A
Target snapshot and tracking method and device for vehicle-mounted camera
CN114071013A
Surveillance system and method for operating same
US20110149072A1
