I have the following image (image is fully black, don't mind the border)
I want to be left only with the (1 pixel-wide) line, and be rid of all the points (some of which are actually a couple of pixels).
I know this is rather easy, but i am out of ideas for now :(
What I have tried:
a morphology operation for opening (erode + dilate) - left me with either nothing or the same
blob detection - doing this would maybe work after dilation, but it crashes with no error (windows exception), and I have no time to debug opencv.
would love any idea that works.





I ended up doing the following, just to get done with it. I am sure something smarter could have been done:
This counts the size of each connected component, and enforces a threshold (5 here)