Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well, that's an ugly image!

I suggest to clean up the original (RGB) image, it's much easier than the binary image.

Try also to improve the binarization (e.g. work on HSV or LAB color space, use several channels, combine the RGB channels) to get a cleaner result. If you post the original image, you could get better ideas.

If you must work with the binary image, a directional diffusion (Perona&Malik method, not part of OpenCV) could be a solution.

Well, that's an ugly image!

I suggest to clean up the original (RGB) image, it's much easier than the binary image.

Try also to improve the binarization (e.g. work on HSV or LAB color space, use several channels, combine the RGB channels) to get a cleaner result. If you post the original image, you could get better ideas.

If you must work with the binary image, a directional diffusion (Perona&Malik method, not part of OpenCV) could be a solution.

[EDIT] I was wrong, Perona-Malik is part of the Extended image processing module: cv::ximgproc::anisotropicDiffusion

Well, that's an ugly image!

I suggest to clean up the original (RGB) image, it's much easier than the binary image.

Try also to improve the binarization (e.g. work on HSV or LAB color space, use several channels, combine the RGB channels) to get a cleaner result. If you post the original image, you could get better ideas.

If you must work with the binary image, a directional diffusion (Perona&Malik method, not ~~not part of OpenCV) OpenCV~~ correction: see below) could be a solution.

[EDIT] I was wrong, Perona-Malik is part of the Extended image processing module: cv::ximgproc::anisotropicDiffusion