I have images that are best described as mazes. The important feature is that they have what I would call corridors or paths.
I'm trying to narrow these corridors/paths without completely closing any of them off. I don't have any strict requirement for how narrow the processed corridors must be, I just need to narrow them up a good bit. However, I can never completely close one off.
Here's an unprocessed image
Here's an image after applying a gaussian blur via
cvSmooth(img, img, CV_GAUSSIAN, 9);
The results are excellent, but I don't know how wide my corridors will be in incoming images, and they will not necessarily have such straight regular angled walls, nor have consistent corridor widths, and so such a naive solution will surely completely block some of the corridors.
I've thought about blurring a little bit at a time, running a pathfinding algo on the image to make sure I haven't closed off a corridor, but I think this will be too slow.
So, I'm looking for a fast way to narrow the corridors without risk of completely closing any off.
you can try these two...
Mat::ones(3,3,CV_8UC1)
over the image...dilation mitght work faster than Gaussian blurring...with dilation you know that you have broadened the image by one pixel level...