Disclosure of Invention
In order to solve the above problems, an object of the present invention is to provide a method and a system for video snapshot of a ship, which can adaptively set a snapshot position according to different speeds of the ship, and improve the snapshot effectiveness and accuracy.
The invention provides a video snapshot method for a ship, which comprises the following steps:
carrying out target detection on a video stream of a gunlock to obtain a target detection result, wherein the target detection result comprises position information and confidence information of a target;
carrying out target tracking on the video stream of the gunlock, acquiring position information of the target in the image shot by the gunlock, and determining the movement direction and the movement speed of the target according to the calibration relation between the gunlock and the ball machine;
adjusting the horizontal angle and the pitch angle of the dome camera according to the movement speed of the target, so that the target is positioned at the central position of the image shot by the dome camera to obtain the real-time snapshot position of the dome camera;
and the ball machine continuously shoots the target at the real-time shooting position at a certain time interval.
As a further improvement of the present invention, the method further comprises: and carrying out linkage calibration on the rifle bolt and the ball machine according to the video streams of the rifle bolt and the ball machine to obtain the calibration relation between the rifle bolt and the ball machine.
As a further improvement of the present invention, the performing linkage calibration on the rifle bolt and the ball machine according to the video streams of the rifle bolt and the ball machine to obtain a calibration relationship between the rifle bolt and the ball machine includes:
acquiring video streams of the rifle bolt and the ball machine;
determining dome camera parameters respectively corresponding to a plurality of gun camera pixel points in the gun camera image according to the video stream of the gun camera and the video stream of the dome camera, wherein the dome camera parameters comprise a horizontal angle and a pitch angle;
performing fitting calibration on the dome camera parameters respectively corresponding to the plurality of rifle bolt pixel points by using a least square method to obtain dome camera parameters corresponding to each rifle bolt pixel point in the rifle bolt image;
and determining the longitude and latitude of the central point of the dome camera image corresponding to each dome camera parameter according to the mounting information of the dome camera to finish the linkage calibration of the gun camera and the dome camera, wherein the mounting information comprises the longitude and latitude and height information.
As a further improvement of the invention, the target detection is realized by a convolutional neural network.
As a further improvement of the present invention, the tracking a target on a video stream of the rifle bolt, obtaining position information of the target in a shooting image of the rifle bolt, and determining a movement direction and a movement speed of the target according to a calibration relationship between the rifle bolt and the ball machine includes:
for each frame of image in the video stream of the gunlock, carrying out target tracking on a detection frame appearing in the current frame of image, and storing position information of the target under the current frame of image;
respectively acquiring corresponding position information of the target under multi-frame images in the video stream of the rifle bolt as historical position information;
and determining the distance and the orientation of the target relative to the dome camera and determining the movement direction and the movement speed of the target according to the historical position information and the calibration relation between the gunlock and the dome camera.
As a further improvement of the present invention, the method further comprises:
controlling the ball machine to rotate according to the calibration relation between the gun camera and the ball machine, so that the ball machine is positioned near the target before snapshot;
and adjusting the focal length of the dome camera to a focal length corresponding to the current target detection frame accounting for two thirds of the image according to the width of the current target detection frame in the image of the dome camera, so that the dome camera starts to capture at the adjusted focal length.
As a further improvement of the present invention, the adjusting, according to the movement speed of the target, the horizontal angle and the pitch angle of the dome camera to locate the target at the center of the image captured by the dome camera, so as to obtain the real-time capturing position of the dome camera includes:
when the movement speed of the target is smaller than a first threshold value, taking the center of a current target detection frame in the dome camera image as the center position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of the target detection frame in the dome camera image to be located at the center position of the dome camera image;
when the movement speed of the target is greater than or equal to a first threshold value and less than a second threshold value, taking the center of a left bottom frame or a right bottom frame of a current target detection frame in the dome camera image as the central position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of the target detection frame in the dome camera image to be located at the central position of the dome camera image;
and when the movement speed of the target is greater than or equal to a second threshold value, predicting the position of the target in the dome camera image by using a least square method, taking the predicted position as the central position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of a target detection frame in the dome camera image to be located at the central position of the dome camera image.
The invention also provides a video capture system for a vessel, the system comprising:
the target detection module is used for carrying out target detection on the video stream of the gunlock to obtain a target detection result, wherein the target detection result comprises position information and confidence information of a target;
the target tracking module is used for tracking a target of a video stream of the gunlock, acquiring position information of the target in a shooting image of the gunlock, and determining the movement direction and the movement speed of the target according to a calibration relation between the gunlock and the ball machine;
the adjusting module is used for adjusting the horizontal angle and the pitch angle of the dome camera according to the movement speed of the target, so that the target is positioned at the center of the image shot by the dome camera to obtain the real-time snapshot position of the dome camera;
and the snapshot module is used for continuously snapshotting the target at the real-time snapshot position by the dome camera at a certain time interval.
As a further improvement of the present invention, the system further comprises:
and the calibration module is used for carrying out linkage calibration on the rifle bolt and the ball machine according to the video streams of the rifle bolt and the ball machine to obtain the calibration relation between the rifle bolt and the ball machine.
As a further improvement of the invention, the calibration module comprises:
acquiring video streams of the rifle bolt and the ball machine;
determining dome camera parameters respectively corresponding to a plurality of gun camera pixel points in the gun camera image according to the video stream of the gun camera and the video stream of the dome camera, wherein the dome camera parameters comprise a horizontal angle and a pitch angle;
performing fitting calibration on the dome camera parameters respectively corresponding to the plurality of rifle bolt pixel points by using a least square method to obtain dome camera parameters corresponding to each rifle bolt pixel point in the rifle bolt image;
and determining the longitude and latitude of the image center point of the dome camera corresponding to each dome camera parameter according to the mounting information of the dome camera so as to finish the linkage calibration of the gun camera and the dome camera, wherein the mounting information comprises the longitude and latitude and the height information.
As a further improvement of the invention, the target detection is realized by a convolutional neural network.
As a further improvement of the present invention, the target tracking module comprises:
for each frame of image in the video stream of the gunlock, carrying out target tracking on a detection frame appearing in the current frame of image, and storing position information of the target under the current frame of image;
respectively acquiring corresponding position information of the target under multi-frame images in the video stream of the rifle bolt as historical position information;
and determining the distance and the direction of the target relative to the dome camera and determining the moving direction and the moving speed of the target according to the historical position information and the calibration relation between the rifle bolt and the dome camera.
As a further improvement of the present invention, the system further comprises:
the snapshot initialization module is used for controlling the dome camera to rotate according to the calibration relation between the gun camera and the dome camera, so that the dome camera is positioned near the target before snapshot; and adjusting the focal length of the dome camera to a focal length corresponding to the current target detection frame accounting for two thirds of the image according to the width of the current target detection frame in the image of the dome camera, so that the dome camera starts to capture at the adjusted focal length.
As a further improvement of the invention, the adjusting module comprises:
when the movement speed of the target is smaller than a first threshold value, taking the center of a current target detection frame in the dome camera image as the center position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of the target detection frame in the dome camera image to be located at the center position of the dome camera image;
when the movement speed of the target is greater than or equal to a first threshold value and smaller than a second threshold value, taking the center of the left bottom frame or the right bottom frame of the current target detection frame in the dome camera image as the central position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of the target detection frame in the dome camera image to be located at the central position of the dome camera image;
and when the movement speed of the target is greater than or equal to a second threshold value, predicting the position of the target in the dome camera image by using a least square method, taking the predicted position as the central position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of a target detection frame in the dome camera image to be located at the central position of the dome camera image.
The invention also provides an electronic device comprising a memory and a processor, the memory storing one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method.
The invention also provides a computer-readable storage medium having stored thereon a computer program for execution by a processor to perform the method.
The invention has the beneficial effects that: the gunlock and the dome camera are linked, and the target is detected and tracked in real time through the gunlock, so that the snapshot position of the dome camera is adjusted in a real-time self-adaptive mode according to different speeds of a ship, an effective snapshot image is obtained, and the snapshot accuracy is improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and back … …) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indications are changed accordingly.
In addition, in the description of the present invention, the terms used are for illustrative purposes only and are not intended to limit the scope of the present invention. The terms "comprises" and/or "comprising" are used to specify the presence of stated elements, steps, operations, and/or components, but do not preclude the presence or addition of one or more other elements, steps, operations, and/or components. The terms "first," "second," and the like may be used to describe various elements, not necessarily order, and not necessarily limit the elements. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified. These terms are only used to distinguish one element from another. These and/or other aspects will become apparent to those of ordinary skill in the art in view of the following drawings, and the description of the embodiments of the present invention will be more readily understood by those of ordinary skill in the art. The drawings are only for purposes of illustrating the described embodiments of the invention. One skilled in the art will readily recognize from the following description that alternative embodiments of the structures and methods illustrated in the present application may be employed without departing from the principles described in the present application.
As shown in fig. 1, the video capturing method for a ship according to the embodiment of the present invention includes:
carrying out target detection on a video stream of a gunlock to obtain a target detection result, wherein the target detection result comprises position information and confidence information of a target;
carrying out target tracking on the video stream of the gunlock, acquiring position information of the target in the image shot by the gunlock, and determining the movement direction and the movement speed of the target according to the calibration relation between the gunlock and the ball machine;
adjusting the horizontal angle and the pitch angle of the dome camera according to the movement speed of the target, so that the target is positioned at the central position of the image shot by the dome camera to obtain the real-time snapshot position of the dome camera;
and the ball machine continuously shoots the target at the real-time shooting position at a certain time interval.
The existing photoelectric equipment for detecting and snapshotting the intelligent ship is difficult to lock a target due to problems such as photoelectric delay and the like during shooting, so that the best time for snapshotting is missed, and the accuracy of monitoring and evidence obtaining is low. For example, a ship with a high speed has strong maneuverability, a delay is caused from sending a shooting instruction to turning the camera to a specified position, and after the camera reaches the specified position, the ship is not in an image picture, so that the snapshot is invalid. The method provided by the invention utilizes the linkage of the gun camera and the dome camera, detects and tracks the target in real time through the gun camera, adjusts the snapshot position of the dome camera in real time according to the movement speed of the target, obtains an effective snapshot image, improves the snapshot accuracy, and is suitable for different types of ships. It will be appreciated that the target may be a different type of vessel.
In an alternative embodiment, the method further comprises: and carrying out linkage calibration on the rifle bolt and the ball machine according to the video streams of the rifle bolt and the ball machine to obtain the calibration relation between the rifle bolt and the ball machine.
In an optional embodiment, the performing linkage calibration on the gun camera and the dome camera according to the video streams of the gun camera and the dome camera to obtain a calibration relationship between the gun camera and the dome camera includes:
acquiring video streams of the rifle bolt and the ball machine;
determining dome camera parameters respectively corresponding to a plurality of gun camera pixel points in the gun camera image according to the video stream of the gun camera and the video stream of the dome camera, wherein the dome camera parameters comprise a horizontal angle and a pitch angle;
performing fitting calibration on the dome camera parameters respectively corresponding to the plurality of rifle bolt pixel points by using a least square method to obtain dome camera parameters corresponding to each rifle bolt pixel point in the rifle bolt image;
and determining the longitude and latitude of the image center point of the dome camera corresponding to each dome camera parameter according to the mounting information of the dome camera so as to finish the linkage calibration of the gun camera and the dome camera, wherein the mounting information comprises the longitude and latitude and the height information.
The method provided by the invention has the advantages that the gunlock and the ball machine are linked to calibrate the two so as to be associated, and then the ball machine can rotate to the position of the current target tracked by the gunlock to capture the current target. The method can acquire coordinates of 15 gunlock pixel points in the gunlock image, and further acquire ball machine parameters (including a horizontal angle value and a pitch angle value) corresponding to the 15 gunlock pixel points. And fitting by a least square method, and further obtaining the dome camera parameters corresponding to each gunlock pixel point (namely any one gunlock pixel point) in the images of the gunlocks. And then according to the dome camera installation information (including longitude and latitude and height information), the longitude and latitude corresponding to each dome camera parameter can be obtained, and each dome camera parameter corresponds to one dome camera image central point, so that the longitude and latitude of the dome camera image central point corresponding to each dome camera parameter can be obtained, namely the calibration relation between the gun camera and the dome camera is obtained, and the calibration relation is used for adjusting the horizontal angle and the pitch angle of the dome camera in the follow-up process.
In an alternative embodiment, the target detection is performed by a convolutional neural network.
It can be understood that the method of the present invention utilizes a convolutional neural network to perform target detection on the video stream of the bolt, so as to achieve the preliminary positioning of the target. For example, a YOLO model may be used to perform target detection on each frame of image of the bolt, and return position information and confidence information of the target in each frame of image. The YOLO model uses a regression method, and uses the whole image as the input of the convolutional neural network, and directly regresses the target frame at a plurality of positions of the image and the category to which the target belongs. The model of the convolutional neural network is not particularly limited.
In an optional embodiment, the tracking a target on a video stream of the gun camera, obtaining position information of the target in a shot image of the gun camera, and determining a moving direction and a moving speed of the target according to a calibration relationship between the gun camera and the ball machine includes:
for each frame of image in the video stream of the gunlock, carrying out target tracking on a detection frame appearing in the current frame of image, and storing position information of the target under the current frame of image;
respectively acquiring corresponding position information of the target under multi-frame images in a video stream of the bolt as historical position information;
and determining the distance and the direction of the target relative to the dome camera and determining the moving direction and the moving speed of the target according to the historical position information and the calibration relation between the rifle bolt and the dome camera.
It is understood that, when the target is continuously tracked by the bolt face, for example, 10 frames of position information can be accumulated as the historical position information. The historical position information can extract the movement information of the gunlock pixel points, and the speed of the target movement can be calculated according to the movement information of the gunlock pixel points. And according to the calibration relation between the gunlock and the dome camera (the longitude and latitude of the center point of the dome camera image corresponding to each dome camera parameter), the distance and the direction of the target relative to the dome camera can be calculated.
In an alternative embodiment, the method further comprises:
controlling the ball machine to rotate according to the calibration relation between the gun camera and the ball machine, so that the ball machine is positioned near the target before snapshot;
and adjusting the focal length of the dome camera to a focal length corresponding to the current target detection frame accounting for two thirds of the image according to the width of the current target detection frame in the image of the dome camera, so that the dome camera starts to capture at the adjusted focal length.
In the moving process of the target, if the moving speed is high, the target can not be captured in time easily. Therefore, the position of the ball machine can be adjusted before the snapshot is started, so that the position of the image currently captured by the ball machine is always near the position to be snapshot. The ball yielding machine follows the target in advance, so that the delay caused by large-amplitude rotation of the camera can be reduced. Correspondingly, in the position adjusting process, the focal length of the dome camera is adaptively adjusted, so that clear images can be captured.
In an optional embodiment, the adjusting the horizontal angle and the pitch angle of the dome camera according to the movement speed of the target to locate the target at the center of the shot image of the dome camera to obtain the real-time capturing position of the dome camera includes:
when the movement speed of the target is smaller than a first threshold value, taking the center of a current target detection frame in the dome camera image as the center position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of the target detection frame in the dome camera image to be located at the center position of the dome camera image;
when the movement speed of the target is greater than or equal to a first threshold value and smaller than a second threshold value, taking the center of the left bottom frame or the right bottom frame of the current target detection frame in the dome camera image as the central position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of the target detection frame in the dome camera image to be located at the central position of the dome camera image;
and when the movement speed of the target is greater than or equal to a second threshold value, predicting the position of the target in the dome camera image by using a least square method, taking the predicted position as the central position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of a target detection frame in the dome camera image to be located at the central position of the dome camera image.
The method adjusts the angle of the dome camera in real time according to the movement speed of the target, so that the target can be positioned at the center of the image shot by the dome camera during snapshot, clear and accurate snapshot of ships with different speeds is realized, the snapshot effectiveness and accuracy are improved, and high-quality snapshot pictures are provided for next ship type identification and ship number plate identification.
For example, when the moving speed is less than 10 knots, it can be understood that the moving speed of the target is very slow, and the target detection frame in the current picture of the dome camera can be directly utilized to perform snapshot, and 5 images can be continuously snapshot at intervals of 1 second, for example. For example, when the moving speed is greater than 10 knots and less than 20 knots, it can be understood that the target moving speed is slow, the left or right bottom frame center of the target detection frame in the current picture of the dome camera is taken as the center position of the image of the dome camera, and the horizontal angle and the pitch angle of the dome camera are adjusted so that the center of the target detection frame in the picture of the dome camera is located at the center position, at which the dome camera continuously captures 5 images at intervals of, for example, 500 ms. When the target enters from the left side of the picture of the dome camera and moves towards the right side, the position of the bottom frame on the right side of the target detection frame can be used as the central position of the picture of the dome camera, and when the target enters from the right side of the picture of the dome camera and moves towards the left side, the position of the bottom frame on the left side of the target detection frame can be used as the central position of the picture of the dome camera. For example, when the target movement speed is greater than 20 knots, it can be understood that the target movement speed is high, the position of the target in the dome camera image is predicted by using the least square method (the data used in the prediction may be, for example, the position of the target in the first several frames of dome camera images), the predicted position is taken as the center position of the dome camera image, the horizontal angle and the pitch angle of the dome camera are adjusted so that the center of the target detection frame in the dome camera image is located at the center position, and the dome camera continuously captures 5 images at intervals of, for example, 300 ms. The speed threshold and the time interval are illustrated schematically, and the values of the speed threshold and the time interval are not particularly limited, and can be adaptively designed according to the use requirement.
For example, as shown in fig. 2, the method of the present invention may implement a snapshot of a ship by using the following process.
S1, acquiring real-time video streams including the video streams of the gunlock and the dome camera, acquiring 15 gunlock pixel points and dome camera parameters (values of a horizontal angle and a pitch angle) corresponding to the dome camera, performing gun and ball linkage calibration by using a least square method, and acquiring dome camera parameters corresponding to each gunlock pixel point;
s2, acquiring dome camera installation information including longitude, latitude and height, and calculating the longitude and latitude of dome image center pixels under each dome camera parameter (horizontal angle and pitch angle);
s3, performing target detection on the gunlock video stream frame by using a YOLO model, and returning the information of all ships in the current frame, including the information of pixel positions, confidence coefficient and the like in the picture;
s4, tracking the target of the detection frame appearing in the current frame, storing historical position information, calculating the distance and the orientation between the target and the dome camera according to the calibration relation between the gunlock and the dome camera after the historical position information of the target is accumulated to 10 frames, further calculating the moving direction and the moving speed of the target relative to the dome camera, and repeating S5 if the number of accumulated target tracking frames is less than 10 frames;
s5, before snapshot is started, rotating the position of the dome camera according to the position of the dome camera calibrated by linkage of the gun camera and the dome camera, keeping the current picture position of the dome camera near the position to be snapshot, and adjusting the focal length of the dome camera to calculate the corresponding focal length when the detection frame occupies two thirds of the picture of the image according to the width of the current detection frame;
s6, judging a target snapshot method according to the movement speed of the target, adjusting the horizontal angle and the pitch angle of the dome camera when the speed is less than 10 knots, enabling the center of the current target detection frame to be the center position of the image of the dome camera, starting to continuously snapshot 5 images at intervals of 1 second, and entering S7 when the speed is more than 10 knots and less than 20 knots;
s7, adjusting the horizontal angle and the pitch angle of the dome camera according to the moving direction of the target, enabling the center of the bottom frame on the left side or the right side of the current target detection frame to be the center position of the dome camera image, starting to continuously shoot 5 pieces at an interval of 500 milliseconds, and entering S8 when the speed is higher than 20 knots;
and S8, judging whether the speed is more than 30 knots or not again, predicting the position of the target in the image of the dome camera by using a least square method when the speed is more than 30 knots, adjusting the horizontal angle and the pitch angle of the dome camera to enable the predicted position to be the central position of the image of the dome camera, and starting to continuously take 5 shots at an interval of 300 milliseconds.
The embodiment of the invention provides a video snapshot system for a ship, which comprises:
the target detection module is used for carrying out target detection on the video stream of the gunlock to obtain a target detection result, wherein the target detection result comprises position information and confidence information of a target;
the target tracking module is used for tracking a target of a video stream of the gunlock, acquiring position information of the target in a shooting image of the gunlock, and determining the movement direction and the movement speed of the target according to a calibration relation between the gunlock and the ball machine;
the adjusting module is used for adjusting the horizontal angle and the pitch angle of the dome camera according to the movement speed of the target, so that the target is positioned at the center of the image shot by the dome camera to obtain the real-time snapshot position of the dome camera;
and the snapshot module is used for continuously snapshotting the target at the real-time snapshot position by the dome camera at a certain time interval.
In an alternative embodiment, the system further comprises:
and the calibration module is used for carrying out linkage calibration on the rifle bolt and the ball machine according to the video streams of the rifle bolt and the ball machine to obtain the calibration relation between the rifle bolt and the ball machine.
In an alternative embodiment, the calibration module includes:
acquiring video streams of the rifle bolt and the ball machine;
determining dome camera parameters respectively corresponding to a plurality of gun camera pixel points in the gun camera image according to the video stream of the gun camera and the video stream of the dome camera, wherein the dome camera parameters comprise a horizontal angle and a pitch angle;
performing fitting calibration on the dome camera parameters respectively corresponding to the plurality of rifle bolt pixel points by using a least square method to obtain dome camera parameters corresponding to each rifle bolt pixel point in the rifle bolt image;
and determining the longitude and latitude of the image center point of the dome camera corresponding to each dome camera parameter according to the mounting information of the dome camera so as to finish the linkage calibration of the gun camera and the dome camera, wherein the mounting information comprises the longitude and latitude and the height information.
In an alternative embodiment, the target detection is performed by a convolutional neural network.
In an alternative embodiment, the target tracking module comprises:
for each frame of image in the video stream of the gunlock, performing target tracking on a detection frame appearing in a current frame of image, and storing position information of the target under the current frame of image;
respectively acquiring corresponding position information of the target under multi-frame images in the video stream of the rifle bolt as historical position information;
and determining the distance and the direction of the target relative to the dome camera and determining the moving direction and the moving speed of the target according to the historical position information and the calibration relation between the rifle bolt and the dome camera.
In an alternative embodiment, the system further comprises:
the snapshot initialization module is used for controlling the dome camera to rotate according to the calibration relation between the gun camera and the dome camera, so that the dome camera is positioned near the target before snapshot; and adjusting the focal length of the dome camera to a focal length corresponding to the current target detection frame accounting for two thirds of the image according to the width of the current target detection frame in the image of the dome camera, so that the dome camera starts to capture at the adjusted focal length.
In an alternative embodiment, the adjustment module comprises:
when the movement speed of the target is smaller than a first threshold value, taking the center of a current target detection frame in the dome camera image as the center position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of the target detection frame in the dome camera image to be located at the center position of the dome camera image;
when the movement speed of the target is greater than or equal to a first threshold value and smaller than a second threshold value, taking the center of the left bottom frame or the right bottom frame of the current target detection frame in the dome camera image as the central position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of the target detection frame in the dome camera image to be located at the central position of the dome camera image;
and when the movement speed of the target is greater than or equal to a second threshold value, predicting the position of the target in the dome camera image by using a least square method, taking the predicted position as the central position of the dome camera image, and adjusting the horizontal angle and the pitch angle of the dome camera so as to enable the center of a target detection frame in the dome camera image to be located at the central position of the dome camera image.
The disclosure also relates to an electronic device comprising a server, a terminal and the like. The electronic device includes: at least one processor; a memory communicatively coupled to the at least one processor; and a communication component communicatively coupled to the storage medium, the communication component receiving and transmitting data under control of the processor; wherein the memory stores instructions executable by the at least one processor to implement the method of the above embodiments.
In an alternative embodiment, the memory is used as a non-volatile computer-readable storage medium for storing non-volatile software programs, non-volatile computer-executable programs, and modules. The processor executes various functional applications of the device and data processing, i.e., implements the method, by executing nonvolatile software programs, instructions, and modules stored in the memory.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a list of options, etc. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be connected to the external device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory and, when executed by the one or more processors, perform the methods of any of the method embodiments described above.
The product can execute the method provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and can refer to the method provided by the embodiment of the application without detailed technical details in the embodiment.
The present disclosure also relates to a computer-readable storage medium for storing a computer-readable program for causing a computer to perform some or all of the above-described method embodiments.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Furthermore, those of ordinary skill in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
It will be understood by those skilled in the art that while the present invention has been described with reference to exemplary embodiments, various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from the essential scope thereof. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed, but that the invention will include all embodiments falling within the scope of the appended claims.