From: erik on
For digital detection of abnormalities in an image I treshold the picture so only pixels with a certain value or higher remain because the abnormalities are very bright in the image. After this tresholding there are for example 5 areas left but I want to detect only two of these areas because the other 3 areas are not abnormalities but noise. When using edge detection ('roberts' algorithm) the two areas of interrest have a line around them and the not interesting 'noise'areas aren't surrounded by a line. So there is a difference between the interesting and the noise Areas detected with pixel tresholding but I dont know how the remove the 'noise' areas without a border provided by edge detection.

In short how can I detect areas with a high pixel value and an edge around them and delete areas with a high pixel value but no border around them.

I hope some can help me, thanks in advance