예제 #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)