Edges of labels
When processing biological objects in image such as cells and nuclei, it may make sense to identify all pixels that lie on the surface of an object.
This notebook demonstrates how to select pixels on the border of nuclei, just in case we would like to measure intensity in the nuclear envelope.
|
cle._ image
| shape | (40, 40) |
| dtype | float32 |
| size | 6.2 kB |
| min | 12.0 | | max | 255.0 |
|
We then segment the nuclei.
|
cle._ image
| shape | (40, 40) |
| dtype | uint32 |
| size | 6.2 kB |
| min | 0.0 | | max | 4.0 |
|
From the nuclei label image we can extract another label image which contains all pixels that are on the edge of the labels.
|
cle._ image
| shape | (40, 40) |
| dtype | uint32 |
| size | 6.2 kB |
| min | 0.0 | | max | 4.0 |
|
In case one wanted to measure in thicker areas along the borders, we could expand the borders.
|
cle._ image
| shape | (40, 40) |
| dtype | uint32 |
| size | 6.2 kB |
| min | 0.0 | | max | 4.0 |
|
For visualization purposes we can also view the original image with the label borders on top.
It is also possible to retrieve a 2-pixel thick boundary binary image of edges between labels and backgroaund.
|
cle._ image
| shape | (40, 40) |
| dtype | uint8 |
| size | 1.6 kB |
| min | 0.0 | | max | 1.0 |
|