CN115546130A - Height measurement method, device and electronic equipment for digital twin - Google Patents
Height measurement method, device and electronic equipment for digital twin Download PDFInfo
- Publication number
- CN115546130A CN115546130A CN202211174305.5A CN202211174305A CN115546130A CN 115546130 A CN115546130 A CN 115546130A CN 202211174305 A CN202211174305 A CN 202211174305A CN 115546130 A CN115546130 A CN 115546130A
- Authority
- CN
- China
- Prior art keywords
- pedestrian
- pedestrian detection
- ground
- detection frame
- result
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000691 measurement method Methods 0.000 title claims description 13
- 238000001514 detection method Methods 0.000 claims abstract description 214
- 238000005259 measurement Methods 0.000 claims abstract description 67
- 238000000034 method Methods 0.000 claims abstract description 48
- 230000000007 visual effect Effects 0.000 claims abstract description 10
- 230000009466 transformation Effects 0.000 claims description 18
- 230000000875 corresponding effect Effects 0.000 description 44
- 238000010586 diagram Methods 0.000 description 13
- 238000004590 computer program Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 8
- 238000012545 processing Methods 0.000 description 8
- 238000012800 visualization Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 238000013527 convolutional neural network Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000011895 specific detection Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0012—Biomedical image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Medical Informatics (AREA)
- Quality & Reliability (AREA)
- Radiology & Medical Imaging (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Geometry (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域technical field
本申请涉及数字孪生技术领域,尤其涉及一种用于数字孪生的身高测量方法、装置及电子设备。The present application relates to the technical field of digital twins, and in particular to a height measurement method, device and electronic equipment for digital twins.
背景技术Background technique
数字孪生是充分利用物理模型、传感器更新、运行历史等数据,集成多学科、多物理量、多尺度、多概率的仿真过程,在虚拟空间中完成映射,从而反映相对应的实体装备的全生命周期过程。数字孪生是一种超越现实的概念,可以被视为一个或多个重要的、彼此依赖的装备系统的数字映射系统。Digital twin is a simulation process that makes full use of physical models, sensor updates, operation history, etc., integrates multi-disciplinary, multi-physical quantities, multi-scale, and multi-probability simulation processes, and completes the mapping in the virtual space to reflect the entire life cycle of the corresponding physical equipment. process. A digital twin is a concept beyond reality that can be viewed as a digital twin of one or more important, interdependent equipment systems.
在智慧交通等场景,数字孪生技术发挥了重要作用。目前应用于道路的数字孪生平台基本都是利用相机等多传感器对行人和车辆等目标进行检测,然后在数字孪生平台上以仿真的标准三维模型进行显示,所谓“标准三维模型”是指所有检测到的行人都是相同的大小,所有小汽车都是采用同一个小汽车模型显示,所有巴士也都是采用同一个巴士模型显示,因此目标之间的区分性较差,且与真实世界的目标差别较大,进而导致数字孪生平台的可视化效果并不好。In scenarios such as smart transportation, digital twin technology plays an important role. At present, the digital twin platform applied to the road basically uses multiple sensors such as cameras to detect objects such as pedestrians and vehicles, and then displays them on the digital twin platform with a simulated standard 3D model. The so-called "standard 3D model" refers to all detected The pedestrians are all the same size, all the cars are displayed by the same car model, and all the buses are also displayed by the same bus model, so the distinction between objects is poor, and it is different from real-world objects The difference is large, which leads to the poor visualization effect of the digital twin platform.
此外,相机是针对每一帧图像独立进行目标检测,而不同帧所检测到的目标之间需要进行关联,否则会在数字孪生平台上生成多余重复的目标。而现有的关联方案一般是通过两帧之间的时间差来预测目标在当前帧大概所在的位置,然后和当前帧所检测到的目标框进行交并比计算,从而确认是否是同一个目标,或者是通过图像特征匹配等方式来实现。然而这些方案仍然会因为目标被遮挡或者预测错误而导致误匹配,进而影响了数字孪生平台的可视化效果。In addition, the camera performs target detection independently for each frame of image, and the targets detected in different frames need to be correlated, otherwise redundant and repeated targets will be generated on the digital twin platform. However, the existing association schemes generally use the time difference between two frames to predict the approximate location of the target in the current frame, and then calculate the intersection and union ratio with the target frame detected in the current frame to confirm whether it is the same target. Or it can be realized by means of image feature matching or the like. However, these solutions still cause mismatches due to occluded targets or wrong predictions, which in turn affects the visualization of the digital twin platform.
发明内容Contents of the invention
本申请实施例提供了一种用于数字孪生的身高测量方法、装置及电子设备,以提高数字孪生平台的可视化效果。Embodiments of the present application provide a height measurement method, device, and electronic equipment for digital twins, so as to improve the visualization effect of the digital twin platform.
本申请实施例采用下述技术方案:The embodiment of the application adopts the following technical solutions:
第一方面,本申请实施例提供一种用于数字孪生的身高测量方法,其中,所述方法包括:In the first aspect, the embodiment of the present application provides a height measurement method for a digital twin, wherein the method includes:
获取路侧相机采集的当前帧区域图像;Obtain the current frame area image collected by the roadside camera;
利用预设目标检测模型对所述当前帧区域图像进行行人检测,得到当前帧区域图像的行人检测结果,所述行人检测结果包括行人检测框以及行人状态;Using a preset target detection model to perform pedestrian detection on the current frame area image to obtain a pedestrian detection result of the current frame area image, the pedestrian detection result includes a pedestrian detection frame and a pedestrian state;
在所述行人状态为站立状态的情况下,将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果;When the pedestrian state is a standing state, project the pedestrian detection frame onto the ground to obtain a projection result of the pedestrian detection frame on the ground;
根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果,以基于所述当前帧区域图像对应的行人身高测量结果实现数字孪生平台的可视化显示。According to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, determine the pedestrian height measurement result corresponding to the current frame area image, so as to realize the digital twin platform based on the pedestrian height measurement result corresponding to the current frame area image visual display of .
可选地,所述将所述行人检测框投影到地面,得到所述行人检测框在地面的投影结果包括:Optionally, the projecting the pedestrian detection frame onto the ground, and obtaining the projection result of the pedestrian detection frame on the ground includes:
确定图像坐标系与世界大地坐标系之间的变换关系;Determine the transformation relationship between the image coordinate system and the world geodetic coordinate system;
根据所述图像坐标系与世界大地坐标系之间的变换关系,将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果。According to the transformation relationship between the image coordinate system and the world earth coordinate system, the pedestrian detection frame is projected onto the ground to obtain a projection result of the pedestrian detection frame on the ground.
可选地,所述行人检测框包括行人检测框的上边中心点的像素位置以及下边中心点的像素位置,所述将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果包括:Optionally, the pedestrian detection frame includes the pixel position of the upper center point and the pixel position of the lower center point of the pedestrian detection frame, and the pedestrian detection frame is projected onto the ground to obtain the pedestrian detection frame on the ground. Projection results include:
将所述行人检测框的上边中心点的像素位置投影到地面,得到所述行人检测框的上边中心点在地面上的投影位置;Projecting the pixel position of the upper center point of the pedestrian detection frame onto the ground to obtain the projected position of the upper center point of the pedestrian detection frame on the ground;
将所述行人检测框的下边中心点的像素位置投影到地面,得到所述行人检测框的下边中心点在地面上的投影位置。Projecting the pixel position of the lower central point of the pedestrian detection frame onto the ground to obtain the projected position of the lower central point of the pedestrian detection frame on the ground.
可选地,所述行人检测框在地面上的投影结果包括行人检测框的上边中心点和下边中心点在地面上的投影位置,所述路侧相机的属性信息包括路侧相机的高度以及路侧相机在地面上的位置;Optionally, the projection result of the pedestrian detection frame on the ground includes the projection positions of the upper center point and the lower center point of the pedestrian detection frame on the ground, and the attribute information of the roadside camera includes the height of the roadside camera and the height of the roadside camera. The position of the side camera on the ground;
所述根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果包括:According to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, determining the pedestrian height measurement result corresponding to the current frame area image includes:
根据所述行人检测框的下边中心点在地面上的投影位置以及所述路侧相机在地面上的位置,确定所述行人检测框的下边中心点到所述路侧相机的距离;According to the projected position of the lower center point of the pedestrian detection frame on the ground and the position of the roadside camera on the ground, determine the distance from the lower center point of the pedestrian detection frame to the roadside camera;
根据所述行人检测框的上边中心点在地面上的投影位置以及所述路侧相机在地面上的位置,确定所述行人检测框的上边中心点到所述路侧相机的距离;According to the projection position of the upper center point of the pedestrian detection frame on the ground and the position of the roadside camera on the ground, determine the distance from the upper center point of the pedestrian detection frame to the roadside camera;
基于所述行人检测框的下边中心点到所述路侧相机的距离、所述行人检测框的上边中心点到所述路侧相机的距离以及所述路侧相机的高度,利用相似三角形算法确定所述行人身高测量结果。Based on the distance from the center point of the lower side of the pedestrian detection frame to the roadside camera, the distance from the center point of the upper side of the pedestrian detection frame to the roadside camera, and the height of the roadside camera, the similar triangle algorithm is used to determine The pedestrian height measurements.
可选地,在根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果之后,所述方法还包括:Optionally, after determining the pedestrian height measurement result corresponding to the current frame area image according to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, the method further includes:
根据所述行人身高测量结果按照预设比例生成行人立体模型,以在数字孪生平台上进行显示。A three-dimensional pedestrian model is generated according to a preset ratio according to the pedestrian height measurement result for display on a digital twin platform.
可选地,在根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果之后,所述方法还包括:Optionally, after determining the pedestrian height measurement result corresponding to the current frame area image according to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, the method further includes:
获取前一帧区域图像的行人检测结果以及对应的行人身高测量结果;Obtain the pedestrian detection result of the previous frame area image and the corresponding pedestrian height measurement result;
基于所述前一帧区域图像对应的行人身高测量结果和所述当前帧区域图像对应的行人身高测量结果,对所述前一帧区域图像的行人检测结果与当前帧区域图像的行人检测结果进行特征匹配,得到行人特征匹配结果;Based on the pedestrian height measurement result corresponding to the previous frame area image and the pedestrian height measurement result corresponding to the current frame area image, the pedestrian detection result of the previous frame area image is compared with the pedestrian detection result of the current frame area image. Feature matching to obtain pedestrian feature matching results;
根据所述行人特征匹配结果生成行人移动轨迹,以在数字孪生平台上进行显示。According to the pedestrian feature matching results, pedestrian movement tracks are generated to be displayed on the digital twin platform.
第二方面,本申请实施例还提供一种用于数字孪生的身高测量装置,其中,所述装置包括:In the second aspect, the embodiment of the present application also provides a height measurement device for digital twins, wherein the device includes:
第一获取单元,用于获取路侧相机采集的当前帧区域图像;The first acquisition unit is used to acquire the current frame area image collected by the roadside camera;
目标检测单元,用于利用预设目标检测模型对所述当前帧区域图像进行行人检测,得到当前帧区域图像的行人检测结果,所述行人检测结果包括行人检测框以及行人状态;A target detection unit, configured to use a preset target detection model to perform pedestrian detection on the current frame area image to obtain a pedestrian detection result of the current frame area image, the pedestrian detection result including a pedestrian detection frame and a pedestrian state;
投影单元,用于在所述行人状态为站立状态的情况下,将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果;A projection unit, configured to project the pedestrian detection frame onto the ground when the pedestrian is in a standing state, to obtain a projection result of the pedestrian detection frame on the ground;
确定单元,用于根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果,以基于所述当前帧区域图像对应的行人身高测量结果在数字孪生平台上进行可视化显示。The determination unit is configured to determine the pedestrian height measurement result corresponding to the current frame area image according to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, so as to determine the pedestrian height measurement result corresponding to the current frame area image. Results are visualized on a digital twin platform.
可选地,所述投影单元具体用于:Optionally, the projection unit is specifically used for:
确定图像坐标系与世界大地坐标系之间的变换关系;Determine the transformation relationship between the image coordinate system and the world geodetic coordinate system;
根据所述图像坐标系与世界大地坐标系之间的变换关系,将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果。According to the transformation relationship between the image coordinate system and the world earth coordinate system, the pedestrian detection frame is projected onto the ground to obtain a projection result of the pedestrian detection frame on the ground.
第三方面,本申请实施例还提供一种电子设备,包括:In a third aspect, the embodiment of the present application further provides an electronic device, including:
处理器;以及processor; and
被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器执行前述之任一所述方法。A memory arranged to store computer-executable instructions which, when executed, cause the processor to perform any one of the preceding methods.
第四方面,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储一个或多个程序,所述一个或多个程序当被包括多个应用程序的电子设备执行时,使得所述电子设备执行前述之任一所述方法。In a fourth aspect, the embodiment of the present application further provides a computer-readable storage medium, the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs , causing the electronic device to execute any one of the aforementioned methods.
本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:本申请实施例的用于数字孪生的身高测量方法,先获取路侧相机采集的当前帧区域图像;然后利用预设目标检测模型对当前帧区域图像进行行人检测,得到当前帧区域图像的行人检测结果,行人检测结果包括行人检测框以及行人状态;之后在行人状态为站立状态的情况下,将行人检测框投影到地面,得到行人检测框在地面上的投影结果;最后根据行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果,以基于当前帧区域图像对应的行人身高测量结果实现数字孪生平台的可视化显示。本申请实施例的用于数字孪生的身高测量方法基于相机采集的图像来测量行人身高,并将行人身高测量结果作为一种特征用于数字孪生平台对于目标的可视化展示,提高了数字孪生平台的可视化效果。The above-mentioned at least one technical solution adopted in the embodiment of the present application can achieve the following beneficial effects: the height measurement method for digital twins in the embodiment of the present application first obtains the current frame area image collected by the roadside camera; then uses the preset target detection model Pedestrian detection is performed on the current frame area image to obtain the pedestrian detection result of the current frame area image. The pedestrian detection result includes the pedestrian detection frame and the pedestrian state; then, when the pedestrian state is standing, the pedestrian detection frame is projected on the ground to obtain The projection result of the pedestrian detection frame on the ground; finally, according to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, the measurement result of the pedestrian height corresponding to the current frame area image is determined, and the pedestrian height measurement result corresponding to the current frame area image is used. The height measurement results are visualized on the digital twin platform. The height measurement method for digital twins in the embodiment of the present application measures the height of pedestrians based on the images collected by the camera, and uses the pedestrian height measurement results as a feature for the visual display of the digital twin platform for the target, which improves the digital twin platform. Visualization.
附图说明Description of drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The schematic embodiments and descriptions of the application are used to explain the application and do not constitute an improper limitation to the application. In the attached picture:
图1为本申请实施例中一种用于数字孪生的身高测量方法的流程示意图;Fig. 1 is a schematic flow chart of a height measurement method for digital twins in the embodiment of the present application;
图2为本申请实施例中一种基于相似三角形算法测量行人身高的原理示意图;Fig. 2 is a schematic diagram of the principle of measuring the height of pedestrians based on the similar triangle algorithm in the embodiment of the present application;
图3为本申请实施例中一种用于数字孪生的身高测量装置的结构示意图;FIG. 3 is a schematic structural diagram of a height measuring device for digital twins in an embodiment of the present application;
图4为本申请实施例中一种电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device in an embodiment of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with specific embodiments of the present application and corresponding drawings. Apparently, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
以下结合附图,详细说明本申请各实施例提供的技术方案。The technical solutions provided by various embodiments of the present application will be described in detail below in conjunction with the accompanying drawings.
本申请实施例提供了一种用于数字孪生的身高测量方法,如图1所示,提供了本申请实施例中一种用于数字孪生的身高测量方法的流程示意图,所述方法至少包括如下的步骤S110至步骤S140:The embodiment of the present application provides a height measurement method for digital twins, as shown in Figure 1, provides a schematic flow chart of a height measurement method for digital twins in the embodiment of the present application, the method at least includes the following Step S110 to Step S140 of:
步骤S110,获取路侧相机采集的当前帧区域图像。Step S110, acquiring the current frame area image collected by the roadside camera.
本申请实施例的用于数字孪生的身高测量方法可以应用于景区、交叉路口等人流量较大的场景,当然,具体应用于哪些场景,本领域技术人员可以根据实际需求灵活选择,在此不作具体限定。在测量行人身高时,需要先获取路侧相机采集的当前帧区域图像。The height measurement method for digital twins in the embodiment of the present application can be applied to scenes with a large flow of people such as scenic spots and intersections. Of course, those skilled in the art can flexibly choose which scenes are specifically applied according to actual needs. Specific limits. When measuring the height of pedestrians, it is necessary to obtain the current frame area image collected by the roadside camera.
步骤S120,利用预设目标检测模型对所述当前帧区域图像进行行人检测,得到当前帧区域图像的行人检测结果,所述行人检测结果包括行人检测框以及行人状态。Step S120 , using a preset object detection model to perform pedestrian detection on the current frame area image to obtain a pedestrian detection result of the current frame area image, and the pedestrian detection result includes a pedestrian detection frame and a pedestrian state.
在得到当前帧区域图像后,可以利用预设目标检测模型进行行人检测,即从当前帧区域图像中检测出行人目标,具体的检测结果可以包括行人检测框以及行人状态,例如是站立状态还是非站立状态。After the current frame area image is obtained, the preset target detection model can be used for pedestrian detection, that is, the pedestrian target is detected from the current frame area image. The specific detection results can include the pedestrian detection frame and the pedestrian status, such as standing or not. standing state.
预设目标检测模型例如可以基于YOLO网络、SSD(Single Shot MultiBoxDetector,单次多框检测器)或者RCNN(Region Proposal-Convolutional NeuralNetworks,区域卷积神经网络)等网络训练得到,在构建训练样本时,需要尽可能提供多种不同角度、不同姿势的行人状态,以保证目标检测模型的准确性和鲁棒性。当然,具体采用哪种检测模型进行行人检测,本领域技术人员可以根据实际需求灵活选择,在此不作具体限定。The preset target detection model can be obtained based on network training such as YOLO network, SSD (Single Shot MultiBoxDetector, single-shot multi-box detector) or RCNN (Region Proposal-Convolutional Neural Networks, regional convolutional neural network), when constructing training samples, It is necessary to provide as many pedestrian states as possible from different angles and poses to ensure the accuracy and robustness of the target detection model. Of course, which detection model to use for pedestrian detection can be flexibly selected by those skilled in the art according to actual needs, and is not specifically limited here.
步骤S130,在所述行人状态为站立状态的情况下,将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果。Step S130 , if the state of the pedestrian is standing, project the pedestrian detection frame onto the ground to obtain a projection result of the pedestrian detection frame on the ground.
由于行人身高的测量需要在行人处于站立状态的情况下才能够具有较高的测量准确性,因此在得到行人检测结果后,需要先判断检测到的行人状态是否为站立状态,如果是,则可以进一步将检测到的行人检测框投影到地面上,从而得到行人检测框在地面上的投影结果。Since the measurement of the pedestrian's height needs to have a high measurement accuracy when the pedestrian is in a standing state, after obtaining the pedestrian detection result, it is necessary to first determine whether the detected pedestrian is in a standing state, and if so, you can The detected pedestrian detection frame is further projected onto the ground to obtain the projection result of the pedestrian detection frame on the ground.
步骤S140,根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果,以基于所述当前帧区域图像对应的行人身高测量结果实现数字孪生平台的可视化显示。Step S140, according to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, determine the pedestrian height measurement result corresponding to the current frame area image, so as to realize based on the pedestrian height measurement result corresponding to the current frame area image Visualization of the digital twin platform.
行人检测框在地面上的投影结果是指行人检测框在世界大地坐标系下的位置,进一步结合事先测量好的路侧相机在世界大地坐标系下的位置以及路侧相机的实际高度,即可计算出行人身高。有了行人身高这一特征,就可以将其应用到数字孪生平台的可视化展示中,例如可以在数字孪生平台展示行人立体模型时增加行人身高属性,使得展示的行人效果更加接近于真实场景,还可以基于行人身高为行人的跟踪匹配提供额外的参考信息,从而提高跟踪匹配的准确性。The projection result of the pedestrian detection frame on the ground refers to the position of the pedestrian detection frame in the world geodetic coordinate system, further combined with the previously measured position of the roadside camera in the world geodetic coordinate system and the actual height of the roadside camera. Calculate pedestrian height. With the feature of pedestrian height, it can be applied to the visual display of the digital twin platform. For example, the pedestrian height attribute can be added when the digital twin platform displays the pedestrian stereo model, so that the displayed pedestrian effect is closer to the real scene. Additional reference information can be provided for pedestrian tracking and matching based on pedestrian height, thereby improving the accuracy of tracking and matching.
在本申请的一些实施例中,所述将所述行人检测框投影到地面,得到所述行人检测框在地面的投影结果包括:确定图像坐标系与世界大地坐标系之间的变换关系;根据所述图像坐标系与世界大地坐标系之间的变换关系,将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果。In some embodiments of the present application, the projecting the pedestrian detection frame onto the ground and obtaining the projection result of the pedestrian detection frame on the ground includes: determining the transformation relationship between the image coordinate system and the world geodetic coordinate system; according to The transformation relationship between the image coordinate system and the world earth coordinate system is to project the pedestrian detection frame onto the ground to obtain a projection result of the pedestrian detection frame on the ground.
由于行人检测框是位于图像坐标系下的,因此在将行人检测框投影到地面上时,需要先确定图像坐标系与世界大地坐标系之间的变换关系,具体可以采用现有的标定方式对图像坐标系与世界大地坐标系之间的变换关系进行标定。例如,可以通过标着二维码的小车行驶在景区等场景,小车基于RTK(Real-time kinematic,实时差分定位)设备能够提供厘米级精度的经纬度坐标,因此根据二维码可以从图像上得到小车当前经纬度所对应的图像像素位置,从而建立起图像坐标系与世界大地坐标系之间的变换关系。又例如,可以手动选取地面上的高精地图的位置点与对应的图像上的地面像素点构成点对并建立方程组,通过联立方程组求解出图像坐标系与世界大地坐标系之间的变换矩阵。Since the pedestrian detection frame is located in the image coordinate system, when projecting the pedestrian detection frame onto the ground, it is necessary to determine the transformation relationship between the image coordinate system and the world geodetic coordinate system. Specifically, the existing calibration method can be used for The transformation relationship between the image coordinate system and the world geodetic coordinate system is calibrated. For example, a car marked with a QR code can be used to drive in scenic spots and other scenes. The car can provide centimeter-level precision latitude and longitude coordinates based on RTK (Real-time kinematic, real-time differential positioning) equipment, so according to the QR code, it can be obtained from the image. The image pixel position corresponding to the current latitude and longitude of the car, thus establishing the transformation relationship between the image coordinate system and the world geodetic coordinate system. For another example, you can manually select the position points of the high-precision map on the ground and the corresponding ground pixel points on the image to form a point pair and establish a system of equations, and solve the relationship between the image coordinate system and the world geodetic coordinate system through the simultaneous equation system. transformation matrix.
在得到图像坐标系与世界大地坐标系之间的变换关系后,就可以基于该变换关系将图像坐标系下的行人检测框变换到世界大地坐标系下,从而得到行人检测框在地面上的投影结果。After obtaining the transformation relationship between the image coordinate system and the world geodetic coordinate system, the pedestrian detection frame in the image coordinate system can be transformed to the world geodetic coordinate system based on the transformation relationship, so as to obtain the projection of the pedestrian detection frame on the ground result.
在本申请的一些实施例中,所述行人检测框包括行人检测框的上边中心点的像素位置以及下边中心点的像素位置,所述将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果包括:将所述行人检测框的上边中心点的像素位置投影到地面,得到所述行人检测框的上边中心点在地面上的投影位置;将所述行人检测框的下边中心点的像素位置投影到地面,得到所述行人检测框的下边中心点在地面上的投影位置。In some embodiments of the present application, the pedestrian detection frame includes the pixel position of the upper center point of the pedestrian detection frame and the pixel position of the lower center point of the pedestrian detection frame, and the pedestrian detection frame is projected onto the ground to obtain the pedestrian detection frame The projection result of the frame on the ground includes: projecting the pixel position of the upper center point of the pedestrian detection frame onto the ground to obtain the projection position of the upper center point of the pedestrian detection frame on the ground; The pixel position of the lower central point is projected onto the ground to obtain the projected position of the lower central point of the pedestrian detection frame on the ground.
行人检测框通常为一个矩形框,当行人处于站立状态时,行人检测框的上边界与下边界之间的垂直距离就可以看作是行人的身高,因此在将行人检测框投影到地面上时,可以将行人检测框的上边界位置和下边界位置投影到地面上。为了便于处理,这里可以将上边界中心点位置以及下边界中心点位置分别投影到地面上,从而分别得到行人检测框的上/下边中心点在地面上的投影位置。The pedestrian detection frame is usually a rectangular frame. When the pedestrian is standing, the vertical distance between the upper boundary and the lower boundary of the pedestrian detection frame can be regarded as the height of the pedestrian. Therefore, when the pedestrian detection frame is projected on the ground , the upper boundary position and the lower boundary position of the pedestrian detection frame can be projected onto the ground. For the convenience of processing, the position of the center point of the upper boundary and the position of the center point of the lower boundary can be respectively projected onto the ground, so as to obtain the projection positions of the center point of the upper/lower edge of the pedestrian detection frame on the ground respectively.
在本申请的一些实施例中,所述行人检测框在地面上的投影结果包括行人检测框的上边中心点和下边中心点在地面上的投影位置,所述路侧相机的属性信息包括路侧相机的高度以及路侧相机在地面上的位置;所述根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果包括:根据所述行人检测框的下边中心点在地面上的投影位置以及所述路侧相机在地面上的位置,确定所述行人检测框的下边中心点到所述路侧相机的距离;根据所述行人检测框的上边中心点在地面上的投影位置以及所述路侧相机在地面上的位置,确定所述行人检测框的上边中心点到所述路侧相机的距离;基于所述行人检测框的下边中心点到所述路侧相机的距离、所述行人检测框的上边中心点到所述路侧相机的距离以及所述路侧相机的高度,利用相似三角形算法确定所述行人身高测量结果。In some embodiments of the present application, the projection result of the pedestrian detection frame on the ground includes the projection positions of the upper center point and the lower center point of the pedestrian detection frame on the ground, and the attribute information of the roadside camera includes roadside The height of the camera and the position of the roadside camera on the ground; according to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, determining the pedestrian height measurement result corresponding to the current frame area image includes: according to the Describe the projected position of the lower center point of the pedestrian detection frame on the ground and the position of the roadside camera on the ground, determine the distance from the lower center point of the pedestrian detection frame to the roadside camera; according to the pedestrian detection The projected position of the upper center point of the frame on the ground and the position of the roadside camera on the ground determine the distance from the upper center point of the pedestrian detection frame to the roadside camera; based on the lower edge of the pedestrian detection frame The distance from the center point to the roadside camera, the distance from the upper center point of the pedestrian detection frame to the roadside camera, and the height of the roadside camera are determined using a similar triangle algorithm to determine the pedestrian height measurement result.
为了便于对本申请实施例的理解,如图2所示,提供了本申请实施例中一种基于相似三角形算法测量行人身高的原理示意图。假设行人检测框的上边中心点的像素位置为P3,行人检测框的上边中心点在地面上的投影位置为P2,行人检测框的下边中心点的像素位置及对应在地面上的投影位置为同一点P1,相机高度事先已经测量好为H,相机在地面的位置为O,相机的安装位置为C,那么根据P1的投影位置可以计算出P1距离相机的横向距离为S1,根据P2的投影位置可以计算出P2距离相机的横向距离为S2,最终需要测量的行人身高为h。In order to facilitate the understanding of the embodiment of the present application, as shown in FIG. 2 , a schematic diagram of the principle of measuring pedestrian height based on the similar triangle algorithm in the embodiment of the present application is provided. Suppose the pixel position of the upper center point of the pedestrian detection frame is P3, the projection position of the upper center point of the pedestrian detection frame on the ground is P2, and the pixel position of the lower center point of the pedestrian detection frame and the corresponding projection position on the ground are the same Point P1, the height of the camera has been measured as H, the position of the camera on the ground is O, and the installation position of the camera is C, then according to the projection position of P1, the lateral distance between P1 and the camera can be calculated as S1, and according to the projection position of P2 It can be calculated that the lateral distance between P2 and the camera is S2, and the final pedestrian height to be measured is h.
基于此,根据相似三角形原理,P1P2P3构成的三角形与O P2C构成的三角形为相似三角形,因此在P1P2P3构成的三角形与O P2C构成的三角形中,P1P3与OC的比等于P1P2与OP2的比,也即h/H=(S2-S1)/S2,进而可以得出h=H*(S2-S1)/S2。Based on this, according to the principle of similar triangles, the triangle formed by P1P2P3 and the triangle formed by O P2C are similar triangles, so in the triangle formed by P1P2P3 and the triangle formed by O P2C, the ratio of P1P3 to OC is equal to the ratio of P1P2 to OP2, that is h/H=(S2-S1)/S2, and then it can be obtained that h=H*(S2-S1)/S2.
在本申请的一些实施例中,在根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果之后,所述方法还包括:根据所述行人身高测量结果按照预设比例生成行人立体模型,以在数字孪生平台上进行显示。In some embodiments of the present application, after determining the pedestrian height measurement result corresponding to the current frame area image according to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, the method further includes: according to The pedestrian height measurement result generates a pedestrian three-dimensional model according to a preset ratio for display on a digital twin platform.
在得到当前帧区域图像对应的行人身高测量结果后,可以基于该行人身高测量结果为行人在数字孪生平台上的可视化显示提供更丰富的信息,即在数字孪生平台上生成并显示行人立体模型时,可以增加测量得到的行人身高特征,从而使生成的行人立体模型更具有区分性,更接近于真实世界,使数字孪生平台的可视化效果更加生动形象。After obtaining the pedestrian height measurement results corresponding to the current frame area image, based on the pedestrian height measurement results, more information can be provided for the visual display of pedestrians on the digital twin platform, that is, when the pedestrian stereo model is generated and displayed on the digital twin platform , can increase the measured pedestrian height features, so that the generated pedestrian stereo model is more distinguishable, closer to the real world, and makes the visualization effect of the digital twin platform more vivid.
在本申请的一些实施例中,在根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果之后,所述方法还包括:获取前一帧区域图像的行人检测结果以及对应的行人身高测量结果;基于所述前一帧区域图像对应的行人身高测量结果和所述当前帧区域图像对应的行人身高测量结果,对所述前一帧区域图像的行人检测结果与当前帧区域图像的行人检测结果进行特征匹配,得到行人特征匹配结果;根据所述行人特征匹配结果生成行人移动轨迹,以在数字孪生平台上进行显示。In some embodiments of the present application, after determining the pedestrian height measurement result corresponding to the current frame area image according to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, the method further includes: obtaining The pedestrian detection result of the previous frame area image and the corresponding pedestrian height measurement result; based on the pedestrian height measurement result corresponding to the previous frame area image and the pedestrian height measurement result corresponding to the current frame area image, the previous The pedestrian detection result of the frame area image is matched with the pedestrian detection result of the current frame area image to obtain the pedestrian feature matching result; the pedestrian moving track is generated according to the pedestrian feature matching result to be displayed on the digital twin platform.
在得到当前帧区域图像对应的行人身高测量结果后,还可以将该行人身高测量结果应用于行人跟踪匹配,例如,当前帧区域图像里会检测出N个行人,而前一帧区域图像中则检测出M个行人,这两帧图像中的行人检测框需要进行一一配对,配对成功的检测框对则延续同一个行人ID标识,并可以在数字孪生平台上实时显示该行人的移动轨迹,而没有配对成功的行人检测框则生成新的行人ID标识,用以表示该行人刚出现在相机视野范围。而由于景区等场景下会有大量人群相互遮挡的情况,进而容易导致配对错误,且对于行人来说,特征相似性也很高,因此本申请实施例通过引入行人身高属性可以增加配对的准确性,即通过身高不一致可以确定两个行人框并非对应同一个行人。After obtaining the pedestrian height measurement results corresponding to the current frame area image, the pedestrian height measurement results can also be applied to pedestrian tracking and matching. For example, N pedestrians will be detected in the current frame area image, while in the previous frame area image there are When M pedestrians are detected, the pedestrian detection frames in the two frames of images need to be paired one by one, and the pair of detection frames that are successfully paired will continue with the same pedestrian ID, and the pedestrian’s movement track can be displayed in real time on the digital twin platform. The pedestrian detection frame that has not been paired successfully generates a new pedestrian ID to indicate that the pedestrian has just appeared in the camera's field of view. And because there will be a large number of people blocking each other in scenic spots and other scenes, it is easy to cause matching errors, and for pedestrians, the feature similarity is also high, so the embodiment of the present application can increase the accuracy of matching by introducing the pedestrian height attribute , that is, it can be determined that the two pedestrian frames do not correspond to the same pedestrian through the inconsistent height.
具体地,可以先获取前一帧区域图像的行人检测结果以及对应的行人身高测量结果,然后采用现有的特征匹配算法将这两帧图像的行人检测结果进行特征匹配,同时将这两帧图像对应的行人身高测量结果作为额外的特征进行匹配,上述特征匹配算法例如可以采用SIFT(Scale-invariant feature transform,尺度不变特征转换)、SURF(Speeded UpRobust Features,加速鲁棒特征)等算法来实现,当然具体采用何种特征匹配算法,本领域技术人员可以根据实际需求灵活选择,在此不作具体限定。Specifically, the pedestrian detection results of the previous frame of area images and the corresponding pedestrian height measurement results can be obtained first, and then the existing feature matching algorithm is used to perform feature matching on the pedestrian detection results of the two frames of images, and the two frames of images The corresponding pedestrian height measurement results are matched as additional features. The above-mentioned feature matching algorithm can be implemented by using algorithms such as SIFT (Scale-invariant feature transform, scale-invariant feature transform), SURF (Speeded UpRobust Features, accelerated robust features) and so on. , of course, which feature matching algorithm is specifically used can be flexibly selected by those skilled in the art according to actual needs, and is not specifically limited here.
如果相邻两帧图像对应的行人特征匹配成功,且对应的行人身高相同或者偏差小于一定阈值,那么则可以认为这两帧图像中检测到的行人对应于同一行人,而如果相邻两帧图像对应的行人特征匹配失败,或者对应的行人身高不一致或者偏差较大,那么可以认为这两帧图像中检测到的行人并非同一行人,通过将行人身高测量结果作为额外的匹配信息,提高了行人跟踪匹配的准确性。If the pedestrian features corresponding to two adjacent frames of images are successfully matched, and the height of the corresponding pedestrians is the same or the deviation is less than a certain threshold, then it can be considered that the pedestrians detected in the two frames of images correspond to the same pedestrian, and if the two adjacent frames of images If the matching of the corresponding pedestrian features fails, or the height of the corresponding pedestrians is inconsistent or has a large deviation, then it can be considered that the pedestrians detected in the two frames of images are not the same pedestrian. By using the pedestrian height measurement results as additional matching information, pedestrian tracking is improved. matching accuracy.
对于跟踪成功的行人,可以根据多帧图像中跟踪到的行人位置进一步生成行人移动轨迹,从而可以在数字孪生平台上进行显示,且保证了数字孪生平台对于行人移动轨迹显示的准确性。For successfully tracked pedestrians, the pedestrian trajectory can be further generated according to the tracked pedestrian position in multiple frames of images, so that it can be displayed on the digital twin platform, and the accuracy of the digital twin platform for pedestrian trajectory display is guaranteed.
本申请实施例还提供了一种用于数字孪生的身高测量装置300,如图3所示,提供了本申请实施例中一种用于数字孪生的身高测量装置的结构示意图,所述装置300包括:第一获取单元310、目标检测单元320、投影单元330以及确定单元340,其中:The embodiment of the present application also provides a
第一获取单元310,用于获取路侧相机采集的当前帧区域图像;The
目标检测单元320,用于利用预设目标检测模型对所述当前帧区域图像进行行人检测,得到当前帧区域图像的行人检测结果,所述行人检测结果包括行人检测框以及行人状态;The
投影单元330,用于在所述行人状态为站立状态的情况下,将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果;A
确定单元340,用于根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果,以基于所述当前帧区域图像对应的行人身高测量结果在数字孪生平台上进行可视化显示。The
在本申请的一些实施例中,所述投影单元330具体用于:确定图像坐标系与世界大地坐标系之间的变换关系;根据所述图像坐标系与世界大地坐标系之间的变换关系,将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果。In some embodiments of the present application, the
在本申请的一些实施例中,所述行人检测框包括行人检测框的上边中心点的像素位置以及下边中心点的像素位置,所述投影单元330具体用于:将所述行人检测框的上边中心点的像素位置投影到地面,得到所述行人检测框的上边中心点在地面上的投影位置;将所述行人检测框的下边中心点的像素位置投影到地面,得到所述行人检测框的下边中心点在地面上的投影位置。In some embodiments of the present application, the pedestrian detection frame includes the pixel position of the center point of the upper side and the pixel position of the center point of the lower side of the pedestrian detection frame, and the
在本申请的一些实施例中,所述行人检测框在地面上的投影结果包括行人检测框的上边中心点和下边中心点在地面上的投影位置,所述路侧相机的属性信息包括路侧相机的高度以及路侧相机在地面上的位置;所述确定单元340具体用于:根据所述行人检测框的下边中心点在地面上的投影位置以及所述路侧相机在地面上的位置,确定所述行人检测框的下边中心点到所述路侧相机的距离;根据所述行人检测框的上边中心点在地面上的投影位置以及所述路侧相机在地面上的位置,确定所述行人检测框的上边中心点到所述路侧相机的距离;基于所述行人检测框的下边中心点到所述路侧相机的距离、所述行人检测框的上边中心点到所述路侧相机的距离以及所述路侧相机的高度,利用相似三角形算法确定所述行人身高测量结果。In some embodiments of the present application, the projection result of the pedestrian detection frame on the ground includes the projection positions of the upper center point and the lower center point of the pedestrian detection frame on the ground, and the attribute information of the roadside camera includes roadside The height of the camera and the position of the roadside camera on the ground; the
在本申请的一些实施例中,所述装置还包括:渲染单元,用于根据所述行人身高测量结果按照预设比例生成行人立体模型,以在数字孪生平台上进行显示。In some embodiments of the present application, the device further includes: a rendering unit, configured to generate a three-dimensional model of a pedestrian according to a preset ratio according to the measurement result of the pedestrian's height, for display on a digital twin platform.
在本申请的一些实施例中,所述装置还包括:第二获取单元,用于获取前一帧区域图像的行人检测结果以及对应的行人身高测量结果;特征匹配单元,用于基于所述前一帧区域图像对应的行人身高测量结果和所述当前帧区域图像对应的行人身高测量结果,对所述前一帧区域图像的行人检测结果与当前帧区域图像的行人检测结果进行特征匹配,得到行人特征匹配结果;生成单元,用于根据所述行人特征匹配结果生成行人移动轨迹,以在数字孪生平台上进行显示。In some embodiments of the present application, the device further includes: a second acquiring unit, configured to acquire the pedestrian detection result and the corresponding pedestrian height measurement result of the previous frame area image; a feature matching unit, configured to The pedestrian height measurement result corresponding to a frame area image and the pedestrian height measurement result corresponding to the current frame area image, perform feature matching on the pedestrian detection result of the previous frame area image and the pedestrian detection result of the current frame area image, to obtain Pedestrian feature matching results; a generating unit configured to generate pedestrian movement tracks according to the pedestrian feature matching results for display on the digital twin platform.
能够理解,上述用于数字孪生的身高测量装置,能够实现前述实施例中提供的用于数字孪生的身高测量方法的各个步骤,关于用于数字孪生的身高测量方法的相关阐释均适用于用于数字孪生的身高测量装置,此处不再赘述。It can be understood that the above-mentioned height measurement device for digital twins can implement the various steps of the height measurement method for digital twins provided in the foregoing embodiments, and relevant explanations about the height measurement method for digital twins are applicable to The height measurement device of the digital twin will not be repeated here.
图4是本申请的一个实施例电子设备的结构示意图。请参考图4,在硬件层面,该电子设备包括处理器,可选地还包括内部总线、网络接口、存储器。其中,存储器可能包含内存,例如高速随机存取存储器(Random-Access Memory,RAM),也可能还包括非易失性存储器(non-volatile memory),例如至少1个磁盘存储器等。当然,该电子设备还可能包括其他业务所需要的硬件。Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Please refer to FIG. 4 , at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Wherein, the memory may include a memory, such as a high-speed random-access memory (Random-Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. Of course, the electronic device may also include hardware required by other services.
处理器、网络接口和存储器可以通过内部总线相互连接,该内部总线可以是ISA(Industry Standard Architecture,工业标准体系结构)总线、PCI(PeripheralComponent Interconnect,外设部件互连标准)总线或EISA(Extended Industry StandardArchitecture,扩展工业标准结构)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一个双向箭头表示,但并不表示仅有一根总线或一种类型的总线。The processor, the network interface and the memory can be connected to each other through an internal bus, which can be an ISA (Industry Standard Architecture, industry standard architecture) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnection standard) bus or an EISA (Extended Industry StandardArchitecture, extended industry standard architecture) bus, etc. The bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one double-headed arrow is used in FIG. 4 , but it does not mean that there is only one bus or one type of bus.
存储器,用于存放程序。具体地,程序可以包括程序代码,所述程序代码包括计算机操作指令。存储器可以包括内存和非易失性存储器,并向处理器提供指令和数据。Memory for storing programs. Specifically, the program may include program code, and the program code includes computer operation instructions. Storage, which can include internal memory and nonvolatile storage, provides instructions and data to the processor.
处理器从非易失性存储器中读取对应的计算机程序到内存中然后运行,在逻辑层面上形成用于数字孪生的身高测量装置。处理器,执行存储器所存放的程序,并具体用于执行以下操作:The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a height measurement device for digital twins on a logical level. The processor executes the program stored in the memory, and is specifically used to perform the following operations:
获取路侧相机采集的当前帧区域图像;Obtain the current frame area image collected by the roadside camera;
利用预设目标检测模型对所述当前帧区域图像进行行人检测,得到当前帧区域图像的行人检测结果,所述行人检测结果包括行人检测框以及行人状态;Using a preset target detection model to perform pedestrian detection on the current frame area image to obtain a pedestrian detection result of the current frame area image, the pedestrian detection result includes a pedestrian detection frame and a pedestrian state;
在所述行人状态为站立状态的情况下,将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果;When the pedestrian state is a standing state, project the pedestrian detection frame onto the ground to obtain a projection result of the pedestrian detection frame on the ground;
根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果,以基于所述当前帧区域图像对应的行人身高测量结果实现数字孪生平台的可视化显示。According to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, determine the pedestrian height measurement result corresponding to the current frame area image, so as to realize the digital twin platform based on the pedestrian height measurement result corresponding to the current frame area image visual display of .
上述如本申请图1所示实施例揭示的用于数字孪生的身高测量装置执行的方法可以应用于处理器中,或者由处理器实现。处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器,包括中央处理器(CentralProcessing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific IntegratedCircuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。The method performed by the height measuring device for digital twin disclosed in the above embodiment shown in FIG. 1 of the present application may be applied to a processor or implemented by the processor. A processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. Above-mentioned processor can be general-purpose processor, comprises central processing unit (Central Processing Unit, CPU), network processor (Network Processor, NP) etc.; It can also be Digital Signal Processor (Digital Signal Processor, DSP), ASIC (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
该电子设备还可执行图1中用于数字孪生的身高测量装置执行的方法,并实现用于数字孪生的身高测量装置在图1所示实施例的功能,本申请实施例在此不再赘述。The electronic device can also execute the method performed by the height measurement device for digital twins in FIG. 1, and realize the functions of the height measurement device for digital twins in the embodiment shown in FIG. 1, and the embodiments of the present application will not repeat them here. .
本申请实施例还提出了一种计算机可读存储介质,该计算机可读存储介质存储一个或多个程序,该一个或多个程序包括指令,该指令当被包括多个应用程序的电子设备执行时,能够使该电子设备执行图1所示实施例中用于数字孪生的身高测量装置执行的方法,并具体用于执行:The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores one or more programs, and the one or more programs include instructions, and when the instructions are executed by an electronic device including a plurality of application programs , the electronic device can be made to execute the method implemented by the height measuring device for the digital twin in the embodiment shown in FIG. 1, and is specifically used to execute:
获取路侧相机采集的当前帧区域图像;Obtain the current frame area image collected by the roadside camera;
利用预设目标检测模型对所述当前帧区域图像进行行人检测,得到当前帧区域图像的行人检测结果,所述行人检测结果包括行人检测框以及行人状态;Using a preset target detection model to perform pedestrian detection on the current frame area image to obtain a pedestrian detection result of the current frame area image, the pedestrian detection result includes a pedestrian detection frame and a pedestrian state;
在所述行人状态为站立状态的情况下,将所述行人检测框投影到地面,得到所述行人检测框在地面上的投影结果;When the pedestrian state is a standing state, project the pedestrian detection frame onto the ground to obtain a projection result of the pedestrian detection frame on the ground;
根据所述行人检测框在地面上的投影结果以及路侧相机的属性信息,确定当前帧区域图像对应的行人身高测量结果,以基于所述当前帧区域图像对应的行人身高测量结果实现数字孪生平台的可视化显示。According to the projection result of the pedestrian detection frame on the ground and the attribute information of the roadside camera, determine the pedestrian height measurement result corresponding to the current frame area image, so as to realize the digital twin platform based on the pedestrian height measurement result corresponding to the current frame area image visual display of .
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read only memory (ROM) or flash RAM. Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information. Information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes Other elements not expressly listed, or elements inherent in the process, method, commodity, or apparatus are also included. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems or computer program products. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above descriptions are only examples of the present application, and are not intended to limit the present application. For those skilled in the art, various modifications and changes may occur in this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211174305.5A CN115546130A (en) | 2022-09-26 | 2022-09-26 | Height measurement method, device and electronic equipment for digital twin |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211174305.5A CN115546130A (en) | 2022-09-26 | 2022-09-26 | Height measurement method, device and electronic equipment for digital twin |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115546130A true CN115546130A (en) | 2022-12-30 |
Family
ID=84730051
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211174305.5A Pending CN115546130A (en) | 2022-09-26 | 2022-09-26 | Height measurement method, device and electronic equipment for digital twin |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115546130A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115984970A (en) * | 2023-03-13 | 2023-04-18 | 浙江宇视科技有限公司 | Pedestrian height determining method and device, electronic equipment and storage medium |
-
2022
- 2022-09-26 CN CN202211174305.5A patent/CN115546130A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115984970A (en) * | 2023-03-13 | 2023-04-18 | 浙江宇视科技有限公司 | Pedestrian height determining method and device, electronic equipment and storage medium |
CN115984970B (en) * | 2023-03-13 | 2023-08-18 | 浙江宇视科技有限公司 | Pedestrian height determining method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110307791B (en) | Calculation method of vehicle length and speed based on 3D vehicle bounding box | |
WO2020156923A2 (en) | Map and method for creating a map | |
CN115526990A (en) | Target visualization method, device and electronic equipment for digital twin | |
CN110088563B (en) | Image depth calculation method, image processing device and three-dimensional measurement system | |
EP3673237A1 (en) | Apparatus, method and computer program product for facilitating navigation of a vehicle based upon a quality index of the map data | |
CN112989877A (en) | Method and device for labeling object in point cloud data | |
CN110969592A (en) | Image fusion method, automatic driving control method, device and equipment | |
CN115546315A (en) | Sensor on-line calibration method and device for automatic driving vehicle and storage medium | |
CN112739983A (en) | Method and related device for correcting point cloud data | |
CN117392423A (en) | Lidar-based target true value data prediction method, device and equipment | |
CN115546130A (en) | Height measurement method, device and electronic equipment for digital twin | |
CN114820784B (en) | Road sign generation method, device and electronic equipment | |
CN115471819A (en) | Target detection and positioning method, device, electronic equipment, and storage medium for roadside scenes | |
CN113936045B (en) | Roadside laser radar point cloud registration method and device | |
JP6185327B2 (en) | Vehicle rear side warning device, vehicle rear side warning method, and other vehicle distance detection device | |
CN117315024A (en) | Remote target positioning method and device and electronic equipment | |
CN118463965A (en) | Positioning accuracy evaluation method, device and vehicle | |
CN114913500B (en) | Pose determination method and device, computer equipment and storage medium | |
CN115830073A (en) | Map element reconstruction method, map element reconstruction device, computer equipment and storage medium | |
CN116740680A (en) | Vehicle positioning method and device and electronic equipment | |
CN116597131A (en) | Target positioning method and device, electronic equipment and computer readable storage medium | |
CN115719375A (en) | Target fusion method, device, electronic device, and computer-readable storage medium | |
CN116152355A (en) | Road side camera calibration method and device and target detection method and device | |
CN112183378A (en) | Road slope estimation method and device based on color and depth image | |
CN116665181A (en) | A target detection method, device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |