Usage (GLCM)¶
Given that ar
is an np.ndarray
.
OOP GLCM Transform
>>> from glcm_cupy import GLCM
>>> g = GLCM(...).run(ar)
Functional GLCM Transform
>>> from glcm_cupy import glcm
>>> g = glcm(ar, ...)
I/O¶
For a np.ndarray
or cp.ndarray
input, the algorithm will output a
np.ndarray
or cp.ndarray
respectively.
Input Array Requirements¶
Shape: \(B\times H\times W\times C\) or \(H\times W\times C\)
Non-negative, integer array
Must be large enough for
radius
andstep_size
Output Array¶
Shape: \(B\times H^*\times W^*\times C\times F\) or \(H\times W\times C\times F\)
0 to 1 if
normalize_features
, else it depends on feature.
Arguments¶
Argument |
Description |
Default |
---|---|---|
List of |
|
|
List of |
|
|
Distance between GLCM Windows |
|
|
Radius of GLCM Windows |
|
|
Maximum Value + 1 of the array. |
|
|
Maximum Value + 1 of the array |
|
|
Whether to scale features to |
|
|
verbose |
Whether |
|
max_partition_size1 |
No. of windows parsed per GLCM Matrix |
|
max_threads1 |
No. of threads per CUDA block |
|
See also
Learn how to use glcm-cupy
from the examples in the sidebar on the left!