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.
2 | No.2 Revision |
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
3 | No.3 Revision |
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