CN111698455B - Method, device and medium for controlling linkage of ball machine and gun machine - Google Patents

Method, device and medium for controlling linkage of ball machine and gun machine Download PDF

Info

Publication number
CN111698455B
CN111698455B CN201910189768.0A CN201910189768A CN111698455B CN 111698455 B CN111698455 B CN 111698455B CN 201910189768 A CN201910189768 A CN 201910189768A CN 111698455 B CN111698455 B CN 111698455B
Authority
CN
China
Prior art keywords
monitoring image
coordinate position
determining
image
ball machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910189768.0A
Other languages
Chinese (zh)
Other versions
CN111698455A (en
Inventor
刘昊鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201910189768.0A priority Critical patent/CN111698455B/en
Priority to PCT/CN2020/078910 priority patent/WO2020182176A1/en
Publication of CN111698455A publication Critical patent/CN111698455A/en
Application granted granted Critical
Publication of CN111698455B publication Critical patent/CN111698455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D3/00Control of position or direction
    • G05D3/12Control of position or direction using feedback

Abstract

A method, apparatus and medium for controlling a ball game machine and a gun machine linkage, the method comprising: the control device acquires a first monitoring image acquired by the gun camera and a second monitoring image acquired by the dome camera, determines the coordinate position of a specific point of the first monitoring image in the second monitoring image, so as to determine a first adjusting parameter of the dome camera, and adjusts the dome camera by using the first adjusting parameter, so that the second monitoring image is superposed with the image of the first monitoring image, and the automatic calibration of the gun camera and the dome camera is realized.

Description

Method, device and medium for controlling linkage of ball machine and gun machine
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a method, a device and a medium for controlling a ball machine and a gun machine to be linked.
Background
With the development of social science and technology, the security consciousness of people is improved, the modern security monitoring technology is widely applied, the security monitoring technology not only develops towards networking, digitalization, intellectualization and modularization, but also various advanced security monitoring means are mutually embedded, linked and complemented, so that modern security monitoring products become mature and practical day by day. For example, video surveillance systems are used to monitor scenes such as intersections, streets, and the like.
At present, a traditional video monitoring system is a camera in a fixed form, target tracking and observation are needed to be carried out manually, long-time uninterrupted real-time monitoring is carried out, monitoring personnel can have monitoring holes once negligence occurs, the working strength of the monitoring personnel is improved in the monitoring mode, the monitoring efficiency is low, and ineffective monitoring is too much. For scenes needing to be monitored to a large-range super-wide angle and for monitoring details in the scenes, a gun and ball linkage system is generally used. The gun and ball linkage system comprises a gun and a ball machine, wherein the gun is wide in field angle and used for monitoring a large scene, scene details can be observed by the ball machine after zooming, and monitoring of a certain scene is achieved through the gun and ball linkage system.
Before the linkage of a gun and a ball machine is realized, the gun and the ball machine need to be calibrated, namely, the picture is calibrated, the conventional gun and ball linkage system needs a monitoring person to manually calibrate the gun and the ball machine by naked eyes, and the calibration effect is poor.
Disclosure of Invention
The embodiment of the application provides a method, a device and a medium for controlling a gunlock and a gunlock to be linked, and the gunlock and the ball machine are automatically calibrated.
In a first aspect, an embodiment of the present application provides a method for controlling a ball machine to be linked with a gun machine, including:
acquiring a first monitoring image acquired by a gunlock and a second monitoring image acquired by a ball machine; the first monitoring image and the second monitoring image are monitoring images of the same scene from different visual angles;
determining a coordinate position of a particular point of the first monitored image in the second monitored image;
determining a first adjusting parameter of the dome camera according to the coordinate position;
and sending a first control instruction to the dome camera, wherein the first control instruction comprises the first adjusting parameter, and the first control instruction is used for instructing the dome camera to adjust the image coincidence of the second monitoring image and the first monitoring image according to the first adjusting parameter.
The coordinate position of the specific point of the first monitoring image in the second monitoring image is determined, the first adjusting parameter of the dome camera is obtained through calculation according to the coordinate positions of the specific points of the first monitoring image and the second monitoring image, the first control instruction comprising the first adjusting parameter is sent to the dome camera, so that the dome camera adjusts the image coincidence of the second monitoring image and the first monitoring image according to the first adjusting parameter in the first control instruction, the automatic adjusting process of the monitoring images of the gun camera and the dome camera is achieved, compared with manual adjustment, the image coincidence degree of the monitoring images of the gun camera and the dome camera is improved, and the calibration accuracy is higher.
Optionally, the determining the coordinate position of the specific point of the first monitored image in the second monitored image is preceded by:
respectively extracting feature points of the first monitoring image and the second monitoring image;
determining a feature point set with a corresponding relation between the first monitoring image and the second monitoring image;
calculating the mapping matrix according to the characteristic point set;
the determining the coordinate position of the specific point of the first monitored image in the second monitored image comprises: and determining the coordinate position of the specific point of the first monitoring image in the second monitoring image according to the mapping matrix.
The method comprises the steps of extracting characteristic points of a first monitoring image and a second monitoring image, determining a mapping matrix, determining the coordinate position of any characteristic point in the first monitoring image in the second monitoring image according to the mapping matrix, and determining the coordinate position accurately.
Optionally, the first adjustment parameter comprises a rotation angle. When the specific point is the central point, the first adjusting parameter is a rotation angle, and the rotation angle is used for the dome camera to adjust the coincidence of the central positions of the second monitoring image and the first monitoring image.
Optionally, the determining the coordinate position of the specific point of the first monitored image in the second monitored image comprises: determining a first coordinate position of a central point of the first monitoring image in the second monitoring image;
the determining of the first adjusting parameter of the dome camera according to the coordinate position comprises the following steps:
acquiring a second coordinate position of the central point of the second monitoring image;
determining the moving distance of the center point of the dome camera according to the second coordinate position and the first coordinate position;
and determining the rotation angle of the ball machine according to the moving distance.
The moving distance comprises a horizontal moving distance and/or a vertical moving distance, correspondingly, the rotating angle comprises a horizontal rotating angle and/or a vertical rotating angle, and the ball machine adjusts the center position of the second monitoring image to be coincident with the center position of the first monitoring image according to the rotating angle.
Optionally, the determining the rotation angle of the ball machine according to the moving distance includes:
acquiring the current focal length of the ball machine;
and determining the rotation angle of the dome camera according to the moving distance and the current focal length.
The method comprises the steps of determining a first coordinate position of a central point of a first monitoring image in a second monitoring image, obtaining a second coordinate position of the central point of the second monitoring image, determining a moving distance of the central point of the dome camera according to the first coordinate position and the second coordinate position, determining a rotating angle of the dome camera according to the moving distance and a current focal length of the dome camera, adjusting the central position of the second monitoring image to be overlapped with the central position of the first monitoring image by the dome camera according to the rotating angle, achieving an automatic adjusting process of the central positions of the monitoring images of the gun camera and the dome camera, and improving the overlapping degree of the central positions of the images compared with manual adjustment.
Optionally, the first adjustment parameter comprises an image magnification. When the specific point is an opposite point, the first adjusting parameter comprises image magnification, and the image magnification is used for the dome camera to adjust the current magnification of the dome camera, so that the magnification of the second monitoring image is consistent with that of the first monitoring image.
Optionally, the determining the coordinate position of the specific point of the first monitored image in the second monitored image comprises: determining a third coordinate position of the diagonal point of the first monitoring image in the second monitoring image;
the determining of the first adjusting parameter of the dome camera according to the coordinate position comprises the following steps:
acquiring a fourth coordinate position of the opposite corner point of the second monitoring image;
and determining the image magnification of the ball machine relative to the gun camera according to the fourth coordinate position and the third coordinate position.
The third coordinate position of the diagonal point of the first monitoring image in the second monitoring image is determined, the fourth coordinate position of the diagonal point of the second monitoring image is obtained at the same time, the image magnification ratio of the dome camera relative to the gunlock is determined according to the third coordinate position and the fourth coordinate position, the current magnification ratio of the dome camera is adjusted by the dome camera according to the image magnification ratio, the automatic adjusting process of the magnification ratio of the monitoring images of the gunlock and the dome camera is achieved, and the accuracy of image magnification ratio adjustment is improved.
Optionally, the control method further includes:
acquiring a third monitoring image of the adjusted dome camera;
determining a coordinate position of a particular point of the first monitored image in the third monitored image;
determining a second adjusting parameter of the dome camera according to the coordinate position;
and judging whether the second adjusting parameter meets a preset condition, if so, stopping parameter adjustment of the dome camera, and if not, sending a second control instruction to the dome camera, wherein the second control instruction comprises the second adjusting parameter, and the second control instruction is used for instructing the dome camera to adjust the image coincidence of the third monitoring image and the first monitoring image according to the second adjusting parameter.
Because the image adjustment for one time may not meet the requirement of image overlap ratio, the third monitoring image of the dome camera is obtained again after the image adjustment for one time, the third monitoring image is the monitoring image of the dome camera adjusted according to the first adjustment parameter, the coordinate position of the specific point of the first monitoring image of the gun camera in the third monitoring image is determined, calculating to obtain a second adjusting parameter of the dome camera according to the coordinate positions of the specific points of the first monitoring image and the third monitoring image, stopping parameter adjustment of the dome camera if the second adjusting parameter meets a preset condition, sending a second control instruction comprising the second adjusting parameter to the dome camera if the second adjusting parameter does not meet the preset adjustment, the dome camera further adjusts the image coincidence of the third monitoring image and the first monitoring image according to the second adjusting parameter, and the problem that the image coincidence degree requirement cannot be met in one image adjusting process is solved.
Optionally, the control method further includes:
and if the times of parameter adjustment of the dome camera are greater than the preset times, stopping the parameter adjustment of the dome camera.
The preset times are set to avoid the image adjusting process from entering a dead cycle.
In a second aspect, an embodiment of the present application provides a method for controlling a ball machine to be linked with a gun machine, including:
acquiring a first monitoring image acquired by a ball machine under a first magnification and a second monitoring image acquired by the ball machine under a second magnification;
respectively extracting feature points of the first monitoring image and the second monitoring image, and determining at least one group of feature points with the highest matching degree;
determining the axis-deviation coordinate position of the dome camera according to the coordinate positions of the at least one group of feature points in the first monitoring image and the second monitoring image;
determining an adjusting parameter of the dome camera according to the axis-off-coordinate position, and sending a control instruction to the dome camera, wherein the control instruction comprises the adjusting parameter, and the control instruction is used for instructing the dome camera to adjust the center position of the second monitoring image to be overlapped with the center position of the first monitoring image according to the adjusting parameter.
The method comprises the steps of extracting feature points of a first monitoring image and a second monitoring image collected by the dome camera under different magnifications, determining at least one group of feature points with the highest matching degree, determining the off-axis coordinate position of the dome camera according to the coordinate positions of the at least one group of feature points in the two monitoring images, determining adjusting parameters of the dome camera according to the off-axis coordinate position, and sending a control instruction comprising the adjusting parameters to the dome camera, so that the dome camera adjusts the center positions of the first monitoring image and the second monitoring image to be overlapped according to the adjusting parameters, automatic adjustment of the off-axis amount of the dome camera is achieved, and the tracking effect of the dome camera on a target in use is improved.
Optionally, the adjustment parameter comprises a rotation angle; the determining of the adjusting parameters of the ball machine according to the axis deviation coordinate position comprises the following steps:
determining a first coordinate position of the center point of the first monitoring image in the second monitoring image according to the off-axis coordinate position, the first magnification and the second magnification;
determining the shaft offset of the dome camera according to the first coordinate position and the second coordinate position of the central point of the second monitoring image;
and determining the rotation angle of the ball machine according to the shaft offset and the current focal length of the ball machine.
The off-axis amount comprises a horizontal off-axis amount and/or a vertical off-axis amount, and correspondingly, the rotation angle comprises a horizontal rotation angle and/or a vertical rotation angle. And the ball machine adjusts the center position of the second monitoring image to coincide with the center position of the first monitoring image according to the rotation angle.
In a third aspect, an embodiment of the present application provides a ball machine control device, including:
the acquisition module is used for acquiring a first monitoring image acquired by a gun camera and a second monitoring image acquired by a ball machine; the first monitoring image and the second monitoring image are monitoring images of the same scene from different visual angles;
a determining module for determining a coordinate position of a specific point of the first monitored image in the second monitored image;
the determining module is further used for determining a first adjusting parameter of the dome camera according to the coordinate position;
and the sending module is used for sending a first control instruction to the dome camera, the first control instruction comprises the first adjusting parameter, and the first control instruction is used for instructing the dome camera to adjust the image coincidence of the second monitoring image and the first monitoring image according to the first adjusting parameter.
And (3) supplementary scheme: optionally, the determining module is further configured to, before determining the coordinate position of the specific point of the first monitored image in the second monitored image, perform feature point extraction on the first monitored image and the second monitored image respectively;
determining a feature point set with a corresponding relation between the first monitoring image and the second monitoring image;
calculating the mapping matrix according to the characteristic point set;
the determining module is specifically configured to determine, according to the mapping matrix, a coordinate position of a specific point of the first monitored image in the second monitored image.
Optionally, the first adjustment parameter comprises a rotation angle.
Optionally, the determining module is specifically configured to: determining a first coordinate position of a central point of the first monitoring image in the second monitoring image;
acquiring a second coordinate position of the central point of the second monitoring image;
determining the moving distance of the center point of the dome camera according to the second coordinate position and the first coordinate position;
and determining the rotation angle of the ball machine according to the moving distance.
Optionally, the determining module is specifically configured to: acquiring the current focal length of the ball machine;
and determining the rotation angle of the dome camera according to the moving distance and the current focal length.
Optionally, the first adjustment parameter comprises an image magnification.
Optionally, the determining module is specifically configured to: determining a third coordinate position of the diagonal point of the first monitoring image in the second monitoring image;
acquiring a fourth coordinate position of the opposite corner point of the second monitoring image;
and determining the image magnification of the ball machine relative to the gun camera according to the fourth coordinate position and the third coordinate position.
And (3) supplementary scheme: optionally, the control device further comprises: a judgment module;
the determining module is further configured to obtain a third monitoring image of the adjusted dome camera;
determining a coordinate position of a particular point of the first monitored image in the third monitored image;
determining a second adjusting parameter of the dome camera according to the coordinate position;
the judging module is used for judging whether the second adjusting parameter meets a preset condition, if so, stopping adjusting the parameter of the dome camera, and if not, sending a second control instruction to the dome camera, wherein the second control instruction comprises the second adjusting parameter, and the second control instruction is used for instructing the dome camera to adjust the image coincidence of the third monitoring image and the first monitoring image according to the second adjusting parameter.
In a fourth aspect, an embodiment of the present application provides a ball machine control device, including:
the acquisition module is used for acquiring a first monitoring image acquired by the dome camera under a first magnification and a second monitoring image acquired by the dome camera under a second magnification;
the extraction module is used for respectively extracting the feature points of the first monitoring image and the second monitoring image and determining at least one group of feature points with the highest matching degree;
the determining module is used for determining the axis deviation coordinate position of the dome camera according to the coordinate positions of the at least one group of feature points in the first monitoring image and the second monitoring image;
the determining module is further used for determining adjusting parameters of the dome camera according to the axis deviation coordinate position;
and the sending module is used for sending a control instruction to the dome camera, the control instruction comprises an adjusting parameter, and the control instruction is used for instructing the dome camera to adjust the center position coincidence of the second monitoring image and the first monitoring image according to the adjusting parameter.
Optionally, the adjustment parameter comprises a rotation angle; the determining module is specifically configured to: determining a first coordinate position of the center point of the first monitoring image in the second monitoring image according to the off-axis coordinate position, the first magnification and the second magnification;
determining the shaft offset of the dome camera according to the first coordinate position and the second coordinate position of the central point of the second monitoring image;
and determining the rotation angle of the ball machine according to the shaft offset and the current focal length of the ball machine.
In a fifth aspect, an embodiment of the present application provides a ball game machine control device, including: a processor, an interface; the processor executing computer-executable instructions to cause the processor to perform the method of any one of the first aspect or any one of the second aspect; and the processor acquires the monitoring images acquired by the gunlock and the dome camera through the interface.
In a sixth aspect, an embodiment of the present application provides a ball game machine control device, including: the ball machine control apparatus according to the fifth aspect, wherein:
the ball machine control device is a gun camera holder assembly, and the processor is a control chip in the gun camera holder assembly; or
The ball machine control device is a ball machine holder component, and the processor is a control chip in the ball machine holder component; or
The ball machine control device is a main control device independent of the gun camera holder assembly and the ball machine holder assembly, and the processor is a control chip independent of the main control device of the gun camera holder assembly and the ball machine holder assembly.
In a seventh aspect, an embodiment of the present application provides a readable storage medium, which includes a program or instructions, and when the program or instructions are executed on a computing device, the method according to any one of the first aspect is performed.
In an eighth aspect, embodiments of the present application provide a readable storage medium, which includes a program or instructions, when the program or instructions are run on a computing device, the method according to any one of the second aspect is performed.
The application provides a method, a device and a medium for controlling the linkage of a ball machine and a gun machine, wherein the method comprises the following steps: the control device acquires a first monitoring image acquired by the gun camera and a second monitoring image acquired by the dome camera, determines the coordinate position of a specific point of the first monitoring image in the second monitoring image, so as to determine a first adjusting parameter of the dome camera, and adjusts the dome camera by using the first adjusting parameter, so that the first monitoring image is superposed with the second monitoring image, and the automatic calibration of the gun camera and the dome camera is realized.
Drawings
FIG. 1a is a schematic structural diagram of a gun and ball linkage system according to an embodiment of the present disclosure;
FIG. 1b is a schematic structural diagram of a rifle ball linkage system according to another embodiment of the present application;
fig. 2 is a flowchart of a method for controlling a ball machine and a gun machine to be linked according to an embodiment of the present disclosure;
fig. 3a is a schematic diagram of a first monitoring image provided in an embodiment of the present application;
fig. 3b is a schematic diagram of a second monitoring image provided in the embodiment of the present application;
fig. 4 is a flowchart of a method for controlling a ball machine to be linked with a gun machine according to another embodiment of the present disclosure;
FIG. 5 is a flow chart of a method for controlling the linkage of a ball machine and a gun machine according to yet another embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a coordinate position of a center point of a first monitored image in a second monitored image and a coordinate position of a center point of the second monitored image;
FIG. 7 is a schematic diagram of the coordinate position of the first monitor image pair corner point in the second monitor image and the coordinate position of the second monitor image pair corner point;
fig. 8 is a flowchart of a method for controlling a ball machine and a gun machine to be linked according to still another embodiment of the present disclosure;
FIG. 9 is a flow chart of a method for controlling the linkage of a ball machine and a gun machine according to yet another embodiment of the present application;
fig. 10 is a schematic structural diagram of a ball machine control device according to an embodiment of the present application;
FIG. 11 is a schematic structural diagram of a control device of a ball machine according to another embodiment of the present application;
FIG. 12 is a schematic structural diagram of a ball machine control device according to yet another embodiment of the present application;
fig. 13 is a schematic diagram of a hardware structure of a ball machine control device according to an embodiment of the present application.
Detailed Description
The control method provided by the embodiment of the application can be applied to a gun and ball linkage system. The gun and ball linkage system comprises a gun camera and a ball machine, wherein the gun camera is one of monitoring cameras, can adopt a C/CS lens interface, can be connected with a lens and has a large monitoring visual field; the ball machine is a camera capable of zooming, more details can be seen through zooming of the lens, and the shape can be a ball shape or other shapes. The gun and ball linkage system combines the advantages of a gun camera and a ball machine, and can not only see a wider field of view, but also capture remote details.
The calibration process of the gun and ball linkage system, namely the calibration process of the images of the gun camera and the ball machine, calibrates the images of the gun camera and the ball machine to be consistent through at least one group of characteristic points. The picture consistency means that the central points of the pictures of the gun camera and the dome camera are superposed, and the magnification ratios of the pictures of the gun camera and the dome camera to the same target object are consistent. The better the picture consistency, the better the calibration effect. At present, all the existing linkage systems adopt a manual mode to carry out picture calibration, and the manual adjustment is influenced by human eyes to generate different errors so as to influence the final calibration result. For the linkage system, calibration is usually performed once after the equipment is installed, and during the use of the equipment, calibration can be performed according to actual needs.
According to the method for controlling the linkage of the dome camera and the gun camera, the characteristic points which are matched in the two images are determined by obtaining the monitoring images which are respectively collected by the current gun camera and the dome camera, the mapping matrix of the two images is calculated according to the characteristic points, the adjusting parameters of the dome camera are determined according to the mapping matrix and the specific points in the images, the dome camera adjusts the picture coincidence of the current two images according to the adjusting parameters, the automatic calibration of the gun camera and the dome camera is achieved, and the accuracy of the image coincidence adjustment is improved. The control method provided by the embodiment of the present application can be applied to other linkage systems besides the gun-ball linkage system, for example, a linkage system of a barrel machine and a ball machine, a linkage system of a ball machine and a ball machine, and the like.
It should be noted that, as time goes by, the image content of the monitoring image collected by the camera may be different. Therefore, the first monitoring image and the second monitoring image described in the embodiment of the present invention respectively refer to: and when the corresponding steps are executed, the image contents collected by the gunlock and the dome camera. Therefore, the image contents of the first monitoring image and the second monitoring image obtained in step 101 may not be consistent with the image contents of the first monitoring image and the second monitoring image after the calibration in step 104 is completed. This is illustrated below: step 101 is executed at 10:00, and at this time, pedestrians enter the shooting ranges of the dome camera and the rifle bolt, so that the pedestrians exist in the first monitoring image and the second monitoring image; at 10:01, step 104 is performed, at which time the pedestrian leaves the monitoring range of the dome and rifle bolts, which means that after calibration is completed, there is no pedestrian in the first and second monitored images.
Next, a gun and ball linkage system provided in an embodiment of the present application is described in detail, where fig. 1a is a schematic structural diagram of a gun and ball linkage system provided in an embodiment of the present application, and fig. 1b is a schematic structural diagram of a gun and ball linkage system provided in another embodiment of the present application. As shown in fig. 1a, the gun and ball linkage system includes a main control device, a gun holder assembly and a ball machine holder assembly, wherein the main control device is connected with the gun holder assembly and the ball machine holder assembly respectively. The system comprises a gunlock cradle head assembly, a gunlock control module, a processor and a control module, wherein the gunlock cradle head assembly comprises a gunlock, a gunlock motor for driving the gunlock to move and a gunlock cradle head control module for controlling the rotation of the gunlock motor; the ball machine holder assembly comprises a ball machine, a ball machine motor for driving the ball machine to move and a ball machine holder control module for controlling the ball machine motor to rotate, and the ball machine holder control module runs on a processor of the ball machine. The control module of the gun holder can be a software module or a chip (or a combination of chips). The ball machine holder control module can be a software module or a chip (or a combination of chips).
The main control equipment comprises a main control module, a communication module and an image signal processor, wherein the gunlock and the ball machine are connected with the image signal processor, the gunlock holder control module and the ball machine holder control module are connected with the main control module, and the communication module is connected with an upper computer. The main control module runs on a processor of the main control equipment, and the image processor receives monitoring images acquired by the gunlock and the ball machine and performs preprocessing (format conversion) on the monitoring images. Based on the gun and ball linkage system, the execution main body of the control method provided by the embodiment is the processor of the main control device.
As shown in fig. 1b, the gun and ball linkage system includes a gun camera pan-tilt assembly and a ball machine pan-tilt assembly, which are connected. The gunlock holder assembly comprises a gunlock, a gunlock motor for driving the gunlock to move, an image signal processor ISP and a processor (such as a CPU, an ARM or a DSP); the ball machine holder component comprises a ball machine, a ball machine motor for driving the ball machine to move, an image signal processor ISP and a processor (CPU, ARM or DSP). The gunlock is in communication connection with the ball machine, image data are interacted, and ISPs of the gunlock and the ball machine are used for converting image formats. The control method provided by the embodiment can be executed by a bolt machine processor or a ball machine processor.
In the gun and ball linkage system, the gun machine comprises a visible light gun machine and an infrared thermal imaging gun machine, and the ball machine comprises a visible light ball machine and an infrared thermal imaging ball machine. The method is characterized in that 24 hours a day are divided into a day time period and a night time period, a visible light gun camera and a ball machine are used for tracking and monitoring targets in the day time period, and an infrared thermal imaging gun camera and a ball machine are used for tracking and monitoring targets in the night time period. The gun and the ball machine can be arranged at the same position at different heights, the installation height of the gun is higher than that of the ball machine, the lowest installation height of the ball machine is not lower than three meters, and the highest installation height is suitable for the ball machine to be capable of clearly seeing specific targets after being amplified to the maximum times. One alternative mounting relationship is: the gun and the ball machine are installed together, namely the visual fields of the gun and the ball machine are close.
The method for controlling the linkage of the dome camera and the gun camera according to the present application is described in detail below by using specific embodiments, it should be noted that the following specific embodiments may be combined with each other, and description of the same or similar contents will not be repeated in different embodiments.
For convenience of description, in the following embodiments, the main execution bodies of the control methods are collectively referred to as a control device, and the control device may be a processor inside the gun camera, a processor inside the ball machine, or a processor inside a main control device independent of the gun camera and the ball machine. The control device may be a combination of a plurality of processors, for example, a part of the functions of the control device is realized by a processor inside the gun camera, and another part of the functions is realized by a processor inside the ball machine. Optionally, the control device may further include a memory in addition to the processor.
Fig. 2 is a flowchart of a method for controlling a ball machine to be linked with a gun machine according to an embodiment of the present application, and referring to fig. 2, the method of the present embodiment includes:
step 101, acquiring a first monitoring image acquired by a gunlock and a second monitoring image acquired by a dome camera; the first monitoring image and the second monitoring image are monitoring images of the same scene from different visual angles;
as will be understood by those skilled in the art, in the initial installation position of the gun and the ball machine of the gun and ball linkage system, there is a difference in the viewing angle of the monitoring images collected by the gun and the ball machine, and before linkage of the gun and the ball machine is realized, image frames of the gun and the ball machine with different viewing angles need to be adjusted. Certainly, after the gun and ball linkage system is used for a period of time, the image pictures of the gun camera and the ball machine can be adjusted again according to needs, for example, after the gun and ball linkage system is used for a period of time, when the pictures of the gun camera and the ball machine are not consistent any more, the calibration can be carried out by using the embodiment of the application.
Fig. 3a is a schematic view of a first monitoring image provided in the embodiment of the present application, and fig. 3b is a schematic view of a second monitoring image provided in the embodiment of the present application. In this embodiment, the first monitoring image and the second monitoring image acquired by the control device are monitoring images of the same scene and different viewing angles, the first monitoring image acquired by the gun camera is a panoramic image of a certain intersection, the second monitoring image acquired by the ball machine is an enlarged image of a certain vehicle on an east road of the intersection, and the image is a partial image in the panoramic image acquired by the gun camera.
The control device acquires a first monitoring image acquired by the gun camera and a second monitoring image acquired by the ball machine at the same moment (the same moment does not require strict consistency of time and allows proper time difference), wherein the first monitoring image is a monitoring image of the gun camera after pretreatment, and the second monitoring image is a monitoring image of the ball machine after pretreatment. Specifically, the image sensor of the gun camera acquires a monitoring image of a certain view angle of a current scene, the format of the monitoring image is RAW format, the image sensor of the gun camera transmits image data of the RAW format to the image signal processor ISP of the gun camera, the image data of the RAW format is converted into image data of YUV format by the ISP of the gun camera, and the first monitoring image acquired by the control device is a YUV format image of the gun camera which is preprocessed. Similarly, the dome camera image sensor acquires a monitoring image of a certain viewing angle of the current scene, the format of the monitoring image is a RAW format, the dome camera image sensor transmits image data of the RAW format to the dome camera image signal processor ISP, the dome camera ISP converts the image data of the RAW format into image data of a YUV format, and the second monitoring image acquired by the control device is a YUV format image preprocessed by the dome camera.
Step 102, determining the coordinate position of the specific point of the first monitoring image in the second monitoring image;
specifically, the specific point of the first monitoring image includes a center point and/or a diagonal point of the first monitoring image, where the diagonal point refers to at least one set of diagonal points in the image, for example, a set of diagonal points is a set of upper left corner and lower right corner in the image, and a set of diagonal points is a set of upper right corner and lower sitting corner in the image.
After the control device acquires the first monitoring image acquired by the gunlock and the second monitoring image acquired by the ball machine at the same moment, the control device determines that the specific point of the first monitoring image is in front of the coordinate position in the second monitoring image, and the control device further comprises: respectively extracting feature points of the first monitoring image and the second monitoring image by using a feature extraction and matching algorithm; determining a feature point set with a corresponding relation between the first monitoring image and the second monitoring image; and calculating a mapping matrix according to the characteristic point set.
The characteristic points of the image may be understood as relatively salient points in the image, such as contour points, bright points in darker areas, dark points in lighter areas, etc. Optionally, the feature extraction and matching algorithm of this embodiment may be implemented by using an ORB algorithm, where the ORB detects the feature point by using a fast (features from estimated Segment test) algorithm, and detects a circle of pixel values around the candidate feature point based on the gray-scale value of the image around the feature point, and if there are enough pixel points in the region around the candidate point and the gray-scale value of the candidate point is large enough, the candidate point is considered as a feature point. Of course, other feature extraction and matching algorithms may be used.
Specifically, the control device determines the coordinate position of a specific point of the first monitored image in the second monitored image according to the mapping matrix. The mapping matrix is a 3 × 3 matrix, denoted as H, and the mapping matrix of the two images can be solved according to the feature point sets having correspondence in the two images, and the solving process is the prior art and is not specifically developed here.
The following describes how the control module determines the coordinate position of the specific point of the first monitored image in the second monitored image according to the mapping matrix, taking the specific point as a central point as an example.
Assuming the coordinate a (x, y,1) of the center point of the first monitor image of the bolt, the coordinate a1(x, y,1) of the center point a of the first monitor image in the second monitor image can be obtained according to the calculation formula a1 ═ H × a1,y1,z1):
Figure BDA0001994038550000081
Subsequently, the coordinate A1 is normalized to obtain the real coordinate A1' of the central point A of the first monitoring image in the second monitoring image,
Figure BDA0001994038550000091
step 103, determining a first adjusting parameter of the dome camera according to the coordinate position;
and 104, sending a first control instruction to the dome camera, wherein the first control instruction comprises a first adjusting parameter, and the first control instruction is used for instructing the dome camera to adjust the image coincidence of the second monitoring image and the first monitoring image according to the first adjusting parameter.
Specifically, the first adjustment parameter of the dome camera includes at least one of two parameters, namely a rotation angle and an image magnification. For the parameter of the rotation angle, the control device determines the movement distance of the central point of the ball machine according to the coordinate position of the central point, and determines the rotation angle of the ball machine according to the movement distance, wherein the movement distance comprises a horizontal movement distance and/or a vertical movement distance, and correspondingly, the rotation angle comprises a horizontal rotation angle and/or a vertical rotation angle. After the ball machine rotates according to the rotation angle, the center positions of the second monitoring image and the first monitoring image are overlapped; for the parameter of the image magnification, the control device determines the image magnification of the ball machine relative to the gun camera according to the coordinate position of the diagonal point, so that the ball machine determines the adjusted magnification according to the image magnification. The adjusted magnification is the product of the current magnification of the dome camera and the reciprocal of the image magnification, and it can be understood that the adjusted magnification of the dome camera is consistent with the magnification of the gun camera.
According to the method for controlling the linkage of the dome camera and the gun camera, the coordinate position of the specific point of the first monitoring image in the second monitoring image is determined by acquiring the first monitoring image acquired by the gun camera and the second monitoring image acquired by the dome camera, the first adjusting parameter of the dome camera is determined according to the coordinate position, and the first control instruction comprising the first adjusting parameter is sent to the dome camera, so that the dome camera adjusts the image coincidence of the second monitoring image and the first monitoring image according to the first adjusting parameter. The method realizes the automatic calibration process of the gunlock and the ball machine, and improves the accuracy of adjusting the image superposition.
The following uses a specific embodiment to determine the first adjustment parameter of the ball machine according to the coordinate position in the embodiment shown in fig. 2. In the embodiment of the control method shown in fig. 4, the characteristic point is a central point, and the first adjustment parameter is a rotation angle; in the embodiment of the control method shown in fig. 5, the feature points are diagonal points, and the first adjustment parameter is image magnification.
Fig. 4 is a flowchart of a method for controlling a ball machine to be linked with a gun machine according to another embodiment of the present application, and referring to fig. 4, the method of the present embodiment includes:
step 201, acquiring a first monitoring image acquired by a gunlock and a second monitoring image acquired by a dome camera; the first monitoring image and the second monitoring image are monitoring images of the same scene from different visual angles;
step 201 of this embodiment is the same as step 101 of the above embodiment, and reference may be made to the above embodiment specifically, which is not described herein again.
Step 202, determining a first coordinate position of a central point of a first monitoring image in a second monitoring image;
specifically, the control device determines a first coordinate position of a center point of the first monitoring image in the second monitoring image according to the mapping matrix. The calculation process of the mapping matrix is the same as that of the embodiment shown in fig. 2, and is not described herein again.
Step 203, acquiring a second coordinate position of the central point of the second monitoring image;
step 204, determining the moving distance of the center point of the dome camera according to the second coordinate position and the first coordinate position;
after acquiring the first coordinate position of the center point of the first monitoring image in the second monitoring image and the second coordinate position of the center point of the second monitoring image, the control device may determine a movement distance of the center point of the dome camera according to the second coordinate position and the first coordinate position, where the movement distance includes a horizontal movement distance and/or a vertical movement distance, and fig. 6 is a schematic diagram of the coordinate position of the center point of the first monitoring image in the second monitoring image and the coordinate position of the center point of the second monitoring image. As shown in fig. 6, if the coordinate position of the center point of the first monitoring image of the gun camera in the second monitoring image is position 1 or position 2, it may be determined that the movement distance of the center point of the dome camera only includes the horizontal movement distance; if the coordinate position of the center point of the first monitoring image of the gun camera in the second monitoring image is position 3 or position 4, the moving distance of the center point of the dome camera can be determined to only comprise the vertical moving distance; if the coordinate position of the center point of the first monitoring image of the gun camera in the second monitoring image is position 5, the moving distance of the center point of the dome camera can be determined to include a horizontal moving distance and a vertical moving distance.
And step 205, determining the rotation angle of the ball machine according to the moving distance.
Specifically, the control device obtains the current focal length of the ball machine, and determines the rotation angle of the ball machine according to the moving distance and the current focal length of the ball machine. If the moving distance comprises a horizontal moving distance, the rotating angle of the ball machine comprises a horizontal rotating angle; if the moving distance comprises a vertical moving distance, the rotating angle of the ball machine comprises a vertical rotating angle; if the moving distance comprises a horizontal moving distance and a vertical moving distance, the rotating angle of the ball machine comprises a horizontal rotating angle and a vertical rotating angle.
Assuming that the horizontal moving distance of the ball machine is determined to be w, the vertical moving distance is determined to be h, and the current focal length of the ball machine is determined to be f, the horizontal rotation angle pan value of the ball machine and the vertical rotation angle tile value of the ball machine can be obtained through the following formulas:
pan=arctan(w/f)
tile=arctan(h/f)
it can be understood by those skilled in the art that the focal length values corresponding to different magnifications are different, and if the current magnification of the dome camera is N, the current focal length of the dome camera is fNF in the formula of the horizontal rotation angle and the vertical rotation angle of the computer ball machine is replaced by fN
According to the method for controlling the linkage of the dome camera and the gun camera, the first coordinate position of the central point of the first monitoring image in the second monitoring image is determined by obtaining the first monitoring image collected by the gun camera and the second monitoring image collected by the dome camera, the second coordinate position of the central point of the second monitoring image is obtained, the moving distance of the central point of the dome camera is determined according to the first coordinate position and the second coordinate position, and the rotating angle of the dome camera is determined according to the moving distance. The method realizes the automatic adjustment process of the positions of the center points of the monitoring images of the gunlock and the dome camera, and improves the accuracy of the position adjustment of the center points of the images.
Fig. 5 is a flowchart of a method for controlling a ball machine to be linked with a gun machine according to another embodiment of the present application, and referring to fig. 5, the method for controlling the gun machine according to the embodiment includes:
301, acquiring a first monitoring image acquired by a gunlock and a second monitoring image acquired by a dome camera; the first monitoring image and the second monitoring image are monitoring images of the same scene from different visual angles;
step 301 of this embodiment is the same as step 101 of the above embodiment, and reference may be made to the above embodiment for details, which are not described herein again.
Step 302, determining a third coordinate position of the diagonal point of the first monitoring image in the second monitoring image;
specifically, the control device determines a third coordinate position of the diagonal point of the first monitoring image in the second monitoring image according to the mapping matrix. The calculation process of the mapping matrix is the same as that of the embodiment shown in fig. 2, and is not described herein again.
303, acquiring a fourth coordinate position of the diagonal point of the second monitoring image;
and step 304, determining the image magnification of the ball machine relative to the gun camera according to the fourth coordinate position and the third coordinate position.
After acquiring a third coordinate position of the diagonal point of the first monitoring image in the second monitoring image and a fourth coordinate position of the diagonal point of the second monitoring image, the control device determines a first diagonal size of the diagonal point of the first monitoring image in the second monitoring image according to the third coordinate position; determining a second diagonal size of a diagonal point of the second monitoring image according to the fourth coordinate position; and determining the image magnification of the ball machine relative to the gun camera according to the first diagonal size and the second diagonal size. For example, fig. 7 is a schematic diagram of the coordinate position of the first monitoring image corner point in the second monitoring image and the coordinate position of the second monitoring image corner point, and as shown in fig. 7, the first diagonal dimension L1 of the gun camera in the image picture of the ball camera is 2 times of the second diagonal dimension L2 of the image picture of the ball camera, that is, the image magnification of the ball camera relative to the gun camera is 2.
And the ball machine determines the magnification adjusted by the ball machine according to the current magnification and the image magnification. The adjusted magnification is equal to the product of the current magnification of the dome camera and the inverse of the image magnification.
Specifically, if the image magnification of the dome camera relative to the gun camera is equal to 1, the first adjustment parameter does not include the image magnification, and the dome camera does not need to adjust the current magnification at this time; if the image magnification of the ball machine relative to the gun camera is greater than 1, the first adjusting parameter comprises the image magnification, and at this time, the ball machine needs to adjust the current magnification, for example, the image magnification is 2, and the magnification needs to be adjusted to 1/2, so that the magnification of the second monitoring image is consistent with that of the first monitoring image; if the image magnification of the ball machine relative to the gun camera is smaller than 1, the first adjustment parameter includes the image magnification, and at this time, the ball machine needs to adjust the current magnification, for example, the image magnification is 1/2, and the magnification needs to be adjusted to 2 times, so that the magnification of the second monitoring image is consistent with that of the first monitoring image.
In the method for controlling the linkage of the dome camera and the gun camera, a third coordinate position of an opposite angle point of the first monitoring image in the second monitoring image is determined by obtaining the first monitoring image collected by the gun camera and the second monitoring image collected by the dome camera, a fourth coordinate position of the opposite angle point of the second monitoring image is obtained, and an image magnification ratio of the dome camera relative to the gun camera is determined according to the third coordinate position and the fourth coordinate position, so that the dome camera adjusts the current magnification ratio of the dome camera according to the image magnification ratio. The method realizes the automatic adjustment process of the magnification of the monitoring images of the gunlock and the dome camera, and improves the accuracy of the adjustment of the magnification of the images.
On the basis of the foregoing embodiments, optionally, after the dome camera adjusts the image coincidence of the second monitoring image and the first monitoring image according to the first adjustment parameter, the control method further includes: and detecting the image overlapping degree. And if the image coincidence degree meets the preset condition, stopping the parameter adjustment of the dome camera, and if the image coincidence degree does not meet the preset condition, repeatedly executing the embodiment until the image coincidence degree meets the preset condition. The control method provided in the present embodiment is explained below with reference to the drawings.
Fig. 8 is a flowchart of a method for controlling a ball machine to be linked with a gun machine according to still another embodiment of the present application, where based on the embodiments shown in fig. 2, 4, and 5, as shown in fig. 8, the method further includes:
s401, obtaining a third monitoring image of the adjusted ball machine;
and the third monitoring image is the monitoring image which is adjusted by the dome camera according to the first adjusting parameter.
S402, determining the coordinate position of the specific point of the first monitoring image in the third monitoring image;
specifically, the coordinate position of a specific point of the first monitored image in the third monitored image is determined according to the mapping matrix, wherein the specific point comprises a central point and/or a diagonal point. The calculation process of the mapping matrix is the same as that of the embodiment shown in fig. 2, and is not described herein again. The process of determining the coordinate position of the specific point of the first monitored image in the third monitored image is the same as the embodiment shown in fig. 4 and 5, and is not repeated here.
S403, determining a second adjusting parameter of the dome camera according to the coordinate position;
the process for determining the second adjustment parameter is the same as the process for determining the first adjustment parameter provided in the above embodiments, and is not described here again.
S404, judging whether the second adjusting parameter meets a preset condition, and if so, executing S405; if the preset condition is not met, executing S406;
s405, stopping adjusting parameters of the ball machine;
and S406, sending a second control instruction to the dome camera, wherein the second control instruction comprises a second adjusting parameter, and the second control instruction is used for instructing the dome camera to adjust the image superposition of the third monitoring image and the first monitoring image according to the second adjusting parameter.
Specifically, the second adjustment parameter comprises a rotation angle, the control device judges whether the rotation angle is smaller than or equal to a preset rotation angle, and if the rotation angle is smaller than or equal to the preset rotation angle, the parameter adjustment of the dome camera is stopped; and if the rotation angle is larger than the preset rotation angle, sending a second control instruction to the ball machine. It should be noted that, if the rotation angle includes a horizontal rotation angle and a vertical rotation angle, one of the two rotation angles does not satisfy the above condition, a second control command still needs to be sent to the ball machine, and a second adjustment parameter in the second control command only includes a parameter that does not satisfy the above condition.
The second adjusting parameter comprises image magnification, the control device judges whether the difference value between the image magnification and the preset image magnification is smaller than or equal to a preset threshold value, wherein the preset image magnification is set to be 1, and if the difference value is smaller than or equal to the preset threshold value, the parameter adjustment of the dome camera is stopped; and if the value is larger than the preset threshold value, sending a second control instruction comprising a second adjusting parameter to the ball machine.
Optionally, if the number of times of parameter adjustment on the dome camera is greater than the preset number of times, the parameter adjustment on the dome camera is stopped. The preset times are set to avoid the image adjusting process from entering a dead cycle.
The control method provided by this embodiment mainly detects the image coincidence degree of the dome camera monitoring image and the gun camera monitoring image after parameter adjustment, determines the coordinate position of the specific point of the first monitoring image in the third monitoring image by obtaining the adjusted third monitoring image of the dome camera, determines the second adjustment parameter of the dome camera according to the coordinate position, stops parameter adjustment of the dome camera if the second adjustment parameter meets a preset condition, and sends a second control instruction including the second adjustment parameter to the dome camera if the second adjustment parameter does not meet the preset condition, so that the dome camera further adjusts the image coincidence of the third monitoring image and the first monitoring image according to the second adjustment parameter. On the basis of the above embodiments, the method adds an iterative process of image adjustment, solves the problem that the requirement of image coincidence degree cannot be met in one adjustment process, realizes an automatic adjustment process of the monitoring images of the gunlock and the dome camera, and further improves the accuracy of image coincidence adjustment.
In a gun and ball linkage system, in the process of tracking a target, a ball machine needs to be frequently controlled to zoom, and the optical axis of the ball machine is easy to deviate. The deviation of the optical axis will seriously affect the accuracy of target tracking, and the ball machine will deviate from the tracking target in the zooming process. The method for solving the problem of the shaft deviation at present is to measure the shaft deviation of the ball machine before equipment leaves a factory, and write the shaft deviation as a basic parameter into an algorithm, however, the shaft deviation of the ball machine is easily influenced by the external environment, and the shaft deviation of the ball machine after long-term use may change to influence the tracking effect. In addition, the shaft deviation of the dome camera also affects the linkage of the gun camera and the dome camera, and the problem that images of the gun camera and the dome camera are not overlapped is caused. Therefore, it is necessary to automatically adjust the axial deviation of the ball machine. The method for controlling the linkage of the ball machine and the gun machine provided by the embodiment will be described in detail with reference to fig. 9. This embodiment may be used alone or in combination with the process described in any of the preceding flowcharts of fig. 2, 4, 5 and 8.
Fig. 9 is a flowchart of a method for controlling a ball machine to be linked with a gun machine according to another embodiment of the present application, and referring to fig. 9, the method for controlling the gun machine according to the embodiment includes:
step 501, acquiring a first monitoring image acquired by a ball machine under a first magnification and a second monitoring image acquired by the ball machine under a second magnification;
in this embodiment, the first monitoring image and the second monitoring image are monitoring images acquired by the dome camera in the same scene, the same viewing angle, and different magnifications. Wherein the first magnification is greater than or less than the second magnification.
Step 502, respectively extracting feature points of the first monitoring image and the second monitoring image, and determining at least one group of feature points with the highest matching degree;
after acquiring a first monitoring image acquired by the dome camera under a first magnification and a second monitoring image acquired by the dome camera under a second magnification, the control device respectively extracts feature points of the first monitoring image and the second monitoring image by using a feature extraction and matching algorithm, determines a feature point set with a corresponding relationship in the first monitoring image and the second monitoring image, and determines at least one group of feature points with the highest matching degree according to the feature point set. The feature point with the highest matching degree refers to a point with the highest pixel point similarity in the two images. Optionally, the feature extraction and matching algorithm of this embodiment may be implemented by using an ORB algorithm, which, like the embodiment shown in fig. 2, may of course be implemented by using other feature extraction and matching algorithms.
Step 503, determining the axis-off-coordinate position of the dome camera according to the coordinate positions of the at least one group of feature points in the first monitoring image and the second monitoring image;
the off-axis coordinate position refers to the coordinate position of the intersection point of the optical axis of the dome camera and the imaging plane. Specifically, the control device determines the axis deviation coordinate position of the dome camera according to the coordinate positions of the at least one group of feature points in the first monitoring image and the second monitoring image, the first magnification and the second magnification. For example, taking a set of feature points as an example, p1Is a feature point, p, in the first monitored image1' are feature points in the second monitored image,p1and p1' the point where the first monitored image and the second monitored image have a corresponding relationship, the characteristic point p1The coordinate of the first monitoring image is (x)1,y1) Characteristic point p1' the coordinates in the second monitoring image are (x)1’,y1') the first magnification is z1The second magnification is z2According to the formula z2/z1=(p3-p’)/(p3-p) of1Substitution of p, p1By substituting for p', off-axis coordinates p can be obtained3(x3,y3)。
Step 504, determining adjusting parameters of the dome camera according to the axis deviation coordinate position;
and 505, sending a control instruction to the dome camera, wherein the control instruction comprises an adjusting parameter, and the control instruction is used for instructing the dome camera to adjust the center position of the second monitoring image to coincide with the center position of the first monitoring image according to the adjusting parameter.
Specifically, the control device determines a first coordinate position of a center point of the first monitoring image in the second monitoring image according to the off-axis coordinate position, the first magnification and the second magnification; determining the shaft offset of the ball machine according to the first coordinate position and the second coordinate position of the central point of the second monitoring image; and determining the rotation angle of the ball machine according to the shaft offset and the current focal length of the ball machine.
For example, suppose p2Is the center point of the first monitored image, the center point p2The coordinate of the first monitoring image is (x)2,y2) The first magnification, the second magnification and the off-axis coordinate position are respectively z1,z2,p3(x3,y3) According to the formula z2/z1=(p3-p’)/(p3-p) of2Substituting p to obtain the central point p in the first monitored image2At a first coordinate position p of the second monitored image2', the coordinates are (x)2’,y2'). Let p be4Is the center point of the second monitored image, the center point p4The coordinate of the second monitoring image is (x)4,y4) It can be understood that the center point p of the second monitor image4With the central point p of the first monitored image2Not a corresponding set of feature points. According to the first coordinate position p2’(x2’,y2') and a second coordinate position p of a center point of the second monitored image4(x4,y4) The off-axis amount of the ball machine can be determined. The off-axis amount comprises a horizontal off-axis amount and/or a vertical off-axis amount, and correspondingly, the rotation angle of the ball machine comprises a horizontal rotation angle and/or a vertical rotation angle.
According to the method for controlling the linkage of the dome camera and the gun camera, the first monitoring image and the second monitoring image acquired by the dome camera under different magnifications are acquired, feature point extraction is respectively carried out on the first monitoring image and the second monitoring image, at least one group of feature points with the highest matching degree is determined, the off-axis coordinate position of the dome camera is determined according to the coordinate positions of the at least one group of feature points in the first monitoring image and the second monitoring image, the adjusting parameter of the dome camera is determined according to the off-axis coordinate position, and a control instruction comprising the adjusting parameter is sent to the dome camera so that the dome camera can adjust the center position of the first monitoring image to be coincident with the center position of the second monitoring image according to the adjusting parameter. The method realizes the automatic adjustment process of the self-axis deviation of the ball machine, and improves the accuracy of adjusting the axis deviation of the ball machine.
Fig. 10 is a schematic structural diagram of a ball machine control device according to an embodiment of the present application, where the control device includes:
the acquisition module 61 is used for acquiring a first monitoring image acquired by a gun camera and a second monitoring image acquired by a dome camera; the first monitoring image and the second monitoring image are monitoring images of the same scene from different visual angles;
a determining module 62 for determining the coordinate position of a specific point of the first monitored image in the second monitored image;
the determining module 62 is further configured to determine a first adjusting parameter of the dome camera according to the coordinate position;
and the sending module 63 is configured to send a first control instruction to the dome camera, where the first control instruction includes the first adjusting parameter, and the first control instruction is used to instruct the dome camera to adjust the image coincidence between the second monitoring image and the first monitoring image according to the first adjusting parameter.
The present application provides a ball machine control device, which can be used to execute the corresponding method steps of the embodiment shown in fig. 2, and the implementation principle and technical effect are similar, and are not described herein again.
Optionally, the determining module 62 is further configured to perform feature point extraction on the first monitored image and the second monitored image respectively before determining the coordinate position of the specific point of the first monitored image in the second monitored image;
determining a feature point set with a corresponding relation between the first monitoring image and the second monitoring image;
calculating the mapping matrix according to the characteristic point set;
the determining module 62 is specifically configured to determine a coordinate position of a specific point of the first monitored image in the second monitored image according to the mapping matrix.
Optionally, the first adjustment parameter comprises a rotation angle.
Optionally, the determining module 62 is specifically configured to: determining a first coordinate position of a central point of the first monitoring image in the second monitoring image;
acquiring a second coordinate position of the central point of the second monitoring image;
determining the moving distance of the center point of the dome camera according to the second coordinate position and the first coordinate position;
and determining the rotation angle of the ball machine according to the moving distance.
The present application provides a ball machine control device, which can be used to execute the steps of the method corresponding to the embodiment shown in fig. 4, and the implementation principle and the technical effect are similar, and are not described herein again.
Optionally, the determining module 62 is specifically configured to: acquiring the current focal length of the ball machine;
and determining the rotation angle of the dome camera according to the moving distance and the current focal length.
Optionally, the first adjustment parameter comprises an image magnification.
Optionally, the determining module 62 is specifically configured to: determining a third coordinate position of the diagonal point of the first monitoring image in the second monitoring image;
acquiring a fourth coordinate position of the opposite corner point of the second monitoring image;
and determining the image magnification of the ball machine relative to the gun camera according to the fourth coordinate position and the third coordinate position.
The present application provides a ball machine control device, which can be used to execute the steps of the method corresponding to the embodiment shown in fig. 5, and the implementation principle and the technical effect are similar, and are not described herein again.
Fig. 11 is a schematic structural diagram of a ball machine control device according to still another embodiment of the present application, and the control device further includes, in addition to the ball machine control device shown in fig. 10: a judgment module 64;
the determining module 62 is further configured to obtain a third monitoring image of the adjusted dome camera;
determining a coordinate position of a particular point of the first monitored image in the third monitored image;
determining a second adjusting parameter of the dome camera according to the coordinate position;
the judging module 64 is configured to judge whether the second adjustment parameter meets a preset condition, stop the parameter adjustment of the dome camera if the second adjustment parameter meets the preset condition, and send a second control instruction to the dome camera if the second adjustment parameter does not meet the preset condition, where the second control instruction includes the second adjustment parameter, and the second control instruction is used to instruct the dome camera to adjust the image coincidence of the third monitoring image and the first monitoring image according to the second adjustment parameter.
The present application provides a ball machine control device, which can be used to execute the steps of the method corresponding to the embodiment shown in fig. 8, and the implementation principle and the technical effect are similar, and are not described herein again.
Fig. 12 is a schematic structural diagram of a ball machine control device according to still another embodiment of the present application, where the control device includes:
the acquisition module 71 is configured to acquire a first monitoring image acquired by the ball machine at a first magnification and a second monitoring image acquired by the ball machine at a second magnification;
an extraction module 72, configured to perform feature point extraction on the first monitored image and the second monitored image respectively, and determine at least one group of feature points with the highest matching degree;
the determining module 73 is configured to determine an axis-deviation coordinate position of the dome camera according to the coordinate positions of the at least one group of feature points in the first monitoring image and the second monitoring image;
the determining module 73 is further configured to determine an adjusting parameter of the dome camera according to the off-axis coordinate position;
and the sending module 74 is configured to send a control instruction to the dome camera, where the control instruction includes an adjustment parameter, and the control instruction is used to instruct the dome camera to adjust the center position of the second monitoring image to coincide with the center position of the first monitoring image according to the adjustment parameter.
Optionally, the adjustment parameter comprises a rotation angle; the determining module 73 is specifically configured to: determining a first coordinate position of the center point of the first monitoring image in the second monitoring image according to the off-axis coordinate position, the first magnification and the second magnification;
determining the shaft offset of the dome camera according to the first coordinate position and the second coordinate position of the central point of the second monitoring image;
and determining the rotation angle of the ball machine according to the shaft offset and the current focal length of the ball machine.
The present application provides a ball machine control device, which can be used to execute the corresponding method steps of the embodiment shown in fig. 9, and the implementation principle and technical effect are similar, and are not described herein again.
Fig. 13 is a schematic structural diagram of a ball machine control device according to an embodiment of the present application, and as shown in fig. 13, the ball machine control device includes:
a processor 81, a memory 82; the memory 82 stores computer-executable instructions; the processor 81 executes the computer execution instructions stored in the memory 82, so that the processor 81 executes the method provided by any implementation manner in the foregoing method embodiments, and the implementation principle and technical effect are similar, and are not described herein again.
Alternatively, the memory 82 may be separate or integrated with the processor 81, i.e. a processor with memory function. When the memory 82 is a device separate from the processor 81, the chip further includes: a bus 83, the bus 83 is used to connect the memory 82 and the processor 81. The dome camera control device may further include an interface (not shown) in communication with the processor 81, and the processor 81 acquires the monitoring images collected by the gun camera and the dome camera through the interface.
Optionally, the ball machine control device provided in this embodiment is a gun camera pan-tilt assembly, and the processor 81 is a control chip in the gun camera pan-tilt assembly; or
The ball machine control device provided by the embodiment is a ball machine holder component, and the processor 81 is a control chip in the ball machine holder component; or
The ball machine control device provided by the embodiment is a main control device independent of the gun camera pan-tilt assembly and the ball machine pan-tilt assembly, and the processor 81 is a control chip independent of the main control device of the gun camera pan-tilt assembly and the ball machine pan-tilt assembly.
The present application provides a computer-readable storage medium, which stores instructions that, when executed, cause a computer to perform the method steps corresponding to any of the above embodiments of the present application.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same.

Claims (20)

1. A method for controlling a ball machine and a gun machine to be linked is characterized by comprising the following steps:
acquiring a first monitoring image acquired by a gunlock and a second monitoring image acquired by a ball machine; the first monitoring image and the second monitoring image are monitoring images of the same scene from different visual angles;
determining a coordinate position of a particular point of the first monitored image in the second monitored image;
determining a first adjusting parameter of the dome camera according to the coordinate position;
and sending a first control instruction to the dome camera, wherein the first control instruction comprises the first adjusting parameter, and the first control instruction is used for instructing the dome camera to adjust the image coincidence of the second monitoring image and the first monitoring image according to the first adjusting parameter.
2. The method of claim 1, wherein the first adjustment parameter comprises a rotation angle.
3. The method of claim 2, wherein said determining the coordinate position of a particular point of the first monitored image in the second monitored image comprises: determining a first coordinate position of a central point of the first monitoring image in the second monitoring image;
the determining of the first adjusting parameter of the dome camera according to the coordinate position comprises the following steps:
acquiring a second coordinate position of the central point of the second monitoring image;
determining the moving distance of the center point of the dome camera according to the second coordinate position and the first coordinate position;
and determining the rotation angle of the ball machine according to the moving distance.
4. The method of claim 3, wherein said determining a rotation angle of said ball machine based on said travel distance comprises: acquiring the current focal length of the ball machine;
and determining the rotation angle of the dome camera according to the moving distance and the current focal length.
5. The method of claim 1, wherein the first adjustment parameter comprises image magnification.
6. The method of claim 5, wherein said determining the coordinate position of a particular point of the first monitored image in the second monitored image comprises: determining a third coordinate position of the diagonal point of the first monitoring image in the second monitoring image;
the determining of the first adjusting parameter of the dome camera according to the coordinate position comprises the following steps:
acquiring a fourth coordinate position of the opposite corner point of the second monitoring image;
and determining the image magnification of the ball machine relative to the gun camera according to the fourth coordinate position and the third coordinate position.
7. A method for controlling a ball machine and a gun machine to be linked is characterized by comprising the following steps:
acquiring a first monitoring image acquired by a ball machine under a first magnification and a second monitoring image acquired by the ball machine under a second magnification;
respectively extracting feature points of the first monitoring image and the second monitoring image, and determining at least one group of feature points with the highest matching degree;
determining the axis-deviation coordinate position of the dome camera according to the coordinate positions of the at least one group of feature points in the first monitoring image and the second monitoring image;
determining an adjusting parameter of the dome camera according to the axis-off-coordinate position, and sending a control instruction to the dome camera, wherein the control instruction comprises the adjusting parameter, and the control instruction is used for instructing the dome camera to adjust the center position of the second monitoring image to be overlapped with the center position of the first monitoring image according to the adjusting parameter.
8. The method of claim 7, wherein the adjustment parameter comprises a rotation angle; the determining of the adjusting parameters of the ball machine according to the axis deviation coordinate position comprises the following steps:
determining a first coordinate position of the center point of the first monitoring image in the second monitoring image according to the off-axis coordinate position, the first magnification and the second magnification;
determining the shaft offset of the dome camera according to the first coordinate position and the second coordinate position of the central point of the second monitoring image;
and determining the rotation angle of the ball machine according to the shaft offset and the current focal length of the ball machine.
9. A ball control device, comprising:
the acquisition module is used for acquiring a first monitoring image acquired by a gun camera and a second monitoring image acquired by a ball machine; the first monitoring image and the second monitoring image are monitoring images of the same scene from different visual angles;
a determining module for determining a coordinate position of a specific point of the first monitored image in the second monitored image;
the determining module is further used for determining a first adjusting parameter of the dome camera according to the coordinate position;
and the sending module is used for sending a first control instruction to the dome camera, the first control instruction comprises the first adjusting parameter, and the first control instruction is used for instructing the dome camera to adjust the image coincidence of the second monitoring image and the first monitoring image according to the first adjusting parameter.
10. The apparatus of claim 9, wherein the first adjustment parameter comprises a rotational angle.
11. The apparatus of claim 10, wherein the determining module is specifically configured to: determining a first coordinate position of a central point of the first monitoring image in the second monitoring image;
acquiring a second coordinate position of the central point of the second monitoring image;
determining the moving distance of the center point of the dome camera according to the second coordinate position and the first coordinate position;
and determining the rotation angle of the ball machine according to the moving distance.
12. The apparatus of claim 11, wherein the determining module is specifically configured to: acquiring the current focal length of the ball machine;
and determining the rotation angle of the dome camera according to the moving distance and the current focal length.
13. The apparatus of claim 9, wherein the first adjustment parameter comprises image magnification.
14. The apparatus of claim 13, wherein the determining module is specifically configured to: determining a third coordinate position of the diagonal point of the first monitoring image in the second monitoring image;
acquiring a fourth coordinate position of the opposite corner point of the second monitoring image;
and determining the image magnification of the ball machine relative to the gun camera according to the fourth coordinate position and the third coordinate position.
15. A ball control device, comprising:
the acquisition module is used for acquiring a first monitoring image acquired by the dome camera under a first magnification and a second monitoring image acquired by the dome camera under a second magnification;
the extraction module is used for respectively extracting the feature points of the first monitoring image and the second monitoring image and determining at least one group of feature points with the highest matching degree;
the determining module is used for determining the axis deviation coordinate position of the dome camera according to the coordinate positions of the at least one group of feature points in the first monitoring image and the second monitoring image;
the determining module is further used for determining adjusting parameters of the dome camera according to the axis deviation coordinate position;
and the sending module is used for sending a control instruction to the dome camera, the control instruction comprises an adjusting parameter, and the control instruction is used for instructing the dome camera to adjust the center position coincidence of the second monitoring image and the first monitoring image according to the adjusting parameter.
16. The apparatus of claim 15, wherein the adjustment parameter comprises a rotation angle; the determining module is specifically configured to: determining a first coordinate position of the center point of the first monitoring image in the second monitoring image according to the off-axis coordinate position, the first magnification and the second magnification;
determining the shaft offset of the dome camera according to the first coordinate position and the second coordinate position of the central point of the second monitoring image;
and determining the rotation angle of the ball machine according to the shaft offset and the current focal length of the ball machine.
17. A ball control device, comprising: a processor, an interface; the processor executing computer-executable instructions to cause the processor to perform the method of any one of claims 1 to 6 or 7 or 8; and the processor acquires the monitoring images acquired by the gunlock and the dome camera through the interface.
18. The ball machine control apparatus according to claim 17,
the ball machine control device is a gun camera holder assembly, and the processor is a control chip in the gun camera holder assembly; or the ball machine control device is a ball machine holder component, and the processor is a control chip in the ball machine holder component; or the ball machine control device is a main control device independent of the gun camera holder assembly and the ball machine holder assembly, and the processor is a control chip independent of the main control device of the gun camera holder assembly and the ball machine holder assembly.
19. A readable storage medium, comprising a program or instructions for performing the method of any of claims 1 to 6 when the program or instructions are run on a computing device.
20. A readable storage medium, comprising a program or instructions, which when run on a computing device, performs the method of claim 7 or 8.
CN201910189768.0A 2019-03-13 2019-03-13 Method, device and medium for controlling linkage of ball machine and gun machine Active CN111698455B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910189768.0A CN111698455B (en) 2019-03-13 2019-03-13 Method, device and medium for controlling linkage of ball machine and gun machine
PCT/CN2020/078910 WO2020182176A1 (en) 2019-03-13 2020-03-12 Method and apparatus for controlling linkage between ball camera and gun camera, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910189768.0A CN111698455B (en) 2019-03-13 2019-03-13 Method, device and medium for controlling linkage of ball machine and gun machine

Publications (2)

Publication Number Publication Date
CN111698455A CN111698455A (en) 2020-09-22
CN111698455B true CN111698455B (en) 2022-03-11

Family

ID=72427178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910189768.0A Active CN111698455B (en) 2019-03-13 2019-03-13 Method, device and medium for controlling linkage of ball machine and gun machine

Country Status (2)

Country Link
CN (1) CN111698455B (en)
WO (1) WO2020182176A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698455B (en) * 2019-03-13 2022-03-11 华为技术有限公司 Method, device and medium for controlling linkage of ball machine and gun machine
CN112419424B (en) * 2020-11-18 2023-05-26 济南博观智能科技有限公司 Gun-ball linkage calibration method and device and related equipment
CN114630040B (en) * 2020-12-10 2023-07-14 中国人民解放军陆军工程大学 Self-adaptive tracking system and method for linkage of laser radar and dome camera
CN113038031B (en) * 2021-03-02 2023-05-30 天津天地伟业智能安全防范科技有限公司 Gun-ball linkage calibration method and device, electronic equipment and storage medium
CN113189630B (en) * 2021-04-29 2024-02-13 中核国电漳州能源有限公司 Large-scale construction site personnel identification and positioning method for tower crane installation monitoring
CN113393492A (en) * 2021-05-27 2021-09-14 浙江大华技术股份有限公司 Target tracking method, target tracking device, electronic device and storage medium
CN113709367A (en) * 2021-08-24 2021-11-26 浙江大华技术股份有限公司 Method and device for controlling focusing and electronic equipment
CN113949814B (en) * 2021-11-09 2024-01-26 重庆紫光华山智安科技有限公司 Gun-ball linkage snapshot method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198487A (en) * 2013-04-15 2013-07-10 厦门博聪信息技术有限公司 Automatic calibration method for video monitoring system
CN105335977A (en) * 2015-10-28 2016-02-17 苏州科达科技股份有限公司 Image pickup system and positioning method of target object
CN105486235A (en) * 2015-12-07 2016-04-13 高新兴科技集团股份有限公司 A target measuring method in ball machine video images
CN106408551A (en) * 2016-05-31 2017-02-15 北京格灵深瞳信息技术有限公司 Monitoring device controlling method and device
CN108833912A (en) * 2018-08-22 2018-11-16 高新兴科技集团股份有限公司 A kind of measurement method and system of video camera machine core optical axis center and field angle
WO2020182176A1 (en) * 2019-03-13 2020-09-17 华为技术有限公司 Method and apparatus for controlling linkage between ball camera and gun camera, and medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103824278B (en) * 2013-12-10 2016-09-21 清华大学 The scaling method of CCTV camera and system
CN103716595B (en) * 2014-01-08 2017-03-29 深圳英飞拓科技股份有限公司 Panoramic mosaic video camera and ball machine inter-linked controlling method and device
CN103716594B (en) * 2014-01-08 2017-02-22 深圳英飞拓科技股份有限公司 Panorama splicing linkage method and device based on moving target detecting
CN104537659B (en) * 2014-12-23 2017-10-27 金鹏电子信息机器有限公司 The automatic calibration method and system of twin camera
EP3374967B1 (en) * 2015-11-11 2023-01-04 Zhejiang Dahua Technology Co., Ltd Methods and systems for binocular stereo vision
CN107527336B (en) * 2016-06-22 2021-02-19 北京疯景科技有限公司 Lens relative position calibration method and device
CN107730556B (en) * 2017-09-13 2021-07-16 济南中维世纪科技有限公司 Gun and ball linkage coordinate positioning method
CN108416285A (en) * 2018-03-02 2018-08-17 深圳市佳信捷技术股份有限公司 Rifle ball linkage surveillance method, apparatus and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198487A (en) * 2013-04-15 2013-07-10 厦门博聪信息技术有限公司 Automatic calibration method for video monitoring system
CN105335977A (en) * 2015-10-28 2016-02-17 苏州科达科技股份有限公司 Image pickup system and positioning method of target object
CN105486235A (en) * 2015-12-07 2016-04-13 高新兴科技集团股份有限公司 A target measuring method in ball machine video images
CN106408551A (en) * 2016-05-31 2017-02-15 北京格灵深瞳信息技术有限公司 Monitoring device controlling method and device
CN108833912A (en) * 2018-08-22 2018-11-16 高新兴科技集团股份有限公司 A kind of measurement method and system of video camera machine core optical axis center and field angle
WO2020182176A1 (en) * 2019-03-13 2020-09-17 华为技术有限公司 Method and apparatus for controlling linkage between ball camera and gun camera, and medium

Also Published As

Publication number Publication date
WO2020182176A1 (en) 2020-09-17
CN111698455A (en) 2020-09-22

Similar Documents

Publication Publication Date Title
CN111698455B (en) Method, device and medium for controlling linkage of ball machine and gun machine
CN107659774B (en) Video imaging system and video processing method based on multi-scale camera array
WO2019114617A1 (en) Method, device, and system for fast capturing of still frame
CN110142785A (en) A kind of crusing robot visual servo method based on target detection
CN102622767B (en) Method for positioning binocular non-calibrated space
CN206611521U (en) A kind of vehicle environment identifying system and omni-directional visual module based on multisensor
CN103929592A (en) All-dimensional intelligent monitoring equipment and method
CN102819847A (en) Method for extracting movement track based on PTZ mobile camera
CN112254663B (en) Plane deformation monitoring and measuring method and system based on image recognition
CN107343174A (en) The false proof face iris grasp shoot device of mobile target and method at a distance
CN105354854B (en) The dynamic syndicated scaling method of camera parameter and system based on three-dimensional digital model
CN109816702A (en) A kind of multiple target tracking device and method
CN107509055A (en) A kind of rotary panorama focus identification optronic tracker and its implementation
CN107845056A (en) Fish eye images panorama generation method based on cylinder model
CN105516661B (en) Principal and subordinate's target monitoring method that fisheye camera is combined with ptz camera
CN110991306A (en) Adaptive wide-field high-resolution intelligent sensing method and system
CN102291568A (en) Accelerated processing method of large-view-field intelligent video monitoring system
CN113743286A (en) Target monitoring system and method for multi-source signal fusion
CN105391978A (en) Target location method of PTZ camera
CN107862703B (en) Multi-view linkage PTZ tracking method
CN111399014B (en) Local stereoscopic vision infrared camera system and method for monitoring wild animals
TWI641265B (en) Mobile target position tracking system
CN106941600A (en) A kind of Target Tracking System
CN106846284A (en) Active-mode intelligent sensing device and method based on cell
CN111596594A (en) Panoramic big data application monitoring and control system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant