Open imagirom opened 4 years ago
@tischi @constantinpape
@imagirom
@tischi for now re 2.: We currently use the white tophat transform https://scikit-image.org/docs/0.12.x/auto_examples/xx_applications/plot_morphology.html#white-tophat
re (2): Maybe doing an additional radius=1 opening after that would help to remove spatial high frequency noise, depends on (1).
This is before the white tophat (the scale is probably not ideal). The corner is in the top left.
And after the white tophat:
You can try a few things:
The general issue with a white top hat is that it does not work well with images that have a lot of noise. So either you try to remove the noise before applying it (1 and 2) or you don't use it, but rather do median subtraction (3).
@imagirom
...I am not so sure anymore if it makes a difference whether you remove the noise before or after the tophat. I have to play a bit with it myself.
Could I have access to the images just after flat-field correction (without any further processing)? For example, are they accessible in the PlateViewer?
@tischi Yes, the 'marker' channel is what you are looking for. After the tophat is called 'marker_tophat'. That minus background is 'marker_tophat_background_subtracted'. Before flat-field correction is 'marker_raw'.
And in which folder should I look on the kreshuk server?
/g/kreshuk/data/covid/data-processed
...as expected because there we have less signal to the the illumination profile
...this is an annoying property of the tophat = im - open(im)
. If you view this as im - background( im )
, the opening operation underestimates the background in high noise regions, thus we subtract too little, thus the result is too bright.
The flatfield correction is so good now that I wonder wether we should just not do anything more. For sure the white top hat is problematic due to the high and spatially varying noise levels.
As we discussed some time ago, what I may have done is a connected component analysis on the pixels that are above threshold in each cell and only keep connected components that have a minimal size and then base the decision whether to classify a cell as infected based on that. That would be a way to distinguish noise from real virus regions.
As a quick fix I would suggest to try to simply remove the white top hat filter as it seems to do more harm than good.
{"plateName":"plateU7rep1_20200519_210009_665","siteName":"C04-0005","pixelLocation":[11375.74293134145,7246.784387298996,0.0],"analysisVersion":"?"}
In many Images of the new plates, the infected/control classification fail in the corners, especially (at leas from my impression) the top left. A lot of control cells are classified as infected.
I think I know the reason: The Flatfield correction, which is more extreme in the new plates, enhances the noise in the corners, up to a factor in the order of 10. Hence, the 0.95 quantile, which is used as the feature for the cell classification, rises as well, leading to the misclassification.
Any Ideas for an easy fix?
Screenshot