Control method and device of photographing equipment, storage medium and electronic device
By adjusting the zoom parameters and shooting angle at the fixed position point of the shooting device, the picture loss problem caused by fixed position shooting in the prior art is solved, and the timeliness of event recognition is improved.
Patent Information
- Application Number
- CN202211624327.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-15
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2042-12-15
AI Technical Summary
In the prior art, the control method of the shooting device is prone to loss of pictures due to shooting at fixed location points, resulting in poor timeliness of event recognition.
By acquiring and comparing the images captured twice when the target gimbal rotates the target shooting device to one of the preset N shooting positions, if the image is not different and the zoom parameter is not the minimum value, the zoom parameter is reduced to expand the shooting area until an object entering the second shooting area but not entering the target shooting area is identified, and then the value of the zoom parameter is maintained to ensure that the object is in the field of view.
By adjusting the zoom parameters and shooting angle, the field of view of the shooting device is expanded, the timeliness of event recognition is improved, and the possibility of picture loss is reduced.
Smart Images

Figure CN116017136B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video surveillance technology, and in particular to a control method and device for a shooting device, a storage medium, and an electronic device. Background Art
[0002] The pan / tilt head is a supporting device for installing and fixing the shooting equipment. In order to meet the needs of scanning and monitoring a large area, a moving pan / tilt head can be used to expand the monitoring range of the shooting equipment. The high-speed posture of the moving pan / tilt head is realized by one or more actuator motors, and the motor receives the signal from the controller to accurately operate and position. In order to improve the convenience of pan / tilt head operation, a semi-automatic pan / tilt head control technology is provided in the prior art, that is, by pre-setting a number of pan / tilt head shooting positions, that is, a number of preset positions, when shooting at the preset positions, the pan / tilt head rotates to a preset position, takes timed shots for a certain period of time, and then rotates to the next preset position.
[0003] When the PTZ rotates to a preset position, it is fixed at that position, even if there is no valid video at that position, that is, no required event is detected, for example, no motion detection event or no difference in the picture. However, the purpose of shooting with a fixed preset position is to detect valuable fixed objects or active targets (i.e., moving targets). If the fixed object is moved or the active area of the active target changes, shooting at a fixed position may lose key images, resulting in poor timeliness of event recognition.
[0004] It can be seen that the control method of the shooting device in the related art has the problem of poor timeliness of event recognition due to the easy loss of the picture when shooting at a fixed position. Summary of the invention
[0005] The embodiments of the present application provide a control method and device for a shooting device, a storage medium, and an electronic device, so as to at least solve the problem of poor timeliness of event recognition due to the easy occurrence of picture loss when shooting at a fixed position in the control method of the shooting device in the related art.
[0006] According to one aspect of an embodiment of the present application, a method for controlling a shooting device is provided, comprising: when a target gimbal rotates a target shooting device to a first shooting position, acquiring a first image captured by the target shooting device at the first shooting position, and acquiring a second image, wherein the shooting position to which the target gimbal allows the target shooting device to be rotated is a preset N shooting positions, the N shooting positions include the first shooting position, and the second image is an image captured by the target shooting device at the first shooting position when the target gimbal rotates the target shooting device to the first shooting position once, and N is a positive integer greater than or equal to 2; when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is greater than the minimum value of the zoom parameter, changing the value of the zoom parameter to The method comprises the steps of: adjusting the zoom parameter of the target shooting device to a first target value and obtaining a third image obtained by shooting with the zoom parameter having the first target value at the first shooting position, wherein a second shooting area shot with the zoom parameter having the first target value is larger than a first shooting area shot with the zoom parameter having the current value, and the first target value is greater than or equal to the minimum value; and in a case where a first target object entering the second shooting area but not entering the target shooting area is identified in the third image, maintaining the value of the zoom parameter used by the target shooting device when shooting at the first shooting position at the first target value, wherein the target shooting area is a shooting area preset at the first shooting position, and both the first shooting area and the second shooting area include the target shooting area.
[0007] According to another aspect of an embodiment of the present application, a control device for a shooting device is further provided, comprising: an acquisition unit, for acquiring, when a target gimbal rotates the target shooting device to a first shooting position, a first image captured by the target shooting device at the first shooting position, and acquiring a second image, wherein the shooting position to which the target gimbal allows the target shooting device to be rotated is a preset N shooting positions, the N shooting positions including the first shooting position, and the second image is an image captured by the target shooting device at the first shooting position when the target gimbal rotates the target shooting device to the first shooting position once, and N is a positive integer greater than or equal to 2; a first execution unit, for, when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is greater than the minimum value of the zoom parameter, the value of the zoom parameter becomes smaller than the first target value, and a third image is obtained by the target shooting device shooting at the first shooting position with the zoom parameter having the first target value, wherein a second shooting area shot by the target shooting device with the zoom parameter having the first target value is larger than a first shooting area shot with the zoom parameter having the current value, and the first target value is greater than or equal to the minimum value; a first maintaining unit is used to maintain the value of the zoom parameter used by the target shooting device when shooting at the first shooting position at the first target value when a first target object entering the second shooting area but not entering the target shooting area is identified in the third image, wherein the target shooting area is a shooting area preset at the first shooting position, and the first shooting area and the second shooting area both include the target shooting area.
[0008] In an exemplary embodiment, the device also includes: a first adjustment unit, which is used to adjust the value of the zoom parameter used by the target shooting device when shooting at the first shooting position to the current value when the first target object entering the second shooting area and the target shooting area is identified in the third image.
[0009] In an exemplary embodiment, the device also includes: a second maintaining unit, which is used to maintain the value of the zoom parameter used by the target shooting device when shooting at the first shooting position at the current value when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is equal to the minimum value.
[0010] In an exemplary embodiment, the device also includes: a second execution unit, which is used to rotate the shooting angle of the target shooting device at the first shooting position when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is equal to the minimum value, and identify the target event in the image captured by the target shooting device after rotating the shooting angle.
[0011] In an exemplary embodiment, the second execution unit includes one of the following: a first recognition module, used to identify whether there is a moving target object in the image captured by the target shooting device after rotating the shooting angle; a second recognition module, used to identify whether there is a target object entering a target shooting area in the image captured by the target shooting device after rotating the shooting angle, wherein the target shooting area is a shooting area preset at the first shooting position.
[0012] In an exemplary embodiment, the device also includes: a second adjustment unit, which is used to adjust the shooting angle of the target shooting device at the first shooting position to a preset angle when the target event is identified in the image captured by the target shooting device after rotating the shooting angle, wherein the preset angle is the shooting angle of the target shooting device at the first shooting position before rotating the shooting angle of the target shooting device at the first shooting position.
[0013] In an exemplary embodiment, the device also includes: a third execution unit, which is used to adjust the value of the zoom parameter used by the target shooting device when shooting at the first shooting position and / or rotate the shooting angle of the target shooting device when shooting at the first shooting position, when the first image and the second image are different and a moving second target object is detected in the image captured by the target shooting device at the first shooting position, so that the second target object appears in the shooting area of the target shooting device, and the shooting area of the target shooting device includes a target shooting area, wherein the target shooting area is a shooting area preset at the first shooting position.
[0014] In an exemplary embodiment, the device further includes: a fourth execution unit, configured to rotate a shooting angle of the target shooting device at the first shooting position so that the second target object appears in the shooting area of the target shooting device when the value of the zoom parameter is the minimum value, the second target object moves to a first boundary of the shooting area of the target shooting device, the boundary in the target shooting area overlaps with a second boundary in the shooting area of the target shooting device, and the shooting area of the target shooting device includes the target shooting area, wherein the second boundary is a boundary opposite to the first boundary; and when the shooting angle of the target shooting device at the first shooting position is rotated to reach a first preset time length, adjusting the shooting angle of the target shooting device at the first shooting position to a preset angle, wherein the preset angle is the shooting angle of the target shooting device at the first shooting position before the shooting angle of the target shooting device at the first shooting position is rotated.
[0015] In an exemplary embodiment, the fourth execution unit is also used to repeat the following steps after rotating the shooting angle of the target shooting device at the first shooting position for the first time so that the second target object appears in the shooting area of the target shooting device until the target gimbal rotates the target shooting device to a second shooting position among the N shooting positions: when the shooting angle of the target shooting device at the first shooting position is rotated to reach a first preset time, adjusting the shooting angle of the target shooting device at the first shooting position to the preset angle; when the shooting angle of the target shooting device at the first shooting position is maintained at the preset angle for a second preset time, rotating the shooting angle of the target shooting device at the first shooting position so that the second target object appears in the shooting area of the target shooting device.
[0016] In an exemplary embodiment, the device also includes: a fifth execution unit, which is used to rotate the target shooting device to a second shooting position among the N shooting positions through the target gimbal, and control the value of the zoom parameter used when the target shooting device shoots at the second shooting position to a second target value, while maintaining the value of the zoom parameter used when the target shooting device shoots at the first shooting position at the first target value and the length of time the target shooting device stays at the first shooting position reaches a third preset length of time, wherein the length of time the target shooting device stays at each of the N shooting positions is the third preset length of time, and the second target value is greater than or equal to the minimum value; wherein the second target value is the same as the current value, or the second target value corresponds to a shooting area preset at the second shooting position.
[0017] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the control method of the above-mentioned shooting device when running.
[0018] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the control method of the shooting device through the computer program.
[0019] In an embodiment of the present application, a method of adjusting the zoom parameter of the shooting device at the shooting position to adjust the captured image area is adopted. When the target gimbal rotates the target shooting device to a first shooting position (which may be a preset position), a first image captured by the target shooting device at the first shooting position is acquired, and a second image is acquired. Here, the first shooting position belongs to N (N is a positive integer greater than or equal to 2) shooting positions preset to which the target gimbal allows the target shooting device to be rotated, and the second image is an image captured by the target shooting device at the first shooting position when the target gimbal rotates the target shooting device to the first shooting position for the first time. That is, the first image and the second image are different images captured by the photographing device at the same photographing position when the first image and the second image are successively rotated to the same photographing position; if the first image and the second image are the same, it means that there is no difference between the images captured twice. At this time, if the current value of the zoom parameter of the target photographing device is greater than the minimum value of the zoom parameter, at this time, the field of view of the photographing device is not the maximum field of view. By reducing the value of the zoom parameter to the first target value (the first target value is greater than or equal to the minimum value), the second photographing area photographed by the target photographing device with the zoom parameter of the first target value is larger than the first photographing area photographed with the zoom parameter of the current value, The field of view of the shooting device is expanded. Here, the first shooting area and the second shooting area both include the shooting area preset at the first shooting position, that is, the target shooting area (which may be the area where the fixed object to be paid attention to at the first shooting position is located); at this time, a third image is obtained by shooting with a zoom parameter of the first target value at the first shooting position by the target shooting device. The third image may contain scene information in a larger area than the first image. If a first target object entering the second shooting area but not entering the target shooting area is identified in the third image, it can be considered that the first target object is a potential object (potential target, which may be an active target) that may enter the first shooting area, or a potential object that may enter the target shooting area. At this time, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is maintained at the first target value, so that the first target object can be ensured to be within the field of view of the shooting device, and the purpose of pre-detecting the potential target and reducing the possibility of losing the key picture is achieved, thereby achieving the technical effect of improving the timeliness of event recognition, thereby solving the problem of poor timeliness of event recognition caused by the easy loss of the picture when shooting at a fixed position in the control method of the shooting device in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] Figure 1 is a schematic diagram of a hardware environment of an optional control method for a photographing device according to an embodiment of the present application;
[0023] Figure 2 is a flow chart of an optional control method of a photographing device according to an embodiment of the present application;
[0024] Figure 3 is a schematic diagram of a hardware environment of an optional control method for a photographing device according to an embodiment of the present application;
[0025] Figure 4 is a schematic diagram of an optional control method of a photographing device according to an embodiment of the present application;
[0026] Figure 5 is a schematic diagram of an optional control method of a photographing device according to an embodiment of the present application;
[0027] Figure 6 is a schematic diagram of an optional control method of a photographing device according to an embodiment of the present application;
[0028] Figure 7 is a schematic diagram of an optional control method of a photographing device according to an embodiment of the present application;
[0029] Figure 8 is a schematic diagram of an optional control method of a photographing device according to an embodiment of the present application;
[0030] Fig. 9 is a schematic diagram of an optional control method of a photographing device according to an embodiment of the present application;
[0031] Fig.10 is a schematic diagram of an optional control method of a photographing device according to an embodiment of the present application;
[0032] Fig.11 is a schematic diagram of an optional control method of a photographing device according to an embodiment of the present application;
[0033] Fig.12 is a schematic diagram of an optional control method of a photographing device according to an embodiment of the present application;
[0034] Fig.13is a structural block diagram of an optional control device for a photographing device according to an embodiment of the present application;
[0035] Fig.14 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] According to one aspect of an embodiment of the present application, a control method for a photographing device is provided. Optionally, in this embodiment, the control method for a photographing device can be applied to Figure 1 In the hardware environment shown in FIG. 1 , a pan / tilt 102, a camera 104 and a server 106 are provided. Figure 1 As shown, the shooting device 104 is installed and fixed by the pan-tilt head 102, and the server 106 is connected to the pan-tilt head 102 and the shooting device 104 through the network. It can be used to provide services (such as control services, etc.) for the pan-tilt head 102 or the shooting device 104 installed on the pan-tilt head 102. A database can be set on the server or independently of the server to provide data storage services for the server 106.
[0039] The network may include but is not limited to at least one of the following: a wired network, a wireless network. The wired network may include but is not limited to at least one of the following: a wide area network, a metropolitan area network, a local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The shooting device 104 may not be limited to a PC, a mobile phone, a tablet computer, a camera, etc.
[0040] The control method of the shooting device in the embodiment of the present application can be executed by the server 106, can also be executed by the gimbal 102, or can also be executed jointly by the server 106 and the gimbal 102.
[0041] Taking the control method of the shooting device in this embodiment executed by the pan / tilt platform 102 as an example, Figure 2 is a flow chart of an optional control method of a photographing device according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0042] Step S202, when the target gimbal rotates the target shooting device to a first shooting position, a first image captured by the target shooting device at the first shooting position is acquired, and a second image is acquired.
[0043] The control method of the shooting device in this embodiment can be applied to a scene in which the shooting device is driven by the pan / tilt head to rotate to a preset position (or shooting position) and shoots at the preset position. The shooting device can be a camera or other device with image shooting function, which can be applied to various networking environments, for example, Figure 3 As shown, it can be applied to display on the front-end management client device, for example, the WEB (World Wide Web) client / human-machine client of NVR (Network Video Recorder) / VMS (Video Management Server), and it is also applicable to mobile client management of devices connected to the cloud. The mobile client can be a mobile phone APP (Application); it is not limited to the client of the camera itself, for example, such as a WEB client, wherein, Figure 3 The IPC (IP Camera, or Internet Protocol Camera) is a network camera.
[0044] The PTZ can be divided into two types: fixed PTZ and motion PTZ. Fixed PTZ is suitable for situations where the monitoring range is not large. After the camera is installed on the fixed PTZ, the horizontal and pitch angles of the camera can be adjusted. After the best working posture is achieved, the camera can be fixed by locking the adjustment mechanism. Motion PTZ is suitable for situations where a large area is to be scanned and monitored. The motion PTZ can expand the monitoring range of the camera. Under the control of the control signal, the camera on the motion PTZ can automatically scan the monitoring area, and can also track the target under the control of relevant personnel, such as Figure 4 As shown, the object is the fixed object to be monitored and the large frame is the complete monitoring screen. The motion pan-tilt head can be applied to various application scenarios such as video conferencing, remote teaching, and video monitoring.
[0045] For a motion gimbal, in order to facilitate the user to operate the gimbal more easily, a semi-automatic gimbal control method can be adopted, by pre-setting several preset positions of the gimbal, that is, the gimbal shooting position, each shooting position can correspond to an ID, the rotation of the gimbal between the preset positions can drive the fixed shooting device to rotate to each preset position in turn, or it can rotate to certain preset positions according to the received rotation instruction, and take images during the rotation process or after rotating to the preset position, so that target events can be identified from the captured images (for example, motion detection events or screen differences). For a target gimbal, a target shooting device is installed or fixed on the target gimbal, and the target gimbal has N preset shooting positions, that is, N preset positions, N is a positive integer greater than or equal to 2, and the shooting positions to which the target gimbal allows the target shooting device to be rotated are the above N shooting positions.
[0046] Optionally, the remote control or buttons can be used to trigger the PTZ to switch between preset positions, for example Figure 5 As shown, for a conference room, several pan-tilt shooting positions are set, for example, P1, P2, P3, P4, and P5. When the user triggers the pan-tilt operation through a remote control or a control terminal, it can switch between the preset positions and shoot when it rotates to a preset position. The shooting duration can be a preset fixed duration, or a duration that is automatically adjusted according to the scene. In addition, a remote control or button can also be used to trigger the pan-tilt to rotate to a specified preset position. That is, when the user triggers a preset position ID through a remote control or a control terminal, the pan-tilt will immediately rotate to the corresponding position. For example, when the shooting command at the P1 position is triggered, the pan-tilt will rotate to the P1 position for shooting.
[0047] For the target gimbal, based on the triggering of the remote control, button, or other methods, the target gimbal can drive the target shooting device to rotate between all or part of the N shooting positions. When rotating to a certain shooting position, the target shooting device can shoot an image at the corresponding shooting position to obtain a group of captured images. When the target gimbal rotates the target shooting device to the first shooting position among the N shooting positions, the first image captured by the target shooting device at the first shooting position can be obtained. The first image can be the first image captured after rotating to the first shooting position, or it can be an image after the first image.
[0048] In addition, a second image may also be acquired. The second image is an image captured by the target shooting device at the first shooting position when the target pan / tilt rotates the target shooting device to the first shooting position for the last time. The second image may be the last image captured by the target shooting device at the first shooting position for the last time, or may be an image before the last image. The second image may be directly extracted and saved when the target shooting device last captured at the first shooting position, or may be extracted from a group of captured images captured at the first shooting position for the last time after the first image is acquired. This is not limited in this embodiment.
[0049] For example, when the gimbal leaves a preset position, it takes picture pic1 (corresponding to the second image mentioned above), and then takes picture pic2 (corresponding to the first image mentioned above) when it enters the preset position again. By extracting the feature values in the two pictures and comparing them, it is determined whether there is a difference between pic1 and pic2.
[0050] Step S204, when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is greater than the minimum value of the zoom parameter, the value of the zoom parameter is reduced to the first target value, and a third image is obtained by shooting the target shooting device at the first shooting position with the zoom parameter having the first target value.
[0051] In the related art, when the PTZ rotates to a preset position, even if no valid video is captured at the preset position, that is, no motion detection event or no difference between the previous picture and the picture, the PTZ will still be fixed at the position. Since the fixed preset position is used to monitor valuable fixed objects or moving targets, if the fixed object is moved a little, or the moving area of the moving target changes, if the preset position is still fixed, the key picture may be lost, such as Figure 6 As shown, the loss of key images will result in the inability to detect the event of interest in a timely manner, resulting in poor timeliness of event recognition.
[0052] In this regard, when the monitoring target of the preset position changes, the preset position can be manually adjusted by relevant personnel. However, when the user manually adjusts the preset position, it takes a long time from the change of the monitoring target to the discovery of the change of the monitoring target and then to the setting of the preset position. Therefore, the above preset position adjustment method has poor timeliness and large lag. In addition, there is no accurate adjustment standard for adjusting the preset position, so the accuracy of the preset position adjustment is low.
[0053] In order to at least partially solve the above-mentioned problem, in this embodiment, if there is no difference between the images obtained by shooting twice at the same position and the current zoom parameter is not the minimum value, the current zoom parameter can be adjusted down to expand the shooting area (the area that can be photographed) of the shooting device, so that the scene information in a larger area can be detected. If a potential object is detected after adjusting the zoom parameter, for example, a potential object may enter the shooting area before adjusting the zoom parameter or the target area to be monitored, the adjusted zoom parameter is maintained to avoid losing the information of the potential object. Since the zoom parameter is automatically adjusted based on the captured image, the timeliness of the adjustment of the shooting area can be improved. At the same time, the relationship between the range of the shooting area and the information richness is taken into consideration. The shooting device is adjusted by expanding the shooting area, which can improve the timeliness of event recognition.
[0054] For the target shooting device, if the first image and the second image are the same, it can be further determined whether the current value of the zoom parameter of the target shooting device is greater than the minimum value of the zoom parameter. The minimum value here can be 1. For some shooting devices (for example, shooting devices using ultra-wide-angle lenses), the zoom parameter may be allowed to be set to less than 1. If the current value of the zoom parameter of the target shooting device is greater than 1, the value of the zoom parameter can be reduced to the first target value. The first target value can be less than the current value and greater than or equal to the minimum value.
[0055] After the value of the zoom parameter is reduced to the first target value, a third image can be obtained by shooting with the target shooting device at the first shooting position using the zoom parameter having the first target value, and the second shooting area shot with the target shooting device using the zoom parameter having the first target value is larger than the first shooting area shot with the zoom parameter having the current value.
[0056] Here, when the zoom parameter of the target shooting device is the current value, its shooting area is the first shooting area. Here, the shooting area of the target shooting device is the scene area in the scene that is within the field of view of the target shooting device. For example, the first image is an image obtained by the target shooting device shooting the first shooting area at the first shooting position, and the second image is an image obtained by the target shooting device shooting the first shooting area at the first shooting position last time. When the zoom parameter of the target shooting device is adjusted down to the first target value, its shooting area is the second shooting area. For example, the third image is an image obtained by the target shooting device shooting the second shooting area at the first shooting position.
[0057] For example, if there is no difference between pic1 and pic2, it means that no event occurred in the two previous detections at the preset position, and no motion detection event occurred at present. In this case, analyze the current PTZ (Pan / Tilt / Zoom) magnification (i.e., zoom factor) Z. If the magnification Z is not 1, reduce the magnification Z to make the monitoring screen larger (i.e., the shooting area larger). The shooting area before and after the magnification Z is adjusted can be as follows Figure 7 As shown, the shooting area before adjusting the zoom factor Z corresponds to the area in the small solid line frame. After reducing the zoom factor Z, the shooting area is enlarged, and the corresponding shooting area is the area in the large solid line frame. Obviously, the enlarged shooting area after adjusting the zoom factor Z can contain richer scene information, which can improve the timeliness of event recognition.
[0058] Step S206: when a first target object entering the second shooting area but not entering the target shooting area is identified in the third image, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is maintained at the first target value.
[0059] For each of the N shooting positions, a corresponding shooting area can be preset. The shooting area preset at a shooting position can be a preset position area, that is, an area to be monitored in the actual scene, which can be an area of concern for setting a preset point, for example, Figure 7 As shown in the dotted box in , the area of the fixed object that needs to be paid attention to in the preset position is included. The preset shooting area at the first shooting position is the target shooting area, and both the first shooting area and the second shooting area include the above-mentioned target shooting area.
[0060] If a first target object that has entered the second shooting area but has not entered the target shooting area is identified in the third image (a potential object that may enter the first shooting area or a potential object that may enter the preset position area), in order to facilitate the monitoring of the first target object, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position can be maintained at the first target value.
[0061] It should be noted that in this embodiment, a solution for expanding the monitoring area of the preset position is adopted, by analyzing the distribution of monitoring targets (fixed objects, moving targets, etc.) in the preset position area, and by using the trend of moving target objects at the edge of the preset position area, the monitoring range of the preset position is expanded. Without losing the monitoring screen in the current preset position area, the monitoring range is expanded in time, and the key screen data of the moving target objects that drift from the current monitoring range to the outside of the edge can be recorded without missing, that is, the monitoring area is increased and more monitoring targets are monitored, which can improve the monitoring efficiency.
[0062] For example, after the zoom factor Z is reduced, if an active target object enters the monitoring screen of the camera but does not enter the preset position area, such as Figure 8 As shown, the current zoom factor Z is saved. Here, according to the real-time monitoring situation in the monitoring area (shooting area) of the current preset position, when there is no difference between the current preset position area (dotted box area) and the comparison picture (pic2), and there is no monitoring target object (active target) in the current preset position area, the monitoring area of the preset position is expanded, thereby expanding the monitoring range of the preset position and improving the monitoring effect.
[0063] Through the above steps, when the target gimbal rotates the target shooting device to the first shooting position, a first image captured by the target shooting device at the first shooting position is obtained, and a second image is obtained, wherein the shooting position to which the target gimbal allows the target shooting device to be rotated is a preset N shooting positions, the N shooting positions include the first shooting position, and the second image is an image captured by the target shooting device at the first shooting position when the target gimbal rotates the target shooting device to the first shooting position once, and N is a positive integer greater than or equal to 2; when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is greater than the minimum value of the zoom parameter, the value of the zoom parameter is reduced to the first target value, and the zoom parameter of the target shooting device at the first shooting position with the value of the first target value is obtained. The invention relates to a third image obtained by shooting a second image, wherein a second shooting area shot by the target shooting device with a zoom parameter having a value of the first target value is larger than a first shooting area shot with a zoom parameter having a value of the current value, and the first target value is greater than or equal to a minimum value; in a case where a first target object entering the second shooting area but not entering the target shooting area is identified in the third image, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is maintained at the first target value, wherein the target shooting area is a shooting area preset at the first shooting position, and the first shooting area and the second shooting area both include the target shooting area, thereby solving the problem of poor timeliness of event recognition due to easy picture loss when shooting at a fixed position in the control method of the shooting device in the related art, and improving the timeliness of event recognition.
[0064] In an exemplary embodiment, the method further comprises:
[0065] S11, when a first target object entering the second shooting area and the target shooting area is identified in the third image, a value of a zoom parameter used by the target shooting device when shooting at the first shooting position is adjusted to a current value.
[0066] In this embodiment, if the first target object entering the second shooting area and the target shooting area is identified in the third image, in this case, the first target object is a moving target, which may move the fixed object in the target shooting area or perform other operations on the fixed object. In order to better monitor the target shooting area, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position can be adjusted to the current value. Here, entering the target shooting area can be: completely entering the target shooting area or partially overlapping with the target shooting area.
[0067] After executing the zoom parameter value adjustment operation, it is also possible to obtain an image obtained by shooting with the target shooting device at the first shooting position with the zoom parameter set to the current value, and perform target event recognition or other operations on the captured image to determine whether other operations need to be performed. This embodiment does not limit the operations after executing the zoom parameter value adjustment operation.
[0068] For example, Fig. 9 As shown, after a certain period of time after the zoom factor Z is reduced, if the moving target enters the preset position area, the zoom factor is restored to monitor the moving target until the shooting time of the current preset position is reached and then the next preset position is moved to.
[0069] Through this embodiment, when it is detected that a moving target enters the preset position area, the value of the zoom parameter is adjusted to the original value, which can facilitate the detection of the moving target and improve the accuracy of target detection.
[0070] In an exemplary embodiment, the method further comprises:
[0071] S21, when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is equal to the minimum value, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is maintained at the current value.
[0072] In this embodiment, if the first image and the second image are the same, that is, there is no difference between the images obtained by the two image captures, and the current value of the zoom parameter of the target capture device is equal to the minimum value (for example, 1), then the capture area cannot be further expanded by adjusting the value of the zoom parameter. In order to monitor the target in the largest range, the value of the zoom parameter of the target capture device may not be enlarged, that is, the value of the zoom parameter used by the target capture device when capturing at the first capture position is maintained at the current value.
[0073] Through this embodiment, when there is no difference between the two captured images and the current shooting area is already the maximum shooting area, the current value of the zoom parameter can be maintained, which can ensure the maximum monitoring range and improve the timeliness of event recognition.
[0074] In an exemplary embodiment, the method further comprises:
[0075] S31, when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is equal to the minimum value, rotate the shooting angle of the target shooting device at the first shooting position, and identify the target event in the image captured by the target shooting device after the shooting angle is rotated.
[0076] In this embodiment, if the first image and the second image are the same, and the current value of the zoom parameter of the target shooting device is equal to the minimum value, in order to expand the monitoring range, the shooting angle of the target shooting device at the first shooting position can be rotated, and the rotation direction of the target shooting device can be a preset set of shooting directions. After the rotation, the shooting area of the target shooting device is the same size as the second shooting area, and at least partially overlaps with the second shooting area. At the same time, in order to ensure that the preset position area can be monitored, the shooting area of the target shooting device after the rotation includes the target shooting area.
[0077] After rotating the shooting angle, the target shooting device can shoot the current shooting area. Since the rotation direction of the target shooting device can be multiple, the images shot can also be multiple. For the captured images, the target event can be identified. The target event can be one or more preset events, such as motion detection events, events where a moving target enters the target shooting area, etc., and can also include other events, which are not limited in this embodiment.
[0078] For example, if there is no difference between pic1 and pic2, and the variable factor Z is 1, consider expanding the monitoring range, such as Fig.10 As shown, 1000 is the original monitoring area. To expand the monitoring range, the camera can be rotated counterclockwise, and a certain angle can be kept from leaving the center of the preset area during rotation. Four monitoring areas 1002, 1004, 1006 and 1008 can be obtained, and the monitoring range corresponding to the preset position can be expanded by 3 times. If a preset event is recognized at the preset position, the shooting angle of the original preset position can be changed back.
[0079] Through this embodiment, the monitoring range at a preset point is expanded by rotating the shooting angle of the shooting device, which can improve the timeliness of event recognition.
[0080] In an exemplary embodiment, identifying a target event in an image captured by a target capturing device after rotating the capturing angle includes one of the following:
[0081] S41, identifying whether there is a moving target object in the image captured by the target shooting device after the shooting angle is rotated;
[0082] S42, identifying whether there is a target object entering the target shooting area in the image captured by the target shooting device after the shooting angle is rotated.
[0083] In this embodiment, the target events identified by event recognition may be one or more, for example, motion detection events, events in which moving targets enter the target shooting area, and other types of events. The events that need to be identified can be configured as needed.
[0084] As an optional implementation, the target event may include a motion detection event, that is, the presence of a moving target object. It is identified whether there is a moving target object (that is, an active target object) in the image captured by the target shooting device after the shooting angle is rotated.
[0085] As another optional implementation, the target event may include whether there is a target object entering the target shooting area. The target object entering the target shooting area is identified in the image captured by the target shooting device after the shooting angle is rotated. Here, the target shooting area is a shooting area preset at the first shooting position, and its meaning is similar to that in the above embodiment, and is not described in detail here.
[0086] Through this embodiment, at least one of a motion detection event and a moving target entering a preset position area in an image captured by a shooting device after rotating the shooting angle is identified, thereby improving the flexibility of event recognition.
[0087] In an exemplary embodiment, the method further comprises:
[0088] S51, when a target event is recognized in an image captured by the target shooting device after rotating the shooting angle, adjusting the shooting angle of the target shooting device at the first shooting position to a preset angle, wherein the preset angle is the shooting angle of the target shooting device at the first shooting position before the shooting angle of the target shooting device at the first shooting position is rotated.
[0089] Before the target shooting device is rotated to shoot at the first shooting position, the shooting angle of the target shooting device at the first shooting position is a preset angle, and the corresponding shooting area may be the first shooting area. After the target shooting device is rotated to shoot at the first shooting position, some areas that can be shot in the shooting area corresponding to the preset angle can no longer be shot, and if a target event occurs in these areas at this time, it cannot be identified in time.
[0090] In order to improve the timeliness of event recognition, when the target event is recognized in the image captured by the target shooting device after the shooting angle is rotated, the shooting angle of the target shooting device at the first shooting position can be adjusted back to the preset angle. Fig.10 , the monitoring area after rotating the shooting angle is 1002. If an active target is detected or an active target is detected entering the preset position area, the shooting angle of the camera can be rotated back to the initial angle. At this time, the corresponding monitoring area is 1000.
[0091] It should be noted that by analyzing the drift of the target object monitored by the preset position, when the target object to be monitored drifts or there is no event at the current preset monitoring point, a reasonable preset position adjustment is performed. According to the fact that there is no monitorable target object in the monitoring area, the monitoring area is enlarged for monitoring. The monitoring area can be enlarged by reducing the zoom parameter or rotating the shooting angle. On the basis of not losing the original monitoring area target, the monitoring area and the monitoring target object can be flexibly adjusted, thereby improving the accuracy of the preset monitoring target object, expanding the monitoring range and flexibility of the preset monitoring, and thus improving the monitoring effect.
[0092] Through this embodiment, when a preset event is recognized in an image captured by the shooting device after detection of rotation, the shooting angle of the shooting device is adjusted to the shooting angle before the rotation, which can improve the timeliness of event recognition.
[0093] In an exemplary embodiment, the method further comprises:
[0094] S61, when the first image and the second image are different and a moving second target object is detected in an image captured by the target capturing device at the first capturing position, adjusting a value of a zoom parameter used by the target capturing device when capturing at the first capturing position and / or rotating a capturing angle of the target capturing device when capturing at the first capturing position, so that the second target object appears in a capturing area of the target capturing device, and the capturing area of the target capturing device includes a target capturing area, wherein the target capturing area is a capturing area preset at the first capturing position.
[0095] In this embodiment, if the first image and the second image are different, that is, there are differences between the images obtained by the two image captures, and an active target (that is, the second target object) is detected in the second image, then in order to better monitor the movement trajectory of the second target object, the zoom parameter value used by the target capture device when shooting at the first shooting position and / or the shooting angle of the target capture device when shooting at the first shooting position can be adjusted to adjust the range of the shooting area of the target capture device so that the second target object appears in the shooting area. At the same time, in order to ensure that the picture in the target shooting area is not lost, the shooting area of the target capture device includes the target shooting area, which is a preset shooting area at the first shooting position, and its meaning is similar to that in the aforementioned embodiment, and will not be repeated here.
[0096] For example, if there is a difference between pic1 and pic2, and there is an event in pic2, the target activity range is recorded each time. If there is an active target object within the current monitoring range, and the active target object moves toward the boundary of one side of the preset monitoring area, the preset magnification Z can be reduced, the monitoring magnification can be enlarged, or the monitoring screen of the camera can be rotated to track the active target object. Regardless of the adjustment method, the preset area needs to be kept within the monitoring screen. When reducing the magnification Z or rotating the monitoring screen of the camera to track the active target object, the other side boundary of the preset monitoring area can be kept flush with the enlarged screen.
[0097] Here, by analyzing the activity area of the target object (i.e., active target) and whether the target object drifts, the preset position is adjusted in time according to the drift of the target object's activity area, thereby improving the accuracy of preset position monitoring, and not missing the monitoring data of the target object or losing the monitoring area screen of the original preset position.
[0098] For example, Fig.11 As shown, the active target object moves to the left, and the monitoring screen is enlarged, and the right side of the enlarged screen can be flush with the right side of the preset position. If the magnification is 1, and there is no target object on the opposite side of the active target object, the monitoring screen can track the target object to move.
[0099] Through this embodiment, by adjusting the value of the zoom parameter and / or rotating the shooting angle to adjust the range of the shooting area of the shooting device, it can be ensured that the monitoring data of the active target is not missed, and the data in the original preset position area is not lost, thereby improving the comprehensiveness of information acquisition.
[0100] In an exemplary embodiment, the method further comprises:
[0101] S71, when the value of the zoom parameter is the minimum value, the second target object moves to a first boundary in the shooting area of the target shooting device, the boundary in the target shooting area overlaps with the second boundary in the shooting area of the target shooting device, and the shooting area of the target shooting device includes the target shooting area, rotating the shooting angle of the target shooting device at the first shooting position so that the second target object appears in the shooting area of the target shooting device, wherein the second boundary is a boundary opposite to the first boundary.
[0102] In this embodiment, if the zoom parameter used by the target shooting device when shooting at the first shooting position is the minimum value (for example, 1), and the second target object moves to the first boundary in the shooting area of the target shooting device, the boundary in the target shooting area overlaps with the boundary (i.e., the second boundary) in the shooting area of the target shooting device that is opposite to the first boundary, and the shooting area of the target shooting device includes the target shooting area, in this case, the second target object and the target shooting area are located at two opposite boundaries of the shooting area of the target shooting device, and the shooting area cannot be expanded by reducing the value of the zoom parameter, and the second target object may move out of the monitoring screen. In order to ensure that the movement trajectory of the second target object continues to be detected, the shooting angle of the target shooting device when shooting at the first shooting position can be rotated so that the second target object appears in the shooting area of the target shooting device.
[0103] S72: When the shooting angle of the rotating target shooting device at the first shooting position reaches a first preset time, adjust the shooting angle of the target shooting device at the first shooting position to a preset angle.
[0104] After rotating the shooting angle, the target shooting area may not be included in the shooting area of the target shooting device. In order to ensure that the picture in the target shooting area is not lost, after the shooting angle of the rotating target shooting device at the first shooting position reaches a first preset time, the shooting angle of the target shooting device at the first shooting position is adjusted to a preset angle. Here, the preset angle is the shooting angle of the target shooting device at the first shooting position before the shooting angle of the rotating target shooting device at the first shooting position is reached.
[0105] Optionally, the adjustment of the shooting angle can be performed along one direction. In order not to lose the pictures in other directions, the shooting angle of the target shooting device can be rotated according to a preset angle range to monitor the areas corresponding to other directions except the direction from the second boundary to the first boundary. When the shooting angle of the target shooting device is rotated according to the preset angle range, the target shooting area is kept within the shooting area of the target shooting device.
[0106] Through this embodiment, when the zoom parameter is at the minimum value, the shooting angle is rotated to adjust the range of the shooting area, and the preset area and the moving target are photographed respectively, so that the comprehensiveness of target monitoring and the timeliness of event recognition can be improved.
[0107] In an exemplary embodiment, the shooting angle of the rotating target shooting device at the first shooting position is adjusted to a preset angle when the shooting angle of the rotating target shooting device at the first shooting position reaches a first preset time length, and further includes:
[0108] S81, after the target shooting device is rotated for the first time to shoot at the first shooting position so that a second target object appears in the shooting area of the target shooting device, the following steps are repeatedly performed until the target gimbal rotates the target shooting device to a second shooting position among the N shooting positions:
[0109] When the shooting angle of the rotating target shooting device at the first shooting position reaches a first preset time length, adjusting the shooting angle of the target shooting device at the first shooting position to a preset angle;
[0110] When the shooting angle of the target shooting device at the first shooting position is maintained at the preset angle for a second preset time, the shooting angle of the target shooting device at the first shooting position is rotated so that a second target object appears in the shooting area of the target shooting device.
[0111] In this embodiment, in order to continuously detect the second target object and the target shooting area, after the shooting angle of the target shooting device at the first shooting position is rotated for the first time so that the second target object appears in the shooting area of the target shooting device, the cruise monitoring of the second target object and the target shooting area is repeated, that is, the following steps are repeated until the target gimbal rotates the target shooting device to the second shooting position among the N shooting positions, or the second target object moves out of the maximum shooting range of the target shooting device.
[0112] When performing cruise monitoring, when the shooting angle of the rotating target shooting device at the first shooting position reaches a first preset time, the shooting angle of the target shooting device at the first shooting position can be adjusted to a preset angle to monitor the target shooting area; and when the shooting angle of the target shooting device at the first shooting position remains at the preset angle for a second preset time, the shooting angle of the target shooting device at the first shooting position is rotated so that a second target object appears in the shooting area of the target shooting device.
[0113] For example, when controlling the monitoring screen to track the target object, you can cruise back and forth in the direction of the target object and the original preset position at a certain frequency until the preset time of the preset position is up and move to the next preset position. In order not to lose the first-time recording of the target object on the other three sides of the preset position entering the preset area, when tracking the target object, the camera is rotated within a certain range for monitoring, for example, the center of the current screen is cruised around the center of the original preset position.
[0114] In order to record as many of the target objects as possible without losing the target object images entering the preset position from the other three sides, the monitoring cruise can be performed according to a certain period T. Since the monitoring range is expanded during the rotation cruise, the monitoring screen can be kept for a longer time t. Because the monitoring area is expanded during the rotation, even if an active target enters the monitoring area, it still takes a certain time t1. The T, t and t1 times can be adjusted according to the experience value, so that the target object image can be monitored for a longer time, and the images of other active targets entering the preset monitoring area can be recorded at the first time, until the target object leaves the outermost edge of the rotation area.
[0115] Before the dwell time at the current preset point ends, rotation monitoring can be performed, such as Fig.12 As shown in the figure, if a target object leaves one side of the preset monitoring area, if there is an active target on the opposite side, the target object will no longer be tracked. If there is an active target object at the boundary of the opposite side, the target object will be tracked. The center of the current screen performs rotation warning monitoring on the other three sides and the periphery around the original preset monitoring area according to a certain period, and can monitor the active target as much as possible.
[0116] If events occur on all sides of the current preset position, no screen adjustment is required. If multiple targets are detected moving out of a certain boundary, that is, the monitored target object drifts, you can consider enlarging the monitoring screen of the preset position for continuous monitoring, and you can adjust the monitoring screen range in the above manner, but it cannot affect the monitoring of the target object within the monitoring range of the monitoring screen of the original preset position.
[0117] In addition, the target object detected within a period of time, as well as its activity area within the preset position and the activity area outside the preset position can be recorded to generate a recommended preset position. Then push it to the user for confirmation. Continuously monitor the target object within the preset position. Since the monitored target object is active, when the target object leaves the monitoring area of the preset position, it is also necessary to capture the monitoring image of the target object as much as possible.
[0118] Here, by analyzing the activities of the target objects in the monitoring area, timely adjusting the preset position coordinates, variable magnification Z, cruising along the original preset center and repeating the cycle, the real-time and accuracy of monitoring can be improved, the monitoring target object screen will not be missed, and the monitoring effect can be improved. Analyzing the recent target objects and recommending reasonable preset positions to users can improve the real-time and accuracy of preset position settings.
[0119] Through this embodiment, cruising is performed back and forth in the direction of the target object and the original preset position direction to ensure that the active target and the preset position area are monitored at the same time, which can improve the comprehensiveness of information acquisition and the timeliness of event recognition.
[0120] In an exemplary embodiment, when the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is maintained at the first target value, the method further includes:
[0121] S91, when the time the target shooting device stays at the first shooting position reaches a third preset time, the target shooting device is rotated to a second shooting position among the N shooting positions through the target gimbal, and the value of the zoom parameter used by the target shooting device when shooting at the second shooting position is controlled to be a second target value.
[0122] In this embodiment, in order to ensure that the preset position areas corresponding to the N shooting positions can be monitored, the stay time corresponding to each shooting position can be configured, and the stay time corresponding to different shooting positions can be the same or different. Optionally, the stay time of the target shooting device at each shooting position in the N shooting positions can be the same, all of which are the third preset time. The order of rotation between the N shooting positions can be a preset order.
[0123] When the target shooting device stays at the first shooting position for a third preset time, at this time, regardless of whether the target event is detected, the target shooting device can be rotated to the second shooting position among the N shooting positions through the target gimbal, and the second shooting position can be the next shooting position of the first shooting position among the N shooting positions.
[0124] Before the target gimbal is rotated to the second shooting position, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is the first target value. After rotating to the second shooting position, the value of the zoom parameter used by the target shooting device when shooting at the second shooting position can be controlled to be the second target value, and the second target value is greater than or equal to the minimum value. Here, the second target value can be the first target value, that is, the value of the zoom parameter is kept unchanged.
[0125] Considering that the targets to be monitored at different shooting positions may be different, and whether the events to be identified occur at different shooting positions may also be different, the first target value may not be suitable as the value of the zoom parameter used by the target shooting device when shooting at the second shooting position. In this embodiment, the value of the zoom parameter used by the target shooting device when shooting at the second shooting position can be set to be the same as the current value, or to correspond to the preset shooting area at the second shooting position.
[0126] Here, the current value may be a default value set for N shooting positions, that is, when the target shooting device is rotated to any shooting position, the current value is used as the initial value of the zoom parameter of the target shooting device. And corresponding to the shooting area preset at the second shooting position means that in the third shooting area where the target shooting device shoots with the zoom parameter having the second target value, the proportion of the shooting area preset at the second shooting position is greater than or equal to the preset threshold.
[0127] Optionally, in order to improve the efficiency of image feature matching, the second target value may also be the last value of the zoom parameter saved and used when the target shooting device last shot at the second shooting position, that is, the value of the zoom parameter used by the target shooting device when shooting at the second shooting position when rotating to the next shooting position of the second shooting position.
[0128] Through this embodiment, when rotating to the next shooting position, the value of the zoom parameter used by the shooting device for shooting at the next shooting position is controlled to be the initial value of the zoom parameter used at the previous shooting position or the value corresponding to the shooting area preset at the shooting position, which can improve the flexibility of image shooting control.
[0129] It should be noted that, in the present application, the preset position may correspond to the middle position of the shooting area, and when the camera is rotated to a shooting position, the current shooting area is the area centered on the preset position. The preset position area may be an area (e.g., a rectangular area) centered on the threshold position, which may be a shooting area corresponding to a certain value of the zoom parameter, or a preset area included in the shooting area corresponding to a certain value of the zoom parameter, which may include the area of the fixed object to be monitored by the preset position. The preset position area may correspond to at least a portion of the image captured by the shooting device, or may not be in the image captured by the shooting device.
[0130] When the shooting device rotates at different preset positions, the value of the zoom parameter used by the shooting device may be a default value, or may be the value of the zoom parameter used when it rotated from the preset position to another preset position last time, so as to ensure that the shooting areas corresponding to the compared images are the same. The above default value may be the value of the zoom parameter corresponding to the preset position area. For different preset positions, since the areas to be monitored may be different, the default values corresponding to different preset positions may also be different. In addition, other alternative schemes may be adopted, as long as at least one of the value of the zoom parameter and the rotation shooting angle can be adjusted based on the difference in the pictures and whether the target event is recognized.
[0131] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0133] According to another aspect of an embodiment of the present application, a control device for implementing the control method of the above-mentioned photographing device is also provided. Fig.13 is a structural block diagram of a control device of an optional control method for a photographing device according to an embodiment of the present application, such as Fig.13 As shown, the device may include:
[0134] an acquisition unit 1302, configured to acquire, when the target platform rotates the target shooting device to the first shooting position, a first image captured by the target shooting device at the first shooting position, and acquire a second image, wherein the shooting positions to which the target platform allows the target shooting device to be rotated are preset N shooting positions, the N shooting positions include the first shooting position, and the second image is an image captured by the target shooting device at the first shooting position when the target platform rotates the target shooting device to the first shooting position once, and N is a positive integer greater than or equal to 2;
[0135] The first execution unit 1304 is connected to the acquisition unit 1302, and is used for, when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is greater than the minimum value of the zoom parameter, reducing the value of the zoom parameter to the first target value, and acquiring a third image obtained by shooting the target shooting device at the first shooting position with the zoom parameter having the first target value, wherein the second shooting area shot by the target shooting device with the zoom parameter having the first target value is larger than the first shooting area shot with the zoom parameter having the current value, and the first target value is greater than or equal to the minimum value;
[0136] The first holding unit 1306 is connected to the first execution unit 1304, and is used to maintain the value of the zoom parameter used by the target shooting device when shooting at the first shooting position at the first target value when the first target object entering the second shooting area but not entering the target shooting area is identified in the third image, wherein the target shooting area is a shooting area preset at the first shooting position, and both the first shooting area and the second shooting area include the target shooting area.
[0137] It should be noted that the acquiring unit 1302 in this embodiment can be used to execute the above step S202, the first executing unit 1304 in this embodiment can be used to execute the above step S204, and the first retaining unit 1306 in this embodiment can be used to execute the above step S206.
[0138] Through the above module, when the target gimbal rotates the target shooting device to the first shooting position, a first image captured by the target shooting device at the first shooting position is obtained, and a second image is obtained, wherein the shooting position to which the target gimbal allows the target shooting device to be rotated is a preset N shooting positions, the N shooting positions include the first shooting position, and the second image is an image captured by the target shooting device at the first shooting position when the target gimbal rotates the target shooting device to the first shooting position once, and N is a positive integer greater than or equal to 2; when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is greater than the minimum value of the zoom parameter, the value of the zoom parameter is reduced to the first target value, and the zoom parameter of the target shooting device at the first shooting position with the value of the first target value is obtained. The invention relates to a third image obtained by shooting a second image, wherein a second shooting area shot by the target shooting device with a zoom parameter having a value of the first target value is larger than a first shooting area shot with a zoom parameter having a value of the current value, and the first target value is greater than or equal to a minimum value; in a case where a first target object entering the second shooting area but not entering the target shooting area is identified in the third image, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is maintained at the first target value, wherein the target shooting area is a shooting area preset at the first shooting position, and the first shooting area and the second shooting area both include the target shooting area, thereby solving the problem of poor timeliness of event recognition due to easy picture loss when shooting at a fixed position in the control method of the shooting device in the related art, and improving the timeliness of event recognition.
[0139] In an exemplary embodiment, the above device further comprises:
[0140] The first adjustment unit is used to adjust the value of the zoom parameter used by the target shooting device when shooting at the first shooting position to the current value when the first target object entering the second shooting area and the target shooting area is identified in the third image.
[0141] In an exemplary embodiment, the apparatus further comprises:
[0142] The second holding unit is used to keep the value of the zoom parameter used by the target shooting device when shooting at the first shooting position at the current value when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is equal to the minimum value.
[0143] In an exemplary embodiment, the apparatus further comprises:
[0144] The second execution unit is used to rotate the shooting angle of the target shooting device at the first shooting position when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is equal to the minimum value, and identify the target event in the image captured by the target shooting device after the shooting angle is rotated.
[0145] In an exemplary embodiment, the second execution unit includes one of the following:
[0146] A first recognition module is used to recognize whether there is a moving target object in the image captured by the target shooting device after the shooting angle is rotated;
[0147] The second recognition module is used to recognize whether there is a target object entering a target shooting area in the image captured by the target shooting device after the shooting angle is rotated, wherein the target shooting area is a shooting area preset at the first shooting position.
[0148] In an exemplary embodiment, the apparatus further comprises:
[0149] The second adjustment unit is used to adjust the shooting angle of the target shooting device at the first shooting position to a preset angle when the target event is recognized in the image captured by the target shooting device after the shooting angle is rotated, wherein the preset angle is the shooting angle of the target shooting device at the first shooting position before the shooting angle of the target shooting device is rotated to shoot at the first shooting position.
[0150] In an exemplary embodiment, the apparatus further comprises:
[0151] A third execution unit is used to adjust the value of the zoom parameter used by the target shooting device when shooting at the first shooting position and / or rotate the shooting angle of the target shooting device when shooting at the first shooting position, when the first image and the second image are different and a moving second target object is detected in the image captured by the target shooting device at the first shooting position, so that the second target object appears in the shooting area of the target shooting device, and the shooting area of the target shooting device includes the target shooting area, wherein the target shooting area is a shooting area preset at the first shooting position.
[0152] In an exemplary embodiment, the apparatus further comprises:
[0153] A fourth execution unit is configured to rotate a shooting angle of the target shooting device at a first shooting position to make the second target object appear in the shooting area of the target shooting device when the zoom parameter takes a minimum value, the second target object moves to a first boundary in the shooting area of the target shooting device, the boundary in the target shooting area overlaps with a second boundary in the shooting area of the target shooting device, and the shooting area of the target shooting device includes the target shooting area, so that the second target object appears in the shooting area of the target shooting device, wherein the second boundary is a boundary opposite to the first boundary; and when the shooting angle of the rotating target shooting device at the first shooting position reaches a first preset time length, adjust the shooting angle of the target shooting device at the first shooting position to a preset angle, wherein the preset angle is a shooting angle of the target shooting device at the first shooting position before the shooting angle of the rotating target shooting device at the first shooting position is reached.
[0154] In an exemplary embodiment, the fourth execution unit is also used to repeat the following steps after the shooting angle of the target shooting device at the first shooting position is rotated for the first time so that the second target object appears in the shooting area of the target shooting device, until the target gimbal rotates the target shooting device to the second shooting position among the N shooting positions: when the shooting angle of the rotating target shooting device at the first shooting position reaches a first preset time, the shooting angle of the target shooting device at the first shooting position is adjusted to a preset angle; when the shooting angle of the target shooting device at the first shooting position is maintained at the preset angle for a second preset time, the shooting angle of the target shooting device at the first shooting position is rotated so that the second target object appears in the shooting area of the target shooting device.
[0155] In an exemplary embodiment, the apparatus further comprises:
[0156] A fifth execution unit is used to rotate the target shooting device to a second shooting position among N shooting positions through a target gimbal, and control the value of the zoom parameter used when the target shooting device shoots at the second shooting position to a second target value, while maintaining the value of the zoom parameter used when the target shooting device shoots at the first shooting position at the first target value and the time the target shooting device stays at the first shooting position reaches a third preset time, wherein the time the target shooting device stays at each of the N shooting positions is the third preset time, and the second target value is greater than or equal to the minimum value; wherein the second target value is the same as the current value, or the second target value corresponds to a shooting area preset at the second shooting position.
[0157] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0158] According to another aspect of the embodiments of the present application, a storage medium is further provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of any of the control methods of the photographing device in the embodiments of the present application.
[0159] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0160] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0161] S1, when the target gimbal rotates the target shooting device to a first shooting position, obtaining a first image captured by the target shooting device at the first shooting position, and obtaining a second image, wherein the shooting positions to which the target gimbal allows the target shooting device to be rotated are preset N shooting positions, the N shooting positions include the first shooting position, and the second image is an image captured by the target shooting device at the first shooting position when the target gimbal rotates the target shooting device to the first shooting position once, and N is a positive integer greater than or equal to 2;
[0162] S2, when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is greater than the minimum value of the zoom parameter, the value of the zoom parameter is reduced to the first target value, and a third image is obtained by shooting the target shooting device at the first shooting position with the zoom parameter having the first target value, wherein a second shooting area shot by the target shooting device with the zoom parameter having the first target value is larger than a first shooting area shot with the zoom parameter having the current value, and the first target value is greater than or equal to the minimum value;
[0163] S3, when a first target object entering the second shooting area but not entering the target shooting area is identified in the third image, a value of a zoom parameter used by the target shooting device when shooting at the first shooting position is maintained at a first target value, wherein the target shooting area is a shooting area preset at the first shooting position, and both the first shooting area and the second shooting area include the target shooting area.
[0164] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0165] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0166] According to another aspect of an embodiment of the present application, an electronic device for implementing the control method of the above-mentioned photographing equipment is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0167] Fig.14 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Fig.14 As shown, it includes a processor 1402, a communication interface 1404, a memory 1406 and a communication bus 1408, wherein the processor 1402, the communication interface 1404 and the memory 1406 communicate with each other through the communication bus 1408, wherein,
[0168] Memory 1406, used for storing computer programs;
[0169] The processor 1406 is used to implement the following steps when executing the computer program stored in the memory 1406:
[0170] S1, when the target gimbal rotates the target shooting device to a first shooting position, obtaining a first image captured by the target shooting device at the first shooting position, and obtaining a second image, wherein the shooting positions to which the target gimbal allows the target shooting device to be rotated are preset N shooting positions, the N shooting positions include the first shooting position, and the second image is an image captured by the target shooting device at the first shooting position when the target gimbal rotates the target shooting device to the first shooting position once, and N is a positive integer greater than or equal to 2;
[0171] S2, when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is greater than the minimum value of the zoom parameter, the value of the zoom parameter is reduced to the first target value, and a third image is obtained by shooting the target shooting device at the first shooting position with the zoom parameter having the first target value, wherein a second shooting area shot by the target shooting device with the zoom parameter having the first target value is larger than a first shooting area shot with the zoom parameter having the current value, and the first target value is greater than or equal to the minimum value;
[0172] S3, when a first target object entering the second shooting area but not entering the target shooting area is identified in the third image, a value of a zoom parameter used by the target shooting device when shooting at the first shooting position is maintained at a first target value, wherein the target shooting area is a shooting area preset at the first shooting position, and both the first shooting area and the second shooting area include the target shooting area.
[0173] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.14 The communication interface is used for communication between the electronic device and other devices.
[0174] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0175] As an example, the memory 1406 may include, but is not limited to, the acquisition unit 1302, the first execution unit 1304, and the first retention unit 1306 in the control device of the shooting device. In addition, it may also include, but is not limited to, other module units in the control device of the shooting device, which will not be repeated in this example.
[0176] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0177] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0178] It can be understood by those skilled in the art that Fig.14 The structure shown is for illustration only. The device for implementing the above-mentioned control method of the rotating device may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Fig.14 The structure of the electronic device is not limited. Fig.14 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.14 Different configurations shown.
[0179] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0180] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0181] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0182] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0183] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0184] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0185] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0186] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for controlling a photographing device, characterized in that: include: When the target gimbal rotates the target shooting device to a first shooting position, a first image captured by the target shooting device at the first shooting position is acquired, and a second image is acquired, wherein the shooting positions to which the target gimbal allows the target shooting device to be rotated are preset N shooting positions, the N shooting positions include the first shooting position, and the second image is an image captured by the target shooting device at the first shooting position when the target gimbal rotates the target shooting device to the first shooting position once, and N is a positive integer greater than or equal to 2; In the case that the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is greater than the minimum value of the zoom parameter, the value of the zoom parameter is reduced to a first target value, and a third image is obtained by shooting the target shooting device at the first shooting position with the zoom parameter having the first target value, wherein a second shooting area shot by the target shooting device with the zoom parameter having the first target value is larger than a first shooting area shot with the zoom parameter having the current value, and the first target value is greater than or equal to the minimum value; When a first target object entering the second shooting area but not entering the target shooting area is identified in the third image, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is maintained at the first target value, wherein the target shooting area is a shooting area preset at the first shooting position, and both the first shooting area and the second shooting area include the target shooting area.
2. The method according to claim 1, characterized in that The method further comprises: When the first target object entering the second shooting area and the target shooting area is identified in the third image, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is adjusted to the current value.
3. The method according to claim 1, characterized in that The method further comprises: When the first image and the second image are identical and the current value of the zoom parameter of the target shooting device is equal to the minimum value, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is maintained at the current value.
4. The method according to claim 3, characterized in that The method further comprises: When the first image and the second image are identical and the current value of the zoom parameter of the target shooting device is equal to the minimum value, the shooting angle of the target shooting device at the first shooting position is rotated, and the target event is identified in the image captured by the target shooting device after the shooting angle is rotated.
5. The method according to claim 4, characterized in that Recognizing a target event in the image captured by the target shooting device after rotating the shooting angle includes one of the following: identifying whether there is a moving target object in the image captured by the target shooting device after rotating the shooting angle; After rotating the shooting angle, it is identified whether there is a target object entering a target shooting area in the image captured by the target shooting device, wherein the target shooting area is a shooting area preset at the first shooting position.
6. The method according to claim 4, characterized in that The method further comprises: In a case where the target event is identified in the image captured by the target shooting device after rotating the shooting angle, the shooting angle of the target shooting device at the first shooting position is adjusted to a preset angle, wherein the preset angle is the shooting angle of the target shooting device at the first shooting position before the shooting angle of the target shooting device at the first shooting position is rotated.
7. The method according to claim 1, characterized in that The method further comprises: In a case where the first image and the second image are different and a moving second target object is detected in the image captured by the target shooting device at the first shooting position, the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is adjusted and / or the shooting angle of the target shooting device when shooting at the first shooting position is rotated, so that the second target object appears in the shooting area of the target shooting device, and the shooting area of the target shooting device includes a target shooting area, wherein the target shooting area is a shooting area preset at the first shooting position.
8. The method according to claim 7, characterized in that The method further comprises: In the case where the zoom parameter is the minimum value, the second target object moves to a first boundary in the shooting area of the target shooting device, the boundary in the target shooting area overlaps with a second boundary in the shooting area of the target shooting device, and the shooting area of the target shooting device includes the target shooting area, rotating the shooting angle of the target shooting device at the first shooting position so that the second target object appears in the shooting area of the target shooting device, wherein the second boundary is a boundary opposite to the first boundary; When the shooting angle of the target shooting device at the first shooting position is rotated to reach a first preset time, the shooting angle of the target shooting device at the first shooting position is adjusted to a preset angle, wherein the preset angle is the shooting angle of the target shooting device at the first shooting position before the shooting angle of the target shooting device at the first shooting position is rotated.
9. The method according to claim 8, characterized in that The method further comprises: rotating the shooting angle of the target shooting device at the first shooting position so that the second target object appears in the shooting area of the target shooting device, and adjusting the shooting angle of the target shooting device at the first shooting position to a preset angle when the shooting angle of the target shooting device at the first shooting position reaches a first preset time, further comprising: After the shooting angle of the target shooting device at the first shooting position is rotated for the first time so that the second target object appears in the shooting area of the target shooting device, the following steps are repeatedly performed until the target gimbal rotates the target shooting device to a second shooting position among the N shooting positions: When the shooting angle of the target shooting device at the first shooting position is rotated to reach a first preset time, adjusting the shooting angle of the target shooting device at the first shooting position to the preset angle; When the shooting angle of the target shooting device at the first shooting position is maintained at the preset angle for a second preset time, the shooting angle of the target shooting device at the first shooting position is rotated so that the second target object appears in the shooting area of the target shooting device.
10. The method according to any one of claims 1 to 9, characterized in that In the case where the value of the zoom parameter used by the target shooting device when shooting at the first shooting position is maintained at the first target value, the method further includes: When the time duration that the target shooting device stays at the first shooting position reaches a third preset time duration, the target shooting device is rotated to a second shooting position among the N shooting positions by the target gimbal, and the value of the zoom parameter used when the target shooting device shoots at the second shooting position is controlled to be a second target value, wherein the time duration that the target shooting device stays at each shooting position among the N shooting positions is the third preset time duration, and the second target value is greater than or equal to the minimum value; The second target value is the same as the current value, or the second target value corresponds to a shooting area preset at the second shooting position.
11. A control device for a photographing device, characterized in that: include: an acquisition unit, configured to acquire, when a target platform rotates a target shooting device to a first shooting position, a first image captured by the target shooting device at the first shooting position, and to acquire a second image, wherein the shooting positions to which the target platform allows the target shooting device to be rotated are preset N shooting positions, the N shooting positions including the first shooting position, and the second image is an image captured by the target shooting device at the first shooting position when the target platform rotates the target shooting device to the first shooting position once, and N is a positive integer greater than or equal to 2; a first execution unit, configured to, when the first image and the second image are the same and the current value of the zoom parameter of the target shooting device is greater than the minimum value of the zoom parameter, reduce the value of the zoom parameter to a first target value, and obtain a third image obtained by shooting the target shooting device at the first shooting position with the zoom parameter having the first target value, wherein a second shooting area shot by the target shooting device with the zoom parameter having the first target value is larger than a first shooting area shot with the zoom parameter having the current value, and the first target value is greater than or equal to the minimum value; a first holding unit, for maintaining the value of the zoom parameter used by the target shooting device when shooting at the first shooting position at the first target value, when a first target object entering the second shooting area but not entering the target shooting area is identified in the third image, wherein the target shooting area is a shooting area preset at the first shooting position, and both the first shooting area and the second shooting area include the target shooting area.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 10 when executed.
13. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 10 through the computer program.
Citation Information
Patent Citations
Automatic mobile target tracking and shooting method
CN101072332A
Dictation real-time detection method and electronic equipment
CN111031232A