Speed Detection Method, Device, Equipment and Storage Medium

By calibrating line segments in video data and determining the coordinate system mapping relationship, low-demand object speed measurement is achieved, solving the problems of complex measurement work and low accuracy in the prior art, simplifying measurement operations and improving measurement accuracy.

CN116413473BActive Publication Date: 2025-07-25SHENHUA HOLLYSYS INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310249607.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2025-07-25
Estimated Expiration
2043-03-10

AI Technical Summary

Technical Problem

The existing object speed measurement technology requires a large amount of manpower and material resources to conduct on-site measurements. The measurement point location requirements are strict and the operation is complex, making it difficult to achieve low-demand measurement work.

Method used

By obtaining the video data of the target area, including object motion information and initial line segment data under the ground coordinate system, the line segment is calibrated in the video data based on the preset calibration strategy, the mapping relationship between the image coordinate system and the ground coordinate system is determined, and the object speed is calculated.

Benefits of technology

It reduces the environmental and operation requirements of the measurement work, simplifies the measurement process, and improves the measurement accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116413473B_ABST
    Figure CN116413473B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a speed detection method, device, equipment and storage medium, belonging to the technical field of speed detection. The speed detection method includes: obtaining video data of a target area; wherein, the video data includes the motion information of an object in the target area and the initial line segment data marked in the ground coordinate system; based on the initial line segment data, calibrating a line segment in the video data according to a preset calibration strategy to obtain a target line segment; determining the mapping relationship between the image coordinate system and the ground coordinate system according to the target line segment and the initial line segment data; and calculating the speed of the object according to the mapping relationship between the image coordinate system and the ground coordinate system and the motion information of the object in the target area. When using the method of the present invention for speed measurement, the requirements for the environment, position, operation, etc. of the measurement work are not high, the measurement difficulty is reduced, and the problem of high requirements for the measurement work of the existing speed measurement technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of speed detection, and in particular, to a speed detection method, a speed detection device, an electronic device, and a readable storage medium. Background Art

[0002] Object speed measurement is a relatively common detection requirement. Existing solutions usually require a large number of on-site measurements. Whether it is measuring the installation height and angle of a camera, or calibrating the actual coordinates of the four corners of a speed measurement area, a large amount of manpower and material resources are required to complete the measurement work. There are three major difficult problems in the measurement work: strict requirements for the position of measurement points, complex measurement operations, and large measurement work. Developing an object speed measurement scheme with low requirements for the position of measurement points, simple measurement operations, and low measurement work is a difficult problem that urgently needs to be solved when implementing the object speed measurement detection requirement. Summary of the Invention

[0003] The purpose of the embodiments of the present invention is to provide a speed detection method, device, equipment, and storage medium to solve the problem of high requirements for measurement work in existing speed measurement technologies.

[0004] To achieve the above purpose, the embodiments of the present invention provide a speed detection method, including:

[0005] Obtain video data of a target area; wherein, the video data includes the motion information of an object in the target area and the initial line segment data marked in the ground coordinate system;

[0006] Based on the initial line segment data, calibrate line segments in the video data according to a preset calibration strategy to obtain target line segments;

[0007] Determine the mapping relationship between the image coordinate system and the ground coordinate system according to the target line segments and the initial line segment data;

[0008] Calculate the speed of the object according to the mapping relationship between the image coordinate system and the ground coordinate system and the motion information of the object in the target area.

[0009] Optionally, the preset calibration strategy is:

[0010] Establish an image coordinate system in the video data, and based on the initial line segment data, draw two sets of line segments in the video data to obtain two line segment sets, namely the first line segment set and the second line segment set;

[0011] Wherein, the first line segment set and the second line segment set are perpendicular to each other and do not intersect, and each of the first line segment set and the second line segment set contains two target line segments, and the target line segments contained in each line segment set are parallel to each other and not collinear.

[0012] Optionally, determining the mapping relationship between the image coordinate system and the ground coordinate system according to the target line segment and the initial line segment data includes:

[0013] Obtaining the coordinate information of the target line segment;

[0014] According to the coordinate information of the target line segment, extending the target line segment to obtain the target line corresponding to the target line segment;

[0015] Calculating the intersection coordinate matrix of the target lines in the first line segment group and the intersection coordinate matrix of the target lines in the second line segment group according to the coordinate information of the target line segment and the target line corresponding to the target line segment;

[0016] Determining the mapping relationship between the image coordinate system and the ground coordinate system according to the intersection coordinate matrix of the target lines in the first line segment group, the intersection coordinate matrix of the target lines in the second line segment group, and the initial line segment data.

[0017] Optionally, extending the target line segment according to the coordinate information of the target line segment to obtain the target line corresponding to the target line segment includes:

[0018] Extending the target line segment according to the coordinate information of the target line segment and formula (1), and calculating the target line corresponding to the target line segment:

[0019] a*x + b*y + c = 0 (1)

[0020] Where the coefficient a = y2 - y1, the coefficient b = x1 - x2, the constant c = x2*y1 - y2*x1, and (x1, y1) and (x2, y2) are the endpoint coordinates of the target line segment.

[0021] Optionally, calculating the intersection coordinate matrix of the target lines in the first line segment group and the intersection coordinate matrix of the target lines in the second line segment group according to the coordinate information of the target line segment and the target line corresponding to the target line segment includes:

[0022] Calculating the intersection coordinate matrix of the target lines in the first line segment group and the intersection coordinate matrix of the target lines in the second line segment group according to the coordinate information of the target line segment, the target line of the target line segment, and formula (2):

[0023]

[0024] Where x and y are the abscissa and ordinate of the intersection point, a1, b1, and c1 are the coefficients and constants of a target line in the same line segment group respectively, and a2, b2, and c2 are the coefficients and constants of another target line in the same line segment group respectively.

[0025] Optionally, determining the mapping relationship between the image coordinate system and the ground coordinate system according to the intersection coordinate matrix of the target lines in the first line segment group, the intersection coordinate matrix of the target lines in the second line segment group, and the initial line segment data includes:

[0026] Connect the intersections of the target lines in the first line segment group with the endpoints of the second line segment group to obtain a first sub-line segment group; wherein the first sub-line segment group is parallel to the first line segment group and non-collinear;

[0027] Connect the intersections of the target lines in the second line segment group with the endpoints of the first line segment group to obtain a second sub-line segment group; wherein the second sub-line segment group is parallel to the second line segment group and non-collinear;

[0028] Determine the mapping relationship between the image coordinate system and the ground coordinate system according to the first sub-line segment group, the second sub-line segment group, and the initial line segment data.

[0029] Optionally, calculating the speed of the object according to the mapping relationship between the image coordinate system and the ground coordinate system and the motion information of the object in the target area includes:

[0030] Determine the motion trajectory and motion time of the object in the target area in the image coordinate system according to the motion information of the object in the target area;

[0031] Calculate the speed of the object according to the mapping relationship between the image coordinate system and the ground coordinate system, the motion trajectory of the object in the target area, and the motion time.

[0032] In the second aspect of the embodiments of the present invention, a speed detection device is provided, including:

[0033] An acquisition module, configured to acquire video data of a target area; wherein the video data includes the motion information of an object in the target area and the initial line segment data marked in the ground coordinate system;

[0034] A calibration module, configured to calibrate lines in the video data according to a preset calibration strategy based on the initial line segment data to obtain target lines;

[0035] A mapping module, configured to determine the mapping relationship between the image coordinate system and the ground coordinate system according to the target lines and the initial line segment data;

[0036] A calculation module, configured to calculate the speed of the object according to the mapping relationship between the image coordinate system and the ground coordinate system and the motion information of the object in the target area.

[0037] In a third aspect of the embodiments of the present invention, an electronic device is provided, including: a processor and a memory, where the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, each step in any possible implementation manner in the implementation manner of the first aspect is executed.

[0038] In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, and instructions are stored on the computer-readable storage medium, and the instructions are used to cause a machine to execute each step in any possible implementation manner in the implementation manner of the first aspect.

[0039] In an embodiment of the present invention, video data of a target area is obtained, and the video data includes initial line segment data in a ground coordinate system and motion information of an object. Then, based on the initial line segment data, an image coordinate system is established on each frame image of the video. In the image coordinate system, a calibration line segment is measured according to a preset calibration, and a target line segment is obtained. Then, according to the target line segment and the above initial line segment data, the mapping relationship between the image coordinate system and the ground coordinate system is determined, and then according to the mapping relationship and the above object motion information, the speed of the object is calculated.

[0040] In an embodiment of the present invention, by determining the mapping relationship between the ground coordinate system and the image coordinate system, it is possible to obtain the distance that the object moves in the actual motion by measuring the distance that the object moves in the image coordinate system in the video. Using the method of the present invention for speed measurement has low requirements for the environment, position, operation, etc. of the measurement work, reduces the measurement difficulty, and solves the problem of high requirements for the measurement work of existing speed measurement technologies.

[0041] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent specific implementation part. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings are used to provide a further understanding of the embodiments of the present invention, and constitute a part of the specification. Together with the following specific implementation manners, they are used to explain the embodiments of the present invention, but do not constitute a limitation to the embodiments of the present invention. In the drawings:

[0043] Figure 1 is a flowchart of Embodiment 1 of the speed detection method of the present invention;

[0044] Figure 2 is a schematic diagram of line segment marking of a video image;

[0045] Figure 3 is a schematic diagram of the architecture of the speed detection device related to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] The following will describe in detail the specific implementation manners of the embodiments of the present invention with reference to the accompanying drawings. It should be understood that the specific implementation manners described herein are only used to illustrate and explain the embodiments of the present invention, and are not used to limit the embodiments of the present invention.

[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments, and are not intended to limit this application.

[0048] In the description of the embodiments of this application, technical terms such as "first" and "second" are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity, specific order or primary-secondary relationship of the indicated technical features. In the description of the embodiments of this application, "a plurality of" means two or more, unless otherwise specifically defined.

[0049] Embodiment 1

[0050] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a speed detection method provided in this embodiment.

[0051] Step S100: Obtain video data of the target area; wherein, the video data includes the motion information of the object in the target area and the initial line segment data marked in the ground coordinate system.

[0052] The ground coordinate system is a coordinate system fixed on the earth's surface.

[0053] The initial line segments are line segments with known lengths calibrated in the ground coordinate system. For example, four line segments are calibrated on the ground coordinate system. The four line segments are divided into two groups, and the two in each group are parallel and do not intersect.

[0054] The target area is the area where the camera in this example can collect video data.

[0055] The object can be a vehicle or a moving object, and this embodiment does not impose any restrictions.

[0056] The motion information can be the trajectory of the object's movement or the time of movement in the target area, etc.

[0057] Step S200: Based on the initial line segment data, calibrate line segments in the video data according to a preset calibration strategy to obtain target line segments.

[0058] It should be understood that the preset calibration strategy is to establish an image coordinate system in the video data. The image coordinate system is a coordinate system established based on a two-dimensional photo taken by a camera. Based on the initial line segment data, two sets of line segments are made in the video data to obtain a first line segment group and a second line segment group. The first line segment group and the second line segment group are perpendicular to each other and do not intersect. The first line segment group and the second line segment group each contain two target line segments. The target line segments contained in each line segment group are parallel to each other and not collinear. For example, as Figure 2 shown, in the video image, calibrate line segments AB, CD, EF, and GH, where AB and CD are parallel and not collinear, EF and GH are parallel and not collinear, and AB and CD are respectively perpendicular to EF and GH and do not intersect.

[0059] Step S300: Determine the mapping relationship between the image coordinate system and the ground coordinate system according to the target line segment and the initial line segment data.

[0060] In a specific embodiment, step S300 includes:

[0061] Step S301: Obtain the coordinate information of the target line segment.

[0062] The coordinate information of the target line segment is the coordinate information of the line segment endpoints.

[0063] Step S302: According to the coordinate information of the target line segment, extend the target line segment to obtain the target straight line corresponding to the target line segment.

[0064] It should be understood that in this step, the principle that two parallel straight lines intersect at the same vanishing point at infinity in perspective projection is applied. Therefore, extend the target line segment to obtain the extended lines of two parallel target line segments that intersect at a vanishing point. For example, as Figure 2 shown, extend line segment AB and line segment CD to obtain target straight lines AI and CI that intersect at point I, and extend line segment EF and line segment GH to obtain target straight lines FJ and HJ that intersect at point J.

[0065] Specifically, according to the coordinate information of the above target line segment, extend the target line segment. Using formula one, calculate the straight line equation of the target straight line containing the endpoint coordinates of the target line segment. The slope-intercept form can be used to determine the target straight line equation. Formula one specifically includes:

[0066] a*x + b*y + c = 0,

[0067] where the coefficient a = y2 - y1, the coefficient b = x1 - x2, and the constant c = x2*y1 - y2*x1, and (x1, y1) and (x2, y2) are the endpoint coordinates of the target line segment.

[0068] For example, if the coordinates of endpoint A of the target line segment AB are (x1, y1) and the coordinates of endpoint B are (x2, y2), then the linear equation of the extension line of the target line segment AB is (y2 - y1)x + (x1 - x2)y + x2*y1 - y2*x1 = 0.

[0069] Step S303: Calculate the intersection coordinate matrix of the target lines in the first line segment group and the intersection coordinate matrix of the target lines in the second line segment group according to the coordinate information of the target line segment and the target line corresponding to the target line segment.

[0070] According to the coordinate information of the endpoints and the equation of the target line, the intersection coordinate matrix of the target lines in the first line segment group and the intersection coordinate matrix of the target lines in the second line segment group can be calculated using Formula Two. Formula Two specifically includes:

[0071]

[0072] where x and y are the abscissa and ordinate of the intersection point, a1, b1, and c1 are the coefficients and constants of a target line in the same line segment group, and a2, b2, and c2 are the coefficients and constants of another target line in the same line segment group.

[0073] For example, in the previous step, the linear equation of the target line AI is a1*x + b1*y + c1 = 0, and the linear equation of the target line CI is a2*x + b2*y + c2 = 0. Then the coordinates of the intersection point I can be represented by Formula Two.

[0074] Step S304: Determine the mapping relationship between the image coordinate system and the ground coordinate system according to the intersection coordinate matrix of the target lines in the first line segment group, the intersection coordinate matrix of the target lines in the second line segment group, and the initial line segment data.

[0075] Specifically, connect the intersection points of the target lines in the first line segment group with the endpoints of the second line segment group to obtain the first sub-line segment group, and connect the intersection points of the target lines in the second line segment group with the endpoints of the first line segment group to obtain the second sub-line segment group. The linear equations corresponding to the first sub-line segment group and the second sub-line segment group can be calculated using Formula One with the intersection coordinates calculated in Step S303 and the endpoint coordinates of the line segment group. Further, the first sub-line segment group and the second sub-line segment group intersect at four points, and the coordinates of these four points in the image coordinate system can be calculated using the linear equations of the respective line segments.

[0076] Furthermore, based on the data of the initial line segments, the coordinate information of the four intersection points of the above two line segment groups in the ground coordinate system can be obtained. Then, based on the coordinate information of the above four intersection points in the image coordinate system and the ground coordinate system, the mapping relationship between the two coordinate systems is determined. It can be understood that in this step, the four non-intersecting line segments are equivalently transformed so that the transformed sub-line segments intersect pairwise, the transformed sub-line segments are parallel to the corresponding target line segments, non-collinear, and have the same line segment length.

[0077] For example, as Figure 2 shown, the sub-line segment groups AI, CI, FJ, and HJ intersect at points M, N, K, and L. According to the initial line segment data described in step S100, the length information of line segments AB, CD, EF, and GH can be known. Since the sub-line segment groups are parallel and have the same length as the target line segments in the corresponding line segment groups, the coordinates of M, N, K, and L in the ground coordinate system can be further obtained. According to the coordinates of points M, N, K, and L in the ground coordinate system and the image coordinate system, the optimal single mapping transformation matrix is calculated, that is, the mapping relationship between the two coordinate systems is obtained.

[0078] In this embodiment, by extending the target line segments, the intersection point coordinates of the extended target line segments are calculated, and then using the intersection point coordinates and the initial line segment data, the mapping relationship between the image coordinate system and the ground coordinate system is determined, reducing the dependence on the measurement environment and improving the data accuracy.

[0079] Step S400: Calculate the speed of the object according to the mapping relationship and the motion information.

[0080] It can be understood that in this embodiment, the initial line segments are pre-calibrated in the ground coordinate system, and then the video data including the initial line segments is collected. The target line segments in the corresponding image coordinate system of the initial line segments are calibrated on each frame of the video according to the initial line segments. After subsequent calculations, the mapping relationship between the image coordinate system and the ground coordinate system is obtained, and the distance of the object moving in the target area of the video data can be directly measured to determine the distance of the object moving in the ground coordinate system.

[0081] Specifically, according to the motion information of the object included in the video information, the motion time and motion trajectory of the object in the target area in the image coordinate system are determined. Using the mapping relationship between the two coordinate systems, the motion trajectory of the object in the ground coordinate system is calculated, and combined with the motion time, the motion speed of the object in the target area is calculated.

[0082] This embodiment obtains video data of the target area, which includes initial line segment data and object motion information in a ground coordinate system, and then establishes an image coordinate system on each frame of the video based on the initial line segment data. In the image coordinate system, the line segment is measured and calibrated according to a preset calibration to obtain the target line segment, and then the mapping relationship between the image coordinate system and the ground coordinate system is determined based on the target line segment and the initial line segment data, and then the speed of the object is calculated based on the mapping relationship and the running information of the object. The method of the present invention is used to measure speed, and the requirements for the environment, position, operation, etc. of the measurement work are not high, which reduces the measurement difficulty and solves the problem of high measurement requirements of the existing speed measurement technology.

[0083] Embodiment 2

[0084] Please refer to Figure 3 , Figure 3 It is a structural schematic diagram of a speed detection device 200 provided in an embodiment of the present application.

[0085] The acquisition module 210 is used to acquire video data of the target area; wherein the video data includes motion information of the object in the target area and initial line segment data marked in the ground coordinate system;

[0086] A calibration module 220, configured to calibrate the line segments in the video data according to a preset calibration strategy based on the initial line segment data to obtain a target line segment;

[0087] A mapping module 230, for determining a mapping relationship between an image coordinate system and a ground coordinate system according to target line segment and initial line segment data;

[0088] The calculation module is used to calculate the speed of the object according to the mapping relationship between the image coordinate system and the ground coordinate system and the motion information of the object in the target area.

[0089] It should be understood that the device corresponds to the above-mentioned speed detection method embodiment and can execute the various steps involved in the above-mentioned method embodiment. The specific functions of the device can be referred to in the above description. To avoid repetition, the detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the device.

[0090] Embodiment 3

[0091] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0092] The memory may include non-permanent memory in the form of computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory is an example of computer-readable media.

[0093] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transitory media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0094] Embodiment 4

[0095] The embodiment of the present invention also provides a computer-readable storage medium, on which instructions are stored, and the instructions are adapted to execute a program with steps of a speed detection method when being executed by a processor.

[0096] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0097] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be realized by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices generate for realizing the processesFigure 1 one process or multiple processes and / or blocks Figure 1 a device for the functions specified in one block or multiple blocks.

[0098] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device that implements the functions in the process Figure 1 one process or multiple processes and / or blocks Figure 1 specified in one block or multiple blocks.

[0099] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the process Figure 1 one process or multiple processes and / or blocks Figure 1 specified in one block or multiple blocks.

[0100] In addition, it should be noted that, among the various specific technical features described in the above specific embodiments, they can be combined in any suitable manner without conflict. To avoid unnecessary repetition, the embodiments of the present invention do not further describe various possible combination methods.

[0101] In addition, in each embodiment of the embodiments of the present application, the various functional modules can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.

[0102] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, commodity or device including the element.

[0103] The above are only the embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A speed detection method, characterized in that, Including: Obtaining video data of a target area; wherein, the video data includes the motion information of an object in the target area and the initial line segment data of a marker in the ground coordinate system; Based on the initial line segment data, calibrating line segments in the video data according to a preset calibration strategy to obtain target line segments, where the preset calibration strategy is: Establishing an image coordinate system in the video data, and based on the initial line segment data, making two sets of line segments in the video data to obtain two line segment groups, namely a first line segment group and a second line segment group; Wherein, the first line segment group and the second line segment group are perpendicular to each other and do not intersect, and each of the first line segment group and the second line segment group contains two target line segments, and the target line segments contained in each line segment group are parallel to each other and non - collinear; Determining the mapping relationship between the image coordinate system and the ground coordinate system according to the target line segments and the initial line segment data; Calculating the speed of the object according to the mapping relationship between the image coordinate system and the ground coordinate system and the motion information of the object in the target area.

2. The speed detection method according to claim 1, characterized in that The determining the mapping relationship between the image coordinate system and the ground coordinate system according to the target line segments and the initial line segment data includes: Obtaining the coordinate information of the target line segments; According to the coordinate information of the target line segments, extending the target line segments to obtain the target lines corresponding to the target line segments; Calculating the intersection coordinate matrix of the target lines in the first line segment group and the intersection coordinate matrix of the target lines in the second line segment group according to the coordinate information of the target line segments and the target lines corresponding to the target line segments; Determining the mapping relationship between the image coordinate system and the ground coordinate system according to the intersection coordinate matrix of the target lines in the first line segment group, the intersection coordinate matrix of the target lines in the second line segment group and the initial line segment data.

3. The speed detection method according to claim 2, wherein The extending the target line segments to obtain the target lines corresponding to the target line segments according to the coordinate information of the target line segments includes: According to the coordinate information of the target line segments and formula (1), extending the target line segments and calculating the target lines corresponding to the target line segments: (1) Among them, the coefficient , the coefficient , the constant , and are the endpoint coordinates of the target line segment.

4. The speed detection method according to claim 3, characterized in that The calculating the intersection coordinate matrix of the target lines in the first line segment group and the intersection coordinate matrix of the target lines in the second line segment group according to the coordinate information of the target line segments and the target lines corresponding to the target line segments includes: Calculating the intersection coordinate matrix of the target lines in the first line segment group and the intersection coordinate matrix of the target lines in the second line segment group according to the coordinate information of the target line segments, the target lines of the target line segments and formula (2): (2) wherein, and are the abscissa and ordinate of the intersection point, , and are respectively the coefficient and constant of a target straight line within the same line segment group, , and are respectively the coefficient and constant of another target straight line within the same line segment group.

5. The speed detection method according to claim 2, wherein The determining the mapping relationship between the image coordinate system and the ground coordinate system according to the intersection coordinate matrix of the target lines in the first line segment group, the intersection coordinate matrix of the target lines in the second line segment group and the initial line segment data includes: Connecting the intersections of the target lines in the first line segment group with the endpoints of the second line segment group to obtain a first sub - line segment group; wherein the first sub - line segment group is parallel to the first line segment group and non - collinear; Connecting the intersections of the target lines in the second line segment group with the endpoints of the first line segment group to obtain a second sub - line segment group; wherein the second sub - line segment group is parallel to the second line segment group and non - collinear; Determine the mapping relationship between the image coordinate system and the ground coordinate system according to the first sub-segment group, the second sub-segment group, and the initial line segment data.

6. The speed detection method according to claim 1, characterized in that The calculating the speed of the object according to the mapping relationship between the image coordinate system and the ground coordinate system and the motion information of the object in the target area includes: Determine the motion trajectory and motion time of the object in the target area in the image coordinate system according to the motion information of the object in the target area; Calculate the speed of the object according to the mapping relationship between the image coordinate system and the ground coordinate system, the motion trajectory of the object in the target area, and the motion time.

7. A speed detection device, characterized in that, It includes: An acquisition module for acquiring video data of the target area; wherein, the video data includes the motion information of the object in the target area and the initial line segment data marked in the ground coordinate system; A calibration module for calibrating line segments in the video data according to a preset calibration strategy based on the initial line segment data to obtain target line segments, and the preset calibration strategy is: Establish an image coordinate system in the video data, and based on the initial line segment data, draw two sets of line segments in the video data to obtain two line segment groups, namely the first line segment group and the second line segment group; Wherein, the first line segment group and the second line segment group are perpendicular to each other and do not intersect, the first line segment group and the second line segment group each contain two target line segments, and the target line segments contained in each line segment group are parallel to each other and not collinear; A mapping module for determining the mapping relationship between the image coordinate system and the ground coordinate system according to the target line segments and the initial line segment data; A calculation module for calculating the speed of the object according to the mapping relationship between the image coordinate system and the ground coordinate system and the motion information of the object in the target area.

8. An electronic device, characterized in that, It includes: A processor and a memory, the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the speed detection method according to any one of claims 1-6 is executed.

9. A computer-readable storage medium, characterized in that, Instructions are stored on the computer-readable storage medium, and the instructions are used to cause a machine to execute the speed detection method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Method and system for measuring speed of moving targets

    CN101604448A

  • Calibration method and device based on line segments

    CN101814184A