Commit 284f8315 authored by luroth's avatar luroth
Browse files

.

parent cb41c453
...@@ -6,7 +6,6 @@ Created on 15.03.2017 ...@@ -6,7 +6,6 @@ Created on 15.03.2017
import os import os
import math import math
import stl.base as stl
import numpy as np import numpy as np
from matplotlib import path from matplotlib import path
from osgeo import gdal from osgeo import gdal
......
...@@ -4,14 +4,14 @@ Created on 16.03.2017 ...@@ -4,14 +4,14 @@ Created on 16.03.2017
@author: luroth @author: luroth
''' '''
from pylab import plot,show #from pylab import plot,show
from numpy import vstack,array from numpy import vstack,array
from numpy.random import rand from numpy.random import rand
import numpy.ma as ma import numpy.ma as ma
import numpy as np import numpy as np
from scipy.cluster.vq import kmeans,vq from scipy.cluster.vq import kmeans,vq
from scipy import misc from scipy import misc
import sklearn.cluster #import sklearn.cluster
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from osgeo import gdalnumeric from osgeo import gdalnumeric
import os import os
...@@ -88,7 +88,7 @@ def main(argv): ...@@ -88,7 +88,7 @@ def main(argv):
plants = np.array(ExG_ExR>0) plants = np.array(ExG_ExR>0)
#gdalnumeric.SaveArray(1*(plants.reshape(origin_shape[0], origin_shape[1])), os.path.join(output_directory, PhotoID + '_segmented_ExG_ExR.tif'), format='GTiff') #gdalnumeric.SaveArray(1*(plants.reshape(origin_shape[0], origin_shape[1])), os.path.join(output_directory, PhotoID + '_segmented_ExG_ExR.tif'), format='GTiff')
create_GeoTiff(os.path.join(output_directory, PhotoID + '_segmented_ExG_ExR', ExG_ExR, gdal.GDT_Byte) create_GeoTiff(os.path.join(output_directory, PhotoID + '_segmented_ExG_ExR', ExG_ExR, gdal.GDT_Byte))
#ExG_soil = ExG[image_mask_soil==1] #ExG_soil = ExG[image_mask_soil==1]
#print(ExG_soil.size) #print(ExG_soil.size)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment