CN116413473A - Speed detection method, device, equipment and storage medium - Google Patents

Speed detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN116413473A
CN116413473A CN202310249607.2A CN202310249607A CN116413473A CN 116413473 A CN116413473 A CN 116413473A CN 202310249607 A CN202310249607 A CN 202310249607A CN 116413473 A CN116413473 A CN 116413473A
Authority
CN
China
Prior art keywords
line segment
target
coordinate system
line
segment group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310249607.2A
Other languages
Chinese (zh)
Inventor
孙国栋
姚伟
聂志勇
游雅晴
王宇飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenhua Hollysys Information Technology Co Ltd
Original Assignee
Shenhua Hollysys Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenhua Hollysys Information Technology Co Ltd filed Critical Shenhua Hollysys Information Technology Co Ltd
Priority to CN202310249607.2A priority Critical patent/CN116413473A/en
Publication of CN116413473A publication Critical patent/CN116413473A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P3/00Measuring linear or angular speed; Measuring differences of linear or angular speeds
    • G01P3/64Devices characterised by the determination of the time taken to traverse a fixed distance
    • G01P3/68Devices characterised by the determination of the time taken to traverse a fixed distance using optical means, i.e. using infrared, visible, or ultraviolet light
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides a speed detection method, a speed detection device, speed detection equipment and a storage medium, and belongs to the technical field of speed detection. The speed detection method comprises the following steps: acquiring video data of a target area; the video data comprise motion information of an object in a target area and initial line segment data marked under a ground coordinate system; calibrating line segments in video data according to a preset calibration strategy based on the initial line segment data to obtain target line segments; according to the target line segment and the initial line segment data, determining the mapping relation between the image coordinate system and the ground coordinate system; and calculating the speed of the object according to the mapping relation between the image coordinate system and the ground coordinate system and the motion information of the object in the target area. The method for measuring the speed has low requirements on the environment, the position, the operation and the like of the measurement work, reduces the measurement difficulty and solves the problem of high requirements on the measurement work of the existing speed measuring technology.

Description

Speed detection method, device, equipment and storage medium
Technical Field
The present invention relates to the field of speed detection technology, and in particular, to a speed detection method, a speed detection apparatus, an electronic device, and a readable storage medium.
Background
The object speed measurement is a common detection requirement, and the existing scheme is usually matched with a large amount of field measurement, so that a large amount of manpower and material resources are consumed to finish the measurement work no matter whether the camera is used for measuring the mounting height and angle or calibrating the actual coordinates of four corners of the speed measurement area. The problems of strict requirement on measuring point positions, complex measuring operation and great measuring work exist in the measuring work. The object speed measurement scheme with low requirement on the position of the measuring point, simple and convenient measurement operation and low measurement work is a difficult problem to be solved when the object speed measurement detection requirement is realized in a landing mode.
Disclosure of Invention
The embodiment of the invention aims to provide a speed detection method, a speed detection device, speed detection equipment and a storage medium, so as to solve the problem that the measuring work of the existing speed measurement technology is high in requirement.
In order to achieve the above object, an embodiment of the present invention provides a speed detection method, including:
acquiring video data of a target area; the video data comprise motion information of an object in a target area and initial line segment data marked in a ground coordinate system;
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;
according to the target line segment and the initial line segment data, determining the mapping relation between the image coordinate system and the ground coordinate system;
and calculating the speed of the object according to the mapping relation between the image coordinate system and the ground coordinate system and the motion information of the object in the target area.
Optionally, the preset calibration strategy is:
establishing an image coordinate system in the video data, and based on the initial line segment data, making two groups 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;
the first line segment group and the second line segment group are perpendicular to each other and are not intersected, two target line segments are respectively contained in the first line segment group and the second line segment group, and the target line segments contained in each line segment group are parallel to each other and are not collinear.
Optionally, the 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:
acquiring coordinate information of a target line segment;
according to the coordinate information of the target line segment, an extension line of the target line segment is made, and a target straight line corresponding to the target line segment is obtained;
according to the coordinate information of the target line segment and the target straight line corresponding to the target line segment, calculating to obtain an intersection point coordinate matrix of the target straight line in the first line segment group and an intersection point coordinate matrix of the target straight line in the second line segment group;
and determining the mapping relation between the image coordinate system and the ground coordinate system according to the intersection point coordinate matrix of the target straight line in the first line segment group, the intersection point coordinate matrix of the target straight line in the second line segment group and the initial line segment data.
Optionally, the step of making an extension line of the target line segment according to the coordinate information of the target line segment to obtain a target straight line corresponding to the target line segment includes:
and (3) according to the coordinate information of the target line segment and the formula (1), an extension line of the target line segment is made, and a target straight line corresponding to the target line segment is obtained through calculation:
a*x+b*y+c=0 (1)
wherein the coefficient a=y 2 -y 1 Coefficient b=x 1 -x 2 Constant c=x 2 *y 1 -y 2 *x 1 ,(x 1 ,y 1 ) And (x) 2 ,y 2 ) Is the endpoint coordinates of the target line segment.
Optionally, the calculating, according to the coordinate information of the target line segment and the target line corresponding to the target line segment, an intersection point coordinate matrix of the target line in the first line segment group and an intersection point coordinate matrix of the target line in the second line segment group include:
according to the coordinate information of the target line segment, the target straight line of the target line segment and the formula (2), calculating to obtain an intersection point coordinate matrix of the target straight line in the first line segment group and an intersection point coordinate matrix of the target straight line in the second line segment group:
Figure BDA0004127442840000031
wherein x and y are the abscissa and ordinate of the intersection point, a 1 、b 1 And c 1 Coefficients and constants of a marked straight line of one item in the same line segment group respectively, a 2 、b 2 And c 2 The coefficients and constants of another target straight line in the same line segment group are respectively.
Optionally, the determining, according to the intersection point coordinate matrix of the target straight line in the first line segment group, the intersection point coordinate matrix of the target straight line in the second line segment group, and the initial line segment data, the mapping relationship between the image coordinate system and the ground coordinate system includes:
connecting an intersection point of a target straight line in the first line segment group with an end point of the second line segment group to obtain a first sub line segment group; wherein the first set of sub-line segments is parallel and non-collinear with the first set of line segments;
connecting the intersection point of the target straight line in the second line segment group with the end point of the first line segment group to obtain a second sub line segment group; wherein the second set of sub-line segments is parallel and non-collinear with the second set of line segments;
and determining the mapping relation 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.
Optionally, the calculating to obtain the speed of the object according to the mapping relation between the image coordinate system and the ground coordinate system and the motion information of the object in the target area includes:
determining the motion trail and the motion time of the object in the target area under the image coordinate system according to the motion information of the object in the target area;
and calculating the speed of the object according to the mapping relation between the image coordinate system and the ground coordinate system, the motion track and the motion time of the object in the target area.
In a second aspect of the embodiments of the present invention, there is provided a speed detecting apparatus including:
the acquisition module is used for acquiring video data of the target area; the video data comprise motion information of an object in the target area and initial line segment data marked in a ground coordinate system;
the calibration module is used for calibrating the line segments in the video data according to a preset calibration strategy based on the initial line segment data to obtain target line segments;
the mapping module is used for determining the mapping relation between the image coordinate system and the ground coordinate system according to the target line segment and the initial line segment data;
and the calculation module is used for calculating the speed of the object according to the mapping relation between the image coordinate system and the ground coordinate system and the motion information of the object in the target area.
In a third aspect of the embodiments of the present invention, there is provided an electronic apparatus, including: a processor and a memory storing machine-readable instructions executable by the processor to perform steps recited in any one of the possible implementations of the first aspect when executed by the processor.
In a fourth aspect of the embodiments of the present invention, there is provided a computer readable storage medium having stored thereon instructions for causing a machine to perform the steps described in any one of the possible implementations of the first aspect.
According to the embodiment of the invention, the video data of the target area are obtained, the video data comprise initial line segment data under a ground coordinate system and motion information of an object, an image coordinate system is established on each frame of image of the video based on the initial line segment data, a target line segment is obtained in the image coordinate system according to preset calibration and calibration line segments, the mapping relation between the image coordinate system and the ground coordinate system is determined according to the target line segment and the initial line segment data, and the speed of the object is calculated according to the mapping relation and the operation information of the object.
The embodiment of the invention realizes that the moving distance of the object in the actual motion can be obtained by measuring the moving distance of the object in the video in the image coordinate system by determining the mapping relation between the ground coordinate system and the image coordinate system.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain, without limitation, the embodiments of the invention. In the drawings:
FIG. 1 is a flow chart of a first embodiment of a speed detection method of the present invention;
FIG. 2 is a schematic illustration of line segment labeling of a video image;
fig. 3 is a schematic diagram of the architecture of the speed detection apparatus according to the present invention.
Detailed Description
The following describes the detailed implementation of the embodiments of the present invention with reference to the drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the invention, are not intended to limit the invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
In the description of the embodiments of the present application, the technical terms "first," "second," etc. are used merely to distinguish between different objects and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated, a particular order or a primary or secondary relationship. In the description of the embodiments of the present application, the meaning of "plurality" is two or more unless explicitly defined otherwise.
Example 1
Referring to fig. 1, fig. 1 is a flow chart of a speed detecting method according to the present embodiment.
Step S100: acquiring video data of a target area; the video data comprise motion information of an object in a target area and initial line segment data marked in a ground coordinate system.
The ground coordinate system is a coordinate system fixed to the earth's surface.
The initial line segments are line segments of known length calibrated in a ground coordinate system, for example, four line segments are calibrated in the ground coordinate system, and the four line segments are divided into two groups, are parallel and do not intersect.
The target area is the area where the camera can collect video data in this example.
The object may be a vehicle or a moving object, and the present embodiment is not limited.
The motion information may be a track of the object motion or a time of the object motion in the target area, etc.
Step S200: and calibrating the line segments in the video data according to a preset calibration strategy based on the initial line segment data to obtain target line segments.
It should be understood that the preset calibration policy is to establish an image coordinate system in video data, where the image coordinate system is a coordinate system established based on a two-dimensional photograph taken by a camera, and based on initial line segment data, two sets of line segments are made in the video data to obtain a first line segment set and a second line segment set, where the first line segment set and the second line segment set are perpendicular to each other and do not intersect, each of the first line segment set and the second line segment set includes two target line segments, and the target line segments included in each line segment set are parallel to each other and are not collinear. For example, as shown in fig. 2, in a video image, line segments AB, CD, EF, and GH are calibrated, where AB and CD are parallel and non-collinear, EF and GH are parallel and non-collinear, AB and CD are perpendicular to EF and GH, respectively, and do not intersect.
Step S300: and determining the mapping relation between the image coordinate system and the ground coordinate system according to the target line segment and the initial line segment data.
In one embodiment, step S300 includes:
step S301: coordinate information of a target line segment is obtained.
The coordinate information of the target line segment is the coordinate information of the line segment endpoint.
Step S302: and according to the coordinate information of the target line segment, an extension line of the target line segment is made, and a target straight line corresponding to the target line segment is obtained.
It should be understood that, in this step, two parallel straight lines in the focus perspective intersect at the same vanishing point at infinity, so that an extension line of the target line segment is obtained, and an extension line of two parallel target line segments intersects at one vanishing point, for example, as shown in fig. 2, an extension line of the line segment AB and an extension line of the line segment CD are obtained, and a target straight line AI and a target straight line CI intersecting at the point I are obtained, and an extension line of the line segment EF and the line segment GH is obtained, so as to obtain a target straight line FJ and a target straight line HJ intersecting at the point J.
Specifically, according to the coordinate information of the target line segment, an extension line of the target line segment is made, a linear equation of a target line including the endpoint coordinates of the target line segment is calculated by using a formula one, and the determination of the target linear equation can be performed by using a diagonal-segment, where the formula one specifically includes:
a*x+b*y+c=0,
wherein the coefficient a=y 2 -y 1 Coefficient b=x 1 -x 2 Constant c=x 2 *y 1 -y 2 *x 1 ,(x 1 ,y 1 ) And (x) 2 ,y 2 ) Is the endpoint coordinates of the target line segment.
For example, the end point A coordinate of the target line segment AB is (x 1 ,y 1 ) Endpoint B coordinates are (x 2 ,y 2 ) Then the linear equation of the extension line of the target line segment AB is (y) 2 -y 1 )x+(x 1 -x 2 )y+x 2 *y 1 -y 2 *x 1 =0。
Step S303: and calculating to obtain an intersection point coordinate matrix of the target straight line in the first line segment group and an intersection point coordinate matrix of the target straight line in the second line segment group according to the coordinate information of the target line segment and the target straight line corresponding to the target line segment.
According to the coordinate information of the end points and the equation of the target straight line, an intersection point coordinate matrix of the target straight line in the first line segment group and an intersection point coordinate matrix of the target straight line in the second line segment group can be obtained through calculation by using a formula II, wherein the formula II specifically comprises:
Figure BDA0004127442840000071
wherein x and y are the abscissa and ordinate of the intersection point, a 1 、b 1 And c 1 Coefficients and constants of a marked straight line of one item in the same line segment group respectively, a 2 、b 2 And c 2 The coefficients and constants of another target straight line in the same line segment group are respectively.
For example, the linear equation for the target line AI obtained in the previous step is a 1 *x+b 1 *y+c 1 =0, the linear equation of the target line CI is a 2 *x+b 2 *y+c 2 The coordinates of the intersection I can be expressed by the formula two.
Step S304: and determining the mapping relation between the image coordinate system and the ground coordinate system according to the intersection point coordinate matrix of the target straight line in the first line segment group, the intersection point coordinate matrix of the target straight line in the second line segment group and the initial line segment data.
Specifically, the intersection point of the target straight line in the first line segment group is connected with the end point of the second line segment group to obtain a first sub-line segment group, the intersection point of the target straight line in the second line segment group is connected with the end point of the first line segment group to obtain a second sub-line segment group, and the straight line equation corresponding to the first sub-line segment group and the second sub-line segment group can be obtained by calculating the intersection point coordinate obtained in the step S303 and the end point coordinate of the line segment group and calculating by using a formula I. Further, the first sub-line segment group and the second sub-line segment group intersect at four points, and the coordinates of the four points under the image coordinate system can be calculated by using the linear equation of each line segment.
Further, according to the data of the initial line segment, the coordinate information of four intersection points of the two line segment groups under the ground coordinate system can be obtained, and then the mapping relation of the two coordinate systems is determined according to the coordinate information of the four intersection points under the image coordinate system and the coordinate information under the ground coordinate system. It can be understood that the step performs equivalent conversion on four originally disjoint line segments, so that the converted sub-line segments are intersected in pairs, the converted sub-line segments are parallel to the corresponding target line segments and are not collinear, and the line segments are identical in length.
For example, as shown in fig. 2, the sub-line segment groups AI, CI, FJ and HJ intersect at the points M, N, K and L, and according to the initial line segment data expressed in the step S100, the length information of the line segments AB, CD, EF and GH can be known, and since the sub-line segment groups are parallel to the target line segments in the corresponding line segment groups and have equal lengths, the coordinates of M, N, K and L in the ground coordinate system can be further obtained, and according to the coordinates of the 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.
According to the embodiment, the intersection point coordinates of the target line segment extension line are calculated by taking the target line segment extension line, and then the mapping relation between the image coordinate system and the ground coordinate system is determined by utilizing the intersection point coordinates and the initial line segment data, so that the dependence on the measuring environment is reduced, and the data precision is improved.
Step S400: and calculating the speed of the object according to the mapping relation and the motion information.
It can be understood that in this embodiment, the initial line segment is marked in the ground coordinate system in advance, then the video data including the initial line segment is collected, the target line segment under the image coordinate system corresponding to the initial line segment is marked on each frame of image of the video according to the initial line segment, and the mapping relationship between the image coordinate system and the ground coordinate system is obtained through subsequent calculation, so that the moving distance of the object under the ground coordinate system can be determined directly by measuring the moving distance of the object in the video data of the target area.
Specifically, according to the motion information of the object contained in the video information, determining the motion time and the motion track of the object in the target area under the image coordinate system, calculating the motion track of the object under the ground coordinate system by using the mapping relation of the two coordinate systems, and calculating the motion speed of the object in the target area by combining the motion time.
According to the embodiment, video data of a target area are obtained, the video data comprise initial line segment data under a ground coordinate system and motion information of an object, an image coordinate system is built on each frame of image of the video based on the initial line segment data, a target line segment is obtained in the image coordinate system according to preset calibration and calibration line segments, a mapping relation between the image coordinate system and the ground coordinate system is determined according to the target line segment and the initial line segment data, and the speed of the object is calculated according to the mapping relation and the operation information of the object. The method for measuring the speed has low requirements on the environment, the position, the operation and the like of the measurement work, reduces the measurement difficulty and solves the problem of high requirements on the measurement work of the existing speed measuring technology.
Example two
Referring to fig. 3, fig. 3 is a schematic structural diagram of a speed detecting device 200 according to an embodiment of the present application.
An obtaining module 210, configured to obtain video data of a target area; the video data comprise motion information of an object in a target area and initial line segment data marked under a ground coordinate system;
the calibration module 220 is configured to calibrate a line segment in video data according to a preset calibration policy based on the initial line segment data, so as to obtain a target line segment;
the mapping module 230 is configured to determine a 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 the calculation module is used for calculating the speed of the object according to the mapping relation between the image coordinate system and the ground coordinate system and the motion information of the object in the target area.
It should be understood that the apparatus corresponds to the above speed detection method embodiment, and is capable of executing the steps involved in the above method embodiment, and specific functions of the apparatus may be referred to the above description, and detailed descriptions thereof are omitted herein as appropriate to avoid redundancy. The device includes at least one software functional module that can be stored in memory in the form of software or firmware (firmware) or cured in an Operating System (OS) of the device.
Example III
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
Example IV
Embodiments of the present invention also provide a computer readable storage medium having stored thereon instructions for, when executed by a processor, adapting to carry out a program having the steps of a speed detection method.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In addition, the specific features described in the above embodiments may be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, various possible combinations of embodiments of the present invention are not described in detail.
In addition, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A speed detection method, comprising:
acquiring video data of a target area; the video data comprise motion information of an object in a target area and initial line segment data marked in a ground coordinate system;
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;
according to the target line segment and the initial line segment data, determining the mapping relation between the image coordinate system and the ground coordinate system;
and calculating the speed of the object according to the mapping relation 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, wherein the preset calibration strategy is:
establishing an image coordinate system in the video data, and based on the initial line segment data, making two groups 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;
the first line segment group and the second line segment group are perpendicular to each other and are not intersected, two target line segments are respectively contained in the first line segment group and the second line segment group, and the target line segments contained in each line segment group are parallel to each other and are not collinear.
3. The method of claim 2, wherein 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 comprises:
acquiring coordinate information of a target line segment;
according to the coordinate information of the target line segment, an extension line of the target line segment is made, and a target straight line corresponding to the target line segment is obtained;
according to the coordinate information of the target line segment and the target straight line corresponding to the target line segment, calculating to obtain an intersection point coordinate matrix of the target straight line in the first line segment group and an intersection point coordinate matrix of the target straight line in the second line segment group;
and determining the mapping relation between the image coordinate system and the ground coordinate system according to the intersection point coordinate matrix of the target straight line in the first line segment group, the intersection point coordinate matrix of the target straight line in the second line segment group and the initial line segment data.
4. The method for detecting a speed according to claim 3, wherein the step of performing an extension of the target line segment according to the coordinate information of the target line segment to obtain a target straight line corresponding to the target line segment comprises:
and (3) according to the coordinate information of the target line segment and the formula (1), an extension line of the target line segment is made, and a target straight line corresponding to the target line segment is obtained through calculation:
a*x+b*y+c=0 (1)
wherein the coefficient a=y 2 -y 1 Coefficient b=x 1 -x 2 Constant c=x 2 *y 1 -y 2 *x 1 ,(x 1 ,y 1 ) And (x) 2 ,y 2 ) Is the endpoint coordinates of the target line segment.
5. The method for detecting a speed according to claim 4, wherein the calculating an intersection point coordinate matrix of the target straight line in the first line segment group and an intersection point coordinate matrix of the target straight line in the second line segment group according to the coordinate information of the target line segment and the target straight line corresponding to the target line segment comprises:
according to the coordinate information of the target line segment, the target straight line of the target line segment and the formula (2), calculating to obtain an intersection point coordinate matrix of the target straight line in the first line segment group and an intersection point coordinate matrix of the target straight line in the second line segment group:
Figure FDA0004127442830000021
wherein x and y are the abscissa and ordinate of the intersection point, a 1 、b 1 And c 1 Coefficients and constants of a marked straight line of one item in the same line segment group respectively, a 2 、b 2 And c 2 The coefficients and constants of another target straight line in the same line segment group are respectively.
6. The method for detecting a velocity according to claim 3, wherein determining the mapping relationship between the image coordinate system and the ground coordinate system according to the intersection coordinate matrix of the target straight line in the first line segment group, the intersection coordinate matrix of the target straight line in the second line segment group, and the initial line segment data comprises:
connecting an intersection point of a target straight line in the first line segment group with an end point of the second line segment group to obtain a first sub line segment group; wherein the first set of sub-line segments is parallel and non-collinear with the first set of line segments;
connecting the intersection point of the target straight line in the second line segment group with the end point of the first line segment group to obtain a second sub line segment group; wherein the second set of sub-line segments is parallel and non-collinear with the second set of line segments;
and determining the mapping relation 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.
7. The method for detecting the velocity according to claim 1, wherein the calculating the velocity of the object according to the mapping relation between the image coordinate system and the ground coordinate system and the motion information of the object in the target area comprises:
determining the motion trail and the motion time of the object in the target area under the image coordinate system according to the motion information of the object in the target area;
and calculating the speed of the object according to the mapping relation between the image coordinate system and the ground coordinate system, the motion track and the motion time of the object in the target area.
8. A speed detecting device, comprising:
the acquisition module is used for acquiring video data of the target area; the video data comprise motion information of an object in the target area and initial line segment data marked in a ground coordinate system;
the calibration module is used for calibrating the line segments in the video data according to a preset calibration strategy based on the initial line segment data to obtain target line segments;
the mapping module is used for determining the mapping relation between the image coordinate system and the ground coordinate system according to the target line segment and the initial line segment data;
and the calculation module is used for calculating the speed of the object according to the mapping relation between the image coordinate system and the ground coordinate system and the motion information of the object in the target area.
9. An electronic device, comprising: a processor and a memory storing machine-readable instructions executable by the processor, which when executed by the processor perform the speed detection method of any one of claims 1-7.
10. A computer readable storage medium having instructions stored thereon for causing a machine to perform the speed detection method of any one of claims 1-7.
CN202310249607.2A 2023-03-10 2023-03-10 Speed detection method, device, equipment and storage medium Pending CN116413473A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310249607.2A CN116413473A (en) 2023-03-10 2023-03-10 Speed detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310249607.2A CN116413473A (en) 2023-03-10 2023-03-10 Speed detection method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116413473A true CN116413473A (en) 2023-07-11

Family

ID=87057481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310249607.2A Pending CN116413473A (en) 2023-03-10 2023-03-10 Speed detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116413473A (en)

Similar Documents

Publication Publication Date Title
CN110927708B (en) Calibration method, device and equipment of intelligent road side unit
EP3543650A1 (en) Locating method, terminal and server
CN111650598A (en) External parameter calibration method and device for vehicle-mounted laser scanning system
JP2020034559A (en) Method, apparatus, device, and storage medium for calibrating posture of dynamic obstacle
CN109886956B (en) Method and device for detecting defect point aggregations
CN112964291A (en) Sensor calibration method and device, computer storage medium and terminal
CN114488097A (en) External parameter calibration method of laser radar, computer equipment and computer storage medium
CN110930444B (en) Point cloud matching method, medium, terminal and device based on bilateral optimization
CN115546313A (en) Vehicle-mounted camera self-calibration method and device, electronic equipment and storage medium
CN114049401A (en) Binocular camera calibration method, device, equipment and medium
CN116413473A (en) Speed detection method, device, equipment and storage medium
CN111609849A (en) Multi-station rendezvous positioning method and system
CN112034438A (en) Radar calibration method and device, electronic equipment and storage medium
CN112873280B (en) Calibration method and device for sensor of robot
CN112304281A (en) Road slope measuring method, terminal equipment and storage medium
CN112697091B (en) Tracking scanning system, calibration method and measurement method of relay tracker
CN112455541B (en) Wheel corner determining method, device and equipment
CN115060289A (en) Positioning track precision evaluation method and device, electronic equipment and storage medium
CN112987010A (en) System and method for multi-radar mapping of robot
CN114185020A (en) Laser radar motion distortion removing method and device based on Ackerman chassis
CN111366911A (en) Method and device for calibrating positioning consistency of multiple AGV (automatic guided vehicle) and electronic terminal
CN117124334B (en) Robot drift correction method, robot, storage medium, and terminal device
CN112222798B (en) Automatic installation method and device for large-scale component
CN115166701B (en) System calibration method and device for RGB-D camera and laser radar
CN113734198B (en) Method and device for acquiring relative course of target

Legal Events

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