示例#1
0
 def u8(img, minv, maxv):
     width, height, nbands = adam.heman_image_info(img.img)
     arr = numpy.zeros(width * height * nbands, dtype=numpy.uint8)
     adam.heman_export_u8(img.img, minv, maxv, arr)
     if nbands > 1:
         return numpy.reshape(arr, (height, width, nbands))
     return numpy.reshape(arr, (height, width))
示例#2
0
 def __init__(self, pts):
     width, height, nbands = adam.heman_image_info(pts)
     nparray = adam.heman_image_array(pts)
     self.pts = pts
     self.width = width
     self.nbands = nbands
     if nbands > 1:
         self.array = numpy.reshape(nparray, (width, height, nbands))
     else:
         self.array = numpy.reshape(nparray, (width, height))
示例#3
0
 def __init__(self, img):
     width, height, nbands = adam.heman_image_info(img)
     nparray = adam.heman_image_array(img)
     self.img = img
     self.width = width
     self.height = height
     self.nbands = nbands
     if nbands > 1:
         self.array = numpy.reshape(nparray, (width, height, nbands))
     else:
         self.array = numpy.reshape(nparray, (width, height))