2
$\begingroup$

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.sstatic.net/7x8EB.png"];

gaussKernel = 0.;
neighborhood = 5.;
mean = .77;
sd = .61;
size = 100;
cellMask =
ColorNegate@ColorNegate[Erosion[Dilation[SelectComponents[
  ColorNegate@
   LocalAdaptiveBinarize[
    GaussianFilter[ImageAdjust[tD], gaussKernel], 
    neighborhood, {mean, sd}], {"EnclosingComponentCount", 
   "Count"}, #2 > size && #1 == 0 &], 2], DiskMatrix[1.5]]]
$\endgroup$

1 Answer 1

3
$\begingroup$

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

SelectComponents[
 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.

$\endgroup$

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.