Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Seeded Region Growing (SRG) is a method for image segmentation. It involves selecting initial seed points and expanding these regions by adding neighboring pixels that share similar properties, such as grayscale intensity. The process continues iteratively until the entire image is segmented into distinct labels.
This library is an adaptation of the SRG plugin to Fiji/ImageJ and is based on the algorithm proposed in Adams and Bischof. Our contribution was to translate the original algorithm to C++ and wrap it in Python. We provide this package under the Digital Porous Media organization.
dpm_srg is packaged on pypi and can be installed with pip.
pip install dpm-srg
.
If installing from source, this package requires a C++ compiler.
This implementation of SRG expects a 2D or 3D grayscale (single color channel) image of type uint8, uint16, or uint32, and a seed image of the same shape as the grayscale image and of type uint8. All seeds should be labeled between 1-255, inclusive as the algorithm fills in points in the seeded image that are labeled 0. The algorithm will return a labeled image of the same shape as the input images of type uint8. Therefore, up to 255 unique labels are possible.
Note that the performance and segmentation accuracy is highly sensitive to the selection of seed points. It is generally better to take a more conservative approach when selecting seed points.
We wrapped each version (2D vs. 3D, dtype) of the template class into individual class instances. The nomenclature is: SRG[2(or 3)]D_unumber_of_bits (e.g. SRG2D_u8()
, SRG3D_u32()
).
Python Example:
import dpm_srg
import numpy as np
np.random.seed(130621)
image = np.random.randint(0, 256, size=(100, 200, 200), dtype=np.uint16)
seeds = np.random.randint(0, 5, size=(100, 200, 200), dtype=np.uint8)
srg_obj = dpm_srg.SRG3D_u16(image, seeds)
srg_obj.segment()
segmentation = srg_obj.get_result()
This project includes code concepts adapted from Seeded Region Growing from ijp-toolkit, which is licensed under the LGPL-2.1 License.
Original code can be found here
FAQs
Seeded Region Growing Segmentation
We found that dpm-srg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.