I have a project where I need to read in an image of a maze and use a graph data structure to find certain points in the maze to place nodes and trace edges. I plan to have the maze be in only two different colors. The walls/background as red and the maze path as white.
I'm not sure what I can do about parsing an image to find intersections, dead-ends, and turns to place nodes. If I recall, you can place each pixel of the image into a 2D array and search through the image that way (or something like this), but would this be easy to do, or is there an easier way to determine node placements of intersections, dead-ends, and turns?
Any help would be much appreciated. I want to plan as much as possible before I code so I don't waste time.
Thanks in advance!