Cross-screen tripwire drawing method, device, electronic device and storage medium
By segmenting and grid coding operations on the display wall in a multi-split display environment, the problems of complex and inefficient tripwire outline calculation in the prior art are solved, and rapid outline and clear display of cross-screen tripwires are realized.
Patent Information
- Application Number
- CN202111282539.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-01
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2041-11-01
AI Technical Summary
The prior art has complex calculations and low efficiency when drawing tripwires in multi-split display environments, and cannot quickly draw tripwires.
By segmenting the display wall, setting up a central grid and a nine-client grid, using grid encoding for logical or sum logic and operations, controlling the drawing of tripwires in the segmented area to achieve rapid outlines of cross-screen tripwires.
The calculation complexity of the tripwire distribution judgment is simplified, the recognition speed of whether the tripwire intersects is accelerated, and the tripwires are quickly drawn in multiple areas, so that the tripwires across the screen can be quickly and clearly seen on the large screen connected to the splicing device.
Smart Images

Figure CN114037713B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of Internet technology, and in particular to a method, device, electronic device and storage medium for drawing a cross-screen tripwire. Background Art
[0002] The camera equipment requires tripwires to divide the monitoring area. A monitoring mechanism is provided within the monitoring area, and no monitoring is performed outside the monitoring area.
[0003] In order to save resources and increase data transmission speed, trip wires are usually not superimposed on the image before being transmitted to the splicing controller. Instead, the trip wires are drawn at the splicing controller based on the trip wire coordinates transmitted from the front-end camera device. In the related art, it is necessary to use equations to represent the boundary lines of each split screen in the TV wall and the trip wires, and then calculate the intersection through equation calculation to achieve trip wire drawing. However, this drawing method is complex in calculation, wastes a lot of computing resources, and is relatively inefficient. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, electronic device and storage medium for drawing a cross-screen tripwire, so as to achieve rapid drawing of a tripwire in such a complex multi-split screen display situation.
[0005] In a first aspect, an embodiment of the present invention provides a method for drawing a cross-screen tripwire, the method comprising:
[0006] The image window area displayed on the display wall is divided to determine the divided area in each display split screen of the display wall; the display wall includes a plurality of display split screens arranged in an array;
[0007] The segmented area is set as a central grid and the display wall area is divided into a nine-grid grid; the coding of the central grid is a binary represented by a preset value, and the coding of other grids is determined by adjusting the binary represented by the preset value based on the offset orientation of other grids relative to the central grid, and the preset value is an integer 0;
[0008] Perform logical OR and logical AND operations on the codes of the grids where the two end points of the tripwire are located in the screen window area;
[0009] According to the operation results of the logical OR and the logical AND, the trip wire located in the split area is controlled to be outlined in the display split screen where the split area is located, so as to display the trip wire across the screen.
[0010] In a second aspect, an embodiment of the present invention further provides a device for drawing a cross-screen tripwire, the device comprising:
[0011] A segmentation determination module, used to segment the picture window area displayed on the display wall, and determine the segmentation area in each display split screen of the display wall; the display wall includes a plurality of display split screens arranged in an array;
[0012] A segmentation configuration module, used to set the segmentation area to a central grid and divide the display wall area into a nine-square grid; the code of the central grid is a binary represented by a preset value, and the codes of other grids are determined by adjusting the binary represented by the preset value based on the offset orientation of other grids relative to the central grid, and the preset value is an integer 0;
[0013] A logic operation module, used for performing logic OR and logic AND operations on the codes of the grids where the two end points of the trip wire are located in the screen window area;
[0014] The tripwire drawing module is used to control the drawing of the tripwire located in the split area in the display split screen where the split area is located according to the operation results of logic OR and logic AND, so as to display the tripwire across the screen.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, including:
[0016] one or more processors;
[0017] A storage device for storing one or more programs;
[0018] The one or more programs are executed by the one or more processors, so that the one or more processors implement the cross-screen tripwire drawing method provided in any embodiment of the present invention.
[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the cross-screen tripwire drawing method provided in any embodiment of the present invention is implemented.
[0020] In an embodiment of the present invention, a method for drawing a cross-screen tripwire is provided, which divides the picture window area displayed on the display wall, determines the divided area in each display split screen of the display wall, sets the divided area as the central grid, and divides the display wall area into a nine-square grid; the coding of the central grid is a binary represented by a preset value, and the coding of other grids is adjusted and determined based on the offset orientation of other grids relative to the central grid, and the preset value is an integer 0; by performing logical or and logical AND operations on the coding of the grids where the two end points of the tripwire are located in the picture window area, the tripwire located in the divided area is controlled to be drawn in the display split screen where the divided area is located, so as to realize the cross-screen display of the tripwire. By adopting the technical solution of the present application, compared with the tripwire distribution judgment through the complex multiplication and division operations involved in the equation calculation, the complexity of the tripwire distribution judgment calculation can be simplified through the coding logic operation, and the speed of identifying whether the tripwires intersect can be accelerated, so that the tripwires can be quickly drawn in multiple areas, so that the cross-screen tripwires can be quickly and clearly seen on the large screen connected to the splicing control device.
[0021] The above invention content is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts. In the drawings:
[0023] Figure 1 is a flow chart of a cross-screen tripwire drawing method provided in an embodiment of the present invention;
[0024] Figure 2 is a schematic diagram of dividing a picture window based on multi-display split screen provided in an embodiment of the present invention;
[0025] Figure 3 It is a schematic diagram of a situation in which a trip wire in a picture window is drawn based on multi-display split screen provided in an embodiment of the present invention;
[0026] Figure 4 is another schematic diagram of a situation in which a trip wire is drawn in a picture window based on multi-display split screen provided in an embodiment of the present invention;
[0027] Figure 5It is a schematic diagram of another situation of outlining a tripwire in a picture window based on multi-display split screen provided in an embodiment of the present invention;
[0028] Figure 6 It is a schematic diagram of dividing and drawing a tripwire in a picture window based on multi-display split screen provided in an embodiment of the present invention;
[0029] Figure 7 It is a schematic diagram of dividing a display wall into a nine-square grid with each split area of the display split screen as the center provided in an embodiment of the present invention;
[0030] Figure 8 It is a schematic diagram of grid coding of a grid divided into nine-square grids on a display wall provided in an embodiment of the present invention;
[0031] Fig. 9 is a flow chart of another cross-screen tripwire drawing method provided in an embodiment of the present invention;
[0032] Fig.10 It is a schematic diagram of the occupation of the display split screen by the trip wire after the display wall is divided into a nine-square grid provided in an embodiment of the present invention;
[0033] Fig.11 It is a schematic diagram of the occupation of trip wires in various display split-screen segments after a display wall is divided into a nine-square grid provided in an embodiment of the present invention;
[0034] Fig.12 is a flow chart of another cross-screen tripwire drawing method provided in an embodiment of the present invention;
[0035] Fig.13 is a schematic diagram of adding a direction mark to a tripwire provided in an embodiment of the present invention;
[0036] Fig.14 It is a schematic diagram of adding a direction mark to a tripwire for optimized display provided in an embodiment of the present invention;
[0037] Fig.15 is a structural diagram of a cross-screen tripwire drawing device provided in an embodiment of the present invention;
[0038] Fig.16 It is a structural schematic diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0040] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0041] Figure 1 is a flow chart of a method for drawing a cross-screen tripwire provided in an embodiment of the present invention. The technical solution of this embodiment can be applied to the case where tripwires are displayed across multiple screens. The method can be executed by a cross-screen tripwire drawing device, which can be implemented by software and / or hardware and can be integrated into an electronic device with a network communication function. Figure 1 As shown, the method for drawing a cross-screen tripwire in an embodiment of the present invention may include the following steps:
[0042] S110, dividing the picture window area displayed on the display wall, and determining the divided area in each display split screen of the display wall; the display wall includes a plurality of display split screens arranged in an array.
[0043] See also Figure 2 The display wall may include multiple display split screens arranged in an array, and different display split screens have preset display positions and sizes on the display wall, thereby forming display layout information of each display split screen on the display wall. Considering that the image screen size transmitted by front-end devices such as IPC is large, it is difficult to fully display it in one display split screen. Usually, a splicing controller is used to cut the image screen and send it to different display split screens of the display wall respectively, so as to realize splicing and displaying a complete image on the display wall.
[0044] See also Figure 2 On the display wall, there are boundary lines between different display split screens. When a picture window area is displayed across multiple display split screens, the displayed picture window area can be divided into regions according to the boundary lines of each display split screen, so as to divide the picture window area into different display split screens. In this way, the divided regions in each display split screen can be known through region division, and the region position information of the divided regions in each display split screen can be determined.
[0045] For example, see Figure 2The picture window area can be divided into four areas according to the display split screen occupied by the picture window area when displayed on the display wall, namely the area within display split screen 1, the area within display split screen 2, the area within display split screen 3 and the area within display split screen 4. After the picture window area is divided into each display split screen, the divided areas belonging to each display split screen are obtained, which are named divided area 1, divided area 2, divided area 3 and divided area 4 respectively.
[0046] S120 , for the segmented area in each display split screen, setting the segmented area as a central grid and dividing the display wall area into a nine-square grid.
[0047] The coding of the central grid is a binary represented by a preset value, and the coding of other grids is determined by adjusting the binary represented by the preset value based on the offset orientation of other grids relative to the central grid, and the preset value is an integer 0.
[0048] See also Figure 2 , the picture window area will span multiple display split screens to display the complete image. The tripwire in the image may also need to be displayed across multiple display split screens, similar to the need to cut a tripwire and display it on different display split screens in order to display the complete tripwire.
[0049] Usually, the trip wires are not superimposed on the image before being transmitted to the splicing controller. Instead, the trip wires are drawn at the splicing controller according to the trip wire coordinates transmitted from the front-end devices such as IPC. At the splicing controller end, each display split screen in the display wall corresponds to a different CPU processor, which means that different CPU processors are required to render separately, so each CPU processor needs to efficiently calculate the part of the trip wire rendered by the corresponding display split screen itself for display.
[0050] A related solution is to draw the tripwire by calculating the intersection points of the edges of each display split screen on the display wall and the equation of the tripwire; for example, see Figure 3 To determine whether a tripwire intersects with segmentation area 1, it is necessary to intersect the tripwire with the four sidelines of segmentation area 1. First, the sideline and the tripwire are represented by the equation y=ax+b, represented by the starting point and the end point, and then the intersection point is calculated based on the two equations. However, the calculation of the equation involves complex operations such as multiplication and division, and one equation needs to be calculated four times, which increases the calculation time and complexity, making it impossible to quickly draw the tripwire.
[0051] See also Figure 4 and Figure 5There are many situations where the tripwire is displayed across the screen, such as across two display split screens VO, across three display split screens VO, across the left diagonal display split screen, and across the right diagonal display split screen. At the same time, there are some special situations, such as across the display split screen horizontally and across the display split screen vertically. In this case, there will be many situations according to the situation, which is very complicated, easy to make mistakes, and low efficiency in drawing.
[0052] In view of the shortcomings of the relevant tripwire delineation scheme, see Figure 6 The present application scheme no longer uses equations to perform a large number of multiplications and divisions to achieve intersection judgment, but adopts a coding idea. In the cross-screen display tripwire scenario, a tripwire is cut into different line segments. For the segmented area belonging to each display split screen, a simple coding logic operation is used to judge the intersection of the tripwire and the segmented area. Each display split screen VO then outlines the line segments of the tripwire located in each display split screen in its own area.
[0053] In order to better use the coding idea to judge the intersection of tripwires, and considering that each display split screen outlines the tripwires in the split area within each display split screen, a split and nine-grid grid construction operation can be performed for each split area in each display split screen. Take split area 1 as an example, split area 1 is used as the center grid, see Figure 7 The entire display wall area is divided into a nine-square grid. Each corresponding grid in the nine-square grid is configured with a corresponding grid code. The binary code of the fixed center grid, the codes of other grids are determined by adjusting the binary code of the center grid based on the offset orientation of other grids relative to the center grid, and the grid codes of different grids are different.
[0054] Alternatively, see Figure 7 In the nine-grid network divided by the central grid for each segmented area, the encoding of the central grid is a preset binary number, which is a four-bit binary number represented by a preset value, and the encoding of other grids can be determined by bit-wise inversion of the preset binary number based on the binary bits corresponding to the offset directions of other grids relative to the central grid.
[0055] Alternatively, see Figure 7 , the offset directions of other grids relative to the central grid include offset to the right, offset to the left, offset to the upper side, offset to the lower side, offset to the upper right side, offset to the upper left side and offset to the lower side. The preset binary number of the central grid code includes different binary bits, and different combinations of binary bits in the preset binary number correspond to different offset directions. On the basis of the preset binary number, by inverting the values of the binary bits corresponding to the offset directions of other grids relative to the central grid, the grid codes of other grids relative to the central grid can be obtained.
[0056] See also Figure 8 , taking a segmented area as the central grid, a nine-grid grid is obtained by gridding the display wall. The nine-grid grid includes nine grids. The grid code of the central grid is fixedly set to a four-bit binary number 0000. The grid codes of other grids will be adjusted according to the grid code of the central grid based on the orientation relative to the central grid. The four-bit binary number has four bits in total, and different binary bits represent the offset orientation represented by any grid area relative to the central grid area.
[0057] See also Figure 8 , for the four-bit binary number used in the grid coding, the first binary bit represents whether the grid area is above the central grid area. If so, the corresponding binary bit value is 1; the second binary bit represents whether the grid area is below the central grid area. If so, the corresponding binary bit value is 1; the third binary bit represents whether the grid area is on the right side of the central grid area. If so, the corresponding binary bit value is 1; the fourth binary bit represents whether the grid area is on the left side of the central grid area. If so, the corresponding binary bit value is 1. Of course, if it is a combination of the upper right, lower right, upper left, lower left, etc., then the binary bit combination can be adjusted directly. For example, if the grid area is on the upper right side of the central grid area, the values of the first and second binary bits are adjusted to 1, and so on.
[0058] Understandably, Figure 8 The coding of each grid in the nine-grid grid is only an example, not the only configuration scheme. For example, there may be the following configuration scheme, where the first binary bit represents whether the grid area is on the right side of the central grid area, the second binary bit represents whether the grid area is on the left side of the central grid area, the third binary bit represents whether the grid area is above the central grid area, and the fourth binary bit represents whether the grid area is below the central grid area. When configuring the grid coding, it is only necessary to ensure that the four-bit binary code of the central grid is 0000, and different combinations of binary bits in the four-bit binary number correspond to different offset directions.
[0059] S130 , based on the nine-square grid divided into grids with the segmented area as the center, the codes of the grids where the two end points of the tripwire in the picture window area are located are subjected to logical OR and logical AND operations.
[0060] In an optional solution of this embodiment, performing logical OR and logical AND operations on the codes of the grids where the two end points of the tripwire are located in the picture window area may include the following steps A1-A3:
[0061] Step A1: Taking a segmented area as the central grid, determine the endpoint position information of the two end points of the tripwire in the picture window area when they are displayed on the display wall.
[0062] See also Figure 6 and Figure 7 , the endpoint positions of each tripwire in the shooting picture (including the coordinates of the two starting endpoints of the tripwire) can be obtained in advance from the front-end device such as IPC, and the endpoint positions of the tripwire in the picture window area can be obtained by multiplying the horizontal coordinate of the endpoint position of the tripwire by the width of the picture window area and the vertical coordinate of the endpoint position of the tripwire by the height of the picture window area. Then, the resolution corresponding to the picture window area is obtained, and combined with the position layout of each display split screen on the display wall, the endpoint position information of the two endpoints of the tripwire when they are displayed on the display wall can be calculated.
[0063] Step A2: determine the grids where the two end points of the tripwire are located based on the endpoint position information of the two end points of the tripwire and the nine-square grid layout of the display wall area divided based on the segmented area as the central grid.
[0064] See also Figure 6 and Figure 7 In the case where the display wall area is divided into a nine-square grid with the partition area as the center grid, the location information of each grid in the nine-square grid on the display wall can be obtained and recorded for the nine-square grid layout of the display wall area. In this way, by comparing the endpoint location information of the two end points of the tripwire with the location information of each grid on the display wall, it can be determined in which grid of the nine-square grid divided on the display wall each endpoint of the tripwire is located, and the nine-square grid grid where the two end points of the tripwire are located is determined.
[0065] Step A3: assign the codes configured in the grid where the two end points of the tripwire are located to the two end points of the tripwire, and perform a logical OR operation and a logical AND operation on the grid codes of the two end points.
[0066] See also Figure 7 , with a segmented area as the central grid, the entire display wall area is divided into a nine-square grid, and each grid in the nine-square grid is configured with a corresponding grid code. After determining the grid where the tripwire endpoint is located, the grid code of the grid where the tripwire endpoint is located can be directly assigned to the tripwire endpoint, so that both endpoints of the tripwire have grid codes corresponding to the grids where they are located. The four-bit binary grid codes of the two endpoints of the tripwire are logically ORed and logically ANDed bit by bit. For example, the grid codes of the two endpoints of the tripwire are 0100 and 0010 respectively, and the four-bit binary codes 0100 and 0010 are logically ORed and logically ANDed bit by bit.
[0067] By adopting the above method, compared with the complex multiplication and division operations involved in equation calculation to determine the distribution of tripwires, the coding operation does not involve a large number of multiplication and division operations like equation calculation, as well as various complex situations of the intersection of tripwires and areas (such as non-intersection, horizontal intersection, vertical intersection, etc.). Through simple coding logic operations, the complexity of drawing the corresponding tripwires in each display split screen can be simplified, the resource consumption of the kernel can be reduced, the speed of tripwire drawing can be accelerated, and the efficiency of tripwire drawing can be improved.
[0068] S140. Based on the operation results of the logical OR and the logical AND, control the drawing of the trip wire located in the split area in the display split screen where the split area is located, so as to display the trip wire across the screen.
[0069] According to the cross-screen tripwire drawing method provided in the embodiment of the present invention, compared with the tripwire distribution judgment performed through equation calculation involving complex multiplication and division operations, the calculation complexity of the tripwire distribution judgment can be simplified through coded logical operations, the speed of identifying whether the tripwires intersect can be accelerated, and the tripwires can be quickly drawn in multiple areas, so that the cross-screen tripwire drawing can be quickly and clearly seen on the large screen connected to the splicing control device, which also lays the foundation for the future cross-regional calculation of tripwires. By expanding the area, users can use one tripwire to divide multiple areas at the same time.
[0070] Fig. 9 1 is a flow chart of another method for drawing a cross-screen tripwire provided in an embodiment of the present invention. The embodiment of the present invention further optimizes the above embodiment on the basis of the above embodiment. The embodiment of the present invention can be combined with various optional solutions in one or more of the above embodiments. Fig. 9 As shown, the cross-screen tripwire drawing method provided in the embodiment of the present application may include the following steps:
[0071] S910, dividing the picture window area displayed on the display wall, and determining the divided area in each display split screen of the display wall; the display wall includes a plurality of display split screens arranged in an array.
[0072] In an optional solution of this embodiment, dividing the picture window area displayed on the display wall and determining the divided area in each display split screen of the display wall may include the following steps B1-B2:
[0073] Step B1: determine the display split screen occupied by the picture window area when it is displayed on the display wall.
[0074] Step B2: compare the horizontal and vertical coordinates of the picture window area with those of each occupied display split screen, and determine the position information of the divided area belonging to each display split screen through the comparison result.
[0075] by Figure 6Taking the cross-screen display of the picture window area shown as an example, it is divided into four display split screens according to the display split screen area occupied by the picture window area on the display wall, namely display split screen 1, display split screen 2, display split screen 3 and display split screen 4. The split areas belonging to each display split screen are named split area 1, split area 2, split area 3 and split area 4 respectively.
[0076] See also Figure 6 , the horizontal and vertical coordinate values of the picture window area can be compared with the occupied display split screen areas respectively, and the picture window area is the sum of the areas of area 1-area 4. For any display split screen occupied by the picture window area, taking display split screen 1 as an example, if the maximum horizontal coordinate value of display split screen 1 is less than the maximum horizontal coordinate value of the picture window area, the horizontal coordinate value of the split area located in display split screen 1 is set to the maximum horizontal coordinate value of the display split screen; if the maximum vertical coordinate value of display split screen 1 is less than the maximum vertical coordinate value of the picture window area, the smaller coordinate value of the split area located in display split screen 1 is set to the maximum vertical coordinate value of display split screen 1. After simple addition and subtraction calculations, split area 1 is an area composed of the starting point X of the window area, the starting point Y of the window area, the end point X of display split screen 1, and the end point Y of display split screen 1. According to the above method, the positions of the split areas located in each display split screen can be determined in sequence.
[0077] S920: For the segmented area in each display split screen, set the segmented area as a central grid and divide the display wall area into a nine-square grid.
[0078] The coding of the central grid is a binary represented by a preset value, and the coding of other grids is determined by adjusting the binary represented by the preset value based on the offset orientation of other grids relative to the central grid, and the preset value is an integer 0.
[0079] S930, based on the nine-square grid divided into grids with the segmented area as the center, perform logical OR and logical AND operations on the codes of the grids where the two end points of the tripwire in the picture window area are located.
[0080] S940: Determine the occupation status of the tripwires in the picture window area in the multiple display split screens of the display wall according to the operation results of the logical OR and the logical AND.
[0081] In an optional solution of this embodiment, determining the occupation of the tripwire in the picture window area in the multiple display split screens of the display wall according to the operation results of the logical OR and the logical AND may include steps C1-C2:
[0082] Step C1: If the result of the logical OR operation between the grid codes corresponding to the two end points of the tripwire is 0, it is determined that the tripwire in the picture window area is completely located in the segmented area corresponding to the central grid.
[0083] Step C2: If the result of the logical AND operation between the grid codes corresponding to the two end points of the tripwire is not 0, it is determined that the tripwire in the picture window area is completely outside the segmented area corresponding to the central grid.
[0084] See also Figure 3 , Figure 4 as well as Figure 5 In the scenario of displaying an image across multiple screens, there are three situations in which the tripwire is displayed in one display split screen: the tripwire is completely located in the display split screen, the tripwire is located in different display split screens including the display split screen (across the display split screen), and the tripwire is completely located in other display split screens outside the display split screen. Among them, the situation of crossing the display split screen can also include many situations, such as crossing two display split screens VO, crossing three display split screens VO, crossing the display split screen diagonally to the left, crossing the display split screen diagonally to the right, crossing the display split screen horizontally and vertically, etc.
[0085] See also Figure 7 and Figure 8 , the four-bit binary grid codes of the two end points of the tripwire are logically ORed and logically ANDed bit by bit. If the result of the logical OR operation of the grid codes of the two end points is 0, it means that the tripwire is completely located in the segmented area corresponding to the center grid, and will not be outlined and displayed across multiple display split screens. In the case where it is determined that the result of the logical OR operation of the grid codes of the two end points is not 0, if it is detected that the result of the logical AND operation of the grid codes of the two end points is not 0, it means that the tripwire is completely located in other grids outside the segmented area corresponding to the center grid, and will not be outlined and displayed in the segmented area corresponding to the center grid.
[0086] In another optional solution of this embodiment, determining the occupation of the trip wire in the picture window area in the multiple display split screens of the display wall according to the operation results of the logical OR and the logical AND may further include the following steps:
[0087] If the result of the logical AND operation between the grid codes corresponding to the two endpoints of the tripwire is 0 and the result of the logical OR operation is not 0, it is determined that the part of the tripwire in the picture window area is located in the segmentation area corresponding to the central grid and intersects with the grid boundary line of the segmentation area, or the tripwire in the picture window area is completely outside the segmentation area corresponding to the central grid and intersects with the extension line of the boundary line of the segmentation area.
[0088] See also Fig.10, tripwire 1 is drawn across segmentation area 1, segmentation area 3 and segmentation area 2 in the screen window area, and tripwire 2 is drawn across segmentation area 4, segmentation area 3 and segmentation area 2 in the screen window area. After the display wall area is divided into a nine-square grid with the segmentation area as the center grid, the two end points of tripwire 1 and tripwire 2 are in the same grid corresponding to the nine-square grid. In this way, the two end points of tripwire 1 and tripwire 2 have the same four-bit binary grid code, and the judgment range can only be roughly narrowed down to the part of the tripwire located in the segmentation area corresponding to the center grid and intersecting with the grid boundary line of the segmentation area, or the tripwire is completely located outside the segmentation area corresponding to the center grid and intersecting with the extension line of the boundary line of the segmentation area, but it is impossible to distinguish which specific situation it belongs to through logical or and logical and operations.
[0089] S950. Based on the occupation of the trip wire in the display split screen of the display wall, control the drawing of the trip wire located in the split area in the display split screen where the split area is located.
[0090] In an optional solution of this embodiment, according to the occupation of the trip wire in the display split screen of the display wall, controlling the trip wire located in the split area to be drawn in the display split screen where the split area is located may include the following steps:
[0091] When the tripwire is completely within the segmented area corresponding to the central grid, the horizontal and vertical coordinates indicated by the endpoint position information of the two end points of the tripwire when displayed on the display wall are used to control the drawing of the complete tripwire in the display split screen where the segmented area is located.
[0092] See also Figure 3 When the tripwire is completely within the split area corresponding to the center grid, it means that the tripwire will not be displayed in other display split screens except the display split screen where the split area is located. At this time, the display split screens of the split area where the tripwire is located correspond to different CPU processors. The horizontal and vertical coordinates of the starting point and the end point indicated by the endpoint position information of the two end points of the tripwire can be directly drawn and rendered in the corresponding display split screen to display the tripwire.
[0093] In another optional solution of this embodiment, according to the occupation of the trip wire in the display split screen of the display wall, controlling the trip wire located in the split area to be drawn in the display split screen where the split area is located may include the following steps:
[0094] When the tripwire is completely outside the split area corresponding to the center grid, it is prohibited to draw the tripwire in the display split screen where the split area is located.
[0095] See also Figure 3 , Figure 4 as well as Figure 5It is not difficult to see that when the tripwire is completely outside the split area corresponding to the central grid, it means that the tripwire will not be displayed in the split screen where the split area is located. At this time, the split screen where the tripwire is located corresponds to different CPU processors and there is no need to draw the tripwire. Only the image corresponding to the split area needs to be displayed.
[0096] In another optional solution of this embodiment, according to the occupation of the trip wire in the display split screen of the display wall, controlling to draw the trip wire located in the split area in the display split screen where the split area is located may include steps D1-D3:
[0097] Step D1, when the occupancy of the tripwire is not accurately determined, the grid edge lines intersecting with the tripwire are determined from the grid edge lines of the central grid where the segmented area is located according to the grid codes corresponding to the two endpoints of the tripwire; the grid edge lines include grid boundary lines or extended lines of grid boundaries.
[0098] See also Fig.10 , after analysis, it can be known that in the case of tripwire 1, part of the tripwire is located in the segmented area corresponding to the central grid and intersects with the grid boundary line of the segmented area; in the case of tripwire 2, the tripwire in the screen window area is completely outside the segmented area corresponding to the central grid and intersects with the extension line of the boundary line of the segmented area. In both cases, the grid boundary line of the segmented area and the extension line of the boundary line of the segmented area coincide with the boundary line of the display split screen where the segmented area is located. Therefore, it can be known that the grid boundary line of the segmented area and the extension line of the boundary line have fixed horizontal and vertical coordinate values.
[0099] Step D2, based on the horizontal and vertical coordinates indicated by the endpoint position information when the two end points of the tripwire are displayed on the display wall and the horizontal or vertical coordinate of the grid edge line intersecting with the tripwire, the coordinates of the intersection point on the grid edge line intersecting with the tripwire are determined using the principle of similar triangles.
[0100] See also Fig.10 and Fig.11 , based on the horizontal and vertical coordinates indicated by the endpoint position information when the two end points of the tripwire are displayed on the display wall, when calculating the intersection point of the tripwire and the grid boundary line or the boundary line extension line, at least one of the horizontal coordinate and the vertical coordinate value of the intersection point is known and fixed. For example, when calculating the intersection point of the tripwire and the grid boundary line or the boundary line extension line parallel to the horizontal axis, the vertical coordinate of the intersection point is fixed to the vertical coordinate value of the boundary line; when calculating the intersection point of the tripwire and the grid boundary line or the boundary line extension line parallel to the vertical axis, the horizontal coordinate of the intersection point is fixed to the horizontal coordinate value of the boundary line.
[0101] See also Fig.11, the lower left point of the two end points of the trip wire is the starting point a, the upper right point of the two end points of the trip wire is the end point d, the intersection point of the trip wire and the lower boundary line of the segmentation area corresponding to the central grid is b, and the intersection point of the trip wire and the right boundary line of the segmentation area corresponding to the central grid is c. The grid codes corresponding to endpoints a and d are 0100 and 0010 respectively. If the grid code of a and the grid code of d are not 0 in phase or in phase, it is judged that the trip wire connecting a and d is not completely inside the segmentation area corresponding to the central grid; if the grid code of a and the grid code of d are 0 in phase and in phase, it is judged that the trip wire connecting a and d intersects with the boundary line extension line or boundary line of the segmentation area corresponding to the central grid.
[0102] In an alternative approach, see Fig.11 , the trigonometric function value (such as tangent value) can be obtained according to the horizontal and vertical coordinates of the starting point and the horizontal and vertical coordinates of the end point of the tripwire. Taking the tangent value as an example, when the vertical coordinate of the intersection point with the grid boundary line or the extension of the boundary line is fixed, according to the vertical coordinate difference between the vertical coordinate of the intersection point of the tripwire and the grid boundary line or the extension of the boundary line and the vertical coordinate of one end point, according to the vertical coordinate difference and the calculated tangent value, the horizontal coordinate difference between the horizontal coordinate of the intersection point and the horizontal coordinate of the end point can be obtained by combining the horizontal coordinate value of the end point. For all intersecting grid boundary lines or extension lines of the grid boundary, the above method is used to calculate the coordinates of the intersection point on the grid edge line that intersects with the tripwire.
[0103] In another alternative, see Fig.11 , the method of calculating the coordinates of the intersection point on the grid edge line that intersects with the trip wire is as follows: according to the grid code of the end point a of the two ends of the trip wire is 0100, so the end point a of the two ends of the trip wire must intersect with the lower boundary of the segmentation area corresponding to the central grid. The ordinate of the intersection point b of the trip wire and the lower boundary of the segmentation area corresponding to the central grid is the ordinate of the lower boundary of the segmentation area corresponding to the central grid, which is fixed and known without calculation. The abscissa of the intersection point b can be calculated using similar triangles:
[0104]
[0105] The coordinates of b can be obtained in the above manner. Similarly, the coordinates of the intersection point c of the right boundary of the segmented area corresponding to the trip wire and the center grid can also be obtained.
[0106] Step D3, based on the horizontal and vertical coordinates indicated by the endpoint position information when the two end points of the tripwire are displayed on the display wall and the obtained intersection coordinates, control the drawing of the portion of the tripwire located in the split area in the display split screen where the split area is located.
[0107] See also Fig.10 and Fig.11It is not difficult to see that the horizontal and vertical coordinates indicated by the endpoint position information when the two ends of the tripwire are displayed on the display wall and the obtained intersection coordinates can be used as the starting point and end point of the part of the tripwire located in the split area. After the nine-square grid is made with each split area as the center grid, the tripwire part located in each split area can be obtained in turn. In this way, the display split screen of each split area corresponds to a different CPU processor. According to the horizontal and vertical coordinates of the starting point and end point of the tripwire in the split area, the tripwire can be displayed by directly drawing and rendering on the corresponding display split screen.
[0108] According to the cross-screen tripwire drawing method provided in the embodiment of the present invention, compared with the tripwire distribution judgment through the complex multiplication and division operations involved in the equation calculation, the calculation complexity of the tripwire distribution judgment can be simplified through the coded logic operation, and the speed of identifying whether the tripwires intersect can be accelerated. The tripwires can be quickly drawn in multiple areas, so that the cross-screen tripwire drawing can be quickly and clearly seen on the large screen connected to the splicing control device, and it also lays the foundation for the cross-region calculation area of the tripwire in the future. The area can be expanded to allow users to use one tripwire to divide multiple areas at the same time. Especially when calculating the intersection, the present application scheme only uses addition and subtraction and limited multiplication and division operations to obtain the intersection coordinates, and there is no need to consider the intersection of the tripwires too much, which reduces the calculation complexity and error rate and improves the calculation efficiency.
[0109] Fig.12 1 is a flowchart of another method for drawing a cross-screen tripwire provided in an embodiment of the present invention. The embodiment of the present invention further optimizes the above embodiment on the basis of the above embodiment. The embodiment of the present invention can be combined with various optional solutions in one or more of the above embodiments. Fig.12 As shown, the cross-screen tripwire drawing method provided in the embodiment of the present application may include the following steps:
[0110] S1210, dividing the picture window area displayed on the display wall, and determining the divided area located in each display split screen of the display wall; the display wall includes a plurality of display split screens arranged in an array.
[0111] S1220 . For each split area in each display split screen, set the split area as a central grid and divide the display wall area into a nine-square grid.
[0112] The coding of the central grid is a preset binary number, and the coding of other grids is determined by bitwise inversion of the preset binary number based on the binary bits corresponding to the offset orientations of other grids relative to the central grid, and the preset binary number is a four-bit binary represented by a preset value, and the preset value is an integer 0;
[0113] S1230, based on the nine-square grid divided into grids with the segmented area as the center, the codes of the grids where the two end points of the tripwire in the picture window area are located are subjected to logical OR and logical AND operations.
[0114] S1240. Based on the operation results of the logical OR and the logical AND, control the drawing of the trip wire located in the split area in the display split screen where the split area is located, so as to display the trip wire across the screen.
[0115] S1250: Determine the horizontal and vertical coordinates of the midpoint between the two end points of the tripwire based on the endpoint position information when the two end points of the tripwire are displayed on the display wall.
[0116] See also Fig.13 Sometimes, a tripwire needs to be indicated by a direction mark (such as an arrow) to indicate the direction of the tripwire. This application also makes improvements to the calculation of the position coordinates of the direction mark. The direction mark and the tripwire are perpendicular bisectors to each other, so you only need to determine the perpendicular bisector of the tripwire to add the direction mark of the tripwire. By taking the average of the horizontal and vertical coordinate values indicated by the endpoint position information when the two end points of the tripwire are displayed on the display wall, the horizontal and vertical coordinates of the midpoint between the two end points of the tripwire can be obtained.
[0117] S1260, based on the horizontal and vertical coordinates of the midpoint between the two end points of the tripwire and the horizontal and vertical coordinates of one end point of the tripwire, determine the horizontal and vertical coordinates of the reference point on the perpendicular bisector passing through the midpoint between the two end points of the tripwire through coordinate difference calculation.
[0118] In an optional solution of this embodiment, according to the horizontal and vertical coordinates of the midpoint between the two end points of the tripwire and the horizontal and vertical coordinates of one end point of the tripwire, the horizontal and vertical coordinates of the reference point on the perpendicular bisector passing through the midpoint between the two end points of the tripwire are determined by coordinate difference calculation, which may include the following steps E1-E2:
[0119] Step E1, determining the horizontal coordinate difference and the vertical coordinate difference between the midpoint between the two end points of the tripwire and one end point of the tripwire.
[0120] Step E2, subtract the ordinate difference from the abscissa value of the midpoint between the two endpoints of the tripwire and subtract the abscissa difference from the ordinate value of the midpoint between the two endpoints of the tripwire to obtain the abscissa and ordinate coordinates of the reference point on the perpendicular bisector passing through the midpoint between the two endpoints of the tripwire.
[0121] Considering that the slope calculation is large (many multiplications and opening and closing signs are required) and the calculation is complicated (there are trigonometric function conversions), the method of calculating the perpendicular bisector of the figure by equal figures is adopted (only addition, subtraction and limited four divisions are required). Fig.13 , assuming that A1 and A2 are the two endpoints of the tripwire, and A1A2 are the known tripwire coordinates. If A6A3 is made perpendicular to A1A2, triangle A6A5A3 and triangle A3A2A4 must be congruent, so the angle A6A3A2 is a right angle.
[0122] To get the coordinates of A6, you can first determine the difference between the midpoint between the two ends of the tripwire and the difference between the horizontal and vertical coordinates of the midpoint between the two ends of the tripwire, which are the length values of A3A4 and A2A4 respectively. The horizontal coordinate of A6 only needs to be the horizontal coordinate of A3 minus the length value of A2A4, and the vertical coordinate of A6 only needs to be the vertical coordinate of A3 minus the length value of A3A4. The horizontal and vertical coordinates of A6 can be obtained by only adding and subtracting.
[0123] S1270. Add a direction mark indicating the direction of the tripwire on the tripwire in the picture window area according to the horizontal and vertical coordinates of the midpoint between the two end points of the tripwire and the horizontal and vertical coordinates of the reference point; wherein the direction mark includes an arrow body line segment and an arrow direction line segment.
[0124] See also Fig.10 and Fig.13 After determining the horizontal and vertical coordinates of the midpoint between the two end points of the tripwire and the horizontal and vertical coordinates of the reference point, the line connecting the horizontal and vertical coordinates of the midpoint and the horizontal and vertical coordinates of the reference point is the perpendicular bisector of the midpoint between the two end points of the tripwire. At this time, the arrow body line segment of the direction mark can be found on the perpendicular bisector of the tripwire to add a direction mark for indicating the direction of the tripwire. Among them, the tripwire outline and the addition of the direction mark can be performed simultaneously or sequentially, but the visual time interval is small.
[0125] Optionally, the arrow main line segment of the direction mark and the main line segment of the mixing wire are perpendicular bisectors to each other, and the length of the arrow main line segment is 1 / 2 of the mixing wire length. (Can be configured as required). The two arrow direction segments of the direction mark are at an angle of 45° to the arrow main segment (can be configured as required), and the length of the arrow direction segment is a preset multiple of the arrow main segment, for example times (can be modified to a fixed length).
[0126] Optionally, when calculating the arrow body line segment of the direction indicator, the length between the horizontal and vertical coordinates of the midpoint and the horizontal and vertical coordinates of the reference point is a preset multiple of the tripwire length, for example times, so the length of the arrow main line segment is the length of the mixing line When calculating the arrow direction line segment: the two end points of the direction line segment are: one is the end point of the arrow body, and the other is the two points on the perpendicular bisector.
[0127] Based on the above embodiment, optionally, see Fig.14 , adding a direction mark to indicate the direction of the tripwire on the tripwire in the screen window area may include the following steps:
[0128] The angle of the direction mark used to indicate the direction of the tripwire is adjusted so that the three wires are crossed to simultaneously display the direction mark before and after the adjustment.
[0129] According to the existing method of drawing oblique lines, breakpoints are prone to occur, which are very obvious after zooming in. The reason is that the tripwire is sometimes an oblique line, so there are many decimal points on the calculated line. For example, the horizontal coordinates of two adjacent points may be 14.4 and 16.0, but when displayed or rendered on a large screen, there are only integer points. Rounding will become 14, 16. In this way, the point with a horizontal coordinate of 15 will be missing when displayed on the large screen. The occurrence of breakpoints will affect the viewing effect of customers. On this basis, the solution was optimized, and the direction marks before and after adjustment were simultaneously drawn and displayed using a three-strand cross method. The test results show that the breakpoint operation can be significantly eliminated.
[0130] Alternatively, see Fig.14 , the starting point and the end point of the trip wire direction mark are offset by one pixel to the left and right, and the three lines are formed. The pixels are offset on the basis of the original trip wire direction mark to make the direction mark look as thick as possible. For example, the starting points of the three direction marks before and after the adjustment of the trip wire are X, X-1, X+1, and the coordinates of the end point of the trip wire are flipped to X, X+1, X-1 respectively. This crossover method simply and effectively eliminates the generation of breakpoints and optimizes the connection points of the trip wire. Because no matter how the rounding is done, the two adjacent lines will become complementary lines to make up for the missing points.
[0131] According to the cross-screen tripwire drawing method provided in the embodiment of the present invention, compared with the tripwire distribution judgment performed through equation calculation involving complex multiplication and division operations, the calculation complexity of the tripwire distribution judgment can be simplified through coded logical operations, the speed of identifying whether the tripwires intersect can be accelerated, and the tripwires can be quickly drawn in multiple areas, so that the cross-screen tripwire drawing can be quickly and clearly seen on the large screen connected to the splicing control device, which also lays the foundation for the future cross-regional calculation of tripwires. By expanding the area, users can use one tripwire to divide multiple areas at the same time.
[0132] Fig.15 is a structural diagram of a cross-screen tripwire drawing device provided in an embodiment of the present invention. The technical solution of this embodiment can be applied to the case where tripwires are displayed across multiple screens. The method can be executed by a cross-screen tripwire drawing device, which can be implemented by software and / or hardware and can be integrated into an electronic device with a network communication function. Fig.15 As shown, the cross-screen tripwire drawing device in the embodiment of the present invention may include the following: a segmentation determination module 1510, a segmentation configuration module 1520, a logic operation module 1530 and a tripwire drawing module 1540. Among them:
[0133] The segmentation determination module 1510 is used to segment the picture window area displayed on the display wall and determine the segmentation area in each display split screen of the display wall; the display wall includes a plurality of display split screens arranged in an array.
[0134] The segmentation configuration module 1520 is used to set the segmentation area to a central grid and divide the display wall area into a nine-square grid; the coding of the central grid is a binary represented by a preset value, and the coding of other grids is determined by adjusting the binary represented by the preset value based on the offset orientation of the other grids relative to the central grid, and the preset value is an integer 0.
[0135] The logic operation module 1530 is used to perform logic OR and logic AND operations on the codes of the grids where the two end points of the tripwire are located in the picture window area.
[0136] The tripwire drawing module 1540 is used to control the drawing of the tripwire located in the split area in the display split screen where the split area is located according to the operation results of the logical OR and the logical AND, so as to display the tripwire across the screen.
[0137] Based on the above embodiment, optionally, the encoding of the central grid is a preset binary number, and the encoding of other grids is determined by bitwise inversion of the preset binary number based on the binary bits corresponding to the offset orientations of the other grids relative to the central grid, and the preset binary number is a four-bit binary number represented by a preset value.
[0138] Based on the above embodiment, optionally, the segmentation determination module 1510 includes:
[0139] Determine the display split screen occupied by the picture window area when it is displayed on the display wall;
[0140] The horizontal and vertical coordinates of the picture window area are compared with those of each occupied display split screen, and the position information of the split area belonging to each display split screen is determined based on the comparison result.
[0141] Based on the above embodiment, optionally, the logic operation module 1530 includes:
[0142] Determine the endpoint position information of the two end points of the trip wire in the picture window area when displayed on the display wall;
[0143] Determine the grids where the two end points of the trip wire are located based on the endpoint position information of the two end points of the trip wire and the nine-square grid layout of the display wall area divided based on the segmented area as the central grid;
[0144] The codes configured in the grid where the two end points of the tripwire are located are assigned to the two end points of the tripwire, and the grid codes of the two end points are subjected to logical OR operation and logical AND operation.
[0145] Based on the above embodiment, optionally, the tripwire drawing module 1540 includes:
[0146] According to the operation results of logical OR and logical AND, determining the occupation status of the trip wire in the picture window area in the multiple display split screens of the display wall;
[0147] According to the occupation of the trip wire in the display split screen of the display wall, the trip wire located in the split area is controlled to be drawn in the display split screen where the split area is located.
[0148] On the basis of the above embodiment, optionally, determining the occupation of the tripwire in the picture window area in the multiple display split screens of the display wall according to the operation results of the logical OR and the logical AND includes:
[0149] If the result of the logical OR operation between the grid codes corresponding to the two endpoints of the tripwire is 0, it is determined that the tripwire is completely located in the segmented area corresponding to the center grid in the screen window area;
[0150] If the result of the logical AND operation between the grid codes corresponding to the two end points of the tripwire is not 0, it is determined that the tripwire in the picture window area is completely outside the segmentation area corresponding to the center grid;
[0151] If the result of the logical AND operation between the grid codes corresponding to the two endpoints of the tripwire is 0 and the result of the logical OR operation is not 0, it is determined that the part of the tripwire in the picture window area is located in the segmentation area corresponding to the central grid and intersects with the grid boundary line of the segmentation area, or the tripwire in the picture window area is completely outside the segmentation area corresponding to the central grid and intersects with the extension line of the boundary line of the segmentation area.
[0152] On the basis of the above embodiment, optionally, according to the occupation of the trip wire in the display split screen of the display wall, controlling to draw the trip wire located in the split area in the display split screen where the split area is located includes:
[0153] When the trip wire is completely located in the segmented area corresponding to the central grid, the horizontal and vertical coordinates indicated by the endpoint position information when the two end points of the trip wire are displayed on the display wall are used to control the complete trip wire to be drawn in the display split screen where the segmented area is located;
[0154] When the tripwire is completely outside the split area corresponding to the center grid, it is prohibited to draw the tripwire in the display split screen where the split area is located.
[0155] On the basis of the above embodiment, optionally, according to the occupation of the trip wire in the display split screen of the display wall, controlling to draw the trip wire located in the split area in the display split screen where the split area is located includes:
[0156] When the occupancy of the tripwire is not accurately determined, the grid edge line intersecting with the tripwire is determined from the grid edge line of the central grid where the segmented area is located according to the grid codes corresponding to the two end points of the tripwire; the grid edge line includes the grid boundary line or the extension line of the grid boundary;
[0157] According to the horizontal and vertical coordinates indicated by the endpoint position information when the two end points of the tripwire are displayed on the display wall respectively and the horizontal coordinate or vertical coordinate of the grid edge line intersecting with the tripwire, the coordinates of the intersection point on the grid edge line intersecting with the tripwire are determined by using the principle of similar triangles;
[0158] Based on the horizontal and vertical coordinates indicated by the endpoint position information when the two end points of the tripwire are displayed on the display wall and the obtained intersection coordinates, the tripwire located in the split area is controlled to be outlined in the display split screen where the split area is located.
[0159] Based on the above embodiment, optionally, after controlling to draw a trip wire located in the split area in the display split screen where the split area is located, the method further includes:
[0160] Determine the horizontal and vertical coordinates of the midpoint between the two end points of the trip wire according to the end point position information when the two end points of the trip wire are displayed on the display wall respectively;
[0161] According to the horizontal and vertical coordinates of the midpoint between the two end points of the trip wire and the horizontal and vertical coordinates of one end point of the trip wire, the horizontal and vertical coordinates of the reference point on the perpendicular bisector passing through the midpoint between the two end points of the trip wire are determined by coordinate difference calculation;
[0162] According to the horizontal and vertical coordinates of the midpoint between the two end points of the tripwire and the horizontal and vertical coordinates of the reference point, a direction mark for indicating the direction of the tripwire is added to the tripwire in the picture window area; wherein the direction mark includes an arrow body line segment and an arrow direction line segment.
[0163] On the basis of the above embodiment, optionally, according to the horizontal and vertical coordinates of the midpoint between the two end points of the tripwire and the horizontal and vertical coordinates of one end point of the tripwire, the horizontal and vertical coordinates of the reference point on the perpendicular bisector passing through the midpoint between the two end points of the tripwire are determined by coordinate difference calculation, including:
[0164] Determine the difference in abscissa and ordinate between the midpoint between the two end points of the tripwire and one end point of the tripwire;
[0165] Subtract the ordinate difference from the abscissa value of the midpoint between the two end points of the tripwire and subtract the abscissa difference from the ordinate value of the midpoint between the two end points of the tripwire to obtain the abscissa and ordinate coordinates of the reference point on the perpendicular bisector of the midpoint between the two end points of the tripwire.
[0166] Based on the above embodiment, optionally, adding a direction mark for indicating the direction of the tripwire on the tripwire in the picture window area includes:
[0167] The angle of the direction mark used to indicate the direction of the tripwire is adjusted so that the three wires are crossed to simultaneously display the direction mark before and after the adjustment.
[0168] The cross-screen tripwire drawing device provided in the embodiment of the present invention can execute the cross-screen tripwire drawing method provided in any embodiment of the present invention mentioned above, and has the corresponding functions and beneficial effects of executing the cross-screen tripwire drawing method. For detailed process, please refer to the relevant operations of the cross-screen tripwire drawing method in the above embodiment.
[0169] Fig.16 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Fig.16 The electronic device provided in the embodiment of the present invention includes: one or more processors 1610 and a storage device 1620; the processor 1610 in the electronic device may be one or more, Fig.16 A processor 1610 is taken as an example; the storage device 1620 is used to store one or more programs; the one or more programs are executed by the one or more processors 1610, so that the one or more processors 1610 implement the cross-screen tripwire drawing method as described in any one of the embodiments of the present invention.
[0170] The electronic device may further include: an input device 1630 and an output device 1640 .
[0171] The processor 1610, storage device 1620, input device 1630 and output device 1640 in the electronic device may be connected via a bus or other means. Fig.16 The example of connecting through bus is taken in the following.
[0172] The storage device 1620 in the electronic device is a computer-readable storage medium that can be used to store one or more programs, which can be software programs, computer executable programs, and modules, such as program instructions / modules corresponding to the cross-screen tripwire drawing method provided in the embodiment of the present invention. The processor 1610 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the storage device 1620, that is, the cross-screen tripwire drawing method in the above method embodiment is implemented.
[0173] The storage device 1620 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the storage device 1620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 1620 may further include a memory remotely arranged relative to the processor 1610, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0174] The input device 1630 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 1640 may include a display device such as a display screen.
[0175] Furthermore, when one or more programs included in the electronic device are executed by the one or more processors 1610, the program performs the following operations:
[0176] The image window area displayed on the display wall is divided to determine the divided area in each display split screen of the display wall; the display wall includes a plurality of display split screens arranged in an array;
[0177] The segmented area is set as a central grid and the display wall area is divided into a nine-grid grid; the coding of the central grid is a binary represented by a preset value, and the coding of other grids is determined by adjusting the binary represented by the preset value based on the offset orientation of other grids relative to the central grid, and the preset value is an integer 0;
[0178] Perform logical OR and logical AND operations on the codes of the grids where the two end points of the tripwire are located in the screen window area;
[0179] According to the operation results of the logical OR and the logical AND, the trip wire located in the split area is controlled to be outlined in the display split screen where the split area is located, so as to display the trip wire across the screen.
[0180] Of course, those skilled in the art will appreciate that when one or more programs included in the electronic device are executed by the one or more processors 1610, the programs may also perform related operations in the cross-screen tripwire drawing method provided in any embodiment of the present invention.
[0181] In an embodiment of the present invention, a computer readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the program is used to execute a cross-screen tripwire drawing method, the method comprising:
[0182] The image window area displayed on the display wall is divided to determine the divided area in each display split screen of the display wall; the display wall includes a plurality of display split screens arranged in an array;
[0183] The segmented area is set as a central grid and the display wall area is divided into a nine-grid grid; the coding of the central grid is a binary represented by a preset value, and the coding of other grids is determined by adjusting the binary represented by the preset value based on the offset orientation of other grids relative to the central grid, and the preset value is an integer 0;
[0184] Perform logical OR and logical AND operations on the codes of the grids where the two end points of the tripwire are located in the screen window area;
[0185] According to the operation results of the logical OR and the logical AND, the trip wire located in the split area is controlled to be outlined in the display split screen where the split area is located, so as to display the trip wire across the screen.
[0186] Optionally, when the program is executed by a processor, it can also be used to execute the cross-screen tripwire drawing method provided in any embodiment of the present invention.
[0187] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.
[0188] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to: electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0189] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.
[0190] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0191] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0192] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for drawing a cross-screen tripwire, characterized in that: The method comprises: The image window area displayed on the display wall is divided to determine the divided area in each display split screen of the display wall; the display wall includes a plurality of display split screens arranged in an array; The segmented area is set as a central grid and the display wall area is divided into a nine-grid grid; the coding of the central grid is a binary represented by a preset value, and the coding of other grids is determined by adjusting the binary represented by the preset value based on the offset orientation of other grids relative to the central grid, and the preset value is an integer 0; Perform logical OR and logical AND operations on the codes of the grids where the two end points of the tripwire are located in the screen window area; According to the operation results of the logical OR and the logical AND, the trip wire located in the split area is controlled to be outlined in the display split screen where the split area is located, so as to display the trip wire across the screen.
2. The method according to claim 1, characterized in that The coding of the central grid is a preset binary number, and the coding of other grids is determined by bitwise inversion of the preset binary number based on the binary bits corresponding to the offset orientations of other grids relative to the central grid. The preset binary number is a four-bit binary represented by a preset value.
3. The method according to claim 1 or 2, characterized in that: Perform logical OR and logical AND operations on the codes of the grids where the two end points of the tripwire are located in the screen window area, including: Determine the endpoint position information of the two end points of the trip wire in the picture window area when displayed on the display wall; Determine the grids where the two end points of the trip wire are located based on the endpoint position information of the two end points of the trip wire and the nine-square grid layout of the display wall area divided based on the segmented area as the central grid; The codes configured in the grid where the two end points of the tripwire are located are assigned to the two end points of the tripwire, and the grid codes of the two end points are subjected to logical OR operation and logical AND operation.
4. The method according to claim 1 or 2, characterized in that: According to the operation results of the logical OR and the logical AND, the trip wire located in the split area is controlled to be drawn in the display split screen where the split area is located, including: According to the operation results of logical OR and logical AND, the occupation status of the trip wire in the picture window area in the multiple display split screens of the display wall is determined; According to the occupation of the trip wire in the display split screen of the display wall, the trip wire located in the split area is controlled to be drawn in the display split screen where the split area is located.
5. The method according to claim 4, characterized in that Based on the results of the logical OR and logical AND operations, the occupation of the trip wires in the picture window area in the multiple display split screens of the display wall is determined, including: If the result of the logical OR operation between the grid codes corresponding to the two endpoints of the tripwire is 0, it is determined that the tripwire is completely located in the segmented area corresponding to the center grid in the screen window area; If the result of the logical AND operation between the grid codes corresponding to the two end points of the tripwire is not 0, it is determined that the tripwire in the picture window area is completely outside the segmentation area corresponding to the center grid; If the result of the logical AND operation between the grid codes corresponding to the two endpoints of the tripwire is 0 and the result of the logical OR operation is not 0, it is determined that the part of the tripwire in the picture window area is located in the segmentation area corresponding to the central grid and intersects with the grid boundary line of the segmentation area, or the tripwire in the picture window area is completely outside the segmentation area corresponding to the central grid and intersects with the extension line of the boundary line of the segmentation area.
6. The method according to claim 5, characterized in that According to the occupation of the trip wire in the display split screen of the display wall, the trip wire located in the split area is controlled to be drawn in the display split screen where the split area is located, including: When the trip wire is completely located in the segmented area corresponding to the central grid, the horizontal and vertical coordinates indicated by the endpoint position information when the two end points of the trip wire are displayed on the display wall are used to control the complete trip wire to be drawn in the display split screen where the segmented area is located; If the tripwire is completely outside the split area corresponding to the center grid, it is prohibited to draw the tripwire in the display split screen where the split area is located; Alternatively, according to the occupation of the trip wire in the display split screen of the display wall, controlling the trip wire located in the split area to be drawn in the display split screen where the split area is located, further comprising: When the occupancy of the tripwire is not accurately determined, the grid edge line intersecting with the tripwire is determined from the grid edge line of the central grid where the segmented area is located according to the grid codes corresponding to the two end points of the tripwire; the grid edge line includes the grid boundary line or the extension line of the grid boundary; According to the horizontal and vertical coordinates indicated by the endpoint position information when the two end points of the tripwire are displayed on the display wall respectively and the horizontal coordinate or vertical coordinate of the grid edge line intersecting with the tripwire, the coordinates of the intersection point on the grid edge line intersecting with the tripwire are determined by using the principle of similar triangles; Based on the horizontal and vertical coordinates indicated by the endpoint position information when the two end points of the tripwire are displayed on the display wall and the obtained intersection coordinates, the tripwire located in the split area is controlled to be outlined in the display split screen where the split area is located.
7. The method according to claim 1, characterized in that After the control draws the trip wire located in the split area in the display split screen where the split area is located, it also includes: Determine the horizontal and vertical coordinates of the midpoint between the two end points of the trip wire according to the end point position information when the two end points of the trip wire are displayed on the display wall respectively; According to the horizontal and vertical coordinates of the midpoint between the two end points of the trip wire and the horizontal and vertical coordinates of one end point of the trip wire, the horizontal and vertical coordinates of the reference point on the perpendicular bisector passing through the midpoint between the two end points of the trip wire are determined by coordinate difference calculation; According to the horizontal and vertical coordinates of the midpoint between the two end points of the tripwire and the horizontal and vertical coordinates of the reference point, a direction mark for indicating the direction of the tripwire is added to the tripwire in the picture window area; wherein the direction mark includes an arrow body line segment and an arrow direction line segment.
8. A cross-screen tripwire drawing device, characterized in that: The device comprises: A segmentation determination module, used to segment the picture window area displayed on the display wall, and determine the segmentation area in each display split screen of the display wall; the display wall includes a plurality of display split screens arranged in an array; A segmentation configuration module, used to set the segmentation area to a central grid and divide the display wall area into a nine-square grid; the code of the central grid is a binary represented by a preset value, and the codes of other grids are determined by adjusting the binary represented by the preset value based on the offset orientation of other grids relative to the central grid, and the preset value is an integer 0; A logic operation module, used for performing logic OR and logic AND operations on the codes of the grids where the two end points of the trip wire are located in the screen window area; The tripwire drawing module is used to control the drawing of the tripwire located in the split area in the display split screen where the split area is located according to the operation results of logic OR and logic AND, so as to display the tripwire across the screen.
9. An electronic device, characterized in that: include: one or more processing devices; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the cross-screen tripwire drawing method described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the cross-screen tripwire drawing method described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Important cargo transportation vehicle monitoring and prewarning system based on video tripwire rule
CN103544806A
A trip line drawing method and device
CN109448051A