DIC image a yeast cells.

I am trying to generate a mask of the elliptical boundaries in this object. Any ideas on how I could complete the edge of a partially filled elliptical object? Thus far, I've obtained a mask that is fairly close to the desired result, which would enclose the boundaries of all cells in an edged, but unfilled border.

tD = Import["https://i.stack.imgur.com/7x8EB.png"];

gaussKernel = 0.;
neighborhood = 5.;
mean = .77;
sd = .61;
size = 100;
cellMask =
    GaussianFilter[ImageAdjust[tD], gaussKernel], 
    neighborhood, {mean, sd}], {"EnclosingComponentCount", 
   "Count"}, #2 > size && #1 == 0 &], 2], DiskMatrix[1.5]]]

1 Answer 1


Don't very sure what you want,this is my thinking about your question

m = DeleteSmallComponents[
  LaplacianGaussianFilter[tD, 1.4] // Binarize, 60]

enter image description here

 Colorize[MorphologicalComponents[m, Method -> "ConvexHull"], 
  ColorRules -> {0 -> Black, _ -> White}], Small]

enter image description here

If you get the unfilled border,you can use MorphologicalPerimeter to the result.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.