CN115243191A - Position determination method and device of monitoring equipment, terminal and storage medium - Google Patents

Position determination method and device of monitoring equipment, terminal and storage medium Download PDF

Info

Publication number
CN115243191A
CN115243191A CN202210495404.7A CN202210495404A CN115243191A CN 115243191 A CN115243191 A CN 115243191A CN 202210495404 A CN202210495404 A CN 202210495404A CN 115243191 A CN115243191 A CN 115243191A
Authority
CN
China
Prior art keywords
monitoring device
line segment
determining
end point
preset area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210495404.7A
Other languages
Chinese (zh)
Inventor
张友
陈刚
陈立力
周明伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202210495404.7A priority Critical patent/CN115243191A/en
Publication of CN115243191A publication Critical patent/CN115243191A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method, a device, a terminal and a storage medium for determining the position of monitoring equipment, wherein the method for determining the position of the monitoring equipment comprises the following steps: acquiring position information of monitoring equipment and boundary information of a preset area; in response to that the monitoring equipment is not located in the preset area, determining the shortest distance between the monitoring equipment and the preset area based on the position information of the monitoring equipment and the boundary information of the preset area; and determining that the monitoring equipment is in the preset area in response to the fact that the shortest distance between the monitoring equipment and the preset area is smaller than the preset distance, so that the monitoring data acquired by the monitoring equipment is associated with the preset area. The monitoring device is judged to be in the preset area by the monitoring device, the shortest distance between the monitoring device and the preset area is smaller than the preset distance, the fault tolerance rate is determined whether the monitoring device with the position information deviation is located in the preset area, and the problem that the position determination of the monitoring device is inaccurate due to inaccurate position information of the monitoring device is solved.

Description

Position determination method and device of monitoring equipment, terminal and storage medium
Technical Field
The present invention relates to the field of location detection technologies, and in particular, to a method and an apparatus for determining a location of a monitoring device, a terminal, and a computer-readable storage medium.
Background
With the continuous development of the internet of things technology, the artificial intelligence technology and the big data technology, the intelligent monitoring equipment is more and more focused and widely applied in the specific field. The system comprises portrait capturing and vehicle capturing equipment with an intelligent analysis function and equipment for acquiring MAC information of terminal equipment. They not only liberate a lot of manpower, but also make trajectory tracking more efficient. The devices are provided by intelligent device manufacturers and maintained by corresponding units, and collected data are accessed into a supervision network by a video private network. Detecting whether a device is inside or outside a certain regulatory region is a very important task, which can provide very wide applications.
Disclosure of Invention
The invention mainly solves the technical problem of providing a method, a device, a terminal and a storage medium for determining the position of monitoring equipment, and solves the problem of low fault tolerance rate of a detection result of the position relation between a video monitoring point and a supervision area with inaccurate position in the prior art.
In order to solve the technical problems, the first technical scheme adopted by the invention is as follows: a method for determining the position of a monitoring device is provided, which comprises the following steps: acquiring position information of monitoring equipment and boundary information of a preset area; in response to that the monitoring equipment is not located in the preset area, determining the shortest distance between the monitoring equipment and the preset area based on the position information of the monitoring equipment and the boundary information of the preset area; and determining that the monitoring equipment is in the preset area in response to that the shortest distance between the monitoring equipment and the preset area is smaller than the preset distance so as to associate the monitoring data acquired by the monitoring equipment with the preset area.
The position determining method further comprises the following steps: and determining whether the monitoring equipment is in the preset area or not based on the position information of the monitoring equipment and the boundary information of the preset area.
The position information of the monitoring equipment comprises longitude data and latitude data; the boundary information of the preset area comprises longitude data and latitude data which respectively correspond to boundary points forming the preset area; determining whether the monitoring device is located in a preset area based on the position information of the monitoring device and the boundary information of the preset area, including: determining coordinate points of the monitoring equipment according to the longitude data and the latitude data of the monitoring equipment, and determining the coordinate points of the boundary points according to the longitude data and the latitude data of the boundary points; forming a line segment by connecting two adjacent boundary points, wherein two end points of the line segment are respectively coordinate points of the two boundary points; all the line segments are sequentially connected to form a polygon describing the preset area; taking a coordinate point of the monitoring equipment as a starting point to make a straight line to form a ray, and counting to obtain the number of intersection points of the ray and the polygon; and determining whether the monitoring equipment is positioned in the preset area or not based on the number of the intersection points of the ray and the polygon.
Wherein, based on the positional information of the monitoring device and the boundary information of the preset area, determine whether the monitoring device is in the preset area, further comprising: and determining that the monitoring equipment is positioned in the preset area in response to the coincidence of the coordinate point of the monitoring equipment and the end point of any line segment forming the polygon.
Wherein, the line segment is a left-open and right-closed line segment; the left end point of the left opening and right closing line segment is a hollow point, and the right end point of the left opening and right closing line segment is a solid point; all line segments are connected in sequence to form a polygon describing the preset area, and the polygon comprises: all the left opening and right closing line segments are sequentially connected to form a polygon for describing a preset area; wherein one end point in the polygon is contained in only one line segment.
Wherein, the direction of ray is for the level left or the level right, and the statistics obtains the nodical quantity of ray and polygon, includes: and determining whether the ray has an intersection point with each line segment forming the polygon based on the position relation between the coordinate point of the monitoring device and each line segment forming the polygon.
The coordinate point of the monitoring equipment is (X, Y), and the coordinate of the right end point of the line segment is (X) 1 , Y 1 ) The coordinate of the left end point is (X) 2 ,Y 2 ) (ii) a Between the coordinate points based on the monitoring device and the line segments forming the polygonDetermining whether the ray has an intersection with each line segment forming the polygon, comprising: in response to Y ≧ Y 1 And Y > Y 2 Then it is determined that the ray does not intersect the line segment.
Wherein, the coordinate point of the monitoring equipment is (X, Y), and the coordinate of the right end point of the line segment is (X) 1 , Y 1 ) The coordinate of the left end point is (X) 2 ,Y 2 ) (ii) a Determining whether the ray has an intersection with each line segment forming the polygon based on a positional relationship between the coordinate points of the monitoring device and each line segment forming the polygon, comprising: in response to Y ≦ Y 1 And Y is less than Y 2 And determining that the ray does not intersect with the line segment.
The coordinate point of the monitoring equipment is (X, Y), and the coordinate of the right end point of the line segment is (X) 1 , Y 1 ) The coordinate of the left end point is (X) 2 ,Y 2 ) (ii) a Determining whether the ray has an intersection with each line segment forming the polygon based on a positional relationship between the coordinate points of the monitoring device and each line segment forming the polygon, comprising: when the direction of the ray is horizontal to the right, responding to X ≧ X 1 And X > X 2 Determining that the ray and the line segment have no intersection point; or; when the direction of the ray is horizontal to the left, X is responded to 1 And X < X 2 And determining that the ray does not intersect with the line segment.
Wherein, the coordinate point of the monitoring equipment is (X, Y), and the coordinate of the right end point of the line segment is (X) 1 , Y 1 ) The coordinate of the left end point is (X) 2 ,Y 2 ) (ii) a The end point adjacent to the right end point of the line segment and far away from the left end point of the line segment is a first adjacent end point, and the end point adjacent to the left end point of the line segment and far away from the right end point of the line segment is a second adjacent end point; determining whether the ray has an intersection with each line segment forming the polygon based on a positional relationship between the coordinate points of the monitoring device and each line segment forming the polygon, comprising: in response to X < X when the direction of the ray is horizontal to the right 1 And X < X 2 Determining whether the ray is coincident with the line segment; or; when the direction of the ray is horizontal to the left, in response to X > X 1 And X > X 2 Determining whether the ray is coincident with the line segment; in response to the ray coinciding with the line segment, thenThe position relation between the first adjacent end point and the second adjacent end point corresponding to the routing section and the ray; determining that the ray and the line segment have intersection points in response to the first adjacent end point and the second adjacent end point being located on two sides of the ray respectively; wherein, based on the position relation between the coordinate point of the monitoring equipment and each line segment forming the polygon, determining whether the ray has an intersection point with each line segment forming the polygon, comprises: in response to the first and second abutting end points both being on the same side of the ray, then it is determined that the ray does not intersect the coincident line segment.
Wherein, based on the position relationship between the coordinate points of the monitoring device and the line segments forming the polygon, determining whether the ray has an intersection point with the line segments forming the polygon, comprises: in response to the fact that the ray is not parallel to the line segment and the ray intersects with one end point of the line segment, determining the position relation between the ray and an end point which is not intersected with the line segment and an adjacent end point of one side, far away from the non-intersected end point, of the intersected end point; and determining that the ray and the line segment have intersection points in response to the non-intersected end points and the adjacent end points being located on two sides of the ray respectively.
Wherein, based on the position relationship between the coordinate points of the monitoring device and the line segments forming the polygon, determining whether the ray has an intersection point with the line segments forming the polygon, comprises: in response to the non-intersected end point and the adjacent end point both being on the same side of the ray, it is determined that the ray does not intersect the line segment.
Wherein, based on the positional information of the monitoring device and the boundary information of the preset area, determining whether the monitoring device is in the preset area includes: and in response to the number of the intersection points of the ray and the polygon being an even number, determining that the monitoring equipment is positioned outside the preset area described by the polygon.
Wherein, based on the position information of the monitoring device and the boundary information of the preset area, determining whether the monitoring device is in the preset area, includes: and in response to the number of the intersection points of the ray and the polygon being an odd number, determining that the monitoring device is positioned inside the preset area described by the polygon.
Wherein, based on the position information of the monitoring device and the boundary information of the preset area, determining the shortest distance between the monitoring device and the preset area, comprises: determining the shortest distance between each line segment and the monitoring equipment based on the coordinate point of the monitoring equipment and the left end point and the right end point which respectively correspond to all line segments included in the polygon describing the preset area; and selecting the shortest distance with the minimum numerical value to determine the shortest distance between the monitoring equipment and the preset area.
Wherein, the coordinate point of the monitoring equipment is (X, Y), and the coordinate of the left end point of the line segment is (X) a , Y a ) The coordinate of the right end point is (X) b ,Y b ) Determining the shortest distance between each line segment and the monitoring equipment based on the left end point and the right end point which are respectively corresponding to all line segments included by the coordinate point of the monitoring equipment and the polygon describing the preset area, wherein the method comprises the following steps: judging whether an included angle between a straight line between a coordinate point of the monitoring equipment and a left end point of the line segment and the line segment is an obtuse angle; in response to (X) b -X a )×(X-X a ) +(Y b -Y a )×(Y-Y a )<When 0, determining that an included angle between a straight line between a coordinate point of the monitoring equipment and a left end point of the line segment and the line segment is an obtuse angle; and determining a connecting line between the coordinate point of the monitoring equipment and the left end point of the line segment as a shortest connecting line.
Wherein, based on the coordinate point of supervisory equipment and the left end point and the right end point that all line segments that the polygon that describes the predetermined area included correspond respectively, confirm the shortest distance between each line segment and supervisory equipment, include: in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a ) If the angle is more than 0, judging whether an included angle between a straight line between a coordinate point of the monitoring equipment and a right end point of the line segment and the line segment is an obtuse angle; in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a )>(X b -X a ) ×(X b -X a )+(Y b -Y a )×(Y b -Y a ) Determining that an included angle between a straight line between a coordinate point of the monitoring equipment and a right end point of the line segment and the line segment is an obtuse angle; and determining a connecting line between the coordinate point of the monitoring equipment and the right end point of the line segment as a shortest connecting line.
Wherein, based on the coordinate point of supervisory equipment and the left end point and the right end point that all line segments that the polygon that describes the predetermined area included correspond respectively, confirm the shortest distance between each line segment and supervisory equipment, include: determining a projection point of the coordinate point of the monitoring equipment projected on the line segment in response to the fact that the included angle between the straight line between the coordinate point of the monitoring equipment and the left end point of the line segment and the included angle between the straight line between the coordinate point of the monitoring equipment and the right end point of the line segment and the line segment are all non-obtuse angles; the straight line between the coordinate point and the projection point of the monitoring equipment is vertical to the line segment; and determining a connecting line between the coordinate point of the monitoring equipment and the projection point as a shortest connecting line.
Wherein the coordinate of the projection point is (X) * ,Y * ) Determining a projection point of a coordinate point of the monitoring device projected on the line segment, including: calculating to obtain the coordinates of the projection points based on the formula 1 and the formula 2;
X * =X a +(X b -X a ) Xr (equation 1)
Y * =Y a +(Y b -Y a ) Xr (equation 2)
In the formula: and the coordinates of the projection points are X and Y, and r is an angle coefficient.
Wherein, confirm the projection point of the coordinate point projection on the line segment of supervisory equipment, still include: calculating to obtain an angle coefficient r in formula 1 and formula 2 based on formula 3;
Figure RE-GDA0003833221610000051
wherein, confirm the shortest distance between each line segment and the supervisory equipment, include: calculating to obtain the shortest distance between the monitoring equipment and the line segment based on a formula 4;
D min =6371000 × acos θ (equation 4)
Wherein, confirm the shortest distance between each line segment and the supervisory equipment, still include: calculating theta in formula 4 based on formula 5;
Figure RE-GDA0003833221610000052
in the formula: x and Y are coordinates of one end point of the shortest connecting line, namely coordinates of a coordinate point of the monitoring equipment; x 'and Y' are coordinates of the other end point of the shortest connecting line.
Wherein, confirm the shortest distance between each line segment and the supervisory equipment, include: calculating to obtain the shortest distance between the monitoring equipment and the line segment based on a formula 6;
D min =2 × 6371000 × asin β (equation 6)
Wherein, confirm the shortest distance between each line segment and the supervisory equipment, still include: calculating beta in formula 6 based on formula 7;
Figure RE-GDA0003833221610000053
in the formula: x and Y are coordinates of one end point of the shortest connecting line, namely coordinates of a coordinate point of the monitoring equipment; x 'and Y' are coordinates of the other end point of the shortest connecting line.
In order to solve the above technical problems, the second technical solution adopted by the present invention is: there is provided a position determining apparatus of a monitoring device, the position determining apparatus of the monitoring device including: the acquisition module is used for acquiring the position information of the monitoring equipment and acquiring the boundary information of a preset area; the analysis module is used for determining the shortest distance between the monitoring equipment and the preset area based on the position information of the monitoring equipment and the boundary information of the preset area in response to the fact that the monitoring equipment is not located in the preset area; the determining module is used for determining that the monitoring equipment is located in the preset area in response to the fact that the shortest distance between the monitoring equipment and the preset area is smaller than the preset distance, so that the monitoring data acquired by the monitoring equipment is associated with the preset area.
In order to solve the above technical problems, the third technical solution adopted by the present invention is: there is provided a terminal comprising a memory, a processor and a computer program stored in the memory and running on the processor, the processor being configured to execute the sequence data to implement the steps in the method of determining a position of a monitoring device as described above.
In order to solve the technical problems, the fourth technical scheme adopted by the invention is as follows: there is provided a computer readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method of position determination of a monitoring device.
The invention has the beneficial effects that: different from the prior art, the method, the device, the terminal and the storage medium for determining the position of the monitoring device are provided, and the method for determining the position of the monitoring device comprises the following steps: acquiring position information of monitoring equipment and boundary information of a preset area; in response to that the monitoring equipment is not located in the preset area, determining the shortest distance between the monitoring equipment and the preset area based on the position information of the monitoring equipment and the boundary information of the preset area; and determining that the monitoring equipment is in the preset area in response to that the shortest distance between the monitoring equipment and the preset area is smaller than the preset distance so as to associate the monitoring data acquired by the monitoring equipment with the preset area. According to the method, the monitoring equipment which is not in the preset area and the preset area is determined to be in the preset area, and the monitoring equipment of which the shortest distance between the monitoring equipment and the preset area is smaller than the preset distance is determined to be in the preset area.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method for determining a location of a monitoring device according to the present invention;
fig. 2 is a schematic flowchart of a method for determining a position of a monitoring device according to an embodiment of the present invention;
fig. 3 (a) to 3 (h) are schematic diagrams illustrating different position relationships between the ray corresponding to the monitoring device and the preset area according to the present invention;
fig. 4 is a schematic flowchart of an embodiment of step S208 in the method for determining the location of the monitoring device provided in fig. 2;
fig. 5 is a schematic flowchart of a specific embodiment of step S209 in the method for determining the location of the monitoring device provided in fig. 2;
6 (a) to 6 (c) are schematic diagrams of different positional relationships between the monitoring device and a line segment provided by the present invention;
FIG. 7 is a schematic block diagram of an embodiment of an image quality evaluation apparatus provided by the present invention;
FIG. 8 is a schematic block diagram of another embodiment of an image quality evaluation apparatus provided by the present invention;
FIG. 9 is a schematic block diagram of one embodiment of a terminal provided by the present invention;
FIG. 10 is a schematic block diagram of one embodiment of a computer-readable storage medium provided by the present invention.
Detailed Description
The following describes in detail the embodiments of the present application with reference to the drawings attached hereto.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present application.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship. Further, "plurality" herein means two or more than two.
In order to make those skilled in the art better understand the technical solution of the present invention, the following describes a method for determining a position of a monitoring device in detail with reference to the accompanying drawings and the detailed description.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for determining a position of a monitoring device according to the present invention. The embodiment provides a method for determining the position of a monitoring device, which includes the following steps.
S11: the method comprises the steps of obtaining position information of the monitoring equipment and obtaining boundary information of a preset area.
Specifically, the location information of each monitoring device is acquired from one of an operator, a supervision unit, and a device operation unit. Operators, supervision units and equipment operation units can automatically maintain the monitoring equipment and mark the position information of the monitoring equipment. The geographical coordinates of the monitoring equipment can be rapidly acquired by marking the position information of the monitoring equipment. The operator, the supervision unit and the equipment operation unit upload the acquired position information of the monitoring equipment to the resource library. And the position information of the monitoring equipment is associated with the equipment name or the identity code of the monitoring equipment. That is, the location information of the corresponding monitoring device may be obtained according to the identity code or device name of the device. The monitoring equipment can be image acquisition equipment or video acquisition equipment. The position information of the monitoring equipment comprises earth longitude information and earth latitude information.
Specifically, boundary information of a preset area is acquired. The boundary information includes position information of a series of ordered boundary points constituting the preset area. The boundary of the preset area can be restored through the boundary points which are connected in sequence. The position information of the boundary point includes earth longitude information and earth latitude information of the boundary point. In other embodiments, the boundary information of the preset area may also be obtained by other manners, which is not limited herein. In this embodiment, the preset area is a target supervision area.
In one embodiment, whether the monitoring device is located in the preset area is determined based on the position information of the monitoring device and the boundary information of the preset area.
In a particular embodiment, the location information of the monitoring device includes longitude data and latitude data; the boundary information of the preset area comprises longitude data and latitude data which respectively correspond to boundary points forming the preset area; determining a coordinate point of the monitoring equipment according to the longitude data and the latitude data of the monitoring equipment, and determining the coordinate point of the boundary point according to the longitude data and the latitude data of the boundary point; forming a line segment by connecting two adjacent boundary points, wherein two end points of the line segment are respectively coordinate points of the two boundary points; all the line segments are sequentially connected to form a polygon describing the preset area; taking a coordinate point of the monitoring equipment as a starting point to form a straight line to form a ray, and counting to obtain the number of intersection points of the ray and the polygon; and determining whether the monitoring equipment is positioned in the preset area or not based on the number of the intersection points of the ray and the polygon.
Specifically, the line segment is a left-open and right-closed type line segment; the left end point of the left opening and right closing line segment is a hollow point, and the right end point of the left opening and right closing line segment is a solid point; all the left opening and right closing line segments are sequentially connected to form a polygon for describing a preset area; wherein one end point in the polygon is contained in only one line segment.
Specifically, the direction of the ray is horizontally left or horizontally right, and it is determined whether the ray has an intersection with each line segment forming the polygon based on the positional relationship between the coordinate points of the monitoring device and each line segment forming the polygon.
The coordinate point of the monitoring device is (X, Y), and the coordinate of the right end point of the line segment is (X) 1 ,Y 1 ) The coordinate of the left end point is (X) 2 ,Y 2 )。
In one embodiment, in response to Y ≧ Y 1 And Y > Y 2 Then it is determined that the ray does not intersect the line segment.
In one embodiment, in response to Y ≦ Y 1 And Y is less than Y 2 Then it is determined that the ray does not intersect the line segment.
In one embodiment, when the direction of the ray is horizontal to the right, in response to X ≧ X 1 And X > X 2 Then it is determined that the ray does not intersect the line segment.
In one embodiment, the endpoint adjacent to the right endpoint of the line segment and far away from the left endpoint of the line segment is the first adjacent endpoint, and the endpoint adjacent to the left endpoint of the line segment and far away from the right endpoint of the line segment is the first adjacent endpointA second adjacent end point. In another embodiment, when the direction of the ray is horizontal to the right, in response to X < X 1 And X < X 2 Determining whether the ray is coincident with the line segment; in response to the coincidence of the rays and the line segments, determining the position relation between the first adjacent end points and the second adjacent end points corresponding to the line segments and the rays; and determining that the ray and the line segment have intersection points in response to the first adjacent end point and the second adjacent end point being located on two sides of the ray respectively.
In one embodiment, when the direction of the ray is horizontal to the left, in response to X ≦ X 1 And X < X 2 And determining that the ray does not intersect with the line segment. When the direction of the ray is horizontal to the left, in response to X > X 1 And X > X 2 Determining whether the ray is coincident with the line segment; in response to the coincidence of the ray and the line segment, determining the position relation between a first adjacent end point and a second adjacent end point corresponding to the line segment and the ray; and determining that the ray and the line segment have intersection points in response to the first adjacent end point and the second adjacent end point being located on two sides of the ray respectively.
In one embodiment, in response to the first and second abutting end points both being on the same side of the ray, no intersection point of the ray with the coincident line segment is determined.
In one embodiment, in response to the ray being not parallel to the line segment and the ray intersecting an end point of the line segment, determining the position relationship between the ray and an end point of the line segment which is not intersected and an adjacent end point of the intersected end point which is far away from the side of the non-intersected end point; and determining that the ray and the line segment have intersection points in response to the non-intersected end points and the adjacent end points being located on two sides of the ray respectively.
In one embodiment, a ray is determined to have no intersection with a line segment in response to the non-intersected end point and the adjacent end point both being on the same side of the ray.
In one embodiment, in response to the number of intersections of the ray with the polygon being an even number, the monitoring device is determined to be outside the predetermined area described by the polygon. And in response to the number of the intersection points of the rays and the polygon being an odd number, determining that the monitoring device is positioned in the preset area described by the polygon.
S12: and in response to the fact that the monitoring equipment is not located in the preset area, determining the shortest distance between the monitoring equipment and the preset area based on the position information of the monitoring equipment and the boundary information of the preset area.
Specifically, the shortest distance between each line segment and the monitoring equipment is determined based on a coordinate point of the monitoring equipment and a left end point and a right end point which correspond to all line segments included in a polygon describing a preset area; and selecting the shortest distance with the minimum numerical value to determine the shortest distance between the monitoring equipment and the preset area.
In one embodiment, the coordinate point of the monitoring device is (X, Y), and the coordinate of the left end point of the line segment is (X) a ,Y a ) The coordinate of the right end point is (X) b ,Y b ) Judging whether an included angle between a straight line between a coordinate point of the monitoring equipment and a left end point of the line segment and the line segment is an obtuse angle; in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a )<When 0, determining that an included angle between a straight line between a coordinate point of the monitoring equipment and a left end point of the line segment and the line segment is an obtuse angle; and determining a connecting line between the coordinate point of the monitoring equipment and the left end point of the line segment as a shortest connecting line.
In another specific embodiment, in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a ) If the angle is more than 0, judging whether an included angle between a straight line between the coordinate point of the monitoring equipment and the right end point of the line segment and the line segment is an obtuse angle; in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a )> (X b -X a )×(X b -X a )+(Y b -Y a )×(Y b -Y a ) Determining that an included angle between a straight line between a coordinate point of the monitoring equipment and a right end point of the line segment and the line segment is an obtuse angle; and determining a connecting line between the coordinate point of the monitoring equipment and the right end point of the line segment as a shortest connecting line.
In another specific embodiment, in response to that an included angle between a straight line between a coordinate point of the monitoring device and a left end point of the line segment and an included angle between a straight line between the coordinate point of the monitoring device and a right end point of the line segment and the line segment are all non-obtuse angles, determining a projection point of the coordinate point of the monitoring device on the line segment; the straight line between the coordinate point and the projection point of the monitoring equipment is vertical to the line segment; and determining a connecting line between the coordinate point of the monitoring equipment and the projection point as a shortest connecting line.
Specifically, the coordinates of the projection point are (X) * ,Y * ) And calculating the coordinates of the projection points based on the formula 1 and the formula 2.
X * =X a +(X b -X a ) Xr (equation 1)
Y * =Y a +(Y b -Y a ) Xr (equation 2)
In the formula: x * ,Y * The coordinates of the projection points, r, are angular coefficients.
The angle coefficient r in formula 1 and formula 2 is calculated based on formula 3.
Figure RE-GDA0003833221610000111
In a specific embodiment, the shortest distance between the monitoring device and the line segment is calculated based on formula 4.
D min =6371000 × acos θ (equation 4)
Wherein θ in equation 4 is calculated based on equation 5.
Figure RE-GDA0003833221610000112
In the formula: x and Y are coordinates of one end point of the shortest connecting line, namely coordinates of a coordinate point of the monitoring equipment; x 'and Y' are coordinates of the other end point of the shortest connecting line.
In a specific embodiment, the shortest distance between the monitoring device and the line segment is calculated based on equation 6.
D min =2 × 6371000 × asin β (equation 6)
Wherein β in equation 6 is calculated based on equation 7.
Figure RE-GDA0003833221610000113
In the formula: x and Y are coordinates of one end point of the shortest connecting line, namely coordinates of a coordinate point of the monitoring equipment; x 'and Y' are coordinates of the other end point of the shortest connecting line.
S13: and determining that the monitoring equipment is in the preset area in response to the fact that the shortest distance between the monitoring equipment and the preset area is smaller than the preset distance, so that the monitoring data acquired by the monitoring equipment is associated with the preset area.
Specifically, when the shortest distance between the monitoring device and the preset area is smaller than the preset area, it is determined that the monitoring device is located in the preset area, and the monitoring data acquired by the monitoring device may be associated with the preset area. And when the shortest distance between the monitoring equipment and the preset area is greater than the preset area, judging that the monitoring equipment is positioned outside the preset area.
The method for determining the position of the monitoring device provided by the embodiment comprises the following steps: acquiring position information of monitoring equipment and boundary information of a preset area; in response to that the monitoring equipment is not located in the preset area, determining the shortest distance between the monitoring equipment and the preset area based on the position information of the monitoring equipment and the boundary information of the preset area; and determining that the monitoring equipment is in the preset area in response to the fact that the shortest distance between the monitoring equipment and the preset area is smaller than the preset distance, so that the monitoring data acquired by the monitoring equipment is associated with the preset area. In this embodiment, the monitoring device that is not located in the preset area and is located in the preset area is determined by determining the shortest distance between the monitoring device and the preset area, and the monitoring device that is located in the preset area and has the shortest distance between the monitoring device and the preset area that is smaller than the preset distance.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a method for determining a location of a monitoring device according to an embodiment of the present invention. The embodiment provides a method for determining the position of a monitoring device, which includes the following steps.
S201: and acquiring the position information of the monitoring equipment.
Specifically, the location information of the monitoring device includes longitude data and latitude data. The position information of each monitoring device is obtained from one unit of an operator, a district unit and a device operation unit. Operators, administrative districts and equipment operation units can automatically maintain the monitoring equipment and mark the position information of the monitoring equipment. The geographical coordinates of the monitoring equipment can be rapidly acquired by marking the position information of the monitoring equipment. The operator, the administrative district unit and the equipment operation unit upload the acquired position information of the monitoring equipment to the resource library. And the position information of the monitoring equipment is associated with the equipment name or national standard code of the monitoring equipment. That is, the location information of the corresponding monitoring device may be obtained according to the national standard code or the device name of the device. The monitoring equipment can be graph acquisition equipment or video acquisition equipment. The position information of the monitoring equipment comprises longitude information and latitude information.
S202: and determining the coordinate point of the monitoring equipment according to the longitude data and the latitude data of the monitoring equipment.
Specifically, longitude information and latitude information of the monitoring device are converted into XY coordinates, and the coordinate position of a coordinate point of the monitoring device can be determined. In the present embodiment, the coordinate position of the monitoring device is (X, Y).
S203: and acquiring boundary information of the preset area.
Specifically, boundary information of a preset area is acquired by a local area or other units. The boundary information includes position information of a series of ordered boundary points constituting the preset area. The boundary of the preset area can be restored through the boundary points which are connected in sequence. In other embodiments, the boundary information of the preset area may also be obtained by other manners, which is not limited herein. In this embodiment, the preset area is a target supervision area.
The boundary information of the preset area comprises longitude data and latitude data which respectively correspond to boundary points forming the preset area.
S204: and determining the coordinate point of the boundary point according to the longitude data and the latitude data of the boundary point.
Specifically, longitude information and latitude information of the boundary points are converted into XY coordinates, and then coordinate positions of all the boundary points constituting the preset area can be determined.
S205: a line segment is formed by connecting two adjacent boundary points, and two end points of the line segment are coordinate points of the two boundary points respectively.
Specifically, the line segment is a left-open and right-closed type line segment; the left end point of the left opening and right closing line segment is a hollow point, and the right end point of the left opening and right closing line segment is a solid point. All the left opening and right closing line segments are sequentially connected to form a polygon for describing a preset area; wherein one end point in the polygon is contained in only one line segment. In other alternative embodiments, the line segment may also be a left-closed right-open type line segment; the left end point of the left closed-right open-type line segment is a solid point, and the right end point of the left closed-right open-type line segment is a hollow point. All the left closed and right open line segments are sequentially connected to form a polygon for describing a preset area; wherein one end point in the polygon is contained in only one line segment.
S206: all the line segments are connected in sequence to form a polygon describing the preset area.
Specifically, line segments between two adjacent boundary points in all the boundary points are sequentially connected to form a polygon describing the preset area. The polygon in this embodiment may be any shape.
S207: and taking the coordinate point of the monitoring equipment as a starting point to form a straight line to form a ray, and counting to obtain the number of intersection points of the ray and the polygon.
Specifically, a ray is formed by making a straight line with a coordinate point of the monitoring device as a starting point. The rays may be in any direction. In this embodiment, in order to facilitate calculation of the coordinate positions of the intersections of the rays and the line segments constituting the polygon, the direction of the ray is horizontally to the left or horizontally to the right.
In one embodiment, the coordinate point of the monitoring device is (X, Y), and the coordinate of the right end point of the line segment is (X) 1 ,Y 1 ) Of the left end pointThe coordinate is (X) 2 ,Y 2 ). The end point adjacent to the right end point of the line segment and far away from the left end point of the line segment is a first adjacent end point, and the end point adjacent to the left end point of the line segment and far away from the right end point of the line segment is a second adjacent end point.
In order to count the number of intersections of the ray with the polygon, it is necessary to calculate in advance whether there is an intersection between the ray and each line segment forming the polygon. The initial value of the number of intersections of the ray with the polygon is 0. And when the ray has an intersection point with a line segment forming the polygon, determining that the number of the intersection points of the polygon and the ray to which the line segment belongs is added by 1.
Referring to fig. 3 (a) to 3 (h), fig. 3 (a) to 3 (h) are schematic diagrams of different position relationships between the ray corresponding to the monitoring device and the preset area according to the present invention.
In one embodiment, please refer to FIG. 3 (a), in response to Y ≧ Y 1 And Y > Y 2 Then determining that the coordinate point of the monitoring device is located at the coordinate (X) 1 ,Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) And (4) determining that the ray and the line segment have no intersection point above the line segment formed by the coordinate points.
In one embodiment, please refer to FIG. 3 (b), in response to Y ≦ Y 1 And Y is less than Y 2 Then, the coordinate point of the monitoring device is determined to be located at the coordinate (X) 1 ,Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) And determining that the ray and the line segment have no intersection point below the line segment formed by the coordinate points.
In one embodiment, referring to FIG. 3 (c), when the direction of the ray is horizontal to the right, in response to X ≧ X 1 And X > X 2 Then determining that the coordinate point of the monitoring device is located at the coordinate (X) 1 ,Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) And determining that the ray and the line segment have no intersection point on the right side of the line segment formed by the coordinate points. In an embodiment, referring to fig. 3 (d), when the direction of the ray is horizontal to the right, the reverse extension line of the ray corresponding to the coordinate point of the monitoring device intersects with the line segment, and it is determined that the coordinate point of the monitoring device is located on the right side of the line segment, and it is determined that the ray corresponding to the coordinate point of the monitoring device does not intersect with the line segmentAnd (4) point.
In one embodiment, when the direction of the ray is horizontal to the left, in response to X ≦ X 1 And X < X 2 Then determining that the coordinate point of the monitoring device is located at the coordinate (X) 1 ,Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) The left side of the line segment formed by the coordinate points of (1) determines that the ray and the line segment have no intersection point. In another embodiment, when the direction of the ray is horizontal to the left, the reverse extension line of the ray corresponding to the coordinate point of the monitoring device intersects with the line segment, it is determined that the coordinate point of the monitoring device is located on the left side of the line segment, and it is determined that the ray corresponding to the coordinate point of the monitoring device does not intersect with the line segment.
In one embodiment, referring to FIG. 3 (e), when the direction of the ray is horizontal to the right, in response to X < X 1 And X < X 2 Determining that the coordinate point of the monitoring equipment is positioned on the left side of the line segment; further determination of the ray and coordinate as (X) 1 ,Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) Whether line segments formed by the coordinate points of (1) coincide or not. In response to the coincidence of the ray and the line segment, namely the coincidence of the line segment and a part of rays, further determining the position relationship between a first adjacent end point and a second adjacent end point corresponding to the line segment and the ray; determining the ray and the coordinate as (X) in response to the first adjacent end point and the second adjacent end point being respectively positioned at two sides of the ray 1 ,Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) The coordinate points of (2) form line segments with intersection points.
In one embodiment, when the direction of the ray is horizontal to the left, in response to X > X 1 And X > X 2 If so, determining that the coordinate point of the monitoring equipment is positioned on the right side of the line segment; further determination of the ray and coordinate as (X) 1 ,Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) Whether line segments formed by the coordinate points of (2) coincide or not. And in response to the coincidence of the ray and the line segment, determining the position relation between the first adjacent end point and the second adjacent end point corresponding to the line segment and the ray. Wherein, the right end point (X) of the line segment 1 ,Y 1 ) Left end point (X) adjacent to and far from line segment 2 ,Y 2 ) Is the first neighborA contact point, a first adjacent point having coordinates of (X) 3 ,Y 3 ) (ii) a And the left end point (X) of the line segment 2 ,Y 2 ) Right end point (X) adjacent and distant from line segment 1 ,Y 1 ) Is a second adjacent end point, the second adjacent end point having coordinates of (X) 4 , Y 4 ). In response to a first adjacent end point (X) 3 ,Y 3 ) And a second adjacent end point (X) 4 ,Y 4 ) Respectively positioned at two sides of the ray, and determining the ray and the coordinate corresponding to the coordinate point of the monitoring equipment as (X) 1 , Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) The coordinate points of (2) form line segments with intersection points.
In one embodiment, please refer to FIG. 3 (f), in response to the first neighboring endpoint (X) 3 ,Y 3 ) And a second adjacent end point (X) 4 ,Y 4 ) All are positioned at the same side of the ray, then the ray and the coordinate corresponding to the coordinate point of the monitoring equipment are determined to be (X) 1 ,Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) The coordinate points of (2) form line segment non-intersection points.
In one embodiment, in response to the coincidence of the coordinate point of the monitoring device and the end point of the line segment, that is, the coordinate of the coordinate point of the monitoring device is the same as the coordinate of the left end point or the coordinate of the right end point of the line segment, it is directly determined that the monitoring device is located inside the preset region, and it is not necessary to determine whether the monitoring device is located inside the preset region according to the intersection point between the ray and each line segment constituting the polygon, thereby reducing the amount of calculation. In one embodiment, referring to fig. 3 (g), in response to the coordinate point of the monitoring device coinciding with the end point of the line segment, the coordinate (X, Y) of the coordinate point of the monitoring device and the coordinate (X, Y) of the right end point of the line segment are (X) 2 ,Y 2 ) The same is true. The left end point of the line segment is a hollow point, the right end point of the line segment is a solid point, the line segment is one of straight lines forming a polygon, the hollow point of the left end point of one line segment is the right end point of the adjacent line segment, namely the hollow point on one line segment is the solid point of the other line segment. Therefore, when the coordinate point of the monitoring device coincides with the end point of the line segment, it is directly determined that the monitoring device is located in the preset area.
In one embodiment, please refer to the figure3 (h) the ray corresponding to the coordinate point (X, Y) in response to the monitoring device is (X) with the coordinate 1 ,Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) Form a non-parallel line segment, and the ray is aligned with an end point (X) of the line segment 2 ,Y 2 ) If the line segments intersect with the ray, the end point (X) of the line segment not intersecting with the ray needs to be judged 1 ,Y 1 ) And the end point of intersection (X) 2 ,Y 2 ) Away from non-intersecting end points (X) 1 ,Y 1 ) One side adjacent end point (X) 3 ,Y 3 ) The position relation with the ray. I.e. determining the non-intersected end point (X) 1 ,Y 1 ) And adjacent end point (X) 3 ,Y 3 ) Whether it is located on both sides of the ray corresponding to the monitoring device. In response to non-intersecting endpoints (X) 1 ,Y 1 ) And adjacent end point (X) 3 , Y 3 ) Respectively locating at two sides of the ray corresponding to the monitoring equipment, and determining the ray corresponding to the coordinate point (X, Y) of the monitoring equipment and the coordinate as (X) 1 ,Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) The coordinate points of (2) form line segments with intersection points.
In one embodiment, in response to an end point (X) not being intersected 1 ,Y 1 ) And adjacent end point (X) 3 , Y 3 ) The ray corresponding to the coordinate point (X, Y) of the monitoring equipment and the coordinate are determined to be (X) 1 ,Y 1 ) Has a coordinate point and coordinates of (X) 2 ,Y 2 ) The coordinate points of (2) form line segment non-intersection points.
And determining whether each line segment forming the polygon is intersected with the ray corresponding to the monitoring equipment respectively through the step, and further counting the number of intersection points of the ray corresponding to the monitoring equipment and all line segments forming the polygon.
S208: and determining whether the monitoring equipment is in a preset area or not based on the number of the intersection points of the rays and the polygon.
Specifically, the number of intersections of the polygon and the ray corresponding to the monitoring device obtained in step S207. And judging whether the number of the intersection points of the rays corresponding to the monitoring equipment and the polygon is an odd number or not, wherein when the monitoring equipment is positioned in the preset region, the number of the intersection points of the rays corresponding to the monitoring equipment and the polygon is an odd number. For example, the number of intersections of the ray corresponding to the monitoring device and the polygon is 1. When the monitoring device is located outside the preset area, the number of intersections of the ray corresponding to the monitoring device and the polygon is even. For example, the number of intersections of the ray corresponding to the monitoring device and the polygon is 0 or 2.
Referring to fig. 4, fig. 4 is a flowchart illustrating an embodiment of step S208 in the method for determining a location of a monitoring device provided in fig. 2.
S2081: and in response to the number of the intersection points of the ray and the polygon being an even number, determining that the monitoring equipment is positioned outside the preset area described by the polygon.
Specifically, when it is determined that the total number of intersection points of the ray corresponding to the statistical monitoring device and all line segments constituting the polygon is an even number, it is determined that the coordinate point of the monitoring device is located on the left side, the right side, the upper side, the lower side of the polygon or on any line segment of the polygon describing the preset region, and it is determined that the monitoring device is located outside the preset region described by the polygon.
S2082: and in response to the number of the intersection points of the ray and the polygon being an odd number, determining that the monitoring device is positioned inside the preset area described by the polygon.
Specifically, when it is determined that the total number of intersection points of the ray corresponding to the statistical monitoring device and all line segments forming the polygon is an odd number, it is determined that the coordinate point of the monitoring device is located inside the polygon describing the preset area, and it is determined that the monitoring device is located inside the preset area.
Because the acquired position information of the monitoring equipment has insufficient accuracy, and part of the monitoring equipment should be in the preset area, the position determining method of the monitoring equipment can be allowed to have a corresponding fault-tolerant mechanism, so that the accuracy of position determination of the monitoring equipment which should be in the preset area is improved, and the phenomenon of position determination error of the monitoring equipment caused by insufficient accuracy of the position information of the monitoring equipment is avoided.
In particular, the position determination method of the monitoring device is embodied by the following steps with a corresponding fault-tolerant mechanism.
S209: and determining the shortest distance between each line segment and the monitoring equipment based on the coordinate point of the monitoring equipment and the left end point and the right end point which correspond to all line segments included in the polygon describing the preset area.
Referring to fig. 5 and fig. 6 (a) to 6 (c), fig. 5 is a schematic flowchart illustrating an embodiment of step S209 in the method for determining a location of a monitoring device provided in fig. 2; fig. 6 (a) to 6 (c) are schematic diagrams of different position relationships between the monitoring device and the line segment provided by the present invention.
In one embodiment, the coordinate point C of the monitoring device is (X, Y), and the coordinate of the left end point A of the line segment is (X) a ,Y a ) The coordinate of the right end point B is (X) b ,Y b )。
S2091: and judging whether an included angle between a straight line between the coordinate point of the monitoring equipment and the left end point of the line segment and the line segment is an obtuse angle.
Specifically, it is determined whether an included angle between a line AC between a coordinate point C of the monitoring device and a left end point a of the line segment and the line segment AB is an obtuse angle. Specifically, by judging (X) b -X a ) ×(X-X a )+(Y b -Y a )×(Y-Y a ) And whether the included angle between the line AC between the coordinate point of the monitoring equipment and the left end point of the line segment and the line segment AB is an obtuse angle is determined.
If the included angle between the line segment AB and the straight line AC between the coordinate point of the monitoring equipment and the left end point of the line segment is an obtuse angle, directly jumping to the step S2092; if the included angle between the straight line AC between the coordinate point of the monitoring device and the left end point of the line segment and the line segment AB is a non-obtuse angle, the process goes directly to step S2094.
S2092: and determining that an included angle between a straight line between the coordinate point of the monitoring equipment and the left endpoint of the line segment and the line segment is an obtuse angle.
In particular, in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a )<And when 0, determining that the included angle between a straight line AC between the coordinate point of the monitoring device and the left end point of the line segment and the line segment AB is an obtuse angle.
S2093: and determining a connecting line between the coordinate point of the monitoring equipment and the left end point of the line segment as a shortest connecting line.
Specifically, when the included angle between the straight line between the coordinate point of the monitoring device and the left end point of the line segment and the line segment is an obtuse angle, the monitoring device is judged to be positioned on the left side of the line segment, namely X is less than X a <X b And determining the distance between the monitoring device and the end point of the line segment close to the monitoring device as the shortest distance between the monitoring device and the line segment. In an embodiment, referring to fig. 6 (a), when an included angle between a straight line AC between the coordinate point of the monitoring device and the left end point of the line segment and the line segment AB is an obtuse angle, it is determined that the straight line AC between the coordinate point C of the monitoring device and the left end point a of the line segment is a shortest connecting line between the monitoring device and the line segment.
S2094: and judging whether an included angle between a straight line between the coordinate point of the monitoring equipment and the right end point of the line segment and the line segment is an obtuse angle.
In particular, in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a ) And if the angle is more than 0, judging whether the included angle between the straight line between the coordinate point of the monitoring equipment and the right end point of the line segment and the line segment is an obtuse angle.
If the included angle between the straight line between the coordinate point of the monitoring device and the right end point of the line segment and the line segment is an obtuse angle, directly jumping to the step S2095; and if the included angle between the straight line between the coordinate point of the monitoring device and the right end point of the line segment and the line segment is a non-obtuse angle, directly jumping to the step S2097.
S2095: and determining that an included angle between a straight line between the coordinate point of the monitoring equipment and the right end point of the line segment and the line segment is an obtuse angle.
In particular, in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a )>(X b -X a ) ×(X b -X a )+(Y b -Y a )×(Y b -Y a ) And determining that the included angle between the straight line between the coordinate point of the monitoring equipment and the right end point of the line segment and the line segment is an obtuse angle.
S2096: and determining a connecting line between the coordinate point of the monitoring equipment and the right end point of the line segment as a shortest connecting line.
Specifically, when the included angle between the straight line between the coordinate point of the monitoring device and the right end point of the line segment and the line segment is an obtuse angle, the monitoring device is judged to be positioned on the right side of the line segment, namely X is greater than X b >X a And determining the distance between the monitoring device and the end point of the line segment close to the monitoring device as the shortest distance between the monitoring device and the line segment. In an embodiment, referring to fig. 6 (B), when an included angle between a straight line BC between the coordinate point C of the monitoring device and the right end point B of the line segment and the line segment AB is an obtuse angle, the straight line BC between the coordinate point C of the monitoring device and the left end point B of the line segment is determined as a shortest connecting line between the monitoring device and the line segment.
S2097: and determining a projection point of the coordinate point of the monitoring device projected on the line segment.
Specifically, referring to fig. 6 (C), in response to the fact that the included angle between the line AC between the coordinate point C of the monitoring device and the left end point a of the line segment and the line segment AB, and the included angle between the line BC between the coordinate point C of the monitoring device and the right end point B of the line segment and the line segment AB are all non-obtuse angles, that is, X b >X> X a Then the coordinates of the projection point D of the coordinate point C of the monitoring device on the line segment AB need to be determined. A straight line CD between the coordinate point C and the projection point D of the monitoring equipment is perpendicular to the line segment AB.
Specifically, the coordinate of the projection point D is (X) * ,Y * ) And calculating the coordinates of the projection points based on the formula 1 and the formula 2.
X * =X a +(X b -X a ) Xr (equation 1)
Y * =Y a +(Y b -Y a ) Xr (equation 2)
In the formula: x * ,Y * The coordinates of the projection points, r, are angular coefficients.
Wherein, the angle coefficient r in formula 1 and formula 2 is calculated based on formula 3.
Figure RE-GDA0003833221610000201
S2098: and determining a connecting line between the coordinate point of the monitoring equipment and the projection point as a shortest connecting line.
Specifically, when an included angle between a straight line AC between the coordinate point C of the monitoring device and the left end point a of the line segment and the line segment AB, and an included angle between a straight line BC between the coordinate point C of the monitoring device and the right end point B of the line segment and the line segment AB are all non-obtuse angles, it is determined that a straight line CD between the coordinate point C of the monitoring device and the projection point D on the line segment is the shortest connecting line between the monitoring device and the line segment.
In a specific embodiment, the shortest distance between the monitoring device and the line segment is calculated based on formula 4, that is, the length of the shortest connection line is calculated. Specifically, the lengths of a straight line AC between the coordinate point C of the monitoring device and the left end point a of the line segment in step S2093, a straight line BC between the coordinate point C of the monitoring device and the left end point B of the line segment in step S2096, and a straight line CD between the coordinate point C of the monitoring device and the projection point D on the line segment AB in step S2098 are calculated.
Specifically, the shortest distance between the monitoring device and the line segment is calculated based on formula 4.
D min =6371000 × acos θ (equation 4)
Wherein θ in equation 4 is calculated based on equation 5.
Figure RE-GDA0003833221610000202
In the formula: x and Y are coordinates of one end point of the shortest connecting line, namely coordinates of a coordinate point of the monitoring equipment; x 'and Y' are coordinates of the other end point of the shortest connecting line.
In another embodiment, the shortest distance between the monitoring device and the line segment is calculated based on equation 6.
D min =2 × 6371000 × asin β (equation 6)
Wherein β in formula 6 is calculated based on formula 7;
Figure RE-GDA0003833221610000211
in the formula: x and Y are coordinates of one end point of the shortest connecting line, namely coordinates of a coordinate point of the monitoring equipment; x 'and Y' are coordinates of the other end point of the shortest connecting line.
S210: and selecting the shortest distance with the minimum numerical value to determine the shortest distance between the monitoring equipment and the preset area.
Specifically, the shortest distances between the monitoring equipment and all line segments of the polygon describing the preset area are obtained through the calculation of the steps, the shortest distances between all the line segments of the polygon and the coordinate points of the monitoring equipment are sorted, and the shortest distance with the smallest numerical value is selected as the shortest distance between the monitoring equipment and the preset area.
S211: and judging whether the shortest distance between the monitoring equipment and the preset area is smaller than the preset distance.
Specifically, the shortest distance between the monitoring device and the preset area is compared with the preset distance, and whether the monitoring device is located near the preset area is determined.
If the shortest distance between the monitoring equipment and the preset area is less than the preset distance, directly jumping to the step S212; if the shortest distance between the monitoring device and the preset area is not less than the preset distance, it directly jumps to step S213.
S212: and determining that the monitoring equipment is in the preset area so as to associate the monitoring data acquired by the monitoring equipment with the preset area.
Specifically, in response to that the shortest distance between the monitoring device and the preset area is smaller than the preset distance, it is determined that the monitoring device is located near the preset area, and the monitoring device located near the preset area is determined that the monitoring device is located in the preset area, so that the monitoring data acquired by the monitoring device is associated with the preset area.
S213: and determining that the monitoring equipment is outside the preset area.
Specifically, in response to that the shortest distance between the monitoring device and the preset area is not less than the preset distance, it is determined that the monitoring device is neither within the preset area nor in the vicinity of the preset area, and it is determined that the monitoring device is outside the preset area.
The embodiment provides a method for determining the position of monitoring equipment, which comprises the following steps: acquiring position information of monitoring equipment and boundary information of a preset area; in response to that the monitoring equipment is not located in the preset area, determining the shortest distance between the monitoring equipment and the preset area based on the position information of the monitoring equipment and the boundary information of the preset area; and determining that the monitoring equipment is in the preset area in response to that the shortest distance between the monitoring equipment and the preset area is smaller than the preset distance so as to associate the monitoring data acquired by the monitoring equipment with the preset area. In this embodiment, the monitoring device that is not located in the preset area and is located in the preset area is determined by determining the shortest distance between the monitoring device and the preset area, and the monitoring device that is located in the preset area and has the shortest distance between the monitoring device and the preset area that is smaller than the preset distance.
Referring to fig. 7 and 8, fig. 7 is a schematic block diagram of an embodiment of an image quality evaluation apparatus provided by the present invention; fig. 8 is a schematic block diagram of another embodiment of the image quality evaluation apparatus provided by the present invention.
In the present embodiment, a position determining apparatus 60 of a monitoring device is provided, and the position determining apparatus 60 of the monitoring device includes an obtaining module 61, an analyzing module 62, and a determining module 63.
The obtaining module 61 is configured to obtain position information of the monitoring device and obtain boundary information of a preset area.
The analysis module 62 is configured to, in response to that the monitoring device is not located in the preset area, determine a shortest distance between the monitoring device and the preset area based on the position information of the monitoring device and the boundary information of the preset area.
The determining module 63 is configured to determine that the monitoring device is located in the preset area in response to that the shortest distance between the monitoring device and the preset area is smaller than the preset distance, so as to associate the monitoring data acquired by the monitoring device with the preset area.
In an alternative embodiment, referring to fig. 8, the apparatus for determining the location of the monitoring device further includes a determining module 64, where the determining module 64 is configured to determine whether the monitoring device is located in the preset area based on the location information of the monitoring device and the boundary information of the preset area.
Specifically, the judging module 64 is configured to determine a coordinate point of the monitoring device according to the longitude data and the latitude data of the monitoring device, and determine a coordinate point of the boundary point according to the longitude data and the latitude data of the boundary point; forming a line segment by connecting two adjacent boundary points, wherein two end points of the line segment are respectively coordinate points of the two boundary points; all the line segments are sequentially connected to form a polygon describing the preset area; taking a coordinate point of the monitoring equipment as a starting point to form a straight line to form a ray, and counting to obtain the number of intersection points of the ray and the polygon; and determining whether the monitoring equipment is positioned in the preset area or not based on the number of the intersection points of the rays and the polygon.
In one embodiment, the monitoring device is determined to be within the predetermined area in response to the coordinate point of the monitoring device coinciding with an endpoint of any of the segments that make up the polygon.
In one embodiment, the line segments are left-open and right-closed line segments; the left end point of the left opening and right closing line segment is a hollow point, and the right end point of the left opening and right closing line segment is a solid point; all the left opening and right closing line segments are sequentially connected to form a polygon for describing a preset area; wherein one end point in the polygon is contained in only one line segment.
The coordinate point of the monitoring equipment is (X, Y), and the coordinate of the right end point of the line segment is (X) 1 , Y 1 ) The coordinate of the left end point is (X) 2 ,Y 2 ) The end point adjacent to the right end point of the line segment and far away from the left end point of the line segment is a first adjacent end point, and the end point adjacent to the left end point of the line segment and far away from the right end point of the line segment is a second adjacent end point.
In one embodiment, the direction of the ray is horizontally left or horizontally right, and it is determined whether the ray has an intersection with each line segment forming the polygon based on the positional relationship between the coordinate points of the monitoring device and each line segment forming the polygon.
In a specific embodiment, in response to Y ≧ Y 1 And Y > Y 2 And determining that the ray does not intersect with the line segment.
In a particular embodiment, in response to Y ≦ Y 1 And Y is less than Y 2 And determining that the ray does not intersect with the line segment.
In one embodiment, when the direction of the ray is horizontal to the right, in response to X ≧ X 1 And X > X 2 Then it is determined that the ray does not intersect the line segment.
In one embodiment, when the direction of the ray is horizontal to the left, in response to X ≦ X 1 And X < X 2 Then it is determined that the ray does not intersect the line segment.
In one embodiment, when the direction of the ray is horizontal to the right, in response to X < X 1 And X < X 2 Determining whether the ray is coincident with the line segment; in response to the coincidence of the ray and the line segment, determining the position relation between a first adjacent end point and a second adjacent end point corresponding to the line segment and the ray; and determining that the ray has an intersection point with the line segment in response to the first and second adjacent end points being located on both sides of the ray.
In one embodiment, when the direction of the ray is horizontal to the left, in response to X > X 1 And X > X 2 Determining whether the ray is coincident with the line segment; in response to the coincidence of the ray and the line segment, determining the position relation between a first adjacent end point and a second adjacent end point corresponding to the line segment and the ray; and determining that the ray and the line segment have intersection points in response to the first adjacent end point and the second adjacent end point being located on two sides of the ray respectively.
In a particular embodiment, in response to the first and second abutting end points both being located on the same side of the ray, no intersection point of the ray with the coincident line segment is determined.
In a specific embodiment, in response to the ray being non-parallel to the line segment and the ray intersecting an end point of the line segment, determining a positional relationship between an end point of the line segment that is not intersected and an adjacent end point of the intersected end point on a side away from the non-intersected end point and the ray; and determining that the ray and the line segment have intersection points in response to the non-intersected end points and the adjacent end points being located on two sides of the ray respectively.
In one embodiment, a ray is determined to have no intersection with the line segment in response to the non-intersected end point and the adjacent end point both being on the same side of the ray.
In one embodiment, in response to the number of intersections of the ray with the polygon being an even number, it is determined that the monitoring device is outside the predetermined area described by the polygon.
In one embodiment, in response to the number of intersections of the ray with the polygon being an odd number, the monitoring device is determined to be located within the predetermined area described by the polygon.
The analysis module 62 is further configured to determine a shortest distance between each line segment and the monitoring device based on a coordinate point of the monitoring device and a left end point and a right end point corresponding to each line segment included in a polygon describing the preset area; and selecting the shortest distance with the minimum numerical value to determine the shortest distance between the monitoring equipment and the preset area. Specifically, the coordinate point of the monitoring device is (X, Y), and the coordinate of the left end point of the line segment is (X) a ,Y a ) The coordinate of the right end point is (X) b ,Y b ) Judging whether an included angle between a straight line between a coordinate point of the monitoring equipment and a left end point of the line segment and the line segment is an obtuse angle; in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a )<When 0, determining that an included angle between a straight line between a coordinate point of the monitoring equipment and a left end point of the line segment and the line segment is an obtuse angle; and determining a connecting line between the coordinate point of the monitoring equipment and the left end point of the line segment as a shortest connecting line. In response to (X) b -X a ) ×(X-X a )+(Y b -Y a )×(Y-Y a ) If the angle is more than 0, judging whether an included angle between a straight line between a coordinate point of the monitoring equipment and a right end point of the line segment and the line segment is an obtuse angle; in response to (X) b -X a ) ×(X-X a )+(Y b -Y a )×(Y-Y a )>(X b -X a )×(X b -X a )+(Y b -Y a )×(Y b -Y a ) Then determining the coordinate point and line of the monitoring equipmentThe included angle between the straight line between the right end points of the segments and the line segments is an obtuse angle; and determining a connecting line between the coordinate point of the monitoring equipment and the right end point of the line segment as a shortest connecting line. Determining a projection point of the coordinate point of the monitoring equipment projected on the line segment in response to the fact that the included angle between the straight line between the coordinate point of the monitoring equipment and the left end point of the line segment and the included angle between the straight line between the coordinate point of the monitoring equipment and the right end point of the line segment and the line segment are all non-obtuse angles; the straight line between the coordinate point and the projection point of the monitoring equipment is vertical to the line segment; and determining a connecting line between the coordinate point of the monitoring equipment and the projection point as a shortest connecting line.
In one embodiment, the projection point has coordinates of (X) * ,Y * ) Calculating to obtain the coordinates of the projection points based on the formula 1 and the formula 2;
X * =X a +(X b -X a ) Xr (equation 1)
Y * =Y a +(Y b -Y a ) Xr (equation 2)
In the formula: x * ,Y * The coordinates of the projection points, r, are angular coefficients.
Calculating an angle coefficient r in formula 1 and formula 2 based on formula 3;
Figure RE-GDA0003833221610000251
in a specific embodiment, the shortest distance between the monitoring device and the line segment is calculated based on formula 4;
D min =6371000 × acos θ (equation 4)
Calculating theta in formula 4 based on formula 5;
Figure RE-GDA0003833221610000252
in the formula: x and Y are coordinates of an end point of the shortest connecting line, namely coordinates of a coordinate point of the monitoring equipment; x 'and Y' are coordinates of the other end point of the shortest connecting line.
In another embodiment, the shortest distance between the monitoring device and the line segment is calculated based on formula 6;
D min =2 × 6371000 × asin β (equation 6)
Wherein β in formula 6 is calculated based on formula 7;
Figure RE-GDA0003833221610000253
in the formula: x and Y are coordinates of one end point of the shortest connecting line, namely coordinates of a coordinate point of the monitoring equipment; x 'and Y' are coordinates of the other end point of the shortest connecting line.
The embodiment provides a position determining apparatus for a monitoring device, including: the acquisition module is used for acquiring the position information of the monitoring equipment and acquiring the boundary information of a preset area; the analysis module is used for determining the shortest distance between the monitoring equipment and the preset area based on the position information of the monitoring equipment and the boundary information of the preset area in response to the fact that the monitoring equipment is not located in the preset area; the determining module is used for determining that the monitoring equipment is located in the preset area in response to the fact that the shortest distance between the monitoring equipment and the preset area is smaller than the preset distance, so that the monitoring data acquired by the monitoring equipment is associated with the preset area. According to the method, the monitoring equipment which is not located in the preset area and the preset area is determined to be located in the preset area, the monitoring equipment of which the shortest distance between the monitoring equipment and the preset area is smaller than the preset distance is determined to be located in the preset area, the method has a fault tolerance rate for determining whether the monitoring equipment with position information deviation is located in the preset area, and the problem that the position determination of the monitoring equipment is inaccurate due to inaccurate position information of the monitoring equipment is solved.
Referring to fig. 9, fig. 9 is a schematic block diagram of an embodiment of a terminal provided in the present invention. The terminal 70 in this embodiment includes: the processor 71, the memory 72, and a computer program stored in the memory 72 and capable of running on the processor 71 are implemented in the method for determining a position of the monitoring device described above when the computer program is executed by the processor 71, and are not repeated herein to avoid repetition.
Referring to fig. 10, fig. 10 is a schematic block diagram of an embodiment of a computer-readable storage medium provided in the present invention. In an embodiment of the present application, a computer-readable storage medium 90 is further provided, where the computer-readable storage medium 90 stores a computer program 901, and the computer program 901 includes program instructions, and a processor executes the program instructions to implement the method for determining a position of a monitoring device according to the embodiment of the present application.
The computer-readable storage medium 90 may be an internal storage unit of the computer device of the foregoing embodiment, such as a hard disk or a memory of the computer device. The computer-readable storage medium 90 may also be an external storage device of the computer device, such as a plug-in hard disk provided on the computer device, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like.
The above description is only an embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.

Claims (28)

1. A method for determining a location of a monitoring device, the method comprising:
acquiring position information of monitoring equipment and boundary information of a preset area;
in response to that the monitoring equipment is not located in the preset area, determining the shortest distance between the monitoring equipment and the preset area based on the position information of the monitoring equipment and the boundary information of the preset area;
and determining that the monitoring equipment is located in the preset area in response to the fact that the shortest distance between the monitoring equipment and the preset area is smaller than a preset distance, so that the monitoring data acquired by the monitoring equipment is associated with the preset area.
2. The method of determining the location of a monitoring device of claim 1, further comprising:
and determining whether the monitoring equipment is located in the preset area or not based on the position information of the monitoring equipment and the boundary information of the preset area.
3. The position determination method of a monitoring device according to claim 2, characterized in that the position information of the monitoring device includes longitude data and latitude data; the boundary information of the preset area comprises the longitude data and the latitude data which respectively correspond to boundary points forming the preset area;
determining whether the monitoring device is located in the preset area based on the position information of the monitoring device and the boundary information of the preset area, including:
determining a coordinate point of the monitoring device according to the longitude data and the latitude data of the monitoring device, and determining the coordinate point of the boundary point according to the longitude data and the latitude data of the boundary point;
forming a line segment by connecting two adjacent boundary points, wherein two end points of the line segment are coordinate points of the two boundary points respectively;
all the line segments are sequentially connected to form a polygon describing the preset area;
taking a coordinate point of the monitoring equipment as a starting point to form a straight line to form a ray, and counting to obtain the number of intersection points of the ray and the polygon;
and determining whether the monitoring equipment is positioned in the preset area or not based on the number of the intersection points of the ray and the polygon.
4. The method of determining the location of a monitoring device of claim 3,
determining whether the monitoring device is located in the preset area based on the position information of the monitoring device and the boundary information of the preset area, further comprising:
and determining that the monitoring equipment is positioned in the preset area in response to the coincidence of the coordinate point of the monitoring equipment and the end point of any line segment forming the polygon.
5. The position determining method of a monitoring device according to claim 3, characterized in that the line segment is a left-open-right-closed type line segment; the left end point of the left opening-and-closing type line segment is a hollow point, and the right end point of the left opening-and-closing type line segment is a solid point;
all the line segments are sequentially connected to form a polygon for describing the preset area, and the method comprises the following steps:
all the left opening and right closing line segments are sequentially connected to form a polygon for describing the preset area; wherein one of the endpoints in the polygon is contained in only one of the line segments.
6. The method of determining the location of a monitoring device of claim 3, wherein the direction of the ray is horizontally to the left or horizontally to the right,
the counting to obtain the number of the intersection points of the ray and the polygon comprises the following steps:
determining whether the ray has an intersection with each of the line segments forming the polygon based on a positional relationship between a coordinate point of the monitoring device and each of the line segments forming the polygon.
7. The position determination method of a monitoring device according to claim 6, wherein the coordinate point of the monitoring device is (X, Y), and the coordinate of the right end point of the line segment is (X) 1 ,Y 1 ) The coordinate of the left end point is (X) 2 ,Y 2 );
The determining whether the ray has an intersection with each of the line segments forming the polygon based on a positional relationship between a coordinate point of the monitoring device and each of the line segments forming the polygon includes:
in response to Y ≧ Y 1 And Y > Y 2 Determining that the ray does not intersect the line segment.
8. The position determination method of a monitoring device according to claim 6, wherein the coordinate point of the monitoring device is (X, Y), and the coordinate of the right end point of the line segment is (X) 1 ,Y 1 ) The coordinate of the left end point is (X) 2 ,Y 2 );
The determining whether the ray has an intersection with each of the line segments forming the polygon based on a positional relationship between the coordinate points of the monitoring device and each of the line segments forming the polygon includes:
in response to Y ≦ Y 1 And Y is less than Y 2 Then it is determined that the ray does not intersect the line segment.
9. The position determination method of a monitoring device according to claim 6, wherein the coordinate point of the monitoring device is (X, Y), and the coordinate of the right end point of the line segment is (X) 1 ,Y 1 ) The coordinate of the left end point is (X) 2 ,Y 2 );
The determining whether the ray has an intersection with each of the line segments forming the polygon based on a positional relationship between a coordinate point of the monitoring device and each of the line segments forming the polygon includes:
when the direction of the ray is horizontal to the right, responding to X ≧ X 1 And X > X 2 Determining that the ray does not intersect with the line segment;
or;
when the direction of the ray is horizontal to the left, in response to X ≦ X 1 And X < X 2 Determining that the ray does not intersect the line segment.
10. The position determination method of a monitoring device according to claim 9, wherein the coordinate point of the monitoring device is (X, Y), and the coordinate of the right end point of the line segment is (X) 1 ,Y 1 ) The coordinate of the left end point is (X) 2 ,Y 2 ) (ii) a An end point adjacent to the right end point of the line segment and far away from the left end point of the line segment is a first adjacent end point, and an end point adjacent to the left end point of the line segment and far away from the right end point of the line segment is a second adjacent end point;
the determining whether the ray has an intersection with each of the line segments forming the polygon based on a positional relationship between the coordinate points of the monitoring device and each of the line segments forming the polygon includes:
when the direction of the ray is horizontal to the right, in response to X < X 1 And X < X 2 Determining whether the ray coincides with the line segment; or; when the direction of the ray is horizontal to the left, in response to X > X 1 And X > X 2 Determining whether the ray coincides with the line segment;
in response to the ray being coincident with the line segment, determining a position relationship between the first and second adjacent end points corresponding to the line segment and the ray;
determining that the ray has an intersection with the line segment in response to the first and second abutting end points being located on either side of the ray.
11. The method of determining the location of a monitoring device of claim 10,
the determining whether the ray has an intersection with each of the line segments forming the polygon based on a positional relationship between a coordinate point of the monitoring device and each of the line segments forming the polygon includes:
in response to the first and second adjacent end points both being on the same side of the ray, determining that the ray does not intersect the coincident line segment.
12. The method of determining the location of a monitoring device of claim 6,
the determining whether the ray has an intersection with the line segments forming the polygon based on a positional relationship between the coordinate points of the monitoring device and the line segments forming the polygon includes:
in response to the ray being non-parallel to the line segment and the ray intersecting an end point of the line segment, determining a positional relationship between the end point of the line segment that is not intersected and an adjacent end point of the intersected end point on a side away from the non-intersected end point and the ray;
and determining that the ray and the line segment have intersection points in response to the non-intersected end point and the adjacent end point being located on two sides of the ray respectively.
13. The method of determining the location of a monitoring device of claim 12,
the determining whether the ray has an intersection with the line segments forming the polygon based on a positional relationship between the coordinate points of the monitoring device and the line segments forming the polygon includes:
in response to the non-intersected end point and the adjoining end point both being located on the same side of the ray, determining that the ray does not intersect the line segment.
14. The method of determining the location of a monitoring device of claim 2,
determining whether the monitoring device is located in the preset area based on the position information of the monitoring device and the boundary information of the preset area, including:
in response to the number of intersections of the ray with the polygon being an even number, determining that the monitoring device is located outside the preset area described by the polygon.
15. The method of determining the location of a monitoring device of claim 2,
determining whether the monitoring device is located in the preset area based on the position information of the monitoring device and the boundary information of the preset area, including:
and in response to the number of the intersection points of the ray and the polygon being an odd number, determining that the monitoring device is located inside the preset area described by the polygon.
16. The method for determining the location of a monitoring device of claim 1,
the determining the shortest distance between the monitoring device and the preset area based on the position information of the monitoring device and the boundary information of the preset area includes:
determining the shortest distance between each line segment and the monitoring equipment based on the coordinate point of the monitoring equipment and the left end point and the right end point which respectively correspond to all line segments included in the polygon describing the preset area;
and selecting the shortest distance with the minimum numerical value to determine the shortest distance between the monitoring equipment and the preset area.
17. The method of determining the position of the monitoring device according to claim 16, wherein the coordinate point of the monitoring device is (X, Y), and the coordinate of the left end point of the line segment is (X) a ,Y a ) The coordinate of the right end point is (X) b ,Y b ),
The determining the shortest distance between each line segment and the monitoring device based on the coordinate point of the monitoring device and the left end point and the right end point corresponding to all line segments included in the polygon describing the preset area respectively comprises:
judging whether an included angle between a straight line between a coordinate point of the monitoring equipment and a left end point of the line segment and the line segment is an obtuse angle;
in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a )<When the angle is 0, determining that the included angle between the straight line between the coordinate point of the monitoring equipment and the left end point of the line segment and the line segment is an obtuse angle;
and determining that a connecting line between the coordinate point of the monitoring equipment and the left end point of the line segment is a shortest connecting line.
18. The method for determining the location of a monitoring device of claim 17,
the determining a shortest distance between each line segment and the monitoring device based on a coordinate point of the monitoring device and a left end point and a right end point corresponding to all line segments included in a polygon describing the preset area respectively includes:
in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a ) If the angle is more than 0, judging whether an included angle between a straight line between a coordinate point of the monitoring equipment and a right end point of the line segment and the line segment is an obtuse angle;
in response to (X) b -X a )×(X-X a )+(Y b -Y a )×(Y-Y a )>(X b -X a )×(X b -X a )+(Y b -Y a )×(Y b -Y a ) Determining that an included angle between a straight line between a coordinate point of the monitoring equipment and a right end point of the line segment and the line segment is an obtuse angle;
and determining that a connecting line between the coordinate point of the monitoring equipment and the right end point of the line segment is a shortest connecting line.
19. The method of determining the location of a monitoring device of claim 18,
the determining the shortest distance between each line segment and the monitoring device based on the coordinate point of the monitoring device and the left end point and the right end point corresponding to all line segments included in the polygon describing the preset area respectively comprises:
determining a projection point of the coordinate point of the monitoring device projected on the line segment in response to that an included angle between a straight line between the coordinate point of the monitoring device and a left end point of the line segment and an included angle between a straight line between the coordinate point of the monitoring device and a right end point of the line segment and the line segment are all non-obtuse angles; wherein a straight line between the coordinate point of the monitoring equipment and the projection point is perpendicular to the line segment;
and determining a connecting line between the coordinate point of the monitoring equipment and the projection point as a shortest connecting line.
20. The method of determining the location of a monitoring device of claim 19, wherein the coordinates of the proxel are (X) * ,Y * ),
The determining a projection point of the coordinate point of the monitoring device projected on the line segment includes:
calculating to obtain the coordinates of the projection points based on a formula 1 and a formula 2;
X * =X a +(X b -X a ) Xr (equation 1)
Y * =Y a +(Y b -Y a ) Xr (equation 2)
In the formula: x * ,Y * The coordinates of the projection points, r, are angular coefficients.
21. The method of determining the location of a monitoring device of claim 20,
the determining a projection point of the coordinate point of the monitoring device on the line segment further includes:
calculating to obtain an angle coefficient r in formula 1 and formula 2 based on formula 3;
Figure FDA0003632835220000071
22. the method of determining the location of a monitoring device according to any one of claims 17 to 19,
the determining the shortest distance between each line segment and the monitoring device includes:
calculating to obtain the shortest distance between the monitoring equipment and the line segment based on a formula 4;
D min =6371000 × acos θ (equation 4).
23. The method for determining the location of a monitoring device of claim 22,
the determining the shortest distance between each line segment and the monitoring device further includes:
calculating theta in formula 4 based on formula 5;
Figure FDA0003632835220000072
in the formula: x and Y are coordinates of one end point of the shortest connecting line, namely coordinates of a coordinate point of the monitoring equipment; x 'and Y' are coordinates of the other end point of the shortest connecting line.
24. The method of determining the location of a monitoring device according to any one of claims 17 to 19,
the determining the shortest distance between each line segment and the monitoring equipment comprises:
calculating to obtain the shortest distance between the monitoring equipment and the line segment based on a formula 6;
D min =2 × 6371000 × asin β (equation 6).
25. The method of determining the location of a monitoring device of claim 24,
the determining a shortest distance between each of the line segments and the monitoring device further includes:
calculating beta in a formula 6 based on a formula 7;
Figure FDA0003632835220000073
in the formula: x and Y are coordinates of one end point of the shortest connecting line, namely coordinates of a coordinate point of the monitoring equipment; and X 'and Y' are coordinates of the other end point of the shortest connecting line.
26. A position determining apparatus of a monitoring device, the position determining apparatus of the monitoring device comprising:
the acquisition module is used for acquiring the position information of the monitoring equipment and acquiring the boundary information of a preset area;
the analysis module is used for determining the shortest distance between the monitoring equipment and the preset area based on the position information of the monitoring equipment and the boundary information of the preset area in response to the fact that the monitoring equipment is not located in the preset area;
the determining module is configured to determine that the monitoring device is located in the preset area in response to that the shortest distance between the monitoring device and the preset area is smaller than a preset distance, so as to associate the monitoring data acquired by the monitoring device with the preset area.
27. A terminal, characterized in that the terminal comprises a memory, a processor and a computer program stored in the memory and run on the processor, the processor being configured to execute sequence data to implement the steps in the method of position determination of a monitoring device according to any of claims 1-25.
28. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method for determining a position of a monitoring device according to any one of claims 1 to 25.
CN202210495404.7A 2022-05-07 2022-05-07 Position determination method and device of monitoring equipment, terminal and storage medium Pending CN115243191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210495404.7A CN115243191A (en) 2022-05-07 2022-05-07 Position determination method and device of monitoring equipment, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210495404.7A CN115243191A (en) 2022-05-07 2022-05-07 Position determination method and device of monitoring equipment, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN115243191A true CN115243191A (en) 2022-10-25

Family

ID=83668505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210495404.7A Pending CN115243191A (en) 2022-05-07 2022-05-07 Position determination method and device of monitoring equipment, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN115243191A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115982542A (en) * 2023-03-21 2023-04-18 湖北泰跃卫星技术发展股份有限公司 Method and device for calculating adjacent relation between lands and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115982542A (en) * 2023-03-21 2023-04-18 湖北泰跃卫星技术发展股份有限公司 Method and device for calculating adjacent relation between lands and storage medium
CN115982542B (en) * 2023-03-21 2023-08-29 湖北泰跃卫星技术发展股份有限公司 Method, device and storage medium for calculating adjacent relation between lands

Similar Documents

Publication Publication Date Title
CN112752093B (en) Video fringe detection method and device, storage medium and electronic device
CN113743344B (en) Road information determining method and device and electronic equipment
CN110967028A (en) Navigation map construction method and device, robot and storage medium
CN108154516B (en) Point cloud topological segmentation method and device for closed space
CN111460986A (en) Lane line processing method and device
CN115243191A (en) Position determination method and device of monitoring equipment, terminal and storage medium
CN109711321A (en) A kind of wide Baseline Images unchanged view angle linear feature matching process of structure adaptive
CN109697333A (en) Detection method, device and the electronic equipment of pipeline detection database
CN115388344B (en) Pipeline leakage monitoring method based on distributed coordination detection
CN109341688A (en) A kind of map calling location algorithm based on construction sequence
CN113850996B (en) Road section bus line repetition coefficient data calculation method and device and storage medium
CN110109165B (en) Method and device for detecting abnormal points in driving track
CN110826121B (en) Method and system for automatically positioning house type corridor and entrance
CN114266317A (en) Clustering method and device and server
CN112509135B (en) Element labeling method, element labeling device, element labeling equipment, element labeling storage medium and element labeling computer program product
CN114705180B (en) Data correction method, device and equipment for high-precision map and storage medium
CN113674358B (en) Calibration method and device of radar equipment, computing equipment and storage medium
CN115639578A (en) Beidou navigation positioning monitoring processing method and system
CN114323021B (en) Method and device for estimating intersection area in high-precision map and intelligent vehicle
CN114838704A (en) Height detection method and device and computer readable storage medium
CN114302326A (en) Positioning area determining method, positioning method and device and positioning equipment
CN114117121A (en) Data acquisition method for smart city
CN110909668A (en) Target detection method and device, computer readable storage medium and electronic equipment
CN113536025B (en) Method and device for determining signboard orientation of interest point, electronic equipment and storage medium
CN116502816B (en) Land parcel monitoring well layout method suitable for pollutants

Legal Events

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