Suggestion of how to deal with artefacts

3 views (last 30 days)
Hello
Please, see attached image. At the top boundary area, there is an artefact that prohibits the active contour to take a rectangular shape. One method I can think of is to crop the image lower so not to have the artifact. But, later I will have to deal with it since the pixels rows deleted will later be added in my calculations.
I would also like to ask whether there is a way for a line-edge segmentation method. Active contours like the one I use, starts from a circle shape and it expands. What about having a method for the segmentation to start as a line and segments the edges, like the bottom red line where I want.
Looking to your proposals.

Answers (1)

Image Analyst
Image Analyst on 22 Jan 2019
I'm assuming the artifacts are the bright regions surrounded by the red line at the top, and the huge white surround is actually NOT part of your image, correct?
Not sure what you're doing with the active contour, but you could find the bright blobs at the top and then just replace them with zero or the mean of the image or something
grayImage(brightBlobMask) = mean(grayImage(~brightBlobMask));
Then try your active contour.
  4 Comments
Stelios Fanourakis
Stelios Fanourakis on 23 Jan 2019
I get the error
Undefined function or variable 'bwlabel'.
Error in nim (line 10)
labeledImage = bwlabel(mask,:);
Does such a function exist in R2017b with Image Processing tool?
Can I also ask, how is it possible for the same image I segmented yesterday, and by applying the automated segmentation algorithm was just fine. Today, doing the same thing under same number of iterations and is not well segmented. I don't get the ideal segmentation I used to get yesterday.
What happened and changed this?
Image Analyst
Image Analyst on 28 Jan 2019
You can't pass in : (colon) for the connectivity (second argumente to bwlabel()).
It has to be either 4 or 8 or you can leave it out (like I did).

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!