Miniscope Board

General Category => Data Analysis => Topic started by: Obsee on March 06, 2017, 12:48:32 PM

Title: reasonable value of corrCoefThreshDefault
Post by: Obsee on March 06, 2017, 12:48:32 PM
Hi..
During analysis, I've got so few cells.
So I changed value of corrCoefThreshDefault from 0.9 to 0.95.
I can see this change works in my images and I can tell this results in more reasonable segmentation.

What does corrCoefThreshDefault do in the segmentation? What if I set this value higher or lower?
Is there any limitation?

I hope you understand my question well in spite of poor English.

Thanks always..

Eunee Lee

Title: Re: reasonable value of corrCoefThreshDefault
Post by: Daniel Aharoni on March 07, 2017, 07:11:37 AM
Hi Eunee,
corrCoefThresh sets the minimum cutoff for a pixel to be added to the group of pixels currently being used to segment out a neuron. This number can range from 0 to 1 and generally values of between 0.7 to 0.98 can work depending on the quality of your data. My tip to you would be to start with a higher value and then rerun the auto segmentation algorithm at lower values if need be. You can run the auto segmentation multiple times with each run adding to segments already found in previous runs.

Unfortunately I don't have time to explain the segmentation algorithm in much detail here but you should be able to scan through the code to get a rough idea of how the threshold is being implemented.
Title: Re: reasonable value of corrCoefThreshDefault
Post by: Obsee on March 07, 2017, 11:18:35 AM
Thanks.. Daniel.
I'm always surprised at your work during using your code.
This is tremendous work.

Actually I try to analyze images using both your code and inscopix, mosaic.
Using mosaic, it sorts too many cells.
By threshold 0.9, few cells were detect, which contains possibility my image's quality is not good.
It is hard to tell. Do you have any standard or roles that should be applied?

Best .. Eunee


Title: Re: reasonable value of corrCoefThreshDefault
Post by: Daniel Aharoni on March 07, 2017, 07:58:41 PM
Hi Eunee,
At a given threshold, getting a low yield of segments could be a result of the threshold being too high or too low. At too high of a threshold the algorithm cannot find enough pixels to group into a segment and discards it. At too low of a threshold the algorithm finds too many pixels to group into a segment and discards it as well. This is based on the cell area limits that are passed into the auto segment algorithm function. Turn on plotting of the function and watch the algorithm walk through segmentation to get an idea of what is happening.
Title: Re: reasonable value of corrCoefThreshDefault
Post by: Obsee on March 08, 2017, 05:33:36 AM
Thanks, Daniel..
It is good idea to having a plot threshold vs no. of segments.

Best..