-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High intensity background detection discarding #50
Comments
Hello, currently ImJoy permits no thresholding beyond the adjustment of the initial intensity value. In ImJoy we use our Python library big-fish to perform the actual analysis. This library provides the possibility to fit spots with a Gaussian function (@Henley13 ) and then extract values such as their fitted size (akin to the Matlab version). We would then need to add some more functionality to the plugin to
implementing this will take a bit of time, but we can start working on this relatively soon. best |
@Henley13 . We currently provide the function maybe we could add a parameter to create a conditional output where we return the other fitting parameters as well (amplitude, background, sigmas)? or do you think it's better to simply loop over the spots and apply |
For now I think the latter option is best. Function Something like that: import bigfish.detection as detection
# inputs requested
# image = ... (2 or 3 dimensions)
# spot_coordinate = ... (zyx or yx coordinates)
# voxel_size = ... (in nanometer)
# radius_nm = ... (in nanometer)
# ndim = ... (2 or 3)
# get spot spot radius in pixel
radius_px = detection.get_object_radius_pixel(
voxel_size_nm=voxel_size,
object_radius_nm=spot_radius,
ndim=ndim)
radius_px = [np.sqrt(ndim) * r for r in radius_px]
radius_px = tuple(radius_px)
# extract spot image
image_spot, _ = detection.get_spot_volume(
image=image,
spot_z=spot_coordinate[0],
spot_y=spot_coordinate[1],
spot_x=spot_coordinate[2],
radius_z=radius_px[0],
radius_yx=radius_px[-1])
# fit gaussian
parameters = detection.modelize_spot(
reference_spot=image_spot,
voxel_size=voxel_size,
spot_radius=radius_nm,
return_coord=True) You will need |
Hi, I'm having some problems adapting the parameters of the detection in images with high background interference. I work with plant tissue, so the autofluorescence is sometimes really high. When I run your software in MATLAB I had been able to discard those dots coming from the high-intensity background, by setting a maximum threshold in the Sigma-XY criteria. Now I'm trying with your ImJoy version and I see that I can just adjust the minimum threshold for intensity. Is there any possibility to adapt this to improve the detection precision?
The settings I'm using are:
"settings": {
"filter": {
"method": "LoG",
"sigma": [
1,
0.75,
0.75
]
},
"detection": {
"method": "localmax",
"mind_dist": [
2,
2
],
"threshold": 122
And this is the output that I'm obtaining:
If I analyze the same outline with similar criteria in MATLAB and adjust the sigmaXY maximum threshold I obtain a good detection. Here I show you the results for the cell marked with a red square above
Do you have any suggestions on how could I adjust better this criteria in Imjoy?
Thanks in advance
The text was updated successfully, but these errors were encountered: