A method and device for monitoring video screen label aggregation
By allocating and rendering video picture tags, the problem of not being able to adapt to monitors of multiple resolutions due to performance reasons when displaying a large number of tags is solved, and the adaptive multi-resolution display and user experience improvement of tags is achieved.
Patent Information
- Application Number
- CN202410973273.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-07-19
AI Technical Summary
The prior art cannot adapt to displays of multiple resolutions when displaying a large number of tags, resulting in performance problems and increased user operation complexity.
By obtaining the camera information of the target camera, assigning the tag set and rendering the tags into the screen. The tags in the aggregated set correspond to the same point and the tags in the non-aggregated set correspond to different points. The aggregated pixel distance is dynamically configured to Adapt to different resolutions.
It realizes adaptive multi-resolution display of video picture tags, reducing resource consumption, improving user interaction experience and front-end performance.
Smart Images

Figure CN118524253B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video surveillance technology, and in particular to a method and device for aggregating tags of surveillance video images. Background Art
[0002] In recent years, with the increase in policies on urban intelligent management, improving the quality of intelligent construction is the current goal of urban development. Such construction has greatly improved urban governance, but with the increasing requirements for intelligence, new requirements for urban management have been put forward. In AR real scenes, with the increasing number of various types of information data, the information displayed in the presentation layer will also increase. The simple display of various label information points becomes complicated, which not only lacks a sense of hierarchy visually, but also increases the pressure on the display layer. A set of label display methods is urgently needed to solve the above problems, and achieve good performance and a strong sense of hierarchy.
[0003] Like most map information, AR real scenes will have various types of label scattered information to mark locations, roads, buildings, institutions, transportation, resources, etc. As the types and quantities of label scattered data increase, the requirements for the display form on the video screen have also increased. As the number of video screen labels increases, there will be overlaps between labels, which increases the complexity of user label operation; a large number of labels will also occupy a large amount of video screen, thus losing the meaning of real scenes; the display of a large number of labels will also consume the performance of the video layer, and even cause the screen to freeze.
[0004] The technical problem in the related art that a large number of labels cannot be adapted to displays with various resolutions due to performance reasons has not yet been effectively solved. Summary of the invention
[0005] The main purpose of the present application is to provide a method and device for aggregating tags in surveillance video images, so as to at least solve the problem in the related art that when displaying a large number of tags, it is impossible to adapt to displays with multiple resolutions due to performance reasons.
[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for aggregating labels of surveillance video images is provided. The method comprises: obtaining a label set of a target camera according to the camera information of the target camera, wherein the camera information comprises the camera ID, the camera screen width and the camera screen height, and the label information of each label in the label set comprises the label pixel position of the label in the target camera, and the label pixel position is 256; selecting a target label, and traversing the label set in reverse according to the target label; rendering all labels to the screen according to the aggregated set and the non-aggregated set, wherein the labels in the aggregated set correspond to the same position as the target label, and the labels in the non-aggregated set correspond to different positions respectively.
[0007] Optionally, the camera information is called through the tag information interface.
[0008] Optionally, a tag set is obtained according to the camera ID, wherein the tag set includes all tags under the current viewing angle of the target camera.
[0009] Optionally, the actual pixel position is obtained based on the label pixel position, and the calculation formula is: , ,in, is the horizontal coordinate of the actual pixel position, is the pixel width of the camera screen, is the horizontal coordinate of the label pixel position, is the ordinate of the actual pixel position, is the pixel height of the camera screen, The vertical coordinate of the label pixel point; get the aggregated set and the non-aggregated set.
[0010] Optionally, the decision distance between the target tag and all tags in the tag set is calculated using the following formula: ,in, is the horizontal coordinate of all tags in the tag set, is the ordinate of all tags in the tag set, is the determination distance; the tags in the tag set are divided into an aggregated set or a non-aggregated set according to the determination distance.
[0011] Optionally, dynamically configure the aggregate pixel distance, including: When The corresponding tags are added to the aggregation set; when When The corresponding tags are added to the non-aggregate collection.
[0012] Optionally, the first label in the aggregated set is rendered into the screen; each label in the non-aggregated set is rendered into the screen separately.
[0013] According to another aspect of the present application, a device for monitoring video screen label aggregation is provided. The device includes: an acquisition unit, which is used to acquire a label set of a target camera based on the camera information of the target camera, wherein the camera information includes the camera ID, the camera screen width and the camera screen height, and the label information of each label in the label set includes the label pixel position of the label in the target camera, and the label pixel position is 256; a traversal unit, which is used to select a target label and reversely traverse the label set based on the target label; a rendering unit, which is used to render all labels to the screen based on an aggregated set and a non-aggregated set, wherein the labels in the aggregated set correspond to the same point as the target label, and the labels in the non-aggregated set correspond to different points respectively.
[0014] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer-readable storage medium is provided, which includes a stored program, wherein the program executes any one of the above-mentioned methods for aggregating surveillance video screen tags.
[0015] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for aggregating surveillance video screen tags for executing any one of the items.
[0016] Through the present application, the following steps are adopted: obtaining a tag set of a target camera based on the camera information of the target camera, wherein the camera information includes a camera ID, a camera screen width, and a camera screen height, and the tag information of each tag in the tag set includes a tag pixel position of the tag in the target camera, and the tag pixel position is 256; selecting a target tag, and traversing the tag set in reverse based on the target tag; rendering all tags to the screen based on an aggregate set and a non-aggregate set, wherein the tags in the aggregate set correspond to the same position as the target tag, and the tags in the non-aggregate set correspond to different positions, respectively, which solves the problem in the related art that a large number of tags cannot be adapted to displays with multiple resolutions due to performance reasons, thereby achieving the effect that multiple tags of a surveillance video can adapt to videos with multiple resolutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 It is a flowchart of a method for aggregating tags of surveillance video images provided in an embodiment of the present application;
[0019] Figure 2 It is a structural block diagram of a device for aggregating surveillance video screen tags provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] As introduced in the background technology, in the prior art, when a large number of tags are aggregated in surveillance videos, it will cause lag and cannot adapt to screens with multiple resolutions. In order to solve the problem that a large number of tags cannot be adapted to displays with multiple resolutions due to performance reasons, the embodiments of the present application provide a method and device for aggregating surveillance video screen tags.
[0024] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0025] Figure 1 FIG. 1 is a flow chart of a method for monitoring video screen tag aggregation according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0026] Step S101, obtaining a tag set of the target camera according to the camera information of the target camera, wherein the camera information includes the camera ID, the camera screen width and the camera screen height, and the tag The tag information of each tag in the set includes the tag pixel position of the tag in the target camera, and the tag pixel position is 256;
[0027] Specifically, the front-end video display layer such as the computer desktop client and web page is generally used as the front-end to display the tags, call the back-end tag information interface, and pass in the ID of the camera to be queried, the current camera screen pixel width, and the current camera screen pixel height. After receiving the parameters, the back-end queries the tag set that meets the conditions under the current viewing angle of the camera through the camera ID. The tag information contains clear tag pixel points in the camera.
[0028] Since the camera screen pixels are dynamic, the label points have been converted into a fixed pixel height and width for easy calculation and storage. Generally, 256 is used. Other values of height and width can be set according to other actual conditions. For example, the camera screen pixel x, y is assumed to be a maximum of 256, and the point is calculated. Set the upper left corner pixel of the screen to (0,0): ; .
[0029] Step S102, selecting a target tag, and traversing the tag set in reverse according to the target tag;
[0030] Specifically, when performing conditional aggregation, the data of the label set is traversed in reverse to facilitate information comparison between a certain label and other labels in the set. For example: Assuming that the array contains labels 1, 2, and 3, and you want to calculate and compare the pixel distance between each label and all other labels (to facilitate calculation of aggregation), you need to traverse the array. If during the traversal of label 1, labels 1 and 3 have already met the aggregation conditions, there is no need to traverse and compare other elements of 3. At this time, you need to remove 1 and 3 from this array to the aggregated array to improve traversal efficiency. Since removing elements from this array during the forward traversal will cause errors, reverse traversal is used. When performing reverse traversal, elements that have met the aggregation conditions can be put into the aggregated collection in advance to improve the performance of the operation. In addition, the use of reverse traversal can also reduce the error probability of removing elements.
[0031] for (int i = labels.size() - 1; i >= 0; i--) {
[0032] for (int j = labels.size() - 2; j >= 0; j--) {
[0033] }
[0034] }
[0035] Step S103, rendering all tags to the screen according to the aggregated set and the non-aggregated set, wherein the tags in the aggregated set and the target tag correspond to the same point, and the tags in the non-aggregated set correspond to different points respectively;
[0036] Specifically, when using it after subsequent rendering, click on each aggregation to pop up a list of labels around the aggregation point, display the label information in an aggregated manner, improve space occupancy, and optimize the user interaction experience. After clicking on the aggregation list, you can right-click on a separate label in the list and render it separately on the screen for easy viewing, improving the interaction and viewing experience. Since the current resolution is dynamically passed in, the label point aggregation can change dynamically and can adapt to multiple resolutions.
[0037] In this embodiment, an aggregation algorithm that performs conditional aggregation through tag set data realizes the aggregation calculation of the tag and other surrounding tags at the current camera's current resolution, dynamically allocates to reduce resource consumption, and dynamically assembles aggregated data to reduce front-end pressure; after the front-end layer receives the data, if it is an aggregated tag set, only the first one of each tag aggregation set is rendered, which greatly improves the front-end performance and reduces the screen space occupied. After clicking on the aggregation list, you can right-click a single tag in the list and render it separately on the screen for easy viewing, improving the interaction and viewing experience; because the current resolution is dynamically passed in, the tag point aggregation can change dynamically and can adapt to multiple resolutions.
[0038] In an optional embodiment, the camera information is called through a tag information interface, and a tag set is obtained according to the camera ID, wherein the tag set includes all tags under the current viewing angle of the target camera.
[0039] Specifically, the tag information interface is connected to the camera. The front end calls the camera information of the tag information interface to obtain the tag set of the target camera, which is convenient for subsequent classification of the tags in the tag set. Generally, the tags in the tag set are all tags at the current angle of the target camera.
[0040] In an optional embodiment, the actual pixel position is obtained according to the label pixel position, and the calculation formula is: , ,in, is the horizontal coordinate of the actual pixel position, is the pixel width of the camera screen, is the horizontal coordinate of the label pixel position, is the ordinate of the actual pixel position, is the pixel height of the camera screen, The vertical coordinate of the label pixel point; get the aggregated set and the non-aggregated set.
[0041] Specifically, the internal traversal calculates the actual pixel position of the current tag (to adapt to different resolutions) and the actual pixel position of other tags in the inner loop based on the current camera image pixel width and pixel height passed in. By calculating the actual pixel position, it can adapt to a variety of different resolutions, and the tag can still be displayed correctly when using front-end devices of different sizes. This improves the accuracy of tag aggregation.
[0042] In an optional embodiment, the determination distance between the target tag and all tags in the tag set is calculated using the following formula: ,in, is the horizontal coordinate of all tags in the tag set, is the ordinate of all tags in the tag set, To determine the distance; the tags in the tag set are divided into an aggregated set or a non-aggregated set according to the determined distance. Dynamically configure the aggregate pixel distance, including: When The corresponding tags are added to the aggregation set; when When The corresponding tags are added to the non-aggregate collection.
[0043] Specifically, according to the needs, other tags that are too close to the target tag are aggregated together for easy viewing. The program used in this solution can dynamically configure the aggregate pixel distance to facilitate the control of aggregation. When judging the tag distance, the actual pixel position of the tag is used to calculate the aggregate judgment distance. Since the actual pixel position is used, the calculation result is more accurate and can be better adapted to display devices with multiple resolutions.
[0044] In an optional embodiment, the first tag in the aggregated set is rendered into the screen; and each tag in the non-aggregated set is rendered into the screen respectively.
[0045] If it is an aggregated tag set, only the first tag element in the aggregated set is rendered. If it is not an aggregated tag, it is directly rendered to the screen separately, which greatly improves the front-end performance and client display effect. After rendering, the aggregated tags are grouped together and can be fully displayed by clicking on the list. The tags of the non-aggregated set are rendered to the screen separately, achieving the technical effect of fully displaying the screen tags.
[0046] Through the implementation of this solution, the overlapping problem caused by a large number of tags in the real scene rendering and the screen occupation problem are solved; through the aggregated display, the user visual experience is improved. The dynamic aggregation algorithm improves the back-end point scattering performance. The front-end display aggregation improves the front-end display performance. Supports adaptive different computer resolutions / camera screens. Individual tag points and aggregated tags can be viewed intuitively; different aggregation lists can be operated separately, which is convenient for viewing more tag points, optimizing the operation experience, and improving the overall picture experience.
[0047] The embodiment of the present application also provides a device for monitoring video screen label aggregation. It should be noted that the device for monitoring video screen label aggregation in the embodiment of the present application can be used to execute the method for monitoring video screen label aggregation provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0048] The following is an introduction to a device for aggregating surveillance video screen labels provided in an embodiment of the present application.
[0049] Figure 2 1 is a structural block diagram of a device for monitoring video screen tag aggregation according to an embodiment of the present application. Figure 2 As shown, the device includes: an acquisition unit 201, which is used to acquire a tag set of a target camera according to camera information of the target camera, wherein the camera information includes a camera ID, a camera screen width, and a camera screen height, and the tag information of each tag in the tag set includes a tag pixel position of the tag in the target camera, and the tag pixel position is 256; a traversal unit 202, which is used to select a target tag and reversely traverse the tag set according to the target tag; a rendering unit 203, which is used to render all tags to the screen according to an aggregate set and a non-aggregate set, wherein the tags in the aggregate set correspond to the same point as the target tag, and the tags in the non-aggregate set correspond to different points respectively.
[0050] In an optional embodiment, the acquisition unit 201 includes: a calling subunit, configured to call the camera information through a tag information interface.
[0051] In an optional embodiment, the acquisition unit 201 includes: a first acquisition subunit, configured to acquire a tag set according to a camera ID, wherein the tag set includes all tags under a current viewing angle of the target camera.
[0052] In an optional embodiment, the traversal unit 202 includes: a second acquisition subunit, which is used to acquire the actual pixel position according to the label pixel position, and the calculation formula is: , ,in, is the horizontal coordinate of the actual pixel position, is the pixel width of the camera screen, is the horizontal coordinate of the label pixel position, is the ordinate of the actual pixel position, is the pixel height of the camera screen, is the vertical coordinate of the label pixel position; the third acquisition subunit is used to obtain the aggregated set and the non-aggregated set.
[0053] In an optional embodiment, the third acquisition subunit includes: a first calculation module, which is used to calculate the determination distance between the target tag and all tags in the tag set, and the calculation formula is: ,in, is the horizontal coordinate of all tags in the tag set, is the ordinate of all tags in the tag set, The classification module is used to classify the labels in the label set into an aggregated set or a non-aggregated set according to the determined distance.
[0054] In an optional embodiment, the classification module includes: a configuration submodule for dynamically configuring the aggregated pixel distance, including: When The corresponding tags are added to the aggregation set; when When The corresponding tags are added to the non-aggregate collection.
[0055] In an optional embodiment, the rendering unit 203 includes: a first rendering subunit, used to render the first tag in the aggregated set into the screen; and a second rendering subunit, used to render each tag in the non-aggregated set into the screen respectively.
[0056] The apparatus for monitoring video screen tag aggregation includes a processor and a memory, and the acquisition unit 201 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0057] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the technical problem of not being able to adapt to displays with multiple resolutions due to performance reasons when displaying a large number of labels can be solved by adjusting kernel parameters.
[0058] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0059] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for aggregating tags of surveillance video images.
[0060] Specifically, a method for monitoring video picture tag aggregation includes:
[0061] Step S101, obtaining a tag set of the target camera according to the camera information of the target camera, wherein the camera information includes the camera ID, the camera screen width and the camera screen height, and the tag The tag information of each tag in the set includes the tag pixel position of the tag in the target camera, and the tag pixel position is 256;
[0062] Specifically, the front-end video display layer such as the computer desktop client and web page is generally used as the front-end to display the tags, call the back-end tag information interface, and pass in the ID of the camera to be queried, the current camera screen pixel width, and the current camera screen pixel height. After receiving the parameters, the back-end queries the tag set that meets the conditions under the current viewing angle of the camera through the camera ID. The tag information contains clear tag pixel points in the camera.
[0063] Since the camera screen pixels are dynamic, the label points have been converted into a fixed pixel height and width for easy calculation and storage. Generally, 256 is used. Other values of height and width can be set according to other actual conditions. For example, the camera screen pixel x, y is assumed to be a maximum of 256, and the point is calculated. Set the upper left corner pixel of the screen to (0,0): ; .
[0064] Step S102, selecting a target tag, and traversing the tag set in reverse according to the target tag;
[0065] Specifically, when performing conditional aggregation, the data of the label set is traversed in reverse to facilitate information comparison between a certain label and other labels in the set. For example: Assuming that the array contains labels 1, 2, and 3, and you want to calculate and compare the pixel distance between each label and all other labels (to facilitate calculation of aggregation), you need to traverse the array. If during the traversal of label 1, labels 1 and 3 have already met the aggregation conditions, there is no need to traverse and compare other elements of 3. At this time, you need to remove 1 and 3 from this array to the aggregated array to improve traversal efficiency. Since removing elements from this array during the forward traversal will cause errors, reverse traversal is used. When performing reverse traversal, elements that have met the aggregation conditions can be put into the aggregated collection in advance to improve the performance of the operation. In addition, the use of reverse traversal can also reduce the error probability of removing elements.
[0066] for (int i = labels.size() - 1; i >= 0; i--) {
[0067] for (int j = labels.size() - 2; j >= 0; j--) {
[0068] }
[0069] }
[0070] Step S103, rendering all tags to the screen according to the aggregated set and the non-aggregated set, wherein the tags in the aggregated set and the target tag correspond to the same point, and the tags in the non-aggregated set correspond to different points respectively;
[0071] Specifically, when using it after subsequent rendering, click on each aggregation to pop up a list of labels around the aggregation point, display the label information in an aggregated manner, improve space occupancy, and optimize the user interaction experience. After clicking on the aggregation list, you can right-click on a separate label in the list and render it separately on the screen for easy viewing, improving the interaction and viewing experience. Since the current resolution is dynamically passed in, the label point aggregation can change dynamically and can adapt to multiple resolutions.
[0072] Optionally, the camera information is called through the tag information interface.
[0073] Optionally, a tag set is obtained according to the camera ID, wherein the tag set includes all tags under the current viewing angle of the target camera.
[0074] Optionally, the actual pixel position is obtained based on the label pixel position, and the calculation formula is: , ,in, is the horizontal coordinate of the actual pixel position, is the pixel width of the camera screen, is the horizontal coordinate of the label pixel position, is the ordinate of the actual pixel position, is the pixel height of the camera screen, The vertical coordinate of the label pixel point; get the aggregated set and the non-aggregated set.
[0075] Optionally, the decision distance between the target tag and all tags in the tag set is calculated using the following formula: ,in, is the horizontal coordinate of all tags in the tag set, is the ordinate of all tags in the tag set, is the determination distance; the tags in the tag set are divided into an aggregated set or a non-aggregated set according to the determination distance.
[0076] Optionally, dynamically configure the aggregate pixel distance, including: When The corresponding tags are added to the aggregation set; when When The corresponding tags are added to the non-aggregate collection.
[0077] Optionally, the first label in the aggregated set is rendered into the screen; each label in the non-aggregated set is rendered into the screen separately.
[0078] An embodiment of the present invention provides a processor, which is used to run a program, wherein the method for aggregating tags of monitoring video images is executed when the program is running.
[0079] Specifically, a method for monitoring video picture tag aggregation includes:
[0080] Step S101, obtaining a tag set of the target camera according to the camera information of the target camera, wherein the camera information includes the camera ID, the camera screen width and the camera screen height, and the tag The tag information of each tag in the set includes the tag pixel position of the tag in the target camera, and the tag pixel position is 256;
[0081] Specifically, the front-end video display layer such as the computer desktop client and web page is generally used as the front-end to display the tags, call the back-end tag information interface, and pass in the ID of the camera to be queried, the current camera screen pixel width, and the current camera screen pixel height. After receiving the parameters, the back-end queries the tag set that meets the conditions under the current viewing angle of the camera through the camera ID. The tag information contains clear tag pixel points in the camera.
[0082] Since the camera screen pixels are dynamic, the label points have been converted into a fixed pixel height and width for easy calculation and storage. Generally, 256 is used. Other values of height and width can be set according to other actual conditions. For example, the camera screen pixel x, y is assumed to be a maximum of 256, and the point is calculated. Set the upper left corner pixel of the screen to (0,0): ; .
[0083] Step S102, selecting a target tag, and traversing the tag set in reverse according to the target tag;
[0084] Specifically, when performing conditional aggregation, the data of the label set is traversed in reverse to facilitate information comparison between a certain label and other labels in the set. For example: Assuming that the array contains labels 1, 2, and 3, and you want to calculate and compare the pixel distance between each label and all other labels (to facilitate calculation of aggregation), you need to traverse the array. If during the traversal of label 1, labels 1 and 3 have already met the aggregation conditions, there is no need to traverse and compare other elements of 3. At this time, you need to remove 1 and 3 from this array to the aggregated array to improve traversal efficiency. Since removing elements from this array during the forward traversal will cause errors, reverse traversal is used. When performing reverse traversal, elements that have met the aggregation conditions can be put into the aggregated collection in advance to improve the performance of the operation. In addition, the use of reverse traversal can also reduce the error probability of removing elements.
[0085] for (int i = labels.size() - 1; i >= 0; i--) {
[0086] for (int j = labels.size() - 2; j >= 0; j--) {
[0087] }
[0088] }
[0089] Step S103, rendering all tags to the screen according to the aggregated set and the non-aggregated set, wherein the tags in the aggregated set and the target tag correspond to the same point, and the tags in the non-aggregated set correspond to different points respectively;
[0090] Specifically, when using it after subsequent rendering, click on each aggregation to pop up a list of labels around the aggregation point, display the label information in an aggregated manner, improve space occupancy, and optimize the user interaction experience. After clicking on the aggregation list, you can right-click on a separate label in the list and render it separately on the screen for easy viewing, improving the interaction and viewing experience. Since the current resolution is dynamically passed in, the label point aggregation can change dynamically and can adapt to multiple resolutions.
[0091] Optionally, the camera information is called through the tag information interface.
[0092] Optionally, a tag set is obtained according to the camera ID, wherein the tag set includes all tags under the current viewing angle of the target camera.
[0093] Optionally, the actual pixel position is obtained based on the label pixel position, and the calculation formula is: , ,in, is the horizontal coordinate of the actual pixel position, is the pixel width of the camera screen, is the horizontal coordinate of the label pixel position, is the ordinate of the actual pixel position, is the pixel height of the camera screen, The vertical coordinate of the label pixel point; get the aggregated set and the non-aggregated set.
[0094] Optionally, the decision distance between the target tag and all tags in the tag set is calculated using the following formula: ,in, is the horizontal coordinate of all tags in the tag set, is the ordinate of all tags in the tag set, is the determination distance; the tags in the tag set are divided into an aggregated set or a non-aggregated set according to the determination distance.
[0095] Optionally, dynamically configure the aggregate pixel distance, including: When The corresponding tags are added to the aggregation set; when When The corresponding tags are added to the non-aggregate collection.
[0096] Optionally, the first label in the aggregated set is rendered into the screen; each label in the non-aggregated set is rendered into the screen separately.
[0097] The embodiment of the present invention provides a device, the device includes a processor, a memory and a program stored in the memory and can be run on the processor, and when the processor executes the program, at least the following steps are implemented: obtaining a tag set of a target camera based on the camera information of the target camera, wherein the camera information includes a camera ID, a camera screen width and a camera screen height, and the tag information of each tag in the tag set includes the tag pixel position of the tag in the target camera, and the tag pixel position is 256; selecting a target tag, and traversing the tag set in reverse according to the target tag; rendering all tags to the screen according to an aggregate set and a non-aggregate set, wherein the tags in the aggregate set correspond to the same point as the target tag, and the tags in the non-aggregate set correspond to different points. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0098] Optionally, the camera information is called through the tag information interface.
[0099] Optionally, a tag set is obtained according to the camera ID, wherein the tag set includes all tags under the current viewing angle of the target camera.
[0100] Optionally, the actual pixel position is obtained based on the label pixel position, and the calculation formula is: , ,in, is the horizontal coordinate of the actual pixel position, is the pixel width of the camera screen, is the horizontal coordinate of the label pixel position, is the ordinate of the actual pixel position, is the pixel height of the camera screen, The vertical coordinate of the label pixel point; get the aggregated set and the non-aggregated set.
[0101] Optionally, the decision distance between the target tag and all tags in the tag set is calculated using the following formula: ,in, is the horizontal coordinate of all tags in the tag set, is the ordinate of all tags in the tag set, is the determination distance; the tags in the tag set are divided into an aggregated set or a non-aggregated set according to the determination distance.
[0102] Optionally, dynamically configure the aggregate pixel distance, including: When The corresponding tags are added to the aggregation set; when When The corresponding tags are added to the non-aggregate collection.
[0103] Optionally, the first label in the aggregated set is rendered into the screen; each label in the non-aggregated set is rendered into the screen separately.
[0104] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes at least the following method steps: obtaining a tag set of a target camera based on camera information of the target camera, wherein the camera information includes a camera ID, a camera screen width, and a camera screen height, and the tag information of each tag in the tag set includes a tag pixel position of the tag in the target camera, and the tag pixel position is 256; selecting a target tag, and traversing the tag set in reverse based on the target tag; rendering all tags to the screen based on an aggregate set and a non-aggregate set, wherein the tags in the aggregate set correspond to the same point as the target tag, and the tags in the non-aggregate set correspond to different points.
[0105] Optionally, the camera information is called through the tag information interface.
[0106] Optionally, a tag set is obtained according to the camera ID, wherein the tag set includes all tags under the current viewing angle of the target camera.
[0107] Optionally, the actual pixel position is obtained based on the label pixel position, and the calculation formula is: , ,in, is the horizontal coordinate of the actual pixel position, is the pixel width of the camera screen, is the horizontal coordinate of the label pixel position, is the ordinate of the actual pixel position, is the pixel height of the camera screen, The vertical coordinate of the label pixel point; get the aggregated set and the non-aggregated set.
[0108] Optionally, the decision distance between the target tag and all tags in the tag set is calculated using the following formula: ,in, is the horizontal coordinate of all tags in the tag set, is the ordinate of all tags in the tag set, is the determination distance; the tags in the tag set are divided into an aggregated set or a non-aggregated set according to the determination distance.
[0109] Optionally, dynamically configure the aggregate pixel distance, including: When The corresponding tags are added to the aggregation set; when When The corresponding tags are added to the non-aggregate collection.
[0110] Optionally, the first label in the aggregated set is rendered into the screen; each label in the non-aggregated set is rendered into the screen separately.
[0111] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0112] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0113] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0114] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0116] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0117] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0118] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0119] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0120] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for monitoring video screen tag aggregation, characterized in that: include: Acquire a tag set of the target camera according to the camera information of the target camera, wherein the camera information includes a camera ID, a camera screen width, and a camera screen height, and the tag information of each tag in the tag set includes a tag pixel position of the tag in the target camera, and the tag pixel position is 256; Select a target tag, and traverse the tag set in reverse according to the target tag; Select a target tag, and reversely traverse the tag set according to the target tag, including: obtaining the actual pixel position according to the tag pixel position, and the calculation formula is: Wherein, x1 is the horizontal coordinate of the actual pixel point, x p is the camera screen width, x n is the horizontal coordinate of the label pixel, y1 is the vertical coordinate of the actual pixel, and y p is the camera screen height, y n is the ordinate of the label pixel point; obtaining an aggregated set and a non-aggregated set; The determination distance between the target tag and all the tags in the tag set is calculated using the following formula: Wherein, x2 is the horizontal coordinate of all the tags in the tag set, y2 is the vertical coordinate of all the tags in the tag set, and d is the determination distance; Dividing the tags in the tag set into the aggregated set or the non-aggregated set according to the determination distance; All the tags are rendered to the screen according to the aggregated set and the non-aggregated set, wherein the tags in the aggregated set and the target tag correspond to the same point, and the tags in the non-aggregated set correspond to different points respectively.
2. The method according to claim 1, characterized in that Before obtaining the tag set of the target camera according to the camera information of the target camera, the following steps are included: The camera information is called through the tag information interface.
3. The method according to claim 1, characterized in that Acquiring a tag set of the target camera according to the camera information of the target camera, including: The tag set is acquired according to the camera ID, wherein the tag set includes all the tags under the current viewing angle of the target camera.
4. The method according to claim 1, characterized in that: The step of dividing the tags in the tag set into the aggregated set or the non-aggregated set according to the determination distance includes: Dynamically configure the aggregation pixel distance, including: When d 2 The corresponding tag is added to the aggregation set; when When d 2 The corresponding tag is added to the non-aggregate set.
5. The method according to claim 1, characterized in that Render all the above tags to the screen according to the aggregated set and the non-aggregated set, including: Rendering the first tag in the aggregate set into the screen; Each of the tags in the non-aggregated set is rendered into the screen respectively.
6. A device for monitoring video screen tag aggregation, characterized in that: include: An acquisition unit is used to acquire a tag set of the target camera according to the camera information of the target camera, wherein the camera information includes a camera ID, a camera screen width, and a camera screen height, and the tag information of each tag in the tag set includes a tag pixel position of the tag in the target camera, and the tag pixel position is 256; A traversal unit, used for selecting a target tag and traversing the tag set in reverse according to the target tag; The traversal unit includes: a second acquisition subunit, which is used to select a target tag and reversely traverse the tag set according to the target tag, including: obtaining the actual pixel position according to the tag pixel position, and the calculation formula is: Wherein, x1 is the horizontal coordinate of the actual pixel point, x p is the camera screen width, x n is the horizontal coordinate of the label pixel, y1 is the vertical coordinate of the actual pixel, and y p is the camera screen height, y n is the ordinate of the label pixel point; obtaining an aggregated set and a non-aggregated set; The first calculation module is used to calculate the determination distance between the target tag and all the tags in the tag set, and the calculation formula is: Wherein, x2 is the horizontal coordinate of all the tags in the tag set, y2 is the vertical coordinate of all the tags in the tag set, and d is the determination distance; A classification module, used for classifying the tags in the tag set into the aggregated set or the non-aggregated set according to the determination distance; A rendering unit is used to render all the tags to a screen according to an aggregated set and a non-aggregated set, wherein the tags in the aggregated set and the target tag correspond to the same point, and the tags in the non-aggregated set correspond to different points respectively.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute a method for aggregating surveillance video screen tags as described in any one of claims 1 to 5.
8. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing a surveillance video screen tag aggregation method as described in any one of claims 1 to 5.
