示例#1
0
 def __init__(self, ndarray, basis=None):
     assert isinstance(ndarray, np.ndarray)
     assert len(ndarray.shape) is 2, "Not a valid visible"
     self.ndarray = ndarray
     if basis:
         self.coord = basis
     else:
         self.coord = Rectangle.from_ndarray(self.ndarray)
示例#2
0
 def __init__(self, full_color_image, orientation, basis):
     # Projection(full_color_image, orientation, 0.2).debug()
     self.img = full_color_image
     self.projection = BinaryProjection(full_color_image, orientation)
     self.basis = basis or Rectangle.from_ndarray(full_color_image)
     self.measurement = full_color_image.shape[orientation]
示例#3
0
 def __init__(self, full_color_image, orientation, basis):
     # Projection(full_color_image, orientation, 0.2).debug()
     self.img = full_color_image
     self.projection = BinaryProjection(full_color_image, orientation)
     self.basis = basis or Rectangle.from_ndarray(full_color_image)
     self.measurement = full_color_image.shape[orientation]
示例#4
0
 def reset(self):
     self.coord = Rectangle.from_ndarray(self.ndarray)