A defense zone setting method, device and electronic equipment

By using coordinate conversion between the camera pixel coordinate system and the radar coordinate system in radar monitoring technology, the problem of inaccurate radar defense zone settings is solved, and accurate monitoring of designated spaces is achieved.

CN115567675BActive Publication Date: 2024-11-01TIBET BAILINGGE ELECTRIC POWER TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110734200.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2024-11-01
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

In radar monitoring technology, users cannot intuitively know the correspondence between the radar coordinate points in the radar field of view and the position points in the monitoring scene, resulting in a difference between the drawn defense zone and the actual space you want to monitor, and it is impossible to accurately determine the specified space. Perform monitoring.

Method used

By displaying the surveillance scene of the surveillance scene captured by the camera, the pixel point drawing instructions are obtained, and the coordinate conversion relationship between the camera's pixel coordinate system and the radar's radar coordinate system is used to map the pixel point to the radar coordinate system to form a defense zone , including judging and adjusting invalid pixel points to ensure the accuracy of the defense zone.

Benefits of technology

It realizes that the user specifies the area to be monitored in a more intuitive monitoring screen, and accurately determines the monitoring area in the radar coordinate system through coordinate conversion, ensuring the accurate setting of the radar defense zone and improving the accuracy of monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115567675B_ABST
    Figure CN115567675B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a defense zone setting method, device and electronic device. The method includes: displaying a monitoring screen of a monitoring scene captured by a camera; obtaining drawing instructions input for multiple pixel points in the monitoring screen; mapping the multiple pixel points to the radar coordinate system according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, and obtaining multiple radar coordinate points corresponding to the multiple pixel points; and setting the area formed by the multiple radar coordinate points as the defense zone of the radar. The user can specify the area to be monitored in a more intuitive monitoring screen, and use the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar to project the area specified by the user in the monitoring screen into the radar coordinate system, so as to accurately determine the area to be monitored by the user in the radar coordinate system, that is, the defense zone can be accurately set for the radar.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of radar monitoring technology, and in particular to a defense zone setting method, device and electronic equipment. Background Art

[0002] Radar can emit electromagnetic waves and determine the radar coordinate point of the target in the radar coordinate system based on the electromagnetic waves reflected by the target. In related technologies, users can draw an area in the radar field of view (hereinafter referred to as the defense zone), and perform preset subsequent processing every time the radar detects a target in the defense zone, such as alarm, linkage with a ball camera for tracking, etc., to achieve monitoring of the specified space in the monitoring scene.

[0003] However, when drawing a defense zone in the radar field of view, the user cannot intuitively know the correspondence between each radar coordinate point in the radar field of view and each position point in the monitoring scene, resulting in a certain gap between the space in the monitoring scene corresponding to the defense zone drawn by the user and the space in the monitoring scene that the user actually wants to monitor, that is, there is a certain difference between the defense zone actually drawn by the user and the defense zone that the user needs to set, resulting in the inability to accurately monitor the space specified by the user.

[0004] Therefore, how to enable users to accurately set defense zones for radars has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a defense zone setting method, device and electronic device, so as to enable a user to accurately set a defense zone for a radar. The specific technical solution is as follows:

[0006] In a first aspect of an embodiment of the present invention, a defense zone setting method is provided, the method comprising:

[0007] Display the monitoring screen of the monitoring scene captured by the camera;

[0008] Obtaining drawing instructions input for a plurality of pixel points in the monitoring screen;

[0009] According to a coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, the plurality of pixel points are mapped to the radar coordinate system to obtain a plurality of radar coordinate points corresponding to the plurality of pixel points;

[0010] An area formed by the plurality of radar coordinate points is set as a defense zone of the radar.

[0011] In a possible embodiment, the method further includes:

[0012] According to the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, it is determined whether there are invalid pixel points among the multiple pixel points, wherein the invalid pixel point is a pixel point whose mapping point is located in a preset invalid radar detection space when mapped to the monitoring scene;

[0013] If there is an invalid pixel point among the plurality of pixel points, obtaining an adjustment instruction input for the invalid pixel point;

[0014] Adjusting the position of the invalid pixel in the monitoring picture according to the adjustment instruction, and returning to execute the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene to determine whether there is an invalid pixel among the multiple pixels;

[0015] If there are no invalid pixels among the multiple pixel points, execute the step of mapping the multiple pixel points to the radar coordinate system according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, and obtaining multiple radar coordinate points corresponding to the multiple pixel points.

[0016] In a possible embodiment, the method further includes:

[0017] If there are invalid pixels among the multiple pixels, an alarm is issued.

[0018] In a possible embodiment, the step of issuing an alarm if an invalid pixel exists among the plurality of pixels includes:

[0019] If there are invalid pixels among the multiple pixels, a warning pattern for identifying the invalid pixels among the multiple pixels is drawn in the displayed monitoring picture.

[0020] In a possible embodiment, the method further includes:

[0021] According to the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, an invalid pixel area is determined in the monitoring picture, wherein when any pixel point in the invalid pixel area is mapped to the monitoring scene, the mapping point is located in a preset invalid radar detection space;

[0022] An auxiliary pattern for marking the invalid pixel area is drawn in the displayed monitoring picture.

[0023] In a possible embodiment, the method further includes:

[0024] Determine an invalid pixel point among a plurality of pixel points, wherein the invalid pixel point is a pixel point whose mapping point is located in a preset invalid radar detection space when mapped to the monitoring scene;

[0025] The step of mapping the plurality of pixel points to the radar coordinate system according to a coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar to obtain a plurality of radar coordinate points corresponding to the plurality of pixel points includes:

[0026] For each pixel point among the multiple pixel points except the invalid pixel point, according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, calculate a mapping point of the pixel point in the radar coordinate system as the radar coordinate point corresponding to the pixel point;

[0027] For each of the invalid pixel points, according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, the azimuth corresponding to the invalid pixel point is calculated, wherein the azimuth is used to represent the azimuth of the mapping point of the invalid pixel point in the radar coordinate system relative to the origin of the radar coordinate system;

[0028] According to the azimuth angle, a corrected coordinate point is determined in the radar coordinate system as the radar coordinate point corresponding to the invalid pixel point, wherein the distance between the corrected coordinate point and the origin is a preset distance, and the azimuth relative to the origin is the same as the azimuth indicated by the azimuth angle.

[0029] In a possible embodiment, before setting the area formed by the multiple radar coordinate points as the defense zone of the radar, the method further includes:

[0030] determining whether boundaries of areas formed by the plurality of radar coordinate points intersect;

[0031] If the boundaries of the areas formed by the multiple radar coordinate points intersect, an alarm is issued.

[0032] If the boundaries of the areas formed by the plurality of radar coordinate points do not intersect, the step of setting the area formed by the plurality of radar coordinate points as the defense zone of the radar is performed.

[0033] In a possible embodiment, the method further includes:

[0034] Displays the defense zone of the radar in question.

[0035] In a second aspect of an embodiment of the present invention, a defense zone setting device is provided, the device comprising:

[0036] The screen display module is used to display the monitoring screen of the monitoring scene captured by the camera;

[0037] A defense zone drawing module, used to obtain drawing instructions input for multiple pixel points in the monitoring screen;

[0038] A coordinate conversion module, used for mapping the plurality of pixel points to the radar coordinate system according to a coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, to obtain a plurality of radar coordinate points corresponding to the plurality of pixel points;

[0039] The defense zone setting module is used to set the area formed by the multiple radar coordinate points as the defense zone of the radar.

[0040] In a possible embodiment, the device further includes a first auxiliary module, which is used to determine whether there are invalid pixel points among the multiple pixel points according to the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, wherein the invalid pixel point is a pixel point whose mapping point is located in a preset invalid radar detection space when mapped to the monitoring scene;

[0041] If there is an invalid pixel point among the plurality of pixel points, obtaining an adjustment instruction input for the invalid pixel point;

[0042] Adjusting the position of the invalid pixel in the monitoring picture according to the adjustment instruction, and returning to execute the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene to determine whether there is an invalid pixel among the multiple pixels;

[0043] If there are no invalid pixels among the multiple pixel points, execute the step of mapping the multiple pixel points to the radar coordinate system according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, and obtaining multiple radar coordinate points corresponding to the multiple pixel points.

[0044] In a possible embodiment, the device further includes a first alarm module, configured to generate an alarm if there are invalid pixels among the multiple pixels.

[0045] In a possible embodiment, the alarm module is specifically configured to draw a warning pattern for identifying invalid pixels among the multiple pixels in the displayed monitoring image if there are invalid pixels among the multiple pixels.

[0046] In a possible embodiment, the device further includes a second auxiliary module, which is used to determine an invalid pixel area in the monitoring picture according to a conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, wherein when any pixel point in the invalid pixel area is mapped to the monitoring scene, the mapping point is located in a preset invalid radar detection space;

[0047] An auxiliary pattern for identifying the invalid pixel area is drawn in the displayed monitoring screen. In a possible embodiment, the device further includes a third auxiliary module, which is used to determine invalid pixel points among a plurality of pixel points according to a conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, wherein the invalid pixel point is a pixel point whose mapping point is located in a preset invalid radar detection space when mapped to the monitoring scene;

[0048] The coordinate conversion module is specifically configured to calculate, for each pixel point among the multiple pixel points except the invalid pixel point, a mapping point of the pixel point in the radar coordinate system according to a coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, as a radar coordinate point corresponding to the pixel point;

[0049] For each of the invalid pixel points, according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, the azimuth corresponding to the invalid pixel point is calculated, wherein the azimuth is used to represent the azimuth of the mapping point of the invalid pixel point in the radar coordinate system relative to the origin of the radar coordinate system;

[0050] According to the azimuth angle, a corrected coordinate point is determined in the radar coordinate system as the radar coordinate point corresponding to the invalid pixel point, wherein the distance between the corrected coordinate point and the origin is a preset distance, and the azimuth relative to the origin is the same as the azimuth indicated by the azimuth angle.

[0051] In a possible embodiment, the device further includes a second alarm module, which is used to determine whether boundaries of the area formed by the multiple radar coordinate points intersect before setting the area formed by the multiple radar coordinate points as the defense zone of the radar;

[0052] If the boundaries of the areas formed by the multiple radar coordinate points intersect, an alarm is issued.

[0053] If the boundaries of the areas formed by the plurality of radar coordinate points do not intersect, the defense zone setting module is driven to execute the step of setting the area formed by the plurality of radar coordinate points as the defense zone of the radar.

[0054] In a possible embodiment, the device further includes a defense zone display module, which is used to display the defense zone of the radar.

[0055] In a third aspect of an embodiment of the present invention, an electronic device is provided, including:

[0056] Memory, used to store computer programs;

[0057] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.

[0058] In a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0059] Beneficial effects of the embodiments of the present invention:

[0060] The defense zone setting method, device and electronic device provided in the embodiments of the present invention can enable the user to specify the area to be monitored in a more intuitive monitoring screen, and use the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar to project the area specified by the user in the monitoring screen into the radar coordinate system, thereby accurately determining the area to be monitored by the user in the radar coordinate system, that is, the defense zone can be accurately set for the radar.

[0061] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.

[0063] Figure 1 A schematic diagram of a process of joint monitoring of a ball camera and radar provided in an embodiment of the present invention;

[0064] Figure 2 A schematic diagram of a process flow of a defense zone setting method provided by an embodiment of the present invention;

[0065] Figure 3 A schematic diagram of a monitoring screen after a drawing instruction is input according to an embodiment of the present invention;

[0066] Figure 4 A schematic diagram of a radar defense zone displayed in a radar detection map provided by an embodiment of the present invention;

[0067] Figure 5 A schematic diagram of a principle of the conversion relationship between PTZ parameters and camera coordinate system provided by an embodiment of the present invention;

[0068] Figure 6 A schematic diagram of the correspondence between a spatial point and a t parameter provided by an embodiment of the present invention;

[0069] Figure 7a A schematic diagram of a defense zone of radars without intersection provided by an embodiment of the present invention;

[0070] Figure 7b A schematic diagram of the defense zones of intersecting radars provided in an embodiment of the present invention;

[0071] Figure 8 A schematic diagram of a monitoring screen showing an invalid pixel area provided by an embodiment of the present invention;

[0072] Fig. 9 A schematic diagram of the structure of a defense zone setting device provided in an embodiment of the present invention;

[0073] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0074] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the present invention.

[0075] In order to more clearly explain the defense zone setting method provided by the embodiment of the present invention, a possible application scenario of the defense zone setting method provided by the embodiment of the present invention is exemplified below. It can be understood that the following example is only a possible application scenario of the defense zone setting method provided by the embodiment of the present invention. In other possible embodiments, the defense zone setting method provided by the embodiment of the present invention can also be applied to other possible application scenarios, and the following example does not impose any limitation on this.

[0076] The ball camera can adjust its own P (up and down), T (left and right), and Z (zoom) parameters through the pan / tilt and other machine structures to simultaneously obtain panoramic information and detailed information of large monitoring scenes. However, the monitoring performance of the ball camera is poor in weak light and bad weather, while the radar can work normally in weak light and bad weather, but the false detection rate of the radar is often higher than that of the ball camera. Therefore, the joint monitoring of the ball camera and the radar can improve the monitoring performance of the ball camera in weak light and bad weather, while reducing the false detection rate of the radar, thereby achieving high-sensitivity and high-reliability monitoring.

[0077] See also Figure 1 , Figure 1 The figure shows a process diagram of joint monitoring of ball camera and radar, which may include:

[0078] S101, radar early warning.

[0079] The radar can issue a pre-alarm when it detects the presence of a target object in the defense zone. The target object can be of different types depending on the application scenario, including but not limited to target personnel, target vehicles, etc. Since the false detection rate of the radar is relatively high, when the radar detects the presence of a target object in the monitoring scene, it can be considered that it is not certain that the target object exists in the monitoring scene.

[0080] S102, thunderball calibration.

[0081] The radar and ball camera are jointly calibrated to determine the conversion relationship between the radar coordinate system of the radar and the PTZ parameters of the ball camera.

[0082] S103, ball camera control.

[0083] After the radar issues a pre-alarm, the radar coordinates of the detected target object can be converted into PTZ parameters using the conversion relationship obtained through radar ball calibration, and the PTZ parameters of the ball camera can be adjusted to the converted PTZ parameters so that the ball camera can capture detailed images of the target object's location.

[0084] S104, the ball camera performs secondary detection.

[0085] A ball camera may be used to capture a detail image of the location of the target object, and target recognition may be performed on the captured detail image to determine the object existing in the detail image.

[0086] S105, determine whether there is a target object among the existing objects, if yes, execute S106, if not, confirm that the radar is falsely alarmed.

[0087] S106, alarm.

[0088] Compared with radar, the false detection rate of ball cameras is relatively low. Therefore, when there is a target object among the objects in the detail image, it can be considered that there is a high probability of a target object in the monitoring scene, and an alarm needs to be issued.

[0089] In order to implement this solution, it is often necessary to draw the defense zone in advance. Since the ball camera is controlled based on the radar coordinates of the target object detected by the radar in S103, the defense zone is often drawn in the radar coordinate system in the related technology. For example, a high-definition map of the monitoring scene can be obtained by means such as GPS, and the high-definition map is projected into the radar coordinate system, so that the user can refer to the high-definition map when drawing the defense zone, thereby reducing the difficulty of drawing the defense zone and improving the accuracy of the drawn defense zone.

[0090] However, in some application scenarios, it is difficult to obtain high-definition maps of monitoring scenes, such as some confidential places. Therefore, in these application scenarios, it is impossible to project high-definition maps to the radar coordinate system to assist users in drawing defense zones, resulting in low accuracy of the drawn defense zones. Moreover, even if high-definition maps can be obtained, in order for high-definition maps to accurately assist users in drawing defense zones, the positions and directions of radars and ball cameras need to be determined in the high-definition maps, which increases the difficulty of drawing defense zones.

[0091] In other words, the thunderball linkage in the related technology has the following problems:

[0092] (1) The radar defense zone in the radar coordinate system needs to be obtained for the thunder and ball linkage

[0093] (2) Compared with the radar field of view, users can more intuitively determine the target area of ​​their interest from the image captured by the ball camera. However, when drawing the radar defense zone, it is difficult for users to determine the area corresponding to the target area in the radar field of view, resulting in the defense zone drawn by the user in the radar coordinate system being inconsistent with the target area of ​​the user's interest, thereby affecting the effect of the ball camera linkage.

[0094] Based on this, an embodiment of the present invention provides a defense zone setting method, which can be applied to any electronic device with a defense zone setting function, for example, it can be a control device used in a radar ball camera linkage security system. The control device can be integrated on the radar or exist independently of the radar.

[0095] See also Figure 2 , Figure 2 The figure is a schematic flow chart of a defense zone setting method provided by an embodiment of the present invention, which may include:

[0096] S201, displaying the monitoring picture of the monitoring scene captured by the camera.

[0097] S202, obtaining drawing instructions input for a plurality of pixel points in the monitoring screen.

[0098] S203, mapping the plurality of pixel points to the radar coordinate system according to a coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, to obtain a plurality of radar coordinate points corresponding to the plurality of pixel points.

[0099] S204, setting the area formed by the multiple radar coordinate points as the defense zone of the radar.

[0100] By selecting this embodiment, the user can specify the area to be monitored in a more intuitive monitoring screen, and use the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar to project the area specified by the user in the monitoring screen into the radar coordinate system, thereby accurately determining the area to be monitored by the user in the radar coordinate system, that is, the defense zone can be accurately set for the radar.

[0101] In S201, the camera may refer to any type of camera, including but not limited to a ball camera, a gun camera, etc. The way of displaying the monitoring screen may also be different according to different application scenarios. For example, the monitoring screen may be displayed on an external display screen, or the monitoring screen may be sent to a preset terminal so that the preset terminal displays the monitoring screen.

[0102] The monitoring screen displayed can be a real-time screen of the monitoring scene, or it can be a screen obtained by photographing the monitoring scene at any historical moment. The monitoring screen should include the area that the user needs to monitor. For example, assuming that the user needs to monitor a specified road section, the monitoring screen can be a monitoring screen obtained by photographing the road including the specified road section.

[0103] In S202, the drawing instruction may be an instruction to draw a specified shape in the monitoring screen, or an instruction to draw a plurality of pixels in the monitoring screen. When the drawing instruction is an instruction to draw a plurality of pixels in the monitoring screen, the plurality of pixels are the plurality of pixels targeted by the drawing instruction.

[0104] When the drawing instruction is an instruction to draw a specified shape in the monitoring screen, the multiple pixel points targeted by the drawing instruction are multiple pixel points used to represent the specified shape. For example, assuming that the specified shape is a polygon, the multiple pixel points targeted by the drawing instruction are each vertex of the polygon. For another example, assuming that the specified shape is a line segment, the multiple pixel points targeted by the drawing instruction are all endpoints of the line segment.

[0105] For example, see Figure 3 , the drawing instruction can be used to indicate the drawing in the monitoring screen Figure 3 The instruction for the quadrilateral area formed by the bold black solid line may also be an instruction for instructing to draw the four vertices of the quadrilateral in the monitoring screen.

[0106] In S203, the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar is used to represent the conversion relationship between the coordinates of any spatial point in the real space in the pixel coordinate system and the coordinates in the radar coordinate system.

[0107] How to determine the coordinate transformation relationship will be explained in detail below and will not be repeated here. It can be understood that when the detection areas of the radar and the camera overlap, for any radar coordinate point among the multiple radar coordinate points, in theory, there is always a pixel point among the multiple pixel points that corresponds to the same spatial point as the any radar coordinate point.

[0108] Exemplarily, assuming that multiple radar coordinate points are radar coordinate points A1, A2, A3, and A4, where radar coordinate point A1 corresponds to spatial point B1, radar coordinate point A2 corresponds to spatial point B2, radar coordinate point A3 corresponds to spatial point B3, and radar coordinate point A4 corresponds to spatial point B4, then among the multiple pixel points there is a pixel point corresponding to spatial point B1, and there is a pixel point corresponding to spatial point B2, and there is a pixel point corresponding to spatial point B3, and there is a pixel point corresponding to spatial point B4.

[0109] In S204, since the multiple radar coordinate points are radar coordinate points corresponding to the multiple pixel points, the area formed by the multiple radar coordinate points and the area formed by the multiple pixel points correspond to the same area in the real space. That is, the defense area set by the radar and the pixel area specified by the user in the monitoring screen correspond to the same area in the real space.

[0110] And because the user can intuitively determine the space that he wants to monitor in the monitoring screen, the defense zone setting method provided in the embodiment of the present invention can enable the user to intuitively set the area corresponding to the space that he wants to monitor in the radar field of view as the defense zone of the radar, that is, it is convenient for the user to accurately set the defense zone.

[0111] After successfully setting the defense zone, the radar defense zone can be displayed to facilitate the user to confirm the set defense zone. For example, the radar defense zone can be displayed in the interface displaying the monitoring screen, or in other interfaces other than the interface displaying the monitoring screen, for example, the radar defense zone can be displayed in the radar detection map. For example, Figure 4 As shown, Figure 4 The area surrounded by the white bold solid line is the radar's defense zone.

[0112] The manner in which multiple radar coordinate points form an area may vary depending on the application scenario. For example, assuming that the number of multiple radar coordinate points is three or more, the area surrounded by a polygon with the multiple radar coordinate points as vertices may be used as the area formed by the multiple radar coordinate points. Assuming that the number of multiple radar coordinate points is two, the designated side of the line segment with the two radar coordinate points as endpoints (such as a side close to the radar, a side away from the radar, a side close to the south, etc.) may be used as the area formed by the multiple radar coordinate points.

[0113] In order to more clearly illustrate the defense zone setting method provided by the embodiment of the present invention, an exemplary explanation is given below on how to determine the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar.

[0114] For the convenience of description, it is assumed that the pixel coordinates of a pixel point in the pixel coordinate system are (u, v), and it is assumed that the radar coordinates of the radar coordinate point corresponding to the same spatial point (hereinafter referred to as the target spatial point) as the pixel point are (x r ,y r , z r ), where u is the horizontal coordinate of the pixel point in the pixel coordinate system, v is the vertical coordinate of the pixel point in the pixel coordinate system, and x is the vertical coordinate of the pixel point in the pixel coordinate system. r is the horizontal coordinate of the radar coordinate point in the radar coordinate system, y r is the horizontal ordinate of the radar coordinate point in the radar coordinate system, z r is the vertical coordinate of the radar coordinate point in the radar coordinate system.

[0115] According to the imaging parameters of the camera and (u, v), the PTZ parameters of the camera when the target space point is located at the center of the camera field of view can be calculated. Assume that the value of the P parameter is p(u, v) and the value of the t parameter is t(u, v), where p(·) is a function used to represent the mapping relationship between u, v and P parameters, and t(·) is a function used to represent the mapping relationship between u, v and t parameters.

[0116] See also Figure 5 , assuming that the camera is installed at a height of h and at Figure 5 At A in the camera coordinate system, the horizontal coordinate x of the target space point in the camera coordinate system can be calculated based on trigonometric functions. c is h*cos[p(u,v)] / tan[t(u,v)], and the horizontal ordinate y of the target space point in the camera coordinate system is calculated c is h*sin[p(u,v)] / tan[t(u,v)]. The camera coordinate system is a three-dimensional rectangular coordinate system with the ground directly below the camera as its origin.

[0117] Assume that the transformation matrix H between the camera coordinate system and the radar coordinate system is as follows:

[0118]

[0119] Among them, h 11 、h 12 、h 13 、h 21 、h 22 、h 23 、h 31 、h32 、h 33 is the matrix parameter in the transformation matrix, which is used to represent the rotation and translation relationship between the camera coordinate system and the radar coordinate system. The matrix parameters can be calculated based on the coordinates of the same spatial point in the camera coordinate system and the coordinates in the radar coordinate system to form a camera-radar coordinate pair. The process of obtaining the camera-radar coordinate pair and calculating the transformation matrix is ​​generally called "calibration".

[0120] Then x c ,y c With x r ,y r The following relationship should be satisfied:

[0121]

[0122] Since the defense zone can be considered to be located on a preset plane, such as the ground, it can be considered that z r =h, where h is the installation height of the camera, such as h=3.5 (unit: m).

[0123] Then we can get the following relationship:

[0124]

[0125] This relationship can represent the coordinate transformation relationship between the pixel coordinate system and the radar coordinate system.

[0126] Also, see Figure 6 , Figure 6 The figure shows a schematic diagram of the corresponding relationship between the spatial point and the t parameter provided by an embodiment of the present invention. The height of the spatial point P2 in the figure is equal to the installation height h of the camera. As analyzed above, when the camera is installed vertically, if the spatial point P2 is located at the center of the camera's field of view, the t parameter of the camera is equal to 0. If the spatial point with a height less than h (such as the spatial point P1) is located at the center of the camera's field of view, the t parameter of the camera is greater than 0. If the spatial point with a height greater than h (such as the spatial point P3) is located at the center of the camera's field of view, the t parameter of the camera is less than 0.

[0127] It is understandable that although the monitoring screen can subjectively reflect the area that the user wants to monitor, the positions of multiple pixels targeted by the drawing instructions may be different from the user's expectations due to various conditions, such as the accuracy of the drawing tool, the accuracy of the user's operation, etc. For example, the user expects that the pixels targeted by the drawing instructions are pixel 1, pixel 2, pixel 3, and pixel 4, but due to the user's erroneous operation, the pixels targeted by the drawing instructions are pixel 1, pixel 5, pixel 3, and pixel 4.

[0128] For the convenience of description, it is assumed that the pixel coordinates of pixel 2 are (u2, v2), and the pixel coordinates of pixel 5 are (u5, v5). In addition, since the area that the user wants to monitor is generally located below the camera, that is, the height of the space point corresponding to pixel 1 is often less than the installation height of the camera, as mentioned above, Figure 6 In theory, t(u2, v2) is greater than 0. However, user error may cause the height of the space point corresponding to the pixel point targeted by the drawing instruction to be greater than h, that is, the height of the space point corresponding to pixel point 5 is greater than the installation height of the camera. Therefore, as mentioned above, Figure 6 , theoretically t(u5, v5) is less than 0, then tan[t(u1, v1)] and tan[t(u5, v5)] have opposite signs, resulting in the radar coordinate point corresponding to pixel 2 and the radar coordinate point corresponding to pixel 5 being located on both sides of the x-axis. At this time, the defense zone formed by multiple radar coordinate points will be abnormal: part of the defense zone is located below the x-axis of the radar coordinate system, and is manifested as a defense zone boundary intersection. The boundary intersection of the defense zone in this article can refer to the intersection of two non-adjacent boundaries of the defense zone.

[0129] For example, it is assumed that the radar coordinate point corresponding to pixel 1 is radar coordinate point a, the radar coordinate point corresponding to pixel 2 is radar coordinate point b, the radar coordinate point corresponding to pixel 3 is radar coordinate point c, and the radar coordinate point corresponding to pixel 4 is radar coordinate point d. And with radar coordinate point ad as the vertex, the following can be formed in the radar coordinate system: Figure 7a Zones shown.

[0130] Assume that the radar coordinate point corresponding to pixel point 5 is radar coordinate point b1. As analyzed above, radar coordinate point b1 should be located below the x-axis of the radar coordinate system. For example, Figure 7b It can be seen that when the user's erroneous operation causes the pixels targeted by the drawing instructions to be pixel 1, pixel 5, pixel 3, and pixel 4, the defense zones drawn are crossed in the radar coordinate system.

[0131] It can be seen that when drawing a defense zone, the drawn defense zone may be abnormal due to improper operation of the user. Based on this, the embodiment of the present invention provides three auxiliary mechanisms to assist the user to input the correct drawing instruction.

[0132] Mechanism 1: The defense zone drawing interface indicates the invalid pixel area to assist the user in drawing and avoid the pixel point targeted by the drawing instruction being located in the invalid pixel area.

[0133] The invalid pixel area can be determined in the monitoring screen according to the conversion relationship between the pixel coordinate point and the spatial coordinate system of the monitoring scene, wherein when any pixel point in the invalid pixel area is mapped to the monitoring scene, the mapping point is located in the preset invalid radar detection space. An auxiliary pattern for identifying the invalid pixel area is drawn in the displayed monitoring screen.

[0134] The invalid radar detection space may refer to a space higher than the plane where the camera is located. In other possible embodiments, it may also refer to a space higher than other planes. This embodiment does not impose any restrictions on this. The conversion relationship between the pixel coordinate point and the spatial coordinate system of the monitoring scene may be expressed in the form of an expression, and the method for determining the expression can refer to the aforementioned description of the method for determining the conversion relationship between the pixel coordinate point and the radar coordinate system, which will not be repeated here.

[0135] Taking the ball camera as an example, the invalid radar detection space refers to the space above the plane where the ball camera is located. The value of the t parameter corresponding to any spatial point in the invalid radar detection space is less than 0. Therefore, the invalid pixel area at this time is all pixel points that satisfy t(u,v)<0.

[0136] The form of the auxiliary pattern may vary depending on the application scenario. For example, assuming that the invalid radar detection space refers to the space above the plane where the camera is located, since all the pixels satisfying t(u,v)<0 in the monitoring screen are located above the straight line formed by the pixels satisfying t(u,v)=0, a straight line may be drawn on the straight line formed by the pixels satisfying t(u,v)=0 in the displayed monitoring screen. As an auxiliary pattern, for example, it may be as follows Figure 8 In other possible embodiments, a minimum rectangular frame including all pixels satisfying t(u, v)<0 may be drawn in the displayed monitoring screen as an auxiliary pattern, or a minimum rectangular frame including all pixels satisfying t(u, v)>0 may be drawn in the displayed monitoring screen as an auxiliary pattern.

[0137] In this embodiment, since an auxiliary pattern is drawn in the displayed monitoring screen, and the auxiliary pattern can identify the invalid pixel area, after viewing the auxiliary pattern, the user can determine the invalid pixel area in the displayed monitoring screen according to the auxiliary pattern, thereby avoiding the pixel point targeted by the input drawing instruction being located in the invalid pixel area. Figure 3As shown in the example, after viewing a straight line, the user can determine that the pixel points above the straight line in the monitoring screen are invalid pixels, and thus input drawing instructions for the pixel points below the straight line. That is, the use of this embodiment can assist the user in inputting drawing instructions by drawing auxiliary patterns to remind the user to avoid the pixel points targeted by the input drawing instructions being located in the invalid pixel area. If the pixel points targeted by the drawing instructions are not located in the invalid pixel area, even if there is a certain gap between the pixel points targeted by the drawing instructions and the pixel points expected by the user, the gap between the mapped radar coordinate points will not be too large in theory, and the area formed by the radar coordinate points will not be much different from the defense zone expected by the user. That is, the use of this embodiment can effectively reduce the possibility of inaccurate defense zone settings due to inaccurate input drawing instructions, and further improve the accuracy of the set defense zone.

[0138] Auxiliary mechanism 2: Assist users to make drawing corrections and process invalid pixels.

[0139] It can be determined whether there are invalid pixels among the multiple pixels based on the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene. If there are invalid pixels among the multiple pixels, an adjustment instruction input for the invalid pixels is obtained, and the position of the invalid pixels in the monitoring screen is adjusted according to the adjustment instruction.

[0140] The method for determining whether a pixel is an invalid pixel is to determine whether the pixel is located in an invalid pixel area. If the pixel is located in the invalid pixel area, the pixel is considered to be an invalid pixel. If the pixel is not located in the invalid pixel area, the pixel is considered not to be an invalid pixel.

[0141] For example, assuming that the invalid pixel area is Figure 3 As shown, it can be determined whether there are any pixels located above the drawn straight line among the multiple pixels. If there are any pixels located above the drawn straight line among the multiple pixels, it can be determined that there are invalid pixels among the multiple pixels. If there are no pixels located above the identified straight line among the multiple pixels, it can be determined that there are no invalid pixels among the multiple pixels.

[0142] In order to facilitate the user to input the adjustment instructions, in a possible embodiment, the interface for displaying the monitoring screen may be provided with controls for assisting the user to input the adjustment instructions, such as controls for adjusting the direction, controls for adjusting the span size, etc. The user inputs the adjustment instructions by interacting with these controls for assisting the user to input the adjustment instructions. After the user has completed the adjustment, the execution subject for executing the defense zone setting method provided in the embodiment of the present invention may re-judge whether there are still invalid pixels among the multiple pixels after the position is adjusted. If there are still invalid pixels, the execution subject may obtain the adjustment instructions input for the invalid pixels again, and adjust the position of the invalid pixels in the monitoring screen according to the adjustment instructions, and re-judge whether there are still invalid pixels among the multiple pixels after the position is adjusted, and so on, until there are no invalid pixels among the multiple pixels, that is, all abnormal points have been adjusted.

[0143] If there are no invalid pixels, multiple pixels can be mapped to the radar coordinate system based on the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar to obtain radar coordinate points corresponding to the multiple pixels, that is, execute the aforementioned step S203.

[0144] In order to remind the user to make drawing corrections, in a possible embodiment, an alarm may be given when invalid pixels exist among multiple pixels, to remind the user that invalid pixels exist among multiple pixels and drawing corrections are required. The alarm method may be different according to different application scenarios. For example, a preset alarm audio may be played for alarm, or a warning pattern may be drawn in the monitoring screen for alarm.

[0145] The method of drawing the warning pattern may also vary depending on the application scenario. For example, in one possible embodiment, a preset pattern may be drawn at a preset position in the displayed monitoring screen as a warning pattern. For example, an exclamation mark-shaped pattern may be drawn in the upper right corner of the displayed monitoring screen as a warning pattern to prompt the user to make drawing corrections.

[0146] In another possible embodiment, a warning pattern for identifying invalid pixels among multiple pixels may be drawn in the displayed monitoring screen. In this embodiment, the warning pattern for identifying invalid pixels among multiple pixels may mean that the user can determine the invalid pixels among multiple pixels based on the warning pattern. Exemplarily, a highlight pattern may be drawn at the position of each invalid pixel in the displayed monitoring screen as a warning pattern, and the highlight pattern may refer to any pattern with a brightness higher than a preset brightness threshold. Alternatively, a closed frame may be drawn around the position of each invalid pixel in the displayed monitoring screen as a warning pattern, and the closed frame may be any polygonal frame, such as a rectangular frame, a hexagonal frame, etc., or a circular frame.

[0147] Auxiliary mechanism three: Automatically perform drawing correction and process invalid pixels.

[0148] It may be to determine invalid pixel points among a plurality of pixel points, and for each of the invalid pixel points, calculate the azimuth angle corresponding to the invalid pixel point according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, wherein the azimuth angle is used to represent the orientation of the mapping point of the invalid pixel point in the radar coordinate system relative to the origin of the radar coordinate system.

[0149] And according to the azimuth angle, a corrected coordinate point is determined in the radar coordinate system as the radar coordinate point corresponding to the invalid pixel point, wherein the distance between the corrected coordinate point and the origin is a preset distance, and the azimuth relative to the origin is the same as the azimuth angle.

[0150] It is understandable that invalid pixels are often caused by the user's mistake when specifying a spatial point far from the camera in the monitoring scene, and the pixel point that the user actually wants to specify should be located near the invalid pixel point. Therefore, it can be considered that the azimuth corresponding to the pixel point that the user actually wants to specify is approximately the same as the azimuth corresponding to the invalid pixel point, but the distance from the camera is different. And because the spatial point that the user actually wants to specify is far from the camera, it can be considered that the radar coordinate point corresponding to the pixel point that the user actually wants to specify is far from the camera. At this time, it can be considered that the distance from the camera to the radar coordinate point corresponding to the pixel point that the user actually wants to specify is a default larger value.

[0151] Therefore, by selecting this embodiment, invalid pixels can be automatically corrected so that when the radar defense zone is drawn according to the invalid pixels, the radar coordinate points corresponding to the invalid pixels are the same as or close to the radar coordinate points corresponding to the pixels that the user actually wants to specify.

[0152] It can be understood that although in theory the invalid pixel points are automatically corrected by using the correction coordinate point as the radar coordinate point corresponding to the invalid pixel point, that is, when the correction coordinate point is used as the radar coordinate point corresponding to the invalid pixel point, the boundaries of the area formed by the radar coordinate points corresponding to multiple pixels theoretically do not intersect, but in some application scenarios, for various reasons, such as unreasonable preset distance setting, calculation errors, etc., it may result in that even when the correction coordinate point is used as the radar coordinate point corresponding to the invalid pixel point, the boundaries of the area formed by the radar coordinate points corresponding to multiple pixels still intersect.

[0153] Therefore, in a possible embodiment, before setting the area formed by multiple radar coordinate points as the radar's defense zone, it can be determined whether there is an intersection in the boundaries of the area formed by the multiple radar coordinate points. If there is no intersection, the step of setting the area formed by the multiple radar coordinate points as the radar's defense zone is executed. If there is an intersection, an alarm is issued to prompt the user to make drawing corrections.

[0154] In some possible embodiments, one of the auxiliary mechanisms may be used, and in other possible embodiments, any two of the auxiliary mechanisms may be used. In still other possible embodiments, the three auxiliary mechanisms may be used simultaneously. By using a combination of multiple auxiliary mechanisms, it is possible to more effectively avoid abnormalities in the defense zone drawn by the user.

[0155] For example, in a possible embodiment, the aforementioned auxiliary mechanism 1 and auxiliary mechanism 2 may be used in combination. In this embodiment, the aforementioned auxiliary mechanism 1 may be used to draw an auxiliary pattern for identifying an invalid pixel area in the displayed monitoring screen, and when the user inputs a drawing instruction, the user may know the invalid pixel area according to the auxiliary pattern, so as to avoid inputting a drawing instruction for invalid pixel points in the invalid pixel area as much as possible.

[0156] After the user inputs a drawing instruction, it can be determined whether there are invalid pixels among the multiple pixels targeted by the drawing instruction. If there are invalid pixels, an alarm can be issued to remind the user that there are invalid pixels among the multiple pixels. The aforementioned auxiliary mechanism 2 is used to perform drawing correction, thereby processing the invalid pixels among the multiple pixels.

[0157] After using auxiliary mechanism 2 to perform drawing correction, it can be determined again whether there are invalid pixels among the corrected multiple pixel points. If invalid pixels still exist among the corrected multiple pixel points, auxiliary mechanism 2 is used again to perform drawing correction, and so on, until there are no invalid pixels among the multiple pixel points.

[0158] For another example, in a possible embodiment, the three auxiliary mechanisms described above may be used in combination. In this embodiment, the auxiliary mechanism 1 described above may be used to draw an auxiliary pattern for identifying an invalid pixel area in the displayed monitoring screen, and when the user inputs a drawing instruction, the user may know the invalid pixel area according to the auxiliary pattern, so as to avoid inputting a drawing instruction for invalid pixels in the invalid pixel area as much as possible.

[0159] And after the user inputs the drawing instruction, it can be determined whether there are invalid pixels among the multiple pixels targeted by the drawing instruction. If there are invalid pixels, the aforementioned auxiliary mechanism three is used to automatically perform drawing correction, and it is determined whether the boundaries of the areas formed by the multiple radar coordinate points corresponding to the multiple pixels after the drawing correction are crossed. If the boundaries do not cross, it can be considered that the drawing correction is successful, and the area formed by the multiple radar coordinate points can be set as the radar defense zone. If the boundaries of the radar defense zone cross, it can be considered that the drawing correction has failed, and an alarm can be issued to prompt the user that there are invalid pixels among the multiple pixels, and the aforementioned auxiliary mechanism two is used to perform drawing correction, so as to process the invalid pixels among the multiple pixels.

[0160] After using auxiliary mechanism 2 to perform drawing correction, it can be determined again whether there are invalid pixels among the corrected multiple pixel points. If invalid pixels still exist among the corrected multiple pixel points, auxiliary mechanism 2 is used again to perform drawing correction, and so on, until there are no invalid pixels among the multiple pixel points.

[0161] See also Fig. 9 , Fig. 9 The figure is a schematic diagram of a structure of a defense zone setting device provided by an embodiment of the present invention, which may include:

[0162] The screen display module 901 is used to display the monitoring screen of the monitoring scene captured by the camera;

[0163] The defense zone drawing module 902 is used to obtain drawing instructions input for multiple pixel points in the monitoring screen;

[0164] A coordinate conversion module 903 is used to map the plurality of pixel points to the radar coordinate system according to a coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, so as to obtain a plurality of radar coordinate points corresponding to the plurality of pixel points;

[0165] The defense zone setting module 904 is used to set the area formed by the multiple radar coordinate points as the defense zone of the radar.

[0166] In a possible embodiment, the device further includes a first auxiliary module, which is used to determine whether there are invalid pixel points among the multiple pixel points according to the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, wherein the invalid pixel point is a pixel point whose mapping point is located in a preset invalid radar detection space when mapped to the monitoring scene;

[0167] If there is an invalid pixel point among the plurality of pixel points, obtaining an adjustment instruction input for the invalid pixel point;

[0168] Adjusting the position of the invalid pixel in the monitoring picture according to the adjustment instruction, and returning to execute the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene to determine whether there is an invalid pixel among the multiple pixels;

[0169] If there are no invalid pixels among the multiple pixel points, execute the step of mapping the multiple pixel points to the radar coordinate system according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, and obtaining multiple radar coordinate points corresponding to the multiple pixel points.

[0170] In a possible embodiment, the device further includes a first alarm module, configured to generate an alarm if there are invalid pixels among the multiple pixels.

[0171] In a possible embodiment, the alarm module is specifically configured to draw a warning pattern for identifying invalid pixels among the multiple pixels in the displayed monitoring image if there are invalid pixels among the multiple pixels.

[0172] In a possible embodiment, the device further includes a second auxiliary module, which is used to determine an invalid pixel area in the monitoring picture according to a conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, wherein when any pixel point in the invalid pixel area is mapped to the monitoring scene, the mapping point is located in a preset invalid radar detection space;

[0173] An auxiliary pattern for identifying the invalid pixel area is drawn in the displayed monitoring screen. In a possible embodiment, the device further includes a third auxiliary module, which is used to determine invalid pixel points among a plurality of pixel points according to a conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, wherein the invalid pixel point is a pixel point whose mapping point is located in a preset invalid radar detection space when mapped to the monitoring scene;

[0174] The coordinate conversion module is specifically configured to calculate, for each pixel point among the multiple pixel points except the invalid pixel point, a mapping point of the pixel point in the radar coordinate system according to a coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, as a radar coordinate point corresponding to the pixel point;

[0175] For each of the invalid pixel points, according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, the azimuth corresponding to the invalid pixel point is calculated, wherein the azimuth is used to represent the azimuth of the mapping point of the invalid pixel point in the radar coordinate system relative to the origin of the radar coordinate system;

[0176] According to the azimuth angle, a corrected coordinate point is determined in the radar coordinate system as the radar coordinate point corresponding to the invalid pixel point, wherein the distance between the corrected coordinate point and the origin is a preset distance, and the azimuth relative to the origin is the same as the azimuth indicated by the azimuth angle.

[0177] In a possible embodiment, the device further includes a second alarm module, which is used to determine whether boundaries of the area formed by the multiple radar coordinate points intersect before setting the area formed by the multiple radar coordinate points as the defense zone of the radar;

[0178] If the boundaries of the areas formed by the multiple radar coordinate points intersect, an alarm is issued.

[0179] If the boundaries of the areas formed by the plurality of radar coordinate points do not intersect, the defense zone setting module is driven to execute the step of setting the area formed by the plurality of radar coordinate points as the defense zone of the radar.

[0180] In a possible embodiment, the device further includes a defense zone display module, which is used to display the defense zone of the radar.

[0181] The embodiment of the present invention further provides an electronic device, such as Fig.10 As shown, including:

[0182] Memory 1001, used for storing computer programs;

[0183] The processor 1002 is used to implement the following steps when executing the program stored in the memory 1001:

[0184] Display the monitoring screen of the monitoring scene captured by the camera;

[0185] Obtaining drawing instructions input for a plurality of pixel points in the monitoring screen;

[0186] According to a coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, the plurality of pixel points are mapped to the radar coordinate system to obtain a plurality of radar coordinate points corresponding to the plurality of pixel points;

[0187] An area formed by the plurality of radar coordinate points is set as a defense zone of the radar.

[0188] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0189] The communication interface is used for communication between the above electronic device and other devices.

[0190] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0191] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0192] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned defense zone setting methods are implemented.

[0193] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes any of the defense zone setting methods in the above embodiments.

[0194] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0195] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0196] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, electronic device, computer-readable storage medium, and computer program product, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0197] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A defense zone setting method, characterized in that: The method comprises: Display the monitoring screen of the monitoring scene captured by the camera; Obtaining drawing instructions input for a plurality of pixel points in the monitoring screen; According to a coordinate conversion relationship between a pixel coordinate system of the camera and a radar coordinate system of the radar, the plurality of pixel points are mapped to the radar coordinate system to obtain a plurality of radar coordinate points corresponding to the plurality of pixel points; Setting the area formed by the multiple radar coordinate points as the defense zone of the radar; The method further includes: judging whether there are invalid pixels among the multiple pixels according to the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, wherein the invalid pixels are pixels whose mapping points are located in a preset invalid radar detection space when mapped to the monitoring scene; if there are invalid pixels among the multiple pixels, obtaining an adjustment instruction input for the invalid pixels; adjusting the position of the invalid pixels in the monitoring screen according to the adjustment instruction, and returning to execute the step of judging whether there are invalid pixels among the multiple pixels according to the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene; if there are no invalid pixels among the multiple pixels, executing the step of mapping the multiple pixels to the radar coordinate system according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar to obtain multiple radar coordinate points corresponding to the multiple pixels; wherein the adjustment instruction is input by a user; and / or, The method also includes: determining invalid pixel points among a plurality of pixel points, wherein the invalid pixel points are pixel points whose mapping points are located in a preset invalid radar detection space when mapped to the monitoring scene; mapping the plurality of pixel points to the radar coordinate system according to a coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, and obtaining a plurality of radar coordinate points corresponding to the plurality of pixel points, including: for each pixel point among the plurality of pixel points except the invalid pixel point, calculating the mapping of the pixel point in the radar coordinate system according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar point as the radar coordinate point corresponding to the pixel point; for each of the invalid pixel points, according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, calculate the azimuth corresponding to the invalid pixel point, wherein the azimuth is used to represent the azimuth of the mapping point of the invalid pixel point in the radar coordinate system relative to the origin of the radar coordinate system; according to the azimuth, determine a corrected coordinate point in the radar coordinate system as the radar coordinate point corresponding to the invalid pixel point, wherein the distance between the corrected coordinate point and the origin is a preset distance, and the azimuth relative to the origin is the same as the azimuth represented by the azimuth.

2. The method according to claim 1, characterized in that The method further comprises: If there are invalid pixels among the multiple pixels, an alarm is issued.

3. The method according to claim 2, characterized in that The step of giving an alarm if there are invalid pixels among the plurality of pixels comprises: If there are invalid pixels among the multiple pixels, a warning pattern for identifying the invalid pixels among the multiple pixels is drawn in the displayed monitoring picture.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: According to the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, an invalid pixel area is determined in the monitoring picture, wherein when any pixel point in the invalid pixel area is mapped to the monitoring scene, the mapping point is located in a preset invalid radar detection space; An auxiliary pattern for marking the invalid pixel area is drawn in the displayed monitoring picture.

5. The method according to claim 1, characterized in that: Before setting the area formed by the multiple radar coordinate points as the defense zone of the radar, the method further includes: determining whether boundaries of areas formed by the plurality of radar coordinate points intersect; If the boundaries of the areas formed by the plurality of radar coordinate points intersect, an alarm is issued; If the boundaries of the areas formed by the plurality of radar coordinate points do not intersect, the step of setting the area formed by the plurality of radar coordinate points as the defense zone of the radar is performed.

6. The method according to claim 1, characterized in that The method further comprises: Displays the defense zone of the radar in question.

7. A defense zone setting device, characterized in that: The device comprises: The screen display module is used to display the monitoring screen of the monitoring scene captured by the camera; A defense zone drawing module, used to obtain drawing instructions input for multiple pixel points in the monitoring screen; A coordinate conversion module, used for mapping the plurality of pixel points to the radar coordinate system according to a coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, to obtain a plurality of radar coordinate points corresponding to the plurality of pixel points; A defense zone setting module, used for setting the area formed by the plurality of radar coordinate points as the defense zone of the radar; The device also includes a first auxiliary module, which is used to determine whether there are invalid pixels among the multiple pixels according to the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, wherein the invalid pixel is a pixel whose mapping point is located in a preset invalid radar detection space when mapped to the monitoring scene; if there are invalid pixels among the multiple pixels, obtain an adjustment instruction input for the invalid pixel; adjust the position of the invalid pixel in the monitoring screen according to the adjustment instruction, and return to execute the step of determining whether there are invalid pixels among the multiple pixels according to the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene; if there are no invalid pixels among the multiple pixels, execute the step of mapping the multiple pixels to the radar coordinate system according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar to obtain multiple radar coordinate points corresponding to the multiple pixels; wherein the adjustment instruction is input by a user; and / or, The device also includes a third auxiliary module, which is used to determine invalid pixel points among the multiple pixel points according to the conversion relationship between the pixel coordinate system and the spatial coordinate system of the monitoring scene, wherein the invalid pixel point is a pixel point whose mapping point is located in a preset invalid radar detection space when mapped to the monitoring scene; the coordinate conversion module is specifically used to calculate, for each pixel point among the multiple pixel points except the invalid pixel point, the mapping point of the pixel point in the radar coordinate system according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, as the radar detection point corresponding to the pixel point coordinate point; for each of the invalid pixel points, according to the coordinate conversion relationship between the pixel coordinate system of the camera and the radar coordinate system of the radar, calculate the azimuth corresponding to the invalid pixel point, wherein the azimuth is used to represent the azimuth of the mapping point of the invalid pixel point in the radar coordinate system relative to the origin of the radar coordinate system; according to the azimuth, determine a corrected coordinate point in the radar coordinate system as the radar coordinate point corresponding to the invalid pixel point, wherein the distance between the corrected coordinate point and the origin is a preset distance, and the azimuth relative to the origin is the same as the azimuth represented by the azimuth.

8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.