WO2021129305A1 - Calibration rod testing method for optical motion capture system, device, apparatus, and storage medium - Google Patents

Calibration rod testing method for optical motion capture system, device, apparatus, and storage medium Download PDF

Info

Publication number
WO2021129305A1
WO2021129305A1 PCT/CN2020/132105 CN2020132105W WO2021129305A1 WO 2021129305 A1 WO2021129305 A1 WO 2021129305A1 CN 2020132105 W CN2020132105 W CN 2020132105W WO 2021129305 A1 WO2021129305 A1 WO 2021129305A1
Authority
WO
WIPO (PCT)
Prior art keywords
coordinate
points
frame
coordinate data
data
Prior art date
Application number
PCT/CN2020/132105
Other languages
French (fr)
Chinese (zh)
Inventor
王越
许秋子
Original Assignee
深圳市瑞立视多媒体科技有限公司
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 深圳市瑞立视多媒体科技有限公司 filed Critical 深圳市瑞立视多媒体科技有限公司
Publication of WO2021129305A1 publication Critical patent/WO2021129305A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E30/00Energy generation of nuclear origin
    • Y02E30/30Nuclear fission reactors

Definitions

  • the existing checkerboard calibration board algorithm uses strict conditions, and the algorithm time is too long, which is very inconvenient to use.
  • there are a lot of cameras in the motion capture system and the area cross relationship between the camera and the camera is complicated, and the checkerboard calibration board requires a lot of manpower and material resources.
  • the existing checkerboard calibration method is not suitable for the calibration of optical cameras. Therefore, there is a need for a calibration method that can be used in optical motion capture systems that can accurately and quickly detect and identify.
  • multi-frame coordinate data determine whether there are two intersecting straight lines with a common coordinate point formed by a preset number of coordinate points in the plurality of coordinate points in each frame, and if not, remove the coordinate data If the corresponding frame exists, multiple coordinate points on the two intersecting straight lines are recorded as qualified coordinate data to obtain qualified multi-frame coordinate data;
  • the one frame of coordinate data randomly taking three of the coordinate points, calculating the two-by-two distance between the three coordinate points, and obtaining three distance values, including:
  • the distance between any two of the three coordinate points is the pixel Euclidean distance of two-dimensional coordinates, and is calculated by using the following formula:
  • the acquiring positional relationship data of a plurality of marking points on the calibration rod, and determining the positions corresponding to the plurality of marking points of the calibration rod in each frame of coordinate data that are qualified according to the positional relationship data The multiple coordinate points are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained, including:
  • Acquiring positional relationship data of a plurality of marking points on the calibration rod including the length of two intersecting line segments formed by the plurality of marking points, an origin mark, and other marking point coordinate data corresponding to the origin mark;
  • the present invention also provides a calibration rod detection device in an optical motion capture system, including:
  • the coordinate data acquisition module is used to acquire multiple frames of coordinate data captured by the optical camera on the swinging calibration rod, and each frame of the coordinate data includes multiple coordinate point information;
  • the valid data determining module is used to obtain the positional relationship data of multiple marking points on the calibration rod, and according to the positional relationship data, it is determined that each frame of the qualified coordinate data corresponds to the multiple marking points of the calibration rod.
  • the multiple coordinate points of the position are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained.
  • the present invention also provides a computer-readable storage medium.
  • the computer-readable storage medium stores a calibration rod detection program in an optical motion capture system, and the calibration rod detection program in the optical motion capture system is processed.
  • the device is executed, the steps of the calibration rod detection method in the optical motion capture system as described above are realized.
  • FIG. 1 is a schematic structural diagram of the operating environment of the calibration rod detection device in the optical motion capture system involved in the embodiment of the present invention
  • FIG. 2 is a flowchart of a calibration rod detection method in an optical motion capture system in an embodiment of the present invention
  • Fig. 3 is a schematic diagram of a structure of a calibration rod in an embodiment of the present invention.
  • the calibration rod detection device in the optical motion capture system includes: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
  • the hardware structure of the calibration rod detection device in the optical motion capture system shown in FIG. 1 does not constitute a limitation on the calibration rod detection device in the optical motion capture system, and may include more or more than that shown in the figure. Few parts, or a combination of some parts, or a different arrangement of parts.
  • the memory 1005 which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a calibration rod detection program in an optical motion capture system.
  • the operating system is a program that manages and controls the calibration rod detection equipment and software resources in the optical motion capture system, and supports the operation of the calibration rod detection program and other software and/or programs in the optical motion capture system.
  • Step S1 acquiring coordinate data: acquiring multiple frames of coordinate data captured by the optical camera on the swinging calibration rod, and each frame of coordinate data includes multiple coordinate point information.
  • the calibration rod in this step adopts a two-dimensional calibration rod.
  • the position relationship of the mark points is preset, and the position relationship data between multiple mark points can be directly obtained.
  • swing the calibration rod in a multi-camera environment in a large space and the optical camera will recognize the marked points on the calibration rod, obtain each frame of two-dimensional space coordinate data, and record and store these coordinate data.
  • the matching speed is accelerated, the calculation difficulty is reduced, the calibration time is faster, and manpower and material resources are saved.
  • the position of the calibration rod can be determined as long as the correlation of the five points is determined, which greatly reduces the complexity of the algorithm.
  • the threshold range can be 5-500 coordinate points. If the number of coordinate points in a frame is less than 5, it is considered that the current frame does not contain the coordinate data corresponding to the calibration rod, that is, the current frame coordinate data is unqualified. If the number of coordinate points in a frame is more than 500, it is considered that there are too many clutters in the coordinate data of the current frame, excessive useless data, and the coordinate data of the current frame is unqualified.
  • the unqualified coordinate data should be eliminated from the multi-frame coordinate data first. After the elimination, the qualified coordinate data of each frame is obtained, which is used as a follow-up detection, which greatly reduces the complexity of the follow-up algorithm.
  • S20101 in one frame of coordinate data, choose any three coordinate points, calculate the two-by-two distance between the three coordinate points, and obtain three distance values.
  • the distance between any two coordinate points of the three coordinate points is two
  • the pixel Euclidean distance of the dimensional coordinate is calculated using the following formula:
  • D is the distance value
  • the two-dimensional coordinates of the two coordinate points are (x1, y1), (x2, y2).
  • any three coordinate points A (x1, y1), B (x2, y2), C (x3, y3) are taken, and the mutual distance between the three points is calculated, then the above calculation
  • S20102 Find the smallest distance value and the second smallest distance value among the three distance values, and judge whether the second smallest distance value is greater than the preset distance threshold. If the second smallest distance value is greater than the distance threshold, the three coordinate points are not on the same straight line .
  • minU the smallest value is recorded as minU and the second decimal value is recorded as minV. If minV is greater than a preset distance threshold, such as 12, A and B are considered , C three points do not meet the requirements of three points collinear, A, B, C three points are not on the same straight line.
  • a preset distance threshold such as 12
  • the second smallest distance value is less than or equal to the distance threshold, it is considered that the three coordinate points may be on the same straight line, and the judgment in this step needs to be continued.
  • the ratio of minV to minU is less than or equal to the ratio threshold 0.2, it is considered that the three coordinate points are not on the same straight line.
  • the angle between the minV and minU vectors is greater than or equal to the angle threshold of 5 degrees, it is considered that the three coordinate points are not on the same straight line.
  • the second smallest distance value is less than or equal to the distance threshold, and the ratio of the second smallest distance value to the smallest distance value is greater than the ratio threshold, and the vector of the second smallest distance value and the vector of the smallest distance value
  • the included angle between is less than the included angle threshold
  • the three coordinate points meet the requirement of three-point collinear and are located on the same straight line. At this time, the coordinate data of these three coordinate points are saved.
  • the number range in this step can be 2-10. If the number of straight lines in a frame of coordinate data is less than 2, it is considered that this frame of coordinate data does not include the calibration rod, that is, this frame of data is unqualified. If the number of straight lines in a frame of coordinate data is greater than 10, it is considered that there are too many noises in the frame of coordinate data and excessive useless data. This frame of data is also unqualified, and the unqualified data should be eliminated.
  • S203 Determine whether there is a common coordinate point: if it is within the number range, continue to determine whether the coordinate points in the multiple straight lines have a common coordinate point, and if there is no common coordinate point, remove a frame corresponding to the coordinate data.
  • This step determines whether there are two intersecting straight lines in one frame of coordinate data by judging whether there are common coordinate points. If there are no two intersecting straight lines, it is considered that the calibration rod is not included in the current frame coordinate data, that is, the data of this frame is unqualified, and the unqualified data should be eliminated.
  • the coordinate data of this frame is considered to be unqualified, and the unqualified data should be eliminated.
  • S205 Record qualified coordinate data: if there are only two straight lines, record multiple coordinate points on the two intersecting straight lines as qualified coordinate data, and finally obtain qualified multi-frame coordinate data.
  • the current frame coordinate data is considered to be qualified coordinate data, and all the coordinate points on the two straight lines are saved.
  • the multi-frame coordinate data that meets the requirements is organically screened out as qualified coordinate data to provide accurate and reliable data support for the subsequent determination of effective coordinate data. It can also greatly save the amount of calculation in the subsequent determination of effective coordinate data.
  • Step S3 determine the effective coordinate data: obtain the positional relationship data of the multiple marking points on the calibration rod, and determine the multiple coordinates corresponding to the multiple marking points of the calibration rod in each frame of the qualified coordinate data according to the positional relationship data Point, multiple coordinate points are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained.
  • step S3 includes:
  • Step S301 Obtain marker point data: acquire positional relationship data of a plurality of marker points on the calibration rod.
  • the positional relationship data includes the length of two intersecting line segments formed by the plurality of marker points, the origin mark, and the coordinates of other marker points corresponding to the origin mark. data.
  • the length of the two intersecting line segments is: horizontal section 30cm, vertical section 24cm; the origin mark is: mark point b(0,0.05,0); corresponding to the origin mark
  • the coordinate data of other marker points are: a(0,0.05,0.20), c(0,0.05,-0.1), d(0.12,0.05,0), e(0.24,0.05,0).
  • Step S302 Determine the origin point coordinates: mark the common coordinate point in the two straight lines formed by multiple coordinate points in a qualified frame of coordinate data as the origin point coordinates, and the origin point coordinates correspond to the origin point mark.
  • the common coordinate point is used as the origin of the calibration bar, that is, the origin coordinates correspond to the origin mark.
  • the common coordinate point is the mark point b, and the origin coordinates of the current frame are (0, 0.05, 0).
  • Step S303 Determine two line segments: Calculate the target line segment of the two straight lines equal to the length of the line segment, and the target line segment contains the coordinates of the origin to obtain two target line segments.
  • the length of the two line segments on the calibration rod should be different, the longer line segment is the horizontal segment, and the shorter line segment is the vertical segment. Therefore, through this information, two target line segments in two intersecting straight lines can be determined, and each target line segment should contain the origin coordinates.
  • Step S304 Determine coordinate data: According to the distance between the origin mark and other mark points, other coordinate points in the target line segment with the same distance from the origin coordinates are determined, and finally multiple coordinate points corresponding to the multiple mark points are obtained.
  • the distance between the origin mark in the calibration bar and other mark points can be directly obtained through the mark point coordinates, the distance between the origin mark and other mark points is determined, and the origin mark corresponds to the origin coordinates in the current frame coordinate data, so Multiple other coordinate points corresponding to the marked points can be directly obtained.
  • the one with a larger distance from the origin coordinate b is coordinate data a
  • the one with a smaller distance from the origin coordinate b is the coordinate data c
  • the distance from the origin coordinate b is larger, such as 24cm
  • it is the coordinate data e
  • the distance from the origin coordinate b is smaller, such as 12cm is the coordinate data d, so as to obtain multiple mark points with the calibration rod.
  • this step also includes:
  • a preset ratio threshold such as 1.7
  • the distance between b and d and the distance between d and e are within the ratio range , Such as 0.8-1.2, to further determine whether the coordinate data is qualified coordinate data, and the unqualified coordinate data should be eliminated.
  • the coordinate data corresponding to the marked points of the calibration rod can be accurately determined.
  • the calibration rod detection method in the optical motion capture system of this embodiment filters and calculates a large number of coordinate data captured by the optical camera to determine multiple valid coordinate data corresponding to the calibration rod, which can not only determine whether the camera data contains Calibration rod information, and the coordinate data of multiple coordinate points corresponding to the calibration rod coordinate system can be accurately obtained, which provides indispensable information for camera calibration, and also plays a key role in the step of space marking the center point.
  • Laid a solid foundation for the high-precision positioning and tracking of the entire optical motion capture system.
  • the coordinate data acquisition module is used to acquire multiple frames of coordinate data captured by the optical camera on the swinging calibration rod, and each frame of coordinate data contains multiple coordinate point information;
  • the screening coordinate data module is used to determine whether there are two intersecting straight lines with a common coordinate point formed by a preset number of coordinate points among the multiple coordinate points in each frame in the multi-frame coordinate data. If it does not exist, then Eliminate one frame corresponding to the coordinate data, and if it exists, record multiple coordinate points on the two intersecting straight lines as qualified coordinate data to obtain qualified multi-frame coordinate data;
  • Determine the effective data module used to obtain the positional relationship data of multiple marking points on the calibration rod, and determine the multiple coordinate points corresponding to the multiple marking points of the calibration rod in each frame of the qualified coordinate data according to the positional relationship data , Multiple coordinate points are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained.
  • a calibration rod detection device in an optical motion capture system includes a memory, a processor, and a calibration rod detection program in the optical motion capture system that is stored in the memory and can be run on the processor, When the calibration rod detection program in the optical motion capture system is executed by the processor, the steps in the calibration rod detection method in the optical motion capture system of the foregoing embodiments are implemented.
  • a computer-readable storage medium stores a calibration rod detection program in an optical motion capture system.
  • the calibration rod detection program in the optical motion capture system implements the above implementations when executed by a processor. Example of the steps in the calibration rod detection method in the optical motion capture system.
  • the storage medium may be a volatile storage medium, and the storage medium may also be a non-volatile storage medium.

Abstract

A calibration rod testing method for an optical motion capture system, a device, an apparatus, and a storage medium. The method comprises: acquiring multiple frames of coordinate data from an optical camera capturing a moving calibration rod, determining whether coordinate points in each of the frames have two intersecting lines having a common coordinate point; if so, recording multiple coordinate points on the two intersecting lines as coordinate data having passed inspection; and determining, according to position relationship data of multiple marker points on the calibration rod, multiple coordinate points having positions corresponding to the multiple marker points of the calibration rod from each frame of coordinate data having passed inspection, so as to obtain multiple frames of valid coordinate data. The method determines whether coordinate data acquired by an optical camera comprises calibration rod information, and also accurately obtains coordinate data of multiple coordinate points having a one-to-one correspondence with a calibration rod coordinate system, thereby providing essential information for camera calibration.

Description

光学动捕系统中标定杆检测方法、装置、设备和存储介质Calibration rod detection method, device, equipment and storage medium in optical motion capture system 技术领域Technical field
本发明涉及计算机视觉技术领域,尤其涉及一种光学动捕系统中标定杆检测方法、装置、设备和存储介质。The invention relates to the technical field of computer vision, in particular to a calibration rod detection method, device, equipment and storage medium in an optical motion capture system.
背景技术Background technique
随着机器视觉应用日益广泛,大空间环境中的多相机视觉系统的需求越来越多了,主要方向是大空间内的高精度定位与跟踪。在机器视觉应用中,为确定空间物体表面某点的三维几何位置与其在图像中对应点之间的相互关系,必须建立相机成像的几何模型,这些几何模型就是相机参数。而这些参数必须通过实验与计算才能得到,求解参数的过程就称为相机标定。传统的相机标定法需要使用尺寸已知的标定物,如棋盘标定板,通过建立标定物上坐标已知的点与其图像点之间的对应,利用一定的算法获得相机模型的内外参数。而在多目相机环境中,为实现对物体的定位与跟踪,不仅要确定每个相机的参数,也需要确定相机与相机之间的位置关系。With the increasing application of machine vision, there is an increasing demand for multi-camera vision systems in large space environments. The main direction is high-precision positioning and tracking in large spaces. In machine vision applications, in order to determine the relationship between the three-dimensional geometric position of a point on the surface of a space object and its corresponding point in the image, geometric models of camera imaging must be established. These geometric models are camera parameters. These parameters must be obtained through experiments and calculations. The process of solving the parameters is called camera calibration. The traditional camera calibration method needs to use a calibration object with a known size, such as a checkerboard calibration board. By establishing the correspondence between a point with a known coordinate on the calibration object and an image point, a certain algorithm is used to obtain the internal and external parameters of the camera model. In a multi-camera environment, in order to locate and track an object, not only the parameters of each camera must be determined, but also the positional relationship between the camera and the camera must be determined.
现有的棋盘标定板算法使用条件严苛,且算法时间太长,使用非常不方便。且动捕系统中相机数量很多,相机与相机之间的区域交叉关系复杂,棋盘标定板需要花费大量人力和物力。显然,现有的棋盘标定方式不适用于光学相机的标定。因此需要一种应用于光学动捕系统中能准确快速的检测与识别的标定方法。The existing checkerboard calibration board algorithm uses strict conditions, and the algorithm time is too long, which is very inconvenient to use. In addition, there are a lot of cameras in the motion capture system, and the area cross relationship between the camera and the camera is complicated, and the checkerboard calibration board requires a lot of manpower and material resources. Obviously, the existing checkerboard calibration method is not suitable for the calibration of optical cameras. Therefore, there is a need for a calibration method that can be used in optical motion capture systems that can accurately and quickly detect and identify.
发明内容Summary of the invention
本发明的主要目的在于提供一种光学动捕系统中标定杆检测方法、装置、设备和存储介质,旨在解决光学动捕系统中标定杆的检测与识别技术问题。The main purpose of the present invention is to provide a calibration rod detection method, device, equipment and storage medium in an optical motion capture system, aiming to solve the technical problems of detection and identification of the calibration rod in the optical motion capture system.
为实现上述目的,本发明提供一种光学动捕系统中标定杆检测方法,所述 方法包括以下步骤:To achieve the above objective, the present invention provides a calibration rod detection method in an optical motion capture system. The method includes the following steps:
获取光学相机对挥动中的标定杆捕获的多帧坐标数据,每帧所述坐标数据中包含多个坐标点信息;Acquiring multiple frames of coordinate data captured by the optical camera on the swinging calibration rod, and each frame of the coordinate data includes multiple coordinate point information;
在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点形成的两条具有公共坐标点的相交直线,若不存在,则剔除所述坐标数据对应的一帧,若存在,则将两条相交直线上的多个坐标点记录为合格的坐标数据,得到合格的多帧坐标数据;In the multi-frame coordinate data, determine whether there are two intersecting straight lines with a common coordinate point formed by a preset number of coordinate points in the plurality of coordinate points in each frame, and if not, remove the coordinate data If the corresponding frame exists, multiple coordinate points on the two intersecting straight lines are recorded as qualified coordinate data to obtain qualified multi-frame coordinate data;
获取所述标定杆上多个标记点的位置关系数据,根据所述位置关系数据,确定出合格的每一帧坐标数据中与所述标定杆的多个标记点对应位置的多个坐标点,多个所述坐标点记录为一帧有效的坐标数据,得到多帧有效的坐标数据。Obtain the positional relationship data of the plurality of marking points on the calibration rod, and determine, according to the positional relationship data, a plurality of coordinate points corresponding to the positions of the plurality of marking points of the calibration rod in each frame of the qualified coordinate data, The multiple coordinate points are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained.
可选地,所述在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点形成的两条具有公共坐标点的相交直线,若不存在,则剔除所述坐标数据对应的一帧,若存在,则记录两条相交直线上的多个坐标点,得到合格的多帧坐标数据前,包括:Optionally, in the multi-frame coordinate data, it is determined whether there are two intersecting straight lines with a common coordinate point formed by a preset number of coordinate points among the plurality of coordinate points in each frame, if not, Then remove a frame corresponding to the coordinate data, if it exists, record multiple coordinate points on two intersecting straight lines, and before obtaining qualified multi-frame coordinate data, it includes:
在多帧坐标数据中,判断每一帧的多个所述坐标点个数是否在预设的阈值范围内,若不在所述阈值范围内,则剔除所述坐标数据对应的一帧,若在所述阈值范围内,则将多个所述坐标点记录为合格的坐标数据,得到合格的多帧坐标数据。In the multi-frame coordinate data, it is determined whether the number of the multiple coordinate points in each frame is within a preset threshold range, and if it is not within the threshold range, then a frame corresponding to the coordinate data is eliminated; Within the threshold range, a plurality of the coordinate points are recorded as qualified coordinate data to obtain qualified multi-frame coordinate data.
可选地,所述在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点形成的两条具有公共坐标点的相交直线,若不存在,则剔除所述坐标数据对应的一帧,若存在,则将两条相交直线上的多个坐标点记录为合格的坐标数据,得到合格的多帧坐标数据,包括:Optionally, in the multi-frame coordinate data, it is determined whether there are two intersecting straight lines with a common coordinate point formed by a preset number of coordinate points in the plurality of coordinate points in each frame, if not, Then remove a frame corresponding to the coordinate data, and if it exists, record multiple coordinate points on the two intersecting straight lines as qualified coordinate data to obtain qualified multi-frame coordinate data, including:
在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点位于同一直线上,若不存在直线,则剔除所述坐标数据对应的一帧;In the multi-frame coordinate data, determining whether there is a preset number of coordinate points on the same straight line among the plurality of coordinate points in each frame, and if there is no straight line, then removing a frame corresponding to the coordinate data;
若存在直线,则继续判断直线的数量是否在预设的数量范围内,若不在数 量范围内,则剔除所述坐标数据对应的一帧;If there are straight lines, continue to determine whether the number of straight lines is within the preset number range, and if it is not within the number range, remove one frame corresponding to the coordinate data;
若在数量范围内,则继续判断多条直线中的坐标点是否存在公共坐标点,若不存在公共坐标点,则剔除所述坐标数据对应的一帧;If it is within the number range, continue to determine whether the coordinate points in the multiple straight lines have a common coordinate point, and if there is no common coordinate point, remove a frame corresponding to the coordinate data;
若存在公共坐标点,则继续判断存在公共坐标点的直线是否只有两条,若大于两条直线,则剔除所述坐标数据对应的一帧;If there are common coordinate points, continue to determine whether there are only two straight lines with common coordinate points, and if there are more than two straight lines, then remove one frame corresponding to the coordinate data;
若只有两条直线,则将两条相交直线上的多个坐标点记录为合格的坐标数据,最终得到合格的多帧坐标数据。If there are only two straight lines, multiple coordinate points on the two intersecting straight lines are recorded as qualified coordinate data, and finally qualified multi-frame coordinate data is obtained.
可选地,所述在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点位于同一直线上,包括:Optionally, in the multiple frames of coordinate data, determining whether there are a preset number of coordinate points located on the same straight line among the multiple coordinate points in each frame includes:
在一帧坐标数据中,任取三个所述坐标点,计算三个所述坐标点之间两两距离,得到三个距离数值;In one frame of coordinate data, randomly select three of the coordinate points, calculate the pairwise distance between the three coordinate points, and obtain three distance values;
在三个所述距离数值中查找出最小距离数值和次小距离数值,判断所述次小距离数值是否大于预设的距离阈值,若所述次小距离数值大于所述距离阈值,则三个所述坐标点不在同一直线上;Find the smallest distance value and the second smallest distance value among the three distance values, and determine whether the second smallest distance value is greater than a preset distance threshold. If the second smallest distance value is greater than the distance threshold, then three The coordinate points are not on the same straight line;
否则,判断所述次小距离数值与所述最小距离数值的比值是否大于预设的比值阈值,若所述比值小于等于所述比值阈值,则三个所述坐标点不在同一直线上;Otherwise, judging whether the ratio of the second smallest distance value to the minimum distance value is greater than a preset ratio threshold, and if the ratio is less than or equal to the ratio threshold, the three coordinate points are not on the same straight line;
否则,判断所述次小距离数值的向量与所述最小距离数值的向量之间的夹角是否小于预设夹角阈值,若所述夹角大于等于所述夹角阈值,则三个所述坐标点不在同一直线上;Otherwise, determine whether the included angle between the vector of the second smallest distance value and the vector of the smallest distance value is less than a preset included angle threshold, and if the included angle is greater than or equal to the included angle threshold, then three The coordinate points are not on the same straight line;
否则,三个所述坐标点位于同一直线上。Otherwise, the three coordinate points are located on the same straight line.
可选地,所述在一帧坐标数据中,任取三个所述坐标点,计算三个所述坐标点之间两两距离,得到三个距离数值,包括:Optionally, in the one frame of coordinate data, randomly taking three of the coordinate points, calculating the two-by-two distance between the three coordinate points, and obtaining three distance values, including:
三个所述坐标点中任一两个所述坐标点之间的距离为二维坐标的像素欧式 距离,并采用下述公式计算得到:The distance between any two of the three coordinate points is the pixel Euclidean distance of two-dimensional coordinates, and is calculated by using the following formula:
D=sqrt((x1-x2) 2+(y1-y2) 2) D=sqrt((x1-x2) 2 +(y1-y2) 2 )
其中,D为距离数值,两个所述坐标点的二维坐标为(x1,y1)、(x2,y2)。Wherein, D is the distance value, and the two-dimensional coordinates of the two coordinate points are (x1, y1) and (x2, y2).
可选地,所述获取所述标定杆上多个标记点的位置关系数据,根据所述位置关系数据,确定出合格的每一帧坐标数据中与所述标定杆的多个标记点对应位置的多个坐标点,多个所述坐标点记录为一帧有效的坐标数据,得到多帧有效的坐标数据,包括:Optionally, the acquiring positional relationship data of a plurality of marking points on the calibration rod, and determining the positions corresponding to the plurality of marking points of the calibration rod in each frame of coordinate data that are qualified according to the positional relationship data The multiple coordinate points are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained, including:
获取所述标定杆上多个标记点的位置关系数据,所述位置关系数据包括多个标记点形成的两条相交的线段长度、原点标记、与所述原点标记对应的其他标记点坐标数据;Acquiring positional relationship data of a plurality of marking points on the calibration rod, the positional relationship data including the length of two intersecting line segments formed by the plurality of marking points, an origin mark, and other marking point coordinate data corresponding to the origin mark;
将合格的一帧坐标数据中多个坐标点形成的两条直线中具有的公共坐标点记为原点坐标,所述原点坐标与所述原点标记对应;Mark a common coordinate point in two straight lines formed by a plurality of coordinate points in a qualified frame of coordinate data as an origin coordinate, and the origin coordinate corresponds to the origin mark;
计算两条直线中与所述线段长度相等的目标线段,所述目标线段中包含所述原点坐标,得到两条目标线段;Calculate a target line segment of the two straight lines equal in length to the line segment, and the target line segment includes the coordinates of the origin to obtain two target line segments;
根据原点标记与其他标记点之间的距离,确定出所述目标线段中与原点坐标相同距离的其他坐标点,最终得到与多个标记点对应的多个坐标点。According to the distance between the origin mark and other mark points, other coordinate points with the same distance from the origin coordinate in the target line segment are determined, and finally multiple coordinate points corresponding to the multiple mark points are obtained.
可选地,所述根据原点标记与其他标记点之间的距离,确定出所述目标线段中与原点坐标相同距离的其他坐标点,最终得到与多个标记点对应的多个坐标点后,还包括:Optionally, according to the distance between the origin mark and other mark points, other coordinate points in the target line segment at the same distance from the origin coordinates are determined, and finally multiple coordinate points corresponding to the multiple mark points are obtained, Also includes:
将得到的多个坐标点中的原点坐标设为b,将较长线段中与b距离大的坐标点设为a,将较长线段中与b距离较小的坐标点设为c,将较短线段中与b距离大的坐标点设为e,将较短线段中与b距离小的坐标点设为d;Set the origin coordinates of the obtained multiple coordinate points as b, the coordinate point with the larger distance from b in the longer line segment as a, and the coordinate point with the smaller distance from b in the longer line segment as c. Set the coordinate point with the larger distance from b in the short line segment to e, and set the coordinate point with the smaller distance from b in the shorter line segment to d;
判断a与b之间的距离和b与c之间的距离比值是否大于预设的比值阈值,判断b与d之间的距离和d与e之间的距离比值是否在预设的比值范围内,若a与b之间的距离和b与c之间的距离比值大于所述比值阈值,且b与d之间的 距离和d与e之间的距离比值在所述比值范围内,则多个所述坐标点为有效的坐标数据。Determine whether the distance between a and b and the distance ratio between b and c are greater than the preset ratio threshold, and judge whether the distance between b and d and the distance ratio between d and e are within the preset ratio range , If the ratio of the distance between a and b and the distance between b and c is greater than the ratio threshold, and the distance between b and d and the distance between d and e are within the ratio range, then more Each of the coordinate points is valid coordinate data.
进一步地,为实现上述目的,本发明还提供一种光学动捕系统中标定杆检测装置,包括:Further, in order to achieve the above objective, the present invention also provides a calibration rod detection device in an optical motion capture system, including:
获取坐标数据模块,用于获取光学相机对挥动中的标定杆捕获的多帧坐标数据,每帧所述坐标数据中包含多个坐标点信息;The coordinate data acquisition module is used to acquire multiple frames of coordinate data captured by the optical camera on the swinging calibration rod, and each frame of the coordinate data includes multiple coordinate point information;
筛选坐标数据模块,用于在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点形成的两条具有公共坐标点的相交直线,若不存在,则剔除所述坐标数据对应的一帧,若存在,则将两条相交直线上的多个坐标点记录为合格的坐标数据,得到合格的多帧坐标数据;The screening coordinate data module is used for judging whether there are two intersecting straight lines with a common coordinate point formed by a preset number of coordinate points among the plurality of coordinate points in each frame in the multi-frame coordinate data. , Then remove a frame corresponding to the coordinate data, and if it exists, record multiple coordinate points on two intersecting straight lines as qualified coordinate data to obtain qualified multi-frame coordinate data;
确定有效数据模块,用于获取所述标定杆上多个标记点的位置关系数据,根据所述位置关系数据,确定出合格的每一帧坐标数据中与所述标定杆的多个标记点对应位置的多个坐标点,多个所述坐标点记录为一帧有效的坐标数据,得到多帧有效的坐标数据。The valid data determining module is used to obtain the positional relationship data of multiple marking points on the calibration rod, and according to the positional relationship data, it is determined that each frame of the qualified coordinate data corresponds to the multiple marking points of the calibration rod The multiple coordinate points of the position are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained.
为实现上述目的,本发明还提供一种光学动捕系统中标定杆检测设备,所述设备包括:存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的光学动捕系统中标定杆检测程序,所述光学动捕系统中标定杆检测程序被所述处理器执行时实现如上所述的光学动捕系统中标定杆检测方法的步骤。To achieve the above objective, the present invention also provides a calibration rod detection device in an optical motion capture system. The device includes a memory, a processor, and an optical motion capture device that is stored in the memory and can run on the processor. The calibration rod detection program in the system implements the steps of the calibration rod detection method in the optical motion capture system when the calibration rod detection program in the optical motion capture system is executed by the processor.
为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有光学动捕系统中标定杆检测程序,所述光学动捕系统中标定杆检测程序被处理器执行时实现如上所述的光学动捕系统中标定杆检测方法的步骤。In order to achieve the above object, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a calibration rod detection program in an optical motion capture system, and the calibration rod detection program in the optical motion capture system is processed. When the device is executed, the steps of the calibration rod detection method in the optical motion capture system as described above are realized.
本发明提供的光学动捕系统中标定杆检测方法,用于基于二维标定杆的光学动捕系统中,光学相机捕获固定形状的标定杆来获取众多坐标数据,通过本发明来确定光学相机获取的坐标数据中的有效数据。本发明不仅可以判断光学相机获取的坐标数据数据中是否包含标定杆信息,而且可以精确的得到与标定 杆坐标系一一对应的多个坐标点的坐标数据,为相机标定提供了必不可少的信息,也在空间标记中心点的步骤中起到了关键作用,为整个光学动捕系统中高精度的定位与跟踪打下了夯实的基础。The calibration rod detection method in the optical motion capture system provided by the present invention is used in an optical motion capture system based on a two-dimensional calibration rod. The optical camera captures the calibration rod of a fixed shape to obtain a large number of coordinate data. Valid data in the coordinate data. The invention can not only judge whether the coordinate data obtained by the optical camera contains calibration rod information, but also accurately obtain the coordinate data of multiple coordinate points corresponding to the calibration rod coordinate system, which provides indispensable for camera calibration. Information also played a key role in the step of marking the center point in space, laying a solid foundation for the high-precision positioning and tracking of the entire optical motion capture system.
附图说明Description of the drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only used for the purpose of illustrating the preferred embodiments, and are not considered as a limitation to the present invention.
图1为本发明实施例方案涉及的光学动捕系统中标定杆检测设备的运行环境的结构示意图;FIG. 1 is a schematic structural diagram of the operating environment of the calibration rod detection device in the optical motion capture system involved in the embodiment of the present invention;
图2为本发明一个实施例中光学动捕系统中标定杆检测方法的流程图;2 is a flowchart of a calibration rod detection method in an optical motion capture system in an embodiment of the present invention;
图3为本发明一个实施例中标定杆的一种结构示意图;Fig. 3 is a schematic diagram of a structure of a calibration rod in an embodiment of the present invention;
图4为本发明一个实施例中光学动捕系统中标定杆检测装置的结构图。Fig. 4 is a structural diagram of a calibration rod detection device in an optical motion capture system in an embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not used to limit the present invention.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。Those skilled in the art can understand that, unless specifically stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the described features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or groups of them.
参照图1,为本发明实施例方案涉及的光学动捕系统中标定杆检测设备运行 环境的结构示意图。1, which is a schematic structural diagram of the operating environment of the calibration rod detection equipment in the optical motion capture system involved in the embodiment of the present invention.
如图1所示,该光学动捕系统中标定杆检测设备包括:处理器1001,例如CPU,通信总线1002、用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1, the calibration rod detection device in the optical motion capture system includes: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to implement connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
本领域技术人员可以理解,图1中示出的光学动捕系统中标定杆检测设备的硬件结构并不构成对光学动捕系统中标定杆检测设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the hardware structure of the calibration rod detection device in the optical motion capture system shown in FIG. 1 does not constitute a limitation on the calibration rod detection device in the optical motion capture system, and may include more or more than that shown in the figure. Few parts, or a combination of some parts, or a different arrangement of parts.
如图1所示,作为一种计算机可读存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及光学动捕系统中标定杆检测程序。其中,操作系统是管理和控制光学动捕系统中标定杆检测设备和软件资源的程序,支持光学动捕系统中标定杆检测程序以及其它软件和/或程序的运行。As shown in FIG. 1, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a calibration rod detection program in an optical motion capture system. Among them, the operating system is a program that manages and controls the calibration rod detection equipment and software resources in the optical motion capture system, and supports the operation of the calibration rod detection program and other software and/or programs in the optical motion capture system.
在图1所示的光学动捕系统中标定杆检测设备的硬件结构中,网络接口1004主要用于接入网络;用户接口1003主要用于侦测确认指令和编辑指令等,而处理器1001可以用于调用存储器1005中存储的光学动捕系统中标定杆检测程序,并执行以下光学动捕系统中标定杆检测方法的各实施例的操作。In the hardware structure of the calibration rod detection device in the optical motion capture system shown in Figure 1, the network interface 1004 is mainly used to access the network; the user interface 1003 is mainly used to detect confirmation commands and edit commands, and the processor 1001 can It is used to call the calibration rod detection program in the optical motion capture system stored in the memory 1005, and execute the operations of the following embodiments of the calibration rod detection method in the optical motion capture system.
参照图2,为本发明一个实施例中的光学动捕系统中标定杆检测方法的流程图,如图2所示,一种光学动捕系统中标定杆检测方法,包括以下步骤:2 is a flowchart of a calibration rod detection method in an optical motion capture system in an embodiment of the present invention. As shown in FIG. 2, a calibration rod detection method in an optical motion capture system includes the following steps:
步骤S1,获取坐标数据:获取光学相机对挥动中的标定杆捕获的多帧坐标数据,每帧坐标数据中包含多个坐标点信息。Step S1, acquiring coordinate data: acquiring multiple frames of coordinate data captured by the optical camera on the swinging calibration rod, and each frame of coordinate data includes multiple coordinate point information.
本步骤的标定杆采用一种二维标定杆,标定杆上有多个标记点,且标记点涂有高反光材料,能够被光学相机识别。标记点的位置关系是预先设置好的,即可直接得到多个标记点之间的位置关系数据。使用过程中,在大空间内多相 机环境下挥动标定杆,光学相机则会识别到标定杆上的标记点,得到每一帧二维空间坐标数据,并把这些坐标数据记录存储。The calibration rod in this step adopts a two-dimensional calibration rod. There are a plurality of marking points on the calibration rod, and the marking points are coated with a high-reflective material, which can be recognized by an optical camera. The position relationship of the mark points is preset, and the position relationship data between multiple mark points can be directly obtained. In the process of using, swing the calibration rod in a multi-camera environment in a large space, and the optical camera will recognize the marked points on the calibration rod, obtain each frame of two-dimensional space coordinate data, and record and store these coordinate data.
如图3所示,标定杆2包括横段和竖段,标定杆上设有五个标记点21,横段和竖段具有一个公共标记点,五个标记点21的位置是固定不变的,可以设置为:横段上的三个标记点从左到右的位置关系如下:第一个标记点到第二个标记点的距离是20cm,第二个标记点到第三个标记点的距离是10cm,第一个标记点到第三个标记点的距离是30cm;竖段的三个标记点从上至下的位置关系如下:第一个标记点到第二个标记点的距离是12cm,第二个标记点到第三个标记点的距离是12cm,第一个标记点到第三个标记点的距离是24cm。标定杆上的五个标记点21距离地面具有一个固定高度,固定高度可以是5cm。若建立标定杆坐标系,以横段和竖段相交的公共标记点为原点,以竖段自上至下为X轴正方向,以垂直向上为Y轴正方向,以横段自右向左为Z轴正方向,那么五个标记点(a,b,c,d,e)的坐标为:横段的三个标记点从左到右依次为:第一个标记点a(0,0.05,0.20),第二个标记点b(0,0.05,0),第三个标记点c(0,0.05,-0.1);竖段的三个标记点从上至下为:第一个标记点b(0,0.05,0),第二个标记点d(0.12,0.05,0),第三个标记点e(0.24,0.05,0)。As shown in Figure 3, the calibration rod 2 includes a horizontal section and a vertical section. There are five marking points 21 on the calibration rod. The horizontal section and the vertical section have a common marking point. The positions of the five marking points 21 are fixed. , Can be set as: the positional relationship of the three mark points on the horizontal segment from left to right is as follows: the distance from the first mark point to the second mark point is 20cm, and the distance from the second mark point to the third mark point The distance is 10cm, and the distance from the first marking point to the third marking point is 30cm; the positional relationship of the three marking points in the vertical section from top to bottom is as follows: the distance from the first marking point to the second marking point is 12cm, the distance from the second marking point to the third marking point is 12cm, and the distance from the first marking point to the third marking point is 24cm. The five marking points 21 on the calibration rod have a fixed height from the ground, and the fixed height can be 5 cm. If the calibration rod coordinate system is established, the common mark point where the horizontal and vertical sections intersect is the origin, the vertical section is the positive direction of the X axis from top to bottom, the vertical upward is the positive direction of the Y axis, and the horizontal section is from right to left. Is the positive direction of the Z-axis, then the coordinates of the five mark points (a, b, c, d, e) are: the three mark points of the horizontal segment from left to right are: the first mark point a(0, 0.05 , 0.20), the second mark point b (0, 0.05, 0), the third mark point c (0, 0.05, -0.1); the three mark points of the vertical section from top to bottom are: the first mark Point b (0, 0.05, 0), the second marking point d (0.12, 0.05, 0), and the third marking point e (0.24, 0.05, 0).
本发明的标定杆设置五个标记点21后,在光学相机标定过程中,加快了匹配速度,降低了计算难度,标定时间更快,节省人力和物力。在中心点检测时或者在标定杆定位跟踪时,只要确定五个点的相互关系即可确定标定杆的位置所在,大大降低了算法的复杂性。After the calibration rod of the present invention is provided with five marking points 21, during the calibration process of the optical camera, the matching speed is accelerated, the calculation difficulty is reduced, the calibration time is faster, and manpower and material resources are saved. When the center point is detected or when the calibration rod is positioned and tracked, the position of the calibration rod can be determined as long as the correlation of the five points is determined, which greatly reduces the complexity of the algorithm.
步骤S2,筛选坐标数据:在多帧坐标数据中,判断每一帧的多个坐标点中是否存在预设个数的坐标点形成的两条具有公共坐标点的相交直线,若不存在,则剔除坐标数据对应的一帧,若存在,则将两条相交直线上的多个坐标点记录为合格的坐标数据,得到合格的多帧坐标数据。Step S2, screening the coordinate data: in the multi-frame coordinate data, determine whether there are two intersecting straight lines with a common coordinate point formed by a preset number of coordinate points among the multiple coordinate points in each frame, if not, then A frame corresponding to the coordinate data is eliminated, and if it exists, multiple coordinate points on the two intersecting straight lines are recorded as qualified coordinate data to obtain qualified multi-frame coordinate data.
由于在步骤S1采集数据过程中标定杆是在不断挥动的,导致光学相机采集的坐标数据不是每一帧数据都能完整,即包含标定杆上的多个标记点坐标,而 且即使有多个坐标点数据,也不能确定这多个坐标就是标定杆上的多个标记点。所以本步骤需要筛选采集到的每一帧的坐标数据。本步骤的预设个数与标定杆上横段或竖段上设置的标记点个数相同。若标定杆上设有五个标记点,横段为三个标记点,竖段为三个标记点,则预设个数为3。当所有的坐标点中,有且仅有两条相交直线时,认为两条相交直线上的多个数据点为合格的坐标数据。Since the calibration bar is constantly swinging during the data collection process in step S1, the coordinate data collected by the optical camera is not complete in every frame of data, that is, it contains the coordinates of multiple marking points on the calibration bar, and even if there are multiple coordinates Point data, it cannot be determined that these multiple coordinates are multiple marked points on the calibration rod. Therefore, this step needs to filter the coordinate data of each frame collected. The preset number in this step is the same as the number of marking points set on the horizontal or vertical section of the calibration rod. If there are five mark points on the calibration rod, the horizontal section is three mark points, and the vertical section is three mark points, the preset number is 3. When there are only two intersecting straight lines among all the coordinate points, multiple data points on the two intersecting straight lines are considered as qualified coordinate data.
在一个实施例中,在步骤S2之前,包括对每一帧的多个坐标点进行预筛选:In one embodiment, before step S2, it includes pre-screening multiple coordinate points in each frame:
在多帧坐标数据中,判断每一帧的多个坐标点个数是否在预设的阈值范围内,若不在阈值范围内,则剔除坐标数据对应的一帧,若在阈值范围内,则将多个坐标点记录为合格的坐标数据,得到合格的多帧坐标数据。In the multi-frame coordinate data, it is judged whether the number of coordinate points in each frame is within the preset threshold range. If it is not within the threshold range, the frame corresponding to the coordinate data will be eliminated. If it is within the threshold range, the Multiple coordinate points are recorded as qualified coordinate data, and qualified multi-frame coordinate data is obtained.
判断时,阈值范围可以是5-500个坐标点,若一帧中坐标点个数小于5个,认为当前帧中不包含标定杆对应的坐标数据,即当前帧坐标数据不合格。若一帧中坐标点个数大于500个,认为当前帧坐标数据中杂点太多,无用数据过量,当前帧坐标数据也不合格,不合格的坐标数据应从多帧坐标数据中首先被剔除。剔除后得到了合格的每一帧坐标数据,作为后续检测使用,大大降低了后续算法的复杂性。In the judgment, the threshold range can be 5-500 coordinate points. If the number of coordinate points in a frame is less than 5, it is considered that the current frame does not contain the coordinate data corresponding to the calibration rod, that is, the current frame coordinate data is unqualified. If the number of coordinate points in a frame is more than 500, it is considered that there are too many clutters in the coordinate data of the current frame, excessive useless data, and the coordinate data of the current frame is unqualified. The unqualified coordinate data should be eliminated from the multi-frame coordinate data first. After the elimination, the qualified coordinate data of each frame is obtained, which is used as a follow-up detection, which greatly reduces the complexity of the follow-up algorithm.
在一个实施例中,步骤S2,包括:In one embodiment, step S2 includes:
S201,判断是否存在直线:在多帧坐标数据中,判断每一帧的多个坐标点中是否存在预设个数的坐标点位于同一直线上,若不存在直线,则剔除坐标数据对应的一帧。S201. Determine whether there is a straight line: in the multi-frame coordinate data, determine whether there is a preset number of coordinate points located on the same straight line among the multiple coordinate points in each frame. If there is no straight line, remove one corresponding to the coordinate data. frame.
在判断预设个数的坐标点是否位于同一直线上时,采用如下方式:When judging whether the preset number of coordinate points are on the same straight line, the following method is used:
S20101,在一帧坐标数据中,任取三个坐标点,计算三个坐标点之间两两距离,得到三个距离数值,三个坐标点中任一两个坐标点之间的距离为二维坐标的像素欧式距离,并采用下述公式计算得到:S20101, in one frame of coordinate data, choose any three coordinate points, calculate the two-by-two distance between the three coordinate points, and obtain three distance values. The distance between any two coordinate points of the three coordinate points is two The pixel Euclidean distance of the dimensional coordinate is calculated using the following formula:
D=sqrt((x1-x2) 2+(y1-y2) 2) D=sqrt((x1-x2) 2 +(y1-y2) 2 )
其中,D为距离数值,两个坐标点的二维坐标为(x1,y1)、(x2,y2)。Among them, D is the distance value, and the two-dimensional coordinates of the two coordinate points are (x1, y1), (x2, y2).
例如,在一帧坐标数据中,任取三个坐标点A(x1,y1)、B(x2,y2)、C(x3,y3),计算三个点之间的相互距离,则通过上述计算公式得到二维坐标的像素欧式距离:P=A-C、Q=B-C、R=A-B。For example, in a frame of coordinate data, any three coordinate points A (x1, y1), B (x2, y2), C (x3, y3) are taken, and the mutual distance between the three points is calculated, then the above calculation The formula obtains the pixel Euclidean distance in two-dimensional coordinates: P=AC, Q=BC, R=AB.
S20102,在三个距离数值中查找出最小距离数值和次小距离数值,判断次小距离数值是否大于预设的距离阈值,若次小距离数值大于距离阈值,则三个坐标点不在同一直线上。S20102: Find the smallest distance value and the second smallest distance value among the three distance values, and judge whether the second smallest distance value is greater than the preset distance threshold. If the second smallest distance value is greater than the distance threshold, the three coordinate points are not on the same straight line .
由于标定杆上的多个标记点的位置关系是确定的,因此光学相机捕获的一帧坐标数据中多个坐标点之间应有含有多个标记点位置关系的坐标点。因此本步骤根据坐标点之间的距离,来确定三个坐标点在同一直线上。Since the positional relationship of the multiple marking points on the calibration rod is determined, there should be coordinate points containing the positional relationship of multiple marking points among the multiple coordinate points in a frame of coordinate data captured by the optical camera. Therefore, this step determines that the three coordinate points are on the same straight line according to the distance between the coordinate points.
例如,在步骤S20101中得到的三个距离数值P、Q和R中,将最小数值记为minU和次小数值记为minV,如果minV大于预设的距离阈值,如12时,认为A、B、C三点不符合三点共线的要求,A、B、C三点不在同一直线上。For example, among the three distance values P, Q, and R obtained in step S20101, the smallest value is recorded as minU and the second decimal value is recorded as minV. If minV is greater than a preset distance threshold, such as 12, A and B are considered , C three points do not meet the requirements of three points collinear, A, B, C three points are not on the same straight line.
S20103,否则,判断次小距离数值与最小距离数值的比值是否大于预设的比值阈值,若比值小于等于比值阈值,则三个坐标点不在同一直线上。S20103, otherwise, determine whether the ratio of the second smallest distance value to the minimum distance value is greater than the preset ratio threshold, and if the ratio is less than or equal to the ratio threshold, the three coordinate points are not on the same straight line.
当次小距离数值小于等于距离阈值,则认为三个坐标点有可能在同一直线上,还需要继续进行本步骤的判断。When the second smallest distance value is less than or equal to the distance threshold, it is considered that the three coordinate points may be on the same straight line, and the judgment in this step needs to be continued.
例如,minV与minU比值小于等于比值阈值0.2时,认为三个坐标点不在同一直线上。For example, when the ratio of minV to minU is less than or equal to the ratio threshold 0.2, it is considered that the three coordinate points are not on the same straight line.
S20104,否则,判断次小距离数值的向量与最小距离数值的向量之间的夹角是否小于预设夹角阈值,若夹角大于等于夹角阈值,则三个坐标点不在同一直线上。S20104, otherwise, determine whether the included angle between the vector with the second smallest distance value and the vector with the smallest distance value is less than the preset included angle threshold. If the included angle is greater than or equal to the included angle threshold, the three coordinate points are not on the same straight line.
当次小距离数值与最小距离数值的比值大于比值阈值,则认为三个坐标点有可能在同一直线上,还需要继续进行本步骤的判断。When the ratio of the second smallest distance value to the smallest distance value is greater than the ratio threshold value, it is considered that the three coordinate points may be on the same straight line, and the judgment of this step needs to be continued.
例如,minV与minU向量之间的夹角大于等于夹角阈值5度,认为三个坐标点不在同一直线上。For example, if the angle between the minV and minU vectors is greater than or equal to the angle threshold of 5 degrees, it is considered that the three coordinate points are not on the same straight line.
S20105,否则,三个坐标点位于同一直线上。S20105, otherwise, the three coordinate points are on the same straight line.
只有三个坐标点形成的三个距离数值中,次小距离数值小于等于距离阈值,且次小距离数值与最小距离数值的比值大于比值阈值,且次小距离数值的向量与最小距离数值的向量之间的夹角小于夹角阈值时,三个坐标点符合三点共线的要求,位于同一直线上,此时保存这三个坐标点的坐标数据。Among the three distance values formed by only three coordinate points, the second smallest distance value is less than or equal to the distance threshold, and the ratio of the second smallest distance value to the smallest distance value is greater than the ratio threshold, and the vector of the second smallest distance value and the vector of the smallest distance value When the included angle between is less than the included angle threshold, the three coordinate points meet the requirement of three-point collinear and are located on the same straight line. At this time, the coordinate data of these three coordinate points are saved.
S202,判断直线数量:若存在直线,则继续判断直线的数量是否在预设的数量范围内,若不在数量范围内,则剔除坐标数据对应的一帧。S202: Judging the number of straight lines: if there are straight lines, continue to judge whether the number of straight lines is within a preset number range, and if not, then remove a frame corresponding to the coordinate data.
本步骤中的数量范围可以是2-10个,如果一帧坐标数据中,直线的数量小于2个,认为这帧坐标数据中不包含标定杆,即这帧数据不合格。如果一帧坐标数据中直线的数量大于10个,认为这帧坐标数据中杂点太多,无用数据过量,这帧数据也不合格,不合格的数据应该被剔除。The number range in this step can be 2-10. If the number of straight lines in a frame of coordinate data is less than 2, it is considered that this frame of coordinate data does not include the calibration rod, that is, this frame of data is unqualified. If the number of straight lines in a frame of coordinate data is greater than 10, it is considered that there are too many noises in the frame of coordinate data and excessive useless data. This frame of data is also unqualified, and the unqualified data should be eliminated.
S203,判断是否存在公共坐标点:若在数量范围内,则继续判断多条直线中的坐标点是否存在公共坐标点,若不存在公共坐标点,则剔除坐标数据对应的一帧。S203: Determine whether there is a common coordinate point: if it is within the number range, continue to determine whether the coordinate points in the multiple straight lines have a common coordinate point, and if there is no common coordinate point, remove a frame corresponding to the coordinate data.
本步骤通过判断是否存在公共坐标点来确定一帧坐标数据中是否含有相交的两条直线。若没有相交的两条直线,则认为当前帧坐标数据中不包含标定杆,即这帧数据不合格,不合格的数据应该被剔除。This step determines whether there are two intersecting straight lines in one frame of coordinate data by judging whether there are common coordinate points. If there are no two intersecting straight lines, it is considered that the calibration rod is not included in the current frame coordinate data, that is, the data of this frame is unqualified, and the unqualified data should be eliminated.
S204,判断相交直线的条数:若存在公共坐标点,则继续判断存在公共坐标点的直线是否只有两条,若大于两条直线,则剔除坐标数据对应的一帧。S204: Judging the number of intersecting straight lines: if there are common coordinate points, continue to judge whether there are only two straight lines with common coordinate points, and if there are more than two straight lines, then remove one frame corresponding to the coordinate data.
如果一帧坐标数据中相交直线的数据不是2,即无论是大于2还是小于2,都认为这帧坐标数据不合格,不合格的数据应该被剔除。If the data of the intersecting straight lines in a frame of coordinate data is not 2, that is, whether it is greater than 2 or less than 2, the coordinate data of this frame is considered to be unqualified, and the unqualified data should be eliminated.
S205,记录合格的坐标数据:若只有两条直线,则将两条相交直线上的多个坐标点记录为合格的坐标数据,最终得到合格的多帧坐标数据。S205: Record qualified coordinate data: if there are only two straight lines, record multiple coordinate points on the two intersecting straight lines as qualified coordinate data, and finally obtain qualified multi-frame coordinate data.
若一帧坐标数据中,有且只有两条相交且具有公共坐标点的直线时,认为当前帧坐标数据是合格的坐标数据,将这两条直线上所有的坐标点进行保存。If there are and only two intersecting straight lines with a common coordinate point in one frame of coordinate data, the current frame coordinate data is considered to be qualified coordinate data, and all the coordinate points on the two straight lines are saved.
本实施例通过多层判断后,在大量的多帧坐标数据中,有机的筛选出符合需求的多帧坐标数据,作为合格的坐标数据,为后续确定有效的坐标数据提供精确可靠的数据支持,也可大大节省后续确定有效的坐标数据时的计算量。In this embodiment, after multiple levels of judgment, from a large number of multi-frame coordinate data, the multi-frame coordinate data that meets the requirements is organically screened out as qualified coordinate data to provide accurate and reliable data support for the subsequent determination of effective coordinate data. It can also greatly save the amount of calculation in the subsequent determination of effective coordinate data.
步骤S3,确定有效坐标数据:获取标定杆上多个标记点的位置关系数据,根据位置关系数据,确定出合格的每一帧坐标数据中与标定杆的多个标记点对应位置的多个坐标点,多个坐标点记录为一帧有效的坐标数据,得到多帧有效的坐标数据。Step S3, determine the effective coordinate data: obtain the positional relationship data of the multiple marking points on the calibration rod, and determine the multiple coordinates corresponding to the multiple marking points of the calibration rod in each frame of the qualified coordinate data according to the positional relationship data Point, multiple coordinate points are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained.
通过步骤S2后每一帧都筛选出了合格的多个坐标点,这些坐标点分布在两条相交的直线上,且这两条相交的直线具有公共坐标点。为了光学相机后续算法的需求,需要确定出合格的多个坐标点的具体关系或位置关系,即要把多个合格的坐标点与标定杆坐标系中的多个标记点一一对应,最终确定出有效的坐标数据,为光学相机的标定提供可靠的数据。After step S2, a plurality of qualified coordinate points are screened out for each frame. These coordinate points are distributed on two intersecting straight lines, and the two intersecting straight lines have a common coordinate point. For the needs of the subsequent algorithms of the optical camera, it is necessary to determine the specific relationship or positional relationship of the multiple qualified coordinate points, that is, one-to-one correspondence between the multiple qualified coordinate points and the multiple mark points in the calibration rod coordinate system, and finally determine Effective coordinate data can be generated to provide reliable data for the calibration of the optical camera.
在一个实施例中,步骤S3,包括:In one embodiment, step S3 includes:
步骤S301,获取标记点数据:获取标定杆上多个标记点的位置关系数据,位置关系数据包括多个标记点形成的两条相交的线段长度、原点标记、与原点标记对应的其他标记点坐标数据。Step S301: Obtain marker point data: acquire positional relationship data of a plurality of marker points on the calibration rod. The positional relationship data includes the length of two intersecting line segments formed by the plurality of marker points, the origin mark, and the coordinates of other marker points corresponding to the origin mark. data.
例如采用步骤S1的标定杆时,如图3所示,两条相交的线段长度为:横段30cm,竖段24cm;原点标记为:标记点b(0,0.05,0);与原点标记对应的其他标记点坐标数据为:a(0,0.05,0.20)、c(0,0.05,-0.1)、d(0.12,0.05,0)、e(0.24,0.05,0)。For example, when the calibration bar of step S1 is used, as shown in Figure 3, the length of the two intersecting line segments is: horizontal section 30cm, vertical section 24cm; the origin mark is: mark point b(0,0.05,0); corresponding to the origin mark The coordinate data of other marker points are: a(0,0.05,0.20), c(0,0.05,-0.1), d(0.12,0.05,0), e(0.24,0.05,0).
步骤S302,确定原点坐标:将合格的一帧坐标数据中多个坐标点形成的两条直线中具有的公共坐标点记为原点坐标,原点坐标与原点标记对应。Step S302: Determine the origin point coordinates: mark the common coordinate point in the two straight lines formed by multiple coordinate points in a qualified frame of coordinate data as the origin point coordinates, and the origin point coordinates correspond to the origin point mark.
本步骤将公共坐标点作为标定杆的原点,即原点坐标与原点标记对应,如图3中所示,公共坐标点为标记点b,当前帧的原点坐标即为(0,0.05,0)。In this step, the common coordinate point is used as the origin of the calibration bar, that is, the origin coordinates correspond to the origin mark. As shown in Fig. 3, the common coordinate point is the mark point b, and the origin coordinates of the current frame are (0, 0.05, 0).
步骤S303,确定两条线段:计算两条直线中与线段长度相等的目标线段, 目标线段中包含原点坐标,得到两条目标线段。Step S303: Determine two line segments: Calculate the target line segment of the two straight lines equal to the length of the line segment, and the target line segment contains the coordinates of the origin to obtain two target line segments.
根据标定杆的形状,标定杆上两条线段的长度应不一样,较长的那条线段为横段,较短的那条线段为竖段。因此通过此信息,可以确定出两条相交直线中的两条目标线段,且每条目标线段内均应包含原点坐标。According to the shape of the calibration rod, the length of the two line segments on the calibration rod should be different, the longer line segment is the horizontal segment, and the shorter line segment is the vertical segment. Therefore, through this information, two target line segments in two intersecting straight lines can be determined, and each target line segment should contain the origin coordinates.
步骤S304,确定坐标数据:根据原点标记与其他标记点之间的距离,确定出目标线段中与原点坐标相同距离的其他坐标点,最终得到与多个标记点对应的多个坐标点。Step S304: Determine coordinate data: According to the distance between the origin mark and other mark points, other coordinate points in the target line segment with the same distance from the origin coordinates are determined, and finally multiple coordinate points corresponding to the multiple mark points are obtained.
由于标定杆中的原点标记与其他标记点之间的距离通过标记点坐标可直接得到,原点标记与其他标记点之间的距离确定,原点标记又与当前帧坐标数据中的原点坐标对应,因此可以直接得到与标记点对应的其他多个坐标点。Since the distance between the origin mark in the calibration bar and other mark points can be directly obtained through the mark point coordinates, the distance between the origin mark and other mark points is determined, and the origin mark corresponds to the origin coordinates in the current frame coordinate data, so Multiple other coordinate points corresponding to the marked points can be directly obtained.
例如,原点坐标b确定后,在横段中,与原点坐标b距离大一点的,如20cm的,为坐标数据a,与原点坐标b距离小一点的,如10cm的为坐标数据c。在竖段中,与原点坐标b距离大一点的,如24cm的,为坐标数据e,与原点坐标b距离小一点的,如12cm的为坐标数据d,从而得到与标定杆的多个标记点一一对应的多个坐标数据。For example, after the origin coordinate b is determined, in the horizontal segment, the one with a larger distance from the origin coordinate b, such as 20 cm, is coordinate data a, and the one with a smaller distance from the origin coordinate b, such as 10 cm, is the coordinate data c. In the vertical section, if the distance from the origin coordinate b is larger, such as 24cm, it is the coordinate data e, and the distance from the origin coordinate b is smaller, such as 12cm is the coordinate data d, so as to obtain multiple mark points with the calibration rod. Multiple coordinate data in one-to-one correspondence.
本步骤在确定出多个坐标点信息后,还包括:After determining multiple coordinate point information, this step also includes:
将得到的多个坐标点中的原点坐标设为b,将较长线段中与b距离大的坐标点设为a,将较长线段中与b距离较小的坐标点设为c,将较短线段中与b距离大的坐标点设为e,将较短线段中与b距离小的坐标点设为d,判断a与b之间的距离和b与c之间的距离比值是否大于预设的比值阈值,判断b与d之间的距离和d与e之间的距离比值是否在预设的比值范围内,若a与b之间的距离和b与c之间的距离比值大于比值阈值,且b与d之间的距离和d与e之间的距离比值在比值范围内,则多个坐标点为有效的坐标数据。Set the origin coordinates of the obtained multiple coordinate points as b, the coordinate point with the larger distance from b in the longer line segment as a, and the coordinate point with the smaller distance from b in the longer line segment as c. Set the coordinate point with the larger distance from b in the short line segment to e, and set the coordinate point with the smaller distance from b in the shorter line segment to d, and judge whether the ratio of the distance between a and b and the distance between b and c is greater than the preset value. Set the ratio threshold to judge whether the distance between b and d and the distance ratio between d and e are within the preset ratio range, if the distance between a and b and the distance between b and c are greater than the ratio Threshold, and the ratio of the distance between b and d and the distance between d and e is within the ratio range, then multiple coordinate points are valid coordinate data.
通过判断a与b之间的距离和b与c之间的距离比值是否大于预设的比值阈值,如1.7,b与d之间的距离和d与e之间的距离比值是否在比值范围内,如0.8-1.2,来进一步确定坐标数据是否为合格的坐标数据,不合格的坐标数据 应该被剔除。By judging whether the ratio of the distance between a and b and the distance between b and c is greater than a preset ratio threshold, such as 1.7, whether the distance between b and d and the distance between d and e are within the ratio range , Such as 0.8-1.2, to further determine whether the coordinate data is qualified coordinate data, and the unqualified coordinate data should be eliminated.
本实施例通过上述多种计算及判断方式相结合,可以精确的确定出与标定杆的标记点一一对应的坐标数据。In this embodiment, through the combination of the above-mentioned multiple calculation and judgment methods, the coordinate data corresponding to the marked points of the calibration rod can be accurately determined.
本实施例光学动捕系统中标定杆检测方法,通过对光学相机捕获的大量坐标数据中进行筛选及计算,确定出与标定杆对应的多个有效的坐标数据,不仅可以判断相机数据中是否包含标定杆信息,而且可以精确的得到与标定杆坐标系一一对应的多个坐标点的坐标数据,为相机标定提供了必不可少的信息,也在空间标记中心点的步骤中起到了关键作用,为整个光学动捕系统中高精度的定位与跟踪打下了夯实的基础。The calibration rod detection method in the optical motion capture system of this embodiment filters and calculates a large number of coordinate data captured by the optical camera to determine multiple valid coordinate data corresponding to the calibration rod, which can not only determine whether the camera data contains Calibration rod information, and the coordinate data of multiple coordinate points corresponding to the calibration rod coordinate system can be accurately obtained, which provides indispensable information for camera calibration, and also plays a key role in the step of space marking the center point. , Laid a solid foundation for the high-precision positioning and tracking of the entire optical motion capture system.
在一个实施例中,提出了一种光学动捕系统中标定杆检测装置,如图4所示,该装置包括:In one embodiment, a calibration rod detection device in an optical motion capture system is proposed. As shown in FIG. 4, the device includes:
获取坐标数据模块,用于获取光学相机对挥动中的标定杆捕获的多帧坐标数据,每帧坐标数据中包含多个坐标点信息;The coordinate data acquisition module is used to acquire multiple frames of coordinate data captured by the optical camera on the swinging calibration rod, and each frame of coordinate data contains multiple coordinate point information;
筛选坐标数据模块,用于在多帧坐标数据中,判断每一帧的多个坐标点中是否存在预设个数的坐标点形成的两条具有公共坐标点的相交直线,若不存在,则剔除坐标数据对应的一帧,若存在,则将两条相交直线上的多个坐标点记录为合格的坐标数据,得到合格的多帧坐标数据;The screening coordinate data module is used to determine whether there are two intersecting straight lines with a common coordinate point formed by a preset number of coordinate points among the multiple coordinate points in each frame in the multi-frame coordinate data. If it does not exist, then Eliminate one frame corresponding to the coordinate data, and if it exists, record multiple coordinate points on the two intersecting straight lines as qualified coordinate data to obtain qualified multi-frame coordinate data;
确定有效数据模块,用于获取标定杆上多个标记点的位置关系数据,根据位置关系数据,确定出合格的每一帧坐标数据中与标定杆的多个标记点对应位置的多个坐标点,多个坐标点记录为一帧有效的坐标数据,得到多帧有效的坐标数据。Determine the effective data module, used to obtain the positional relationship data of multiple marking points on the calibration rod, and determine the multiple coordinate points corresponding to the multiple marking points of the calibration rod in each frame of the qualified coordinate data according to the positional relationship data , Multiple coordinate points are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained.
在一个实施例中,提出了一种光学动捕系统中标定杆检测设备,设备包括:存储器、处理器以及存储在存储器上并可在处理器上运行的光学动捕系统中标定杆检测程序,光学动捕系统中标定杆检测程序被处理器执行时实现上述各实施例的光学动捕系统中标定杆检测方法中的步骤。In one embodiment, a calibration rod detection device in an optical motion capture system is proposed. The device includes a memory, a processor, and a calibration rod detection program in the optical motion capture system that is stored in the memory and can be run on the processor, When the calibration rod detection program in the optical motion capture system is executed by the processor, the steps in the calibration rod detection method in the optical motion capture system of the foregoing embodiments are implemented.
在一个实施例中,一种计算机可读存储介质,计算机可读存储介质上存储有光学动捕系统中标定杆检测程序,光学动捕系统中标定杆检测程序被处理器执行时实现上述各实施例的光学动捕系统中标定杆检测方法中的步骤。其中,存储介质可以易失性存储介质,存储介质也可以为非易失性存储介质。In one embodiment, a computer-readable storage medium stores a calibration rod detection program in an optical motion capture system. The calibration rod detection program in the optical motion capture system implements the above implementations when executed by a processor. Example of the steps in the calibration rod detection method in the optical motion capture system. Among them, the storage medium may be a volatile storage medium, and the storage medium may also be a non-volatile storage medium.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium, and the storage medium can include: Read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the various technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, All should be considered as the scope of this specification.
以上所述实施例仅表达了本发明一些示例性实施例,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express some exemplary embodiments of the present invention, and the description is relatively specific and detailed, but it should not be understood as a limitation to the patent scope of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can be made, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.

Claims (10)

  1. 一种光学动捕系统中标定杆检测方法,其特征在于,所述方法包括以下步骤:A method for detecting a calibration rod in an optical motion capture system is characterized in that the method includes the following steps:
    获取光学相机对挥动中的标定杆捕获的多帧坐标数据,每帧所述坐标数据中包含多个坐标点信息;Acquiring multiple frames of coordinate data captured by the optical camera on the swinging calibration rod, and each frame of the coordinate data includes multiple coordinate point information;
    在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点形成的两条具有公共坐标点的相交直线,若不存在,则剔除所述坐标数据对应的一帧,若存在,则将两条相交直线上的多个坐标点记录为合格的坐标数据,得到合格的多帧坐标数据;In the multi-frame coordinate data, determine whether there are two intersecting straight lines with a common coordinate point formed by a preset number of coordinate points in the plurality of coordinate points in each frame, and if not, remove the coordinate data If the corresponding frame exists, multiple coordinate points on the two intersecting straight lines are recorded as qualified coordinate data to obtain qualified multi-frame coordinate data;
    获取所述标定杆上多个标记点的位置关系数据,根据所述位置关系数据,确定出合格的每一帧坐标数据中与所述标定杆的多个标记点对应位置的多个坐标点,多个所述坐标点记录为一帧有效的坐标数据,得到多帧有效的坐标数据。Obtain the positional relationship data of the plurality of marking points on the calibration rod, and determine, according to the positional relationship data, a plurality of coordinate points corresponding to the positions of the plurality of marking points of the calibration rod in each frame of the qualified coordinate data, The multiple coordinate points are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained.
  2. 根据权利要求1所述的光学动捕系统中标定杆检测方法,其特征在于,所述在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点形成的两条具有公共坐标点的相交直线,若不存在,则剔除所述坐标数据对应的一帧,若存在,则记录两条相交直线上的多个坐标点,得到合格的多帧坐标数据前,包括:The method for detecting a calibration rod in an optical motion capture system according to claim 1, wherein in the multi-frame coordinate data, it is determined whether there is a preset number of coordinates among the plurality of coordinate points in each frame Two intersecting straight lines with a common coordinate point formed by the points, if it does not exist, remove one frame corresponding to the coordinate data, if it exists, record multiple coordinate points on the two intersecting straight lines to obtain qualified multi-frame coordinates Before the data, include:
    在多帧坐标数据中,判断每一帧的多个所述坐标点个数是否在预设的阈值范围内,若不在所述阈值范围内,则剔除所述坐标数据对应的一帧,若在所述阈值范围内,则将多个所述坐标点记录为合格的坐标数据,得到合格的多帧坐标数据。In the multi-frame coordinate data, it is determined whether the number of the multiple coordinate points in each frame is within a preset threshold range, and if it is not within the threshold range, then a frame corresponding to the coordinate data is eliminated; Within the threshold range, a plurality of the coordinate points are recorded as qualified coordinate data to obtain qualified multi-frame coordinate data.
  3. 根据权利要求1所述的光学动捕系统中标定杆检测方法,其特征在于,所述在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点形成的两条具有公共坐标点的相交直线,若不存在,则剔除所述坐标数据对应的一帧,若存在,则将两条相交直线上的多个坐标点记录为合格的坐标数据,得到合格的多帧坐标数据,包括:The method for detecting a calibration rod in an optical motion capture system according to claim 1, wherein in the multi-frame coordinate data, it is determined whether there is a preset number of coordinates among the plurality of coordinate points in each frame If two intersecting straight lines with a common coordinate point are formed by points, if it does not exist, the frame corresponding to the coordinate data is eliminated; if it exists, multiple coordinate points on the two intersecting straight lines are recorded as qualified coordinate data, Obtain qualified multi-frame coordinate data, including:
    在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点位于同一直线上,若不存在直线,则剔除所述坐标数据对应的一帧;In the multi-frame coordinate data, determining whether there is a preset number of coordinate points on the same straight line among the plurality of coordinate points in each frame, and if there is no straight line, then removing a frame corresponding to the coordinate data;
    若存在直线,则继续判断直线的数量是否在预设的数量范围内,若不在数量范围内,则剔除所述坐标数据对应的一帧;If there are straight lines, continue to determine whether the number of straight lines is within the preset number range, and if not, remove one frame corresponding to the coordinate data;
    若在数量范围内,则继续判断多条直线中的坐标点是否存在公共坐标点,若不存在公共坐标点,则剔除所述坐标数据对应的一帧;If it is within the number range, continue to determine whether the coordinate points in the multiple straight lines have a common coordinate point, and if there is no common coordinate point, remove a frame corresponding to the coordinate data;
    若存在公共坐标点,则继续判断存在公共坐标点的直线是否只有两条,若大于两条直线,则剔除所述坐标数据对应的一帧;If there are common coordinate points, continue to determine whether there are only two straight lines with common coordinate points, and if there are more than two straight lines, then remove one frame corresponding to the coordinate data;
    若只有两条直线,则将两条相交直线上的多个坐标点记录为合格的坐标数据,最终得到合格的多帧坐标数据。If there are only two straight lines, multiple coordinate points on the two intersecting straight lines are recorded as qualified coordinate data, and finally qualified multi-frame coordinate data is obtained.
  4. 根据权利要求3所述的光学动捕系统中标定杆检测方法,其特征在于,所述在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点位于同一直线上,包括:The calibration rod detection method in an optical motion capture system according to claim 3, wherein, in the multi-frame coordinate data, it is determined whether there is a preset number of coordinates among the plurality of coordinate points in each frame The points are on the same line and include:
    在一帧坐标数据中,任取三个所述坐标点,计算三个所述坐标点之间两两距离,得到三个距离数值;In one frame of coordinate data, randomly select three of the coordinate points, calculate the pairwise distance between the three coordinate points, and obtain three distance values;
    在三个所述距离数值中查找出最小距离数值和次小距离数值,判断所述次小距离数值是否大于预设的距离阈值,若所述次小距离数值大于所述距离阈值,则三个所述坐标点不在同一直线上;Find the smallest distance value and the second smallest distance value among the three distance values, and determine whether the second smallest distance value is greater than a preset distance threshold. If the second smallest distance value is greater than the distance threshold, then three The coordinate points are not on the same straight line;
    否则,判断所述次小距离数值与所述最小距离数值的比值是否大于预设的比值阈值,若所述比值小于等于所述比值阈值,则三个所述坐标点不在同一直线上;Otherwise, judging whether the ratio of the second smallest distance value to the minimum distance value is greater than a preset ratio threshold, and if the ratio is less than or equal to the ratio threshold, the three coordinate points are not on the same straight line;
    否则,判断所述次小距离数值的向量与所述最小距离数值的向量之间的夹角是否小于预设夹角阈值,若所述夹角大于等于所述夹角阈值,则三个所述坐标点不在同一直线上;Otherwise, determine whether the included angle between the vector of the second smallest distance value and the vector of the smallest distance value is less than a preset included angle threshold, and if the included angle is greater than or equal to the included angle threshold, then three The coordinate points are not on the same straight line;
    否则,三个所述坐标点位于同一直线上。Otherwise, the three coordinate points are located on the same straight line.
  5. 根据权利要求4所述的光学动捕系统中标定杆检测方法,其特征在于,所述在一帧坐标数据中,任取三个所述坐标点,计算三个所述坐标点之间两两距离,得到三个距离数值,包括:The method for detecting a calibration rod in an optical motion capture system according to claim 4, characterized in that, in one frame of coordinate data, any three coordinate points are selected, and the two coordinate points between the three coordinate points are calculated. Distance, get three distance values, including:
    三个所述坐标点中任一两个所述坐标点之间的距离为二维坐标的像素欧式距离,并采用下述公式计算得到:The distance between any two of the three coordinate points is the pixel Euclidean distance of two-dimensional coordinates, and is calculated using the following formula:
    D=sqrt((x1-x2) 2+(y1-y2) 2) D=sqrt((x1-x2) 2 +(y1-y2) 2 )
    其中,D为距离数值,两个所述坐标点的二维坐标为(x1,y1)、(x2,y2)。Wherein, D is the distance value, and the two-dimensional coordinates of the two coordinate points are (x1, y1) and (x2, y2).
  6. 根据权利要求1所述的光学动捕系统中标定杆检测方法,其特征在于,所述获取所述标定杆上多个标记点的位置关系数据,根据所述位置关系数据,确定出合格的每一帧坐标数据中与所述标定杆的多个标记点对应位置的多个坐标点,多个所述坐标点记录为一帧有效的坐标数据,得到多帧有效的坐标数据,包括:The method for detecting a calibration rod in an optical motion capture system according to claim 1, wherein the position relationship data of a plurality of marking points on the calibration rod is acquired, and the qualified ones are determined according to the position relationship data. In one frame of coordinate data, multiple coordinate points corresponding to multiple mark points of the calibration rod are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained, including:
    获取所述标定杆上多个标记点的位置关系数据,所述位置关系数据包括多个标记点形成的两条相交的线段长度、原点标记、与所述原点标记对应的其他标记点坐标数据;Acquiring positional relationship data of a plurality of marking points on the calibration rod, the positional relationship data including the length of two intersecting line segments formed by the plurality of marking points, an origin mark, and other marking point coordinate data corresponding to the origin mark;
    将合格的一帧坐标数据中多个坐标点形成的两条直线中具有的公共坐标点记为原点坐标,所述原点坐标与所述原点标记对应;Mark a common coordinate point in two straight lines formed by a plurality of coordinate points in a qualified frame of coordinate data as an origin coordinate, and the origin coordinate corresponds to the origin mark;
    计算两条直线中与所述线段长度相等的目标线段,所述目标线段中包含所述原点坐标,得到两条目标线段;Calculate a target line segment of the two straight lines equal in length to the line segment, and the target line segment includes the coordinates of the origin to obtain two target line segments;
    根据原点标记与其他标记点之间的距离,确定出所述目标线段中与原点坐标相同距离的其他坐标点,最终得到与多个标记点对应的多个坐标点。According to the distance between the origin mark and other mark points, other coordinate points with the same distance from the origin coordinate in the target line segment are determined, and finally multiple coordinate points corresponding to the multiple mark points are obtained.
  7. 根据权利要求6所述的光学动捕系统中标定杆检测方法,其特征在于,所述根据原点标记与其他标记点之间的距离,确定出所述目标线段中与原点坐标相同距离的其他坐标点,最终得到与多个标记点对应的多个坐标点后,还包括:The method for detecting a calibration rod in an optical motion capture system according to claim 6, wherein the other coordinates in the target line segment that are the same distance from the origin coordinates are determined based on the distance between the origin mark and other mark points Point, after finally obtaining multiple coordinate points corresponding to multiple marked points, it also includes:
    将得到的多个坐标点中的原点坐标设为b,将较长线段中与b距离大的坐标点设为a,将较长线段中与b距离较小的坐标点设为c,将较短线段中与b距离大的坐标点设为e,将较短线段中与b距离小的坐标点设为d;Set the origin coordinates of the obtained multiple coordinate points as b, the coordinate point with the larger distance from b in the longer line segment as a, and the coordinate point with the smaller distance from b in the longer line segment as c. Set the coordinate point with the larger distance from b in the short line segment to e, and set the coordinate point with the smaller distance from b in the shorter line segment to d;
    判断a与b之间的距离和b与c之间的距离比值是否大于预设的比值阈值,判断b与d之间的距离和d与e之间的距离比值是否在预设的比值范围内,若a与b之间的距离和b与c之间的距离比值大于所述比值阈值,且b与d之间的距离和d与e之间的距离比值在所述比值范围内,则多个所述坐标点为有效的坐标数据。Determine whether the distance between a and b and the distance ratio between b and c are greater than the preset ratio threshold, and judge whether the distance between b and d and the distance ratio between d and e are within the preset ratio range , If the ratio of the distance between a and b and the distance between b and c is greater than the ratio threshold, and the distance between b and d and the distance between d and e are within the ratio range, then more Each of the coordinate points is valid coordinate data.
  8. 一种光学动捕系统中标定杆检测装置,其特征在于,所述装置包括:A calibration rod detection device in an optical motion capture system, characterized in that the device comprises:
    获取坐标数据模块,用于获取光学相机对挥动中的标定杆捕获的多帧坐标数据,每帧所述坐标数据中包含多个坐标点信息;The coordinate data acquisition module is used to acquire multiple frames of coordinate data captured by the optical camera on the swinging calibration rod, and each frame of the coordinate data includes multiple coordinate point information;
    筛选坐标数据模块,用于在多帧坐标数据中,判断每一帧的多个所述坐标点中是否存在预设个数的坐标点形成的两条具有公共坐标点的相交直线,若不存在,则剔除所述坐标数据对应的一帧,若存在,则将两条相交直线上的多个坐标点记录为合格的坐标数据,得到合格的多帧坐标数据;The screening coordinate data module is used for judging whether there are two intersecting straight lines with a common coordinate point formed by a preset number of coordinate points among the plurality of coordinate points in each frame in the multi-frame coordinate data. , Then remove a frame corresponding to the coordinate data, and if it exists, record multiple coordinate points on two intersecting straight lines as qualified coordinate data to obtain qualified multi-frame coordinate data;
    确定有效数据模块,用于获取所述标定杆上多个标记点的位置关系数据,根据所述位置关系数据,确定出合格的每一帧坐标数据中与所述标定杆的多个标记点对应位置的多个坐标点,多个所述坐标点记录为一帧有效的坐标数据,得到多帧有效的坐标数据。The valid data determining module is used to obtain the positional relationship data of multiple marking points on the calibration rod, and according to the positional relationship data, it is determined that each frame of the qualified coordinate data corresponds to the multiple marking points of the calibration rod The multiple coordinate points of the position are recorded as one frame of valid coordinate data, and multiple frames of valid coordinate data are obtained.
  9. 一种光学动捕系统中标定杆检测设备,其特征在于,所述设备包括:A calibration rod detection device in an optical motion capture system, characterized in that the device includes:
    存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的光学动捕系统中标定杆检测程序,所述光学动捕系统中标定杆检测程序被所述处理器执行时实现如权利要求1至7中任一项所述的光学动捕系统中标定杆检测方法的步骤。A memory, a processor, and a calibration rod detection program in an optical motion capture system that is stored on the memory and can run on the processor, and the calibration rod detection program in the optical motion capture system is implemented when the processor is executed The steps of the calibration rod detection method in the optical motion capture system according to any one of claims 1 to 7.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上 存储有光学动捕系统中标定杆检测程序,所述光学动捕系统中标定杆检测程序被处理器执行时实现如权利要求1至7中任一项所述的光学动捕系统中标定杆检测方法的步骤。A computer-readable storage medium, characterized in that a calibration rod detection program in an optical motion capture system is stored on the computer-readable storage medium, and the calibration rod detection program in the optical motion capture system is executed by a processor. The steps of the calibration rod detection method in the optical motion capture system according to any one of claims 1 to 7.
PCT/CN2020/132105 2019-12-26 2020-11-27 Calibration rod testing method for optical motion capture system, device, apparatus, and storage medium WO2021129305A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911366990.XA CN111127559B (en) 2019-12-26 2019-12-26 Calibration rod detection method, device, equipment and storage medium in optical dynamic capture system
CN201911366990.X 2019-12-26

Publications (1)

Publication Number Publication Date
WO2021129305A1 true WO2021129305A1 (en) 2021-07-01

Family

ID=70503167

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/132105 WO2021129305A1 (en) 2019-12-26 2020-11-27 Calibration rod testing method for optical motion capture system, device, apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN111127559B (en)
WO (1) WO2021129305A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111127559B (en) * 2019-12-26 2023-06-16 深圳市瑞立视多媒体科技有限公司 Calibration rod detection method, device, equipment and storage medium in optical dynamic capture system
DE102020118407A1 (en) * 2020-07-13 2022-01-13 Soft2Tec Gmbh Device and method for detecting the orientation and position of markings in three-dimensional space
CN112085800A (en) * 2020-08-14 2020-12-15 深圳市瑞立视多媒体科技有限公司 Method and device for screening calibration bar data and computer equipment
CN112215896B (en) * 2020-09-01 2024-01-30 深圳市瑞立视多媒体科技有限公司 Multi-camera calibrated camera frame data processing method and device and computer equipment
CN112215899B (en) * 2020-09-18 2024-01-30 深圳市瑞立视多媒体科技有限公司 Frame data online processing method and device and computer equipment
CN115026823B (en) * 2022-06-14 2023-01-17 广东天太机器人有限公司 Industrial robot control method and system based on coordinate welding
CN115375772B (en) * 2022-08-10 2024-01-19 北京英智数联科技有限公司 Camera calibration method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020154814A1 (en) * 2001-03-09 2002-10-24 Michael Gerhard Method and apparatus for analysis of schlieren
CN103035008A (en) * 2012-12-15 2013-04-10 北京工业大学 Multi-camera system weighting calibrating method
CN103208122A (en) * 2013-04-18 2013-07-17 湖南大学 Multi-camera calibration method based on one-dimensional calibration rod design
DE102013201137A1 (en) * 2012-01-31 2013-08-01 Continental Automotive France Method for calibrating extrinsic properties of camera mounted on windshield of motor car, involves determining resolution of translation components based on height of each target point and height of camera
CN107358633A (en) * 2017-07-12 2017-11-17 北京轻威科技有限责任公司 Join scaling method inside and outside a kind of polyphaser based on 3 points of demarcation things
CN109559355A (en) * 2018-12-04 2019-04-02 北京航空航天大学 A kind of polyphaser global calibration device and method without public view field based on phase unit
CN111127559A (en) * 2019-12-26 2020-05-08 深圳市瑞立视多媒体科技有限公司 Method, device, equipment and storage medium for detecting marker post in optical dynamic capturing system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017195801A1 (en) * 2016-05-13 2017-11-16 オリンパス株式会社 Calibration device, calibration method, optical device, imaging device, projection device, measurement system and measurement method
CN108257216A (en) * 2017-12-12 2018-07-06 北京克科技有限公司 A kind of method, apparatus and equipment in reality environment structure physical model
CN108986161B (en) * 2018-06-19 2020-11-10 亮风台(上海)信息科技有限公司 Three-dimensional space coordinate estimation method, device, terminal and storage medium
CN108961343A (en) * 2018-06-26 2018-12-07 深圳市未来感知科技有限公司 Construction method, device, terminal device and the readable storage medium storing program for executing of virtual coordinate system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020154814A1 (en) * 2001-03-09 2002-10-24 Michael Gerhard Method and apparatus for analysis of schlieren
DE102013201137A1 (en) * 2012-01-31 2013-08-01 Continental Automotive France Method for calibrating extrinsic properties of camera mounted on windshield of motor car, involves determining resolution of translation components based on height of each target point and height of camera
CN103035008A (en) * 2012-12-15 2013-04-10 北京工业大学 Multi-camera system weighting calibrating method
CN103208122A (en) * 2013-04-18 2013-07-17 湖南大学 Multi-camera calibration method based on one-dimensional calibration rod design
CN107358633A (en) * 2017-07-12 2017-11-17 北京轻威科技有限责任公司 Join scaling method inside and outside a kind of polyphaser based on 3 points of demarcation things
CN109559355A (en) * 2018-12-04 2019-04-02 北京航空航天大学 A kind of polyphaser global calibration device and method without public view field based on phase unit
CN111127559A (en) * 2019-12-26 2020-05-08 深圳市瑞立视多媒体科技有限公司 Method, device, equipment and storage medium for detecting marker post in optical dynamic capturing system

Also Published As

Publication number Publication date
CN111127559B (en) 2023-06-16
CN111127559A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
WO2021129305A1 (en) Calibration rod testing method for optical motion capture system, device, apparatus, and storage medium
CN108416791B (en) Binocular vision-based parallel mechanism moving platform pose monitoring and tracking method
JP4488804B2 (en) Stereo image association method and three-dimensional data creation apparatus
JP3793100B2 (en) Information processing method, apparatus, and recording medium
US20090213224A1 (en) Fast Imaging System Calibration
CN111462503B (en) Vehicle speed measuring method and device and computer readable storage medium
CN100428782C (en) Information processing method and apparatus
CN104361603B (en) Gun camera image target designating method and system
US20060215881A1 (en) Distance measurement apparatus, electronic device, distance measurement method, distance measurement control program and computer-readable recording medium
CN108257186B (en) Method and device for determining calibration image, camera and storage medium
CN112686877B (en) Binocular camera-based three-dimensional house damage model construction and measurement method and system
KR101759798B1 (en) Method, device and system for generating an indoor two dimensional plan view image
WO2021136386A1 (en) Data processing method, terminal, and server
JP2012221261A5 (en)
CN103795935B (en) A kind of camera shooting type multi-target orientation method and device based on image rectification
JP5079547B2 (en) Camera calibration apparatus and camera calibration method
Cvišić et al. Recalibrating the KITTI dataset camera setup for improved odometry accuracy
CN104760812A (en) Monocular vision based real-time location system and method for products on conveying belt
WO2020024845A1 (en) Positioning method and apparatus
JP2001266128A (en) Method and device for obtaining depth information and recording medium recording depth information obtaining program
CN113763478B (en) Unmanned vehicle camera calibration method, device, equipment, storage medium and system
JP2019102941A (en) Image processing apparatus and control method of the same
CN116778094A (en) Building deformation monitoring method and device based on optimal viewing angle shooting
JP2018028864A (en) Camera calibration device, method, and program
JP2014102183A (en) Image processing apparatus and image processing system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20904480

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20904480

Country of ref document: EP

Kind code of ref document: A1