Cargando…
Multithreaded two-pass connected components labelling and particle analysis in ImageJ
Sequential region labelling, also known as connected components labelling, is a standard image segmentation problem that joins contiguous foreground pixels into blobs. Despite its long development history and widespread use across diverse domains such as bone biology, materials science and geology,...
Autor principal: | |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
The Royal Society
2021
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8074980/ https://www.ncbi.nlm.nih.gov/pubmed/33959340 http://dx.doi.org/10.1098/rsos.201784 |
_version_ | 1783684461802553344 |
---|---|
author | Doube, Michael |
author_facet | Doube, Michael |
author_sort | Doube, Michael |
collection | PubMed |
description | Sequential region labelling, also known as connected components labelling, is a standard image segmentation problem that joins contiguous foreground pixels into blobs. Despite its long development history and widespread use across diverse domains such as bone biology, materials science and geology, connected components labelling can still form a bottleneck in image processing pipelines. Here, I describe a multithreaded implementation of classical two-pass sequential region labelling and introduce an efficient collision resolution step, ‘bucket fountain’. Code was validated on test images and against commercial software (Avizo). It was performance tested on images from 2 MB (161 particles) to 6.5 GB (437 508 particles) to determine whether theoretical linear scaling (O(n)) had been achieved, and on 1–40 CPU threads to measure speed improvements due to multithreading. The new implementation achieves linear scaling (b = 0.905–1.052, time ∝ pixels(b); R(2) = 0.985–0.996), which improves with increasing thread number up to 8–16 threads, suggesting that it is memory bandwidth limited. This new implementation of sequential region labelling reduces the time required from hours to a few tens of seconds for images of several GB, and is limited only by hardware scale. It is available open source and free of charge in BoneJ. |
format | Online Article Text |
id | pubmed-8074980 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2021 |
publisher | The Royal Society |
record_format | MEDLINE/PubMed |
spelling | pubmed-80749802021-05-05 Multithreaded two-pass connected components labelling and particle analysis in ImageJ Doube, Michael R Soc Open Sci Computer Science and Artificial Intelligence Sequential region labelling, also known as connected components labelling, is a standard image segmentation problem that joins contiguous foreground pixels into blobs. Despite its long development history and widespread use across diverse domains such as bone biology, materials science and geology, connected components labelling can still form a bottleneck in image processing pipelines. Here, I describe a multithreaded implementation of classical two-pass sequential region labelling and introduce an efficient collision resolution step, ‘bucket fountain’. Code was validated on test images and against commercial software (Avizo). It was performance tested on images from 2 MB (161 particles) to 6.5 GB (437 508 particles) to determine whether theoretical linear scaling (O(n)) had been achieved, and on 1–40 CPU threads to measure speed improvements due to multithreading. The new implementation achieves linear scaling (b = 0.905–1.052, time ∝ pixels(b); R(2) = 0.985–0.996), which improves with increasing thread number up to 8–16 threads, suggesting that it is memory bandwidth limited. This new implementation of sequential region labelling reduces the time required from hours to a few tens of seconds for images of several GB, and is limited only by hardware scale. It is available open source and free of charge in BoneJ. The Royal Society 2021-03-03 /pmc/articles/PMC8074980/ /pubmed/33959340 http://dx.doi.org/10.1098/rsos.201784 Text en © 2021 The Authors. https://creativecommons.org/licenses/by/4.0/Published by the Royal Society under the terms of the Creative Commons Attribution License http://creativecommons.org/licenses/by/4.0/ (https://creativecommons.org/licenses/by/4.0/) , which permits unrestricted use, provided the original author and source are credited. |
spellingShingle | Computer Science and Artificial Intelligence Doube, Michael Multithreaded two-pass connected components labelling and particle analysis in ImageJ |
title | Multithreaded two-pass connected components labelling and particle analysis in ImageJ |
title_full | Multithreaded two-pass connected components labelling and particle analysis in ImageJ |
title_fullStr | Multithreaded two-pass connected components labelling and particle analysis in ImageJ |
title_full_unstemmed | Multithreaded two-pass connected components labelling and particle analysis in ImageJ |
title_short | Multithreaded two-pass connected components labelling and particle analysis in ImageJ |
title_sort | multithreaded two-pass connected components labelling and particle analysis in imagej |
topic | Computer Science and Artificial Intelligence |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8074980/ https://www.ncbi.nlm.nih.gov/pubmed/33959340 http://dx.doi.org/10.1098/rsos.201784 |
work_keys_str_mv | AT doubemichael multithreadedtwopassconnectedcomponentslabellingandparticleanalysisinimagej |