Suppose we have a grayscale image that contains vertical lines. Now suppose that not all vertical lines are the same, some of them have different thickness.
Question is, is there a way, in MATLAB or other programming language, to filter the vertical lines by thickness? In other words, based on the user selected thickness, only thin vertical lines are removed, while all other thick vertical lines are kept intact? or all thick vertical lines removed, all other thin vertical lines intact?
I tried experimenting with MATLAB with the morphological operators, but nothing seems to really work, perhaps I am using the wrong method.
edit: I am thinking about one possible way to solve this, but not in code, just as an idea. Every vertical line has 2 vertical edges. For every pair of 2 edges (1 line), calculate distance between two edges. Then, based on user threshold, remove or keep corresponding lines based on these calculated distances.
edit3: what I mean by remove is in this context interpolate them with the background (average value of left and right close pixels).