Object tracking method and device based on double cameras, electronic equipment and storage medium
By using a dual-camera object tracking method in the guard camera, using the preset pixel coordinate system and lens linkage, the problem of poor target tracking in the existing technology is solved, and efficient target monitoring and detailed display is achieved.
Patent Information
- Application Number
- CN202311691110.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2025-06-10
AI Technical Summary
The existing guard camera technology has shortcomings in target tracking. Single wide-angle lenses are difficult to provide clear target details, while dual-lens solutions fail to effectively achieve target tracking.
The object tracking method based on dual cameras is adopted, through the linkage between a wide-angle lens and a zoom lens, the motion state of the target object and the coordinates of the tracking point position are determined using the preset pixel coordinate system, and the zoom lens is driven to track the target object.
Effective tracking and monitoring of target objects is achieved, and the utilization rate of monitoring vision and the clarity of displaying target details is improved.
Smart Images

Figure CN120128787A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and in particular, to technical fields such as machine vision and security. Background Art
[0002] In the prior art, there are some limitations in the technology of surveillance cameras. For example, although a single wide-angle lens can capture moving objects when used alone for surveillance, the detailed features of the moving objects are not clearly shown. And for the dual-lens surveillance solution based on a wide-angle lens and a zoom lens, although the monitoring field of view is expanded, an effective target tracking method is not provided. Summary of the Invention
[0003] The present disclosure provides an object tracking method, apparatus, electronic device, and storage medium based on dual cameras, which are used to achieve dual-camera linkage to track a target object.
[0004] According to one aspect of the present disclosure, there is provided an object tracking method based on dual cameras, wherein a first monitoring area of a wide-angle lens is included in a second monitoring area of a zoom lens, and the relative position relationship between the first monitoring area and the second monitoring area remains unchanged. The method includes:
[0005] Based on a first image collected by the wide-angle lens for the first monitoring area, determining motion state information of a target object and position coordinates of a tracking point of the target object in the first image;
[0006] Based on the position coordinates of the tracking point, the motion state information of the target object, and the current state of a stepping motor of the zoom lens, driving the zoom lens to track the target object;
[0007] Wherein, the position coordinates of the tracking point are coordinates in a preset pixel coordinate system, the preset pixel coordinate system is established based on the relative position relationship between the first monitoring area and the second monitoring area, and the same pixel position coordinate value in the first image and the second image corresponds to the same position point in the physical world;
[0008] The second image is an image collected by the zoom lens for the entire area of the second monitoring area.
[0009] According to another aspect of the present disclosure, there is provided an object tracking apparatus based on dual cameras, wherein a first monitoring area of a wide-angle lens is included in a second monitoring area of a zoom lens, and the relative position relationship between the first monitoring area and the second monitoring area remains unchanged. The apparatus includes:
[0010] A determination module, which determines motion state information of a target object and position coordinates of a tracking point of the target object in a first image based on a first image collected by the wide-angle lens for the first monitoring area;
[0011] A tracking module, based on the position coordinates of the tracking points, the motion state information of the target object, and the current state of the stepping motor of the zoom lens, drives the zoom lens to track the target object;
[0012] Among them, the position coordinates of the tracking points are coordinates in a preset pixel coordinate system, and the preset pixel coordinate system is established based on the relative position relationship between the first monitoring area and the second monitoring area, and the same pixel position coordinate value in the first image and the second image corresponds to the same position point in the physical world;
[0013] The second image is an image obtained by the zoom lens through panoramic acquisition of the second monitoring area.
[0014] According to another aspect of the present disclosure, there is provided an electronic device, including:
[0015] At least one processor; and
[0016] A memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method of any embodiment in the present disclosure.
[0018] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method of any embodiment in the present disclosure.
[0019] According to another aspect of the present disclosure, there is provided a computer program product, including a computer program, which when executed by a processor, implements the method of any embodiment in the present disclosure.
[0020] In the embodiments of the present disclosure, the same target is located in the dual camera lens based on the preset pixel coordinate system, thereby making full use of the dual lenses to track the target object.
[0021] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0023] Figure 1 is a schematic diagram of the relative positions of the first monitoring area and the second monitoring area according to an embodiment of the present disclosure;
[0024] Figure 2Schematic flowchart of an object tracking method based on dual cameras according to an embodiment of the present disclosure;
[0025] Figure 3 The following is a schematic diagram of sub - regions of a second monitoring area according to an embodiment of the present disclosure;
[0026] Figure 4 Schematic diagram of the division of a second monitoring area according to another embodiment of the present disclosure;
[0027] Figure 5 Schematic diagram of constructing a preset pixel coordinate system based on a second image according to an embodiment of the present disclosure;
[0028] Figure 6 Schematic diagram of constructing a preset pixel coordinate system based on a third image according to an embodiment of the present disclosure;
[0029] Figure 7 Schematic diagram of the motion trajectory of a target object in two consecutive frames of a first image according to an embodiment of the present disclosure;
[0030] Figure 8 Schematic diagram of a target object and the current stepping - motor position according to an embodiment of the present disclosure;
[0031] Figure 9 Schematic diagram of the division of a unit stepping distance according to an embodiment of the present disclosure;
[0032] Figure 10 Schematic diagram of a stepping motor tracking a target object according to an embodiment of the present disclosure;
[0033] Figure 11 Schematic diagram of the structure of an object tracking device based on dual cameras according to an embodiment of the present disclosure;
[0034] Figure 12 Block diagram of an electronic device for implementing the object tracking method based on dual cameras according to an embodiment of the present disclosure. Detailed implementation manners
[0035] The following makes an explanation of exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for clarity and conciseness, descriptions of well - known functions and structures are omitted in the following description.
[0036] In addition, it should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0037] With the development of monitoring technology, most of the current market care cameras basically have AI (Artificial Intelligence) functions such as moving object recognition, human figure recognition, and vehicle recognition in the video. Although single-lens products can recognize the appearance and movement of certain objects in the video and can also track objects through a pan-tilt unit, due to the requirement of a large wide-angle for single-lens products, the feature details of objects are not clearly shown. And most dual-lens products are only for expanding the monitoring angle and do not fully utilize the dual-lens to achieve target tracking.
[0038] In view of this, the embodiments of the present disclosure provide an object tracking method based on dual cameras. In this method, the first monitoring area of the wide-angle lens is included in the second monitoring area of the zoom lens, and the relative positional relationship between the first monitoring area and the second monitoring area remains unchanged.
[0039] As Figure 1 shown in FIGS. a and b, the wide-angle lens is responsible for the first monitoring area, and the zoom lens is responsible for the second monitoring area. In order to achieve dual-lens linkage to track the target object, the first monitoring area is included in the second monitoring area in the embodiments of the present disclosure. For example Figure 1 in FIG. a, the first monitoring area is exactly located in the central area of the second monitoring area, Figure 1 in FIG. b, the first monitoring area is located on the left side of the second monitoring area, both of which belong to the first monitoring area being included in the second monitoring area.
[0040] It should be understood that regardless of which inclusion relationship, the spatial positional relationship between the two monitoring areas is stable and unchanged. It can be understood that once the monitoring area of the wide-angle lens is determined, the monitoring area of the zoom lens will also be fixed. When the wide-angle lens changes the monitoring area, the monitoring area of the zoom lens can change accordingly, and the relative positional relationship between the monitoring areas of the two remains unchanged.
[0041] In a possible implementation, the wide-angle lens can remain unchanged, and the zoom lens is driven by a stepper motor to monitor a relatively large second monitoring area. It should be understood that since the zoom lens can view details, its maximum monitoring range is the second monitoring area, rather than the entire second monitoring area can be included in the viewfinder range at once by the zoom lens.
[0042] To achieve dual-camera linkage and better complete the monitoring task, in view of the performance limitations of the hardware devices, the embodiments of the present disclosure propose a simple method to achieve the position positioning of the same object by the two lenses. In this method, no complex spatial mapping method is required, and only the pixel positions are used to achieve the tracking of the target position in the two lenses. Specifically, it may include the following:
[0043] S101, based on the first image collected by the wide-angle lens for the first monitoring area, determine the motion state information of the target object and the position coordinates of the tracking point of the target object in the first image.
[0044] S102, based on the position coordinates of the tracking point, the motion state information of the target object, and the current state of the stepper motor of the zoom lens, drive the zoom lens to track the target object.
[0045] Among them, the position coordinates of the tracking point are the coordinates in the preset pixel coordinate system, and the preset pixel coordinate system is established based on the relative position relationship between the first monitoring area and the second monitoring area, and the same pixel position coordinate value in the first image and the second image corresponds to the same position point in the physical world.
[0046] The second image is an image collected by the zoom lens for the entire area of the second monitoring area.
[0047] It can be seen from this that the second image is not the original image collected by the zoom lens, but an image formed after scanning the entire area of the second monitoring area.
[0048] In the embodiments of the present disclosure, through the preset pixel coordinate system, the same pixel position in the first image collected by the wide-angle lens and the second image of the zoom lens represents the same coordinate position in the actual physical world. Thus, without a complex position mapping relationship between the wide-angle lens and the zoom lens, the wide-angle lens and the zoom lens can work together to achieve the purpose of tracking the target object. In the implementation process, the position of the zoom lens is adjusted in real time through the motion state information of the target object and the position coordinates of the tracking point, so that the target object is always within the viewfinder range of the zoom lens. In short, the embodiments of the present disclosure provide a simple solution that can quickly achieve target tracking.
[0049] In summary, in the implementation of the present disclosure, it is necessary to preset the pixel coordinate system first, and then drive the zoom lens to track the target object based on this coordinate system. For the convenience of understanding, the following will explain these two parts separately.
[0050] I. Construct a preset pixel coordinate system
[0051] In some embodiments, the monitoring range of the stepping motor of the zoom lens is fixed relative to the wide-angle lens. On this basis, the pixel coordinates of the same position in the monitoring areas of the two lenses are calibrated, and the pixel relationship mapping between the two areas can be completed.
[0052] In some possible embodiments, a preset pixel coordinate system can be constructed based on the second image collected by the zoom lens. The specific steps are as follows:
[0053] Step A1: Control the stepping motor to perform block-wise acquisition on the second monitoring area to obtain multiple image blocks of the second monitoring area.
[0054] For example, as shown in Figure a, the solid rectangular frame is the second monitoring area, and the second area is divided into 6 small areas. For example, each small square with a label in Figure a. By controlling the stepping motor to perform image acquisition on each small area respectively, image blocks within each area can be obtained, as shown in Figure b. Thus, the sub-region image acquisition of the second monitoring area is realized. Figure 3 As shown in Figure a, the solid rectangular frame is the second monitoring area, and the second area is divided into 6 small areas. For example, each small square with a label in Figure a. By controlling the stepping motor to perform image acquisition on each small area respectively, image blocks within each area can be obtained, as shown in Figure b. Thus, the sub-region image acquisition of the second monitoring area is realized. Figure 3 As shown in Figure b, the sub-region image acquisition of the second monitoring area is realized.
[0055] Figure 3 Figure shows dividing the second monitoring area into multiple image blocks, and then controlling the stepping motor to perform block-wise acquisition on the second monitoring area. In another possible implementation, the rotation range of the stepping motor of the zoom lens can also be sampled to obtain multiple sampling positions, and then image acquisition is performed on the second monitoring area at each sampling position. Eventually, the effect of block-wise acquisition of the second monitoring area can also be achieved.
[0056] For example Figure 4 As shown, control the horizontal and vertical stepping motors to set a series of sampling points within the movable range. For example Figure 4 the solid dots in. The sampling points of the horizontal stepping motor and the sampling points of the vertical stepping motor are combined in pairs to obtain multiple lens positions. For example, sampling each lens respectively to obtain image blocks at each lens position. Thus, the image acquisition at multiple lens positions in the second monitoring area is realized.
[0057] Step A2: Perform stitching processing on the multiple image blocks to obtain the second image.
[0058] For example Figure 3 stitching the images collected in Figure b, the second image as shown in Figure can be obtained. Figure 4 As shown in Figure.
[0059] Step A3: Based on the second image and the third image acquired for the first monitoring area, construct a preset pixel coordinate system so that the pixel position coordinates of the same position point in the first monitoring area are the same in the third image and the second image.
[0060] As Figure 5 shown, taking the vertex A at the upper left corner of the second image acquired by the zoom lens as the point (0, 0) to construct a pixel coordinate system. In order to make the coordinates of the vertex B at the upper left corner of the third image the same in the second image, then in the third image, it is necessary to take point C as the point (0, 0) to construct a preset coordinate system. During implementation, the image acquired by the wide-angle lens can be extended according to the relative position relationship between the two monitoring areas, so that the image acquired by the wide-angle lens is expressed in the pixel coordinate system of the second image.
[0061] Of course, during implementation, a preset pixel coordinate system can also be constructed based on the starting position of the image acquired by the wide-angle lens. As Figure 6 shown, taking point A in the third image as the vertex to construct a coordinate system, and taking the same point A as the vertex in the second image as well. As Figure 6 shown, the coordinates of point B in the third image and point B in the second image are the same.
[0062] In the embodiments of the present disclosure, by comparing the third image of the first monitoring area with the second image, a preset pixel coordinate system is established to ensure that the pixel position coordinates of the same-position points are the same in these two images, providing data support for driving the zoom lens to track the target object subsequently.
[0063] II. Driving the zoom lens to track the target object
[0064] After establishing the preset pixel coordinate system, the tracking of the target object in the embodiments of the present disclosure can be defined based on this pixel coordinate system. For example, the motion speed and motion direction of the target object can be described with reference to this pixel coordinate system.
[0065] In some embodiments, based on the first image acquired by the wide-angle lens for the first monitoring area, determining the motion state information of the target object can be implemented as:
[0066] In the image sequence acquired by the wide-angle lens for the first monitoring area, obtain continuous P frames of images including the first image; where P is a positive integer greater than 1; in the continuous P frames of images, respectively identify the position coordinates of the target object; based on the position coordinates of the target object in the continuous P frames of images, determine the motion state information of the target object.
[0067] As Figure 7 shown, Figure 7Figure a and Figure b are two consecutive frames of images obtained successively. The dashed box in the figure is the recognized target object, and points A and B are the position coordinates of the target object in the two consecutive frames of images respectively.
[0068] Through the preset coordinate system constructed above, if the coordinate of point A is (200, 200) and the coordinate of point B is (300, 400), the motion state of the target object can be determined by the horizontal and vertical coordinates of points A and B. For example, regarding the motion direction and motion speed, in the embodiments of the present disclosure, for the sake of simplifying the calculation, both can be decomposed into two components in the horizontal direction and the vertical direction.
[0069] Taking Figure 7 the two frames of images a and b obtained successively as an example. In the horizontal direction, the abscissa 400 - 200 > 0, indicating that the target object moves to the right in the horizontal direction based on the preset coordinate system. Similarly, in the vertical direction, 300 - 200 > 0, indicating that the target object moves downward in the vertical direction based on the preset coordinate system.
[0070] It can be understood that the moving direction of the target object in the horizontal direction can be determined based on the change in the abscissa of the target object in consecutive P frames of images. When the abscissa position of the target object in consecutive P frames of images becomes larger, it indicates that the moving direction of the target object in the horizontal direction is to the right. On the contrary, when the abscissa position of the target object in consecutive P frames of images becomes smaller, it indicates that the moving direction of the target object in the horizontal direction is to the left.
[0071] Similarly, the moving direction of the target object in the vertical direction can be determined based on the change in the ordinate of the target object in consecutive P frames of images. When the ordinate position of the target object in consecutive P frames of images becomes larger, it indicates that the moving direction of the target object in the vertical direction is downward. On the contrary, when the ordinate position of the target object in consecutive P frames of images becomes smaller, it indicates that the moving direction of the target object in the vertical direction is upward.
[0072] In the horizontal direction, the first motion speed of the target object can be obtained based on the following formula:
[0073] Vo = |X 2 - X 1 | / t (1)
[0074] In formula (1), Vo represents the first motion speed of the target object in the horizontal direction, X 2 represents the abscissa of the target object in the current frame, X 1 represents the abscissa of the target object in the previous frame of the current frame, and t represents the time interval between two consecutive frames.
[0075] In the vertical direction, the first motion speed of the target object can be obtained based on the following formula:
[0076] V 1 = |Y 2 - Y 1 | / t (2)
[0077] In formula (2), V 1 represents the first motion speed of the target object in the vertical direction, Y 2 represents the ordinate of the target object in the current frame, and Y 1 represents the ordinate of the target object in the previous frame of the current frame, and t represents the time interval between two consecutive frames.
[0078] It should be noted that when P is greater than 2, the speed between every two adjacent frames can be obtained based on expressions (1) and (2), and then the average speed can be finally obtained to get the first motion speed.
[0079] In the embodiments of the present disclosure, by analyzing the change of the position coordinates of the target object in consecutive P-frame images, information such as the motion trajectory and speed of the target object is obtained, so as to provide data support for driving the stepping motor subsequently.
[0080] In some embodiments, based on the first image collected by the wide-angle lens for the first monitoring area, determining the position coordinates of the tracking point of the target object in the first image can be implemented as: based on the position coordinates of the target object in the first image and the side lengths of the rectangular position frame of the target object constructed based on the position coordinates in the first image, determining the center point coordinates of the rectangular position frame to obtain the position coordinates of the tracking point of the target object in the first image.
[0081] As Figure 8 shown, if point A in the figure is the position of the target object in the first image, with coordinates (300, 400), the horizontal side length of the rectangular frame of the target object in the first image is 200 pixels, and the vertical side length is 400 pixels. The coordinates of the center point B of the rectangular frame can be obtained through the coordinates of point A and the horizontal and vertical side lengths of the rectangular frame. For example, the abscissa of point B is 300 + 200 / 2 = 400, and the ordinate is 400 + 400 / 2 = 600. Then the coordinates of point B are (400, 600).
[0082] In some embodiments, a rectangular frame can be constructed based on the whole body of the animal.
[0083] In other embodiments, a rectangular frame can be constructed based on the key parts of the target object. For example, if the target object is a car, the constructed rectangular frame can be the area where the license plate is located.
[0084] In the embodiments of the present disclosure, by constructing a rectangular frame of the target object in the first image, the center point coordinates of the target object are obtained, so that when the target object moves, the position of the target object in the first image can still be tracked.
[0085] For ease of description and calculation, in the embodiments of the present disclosure, the following definitions are made for the corresponding key parameters:
[0086] 1). The motion state of the target object includes the first motion speed and the first motion direction of the target object;
[0087] 2). The stepping motor includes a horizontal stepping motor and a vertical stepping motor;
[0088] 3). The current state of the stepping motor includes the second motion speed, the second motion direction of the horizontal stepping motor, and the abscissa of the horizontal stepping motor in the preset pixel coordinate system (that is, the current position of the horizontal stepping motor is expressed by its abscissa position in the preset pixel coordinate system);
[0089] Similarly, the third motion speed, the third motion direction of the vertical stepping motor, and the ordinate of the vertical stepping motor in the preset pixel coordinate system (that is, the current position of the vertical stepping motor is expressed by the ordinate position in the pixel position of the preset pixel coordinate system);
[0090] 4). Among them, the first motion speed, the second motion speed, and the third motion speed are in units of pixels; the first motion direction, the second motion direction, and the third motion direction are defined based on the horizontal direction and the vertical direction of the preset pixel coordinate system.
[0091] In the embodiments of the present disclosure, the motion direction of the target object and the current motion direction of the stepping motor are both defined based on the horizontal direction and the vertical direction of the constructed preset pixel coordinate system. The motion speed of the target object and the current motion speed of the stepping motor are both expressed based on the number of pixels in the constructed preset pixel coordinate system. In this way, the linkage of the wide-angle lens and the zoom lens can be simply realized.
[0092] For ease of understanding, the control of the horizontal stepping motor and the vertical stepping motor will be described separately below.
[0093] 1). Control of the horizontal stepping motor
[0094] For the horizontal stepping motor, the first tracking direction, the first tracking speed, and the first tracking steps of the horizontal stepping motor for tracking the target object are determined based on the following method:
[0095] Based on the abscissa in the tracking point position coordinates of the target object and the abscissa of the horizontal stepping motor, the first tracking direction of the horizontal stepping motor is determined;
[0096] AsFigure 8 As shown in the figure, point C in the figure is the position of the current stepping motor, where the abscissa is the position of the horizontal stepping motor in the stepping motor. For example, if the coordinates of point C are (1000, 800), then 1000 - 300 > 0, indicating that the horizontal stepping motor is currently on the right side of the target object. At this time, the first tracking direction is to the left. On the contrary, the first tracking direction is to the right.
[0097] Based on the requirement of adjusting the position of the horizontal stepping motor to the abscissa position in the tracking point position coordinates within the preset tracking response time, determine the first tracking speed based on the first tracking direction, the horizontal direction speed component in the moving speed of the target object, and the gap between the abscissas of the horizontal stepping motor and the target object in the preset pixel coordinate system;
[0098] For example, if the rotation direction of the horizontal stepping motor is the same as the target movement direction, the first tracking speed can be calculated by the following formula:
[0099] V 2 = (|Xm - Xo|) / T 0 + Vo (3)
[0100] If the rotation direction of the horizontal stepping motor is opposite to the target movement direction, the first tracking speed can be calculated by the following formula:
[0101] V 2 = (|Xm - Xo|) / T 0 – Vo (4)
[0102] In formulas (3) and (4), V 2 represents the first tracking speed of the horizontal stepping motor; Xm represents the abscissa of the horizontal stepping motor (i.e., the current position of the horizontal stepping motor); Xo represents the abscissa position of the target object in the preset pixel coordinate system; T 0 represents the response time of the horizontal stepping motor; Vo represents the horizontal direction speed component of the target object in the horizontal direction.
[0103] Based on the first tracking speed, the first unit stepping distance, and the preset tracking response time, determine the first tracking steps of the horizontal stepping motor;
[0104] For the first tracking steps of the horizontal stepping motor, it can be calculated by the following formula:
[0105] STEP 0 = V 2 * T 0 / D 0 (6)
[0106] In formula (6), STEP 0Indicates the first tracking step number of the horizontal stepper motor, V 2 That is, the first tracking speed of the above horizontal stepper motor, T 0 Indicates the response time of the horizontal stepper motor, D 0 Indicates the first unit step distance.
[0107] Among them, the first unit step distance is the first pixel length corresponding to the horizontal stepper motor rotating one step unit.
[0108] Such as Figure 9 As shown, if the image captured by the lens is 2 million pixels, then the resolution of this image is 1920*1080. That is, the number of horizontal pixels in this image is 1920, and the number of vertical pixels is 1200. For example, in the horizontal direction, if 192 pixels represent the first pixel length of a first unit step distance, then assuming that 576 pixels are required from A to B, then three first unit step distances are required from A to B.
[0109] In the embodiments of the present disclosure, by representing the tracking point position coordinates, motion state information of the target object, and the current state of the zoom lens with the constructed preset pixel coordinates, the tracking direction, tracking speed, and tracking step number of the horizontal stepper motor are determined, so as to facilitate the tracking of the target object by the zoom lens in the horizontal direction more simply.
[0110] Case (2) For the vertical stepper motor, the second tracking direction, second tracking speed, and second tracking step number of the vertical stepper motor for tracking the target object are determined based on the following method:
[0111] Based on the ordinate in the tracking point position coordinates of the target object and the ordinate of the vertical stepper motor, determine the second tracking direction of the vertical stepper motor;
[0112] Continuing with Figure 8 As an example, point C in the figure is the position of the current stepper motor, where the ordinate is the position of the horizontal stepper motor in the stepper motor. For example, if the coordinates of point C are (1000, 800), then 800 - 400 > 0, indicating that the horizontal stepper motor is currently below the target object, and at this time, the first tracking direction is upward. On the contrary, the first tracking direction is downward.
[0113] Based on the requirement of adjusting the position of the vertical stepper motor to the ordinate position in the tracking point position coordinates within the preset tracking response time, based on the second tracking direction, the vertical direction speed component in the motion speed of the target object, and the difference between the ordinates of the vertical stepper motor and the target object in the preset pixel coordinate system, determine the second tracking speed;
[0114] For example, if the rotation direction of the vertical stepper motor is the same as the target movement direction, the second tracking speed can be calculated by the following formula:
[0115] V 3 = (|Yn - Yo|) / T 1 + V 1 (7)
[0116] If the rotation direction of the vertical stepper motor is opposite to the target movement direction, the second tracking speed can be calculated by the following formula:
[0117] V 3 = (|Yn - Yo|) / T 1 – V 1 (8)
[0118] In formulas (7) and (8), V 3 represents the second tracking speed of the vertical stepper motor; Yn represents the vertical coordinate of the vertical stepper motor (i.e., the current position of the vertical stepper motor); Yo represents the vertical coordinate position of the target object in the preset pixel coordinate system; T 1 represents the response time of the vertical stepper motor, and V 1 represents the vertical velocity component of the target object in the vertical direction.
[0119] Based on the second tracking speed, the second unit step distance, and the preset tracking response time, determine the second tracking steps of the vertical stepper motor;
[0120] For the second tracking steps of the vertical stepper motor, it can be calculated by the following formula:
[0121] STEP 1 = V 3 * T 1 / D 1 (9)
[0122] In formula (9), STEP 1 represents the second tracking steps of the vertical stepper motor, V 3 i.e., the second tracking speed of the above vertical stepper motor, T 1 represents the response time of the vertical stepper motor, and D 1 represents the second unit step distance.
[0123] Among them, the second unit step distance is the second pixel length corresponding to the vertical stepper motor rotating one step unit.
[0124] Such as Figure 9As shown, if the image captured by the lens is 2 million pixels, then the resolution of this image is 1920*1080. That is, the number of horizontal pixels in this image is 1920, and the number of vertical pixels is 1080. For example, in the vertical direction, if 108 pixels represent a second unit step distance, then when the interval from A to C is 432 pixels, four second unit step distances are required.
[0125] In the embodiments of the present disclosure, based on the tracking point position coordinates, motion state information of the target object, and the current state of the zoom lens, the tracking direction, tracking speed, and tracking steps of the vertical stepping motor are determined, so as to better drive the zoom lens to track the target object in the vertical direction.
[0126] In some embodiments, based on the side length of the rectangular position frame of the target object in the first image and the resolution of the wide-angle lens, the zoom ratio of the zoom lens is determined.
[0127] As Figure 8 shown, if the horizontal side length of the rectangular frame of the target object in the first image is 200 and the vertical side length is 400, then the larger side is selected, that is, the vertical side length is divided by the corresponding resolution of the wide-angle lens to obtain the zoom ratio. For example, 1080 / 400 = 2.7, so the zoom ratio is 2.7 times.
[0128] It can be understood that the zoom ratio of the zoom lens can be determined based on the larger side length of the rectangular frame of the target object in the constructed preset pixel coordinate system and the corresponding number of pixels in the resolution of the wide-angle lens.
[0129] In the embodiments of the present disclosure, by representing the tracking point position coordinates, motion state information of the target object, and the current state of the zoom lens with the constructed preset pixel coordinates, the tracking direction, tracking speed, and tracking steps of the vertical stepping motor are determined, so as to more easily track the target object with the zoom lens in the vertical direction.
[0130] In some embodiments, based on the image captured by the wide-angle lens of the first monitoring area, the motion state and tracking point position coordinates of the target object are updated in real time, and an update message is generated;
[0131] During the process of driving the zoom lens to track the target object, in response to the update message, the driving of the zoom lens to track the target object is stopped, and based on the motion state and tracking point position coordinates in the update message, the process returns to drive the zoom lens to track the target object based on the tracking point position coordinates, the motion state information of the target object, and the motion state of the stepping motor of the zoom lens.
[0132] As Figure 10As shown in Figure a, the target object B is moving to the right at this time. Then the stepper motor A needs to control the zoom lens to move to the right to track the target object B. At the next moment, the wide-angle camera updates the moving direction of the target object B. As shown in Figure b, this is the motion state of the target object after changing its direction. At this time, the stepper motor A needs to control the zoom lens to abandon the tracking of the previous position of the target object B, and based on the update message, re-update the motion state of the stepper motor to achieve the tracking of the new position of the target object B.
[0133] In the embodiments of the present disclosure, by updating the motion state of the target object and the position coordinates of the tracking point in real time and sending an update message, the zoom lens is enabled to track the current target object, so as to perform real-time tracking zoom shooting on the target object.
[0134] In summary, a preset pixel coordinate system is constructed based on the relative position relationship between the first monitoring area and the second monitoring area. Based on this, an instruction for controlling the stepper motor can be obtained, and through the real-time feedback of the wide-angle lens on the target object, the zoom lens is controlled to perform real-time tracking and zoom shooting on the target object.
[0135] Based on the same technical concept, the embodiments of the present disclosure also provide an object tracking device based on a dual camera. Among them, the first monitoring area of the wide-angle lens is included in the second monitoring area of the zoom lens, and the relative position relationship between the first monitoring area and the second monitoring area remains unchanged. As Figure 11 shown, the device includes:
[0136] A determination module 1101, configured to determine the motion state information of the target object and the position coordinates of the tracking point of the target object in the first image based on the first image collected by the wide-angle lens for the first monitoring area;
[0137] A tracking module 1102, configured to drive the zoom lens to track the target object based on the position coordinates of the tracking point, the motion state information of the target object, and the current state of the stepper motor of the zoom lens;
[0138] Among them, the position coordinates of the tracking point are coordinates in a preset pixel coordinate system, and the preset pixel coordinate system is established based on the relative position relationship between the first monitoring area and the second monitoring area, and the same pixel position coordinate value in the first image and the second image corresponds to the same position point in the physical world;
[0139] The second image is an image collected by the zoom lens for the entire area of the second monitoring area.
[0140] In some embodiments, it further includes:
[0141] The acquisition module is used to control the stepper motor to perform block acquisition on the second monitoring area to obtain multiple image blocks of the second monitoring area; wherein, part of the image content overlaps between adjacent image blocks in the second monitoring area.
[0142] The stitching module is used to perform stitching processing on multiple image blocks to obtain the second image.
[0143] The construction module is used to construct a preset pixel coordinate system based on the second image and the third image acquired from the first monitoring area, so that the pixel position coordinates of the same position point in the third image and the second image in the first monitoring area are the same.
[0144] In some embodiments, the determination module is specifically used for:
[0145] In the image sequence acquired by the wide-angle lens for the first monitoring area, obtain continuous P-frame images including the first image; where P is a positive integer greater than 1.
[0146] In the continuous P-frame images, respectively identify the position coordinates of the target object.
[0147] Based on the position coordinates of the target object in the continuous P-frame images, determine the motion state information of the target object.
[0148] In some embodiments, the determination module is specifically used for:
[0149] Based on the position coordinates of the target object in the first image and the side lengths of the rectangular position frame of the target object constructed based on the position coordinates, determine the center point coordinates of the rectangular position frame to obtain the tracking point position coordinates of the target object in the first image.
[0150] In some embodiments, the motion state of the target object includes the first motion speed and the first motion direction of the target object.
[0151] The stepper motor includes a horizontal stepper motor and a vertical stepper motor.
[0152] The current state of the stepper motor includes the second motion speed, the second motion direction of the horizontal stepper motor, and the abscissa of the horizontal stepper motor in the preset pixel coordinate system, and the third motion speed, the third motion direction of the vertical stepper motor, and the ordinate of the vertical stepper motor in the preset pixel coordinate system.
[0153] Wherein, the first motion speed, the second motion speed, and the third motion speed are in pixel dimension.
[0154] Define the first motion direction, the second motion direction, and the third motion direction based on the horizontal direction and the vertical direction of the preset pixel coordinate system.
[0155] In some embodiments, for the horizontal stepper motor, the tracking module is specifically configured to:
[0156] Determine the first tracking direction, the first tracking speed, and the first tracking step number of the horizontal stepper motor for tracking the target object based on the following method:
[0157] Determine the first tracking direction of the horizontal stepper motor based on the abscissa in the tracking point position coordinates of the target object and the abscissa of the horizontal stepper motor;
[0158] Based on the requirement of adjusting the position of the horizontal stepper motor to the abscissa position in the tracking point position coordinates within the preset tracking response time, determine the first tracking speed based on the first tracking direction, the horizontal direction speed component in the movement speed of the target object, and the gap between the abscissas of the horizontal stepper motor and the target object in the preset pixel coordinate system;
[0159] Determine the first tracking step number of the horizontal stepper motor based on the first tracking speed, the first unit step distance, and the preset tracking response time;
[0160] Wherein, the first unit step distance is the first pixel length corresponding to the horizontal stepper motor rotating one step unit.
[0161] In some embodiments, for the vertical stepper motor, the tracking module is specifically configured to:
[0162] Determine the second tracking direction, the second tracking speed, and the second tracking step number of the vertical stepper motor for tracking the target object based on the following method:
[0163] Determine the second tracking direction of the vertical stepper motor based on the ordinate in the tracking point position coordinates of the target object and the ordinate of the vertical stepper motor;
[0164] Based on the requirement of adjusting the position of the vertical stepper motor to the ordinate position in the tracking point position coordinates within the preset tracking response time, determine the second tracking speed based on the second tracking direction, the vertical direction speed component in the movement speed of the target object, and the gap between the ordinates of the vertical stepper motor and the target object in the preset pixel coordinate system;
[0165] Determine the second tracking step number of the vertical stepper motor based on the second tracking speed, the second unit step distance, and the preset tracking response time;
[0166] Wherein, the second unit step distance is the second pixel length corresponding to the vertical stepper motor rotating one step unit.
[0167] In some embodiments, the tracking module is further configured to:
[0168] Determine the zoom ratio of the zoom lens based on the side length of the rectangular position box of the target object in the first image and the resolution of the wide-angle lens.
[0169] In some embodiments, the tracking module is further configured to:
[0170] Based on the image collected by the wide-angle lens of the first monitoring area, real-time update the motion state of the target object and the position coordinates of the tracking point, and generate an update message;
[0171] During the process of driving the zoom lens to track the target object, in response to the update message, stop driving the target object that the zoom lens is tracking, and based on the motion state and the position coordinates of the tracking point in the update message, trigger the determination module to return and execute driving the zoom lens to track the target object based on the position coordinates of the tracking point, the motion state information of the target object, and the motion state of the stepping motor of the zoom lens.
[0172] For the specific functions and examples of each module and sub-module of the device according to the embodiments of the present disclosure, reference may be made to the relevant descriptions of the corresponding steps in the above method embodiments, which will not be elaborated here.
[0173] According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0174] Figure 12 A schematic block diagram of an exemplary electronic device 1200 that can be used to implement the embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital assistant, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0175] As Figure 12 shown, the device 1200 includes a computing unit 1201, which can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 1202 or the computer program loaded from the storage unit 1208 into the random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other through a bus 1204. The input / output (I / O) interface 1205 is also connected to the bus 1204.
[0176] Multiple components in device 1200 are connected to I / O interface 1205, including: input unit 12012, such as a keyboard, mouse, etc.; output unit 1207, such as various types of displays, speakers, etc.; storage unit 1208, such as a disk, optical disc, etc.; and communication unit 1209, such as a network card, modem, wireless communication transceiver, etc. Communication unit 1209 allows device 1200 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0177] Computing unit 1201 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Computing unit 1201 executes the various methods and processes described above, such as the dual-camera based object tracking method. For example, in some embodiments, the dual-camera based object tracking method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 1208. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 1200 via ROM 1202 and / or communication unit 1209. When the computer program is loaded into RAM 1203 and executed by computing unit 1201, one or more steps of the dual-camera based object tracking method described above can be executed. Alternatively, in other embodiments, computing unit 1201 can be configured to execute the dual-camera based object tracking method by any other suitable means (e.g., by means of firmware).
[0178] The various embodiments of the systems and techniques described above in this article can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0179] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0180] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0181] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0182] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0183] A computer system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, or a server of a distributed system, or a server incorporating a blockchain. Embodiments of the present disclosure can adopt a server to execute a method for generating proteins.
[0184] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and no limitation is imposed herein.
[0185] The above specific embodiments do not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of the present disclosure shall be included within the protection scope of the present disclosure.
Claims
1. A method for object tracking based on dual cameras, wherein, the first monitoring area of the wide-angle lens is included in the second monitoring area of the zoom lens, and the relative positional relationship between the first monitoring area and the second monitoring area remains unchanged. The method includes: Based on the first image collected by the wide-angle lens for the first monitoring area, determining the motion state information of the target object and the tracking point position coordinates of the target object in the first image; Based on the tracking point position coordinates, the motion state information of the target object, and the current state of the stepping motor of the zoom lens, driving the zoom lens to track the target object; wherein, the tracking point position coordinates are coordinates in a preset pixel coordinate system, the preset pixel coordinate system is established based on the relative positional relationship between the first monitoring area and the second monitoring area, and the same pixel position coordinate value in the first image and the second image corresponds to the same position point in the physical world; the second image is an image collected by the zoom lens for the entire area of the second monitoring area.
2. The method according to claim 1, further comprising constructing the preset pixel coordinate system based on the following method: Controlling the stepping motor to perform block-by-block acquisition on the second monitoring area to obtain a plurality of image blocks of the second monitoring area; wherein, partial image content overlaps between adjacent image blocks in the second monitoring area; Performing stitching processing on the plurality of image blocks to obtain the second image; Based on the second image and the third image collected for the first monitoring area, constructing the preset pixel coordinate system so that the pixel position coordinates of the same position point in the first monitoring area in the third image and the second image are the same.
3. The method according to claim 1, wherein, determining the motion state information of the target object based on the first image collected by the wide-angle lens for the first monitoring area includes: In the image sequence collected by the wide-angle lens for the first monitoring area, obtaining consecutive P frames of images including the first image; where P is a positive integer greater than 1; In the consecutive P frames of images, respectively identifying the position coordinates of the target object; Based on the position coordinates of the target object in the consecutive P frames of images, determining the motion state information of the target object.
4. The method according to claim 1, wherein, determining the tracking point position coordinates of the target object in the first image based on the first image collected by the wide-angle lens for the first monitoring area includes: Based on the position coordinates of the target object in the first image and the side lengths of the rectangular position frame of the target object constructed based on the position coordinates, determining the center point coordinates of the rectangular position frame to obtain the tracking point position coordinates of the target object in the first image.
5. The method according to claim 1, wherein, the motion state of the target object includes the first motion speed and the first motion direction of the target object; the stepping motor includes a horizontal stepping motor and a vertical stepping motor; The current state of the stepper motor includes the second movement speed, the second movement direction of the horizontal stepper motor, and the abscissa of the horizontal stepper motor in the preset pixel coordinate system, as well as the third movement speed, the third movement direction of the vertical stepper motor, and the ordinate of the vertical stepper motor in the preset pixel coordinate system; Wherein, the first movement speed, the second movement speed, and the third movement speed are dimensioned in pixels; The first movement direction, the second movement direction, and the third movement direction are defined based on the horizontal direction and the vertical direction of the preset pixel coordinate system.
6. The method according to claim 5, for the horizontal stepper motor, based on the position coordinate of the tracking point, the motion state information of the target object, and the current state of the stepper motor of the zoom lens, driving the zoom lens to track the target object, comprises: Determining a first tracking direction, a first tracking speed, and a first number of tracking steps for the horizontal stepper motor to track the target object based on the following method: Determining the first tracking direction of the horizontal stepper motor based on the abscissa in the position coordinate of the tracking point of the target object and the abscissa of the horizontal stepper motor; Based on the requirement of adjusting the position of the horizontal stepper motor to the abscissa position in the position coordinate of the tracking point within a preset tracking response time, determining the first tracking speed based on the first tracking direction, the horizontal direction speed component in the motion speed of the target object, and the difference between the abscissas of the horizontal stepper motor and the target object in the preset pixel coordinate system; Determining the first number of tracking steps of the horizontal stepper motor based on the first tracking speed, the first unit step distance, and the preset tracking response time; Wherein, the first unit step distance is the first pixel length corresponding to the rotation of the horizontal stepper motor by one step unit.
7. The method according to claim 5, for the vertical stepper motor, based on the position coordinate of the tracking point, the motion state information of the target object, and the current state of the stepper motor of the zoom lens, driving the zoom lens to track the target object, comprises: Determining a second tracking direction, a second tracking speed, and a second number of tracking steps for the vertical stepper motor to track the target object based on the following method: Determining the second tracking direction of the vertical stepper motor based on the ordinate in the position coordinate of the tracking point of the target object and the ordinate of the vertical stepper motor; Based on the requirement of adjusting the position of the vertical stepper motor to the ordinate position in the position coordinate of the tracking point within a preset tracking response time, determining the second tracking speed based on the second tracking direction, the vertical direction speed component in the motion speed of the target object, and the difference between the ordinates of the vertical stepper motor and the target object in the preset pixel coordinate system; Determining the second number of tracking steps of the vertical stepper motor based on the second tracking speed, the second unit step distance, and the preset tracking response time; Wherein, the second unit step distance is the second pixel length corresponding to one step unit of rotation of the vertical stepping motor.
8. The method according to claim 1, further comprising: Determining the zoom ratio of the zoom lens based on the side length of the rectangular position frame of the target object in the first image and the resolution of the wide-angle lens.
9. The method according to claim 1, further comprising: Based on the image collected by the wide-angle lens of the first monitoring area, real-time updating the motion state of the target object and the position coordinates of the tracking point, and generating an update message; During the process of driving the zoom lens to track the target object, in response to the update message, stopping driving the zoom lens to track the target object, and based on the motion state and the position coordinates of the tracking point in the update message, returning to execute driving the zoom lens to track the target object based on the position coordinates of the tracking point, the motion state information of the target object, and the motion state of the stepping motor of the zoom lens.
10. An object tracking device based on a dual camera, wherein, The first monitoring area of the wide-angle lens is included in the second monitoring area of the zoom lens, and the relative position relationship between the first monitoring area and the second monitoring area remains unchanged. The device includes: A determination module, configured to determine the motion state information of the target object and the position coordinates of the tracking point of the target object in the first image based on the first image collected by the wide-angle lens of the first monitoring area; A tracking module, configured to drive the zoom lens to track the target object based on the position coordinates of the tracking point, the motion state information of the target object, and the current state of the stepping motor of the zoom lens; Wherein, the position coordinates of the tracking point are coordinates in a preset pixel coordinate system, the preset pixel coordinate system is established based on the relative position relationship between the first monitoring area and the second monitoring area, and the same pixel position coordinate value in the first image and the second image corresponds to the same position point in the physical world; The second image is an image collected by the zoom lens of the entire second monitoring area.
11. The device according to claim 10, further comprising: An acquisition module, configured to control the stepping motor to perform block acquisition on the second monitoring area to obtain a plurality of image blocks of the second monitoring area; wherein, partial image content overlaps between adjacent image blocks in the second monitoring area; A splicing module, configured to perform splicing processing on the plurality of image blocks to obtain the second image; A construction module, configured to construct a preset pixel coordinate system based on the second image and a third image collected from the first monitoring area, so that the pixel position coordinates of the same position point in the first monitoring area in the third image and the second image are the same.
12. For the device according to claim 10, the determination module is specifically configured to: In the image sequence collected by the wide-angle lens of the first monitoring area, obtain continuous P-frame images including the first image; wherein, P is a positive integer greater than 1; In the continuous P-frame images, respectively identify the position coordinates of the target object; Based on the position coordinates of the target object in the continuous P-frame images, determine the motion state information of the target object.
13. The device according to claim 10, wherein the determining module is specifically configured to: Based on the position coordinates of the target object in the first image and the side lengths of the rectangular position box of the target object in the first image constructed based on the position coordinates, determine the center point coordinates of the rectangular position box, so as to obtain the tracking point position coordinates of the target object in the first image.
14. The device according to claim 10, wherein, the motion state of the target object includes the first motion speed and the first motion direction of the target object; the stepping motor includes a horizontal stepping motor and a vertical stepping motor; the current state of the stepping motor includes the second motion speed, the second motion direction of the horizontal stepping motor, and the abscissa of the horizontal stepping motor in the preset pixel coordinate system, and the third motion speed, the third motion direction of the vertical stepping motor, and the ordinate of the vertical stepping motor in the preset pixel coordinate system; wherein, the first motion speed, the second motion speed, and the third motion speed are in units of pixels; Define the first motion direction, the second motion direction, and the third motion direction based on the horizontal direction and the vertical direction of the preset pixel coordinate system.
15. The device according to claim 14, for the horizontal stepping motor, the tracking module is specifically configured to: Determine the first tracking direction, the first tracking speed, and the first tracking steps of the horizontal stepping motor for tracking the target object based on the following method: Based on the abscissa in the tracking point position coordinates of the target object and the abscissa of the horizontal stepping motor, determine the first tracking direction of the horizontal stepping motor; Based on the requirement of adjusting the position of the horizontal stepping motor to the abscissa position in the tracking point position coordinates within the preset tracking response time, based on the first tracking direction, the horizontal direction speed component in the motion speed of the target object, and the difference between the abscissas of the horizontal stepping motor and the target object in the preset pixel coordinate system, determine the first tracking speed; Based on the first tracking speed, the first unit stepping distance, and the preset tracking response time, determine the first tracking steps of the horizontal stepping motor; wherein, the first unit stepping distance is the first pixel length corresponding to one stepping unit rotation of the horizontal stepping motor.
16. The device according to claim 14, for the vertical stepping motor, the tracking module is specifically configured to: Determine the second tracking direction, the second tracking speed, and the second tracking steps of the vertical stepping motor for tracking the target object based on the following method: Based on the ordinate in the tracking point position coordinates of the target object and the ordinate of the vertical stepping motor, determine the second tracking direction of the vertical stepping motor; Based on the requirement of adjusting the position of the vertical stepping motor to the ordinate position in the tracking point position coordinates within the preset tracking response time, based on the second tracking direction, the vertical direction speed component in the motion speed of the target object, and the difference between the ordinates of the vertical stepping motor and the target object in the preset pixel coordinate system, determine the second tracking speed; Based on the second tracking speed, the second unit stepping distance, and the preset tracking response time, determine the second tracking steps of the vertical stepping motor; Wherein, the second unit step distance is the second pixel length corresponding to one step of rotation of the vertical stepping motor.
17. The apparatus according to claim 10, wherein the tracking module is further configured to: Determine the zoom ratio of the zoom lens based on the side length of the rectangular position frame of the target object in the first image and the resolution of the wide-angle lens.
18. The apparatus according to claim 10, wherein the tracking module is further configured to: Based on the image collected by the wide-angle lens of the first monitoring area, update the motion state and the tracking point position coordinates of the target object in real time, and generate an update message; During the process of driving the zoom lens to track the target object, in response to the update message, stop driving the target object tracked by the zoom lens, and based on the motion state and the tracking point position coordinates in the update message, trigger the determination module to return and execute driving the zoom lens to track the target object based on the tracking point position coordinates, the motion state information of the target object, and the motion state of the stepping motor of the zoom lens.
19. An electronic device, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1-10.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.
21. A computer program product comprising a computer program, which when executed by a processor implements the method according to any one of claims 1-9.