mia-2dsegm...cal-cmeans(1)
π mia-2dsegment-local-cmeans π
okay bestie, so this is a page from the General Commands Manual, and the command we're obsessing over is mia-2dsegment-local-cmeans. It's giving serious main character energy in the 2D segmentation world, and honestly? You're gonna eat this up. Let's go. β¨
πΈ NAME πΈ
mia-2dsegment-local-cmeans β Run a c-means segmentation of a 2D image.
β¨ SYNOPSIS β¨
mia-2dsegment-local-cmeans -i <in-file> [options]
π¦ DESCRIPTION π¦
So mia-2dsegment-local-cmeans runs a segmentation of a 2D image by applying a localized c-means approach β and the whole point of the localized thing is that it helps you overcome intensity inhomogeneities in the image. (Yes, those are the villain of the story. π)
Here's the vibe: the approach evaluates a global c-means clustering first, and then separates the image into overlapping regions, where more c-means iterations are run β but only including the locally present classes, i.e. the classes that relatively contain more pixels than a given threshold. Periodt.
This program implements a 2D prototype of the algorithm described in:
Dunmore CJ, Wollny G, Skinner MM. (2018) MIA-Clustering: a novel method for segmentation of paleontological material. PeerJ 6:e4374.
π OPTIONS π
π File-IO
-i,--in-file=(required, input); ioβ the image to be segmented. For supported file types seePLUGINS:2dimage/io-o,--out-file=(output); ioβ class label image based on merging local labels. For supported file types seePLUGINS:2dimage/io-G,--out-global-crisp=(output); ioβ class label image based on global segmentation. For supported file types seePLUGINS:2dimage/io-C,--class-prob=(output); ioβ class probability image file, filetype must support floating point multi-frame images. For supported file types seePLUGINS:2dimage/io
π Help & Info
-V,--verbose=warningβ verbosity of output, print messages of given level and higher priorities. Supported priorities starting at lowest level are:traceβ Function call tracedebugβ Debug outputinfoβ Low level messagesmessageβ Normal messageswarningβ Warningsfailβ Report test failureserrorβ Report errorsfatalβ Report only fatal errors
--copyrightβ print copyright information-h,--helpβ print this help-?,--usageβ print a short help--versionβ print the version number and exit
π§ Parameters
-g,--grid-spacing=15; int in [3, inf)β spacing of the grid used to modulate the intensity inhomogeneities-c,--cmeans=kmeans:nc=3β c-means initializer. For supported plugins seePLUGINS:1d/cmeans-e,--c-means-epsilon=0.0001; float in (0, inf)β c-means breaking condition for update tolerance-t,--relative-cluster-threshold=0.02; double in [0, 1)β threshhold to ignore classes when initializing the local cmeans from the global one.
π«Ά Processing
--threads=-1β Maxiumum number of threads to use for processing. This number should be lower or equal to the number of logical processor cores in the machine. (-1: automatic estimation).
π₯ PLUGINS: 1d/cmeans π₯
evenβ C-Means initializer that sets the initial class centers as evenly distributed over[0,1], supported parameters are:nc =(required, ulong)β Number of classes to use for the fuzzy-cmeans classification.
kmeansβ C-Means initializer that sets the initial class centers by using a k-means classification, supported parameters are:nc =(required, ulong)β Number of classes to use for the fuzzy-cmeans classification.
predefinedβ C-Means initializer that sets pre-defined values for the initial class centers, supported parameters are:cc =(required, vdouble)β Initial class centers fuzzy-cmeans classification (normalized to range[0,1]).
π PLUGINS: 2dimage/io π
bmpβ BMP 2D-image input/output support. The plug-in supports reading and writing of binary images and 8-bit gray scale images. read-only support is provided for 4-bit gray scale images. The color table is ignored and the pixel values are taken as literal gray scale values.- Recognized file extensions:
.BMP,.bmp - Supported element types:
- binary data, unsigned 8 bit
- Recognized file extensions:
datapoolβ Virtual IO to and from the internal data pool- Recognized file extensions:
.@
- Recognized file extensions:
dicomβ 2D image io for DICOM- Recognized file extensions:
.DCM,.dcm - Supported element types:
- signed 16 bit, unsigned 16 bit
- Recognized file extensions:
exrβ a 2dimage io plugin for OpenEXR images- Recognized file extensions:
.EXR,.exr - Supported element types:
- unsigned 32 bit, floating point 32 bit
- Recognized file extensions:
jpgβ a 2dimage io plugin for jpeg gray scale images- Recognized file extensions:
.JPEG,.JPG,.jpeg,.jpg - Supported element types:
- unsigned 8 bit
- Recognized file extensions:
pngβ a 2dimage io plugin for png images- Recognized file extensions:
.PNG,.png - Supported element types:
- binary data, unsigned 8 bit, unsigned 16 bit
- Recognized file extensions:
rawβ RAW 2D-image output support- Recognized file extensions:
.RAW,.raw - Supported element types:
- binary data, signed 8 bit, unsigned 8 bit, signed 16 bit, unsigned 16 bit, signed 32 bit, unsigned 32 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
tifβ TIFF 2D-image input/output support- Recognized file extensions:
.TIF,.TIFF,.tif,.tiff - Supported element types:
- binary data, unsigned 8 bit, unsigned 16 bit, unsigned 32 bit
- Recognized file extensions:
vistaβ a 2dimage io plugin for vista images- Recognized file extensions:
.-,.V,.VISTA,.v,.vista - Supported element types:
- binary data, signed 8 bit, unsigned 8 bit, signed 16 bit, unsigned 16 bit, signed 32 bit, unsigned 32 bit, floating point 32 bit, floating point 64 bit
- Recognized file extensions:
β EXAMPLE β
Run the segmentation on image test.png using three classes, local regions of 40 pixels (grid width 20 pixels), and a class ignore threshold of 0.01.
mia-2dsegment-local-cmeans -i test.png -o label.png -n 3 -g 20 -t 0.01
π AUTHOR(s) π
Gert Wollny
πΈ COPYRIGHT πΈ
This software is Copyright (c) 1999β2015 Leipzig, Germany and Madrid, Spain. It comes with ABSOLUTELY NO WARRANTY and you may redistribute it under the terms of the GNU GENERAL PUBLIC LICENSE Version 3 (or later). For more information run the program with the option --copyright.
ngl bestie, "ABSOLUTELY NO WARRANTY" is doing the absolute most, so pls read it before you go off. π
and that's the whole page, no notes. π This was USER COMMANDS, version v2.4.7 β slay, go segment something iconic, mwah πβ¨π¦
π¦ where this page comes from
- debian bookworm: mia-tools 2.4.7-11+b1 Β· GPL-3.0-or-later
- ubuntu jammy: mia-tools 2.4.7-8ubuntu1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms