isofit.utils.reducers
Functions
|
Wrapper for the np.mean reducer. A wrapper is necessary |
|
Wrapper for the priority reducer. This might not be the correct |
Module Contents
- band_mean(vals)[source]
Wrapper for the np.mean reducer. A wrapper is necessary because you need to pass it a row-axis call. :param vals: (N-locs x bands) array of pixel values
- Returns:
(b x 1) array of band-means
- class_priority(vals, thresh=0.25)[source]
Wrapper for the priority reducer. This might not be the correct place for this reducer. The rules are as follows: If pct(n) > thresh: -> class = n elif pct(n-1) > thresh: -> class = n-1 else pct(0) > thresh -> class = 0 This will mean that the largest int class will take precedence. The threshold controls how many pixels in the SUB have to be a class for it to be important. :param vals: (N-locs) array of pixel classes
- Returns:
(int) Super pixel class