Ask Your Question

Revision history [back]

Firstly, each pixel in the source image will probably represent a very short amount of space. Searching that grid is certainly possible, but it will probably be unnecessary. Dijkstra/A* search require a discrete set of points. You could indeed reduce your problem to a graph search problem by searching all the pixels (or, more sensibly, by chopping up the blobs into sections), but this would be throwing away information which might be useful.

I suspect that what you are looking for is a higher-level approach to this. For instance, instead of just finding blobs you might want to perform edge detection on those blobs; then you can follow the edge of the line. There is functionality in SimpleCV/OpenCV for this.

You need to constantly remember that computer vision is a pretty difficult task for computers, even though you are doing something that is conceptually simple for humans. Things like variation in lighting is going to be a problem, in particular if the car is moving; you might want to take inspiration from this video to deal with that particular problem.