Is there an image processing algorithm that can fill these gaps within an image? The gaps are always lines and will run across the width of the image in all cases. The lines are mostly one-pixel thick.
.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The ease of filling in these gaps depends on whether you’re willing to tolerate some artifacts in other parts of the image. The easiest solutions are generally to use morphological operations.
If you want a quick and dirty approach, consider using
cvMorphologyExwith an open operation using a rectangular structuring element that’s 1 pixel wide and tall enough to cross the gaps you want to cover.If this introduces unwanted artifacts, some additional background info would be helpful. For example, what’s the maximum vertical gap? Are the unwanted black lines always exactly horizontal, or can the be vertical? Are they ever close to each other? What types of artifacts can you afford in other parts of the image?