CN113804100B - Method, device, device and storage medium for determining spatial coordinates of a target object - Google Patents
Method, device, device and storage medium for determining spatial coordinates of a target object Download PDFInfo
- Publication number
- CN113804100B CN113804100B CN202010527544.9A CN202010527544A CN113804100B CN 113804100 B CN113804100 B CN 113804100B CN 202010527544 A CN202010527544 A CN 202010527544A CN 113804100 B CN113804100 B CN 113804100B
- Authority
- CN
- China
- Prior art keywords
- coordinates
- target object
- spatial
- map
- image
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/002—Measuring arrangements characterised by the use of optical techniques for measuring two or more coordinates
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/26—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
- G01C21/28—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
- G01C21/30—Map- or contour-matching
- G01C21/32—Structuring or formatting of map data
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Image Processing (AREA)
Abstract
本公开的实施例提供了确定目标对象的空间坐标的方法、装置、设备和存储介质,涉及空间测绘领域。该方法包括获取图像,该图像记录了一个空间区域中的目标对象和参考对象。该方法还包括获取地图的地图数据,地图数据中包括参考对象的空间坐标。该方法还包括根据参考对象在图像中的像素坐标和参考对象的空间坐标,确定图像和地图之间的映射关系。该方法进一步包括基于目标对象在图像中的像素坐标和映射关系,确定目标对象的空间坐标。以此方式,能够高效准确地确定目标对象的空间坐标,而无需采用专业的测绘设备,从而大幅降低了成本。
Embodiments of the present disclosure provide a method, device, device and storage medium for determining spatial coordinates of a target object, and relate to the field of spatial surveying and mapping. The method includes acquiring an image recording a target object and a reference object in a spatial region. The method also includes acquiring map data of the map, the map data including the spatial coordinates of the reference object. The method also includes determining a mapping relationship between the image and the map according to the pixel coordinates of the reference object in the image and the spatial coordinates of the reference object. The method further includes determining the spatial coordinates of the target object based on the pixel coordinates and the mapping relationship of the target object in the image. In this way, the spatial coordinates of the target object can be determined efficiently and accurately without using professional surveying and mapping equipment, thereby greatly reducing costs.
Description
技术领域technical field
本公开的实施例涉及空间测绘领域,并且更具体地,涉及确定目标对象的空间坐标的方法、装置、设备和存储介质。Embodiments of the present disclosure relate to the field of spatial surveying and mapping, and more specifically, to a method, device, device, and storage medium for determining spatial coordinates of a target object.
背景技术Background technique
在智慧交通领域中,例如为了方便对交通设施进行精细化管理,需要确定诸如交通设施之类的对象的空间坐标。另外,在高精度地图的构建过程中,也需要知晓地理环境中的对象的空间坐标。In the field of smart transportation, for example, in order to facilitate fine-grained management of transportation facilities, it is necessary to determine the spatial coordinates of objects such as transportation facilities. In addition, in the process of constructing high-precision maps, it is also necessary to know the spatial coordinates of objects in the geographical environment.
目前,主要依赖于激光雷达测量或倾斜摄影等技术来确定对象的空间坐标。激光雷达测量是指通过激光雷达重建物体的空间位置和三维形状的技术。倾斜摄影技术通过在同一无人机上搭载多台传感器,同时从一个垂直角度、四个倾斜角度采集被摄物体影像,重建物体的空间位置和三维形状。虽然采用这两种技术均可以获取精度达到厘米级的空间坐标,但是存在设备和人力成本高、使用受限等问题,在空间环境发生局部变化后(例如:在空间中增加了新的设备、道路中车道线更新等),这两种技术均无法方便、快速地获得变化后的空间区域中的对象的空间坐标。Currently, techniques such as lidar measurements or oblique photography are relied upon to determine the spatial coordinates of objects. LiDAR measurement refers to the technique of reconstructing the spatial position and three-dimensional shape of objects through LiDAR. Oblique photography technology uses multiple sensors on the same drone to collect images of the subject from one vertical angle and four oblique angles at the same time, and reconstruct the spatial position and three-dimensional shape of the object. Although these two technologies can be used to obtain spatial coordinates with centimeter-level accuracy, there are problems such as high equipment and labor costs and limited use. After local changes in the space environment (for example: adding new equipment, Lane line update in the road, etc.), neither of these two technologies can conveniently and quickly obtain the spatial coordinates of the objects in the changed spatial region.
发明内容Contents of the invention
本公开的示例实施例提供了确定目标对象的空间坐标的方案。Example embodiments of the present disclosure provide a scheme for determining spatial coordinates of a target object.
在本公开的第一方面,提供了一种确定目标对象的空间坐标的方法。该方法包括获取图像,该图像记录了一个空间区域中的目标对象和参考对象。该方法还包括获取地图的地图数据,该地图数据中包括参考对象的空间坐标。该方法还包括根据参考对象在图像中的像素坐标和参考对象的空间坐标,确定图像和地图之间的映射关系。该方法还包括基于目标对象在图像中的像素坐标和映射关系,确定目标对象的空间坐标。这样的方案能够高效准确地确定目标对象的空间坐标,而无需采用专业的测绘设备,从而大幅降低了成本。In a first aspect of the present disclosure, a method of determining spatial coordinates of a target object is provided. The method includes acquiring an image recording a target object and a reference object in a spatial region. The method also includes acquiring map data of the map, the map data including the spatial coordinates of the reference object. The method also includes determining a mapping relationship between the image and the map according to the pixel coordinates of the reference object in the image and the spatial coordinates of the reference object. The method also includes determining the spatial coordinates of the target object based on the pixel coordinates and the mapping relationship of the target object in the image. Such a solution can efficiently and accurately determine the spatial coordinates of the target object without using professional surveying and mapping equipment, thereby greatly reducing costs.
在一些实施例中,该方法还包括将目标对象的空间坐标更新至地图数据。以此方式,可以实现地图数据的快速更新,通过上述方式,在局部的空间区域内存在实体更新的情况下,无需利用地图数据采集设备重新对空间区域进行地图数据采集,节约了人力、物力和时间成本。In some embodiments, the method further includes updating the spatial coordinates of the target object to the map data. In this way, the map data can be updated quickly. Through the above method, in the case of entity update in a local space area, there is no need to use map data acquisition equipment to re-collect map data in the space area, saving manpower, material resources and Time costs.
在一些实施例中,目标对象包括对空间区域进行地图数据采集之后,在空间区域中新增的实体;参考对象包括对空间区域进行地图数据采集前,在空间区域中存在的实体。以此方式,可以实现对环境变化的快速响应。In some embodiments, the target object includes entities newly added in the spatial region after map data collection is performed on the spatial region; the reference object includes entities existing in the spatial region before map data collection is performed on the spatial region. In this way, rapid response to environmental changes can be achieved.
在一些实施例中,对空间区域进行地图数据采集前在空间区域中存在的实体可以限定出第一平面,新增的实体可以位于该第一平面上。In some embodiments, the entities existing in the spatial region before map data collection is performed on the spatial region may define a first plane, and the newly added entity may be located on the first plane.
在一些实施例中,在空间区域中新增的实体可以包括新安装的设备,例如电警相机、交通雷达等。在这样的实施例中,对空间区域进行地图数据采集前在空间区域中存在的实体可以包括安装有该设备的设备,例如电警杆、路灯杆、广告牌、红绿灯杆等。In some embodiments, newly added entities in the space region may include newly installed equipment, such as electric police cameras, traffic radar, and the like. In such an embodiment, the entities present in the spatial region before the map data collection is performed on the spatial region may include devices installed with the device, such as electric police poles, street light poles, billboards, traffic light poles, and the like.
在一些实施例中,在空间区域中新增的实体可以包括新规划的车道线。在这样的实施例中,对空间区域进行地图数据采集前在空间区域中存在的实体可以包括已经存在的车道线等。In some embodiments, the newly added entities in the spatial area may include newly planned lane lines. In such an embodiment, the entities existing in the spatial region before map data collection is performed on the spatial region may include existing lane lines and the like.
在一些实施例中,目标对象包括空间区域中建筑物的第一部分,参考对象包括建筑物的第二部分;第一部分由采集地图数据的数据采集设备采集到,第二部分未由数据采集设备采集到。以此方式,可以更方便、快速地确定高层建筑物的高层部分的空间坐标。In some embodiments, the target object includes a first part of a building in the spatial region, and the reference object includes a second part of the building; the first part is collected by a data collection device that collects map data, and the second part is not collected by the data collection device arrive. In this way, the spatial coordinates of high-rise parts of high-rise buildings can be determined more conveniently and quickly.
在一些实施例中,确定图像和地图之间的映射关系包括:根据参考对象上的多个第一控制点的像素坐标与多个第一控制点在地图中的多个对应点的空间坐标,确定图像和地图之间的映射关系。根据多个第一控制点的像素坐标以及多个对应点的空间坐标,可以实现映射关系的快速确定。In some embodiments, determining the mapping relationship between the image and the map includes: according to the pixel coordinates of the plurality of first control points on the reference object and the spatial coordinates of the plurality of corresponding points in the map of the plurality of first control points, Determine the mapping relationship between the image and the map. According to the pixel coordinates of multiple first control points and the spatial coordinates of multiple corresponding points, the mapping relationship can be quickly determined.
在一些实施例中,多个第一控制点包括至少四个第一控制点,至少四个第一控制点位于第一平面上并且不共线。通过至少四个第一控制点可以更准确地获得图像和地图之间的映射关系。In some embodiments, the plurality of first control points includes at least four first control points, and the at least four first control points are located on the first plane and are not collinear. The mapping relationship between the image and the map can be obtained more accurately through at least four first control points.
在一些实施例中,确定图像和地图之间的映射关系包括:确定多个对应点的空间坐标在空间坐标系的三个维度上的第一统计结果、第二统计结果和第三统计结果;以及如果确定第一统计结果和第二统计结果均大于第三统计结果,则基于多个第一控制点的像素坐标、以及多个对应点的空间坐标中的、与第一统计结果和第二统计结果相对应的维度上的坐标,确定图像和地图之间的映射关系。由此,可以降低确定上述映射关系时的计算复杂度。In some embodiments, determining the mapping relationship between the image and the map includes: determining the first statistical result, the second statistical result and the third statistical result of the spatial coordinates of the plurality of corresponding points on the three dimensions of the spatial coordinate system; And if it is determined that both the first statistical result and the second statistical result are greater than the third statistical result, then based on the pixel coordinates of a plurality of first control points and the spatial coordinates of a plurality of corresponding points, the correlation between the first statistical result and the second The coordinates in the dimension corresponding to the statistical results determine the mapping relationship between the image and the map. Therefore, the computational complexity when determining the above mapping relationship can be reduced.
在一些实施例中,统计结果包括方差和分布区间的长度中的至少一个。In some embodiments, the statistics include at least one of a variance and a length of a distribution interval.
在一些实施例中,其中确定目标对象的空间坐标包括:基于目标对象的像素坐标和映射关系,确定目标对象的空间坐标中的、与第一统计结果相对应的维度上的第一坐标以及与第二统计结果相对应的维度上的第二坐标。以此方式,可以降低确定上述映射关系时的计算复杂度。In some embodiments, determining the spatial coordinates of the target object includes: based on the pixel coordinates and the mapping relationship of the target object, determining the first coordinate in the dimension corresponding to the first statistical result and the first coordinate of the target object in the spatial coordinates of the target object The second coordinate on the dimension corresponding to the second statistical result. In this way, the computational complexity of determining the above mapping relationship can be reduced.
在一些实施例中,确定图像和地图之间的映射关系包括确定多个第一控制点的像素坐标与多个对应点的空间坐标之间的单应变换关系。In some embodiments, determining the mapping relationship between the image and the map includes determining a homography transformation relationship between the pixel coordinates of the plurality of first control points and the spatial coordinates of the plurality of corresponding points.
在本公开的第二方面,提供了一种确定目标对象的空间坐标的装置。该装置包括获取单元、映射关系确定单元和空间坐标确定单元。获取单元被配置为获取图像和地图的地图数据。图像记录了一个空间区域中的目标对象和参考对象。地图数据中包括参考对象的空间坐标。映射关系确定单元被配置为根据参考对象在图像中的像素坐标和参考对象的空间坐标,确定图像和地图之间的映射关系。空间坐标确定单元被配置为基于目标对象在图像中的像素坐标和映射关系,确定目标对象的空间坐标。In a second aspect of the present disclosure, an apparatus for determining spatial coordinates of a target object is provided. The device includes an acquisition unit, a mapping relation determination unit and a space coordinate determination unit. The acquiring unit is configured to acquire map data of images and maps. The image records a target object and a reference object in a spatial region. The spatial coordinates of the reference objects are included in the map data. The mapping relationship determination unit is configured to determine the mapping relationship between the image and the map according to the pixel coordinates of the reference object in the image and the spatial coordinates of the reference object. The spatial coordinate determining unit is configured to determine the spatial coordinates of the target object based on the pixel coordinates of the target object in the image and the mapping relationship.
在一些实施例中,该装置还包括更新单元,被配置为将目标对象的空间坐标更新至地图数据。In some embodiments, the device further includes an updating unit configured to update the spatial coordinates of the target object to the map data.
在一些实施例中,目标对象包括对空间区域进行地图数据采集之后,在空间区域中新增的实体;参考对象包括对空间区域进行地图数据采集前,在空间区域中存在的实体。In some embodiments, the target object includes entities newly added in the spatial region after map data collection is performed on the spatial region; the reference object includes entities existing in the spatial region before map data collection is performed on the spatial region.
在一些实施例中,目标对象包括空间区域中建筑物的第一部分,参考对象包括建筑物的第二部分;第一部分由采集地图数据的数据采集设备采集到,第二部分未由数据采集设备采集到。In some embodiments, the target object includes a first part of a building in the spatial region, and the reference object includes a second part of the building; the first part is collected by a data collection device that collects map data, and the second part is not collected by the data collection device arrive.
在一些实施例中,映射关系确定单元还被配置为根据参考对象上的多个第一控制点的像素坐标与多个第一控制点在地图中的对应点的空间坐标,确定映射关系。In some embodiments, the mapping relationship determination unit is further configured to determine the mapping relationship according to the pixel coordinates of the plurality of first control points on the reference object and the spatial coordinates of corresponding points of the plurality of first control points in the map.
在本公开的第三方面,提供了一种计算设备。该计算设备包括处理器和存储器。存储器用于存储程序代码,处理器用于存储器中的程序代码执行上述第一方面以及结合上述第一方面中的任意一种实现方式的方法。In a third aspect of the present disclosure, a computing device is provided. The computing device includes a processor and memory. The memory is used to store program codes, and the processor is used to execute the program codes in the memory to execute the above-mentioned first aspect and the method in combination with any one of the above-mentioned first aspects.
在本公开的第四方面,提供了一种计算机可读存储介质。计算机可读存储介质存储有计算机程序。当该计算机程序被处理器执行时,可以实现上述第一方面以及结合上述第一方面中的任意一种实现方式所提供的确定目标对象的空间坐标的功能。In a fourth aspect of the present disclosure, a computer readable storage medium is provided. A computer readable storage medium stores a computer program. When the computer program is executed by the processor, the above first aspect and the function of determining the spatial coordinates of the target object provided in combination with any one of the implementation manners of the above first aspect can be realized.
在本公开的第五方面,提供了一种计算机程序产品。该计算机程序产品包括指令。当该计算机程序产品被计算机执行时,使得计算机可以执行上述第一方面以及结合上述第一方面中的任意一种实现方式所提供的确定目标对象的空间坐标的方法的流程。In a fifth aspect of the present disclosure, a computer program product is provided. The computer program product includes instructions. When the computer program product is executed by a computer, the computer can execute the above first aspect and the flow of the method for determining the spatial coordinates of the target object provided in combination with any one of the implementation manners of the above first aspect.
附图说明Description of drawings
图1A示出了能够在其中实施本公开的实施例的环境的框图;Figure 1A shows a block diagram of an environment in which embodiments of the present disclosure can be implemented;
图1B示出了根据本公开的一些实施例的计算设备的示例软件架构的框图;FIG. 1B shows a block diagram of an example software architecture of a computing device according to some embodiments of the present disclosure;
图2示出了根据本公开的一些实施例的示例图像的示意图;Figure 2 shows a schematic diagram of an example image according to some embodiments of the present disclosure;
图3示出了根据本公开的一些实施例的示例地图的示意图;Figure 3 shows a schematic diagram of an example map according to some embodiments of the present disclosure;
图4示出了根据本公开的一些实施例的确定目标对象的空间坐标的方法的流程图;FIG. 4 shows a flowchart of a method for determining spatial coordinates of a target object according to some embodiments of the present disclosure;
图5示出了根据本公开的另一些实施例的确定目标对象的空间坐标的方法的流程图;Fig. 5 shows a flowchart of a method for determining spatial coordinates of a target object according to other embodiments of the present disclosure;
图6示出了根据本公开的又一些实施例的确定目标对象的空间坐标的方法的流程图;Fig. 6 shows a flow chart of a method for determining spatial coordinates of a target object according to still other embodiments of the present disclosure;
图7示出了根据本公开的另一些实施例的示例图像的示意图;Fig. 7 shows a schematic diagram of an example image according to other embodiments of the present disclosure;
图8示出了本公开实施例的装置800的示意框图;以及FIG. 8 shows a schematic block diagram of an
图9示出了本公开实施例的计算设备900的框图。FIG. 9 shows a block diagram of a
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein; A more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only, and are not intended to limit the protection scope of the present disclosure.
在本文中使用的术语“空间标定”是指确定同一对象在不同空间下的位置的对应关系。“单应变换”是指两个中心投影平面之间的空间位置变换关系。The term "spatial calibration" used herein refers to determining the corresponding relationship of the positions of the same object in different spaces. "Homography transformation" refers to the spatial position transformation relationship between two central projection planes.
在本公开的实施例的描述中,术语“包括”及其类似用语应当理解为开放性包含,即“包括但不限于”。术语“基于”应当理解为“至少部分地基于”。术语“一个实施例”或“该实施例”应当理解为“至少一个实施例”。术语“第一”、“第二”等等可以指代不同的或相同的对象。下文还可能包括其他明确的和隐含的定义。In the description of the embodiments of the present disclosure, the term "comprising" and its similar expressions should be interpreted as an open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be read as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same object. Other definitions, both express and implied, may also be included below.
如前所述,确定对象的空间坐标的传统方式主要包括激光雷达测量和倾斜摄影。虽然采用激光雷达测量可以获取精度达到厘米级的空间坐标,但是激光雷达测绘车的成本较高,通常价格高达上百万人民币。尤其是,在采用激光雷达测量较小区域时,成本甚至高到难以接受的程度。此外,测绘时需要使激光雷达测绘车到达目标对象所在地才能进行测绘,长途运行可能会导致激光雷达测绘车上的传感器损坏。再者,激光雷达测绘需要测绘资质,而目前仅有少量厂家具备该测绘资质。当环境发生变化时,比如交通标志线更新、交通监控设备重新安装等,采用激光雷达测量无法实现对环境变化的快速响应。As mentioned earlier, traditional ways of determining the spatial coordinates of an object mainly include lidar measurement and oblique photography. Although laser radar measurement can be used to obtain spatial coordinates with centimeter-level accuracy, the cost of laser radar mapping vehicles is relatively high, usually as high as millions of yuan. Especially when using lidar to measure small areas, the cost is even prohibitively high. In addition, the lidar mapping vehicle needs to reach the location of the target object for surveying and mapping, and long-distance operation may cause damage to the sensors on the lidar mapping vehicle. Furthermore, lidar surveying and mapping requires surveying and mapping qualifications, and currently only a small number of manufacturers have such surveying and mapping qualifications. When the environment changes, such as the renewal of traffic signs, the reinstallation of traffic monitoring equipment, etc., the rapid response to environmental changes cannot be achieved by using LiDAR measurement.
基于倾斜摄影的无人机虽然相对便宜,但是采集耗时较长,导致人力成本很高。另外,基于倾斜摄影的无人机的使用是受限制的。城市中存在禁飞区,导致无人机无法使用,而城市区域恰好是智慧交通的重点部署区域。因此,目前采用倾斜摄影技术进行高精度地图的更新是十分缓慢的,也无法实现对环境变化的快速响应。Although UAVs based on oblique photography are relatively cheap, they take a long time to collect, resulting in high labor costs. Additionally, the use of drones based on oblique photography is limited. There is a no-fly zone in the city, which makes it impossible for drones to be used, and the urban area happens to be the key deployment area for smart transportation. Therefore, the current update of high-precision maps using oblique photography technology is very slow, and it is impossible to achieve rapid response to environmental changes.
至少针对上述问题以及潜在的其他相关问题,本公开的实施例提出了一种确定目标对象的空间坐标的方案。通过从图像捕获装置获取包括目标对象和参考对象(其限定了目标对象所在的平面)的图像,基于参考对象上的多个控制点的像素坐标与参考对象的多个控制点在地图中对应的点的空间坐标,确定二者之间的映射关系。进而,可以根据该映射关系来确定目标对象在地图中的空间坐标。该方案能够高效准确地确定目标对象的空间坐标,而无需采用例如激光雷达测绘车和无人机这样的专业测绘设备,从而大幅降低了成本。To at least address the above problems and potentially other related problems, embodiments of the present disclosure propose a solution for determining the spatial coordinates of a target object. By acquiring an image including a target object and a reference object (which defines a plane on which the target object is located) from an image capture device, based on pixel coordinates of a plurality of control points on the reference object corresponding to a plurality of control points of the reference object in the map The spatial coordinates of the points determine the mapping relationship between them. Furthermore, the spatial coordinates of the target object in the map can be determined according to the mapping relationship. This solution can efficiently and accurately determine the spatial coordinates of the target object without the need for professional surveying and mapping equipment such as lidar mapping vehicles and drones, thereby greatly reducing costs.
图1A示出了能够在其中实施本公开实施例的环境100的框图。如图1A所示,环境100包括图像捕获装置110、计算设备130和存储设备140。FIG. 1A shows a block diagram of an
图像捕获装置110可以是具有图像捕获功能的任意适当装置。例如,图像捕获装置110可以是能够通过相机或摄像头拍照的电子设备,诸如智能摄像头、手机、数码相机等。图像捕获装置110所捕获的图像记录了一个空间区域中的目标对象和参考对象。目标对象是需要被确定空间坐标的任意适当的物体,参考对象可以是用于确定目标对象所在平面的任意适当的物体。例如,在目标对象是在空间区域中增加的交通监控设备(例如电警相机、交通雷达)的情况下,参考对象可以是安装有该交通监控设备的电警杆、路灯杆、广告牌、红绿灯杆等。又例如,在目标对象是交通标志线的情况下,参考对象可以是该交通标志线周围的交通标志线。再例如,在目标对象是建筑物的高层部分的情况下,参考对象可以是该建筑物的低层部分。下文将具体结合图2和图3的实施例详细介绍目标对象和参考对象。
存储设备140可以是具有存储功能的任意适当装置。例如,存储设备140可以是固态盘(SSD)、机械存储盘(HDD)、混合存储盘(SSHD)、或者其他类似的存储设备。The
存储设备140中存储有地图数据库120。地图数据库120是以数字化的地图数据为基础的数据库,包括存储在计算机中的地图内容各要素的数字信息文件、数据库管理系统及其它软件和硬件。地图中可以包括各种对象,例如控制点、地貌、土地类型、居民地、水文、植被、交通运输、境界等。应当理解,以上所列出的对象示例仅仅是描述性的、而非限制性的,地图中可以包括任何适当类型和数量的对象。The
计算设备130可以是具有计算能力的任意适当电子设备。在一些实施例中,计算设备130可以部署在云环境中。云环境是指云服务提供商拥有的,用于提供计算、存储、通信资源的中心计算设备集群。例如,计算设备130可以为云环境中的中心服务器。在另一些实施例中,计算设备130可以部署在边缘环境中。边缘环境是指在地理位置上距离图像捕获装置较近的,用于提供计算、存储、通信资源的边缘计算设备集群。例如,计算设备130可以为边缘环境中的边缘计算设备。边缘计算设备例如可以为服务器。在另一些实施例中,计算设备130可以是具有很强处理能力的台式机、笔记本电脑、平板电脑、个人数字助理(PDA)、智能终端等。
计算设备130可以从图像捕获装置110获取图像111。图像111记录了一个空间区域中的目标对象和参考对象。计算设备130可以确定图像111中的各个点的像素坐标,例如目标对象的像素坐标和参考对象上的点的像素坐标。图像是由像素点组成的,像素坐标是指像素点在图像中的位置。
可选的,计算设备130还可以从其他存储装置或者用户接口获取图像111。在一些实施例中,图像111中的目标对象和参考对象已经被人工选出或者自动选出。进一步,在一些实施例中,在图像111中,参考对象上的控制点的像素坐标已经经过标注。类似地,在一些实施例中,在图像111中,目标对象的像素坐标也已经经过标注。Optionally, the
计算设备130还可以从地图数据库120中获取与图像111匹配的地图121。地图121例如可以是卫星地图、实景地图等。地图121可以包括地图数据和/或其他适当的地图要素或信息。地图数据例如可以包括地图121上的各个点的空间位置数据(在下文中也被称作“空间坐标”)等。根据参考对象在图像111中的像素坐标和参考对象在地图121中的空间坐标,计算设备130可以确定图像111和地图121之间的映射关系。继而,计算设备130基于目标对象的像素坐标和该映射关系,确定目标对象在地图121中的空间坐标。
一个点的空间坐标通常包括该点在空间的三个维度上的坐标,例如可以通过(x,y,z)的形式来表示。具体而言,如果一个点的空间坐标是(x0,y0,z0),那么可以认为x0是该点的空间坐标的第一坐标,y0是该点的空间坐标的第二坐标,而z0是该点的空间坐标的第三坐标。应当理解,上述示例仅仅是描述性的而非限制性的,在一些其他实施例中,也可以将y0或z0作为该点的空间坐标的第一坐标。The space coordinates of a point usually include the coordinates of the point in three dimensions of space, for example, it can be expressed in the form of (x, y, z). Specifically, if the spatial coordinates of a point are (x 0 , y 0 , z 0 ), then it can be considered that x 0 is the first coordinate of the spatial coordinates of the point, and y 0 is the second coordinate of the spatial coordinates of the point , and z 0 is the third coordinate of the spatial coordinates of the point. It should be understood that the above examples are only descriptive and not limiting, and in some other embodiments, y 0 or z 0 may also be used as the first coordinate of the spatial coordinates of the point.
在本公开的各种实施例中,根据参考对象的像素坐标与空间坐标来确定图像和地图之间的映射关系,进而基于该映射关系来确定目标对象在地图中的空间坐标。由此,无需采用例如激光雷达测绘车和无人机这样的专业测绘设备,从而大幅降低了成本。In various embodiments of the present disclosure, the mapping relationship between the image and the map is determined according to the pixel coordinates and spatial coordinates of the reference object, and then the spatial coordinates of the target object in the map are determined based on the mapping relationship. This significantly reduces costs by eliminating the need for specialized mapping equipment such as lidar mapping vehicles and drones.
附加地,在一些实施例中,计算设备130可以将目标对象的空间坐标更新至地图数据,从而获得更新后的地图131。进而,计算设备130将更新后的地图131存储到地图数据库120。以此方式,可以实现地图的快速更新。Additionally, in some embodiments, the
应当理解,仅仅出于阐释的目的,在图1A中将地图数据库120和计算设备130示出为两个独立的实体。在一些实施例中,地图数据库120可以存储在计算设备130中。It should be understood that
图1B示出了根据本公开的一些实施例的计算设备130的示例软件架构的框图。如图所示,计算设备130包括获取单元132、映射关系确定单元134和空间坐标确定单元136。FIG. 1B shows a block diagram of an example software architecture of
获取单元132被配置为获取图像111。图像111记录了一个空间区域中的目标对象和参考对象。在一些实施例中,获取单元132可以从图像捕获装置110获取图像111。在另一些实施例中,获取单元132可以通过网络获取用户上传的图像111。在又一些实施例中,获取单元132可以从存储设备(例如存储设备140)获取图像111。The
获取单元132还被配置为获取地图121。地图121包括地图数据,该地图数据中包括参考对象的空间坐标。在一些实施例中,获取单元132可以从地图数据库120获取地图121。The acquiring
在一些实施例中,计算设备130可以进一步包括存储单元(未示出),被配置为存储图像111和地图121。在这样的实施例中,获取单元132可以从该存储单元获取图像111和地图121。In some embodiments,
映射关系确定单元134被配置为根据参考对象在图像111中的像素坐标和参考对象的空间坐标,确定图像111和地图121之间的映射关系。The mapping
空间坐标确定单元136被配置为基于目标对象在图像111中的像素坐标和映射关系,确定目标对象的空间坐标。The spatial coordinate determining
图2示出了根据本公开的一些实施例的由图像捕获装置110所捕获的图像111的示例。在此示例中,图像111是一个交通路口的图像。然而,应当理解,这仅仅是出于阐释的目的。在其他实施例中,图像111可以是包括目标对象和目标对象的任意适当空间区域的图像。FIG. 2 shows an example of an
如图2所示,在该交通路口处布置了电警杆210。电警杆210上安装有交通监控设备220、221和222。在图2所示的实施例中,交通监控设备220和222例如是电警相机,交通监控设备221例如是交通雷达。交通监控设备220、221和222中的一个或多个设备可能会更换位置重新安装。电警杆210上也可能会新增加交通监控设备。在这些情况下,需要确定重新安装的交通监控设备或新增加的交通监控设备的空间坐标。在下文中,将以确定交通监控设备222的空间坐标为例进行描述。在此示例中,目标对象是在交通路口的空间区域中新增加的交通监控设备222,参考对象是电警杆210。因此,在下文中,交通监控设备222可以与目标对象222互换使用,电警杆210可以与参考对象210互换使用。As shown in FIG. 2 , an
在一些实施例中,参考对象210限定了目标对象222所在的平面(在下文中也被称作“第一平面”)。在此示例中,参考对象210所限定的第一平面垂直于地面。然而,应当理解,这仅仅是出于阐释的目的。在其他示例中,参考对象可以限定任意适当的平面。控制点211、212、213、214和215位于参考对象210上。可以理解,“控制点”也被称作标志点,是指容易区分、定位没有歧义性的坐标点。在下文中,参考对象210上的控制点211、212、213、214和215也被称作第一控制点211、212、213、214和215。在本公开的上下文中,在目标对象222占据较小空间的情况下,可以将目标对象222作为单个点进行处理。In some embodiments, the
图3示出了根据本公开的一些实施例的地图121的示例。地图121是与图2所示的图像111匹配的地图。仅仅作为示例,在图3中地图121被示出为实景地图。然而,应当理解,地图121可以采用其他任何适当的形式。计算设备130可以通过多种方式来确定地图121,例如,可以通过从路网到交通路口、从交通路口到电警杆210的跳转路径,确定与图像111匹配的地图121。可替换地,计算设备130可以通过交通路口的关键字来检索与图像111匹配的地图121。应当理解,这仅仅是示例。计算设备130可以通过任意适当的方式来确定与图像111匹配的地图121。FIG. 3 shows an example of a
在图3中,多个第一控制点在地图121中的对应点由附图标记311、312、313、314和315来表示。In FIG. 3 , corresponding points in the
在一些实施例中,可以通过人工标注的方式来标注图像111上的第一控制点211、212、213、214和215以及地图121中的对应点311、312、313、314和315,进而确定多个第一控制点和多个对应点的像素坐标。在另一些实施例中,可以通过计算机视觉中的特征匹配、点云配准等算法来自动标注图像111上的第一控制点211、212、213、214和215以及地图121上的对应点311、312、313、314和315,进而确定多个第一控制点和多个对应点的像素坐标。可以理解,采用任何其他适当的标注方式和确定像素坐标的方式也是可能的。In some embodiments, the first control points 211, 212, 213, 214, and 215 on the
图4示出了根据本公开的一些实施例的示例方法400的流程图。方法400可以由图1A中的计算设备130执行。为了讨论方便,将参考图1A、图2和图3来描述方法400。应当理解,方法400还可以包括未示出的附加步骤和/或可以省略所示出的步骤,本公开的范围在此方面不受限制。FIG. 4 shows a flowchart of an
在框410,计算设备130获取图像111。图像111记录了一个空间区域中的目标对象222和参考对象210。在本公开的一些实施例中,采用图像捕获装置110捕获图像,而没有采用专业的测绘设备,例如激光雷达测绘车、无人机等,从而大幅降低了成本。此外,图像捕获装置110的使用无需具备资质,而且不会受到禁飞区、采集时间、天气等条件的限制,从而可以实现对环境变化的快速响应。At block 410 ,
在框420,计算设备130获取地图121的地图数据,该地图数据中包括参考对象210的空间坐标。At
在框430,计算设备130根据参考对象210在图像111中的像素坐标和参考对象210的空间坐标,确定图像111和地图121之间的映射关系。In block 430 , the
在一些实施例中,计算设备130可以根据参考对象210上的多个第一控制点的像素坐标与地图121中的对应点的空间坐标,确定图像111和地图121之间的映射关系。可以理解,计算设备130可以采用其他任何适当的方式来确定图像111和地图121之间的映射关系。本公开的范围在此方面不受限制。In some embodiments, the
如前所述,可以采用人工方式或者利用特征匹配、点云配准等算法来确定图像111中的多个第一控制点的像素坐标。例如,在图2所示的示例中,多个第一控制点包括控制点211、212、213、214和215。可以采用人工方式或者利用特征匹配、点云配准等算法来确定控制点211、212、213、214和215的像素坐标。当然,可以利用任何适当的方式来确定多个第一控制点的像素坐标。As mentioned above, the pixel coordinates of the multiple first control points in the
仍然如前所述,地图121包括地图数据,该地图数据至少包括地图121上的各个点的空间坐标。因此,基于地图121的地图数据,计算设备130可以确定地图121上的多个对应点的空间坐标。例如,在图3所示的示例中,计算设备130可以基于地图数据来确定多个对应点311、312、313、314和315的空间坐标。Still as mentioned above, the
在一些实施例中,为了降低计算复杂度,计算设备130可以从多个对应点的空间坐标中选择数值变化幅度较大的两个维度上的坐标。进而,计算设备130可以基于多个第一控制点的像素坐标、以及多个对应点的数值变化幅度较大的两个维度上的坐标,确定上述映射关系。例如,在图3所示的示例中,X轴、Y轴和Z轴限定了地图121所使用的坐标系。在一些实施例中,该坐标系为世界级地理坐标系(WGS84)。在该坐标系中,坐标系的原点位于地球质心,Z轴指向(国际时间局)BIH1984.0定义的协议地球极(CTP)方向,X轴指向BIH1984.0的零度子午面和CTP赤道的交点,Y轴通过右手规则来确定。应当理解,采用其他任何适当的坐标系也是可能的,例如火星坐标系(即GCJ02坐标系)、百度坐标系(即BD09坐标系)等。In some embodiments, in order to reduce computational complexity, the
继续参考图3所示的示例,当电警杆210位于东方向时,电警杆210上的点的y坐标和z坐标的变化幅度较大,而x坐标的变化幅度很小,因此计算设备130可以选择电警杆210上的点的y坐标和z坐标。当电警杆210位于北方向时,电警杆210上的点的x坐标和z坐标的变化幅度较大,而y坐标的变化幅度很小,因此计算设备130可以选择电警杆210上的点的x坐标和z坐标。Continuing to refer to the example shown in FIG. 3 , when the
在一些实施例中,为了从多个对应点的空间坐标中选择数值变化幅度较大的两个维度上的坐标,进而基于多个第一控制点的像素坐标、以及多个对应点的数值变化幅度较大的两个维度上的坐标来确定上述映射关系,计算设备130可以执行图5所示的方法500。方法500可以被视为上文描述的框430处的动作的一种具体实现。框430处的动作还可以以任何其他适当的方式被付诸实践。为了讨论方便,将参考图1A、图2和图3来描述方法500。In some embodiments, in order to select the coordinates in the two dimensions with large numerical changes from the spatial coordinates of multiple corresponding points, and then based on the pixel coordinates of multiple first control points and the numerical changes of multiple corresponding points The above-mentioned mapping relationship is determined by coordinates in the two dimensions with larger magnitudes, and the
在框510,确定多个对应点的空间坐标在空间坐标系的三个维度上的第一统计结果、第二统计结果和第三统计结果。In
在一些实施例中,上述统计结果包括方差。例如,在图3所示的示例中,计算设备130可以确定多个对应点311、312、313、314和315的y坐标的第一方差、z坐标的第二方差以及x坐标的第三方差。In some embodiments, the above statistical results include variance. For example, in the example shown in FIG. 3 ,
在另一些实施例中,上述统计结果包括分布区间的长度。在这样的实施例中,计算设备130确定多个对应点的空间坐标在空间坐标系的三个维度上的第一分布区间的长度、第二分布区间的长度和第三分布区间的长度。例如,在图3所示的示例中,计算设备130可以确定多个对应点311、312、313、314和315的y坐标的分布区间为从y1到y5(其中y5>y1),即y坐标的分布区间的长度为y5-y1;多个对应点311、312、313、314和315的z坐标的分布区间为从z1到z5(其中z5>z1),即z坐标的分布区间的长度为z5-z1;多个对应点311、312、313、314和315的x坐标的分布区间为从x1到x5(其中x5>x1),即x坐标的分布区间的长度为x5-x1。In some other embodiments, the above statistical results include the length of the distribution interval. In such an embodiment, the
应当理解,以上描述的多个对应点的空间坐标的分布区间仅仅是示例。取决于具体的应用场景,可以采用任何适当的分布区间。本公开的范围在此方面不受限制。It should be understood that the distribution intervals of the spatial coordinates of the multiple corresponding points described above are only examples. Depending on the specific application scenario, any suitable distribution interval may be used. The scope of the present disclosure is not limited in this respect.
在框520,计算设备130将第一统计结果、第二统计结果以及第三统计结果进行比较,以确定第一统计结果和第二统计结果是否均大于第三统计结果。例如,在上述统计结果包括分布区间的长度的实施例中,计算设备130将y坐标的分布区间的长度(y5-y1)、z坐标的分布区间的长度(z5-z1)以及x坐标的分布区间的长度(x5-x1)进行比较。In
如果在框520计算设备130确定第一统计结果和第二统计结果均大于第三统计结果,则意味着多个对应点的空间坐标中的、与第一统计结果和第二统计结果相对应的维度上的坐标的数值变化幅度均大于与第三统计结果相对应的维度上的坐标的数值变化幅度。在这种情况下,在框530,计算设备130基于多个第一控制点的像素坐标、以及多个对应点的与第一统计结果和第二统计结果相对应的维度上的坐标,确定上述映射关系。If the
例如,在上述统计结果包括分布区间的长度的实施例中,如果计算设备130确定y5-y1和z5-z1均大于x5-x1,则计算设备130确定多个对应点的y坐标的分布区间的长度和z坐标的分布区间的长度均大于x坐标的分布区间的长度。进而,计算设备130基于多个第一控制点的像素坐标、以及多个对应点的、与y坐标的分布区间的长度和z坐标的分布区间的长度相对应的维度上的坐标,确定上述映射关系。换言之,计算设备130基于多个第一控制点的像素坐标、以及多个对应点的y坐标和z坐标,确定上述映射关系。For example, in the above embodiment where the statistical results include the length of the distribution interval, if the
另一方面,如果在框520计算设备130确定并非第一统计结果和第二统计结果均大于第三统计结果,则在框540计算设备130基于多个第一控制点的像素坐标、以及多个对应点的与第一统计结果和第三统计结果相对应的维度上的坐标来确定上述映射关系,或者基于多个第一控制点的像素坐标、以及多个对应点的与第二统计结果和第三统计结果相对应的维度上的坐标来确定上述映射关系。On the other hand, if the
具体而言,如果在框520计算设备130确定第一统计结果和第三统计结果均大于第二统计结果,则意味着多个对应点的空间坐标中的、与第一统计结果和第三统计结果相对应的维度上的坐标的数值变化幅度均大于与第二统计结果相对应的维度上的坐标的数值变化幅度。在这种情况下,在框540,计算设备130基于多个第一控制点的像素坐标、以及多个对应点的与第一统计结果和第三统计结果相对应的维度上的坐标来确定上述映射关系。Specifically, if the
例如,在上述统计结果包括分布区间的长度的实施例中,如果计算设备130确定y5-y1和x5-x1均大于z5-z1,则计算设备130确定多个对应点的y坐标的分布区间的长度和x坐标的分布区间的长度均大于z坐标的分布区间的长度。进而,计算设备130基于多个第一控制点的像素坐标、以及多个对应点的、与y坐标的分布区间的长度和x坐标的分布区间的长度相对应的维度上的坐标,确定上述映射关系。换言之,计算设备130基于多个第一控制点的像素坐标、以及多个对应点的y坐标和x坐标,确定上述映射关系。For example, in the above embodiment where the statistical results include the length of the distribution interval, if the
如果在框520计算设备130确定第二统计结果和第三统计结果均大于第一统计结果,则意味着多个对应点的空间坐标中的、与第二统计结果和第三统计结果相对应的维度上的坐标的数值变化幅度均大于与第一统计结果相对应的维度上的坐标的数值变化幅度。在这种情况下,在框540,计算设备130基于多个第一控制点的像素坐标、以及多个对应点的与第二统计结果和第三统计结果相对应的维度上的坐标来确定上述映射关系。If the
例如,在上述统计结果包括分布区间的长度的实施例中,如果计算设备130确定z5-z1和x5-x1均大于y5-y1,则计算设备130确定多个对应点的z坐标的分布区间的长度和x坐标的分布区间的长度均大于y坐标的分布区间的长度。进而,计算设备130基于多个第一控制点的像素坐标、以及多个对应点的、与z坐标的分布区间的长度和x坐标的分布区间的长度相对应的维度上的坐标,确定上述映射关系。换言之,计算设备130基于多个第一控制点的像素坐标、以及多个对应点的z坐标和x坐标,确定上述映射关系。For example, in the above embodiment where the statistical results include the length of the distribution interval, if the
在一些实施例中,上述映射关系包括单应变换关系。出于阐释的目的,在下文中,将以单应变换关系为例来描述如何确定上述映射关系。应当理解,图像111和地图121之间的映射关系可以是任意适当的映射关系。In some embodiments, the above mapping relationship includes a homography transformation relationship. For the purpose of illustration, in the following, how to determine the above mapping relationship will be described by taking the homography transformation relationship as an example. It should be understood that the mapping relationship between the
考虑以下示例。在该示例中,假定参考对象210上的一个第一控制点的像素坐标由u、v表示,该第一控制点在地图121上的对应点的空间坐标由x、y、z表示。此外,还假定计算设备130确定该对应点的空间坐标中的第一坐标(例如y坐标)和第二坐标(例如z坐标)的数值变化幅度较大。在这种情况下,该第一控制点的像素坐标u、v与该对应点的y坐标和z坐标之间满足以下关系:Consider the following example. In this example, it is assumed that the pixel coordinates of a first control point on the
其中H表示单应变换矩阵。具体地,H为3×3的矩阵并且可以表示如下:where H represents the homography transformation matrix. Specifically, H is a 3×3 matrix and can be expressed as follows:
在计算单应变换矩阵H时可以将h33设置为1或者将单应变换矩阵H的模变为1。在这种情况下,H的自由度为八,因此可以通过在参考对象210上和地图121上选择位于同一平面上并且不共线的至少四对对应点,计算单应变换矩阵H。换言之,在参考对象210上选择至少四个第一控制点,该至少四个第一控制点位于第一平面上并且不共线。应当理解,以上描述的单应变换矩阵的各个参数的取值仅仅是示例,而非限制性的。取决于具体的应用场景,单应变换矩阵中的各个参数可以取任何适当的值。When calculating the homography transformation matrix H, h 33 can be set to 1 or the modulus of the homography transformation matrix H can be changed to 1. In this case, H has eight degrees of freedom, so the homography transformation matrix H can be calculated by selecting at least four pairs of corresponding points on the
此外,在某些应用场景中,控制点的位置可能会偏差几个像素,甚至出现控制点对误匹配的情况。如果只使用四对对应点来计算单应变换矩阵H,可能会出现很大的误差。因此,为了使计算更精确,可以选择更多对对应点来计算单应变换矩阵H。例如,在图2的示例中,选择了五个第一控制点211、212、213、214和215。相应地,在图3的示例中,选择了与第一控制点对应的五个对应点311、312、313、314和315。应当理解,尽管图2和图3各自示出了五个控制点,但这仅仅是出于示范目的,而无意于提出任何限制。根据实际需要,在参考对象和地图上可以布置任意适当数目的控制点。In addition, in some application scenarios, the position of the control points may deviate by several pixels, and there may even be cases where control point pairs are mis-matched. If only four pairs of corresponding points are used to calculate the homography transformation matrix H, large errors may occur. Therefore, in order to make the calculation more accurate, more pairs of corresponding points can be selected to calculate the homography transformation matrix H. For example, in the example of FIG. 2 , five first control points 211 , 212 , 213 , 214 and 215 are selected. Accordingly, in the example of FIG. 3 , five
在一些实施例中,可以通过最小二乘拟合、奇异值分解、Levenberg-Marquarat(LM)算法等来计算单应变换矩阵H。可替换地,可以通过开源计算机视觉库(OpenCV)的findHomography()接口来计算单应变换矩阵H。可以使用目前已有的或将来开发的任意适当的方式来计算单应变换矩阵H,本公开的范围在此方面不受限制。In some embodiments, the homography transformation matrix H can be calculated by least square fitting, singular value decomposition, Levenberg-Marquarat (LM) algorithm, and the like. Alternatively, the homography transformation matrix H can be calculated through the findHomography() interface of the open source computer vision library (OpenCV). The homography transformation matrix H can be calculated using any suitable method currently existing or developed in the future, and the scope of the present disclosure is not limited in this respect.
返回到图4。在确定了图像111和地图121之间的映射关系之后,在框440,计算设备130基于目标对象222在图像111中的像素坐标和上述映射关系,确定目标对象222的空间坐标。Return to Figure 4. After determining the mapping relationship between the
在本公开的各种实施例中,不需要像激光雷达测量和倾斜摄影技术那样对包含参考对象的整个区域进行重新扫描建图,以确定目标对象在地图中的空间坐标。因而,可以大幅缩短确定目标对象的空间坐标所需的时间。此外,由于不需要采用激光雷达测量和倾斜摄影技术,因而不需要依赖于专业的操作人员来执行根据本公开的实施例的方法。In various embodiments of the present disclosure, it is not necessary to perform rescanning and mapping of the entire area containing the reference object to determine the spatial coordinates of the target object in the map, as in lidar surveying and oblique photography techniques. Thus, the time required to determine the spatial coordinates of the target object can be greatly shortened. In addition, there is no need to rely on professional operators to perform the method according to the embodiments of the present disclosure since lidar measurement and oblique photography techniques are not required.
在基于多个第一控制点的像素坐标、以及多个对应点的数值变化幅度较大的两个维度上的坐标来确定上述映射关系的实施例中,计算设备130可以基于目标对象222的像素坐标和上述映射关系,确定目标对象222的空间坐标中的数值变化幅度较大的两个维度上的坐标。例如,在确定第一统计结果和第二统计结果均大于第三统计结果的实施例中,计算设备130可以基于目标对象222的像素坐标和上述映射关系,确定目标对象222的、与上述第一统计结果相对应的维度上的第一坐标以及与上述第二统计结果相对应的维度上的第二坐标。In the embodiment in which the above-mentioned mapping relationship is determined based on the pixel coordinates of multiple first control points and the coordinates of multiple corresponding points in two dimensions in which the values vary greatly, the
例如,在上述映射关系为单应变换关系的实施例中,计算设备130可以基于目标对象222的像素坐标和单应变换矩阵H,确定目标对象222的第一坐标和第二坐标。例如,计算设备130可以利用上述式(1),确定目标对象222的第一坐标(例如y坐标)和第二坐标(例如z坐标)。For example, in the above embodiment where the mapping relationship is a homography transformation relationship, the
在一些实施例中,目标对象222的空间坐标进一步包括与上述第三统计结果相对应的维度上的第三坐标。多个对应点的空间坐标包括多个对应点的、与上述第一统计结果相对应的维度上的第一坐标以及与第三统计结果相对应的维度上的第三坐标。在一些实施例中,在确定了目标对象222的第一坐标和第二坐标后,计算设备130可以通过执行图6所示的方法600来确定目标对象222的第三坐标。为了讨论方便,将参考图1A、图2和图3来描述方法600。In some embodiments, the spatial coordinates of the
在框610,计算设备130从多个对应点中选择至少两个对应点。所选择的至少两个对应点与目标对象222在地图121中共线。例如,在图3所示的示例中,由于在地图121中对应点311、312、313与目标对象222共线,因此计算设备130可以从对应点311、312、313、314和315中选择对应点311、312、313。At
在一些实施例中,为了使目标对象222的第三坐标的计算更精确,计算设备130可以从所选择的至少两个对应点的第一坐标和第二坐标中选择数值变化幅度较大的一个维度上的坐标。进而,计算设备130可以基于至少两个对应点的所选择的维度上的坐标、至少两个对应点的第三坐标、以及目标对象222在所选择的维度上的坐标,确定目标对象222的第三坐标。In some embodiments, in order to make the calculation of the third coordinate of the
在一些实施例中,为了从所选择的至少两个对应点的第一坐标和第二坐标中选择数值变化幅度较大的一个维度上的坐标,计算设备130可以采用与从多个对应点的空间坐标中选择数值变化幅度较大的两个维度上的坐标类似的方式。In some embodiments, in order to select a coordinate in a dimension with a larger value change range from the first coordinates and second coordinates of the selected at least two corresponding points, the
具体地,在框620,计算设备130将至少两个对应点的空间坐标的第一统计结果和第二统计结果进行比较。如果在框620计算设备130确定第一统计结果大于第二统计结果,则在框630计算设备130基于至少两个对应点的第一坐标和第三坐标、以及目标对象222的第一坐标,确定目标对象222的第三坐标。Specifically, at
例如,计算设备130可以比较至少两个对应点的第一坐标的第一方差和第二坐标的第二方差。如果第一方差大于第二方差,则计算设备130可以确定至少两个对应点的第一坐标的数值变化幅度大于第二坐标的数值变化幅度。进而,计算设备130选择至少两个对应点的第一坐标。For example,
可替换地,计算设备130可以比较至少两个对应点的第一分布区间的长度和第二分布区间的长度。如果第一分布区间的长度大于第二分布区间的长度,则计算设备130可以确定至少两个对应点的第一坐标的数值变化幅度大于第二坐标的数值变化幅度。进而,计算设备130选择至少两个对应点的第一坐标。Alternatively, the
考虑图3所示的示例。假定计算设备130选择了对应点311、312、313并且已经确定了目标对象222的y坐标和z坐标。当电警杆210位于东方向时,对应点311、312、313的y坐标的变化幅度大于z坐标的变化幅度。在这种情况下,计算设备130可以选择对应点311、312、313的y坐标。进而,计算设备130可以基于对应点311、312、313的y坐标和x坐标、以及目标对象222的y坐标,确定目标对象222的x坐标。Consider the example shown in Figure 3. Assume that
如前所述,所选择的至少两个对应点与目标对象222在地图121中基本上共线。因此,至少两个对应点和目标对象222各自的第一坐标和第三坐标之间满足线性关系。此外,由于至少两个对应点的第一坐标和第三坐标是已知的,因此计算设备130可以基于至少两个对应点的第一坐标和第三坐标,确定该线性关系。进而,计算设备130可以基于该线性关系和目标对象222的第一坐标,确定目标对象222的第三坐标。As previously mentioned, the selected at least two corresponding points are substantially collinear with the
在一些实施例中,为了确定上述线性关系,计算设备130可以基于至少两个对应点各自的第一坐标和第三坐标来拟合直线方程。可以使用目前已有的或将来开发的任意适当的方式来拟合直线方程,本公开的范围在此方面不受限制。In some embodiments, in order to determine the above-mentioned linear relationship, the
可以理解,根据本公开的各种实施例的确定目标对象的空间坐标的方法,可以在安装了参考对象之后,针对与参考对象相关联的多个目标对象并行地执行,而无需在多个目标对象安装和调试之后针对每个目标对象单独地执行。由此,提高了确定多个目标对象的空间坐标的效率,大幅降低了工程难度。It can be understood that the method for determining the spatial coordinates of a target object according to various embodiments of the present disclosure can be executed in parallel for multiple target objects associated with the reference object after the reference object is installed, without Executed individually for each target object after object installation and commissioning. As a result, the efficiency of determining the spatial coordinates of multiple target objects is improved, and the engineering difficulty is greatly reduced.
以上参考图2描述了将本公开的实施例应用于确定在空间区域中新增加的交通监控设备222的空间坐标的场景。除此之外,本公开的实施例还可以应用于确定高层建筑物表面的高层部分的空间坐标的场景。下文将结合图7进行详细描述。The above describes the scenario of applying the embodiments of the present disclosure to determine the spatial coordinates of the newly added
图7示出了根据本公开的另一些实施例的示例图像700的示意图。在此示例中,图像700是一个建筑物表面的图像。FIG. 7 shows a schematic diagram of an
如图7所示,图像700包括建筑物表面的高层部分710(也被称作第一部分)和低层部分720(也被称作第二部分)。高层部分710包括“XXX”图标。在此示例中,目标对象为高层部分710,参考对象为低层部分720。As shown in FIG. 7 ,
为了确定高层部分710的空间坐标,计算设备130可以从图像捕获装置110获取图像700并且从地图数据库120获取与图像700匹配的地图(未示出)的地图数据。该地图数据中包括低层部分720的空间坐标。计算设备130根据低层部分720在图像700中的像素坐标和低层部分720的空间坐标,确定图像700和上述地图之间的映射关系。在一些实施例中,计算设备130可以通过执行上文描述的方法500来确定上述映射关系。方法500的具体细节在此不再赘述。To determine the spatial coordinates of high-
在确定了上述映射关系后,计算设备130基于高层部分710在图像700中的像素坐标和上述映射关系,确定高层部分710的空间坐标。例如,在上述映射关系为单应变换关系的实施例中,计算设备130可以利用上述式(1),确定高层部分710的第一坐标和第二坐标。进而,计算设备130可以通过执行上文描述的方法600来确定高层部分710的第三坐标。方法600的具体细节在此不再赘述。After the above mapping relationship is determined, the
应当理解,以上仅仅作为示例描述了确定包括“XXX”图标的高层部分710的空间坐标的过程。然而,本公开的实施例还可以应用于确定高层建筑物表面的高层部分的任意位置的空间坐标。It should be understood that the process of determining the spatial coordinates of the high-
可以理解,目前在进行地图数据采集时,通过激光雷达测量和倾斜摄影等技术通常很难确定高层建筑物表面的高层部分的空间坐标。然而,利用本公开的实施例可以更方便、快速地确定高层建筑物表面的高层部分的空间坐标。It can be understood that it is usually difficult to determine the spatial coordinates of the high-rise part of the surface of a high-rise building through technologies such as lidar measurement and oblique photography when collecting map data. However, the spatial coordinates of the high-rise part of the high-rise building surface can be determined more conveniently and quickly by using the embodiments of the present disclosure.
图8示出了本公开提供的装置800的示意框图。如图所示,装置800包括获取单元132、映射关系确定单元134和空间坐标确定单元136。应理解,在一些实施例中,装置800可以是前述图2中的计算设备130或者是计算设备130的一部分。FIG. 8 shows a schematic block diagram of an
获取单元132被配置为获取图像。该图像记录了一个空间区域中的目标对象和参考对象。在一些实施例中,获取单元132可以从图像捕获装置110获取该图像。在另一些实施例中,获取单元132可以通过网络获取用户上传的图像。在又一些实施例中,获取单元132可以从存储设备(例如图1A所示的存储设备140)获取图像。The acquiring
获取单元132还被配置为获取地图。该地图包括地图数据,该地图数据中包括参考对象的空间坐标。在一些实施例中,获取单元132可以从地图数据库120获取该地图。The obtaining
在一些实施例中,计算设备130可以进一步包括存储单元(未示出),被配置为存储图像和地图。在这样的实施例中,获取单元132可以从该存储单元获取图像和地图。In some embodiments,
映射关系确定单元134被配置为根据参考对象在图像中的像素坐标和参考对象的空间坐标,确定图像和地图之间的映射关系。The mapping
空间坐标确定单元136被配置为基于目标对象在图像中的像素坐标和映射关系,确定目标对象的空间坐标。The spatial coordinate determining
在一些实施例中,装置800还包括更新单元,被配置为将目标对象的空间坐标更新至地图数据。In some embodiments, the
在一些实施例中,目标对象包括:对空间区域进行地图数据采集之后,在空间区域中新增的实体;参考对象包括:对空间区域进行地图数据采集前,在空间区域中存在的实体。In some embodiments, the target object includes: entities newly added in the spatial region after map data collection is performed on the spatial region; reference objects include: entities existing in the spatial region before map data collection is performed on the spatial region.
在一些实施例中,目标对象包括空间区域中建筑物的第一部分,参考对象包括建筑物的第二部分;第一部分由采集地图数据的数据采集设备采集到,第二部分未由数据采集设备采集到。In some embodiments, the target object includes a first part of a building in the spatial region, and the reference object includes a second part of the building; the first part is collected by a data collection device that collects map data, and the second part is not collected by the data collection device arrive.
在一些实施例中,映射关系确定单元134还被配置为根据参考对象上的多个第一控制点的像素坐标与多个第一控制点在地图中的对应点的空间坐标,确定图像和地图之间的映射关系。In some embodiments, the mapping
上述三个单元之间互相可通过通信通路进行数据传输,应理解,装置800包括的各单元可以为软件单元、也可以为硬件单元、或部分为软件单元部分为硬件单元。The above three units can perform data transmission with each other through communication channels. It should be understood that each unit included in the
图9示出了能够实施本公开的实施例的计算设备900的框图。如图9所示,计算设备900包括:处理器910、通信接口920以及存储器930,所示处理器910、通信接口920以及存储器930通过内部总线940相互连接。应理解,该计算设备900可以为云环境中的计算设备,或边缘环境中的计算设备。FIG. 9 shows a block diagram of a
处理器910可以由一个或者多个通用处理器构成,例如中央处理器(centralprocessing unit,CPU),或者CPU和硬件芯片的组合。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC)、可编程逻辑器件(programmablelogic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complexprogrammable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gatearray,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。The
总线940可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线940可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但不表示仅有一根总线或一种类型的总线。The
存储器930可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM);存储器930也可以包括非易失性存储器(non-volatilememory),例如只读存储器(read-only memory,ROM)、快闪存储器(flash memory)、硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器930还可以包括上述种类的组合。The
需要说明的是,计算设备900的存储器930中存储了装置800的各个单元对应的代码,处理器910执行这些代码实现了装置800的各个单元的功能,即执行了框410至440处的方法。It should be noted that the
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机执行指令时,全部或部分地产生按照本申请上述实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using a software program, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When computer-executed instructions are loaded and executed on a computer, the processes or functions according to the above-mentioned embodiments of the present application are produced in whole or in part. A computer can be a general purpose computer, special purpose computer, computer network, or other programmable device. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g. Coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer, or may contain one or more data storage devices such as servers and data centers that can be integrated with the medium. Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (solid state disk, SSD)) and the like.
此外,虽然采用特定次序描绘了各操作,但是这应当理解为要求这样操作以所示出的特定次序或以顺序次序执行,或者要求所有图示的操作应被执行以取得期望的结果。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实现中。相反地,在单个实现的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实现中。In addition, while operations are depicted in a particular order, this should be understood to require that such operations be performed in the particular order shown, or in sequential order, or that all illustrated operations should be performed to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while the above discussion contains several specific implementation details, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010527544.9A CN113804100B (en) | 2020-06-11 | 2020-06-11 | Method, device, device and storage medium for determining spatial coordinates of a target object |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010527544.9A CN113804100B (en) | 2020-06-11 | 2020-06-11 | Method, device, device and storage medium for determining spatial coordinates of a target object |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113804100A CN113804100A (en) | 2021-12-17 |
CN113804100B true CN113804100B (en) | 2023-02-10 |
Family
ID=78943722
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010527544.9A Active CN113804100B (en) | 2020-06-11 | 2020-06-11 | Method, device, device and storage medium for determining spatial coordinates of a target object |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113804100B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114528358A (en) * | 2021-12-27 | 2022-05-24 | 广州市公共交通集团有限公司 | Multi-device heterogeneous data fusion method, system, device and storage medium |
CN114838704A (en) * | 2022-04-28 | 2022-08-02 | 杭州海康威视系统技术有限公司 | Height detection method and device and computer readable storage medium |
CN114926523B (en) * | 2022-05-06 | 2025-03-18 | 杭州海康威视系统技术有限公司 | A method and device for measuring building height |
CN115984366A (en) * | 2022-05-31 | 2023-04-18 | 中兴通讯股份有限公司 | Positioning method, electronic device, storage medium, and program product |
CN118376257B (en) * | 2024-06-20 | 2024-10-01 | 富盛科技股份有限公司 | Urban traffic path planning method, device, equipment and medium |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101620671B (en) * | 2009-08-14 | 2012-05-09 | 华中科技大学 | Method for indirectly positioning and identifying three-dimensional buildings by using riverway landmarks |
JP6758903B2 (en) * | 2016-05-06 | 2020-09-23 | キヤノン株式会社 | Information processing equipment, information processing methods, programs, systems, and article manufacturing methods |
CN108921894B (en) * | 2018-06-08 | 2021-06-29 | 百度在线网络技术(北京)有限公司 | Object positioning method, device, equipment and computer readable storage medium |
CN110119698B (en) * | 2019-04-29 | 2021-08-10 | 北京百度网讯科技有限公司 | Method, apparatus, device and storage medium for determining object state |
CN110378965B (en) * | 2019-05-21 | 2022-04-15 | 北京百度网讯科技有限公司 | Method, device and equipment for determining coordinate system conversion parameters of road side imaging equipment |
CN110926453A (en) * | 2019-11-05 | 2020-03-27 | 杭州博信智联科技有限公司 | Obstacle positioning method and system |
CN111046762A (en) * | 2019-11-29 | 2020-04-21 | 腾讯科技(深圳)有限公司 | Object positioning method, device electronic equipment and storage medium |
CN111105461B (en) * | 2019-12-27 | 2023-05-09 | 万翼科技有限公司 | Positioning device, positioning method based on space model and readable storage medium |
-
2020
- 2020-06-11 CN CN202010527544.9A patent/CN113804100B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN113804100A (en) | 2021-12-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113804100B (en) | Method, device, device and storage medium for determining spatial coordinates of a target object | |
KR102273559B1 (en) | Method, apparatus, and computer readable storage medium for updating electronic map | |
JP6831414B2 (en) | Methods for positioning, devices, devices and computers for positioning Readable storage media | |
CN113034566B (en) | High-precision map construction method and device, electronic equipment and storage medium | |
US9092899B1 (en) | Automatic method for photo texturing geolocated 3D models from geolocated imagery | |
CN112069856A (en) | Map generation method, driving control method, device, electronic device and system | |
CN113012215B (en) | Space positioning method, system and equipment | |
US20170039450A1 (en) | Identifying Entities to be Investigated Using Storefront Recognition | |
RU2612571C1 (en) | Method and system for recognizing urban facilities | |
CN111914049A (en) | Method for mapping longitude and latitude coordinates and image coordinates | |
Díaz et al. | An algorithm to estimate building heights from Google street-view imagery using single view metrology across a representational state transfer system | |
Son et al. | Optimal flight parameters for unmanned aerial vehicles collecting spatial information for estimating large-scale waste generation | |
RU2638638C1 (en) | Method and system of automatic constructing three-dimensional models of cities | |
US9852542B1 (en) | Methods and apparatus related to georeferenced pose of 3D models | |
CN115797438A (en) | Object positioning method, device, computer equipment, storage medium and program product | |
Liang et al. | Efficient match pair selection for matching large-scale oblique UAV images using spatial priors | |
CN117192075B (en) | Soil and water conservation monitoring method and system using drones in highway construction scenarios | |
Mihoković et al. | Establishing the utility charges spatial database using digital twin technology | |
CN107833278B (en) | Terrain simulation method and device and electronic equipment | |
CN116823966A (en) | Internal reference calibration method and device for camera, computer equipment and storage medium | |
CN114051627A (en) | Camera Calibration Method | |
CN107507236B (en) | The progressive space-time restriction alignment schemes of level and device | |
WO2023035296A1 (en) | A camera calibration method | |
Temba et al. | Building vectorization inside a favela utilizing lidar spot elevation | |
CN114581621B (en) | Map data processing method, device, electronic equipment and medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |