fine tuning segmentation step
skim245 opened this issue · 4 comments
Dear author,
I've tried VistoSeg following your tutorial with my data and found that I need to fine-tune the segmentation step.
I would like to know if we can modify threshold and also split overlapping nuclei.
Here is an example image from spotcheck showing poor counts (counting a single nuclei as multiple fragments; may be we need max&min nuclei size threshold?) and also counting overlapping nuclei as one instead of two.
thank you in advance!
Hello skim245,
Can you share your raw image, mask.mat file from VNS function and nuclei.mat from refineVNS function.
Hi @madhavitippani
I've uploaded three files in google drive and below is the link!
https://drive.google.com/drive/folders/1zNLtGC0MujHsqYiEZNXL_2LnHbd51FZT?usp=sharing
Requested access
There are a couple of things you need to change in the code for your images.
- in the VNS script that is located here
~/VistoSeg/code/VNS.m
comment out line 11 and change line 12 as following
%Img1_smooth = imgaussfilt(Img1,4); %smooth image
he = imadjust(Img1, [.2 .3 0; .6 .7 1],[]); %adjust contrast in image
because smoothening is not working for your images, and you need contrast adjustment on the raw image itself
- in refineVNS script here
~/VistoSeg/code/refineVNS.m
add the following line after line 19
mask_dark_blue = bwareafilt(mask_dark_blue,[5 2000]);
in this line [5 2000] is the size threshold on segmented nuclei. Meaning nuclei with less than 5-pixel area and greater than 2000-pixel area are dropped from the segmentation.
With these changes, I was able to get the following results