How to Represent Maze of Pixels as Nodes
How would you go about simplifying a maze that is represented in terms of pixels into nodes based on the same color? I'm wring a program that solves a maze (represented as an image) using A* Algorithm. The walls are represented as black pixels and the rest as white pixels. However, I'm worried that the space complexity will be very high for large mazes. Therefore I'm trying to come up with a way to maybe group pixels of the same color together in order to create a graph of nodes which represents the entire matrix. That way when I run A* I can go node by node instead of pixel by pixel which is much more simple.
链接地址: http://www.djcxy.com/p/79622.html上一篇: 迷宫图像操作,修剪空白
下一篇: 如何将像素的迷宫表示为节点