raft working
This commit is contained in:
@@ -170,9 +170,10 @@ class Stitcher:
|
||||
|
||||
def extract_tiles(self):
|
||||
if not self.isstitch:
|
||||
tile_idx = self.__get_tile_index_by_position(self.pos_default[7][0], self.pos_default[7][1])
|
||||
if tile_idx is None:
|
||||
tile_idx = 7
|
||||
# tile_idx = self.__get_tile_index_by_position(self.pos_default[7][0], self.pos_default[7][1])
|
||||
tile_idx = 7
|
||||
# if tile_idx is None:
|
||||
# tile_idx = 7
|
||||
# Ensure index is always iterable (list or array)
|
||||
self.index = [tile_idx] if isinstance(tile_idx, int) else tile_idx
|
||||
self.ncol = 1
|
||||
|
||||
@@ -166,8 +166,8 @@ class Sensor:
|
||||
return None
|
||||
self.frame = frame
|
||||
# Convert to grayscale
|
||||
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
|
||||
|
||||
# gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
|
||||
gray = frame
|
||||
# Extract and stitch tiles
|
||||
self.stitcher.get_stitch_unit(gray)
|
||||
self._extract_tiles(gray)
|
||||
@@ -215,7 +215,8 @@ class Sensor:
|
||||
if self.img is None:
|
||||
raise Exception("Warning: Get image first")
|
||||
|
||||
flow = self.__tracker.track(self.img)
|
||||
# flow = self.__tracker.track(self.img)
|
||||
flow = self.__tracker.track_raft(self.img)
|
||||
if hasattr(flow, 'download'):
|
||||
flow = flow.download()
|
||||
self.flow = flow
|
||||
|
||||
Reference in New Issue
Block a user