CN107480804B - 一种基于线面空间关系的迷宫求解方法 - Google Patents

一种基于线面空间关系的迷宫求解方法 Download PDF

Info

Publication number
CN107480804B
CN107480804B CN201710462640.8A CN201710462640A CN107480804B CN 107480804 B CN107480804 B CN 107480804B CN 201710462640 A CN201710462640 A CN 201710462640A CN 107480804 B CN107480804 B CN 107480804B
Authority
CN
China
Prior art keywords
line
channel
maze
point
polygon
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
Application number
CN201710462640.8A
Other languages
English (en)
Other versions
CN107480804A (zh
Inventor
魏金占
陈明辉
黄远林
王生
李奕明
魏鑫
邓凯
陶进
覃伟荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangxi return line Mdt InfoTech Ltd
Original Assignee
Guangxi Return Line Mdt Infotech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangxi Return Line Mdt Infotech Ltd filed Critical Guangxi Return Line Mdt Infotech Ltd
Priority to CN201710462640.8A priority Critical patent/CN107480804B/zh
Publication of CN107480804A publication Critical patent/CN107480804A/zh
Priority to PCT/CN2018/078129 priority patent/WO2018233318A1/zh
Priority to US16/475,943 priority patent/US10970890B2/en
Application granted granted Critical
Publication of CN107480804B publication Critical patent/CN107480804B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/56Information retrieval; Database structures therefor; File system structures therefor of still image data having vectorial format
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5854Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using shape and object relationship
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/587Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Library & Information Science (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Remote Sensing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

本发明旨在提供一种基于线面空间关系的迷宫求解方法,包括以下步骤:A、提取出通道面状数据;B、将通道面状数据转换为通道边界线;C、从起点处、终点处的两个端点分别向迷宫外两侧伸出延长线,在延长线上设有有基点,在迷宫外部,构建连通起点与终点的基点的虚拟连线Ⅰ与虚拟连线Ⅱ;D、将虚拟连线Ⅰ、虚拟连线Ⅱ分别与迷宫的通道边界线围成多边形Ⅰ、多边形Ⅱ,位于多边形Ⅰ与多边形Ⅱ之间的连通起点与终点的路径,即为迷宫的备选解路径;E、选取长度最短的备选解路径作为迷宫的最优解路径。本发明基通道数据线和空间拓扑构面实现迷宫求解,具有原理简单,实现效率高,可以取得最优通达路径的特点,非常适用于类似障碍物环境下路径搜索。

Description

一种基于线面空间关系的迷宫求解方法
技术领域
本发明涉及计算机图形学与地理信息科学领域,具体涉及一种基于线面空间关系的迷宫求解方法。
背景技术
迷宫路径解算自古就是数学与计算机图形学的研究热点,但是传统的迷宫路径解算多从图论及数学角度,其搜索效率和准确度都不尽人意。特别是当迷宫的复杂程度达到一定级别,计算机和传统算法将无能为力。
迷宫解算属于障碍物环境下路径搜索问题,因此传统的路径搜索方法适用于迷宫路径结算。但鉴于迷宫解算的特殊性如死路环境下的自动过滤等未作考虑,因此研究中很少有学者将传统的路径搜索方法用于迷宫路径结算;同时,传统迷宫算法通常利用迷宫路径中线进行求解,而当迷宫复杂度较高时,提取路径中线将带来极大的运算量,大大降低迷宫求解的效率。
发明内容
本发明旨在提供一种基于线面空间关系的迷宫求解方法,其主要通过通道数据线和空间拓扑关系实现,其技术方案如下:
一种基于线面空间关系的迷宫求解方法,包括以下步骤:
A、通过栅格-矢量转换将迷宫图片转换为矢量数据,提取出通道面状数据;
B、将通道面状数据转换为通道边界线,将起点、终点处的通道边界线去除,使得起点、终点处的通道开放;
C、从起点处的两个端点分别向迷宫外两侧伸出延长线,在起点延长线上分别有基点X1、X2;从终点处的两个端点分别向迷宫外两侧伸出延长线,在起点延长线上分别有基点Y1、Y2;在迷宫外部,构建连通基点X1和基点Y1的线框得到虚拟连线Ⅰ,构建连通基点X2和基点Y2的线框得到虚拟连线Ⅱ,其中虚拟连线Ⅰ与虚拟连线Ⅱ不存在交叉点;
D、将虚拟连线Ⅰ与迷宫的通道边界线围成的部位作为多边形Ⅰ,将虚拟连线Ⅱ与迷宫的通道边界线围成的部位作为多边形Ⅱ;
位于多边形Ⅰ与多边形Ⅱ之间的连通起点与终点的路径,即为迷宫的备选解路径;
E、对得到的迷宫的备选解路径进行路径长度分析,长度最短的作为迷宫的最优解路径。
优选地,所述步骤A包括以下步骤:
A1、将图片去色,转换为黑白图像;
A2、栅矢转换,将图片转换为矢量数据;
A3、根据颜色值反算出黑白颜色深度;
A4、根据颜色深度求出通道部分;
A5、将通道部分合并,得到通道面状数据。
本发明通过将迷宫路径求解扩展到空间拓扑分析领域,通过提取迷宫的路径通道面状数据,结合线面关系,求解出迷宫路径;与传统算法相比,省去了提取迷宫路径中线的步骤,大大降低了运算量与运算时间;还具有原理简单,易于实现,高效稳定的特点,同时也可以在迷宫路径发生变更时,仅通过微调对应部分的通道数据即可完成,不需要进行全局搜索,大大节约数据处理的难度、成本和时间,在民用及军用领域都具有巨大应用潜力。
附图说明
图1为本发明一种基于线面空间关系的迷宫求解方法的流程示意图
图2为本发明实施例1的迷宫示意图
图3为本发明实施例1的通道面状数据示意图
图4为本发明的实施例1的通道边界线(起点、终点未开放)示意图
图5为本发明的实施例1的通道边界线(起点、终点开放)示意图
图6为本发明的实施例1的多边形Ⅰ与多边形Ⅱ的示意图
图7为本发明的实施例1的最优解路径示意图
图中各部分名称及序号如下:
1为虚拟连线Ⅰ,2为虚拟连线Ⅱ,3为多边形Ⅰ,4为多边形Ⅱ,5为备选解路径5。
具体实施方式
下面结合实施例详细阐述本发明。
实施例1
本实施例一种基于线面空间关系的迷宫求解方法,包括以下步骤:
本实施例迷宫路径结算过程,运行平台为PC上的Windows 7操作系统,地理信息系统平台为北京超图地理信息平台软件5.3.3版本。
包括以下步骤:
如图1所示,本实施例提供的基于线面空间关系的迷宫求解方法,包括以下步骤:
A、通过栅格-矢量转换将迷宫图片转换为矢量数据,提取出通道面状数据,如图3所示;
具体为:
A1、将图片去色,转换黑白图像;
A2、在北京超图地理信息平台进行栅矢转换,将图片转换为面状矢量数据;
A3、根据颜色值Value,通过Value=R*256*256+G*256+B进行计算,转换为黑白图像后R=G=B,Value=65793R,从而反算出黑白颜色深度R;
A4、根据颜色深度R通过北京超图地理信息平台数据库进行查询,得到通道部分的数据;
A5、通过北京超图地理信息平台将通道部分的数据进行合并,得到通道面状数据;
B、将通道面状数据转换为通道边界线,如图4所示,将起点A、终点B处的通道边界线去除,使得起点A、终点B处的通道开放,如图5所示;
C、从起点A处的两个端点分别向迷宫外两侧伸出延长线,在起点A延长线上分别有基点X1、X2;从终点B处的两个端点分别向迷宫外两侧伸出延长线,在起点A延长线上分别有基点Y1、Y2;在迷宫外部,构建连通基点X1和基点Y1的线框得到虚拟连线Ⅰ1,构建连通基点X2和基点Y2的线框得到虚拟连线Ⅱ2,其中虚拟连线Ⅰ与虚拟连线Ⅱ不存在交叉点,如图6所示;
D、将虚拟连线Ⅰ与迷宫的通道边界线围成的部位作为多边形Ⅰ3,将虚拟连线Ⅱ与迷宫的通道边界线围成的部位作为多边形Ⅱ4;
位于多边形Ⅰ3与多边形Ⅱ4之间的连通起点A与终点B的路径,即为迷宫的备选解路径5,如图7所示;
E、对得到的迷宫的备选解路径进行路径长度分析,长度最短的作为迷宫的最优解路径,本实施例中迷宫的备选解路径为1条,该路径即为迷宫的最优解路径。

Claims (3)

1.一种基于迷宫求解的障碍物环境下最短路径求解方法,其特征在于包括以下步骤:
A、通过栅格-矢量转换将迷宫图片转换为矢量数据,提取出通道面状数据;
B、将通道面状数据转换为通道边界线图,将通道边界线图中起点、终点处的通道边界线去除,使得起点、终点处的通道开放,起点处形成通道线起点I和通道线起点Ⅱ,终点处形成通道线终点I和通道线终点Ⅱ;
C、从起点处的通道线起点I和通道线起点Ⅱ分别向迷宫外两侧伸出延长线,在通道线起点I的延长线上有基点X1,在通道线起点Ⅱ的延长线上有基点X2;从终点处的通道线终点I和通道线终点Ⅱ分别向迷宫外两侧伸出延长线,在通道线终点I的延长线上有基点Y1,在通道线终点Ⅱ上的延长线有基点Y2;在迷宫外部,构建连通基点X1和基点Y1的线框得到从通道线起点I至通道线终点I的虚拟连线Ⅰ,构建连通基点X2和基点Y2的线框得到从通道线起点Ⅱ至通道线终点Ⅱ的虚拟连线Ⅱ,其中虚拟连线Ⅰ与通道线起点Ⅱ的延长线和通道线终点Ⅱ的延长线均没有交叉点,虚拟连线Ⅱ与通道线起点I的延长线和通道线终点I的延长线均没有交叉点;
D、构建经过迷宫起点和迷宫终点的直线G,
在虚拟连线Ⅰ与直线G包裹范围内,将通道边界线与虚拟连线Ⅰ构建虚拟连线多边形Ⅰ;
在虚拟连线Ⅱ与直线G包裹范围内,将通道边界线与虚拟连线Ⅱ构建虚拟连线多边形Ⅱ;
若虚拟连线多边形Ⅰ、虚拟连线多边形Ⅱ均构建失败,则该迷宫无解,求解结束;
若虚拟连线多边形Ⅰ、虚拟连线多边形Ⅱ均构建成功,则该迷宫有解,进入步骤E;
E、根据线面关系,对左虚拟连线和/或右虚拟连线取中连接迷宫起点和迷宫终点的路径进行对比选择,取其中最短者为迷宫解。
2.如权利要求1所述的基于迷宫求解的障碍物环境下最短路径求解方法,其特征在于:
所述步骤A包括以下步骤:
A1、将图片去色,转换为黑白图像;
A2、栅矢转换,将图片转换为矢量数据;
A3、根据颜色值反算出黑白颜色深度;
A4、根据颜色深度求出通道部分;
A5、将通道部分合并,得到通道面状数据。
3.如权利要求1所述的基于迷宫求解的障碍物环境下最短路径求解方法,其特征在于:
所述的步骤E包括以下步骤:
E1、将虚拟连线多边形Ⅰ进行合并,得到包含通道线起点I和通道线终点I的合并多边形Ⅰ;将虚拟连线多边形Ⅱ进行合并,得到包含通道线起点Ⅱ和通道线终点Ⅱ的合并多边形Ⅱ;
E2、若合并多边形Ⅰ和合并多边形Ⅱ共边,则共边即为最终所求的迷宫解的通道边界线,若不一致进入下一步;
E3、判定合并多边形Ⅰ和合并多边形Ⅱ中不包含虚拟连线Ⅰ、虚拟连线Ⅱ的连接起点终点的通道边界线中长度较小者;
E4、根据同样原则对求得的通道边界线中经过的每个多边形进行判定,获取每个多边形中该通道边界线两端点间的距离较小者;
E5、将以上搜索结果首尾相连,得到连接起点终点的路径即为迷宫解的通道边界线。
CN201710462640.8A 2017-06-19 2017-06-19 一种基于线面空间关系的迷宫求解方法 Active CN107480804B (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201710462640.8A CN107480804B (zh) 2017-06-19 2017-06-19 一种基于线面空间关系的迷宫求解方法
PCT/CN2018/078129 WO2018233318A1 (zh) 2017-06-19 2018-03-06 一种基于线面空间关系的迷宫求解方法
US16/475,943 US10970890B2 (en) 2017-06-19 2018-03-06 Maze solving method based on line-surface spatial relation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710462640.8A CN107480804B (zh) 2017-06-19 2017-06-19 一种基于线面空间关系的迷宫求解方法

Publications (2)

Publication Number Publication Date
CN107480804A CN107480804A (zh) 2017-12-15
CN107480804B true CN107480804B (zh) 2020-04-14

Family

ID=60594729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710462640.8A Active CN107480804B (zh) 2017-06-19 2017-06-19 一种基于线面空间关系的迷宫求解方法

Country Status (3)

Country Link
US (1) US10970890B2 (zh)
CN (1) CN107480804B (zh)
WO (1) WO2018233318A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107480804B (zh) 2017-06-19 2020-04-14 广西回归线信息科技有限公司 一种基于线面空间关系的迷宫求解方法
WO2021063983A1 (en) * 2019-09-30 2021-04-08 Pre Framing Corp. Computer-aided design methods and systems

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6545288B1 (en) * 2001-03-08 2003-04-08 Lsi Logic Corporation Gridless router using maze and line probe techniques
CN103116356A (zh) * 2013-03-06 2013-05-22 山东大学 一种迷宫搜索的方法
CN104731099A (zh) * 2015-03-18 2015-06-24 深圳市八零年代网络科技有限公司 一种迷宫最短路径的搜索方法及系统
CN105512169A (zh) * 2016-03-10 2016-04-20 珠海市规划设计研究院 基于路径和权的最短路径搜索方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107480804B (zh) * 2017-06-19 2020-04-14 广西回归线信息科技有限公司 一种基于线面空间关系的迷宫求解方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6545288B1 (en) * 2001-03-08 2003-04-08 Lsi Logic Corporation Gridless router using maze and line probe techniques
CN103116356A (zh) * 2013-03-06 2013-05-22 山东大学 一种迷宫搜索的方法
CN104731099A (zh) * 2015-03-18 2015-06-24 深圳市八零年代网络科技有限公司 一种迷宫最短路径的搜索方法及系统
CN105512169A (zh) * 2016-03-10 2016-04-20 珠海市规划设计研究院 基于路径和权的最短路径搜索方法

Also Published As

Publication number Publication date
WO2018233318A1 (zh) 2018-12-27
CN107480804A (zh) 2017-12-15
US20190347835A1 (en) 2019-11-14
US10970890B2 (en) 2021-04-06

Similar Documents

Publication Publication Date Title
CN110887502B (zh) 一种必经结点最短路径搜索方法
CN106767819B (zh) 一种基于bim的室内导航数据构建方法及导航系统
CN111462275A (zh) 一种基于激光点云的地图生产方法和装置
Wei et al. Graph convolutional networks for the automated production of building vector maps from aerial images
US11367195B2 (en) Image segmentation method, image segmentation apparatus, image segmentation device
US11967132B2 (en) Lane marking detecting method, apparatus, electronic device, storage medium, and vehicle
CN109154938B (zh) 使用离散非踪迹定位数据将数字图中的实体分类
CN111090712A (zh) 一种数据处理方法、装置、设备及计算机存储介质
CN114724117B (zh) 车道线关键点数据生成方法、装置、电子设备及存储介质
CN113390407A (zh) 车道级导航地图的构建方法、装置、设备以及存储介质
CN115375868B (zh) 地图显示和遥感地图显示方法、计算设备以及存储介质
KR20220150240A (ko) 고정밀 지도 구축 방법, 장치 및 전자 기기
CN107480804B (zh) 一种基于线面空间关系的迷宫求解方法
CN114627257A (zh) 三维路网地图的构建方法、装置、电子设备和存储介质
CN115641415A (zh) 基于卫星影像生成三维场景的方法、装置、设备及介质
CN107423360B (zh) 一种基于路径中线的迷宫求解方法
CN114509085B (zh) 一种结合栅格和拓扑地图的快速路径搜索方法
Mao et al. City object detection from airborne Lidar data with OpenStreetMap‐tagged superpixels
Kikuchi et al. A data structure for triangular dissection of multi-resolution images
CN108132992B (zh) 一种人员信息基础地址编码方法、系统及电子设备
Chen et al. Large-Scale Urban Road Vectorization Mapping Via A Road Node Proposal Network for High-Resolution Remote Sensing Imagery
CN110728723A (zh) 一种面向瓦片地图的道路自动提取方法
KR102643538B1 (ko) 자율주행 환경에서 이종 센서 데이터 간 오토 캘리브레이션 방법, 장치 및 컴퓨터프로그램
Cheng Global-feature enhanced network for fast semantic segmentation
CN113378922B (zh) 一种基于GeoHash的地理坐标点密度聚类方法

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
TA01 Transfer of patent application right

Effective date of registration: 20180109

Address after: 530022 the Guangxi Zhuang Autonomous Region high tech Zone in Nanning City, two South Road No. 5 Hua Chengdu city B block 08 layer 06

Applicant after: Guangxi return line Mdt InfoTech Ltd

Address before: Nanning City Branch Park Avenue 530022 No. 49 the Guangxi Zhuang Autonomous Region Jin Yu Metro Building 4 unit B 2 layer 202.

Applicant before: Guangxi Silver Technology Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant