diff --git a/descriptors/dfc_base.py b/descriptors/dfc_base.py index dede241..da83012 100644 --- a/descriptors/dfc_base.py +++ b/descriptors/dfc_base.py @@ -9,26 +9,31 @@ # TODO details import numpy as np - -import sys -sys.path.append('..') import ld2dap def run(rasters, treshold=1e4): + """DFC base, aka no local description before learning. + + Simply stack layers as description vectors. + + """ # Parse parameters type treshold = float(treshold) # Pipelines loader = ld2dap.LoadTIFF(rasters) dfc_filter = ld2dap.Treshold(treshold) + normalize = ld2dap.Normalize(dtype=np.uint8) + raw_out = ld2dap.RawOutput() + + raw_out.input = normalize + normalize.input = dfc_filter dfc_filter.input = loader - out_vectors = ld2dap.RawOutput() - out_vectors.input = dfc_filter # Compute vectors - out_vectors.run() + raw_out.run() - return out_vectors.data + return raw_out.data def version(): return 'v0.0'