Skip to content
Snippets Groups Projects
Commit 43d2988c authored by Andrey Aristov's avatar Andrey Aristov
Browse files

normalize

parent 451a7dfd
No related branches found
No related tags found
No related merge requests found
Pipeline #78590 passed
...@@ -44,9 +44,13 @@ def segment_bf(well, thr=0.2, smooth=10, erode=10, fill=True, plot=False): ...@@ -44,9 +44,13 @@ def segment_bf(well, thr=0.2, smooth=10, erode=10, fill=True, plot=False):
labels, n_labels = multiwell.label(regions) labels, n_labels = multiwell.label(regions)
print(f'{n_labels} region{" s"[n_labels>1]}') print(f'{n_labels} region{" s"[n_labels>1]}')
if plot: if plot:
fig, ax = multiwell.plt.subplots(1,2) fig, ax = multiwell.plt.subplots(1,3)
ax[0].imshow(sm, cmap='gray') ax[0].imshow(well, cmap='gray')
ax[1].imshow(labels) ax[0].set_title('input')
ax[1].imshow(sm, cmap='gray')
ax[1].set_title('grad')
ax[2].imshow(labels)
ax[2].set_title(f'{n_labels} labels')
multiwell.plt.show() multiwell.plt.show()
return labels return labels
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment