NumCpp
2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Data Structures | |
class | Centroid |
holds the information for a centroid More... | |
class | Cluster |
Holds the information for a cluster of pixels. More... | |
class | ClusterMaker |
Clusters exceedance data into contiguous groups. More... | |
class | Pixel |
Holds the information for a single pixel. More... | |
Functions | |
template<typename dtype > | |
NdArray< bool > | applyThreshold (const NdArray< dtype > &inImageArray, dtype inThreshold) |
template<typename dtype > | |
std::vector< Centroid< dtype > > | centroidClusters (const std::vector< Cluster< dtype > > &inClusters) |
template<typename dtype > | |
std::vector< Cluster< dtype > > | clusterPixels (const NdArray< dtype > &inImageArray, const NdArray< bool > &inExceedances, uint8 inBorderWidth=0) |
template<typename dtype > | |
std::vector< Centroid< dtype > > | generateCentroids (const NdArray< dtype > &inImageArray, double inRate, const std::string &inWindowType, uint8 inBorderWidth=0) |
template<typename dtype > | |
dtype | generateThreshold (const NdArray< dtype > &inImageArray, double inRate) |
NdArray< bool > | windowExceedances (const NdArray< bool > &inExceedances, uint8 inBorderWidth) noexcept |
NdArray< bool > nc::imageProcessing::applyThreshold | ( | const NdArray< dtype > & | inImageArray, |
dtype | inThreshold | ||
) |
Applies a threshold to an image
inImageArray | |
inThreshold |
std::vector< Centroid< dtype > > nc::imageProcessing::centroidClusters | ( | const std::vector< Cluster< dtype > > & | inClusters | ) |
Center of Mass centroids clusters
inClusters |
std::vector< Cluster< dtype > > nc::imageProcessing::clusterPixels | ( | const NdArray< dtype > & | inImageArray, |
const NdArray< bool > & | inExceedances, | ||
uint8 | inBorderWidth = 0 |
||
) |
Clusters exceedance pixels from an image
inImageArray | |
inExceedances | |
inBorderWidth | border to apply around exceedance pixels post clustering (default 0) |
std::vector< Centroid< dtype > > nc::imageProcessing::generateCentroids | ( | const NdArray< dtype > & | inImageArray, |
double | inRate, | ||
const std::string & | inWindowType, | ||
uint8 | inBorderWidth = 0 |
||
) |
Generates a list of centroids givin an input exceedance rate
inImageArray | |
inRate | exceedance rate |
inWindowType | (string "pre", or "post" for where to apply the exceedance windowing) |
inBorderWidth | border to apply (default 0) |
dtype nc::imageProcessing::generateThreshold | ( | const NdArray< dtype > & | inImageArray, |
double | inRate | ||
) |
Calculates a threshold such that the input rate of pixels exceeds the threshold. Really should only be used for integer input array values. If using floating point data, user beware...
inImageArray | |
inRate |