estimate_stain_vectors
estimate_stain_vectors(img, i0=240, alpha=1, beta=0.15)
Detects two most dominant staining vectors in the image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
img |
Tile
|
Stained image with three RGB channels. |
required |
i0 |
int
|
Transmitted light intensity. Defaults to 240. |
240
|
alpha |
int
|
Percentile offset for robust estimation. Defaults to 1. |
1
|
beta |
float
|
Threshold for transparent pixels in the OD-space. Defaults to 0.15. |
0.15
|
Returns:
Type | Description |
---|---|
StainArray
|
Array with two most dominant color vectors. |
References
Adapted from: https://github.com/schaugf/HEnorm_python
Paper: A method for normalizing histology slides for quantitative analysis, M Macenko, M Niethammer, JS Marron, D Borland, JT Woosley, G Xiaojun, C Schmitt, NE Thomas, IEEE ISBI, 2009. dx.doi.org/10.1109/ISBI.2009.5193250
Source code in rationai/staining/estimate_stain_vectors.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|