1. Median filter was applied to remove noise (medfilt2, kernel size: ). |
2. Gaussian filter was applied to estimate the background, and this background was subtracted from the image (imgaussfilt, kernel size: ). |
3. Local standard deviation filter was applied to enhance edges (stdfilt, kernel: ). |
4. Otsu’s method was used to segment the edge-enhanced image into three classes (imquantize, multithresh, and number of threshold values: (2). The lowest class, corresponding to the non-organoid regions, was excluded. |
5. Segmented regions less than 100 pixels were removed. |
6. Holes in segmented regions were filled in (imfill, option: “holes”). |
7. Segmented regions were eroded with a disk structure element (imerode, strel, options: “disk,” 9 pixels). |
8. Active contours refined the segmented regions (activecontours, options: “Chan-Vese,” 200 iterations, contraction bias). |
9. Separation of touching organoids in the mask was achieved via the standard h-Minima-watershed transform algorithm. |
10. Holes in segmented regions were filled-in (imfill, option: “holes”). |
11. Edges in segmented regions were smoothed with a Gaussian filter (imgaussfilt, kernel size: ). |
12. Segmented regions corresponding to PCOs were filtered based on morphology (regionprops, ismember, options: regions with area and circularity ).56
|