How are QuPath Detection Measurements Calculated?

Hello again,

From what I’ve understood, QuPath detections are made using watershed algorithms from imageJ. There are many more parameters in the detection measurements like area, perimeter, centroidX, centroidY, clusters, Delaunay, etc. I’m trying to better understand how all these digital parameters are calculated. Is there a description of these detection measurement algorithms?

The code for the cell detection is here and is the only real documentation for the specific calculations.

It’s true that the default cell detection command is ImageJ-based (because I wrote it first as an ImageJ plugin before QuPath existed), although the actual algorithm itself is custom-developed and rather involved; watershed transforms are part of it, but there are various other steps along the way. ImageJ is effectively being used as an image processing library in this case, although with other custom code in QuPath (including a specific watershed transform and morphological reconstruction implementation).

The underlying idea is that a developer (in this case me) can use whatever available image processing library they need when implementing any command. Some commands use ImageJ, some use OpenCV, some don’t use either. Typically, the user shouldn’t have to care. Currently, Delaunay features are aided by OpenCV, but in the future this might change to use Java Topology Suite.

I’m not sure what specifically you want to know, but in the end the code is the best reference.