Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Answers pt 1

First run the main notebook

Thresholding bacteria

<Figure size 800x500 with 8 Axes>
<Figure size 640x480 with 1 Axes>

Conclusion

Some of these results are not bad, but none are directly usable. We’ll need more techniques to segment these bacteria.

Opening and closing

<Figure size 640x480 with 1 Axes>

This filled the “hole” in the big circle. The footprint modification is needed to achieve this.

<Figure size 640x480 with 1 Axes>

This removed everything (due to dilation), but kept the large structure. Also here, depending on the footprint size, different structures remain.

Thresholding

Identifying points

“Can you create a binary mask for the points in img_noisy?”

<Figure size 640x480 with 1 Axes>

Nuclear edges

“Can you create a binary mask that contains the edges of img_nuclei?”

There are many ways to do this, easiest is probably starting from the binary mask of the nuclei, and then getting to their outlines.

<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 1 Axes>

Nuclear edges (alternative 2) -- applying threshold to the edge mask

<Figure size 640x480 with 1 Axes>