Mobile speed measurement method, system, electronic device and readable storage medium

By obtaining the geographical coordinate matrix and area image flow of the target area, establishing the image coordinate matrix and determining the perspective transformation matrix, the image deformation problem caused by the perspective principle in the prior art is solved, and the accuracy of movement speed measurement is improved.

CN115290921BActive Publication Date: 2025-06-27CHONGQING UNISINSIGHT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210518817.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-12
Publication Date
2025-06-27
Estimated Expiration
2042-05-12

AI Technical Summary

Technical Problem

The existing moving speed measurement method causes image deformation caused by the perspective principle due to the tilt angle of the monitoring device, thereby reducing the accuracy of the movement speed acquisition.

Method used

By obtaining the geographical coordinate matrix and area image flow of the target area, establishing the image coordinate matrix, and determining the perspective transformation matrix, converting the image coordinate points into geographic coordinate points, thereby accurately measuring the movement speed.

Benefits of technology

This reduces image deformation caused by perspective principle and improves the accuracy of movement speed measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115290921B_ABST
    Figure CN115290921B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of video processing, and discloses a moving speed measurement method, system, electronic device and readable storage medium. The method obtains a perspective transformation matrix according to a geographic coordinate matrix and an image coordinate matrix, and converts the image coordinate points of a target to be measured in the image into geographic coordinate points in the real world through the perspective transformation matrix, so as to determine the real moving speed of the target to be measured. Compared with estimating the real moving speed through the pixel moving distance, the image deformation caused by the perspective principle is reduced, and the accuracy of moving speed measurement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video processing, and particularly to a method, a system, an electronic device and a readable storage medium for measuring moving speed. Background Art

[0002] Currently, with the development of video technology, in the field of security, through image monitoring technology and computer image processing technology, it is possible to measure the speed of moving objects such as cars, bicycles, and motorcycles in a target area, and then supervise, warn, and avoid moving objects with too high moving speed to avoid potential safety hazards.

[0003] Existing methods for measuring moving speed usually estimate the actual moving speed through the pixel moving distance of a moving object in an image. However, there is an inclination angle between the monitoring device as the viewing point and the ground. Due to the perspective principle, the phenomenon of size change and shape change will occur when observing objects in different directions and at different distances. Therefore, it is impossible to accurately judge the movement of the target object through image pixels, and thus the accuracy of obtaining the moving speed is relatively low. Summary of the Invention

[0004] To provide a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a comprehensive review, nor is it intended to identify key / important elements or delineate the scope of protection of these embodiments. Instead, it serves as a preface to the subsequent detailed description.

[0005] In view of the above-mentioned disadvantages of the prior art, the present invention discloses a method, a system, an electronic device and a readable storage medium for measuring moving speed to improve the accuracy of obtaining the moving speed.

[0006] The present invention discloses a method for measuring moving speed, including: obtaining a geographic coordinate matrix corresponding to a target area and a regional image stream corresponding to the target area; establishing an image coordinate matrix corresponding to the target area based on the regional image stream, and determining a perspective transformation matrix in which the image coordinate matrix is mapped to the geographic coordinate matrix; determining image coordinate points corresponding to a to-be-measured target at multiple recording timestamps in the regional image stream, and determining geographic coordinate points corresponding to each of the image coordinate points based on the perspective transformation matrix; determining the moving distance of the to-be-measured target according to at least a part of the geographic coordinate points corresponding to the recording timestamps, and determining the moving speed of the to-be-measured target according to the moving distance and the recording timestamp corresponding to the moving distance.

[0007] Optionally, determining the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the regional image stream includes: performing target recognition corresponding to the target to be measured on the regional image stream; if the target to be measured is recognized in the regional image stream, obtaining the minimum bounding box of the target to be measured in the regional image stream, and taking any point in the minimum bounding box as the target reference point; obtaining the current timestamp as the recording timestamp every preset number of image frames, and at the same time, determining the position of the target reference point at the current timestamp as the image coordinate point corresponding to the recording timestamp.

[0008] Optionally, before determining the geographic coordinate points corresponding to the image coordinate points based on the perspective transformation matrix, the method further includes: dividing the target area in the regional image stream to obtain multiple sub-areas, and determining the scaling ratio corresponding to each sub-area according to the geographic coordinate matrix and the image coordinate matrix corresponding to each sub-area; taking the sub-area with the largest pixel area as the main area according to the pixel area of each sub-area; if the pixel difference between a sub-area and the main area is greater than a preset threshold, determining the sub-area as the area to be corrected, and determining the correction parameter based on the scaling ratios corresponding to the main area and the area to be corrected; after determining the geographic coordinate points corresponding to the image coordinate points based on the perspective transformation matrix, performing perspective distortion correction on the geographic coordinate points corresponding to the coordinates to be corrected according to the correction parameter, where the coordinates to be corrected are the image coordinate points located in the area to be corrected.

[0009] Optionally, determining the moving distance of the target to be measured according to the geographic coordinate points corresponding to at least a part of the recording timestamps, and determining the moving speed of the target to be measured according to the moving distance and the recording timestamp corresponding to the moving distance includes: taking any two recording timestamps as the first timestamp and the second timestamp respectively; determining the moving time of the target to be measured according to the first timestamp and the second timestamp, and determining the moving distance of the target to be measured according to the geographic coordinate points corresponding to the first timestamp and the geographic coordinate points corresponding to the second timestamp; determining the moving speed of the target to be measured based on the moving distance and the moving time.

[0010] Optionally, determining the image coordinate points corresponding to the target to be measured in the regional image stream at multiple recording timestamps, and determining the geographical coordinate points corresponding to each of the image coordinate points based on the perspective transformation matrix includes: storing the perspective transformation matrix in a preset storage space, and determining a monitoring device as the target device from a preset monitoring device; obtaining the regional image stream corresponding to the target area through the target device, and determining the image coordinate points corresponding to the target to be measured in the regional image stream at multiple recording timestamps; extracting the perspective transformation matrix from the preset storage space through the target device, and determining the geographical coordinate points corresponding to each of the image coordinate points based on the perspective transformation matrix.

[0011] Optionally, obtaining the geographical coordinate matrix corresponding to the target area by the following method: collecting the area size information of the target area based on a preset length unit, and establishing a Dillka coordinate system in the target area, wherein any point in the target area is determined as the coordinate origin of the Dillka coordinate system, and any two straight lines perpendicular to each other and intersecting at the coordinate origin are respectively used as the x-axis and y-axis of the Dillka coordinate system; determining the geographical coordinate matrix corresponding to the target area based on the area size information and the Dillka coordinate system.

[0012] Optionally, obtaining the geographical coordinate matrix corresponding to the target area by the following method: the target area includes a rectangular area; collecting the area size information of the rectangular area based on a preset length unit, and establishing a Dillka coordinate system in the plane where the rectangular area is located, wherein the vertex of any angle of the rectangular area is determined as the coordinate origin of the Dillka coordinate system, and the two sides of the rectangular area intersecting at the coordinate origin are respectively used as the x-axis and y-axis of the Dillka coordinate system; determining the vertex geographical coordinates corresponding to the four vertices in the target area according to the area size information and the Dillka coordinate system, and determining the geographical coordinate matrix corresponding to the target area based on each of the vertex geographical coordinates.

[0013] Optionally, establishing the image coordinate matrix corresponding to the target area based on the regional image stream includes: establishing a pixel coordinate system in the regional image stream; extracting the vertex pixel coordinates corresponding to the four vertices in the target area from the regional image stream based on the pixel coordinate system; determining the image coordinate matrix corresponding to the target area based on each of the vertex pixel coordinates.

[0014] The present invention discloses a mobile speed measurement system, including: an acquisition module, configured to acquire a geographic coordinate matrix corresponding to a target area and a regional image stream corresponding to the target area; a matrix determination module, configured to establish an image coordinate matrix corresponding to the target area based on the regional image stream, and determine a perspective transformation matrix for mapping the image coordinate matrix to the geographic coordinate matrix; a coordinate determination module, configured to determine image coordinate points of a target to be measured corresponding to a plurality of recording timestamps in the regional image stream, and determine geographic coordinate points corresponding to each of the image coordinate points based on the perspective transformation matrix; a calculation module, configured to determine the moving distance of the target to be measured according to at least a part of the geographic coordinate points corresponding to the recording timestamps, and determine the moving speed of the target to be measured according to the moving distance and the recording timestamp corresponding to the moving distance.

[0015] The present invention discloses an electronic device, including: a processor and a memory; the memory is configured to store a computer program, and the processor is configured to execute the computer program stored in the memory, so that the electronic device executes the above method.

[0016] The present invention discloses a computer-readable storage medium, on which a computer program is stored: when the computer program is executed by a processor, the above method is implemented.

[0017] Advantages of the present invention:

[0018] By acquiring a geographic coordinate matrix corresponding to a target area and a regional image stream corresponding to the target area, establishing an image coordinate matrix corresponding to the target area based on the regional image stream, determining a perspective transformation matrix for mapping the image coordinate matrix to the geographic coordinate matrix, determining image coordinate points of a target to be measured corresponding to a plurality of recording timestamps in the regional image stream, determining geographic coordinate points corresponding to each of the image coordinate points based on the perspective transformation matrix, determining the moving distance of the target to be measured according to at least a part of the geographic coordinate points corresponding to the recording timestamps, and determining the moving speed of the target to be measured according to the moving distance and the recording timestamp corresponding to the moving distance. In this way, a perspective transformation matrix is obtained according to the geographic coordinate matrix and the image coordinate matrix, and the image coordinate points of the target to be measured in the image are converted into geographic coordinate points in the real world through the perspective transformation matrix, so as to determine the real moving speed of the target to be measured. Compared with estimating the real moving speed through the pixel moving distance, the image deformation caused by the perspective principle is reduced, and the accuracy of the moving speed measurement is improved. Description of the Drawings

[0019] Figure 1 is a schematic flowchart of a mobile speed measurement method in an embodiment of the present invention;

[0020] Figure 2 is a schematic diagram of four vertices of a target area in a regional image stream in an embodiment of the present invention;

[0021] Figure 3 It is a schematic flowchart of another moving speed measurement method in an embodiment of the present invention;

[0022] Figure 4 It is a schematic structural diagram of a moving speed measurement system in an embodiment of the present invention;

[0023] Figure 5 It is a schematic structural diagram of an electronic device in an embodiment of the present invention. Detailed implementation manners

[0024] The following uses specific specific examples to illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, without conflict, the following embodiments and sub-samples in the embodiments can be combined with each other.

[0025] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Therefore, only the components related to the present invention are shown in the diagrams, rather than being drawn according to the number, shape, and size of the components in actual implementation. In actual implementation, the types, quantities, and proportions of the components can be arbitrarily changed, and the component layout type may also be more complex.

[0026] In the following description, a large number of details are explored to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0027] In the specification, claims, and above-mentioned drawings of the embodiments of the present disclosure, the terms "first", "second", etc. are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so as to implement the embodiments of the present disclosure described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion.

[0028] Unless otherwise specified, the term "plurality" means two or more.

[0029] In the embodiments of the present disclosure, the character " / " indicates that the objects before and after are in an "or" relationship. For example, A / B means: A or B.

[0030] The term "and / or" describes the associated relationship of an object, indicating that there can be three relationships. For example, A and / or B means: A or B, or, the three relationships of A and B.

[0031] Combine Figure 1 As shown, an embodiment of the present disclosure provides a moving speed measurement method, including:

[0032] Step S101, obtaining a geographic coordinate matrix corresponding to a target area and a regional image stream corresponding to the target area;

[0033] Step S102, establishing an image coordinate matrix corresponding to the target area based on the regional image stream, and determining a perspective transformation matrix for mapping the image coordinate matrix to the geographic coordinate matrix;

[0034] Step S103, determining image coordinate points corresponding to a to-be-measured target at multiple recording timestamps in the regional image stream, and determining geographic coordinate points corresponding to each image coordinate point based on the perspective transformation matrix;

[0035] Step S104, determining the moving distance of the to-be-measured target according to at least a part of the geographic coordinate points corresponding to the recording timestamps, and determining the moving speed of the to-be-measured target according to the moving distance and the recording timestamp corresponding to the moving distance.

[0036] By using the moving speed measurement method provided by the embodiment of the present disclosure, by obtaining a geographic coordinate matrix corresponding to a target area and a regional image stream corresponding to the target area, establishing an image coordinate matrix corresponding to the target area based on the regional image stream, determining a perspective transformation matrix (i.e., a projective transformation matrix) for mapping the image coordinate matrix to the geographic coordinate matrix, determining image coordinate points corresponding to a to-be-measured target at multiple recording timestamps in the regional image stream, determining geographic coordinate points corresponding to each image coordinate point based on the perspective transformation matrix, determining the moving distance of the to-be-measured target according to at least a part of the geographic coordinate points corresponding to the recording timestamps, and determining the moving speed of the to-be-measured target according to the moving distance and the recording timestamp corresponding to the moving distance. In this way, a perspective transformation matrix is obtained according to the geographic coordinate matrix and the image coordinate matrix, and the image coordinate points of the to-be-measured target in the image are converted into geographic coordinate points in the real world through the perspective transformation matrix, so as to determine the real moving speed of the to-be-measured target. Compared with estimating the real moving speed through the pixel moving distance, the image deformation caused by the perspective principle is reduced, and the accuracy of the moving speed measurement is improved.

[0037] Optionally, obtain the geographic coordinate matrix corresponding to the target area in the following manner: collect the area size information of the target area based on a preset length unit, and establish a Dillka coordinate system in the target area. Among them, determine any point in the target area as the coordinate origin of the Dillka coordinate system, and use any two mutually perpendicular lines intersecting at the coordinate origin as the x-axis and y-axis of the Dillka coordinate system respectively; determine the geographic coordinate matrix corresponding to the target area based on the area size information and the Dillka coordinate system.

[0038] In some embodiments, the preset length unit is one of units such as centimeter, inch, meter, mile, kilometer, etc. For example, meter.

[0039] Optionally, obtain the geographic coordinate matrix corresponding to the target area in the following manner: the target area includes a rectangular area; collect the area size information of the rectangular area based on a preset length unit, and establish a Dillka coordinate system in the plane where the rectangular area is located. Among them, determine the vertex of any corner of the rectangular area as the coordinate origin of the Dillka coordinate system, and use the two sides intersecting at the coordinate origin in the rectangular area as the x-axis and y-axis of the Dillka coordinate system respectively; determine the vertex geographic coordinates corresponding to the four vertices in the target area according to the area size information and the Dillka coordinate system, and determine the geographic coordinate matrix corresponding to the target area based on the vertex geographic coordinates of each vertex.

[0040] In some embodiments, arbitrarily select a planar rectangular area with a length of H meters and a width of W meters as the target area, establish a Dillka coordinate system in the plane where the rectangular area is located, determine the vertex geographic coordinates corresponding to the four vertices in the target area according to the area size information and the Dillka coordinate system, which are (0,0), (0,H), (W,0), (W,H) respectively; establish a geographic coordinate matrix based on the vertex geographic coordinates corresponding to the four vertices

[0041] Optionally, establish an image coordinate matrix corresponding to the target area based on the regional image stream, including: establish a pixel coordinate system in the regional image stream; extract the vertex pixel coordinates corresponding to the four vertices in the target area in the regional image stream based on the pixel coordinate system; determine the image coordinate matrix corresponding to the target area based on the vertex pixel coordinates of each vertex.

[0042] In some embodiments, the target area is a planar rectangular area with a length of H meters and a width of W meters; establish a pixel coordinate system in the regional image stream, determine the vertex pixel coordinates corresponding to the four vertices in the regional image stream, and the four vertices of the target area in the regional image stream are as Figure 2 shown, which are (x1,y1), (x2,y2), (x3,y3), (x4,y4) respectively; establish an image coordinate matrix based on the vertex pixel coordinates corresponding to the 4 vertices

[0043] Optionally, the perspective transformation matrix is determined by the following formula:

[0044] S = P * M;

[0045] Where S is the geographic coordinate matrix, P is the image coordinate matrix, and M is the perspective transformation matrix.

[0046] In some embodiments, determining the perspective transformation matrix for mapping the image coordinate matrix to the geographic coordinate matrix includes: calculating the perspective transformation matrix from P to S, where the perspective transformation matrix is used to transform any point of the target area in the area image stream into a position in the Dillka coordinate system.

[0047] Optionally, determining the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the area image stream includes: performing target recognition corresponding to the target to be measured on the area image stream; if the target to be measured is recognized in the area image stream, obtaining the minimum bounding box of the target to be measured in the area image stream, and taking any point in the minimum bounding box as the target reference point; every preset number of image frames, obtaining the current timestamp as the recording timestamp, and at the same time, determining the position of the target reference point at the current timestamp as the image coordinate point corresponding to the recording timestamp.

[0048] Optionally, the minimum bounding box includes a minimum bounding rectangle, and the center of the bottom edge of the minimum bounding rectangle is used as the target reference point.

[0049] In this way, any point of the target to be measured in the minimum bounding box is used as the target reference point, the image coordinate points corresponding to the recording timestamps are determined through the target reference point, and then the geographic coordinate points corresponding to the image coordinate points are determined through the perspective transformation matrix, eliminating the influence of the transformation between the three-dimensional world and the two-dimensional image, without the need to obtain the height and width information of the target to be measured, and improving the accuracy of the moving speed measurement.

[0050] Optionally, before determining the geographic coordinate points corresponding to each image coordinate point based on the perspective transformation matrix, the method further includes: dividing the target area in the area image stream to obtain multiple sub-areas, and determining the scaling ratio corresponding to each sub-area according to the geographic coordinate matrix and the image coordinate matrix corresponding to each sub-area; according to the pixel area of each sub-area, taking the sub-area corresponding to the largest pixel area as the main area; if the pixel difference between a sub-area and the main area is greater than a preset threshold, determining the sub-area as the area to be corrected, and determining the correction parameter based on the scaling ratios corresponding to the main area and the area to be corrected; after determining the geographic coordinate points corresponding to each image coordinate point based on the perspective transformation matrix, performing perspective distortion correction on the geographic coordinate points corresponding to the coordinates to be corrected according to the correction parameter, where the coordinates to be corrected are the image coordinate points located in the area to be corrected.

[0051] In this way, by dividing the target area into multiple sub-areas, since the sub-areas with larger areas contain more information, the sub-area with the largest area is used as the main area, and the perspective distortion of each area to be corrected is corrected through the main area, which not only reduces the global perspective distortion of the image, but also reduces the local perspective distortion, solves the deformation phenomenon caused by different areas of the image (such as horizontal stretching and radial stretching), improves the accuracy of geographical coordinate points, and thus improves the accuracy of moving speed measurement.

[0052] In some embodiments, the target area in the regional image stream is divided according to the lane line to obtain multiple sub-areas, and the scaling ratio corresponding to each sub-area is determined according to the geographical coordinate matrix and the image coordinate matrix corresponding to each sub-area; according to the pixel area of each sub-area, the sub-area corresponding to the largest pixel area is used as the main area; if the pixel difference between a sub-area and the main area is greater than a preset threshold, the sub-area is determined as the area to be corrected, and the correction parameter is determined based on the scaling ratios corresponding to the main area and the area to be corrected; after determining the geographical coordinate points corresponding to each image coordinate point based on the perspective transformation matrix, the perspective distortion of the geographical coordinate points corresponding to the coordinates to be corrected is corrected according to the correction parameter, where the coordinates to be corrected are the image coordinates located in the area to be corrected.

[0053] Optionally, the moving distance of the target to be measured is determined according to the geographical coordinate points corresponding to at least a part of the recorded timestamps, and the moving speed of the target to be measured is determined according to the moving distance and the recorded timestamp corresponding to the moving distance, including: taking any two recorded timestamps as the first timestamp and the second timestamp respectively; determining the moving time of the target to be measured according to the first timestamp and the second timestamp, and determining the moving distance of the target to be measured according to the geographical coordinate points corresponding to the first timestamp and the geographical coordinate points corresponding to the second timestamp; determining the moving speed of the target to be measured based on the moving distance and the moving time.

[0054] Optionally, the moving distance of the target to be measured is determined by the following formula:

[0055]

[0056] In the formula, s is the moving distance, the coordinates of the geographical coordinate point of the first timestamp are (a1, b1), and the coordinates of the geographical coordinate point of the second timestamp are (a2, b2).

[0057] Optionally, the moving speed of the target to be measured is determined by the following formula:

[0058]

[0059] Wherein, v is the moving speed of the target to be measured, t1 is the time point of the first timestamp, and t2 is the time point of the second timestamp.

[0060] Optionally, determine the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the regional image stream, and determine the geographical coordinate points corresponding to each image coordinate point based on the perspective transformation matrix, including: storing the perspective transformation matrix in a preset storage space, and determining a monitoring device as the target device from the preset monitoring devices; obtaining the regional image stream corresponding to the target area through the target device, and determining the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the regional image stream; extracting the perspective transformation matrix from the preset storage space through the target device, and determining the geographical coordinate points corresponding to each image coordinate point based on the perspective transformation matrix.

[0061] Optionally, the preset storage space includes one or more of a database side, a server side, etc.; the monitoring devices include one or more of an IPC (IP CAMERA) or an NVR (Network Video Recorder), etc.

[0062] In some embodiments, specify a monitoring device as the target device through a position calibration method, and create a moving speed measurement task in the target device; the target device performs target recognition on the regional image stream based on an artificial intelligence algorithm to obtain the target to be measured, determine the image coordinate points corresponding to the target to be measured at multiple recording timestamps, extract the perspective transformation matrix through the preset storage space, determine the geographical coordinate points corresponding to each image coordinate point based on the perspective transformation matrix, and further determine the moving speed of the target to be measured.

[0063] Combined Figure 3 As shown, an embodiment of the present disclosure provides a moving speed measurement method, including:

[0064] Step S301, the target device obtains the geographical coordinate matrix and the image coordinate matrix of the target area;

[0065] Step S302, the target device determines the perspective transformation matrix for mapping the image coordinate matrix to the geographical coordinate matrix;

[0066] Step S303, the target device sends the perspective transformation matrix to the database side;

[0067] Step S304, the database side stores the perspective transformation matrix;

[0068] Step S305, the target device identifies the target to be measured in the regional image stream corresponding to the target area;

[0069] Step S306, if the target to be measured is identified, the target device determines the image coordinate points corresponding to the target to be measured at multiple recording timestamps;

[0070] Step S307, the database side sends the stored perspective transformation matrix to the target device;

[0071] Step S308: The target device determines the geographical coordinate points corresponding to each image coordinate point based on the perspective transformation matrix.

[0072] Step S309: The target device determines the moving speed of the target to be measured based on the geographical coordinate points corresponding to the recorded timestamps.

[0073] By using the moving speed measurement method provided in the embodiments of the present disclosure, by obtaining the geographical coordinate matrix corresponding to the target area and the area image stream corresponding to the target area, establishing the image coordinate matrix corresponding to the target area based on the area image stream, determining the perspective transformation matrix that maps the image coordinate matrix to the geographical coordinate matrix, determining the image coordinate points corresponding to the target to be measured at multiple recorded timestamps in the area image stream, determining the geographical coordinate points corresponding to each image coordinate point based on the perspective transformation matrix, determining the moving distance of the target to be measured according to at least some of the geographical coordinate points corresponding to the recorded timestamps, and determining the moving speed of the target to be measured according to the moving distance and the recorded timestamp corresponding to the moving distance, the following advantages are achieved:

[0074] First, the perspective transformation matrix is obtained based on the geographical coordinate matrix and the image coordinate matrix, and the image coordinate points of the target to be measured in the image are converted into geographical coordinate points in the real world through the perspective transformation matrix, thereby determining the real moving speed of the target to be measured. Compared with estimating the real moving speed through the pixel moving distance, the image deformation caused by the perspective principle is reduced, and the accuracy of the moving speed measurement is improved.

[0075] Second, by dividing the target area into multiple sub-areas, since the sub-area with a large area contains more information, the sub-area with the largest area is used as the main area, and the perspective distortion of each area to be corrected is corrected through the main area. This not only reduces the global perspective distortion of the image but also reduces the local perspective distortion, solves the deformation phenomenon caused by different areas of the image (such as horizontal stretching and radial stretching), improves the accuracy of the geographical coordinate points, and thus improves the accuracy of the moving speed measurement.

[0076] Third, any point in the minimum circumscribed bounding box of the target to be measured is used as the target reference point, the image coordinate points corresponding to the recorded timestamp are determined through the target reference point, and then the geographical coordinate points corresponding to the image coordinate points are determined through the perspective transformation matrix, eliminating the influence of the transformation between the three-dimensional world and the two-dimensional image. There is no need to obtain the height and width information of the target to be measured, and the accuracy of the moving speed measurement is improved.

[0077] In some embodiments, the geographical coordinate matrix of the target area The image coordinate matrix of the target area Determine the perspective transformation matrix that maps the image coordinate matrix to the geographical coordinate matrix Determine the first timestamp t1 = 5044, the second timestamp t2 = 5050 of the target to be measured, as well as the image coordinate points (53, 480) corresponding to the first timestamp and the image coordinate points (897, 277) corresponding to the second timestamp; based on the perspective transformation matrix M, determine the geographical coordinate points (2.50, 5.71) corresponding to the first timestamp of the target to be measured and the geographical coordinate points (8.29, 13.29) corresponding to the second timestamp, and then determine that the moving distance of the target to be measured is s = 9.54 m and the moving time is 6 s, so as to determine the moving speed of the target to be measured as 1.59 m / s.

[0078] As shown in Figure 4 The embodiment of the present disclosure provides a moving speed measurement system, including an acquisition module 401, a matrix determination module 402, a coordinate determination module 403 and a calculation module 404. Among them, the acquisition module 401 is used to acquire the geographical coordinate matrix corresponding to the target area and the area image stream corresponding to the target area; the matrix determination module 402 establishes the image coordinate matrix corresponding to the target area based on the area image stream, and determines the perspective transformation matrix that maps the image coordinate matrix to the geographical coordinate matrix; the coordinate determination module 403 determines the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the area image stream, and determines the geographical coordinate points corresponding to each image coordinate point based on the perspective transformation matrix; the calculation module 404 determines the moving distance of the target to be measured according to the geographical coordinate points corresponding to at least a part of the recording timestamps, and determines the moving speed of the target to be measured according to the moving distance and the recording timestamp corresponding to the moving distance.

[0079] By using the moving speed measurement system provided by the embodiment of the present disclosure, by acquiring the geographical coordinate matrix corresponding to the target area and the area image stream corresponding to the target area, establishing the image coordinate matrix corresponding to the target area based on the area image stream, determining the perspective transformation matrix that maps the image coordinate matrix to the geographical coordinate matrix, determining the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the area image stream, determining the geographical coordinate points corresponding to each image coordinate point based on the perspective transformation matrix, determining the moving distance of the target to be measured according to the geographical coordinate points corresponding to at least a part of the recording timestamps, and determining the moving speed of the target to be measured according to the moving distance and the recording timestamp corresponding to the moving distance. In this way, the perspective transformation matrix is obtained according to the geographical coordinate matrix and the image coordinate matrix, and the image coordinate points of the target to be measured in the image are converted into geographical coordinate points in the real world through the perspective transformation matrix, and then the real moving speed of the target to be measured is determined. Compared with estimating the real moving speed through the pixel moving distance, the image deformation caused by the perspective principle is reduced, and the accuracy of the moving speed measurement is improved.

[0080] As shown in Figure 5As shown, an embodiment of the present disclosure provides an electronic device, including: a processor 500 and a memory 501; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory so that the terminal executes any method in this embodiment. Optionally, the electronic device may further include a communication interface 502 and a bus 503. Among them, the processor 500, the communication interface 502, and the memory 501 can complete mutual communication through the bus 503. The communication interface 502 can be used for information transmission. The processor 500 can call the logical instructions in the memory 501 to execute the methods in the above embodiments.

[0081] In addition, when the logical instructions in the above-mentioned memory 501 are implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a computer-readable storage medium.

[0082] The memory 501, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the methods in the embodiments of the present disclosure. The processor 500 executes functional applications and data processing by running the program instructions / modules stored in the memory 501, that is, implements the methods in the above embodiments.

[0083] The memory 501 may include a storage program area and a database file area. Among them, the storage program area can store an operating system and application programs required for at least one function; the database file area can store data created according to the use of the terminal device, etc. In addition, the memory 501 may include high-speed random access memory and may also include non-volatile memory.

[0084] By using the electronic device provided in the embodiments of the present disclosure, by obtaining the geographic coordinate matrix corresponding to the target area and the area image stream corresponding to the target area, establishing the image coordinate matrix corresponding to the target area based on the area image stream, determining the perspective transformation matrix for mapping the image coordinate matrix to the geographic coordinate matrix, determining the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the area image stream, determining the geographic coordinate points corresponding to each image coordinate point based on the perspective transformation matrix, determining the moving distance of the target to be measured according to the geographic coordinate points corresponding to at least a part of the recording timestamps, and determining the moving speed of the target to be measured according to the moving distance and the recording timestamp corresponding to the moving distance. In this way, the perspective transformation matrix is obtained according to the geographic coordinate matrix and the image coordinate matrix, and the image coordinate points of the target to be measured in the image are converted into the geographic coordinate points in the real world through the perspective transformation matrix, so as to determine the real moving speed of the target to be measured. Compared with estimating the real moving speed through the pixel moving distance, the image deformation caused by the perspective principle is reduced, and the accuracy of the moving speed measurement is improved.

[0085] The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements any one of the methods in this embodiment.

[0086] For the computer-readable storage medium in the embodiments of the present disclosure, those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to the computer program. The foregoing computer program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disk or optical disk that can store program codes.

[0087] The electronic device disclosed in this embodiment includes a processor, a memory, a transceiver, and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store a computer program, the communication interface is used for communication, and the processor and the transceiver are used to run the computer program to enable the electronic device to execute each step of the above method.

[0088] In this embodiment, the memory may include a random access memory (Random Access Memory, abbreviated as RAM), and may also include a non-volatile memory, such as at least one disk memory.

[0089] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0090] The above description and the drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process, and other changes. The embodiments only represent possible variations. Unless explicitly required, the individual components and functions are optional, and the order of operations may vary. Parts and sub-samples of some embodiments may be included in or replace parts and sub-samples of other embodiments. Moreover, the terms used in this application are only for describing the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to also include the plural forms. Similarly, as used in this application, the term "and / or" refers to any and all possible combinations including one or more of the associated listed items. Additionally, when used in this application, the term "comprise" and its variants "comprises" and / or "comprising", etc. refer to the presence of the stated sub-samples, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components, and / or groupings of these. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of another identical element in the process, method, or device including the element. In this article, each embodiment may focus on the differences from other embodiments, and the same or similar parts between the embodiments may be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, the relevant parts may refer to the description of the method part.

[0091] Those skilled in the art will realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner can depend on the specific application and design constraints of the technical solution. The skilled person can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the embodiments of the present disclosure. The skilled person can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0092] In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units can be merely a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. Additionally, the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms. The units described as separate components can be or can not be physically separated, and the components shown as units can be or can not be physical units, that is, they can be located in one place or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to implement this embodiment. Additionally, in the embodiments of the present disclosure, the various functional units can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit.

[0093] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. Each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A method for measuring moving speed, characterized in that, Including: Obtain the geographic coordinate matrix corresponding to the target area and the area image stream corresponding to the target area; Based on the area image stream, establish the image coordinate matrix corresponding to the target area, and determine the perspective transformation matrix in which the image coordinate matrix is mapped to the geographic coordinate matrix; Determine the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the area image stream, and determine the geographic coordinate points corresponding to each of the image coordinate points based on the perspective transformation matrix; Determine the moving distance of the target to be measured according to the geographic coordinate points corresponding to at least a part of the recording timestamps, and determine the moving speed of the target to be measured according to the moving distance and the recording timestamp corresponding to the moving distance; Before determining the geographic coordinate points corresponding to each of the image coordinate points based on the perspective transformation matrix, the method further includes dividing the target area in the area image stream to obtain a plurality of sub-areas, and determining the scaling ratio corresponding to each of the sub-areas according to the geographic coordinate matrix and the image coordinate matrix corresponding to each of the sub-areas; According to the pixel area of each of the sub-areas, use the sub-area corresponding to the largest pixel area as the main area; If the pixel difference between a sub-area and the main area is greater than a preset threshold, determine the sub-area as the area to be corrected, and determine the correction parameter based on the scaling ratios corresponding to the main area and the area to be corrected; after determining the geographic coordinate points corresponding to each of the image coordinate points based on the perspective transformation matrix, perform perspective distortion correction on the geographic coordinate points corresponding to the coordinates to be corrected according to the correction parameter, where the coordinates to be corrected are the image coordinate points located in the area to be corrected.

2. The method according to claim 1, wherein Determining the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the area image stream includes: Perform target recognition corresponding to the target to be measured on the area image stream; If the target to be measured is recognized in the area image stream, obtain the minimum circumscribed bounding box of the target to be measured in the area image stream, and use any point in the minimum circumscribed bounding box as the target reference point; At every preset number of image frames, obtain the current timestamp as the recording timestamp, and at the same time, determine the position of the target reference point at the current timestamp as the image coordinate point corresponding to the recording timestamp.

3. The method according to claim 1, wherein Determining the moving distance of the target to be measured according to the geographic coordinate points corresponding to at least a part of the recording timestamps, and determining the moving speed of the target to be measured according to the moving distance and the recording timestamp corresponding to the moving distance includes: Use any two recording timestamps as the first timestamp and the second timestamp respectively; Determine the moving time of the target to be measured according to the first timestamp and the second timestamp, and determine the moving distance of the target to be measured according to the geographic coordinate points corresponding to the first timestamp and the geographic coordinate points corresponding to the second timestamp; Determine the moving speed of the target to be measured based on the moving distance and the moving time.

4. The method according to claim 1, wherein Determining the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the area image stream, and determining the geographic coordinate points corresponding to each of the image coordinate points based on the perspective transformation matrix includes: Store the perspective transformation matrix in a preset storage space, and determine a monitoring device from preset monitoring devices as the target device; Obtain the regional image stream corresponding to the target area through the target device, and determine the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the regional image stream; Extract the perspective transformation matrix from the preset storage space through the target device, and determine the geographic coordinate points corresponding to each of the image coordinate points based on the perspective transformation matrix.

5. The method according to any one of claims 1 to 4, characterized in that, Obtain the geographic coordinate matrix corresponding to the target area in the following manner: Collect the regional dimension information of the target area based on a preset length unit, and establish a Dillka coordinate system in the target area, where any point in the target area is determined as the coordinate origin of the Dillka coordinate system, and any two straight lines that are perpendicular to each other and intersect at the coordinate origin are respectively used as the x-axis and y-axis of the Dillka coordinate system; Determine the geographic coordinate matrix corresponding to the target area based on the regional dimension information and the Dillka coordinate system.

6. The method according to any one of claims 1 to 4, characterized in that, Obtain the geographic coordinate matrix corresponding to the target area in the following manner: The target area includes a rectangular area; Collect the regional dimension information of the rectangular area based on a preset length unit, and establish a Dillka coordinate system in the plane where the rectangular area is located, where the vertex of any angle of the rectangular area is determined as the coordinate origin of the Dillka coordinate system, and the two sides of the rectangular area that intersect at the coordinate origin are respectively used as the x-axis and y-axis of the Dillka coordinate system; Determine the vertex geographic coordinates corresponding to the four vertices in the target area according to the regional dimension information and the Dillka coordinate system, and determine the geographic coordinate matrix corresponding to the target area based on each of the vertex geographic coordinates.

7. The method according to claim 6, characterized in that, Establish the image coordinate matrix corresponding to the target area based on the regional image stream, including: Establish a pixel coordinate system in the regional image stream; Extract the vertex pixel coordinates corresponding to the four vertices in the target area in the regional image stream based on the pixel coordinate system; Determine the image coordinate matrix corresponding to the target area based on each of the vertex pixel coordinates.

8. A mobile speed measurement system, characterized in that, Including: An acquisition module, configured to acquire the geographic coordinate matrix corresponding to the target area and the regional image stream corresponding to the target area; A matrix determination module, configured to establish the image coordinate matrix corresponding to the target area based on the regional image stream, and determine the perspective transformation matrix in which the image coordinate matrix is mapped to the geographic coordinate matrix; A coordinate determination module, configured to determine the image coordinate points corresponding to the target to be measured at multiple recording timestamps in the regional image stream, and determine the geographic coordinate points corresponding to each of the image coordinate points based on the perspective transformation matrix; A calculation module, configured to determine the moving distance of the target to be measured according to the geographic coordinate points corresponding to at least a part of the recording timestamps, and determine the moving speed of the target to be measured according to the moving distance and the recording timestamp corresponding to the moving distance; The coordinate determination module is further configured to divide the target region in the regional image stream to obtain a plurality of sub-regions, and determine the scaling ratio corresponding to each sub-region according to the geographical coordinate matrix and the image coordinate matrix corresponding to each sub-region; Based on the pixel area of each sub-region, the sub-region corresponding to the largest pixel area is used as the main region; If the pixel difference between a sub-region and the main region is greater than a preset threshold, the sub-region is determined as the region to be corrected, and the correction parameter is determined based on the scaling ratios corresponding to the main region and the region to be corrected; after determining the geographical coordinate points corresponding to each image coordinate point based on the perspective transformation matrix, the geographical coordinate points corresponding to the coordinates to be corrected are corrected for perspective distortion according to the correction parameter, where the coordinates to be corrected are the image coordinate points located in the region to be corrected.

9. An electronic device, characterized in that, Comprising: A processor and a memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, on which a computer program is stored, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.