I'm having issues with finishing the segmentation in some photos of bio-samples, I'm trying to analyze growth of bacteria with image processing, as in theory it should work. Here is one of the original images I have:
I'm trying to segment the area inside the circle and see how the values of the pixels change as time passes. I've been trying a lot of techniques, as I'm relative new to analyzing these kind of samples.Initially I was using opencv, but I wasn't getting the results I wanted so now I'm using scikit-image for all the techniques for image processing and segmentation. Here's the code I have until now:
from skimage import morphology, exposure, io, filters
from scipy import ndimage as ndi
from skimage.color import rgb2gray, label2rgb
from skimage.filters import sobel, rank
import matplotlib.pyplot as plt
y1=400
y2=1600
x1=700
x2=1900
test_img = io.imread(folders_path+hour_tested[0]+'5.jpg')
roi_test = test_img[y1:y2, x1:x2,:]
gray_img = rgb2gray(roi_test)
denoised_img = rank.median(gray_img, morphology.disk(5))
val = filters.threshold_otsu(denoised_img)
mask = denoised_img > val
elevation_map=sobel(denoised_img)
segmentation = morphology.watershed(elevation_map, mask=mask)
labeled_bio, num_seg = ndi.label(segmentation)
image_label_overlay = label2rgb(labeled_bio, image=gray_img)
plt.imshow(image_label_overlay)
plt.show()
On the last line I get to segment by different colors the areas of the sample and get the part I want to analyze in one label, is now that I don't know how to continue or at least how to just see that label and then create a mask.
I'm also sharing the labeled image for anyone to see and maybe help me in the next steps, I feel like or I'm really close to segment my area of interest or really far and confused.
Well here's the labeled image of the sample: