2

enter image description hereHai I am developing a robot for shortest path finding. This system consists of the mobile robot, trajectory planner, motion controller, visual sensor (CCD camera), ZigBee wireless communication device and a maze terrain. The camera is used to capture images of the mobile robot within the maze. Developed image processing and analyzing algorithms determine the robot’s position and orientation based on color markers recognition.I am developing its software part in java.

My aim is to create a graph of conected nodes from captured image.And apply shortest path algorthom (BFS) to find the shortest path.In this black line indicates path and Red indicates conected nodes.

I have written a program to convert image to a matrix. marked white pixels as 0,black 1,red 2. My plan is to estimate the conecting nodes from this matrix. How i will be able to do that .? any alternative idea ? Please help me

enter image description here

RatheeshTS
  • 411
  • 3
  • 15
  • Seems like an [image vectorization problem](http://stackoverflow.com/questions/6772230/is-there-some-well-known-algorithm-which-turns-users-drawings-into-smoothed-sha). – Haroldo_OK Oct 22 '15 at 10:34

1 Answers1

1

Well, basically, you would have to vectorize the image first; there's another post dicussing how to do this

Once the image is converted to vectors, it should be should be relatively less difficult to convert the vectors to a graph structure.

-- edit --

It just occurred to me that it won't be necessary to convert your matrix to a graph: The A* algorithm could be applied directly to the matrix.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Haroldo_OK
  • 6,612
  • 3
  • 43
  • 80