Hi Hema,
This image looks really challenging for QuPath for two main reasons:
- the dark (yellow) background
- it's a JPEG - assuming this is the original, it lacks the pixel size information in µm and that means you need to define everything in pixels for the cell detection... and this is a lot harder
For the first of these, QuPath's cell detection
doesn't (unfortunately) use the background correction during cell detection - often that is not very noticeable (since the background is close to white anyway), but here of course it really matters. This means that the intensity measurements may be pretty wildly inaccurate and unintuitive (e.g. negative), although they should still have
some relationship to the staining.
I plan to incorporate the background values into the cell detection in the future, but it will take some caution and need to be clearly documented, since it will impact the results.
Nevertheless, I think it should be possible to get some improvement in the cell detection. The main thing is to increase the size of the filters used pretty dramatically.
Here's a script that shows the commands and settings I used with the image:
setImageType('BRIGHTFIELD_H_DAB');
setColorDeconvolutionStains('{"Name" : "H-DAB updated", "Stain 1" : "Hematoxylin", "Values 1" : "0.3978 0.7337 0.55086 ", "Stain 2" : "DAB", "Values 2" : "0.15822 0.65622 0.73779 ", "Background" : " 236 175 41 "}');
createSelectAllObject(false);
selectAnnotations();
runPlugin('qupath.imagej.detect.nuclei.WatershedCellDetection', '{"detectionImageBrightfield": "Hematoxylin OD", "backgroundRadius": 30.0, "medianRadius": 4.0, "sigma": 10.0, "minArea": 10.0, "maxArea": 10000.0, "threshold": 0.2, "maxBackground": 2.0, "watershedPostProcess": true, "excludeDAB": false, "cellExpansion": 20.0, "includeNuclei": true, "smoothBoundaries": true, "makeMeasurements": true}');
Whenever the µm information isn't there, one thing I sometimes do is to open the image in ImageJ and try a Gaussian filter with different sigma values - this gives me an idea of what to set the 'sigma' value in the QuPath detection. I can also apply a median filter with the same purpose. This showed me that the default values where much too low and didn't really have much impact on the image.
You should be able to decipher what settings I used for cell detection from the script, but if it is not clear then you can also run the script for your image and check the 'Workflow' tab. If you double-click the last 'Cell detection' entry then it should open the parameter dialog with the settings already there.
In general, assuming that the image is from a microscope (rather than a whole slide scanner), and the background is very dark indeed, QuPath might not be the best thing to use with such an image. Or, if you do use QuPath, I'd suggest looking into preprocessing the image with ImageJ first to try to reduce the background problem. The following link might help:
Best wishes,
Pete