diff --git a/test_tube_scanner/home/settings.py b/test_tube_scanner/home/settings.py index 0f34c49..9047200 100644 --- a/test_tube_scanner/home/settings.py +++ b/test_tube_scanner/home/settings.py @@ -388,9 +388,9 @@ EXPORT_REMOTE_PATH = config("EXPORT_REMOTE_PATH") EXPORT_DESTINATIONS = ["local", "remote"] -TEST_VIDEOFILE = False +TEST_VIDEOFILE = True -TRACKING = False +TRACKING = True TRACKER_TUBE_AXIS = "vertical" TRACKER_MIN_AREA = 200 diff --git a/test_tube_scanner/modules/videofile_capture.py b/test_tube_scanner/modules/videofile_capture.py index 80d0faf..59dd24d 100644 --- a/test_tube_scanner/modules/videofile_capture.py +++ b/test_tube_scanner/modules/videofile_capture.py @@ -119,7 +119,6 @@ class VideoFileCapture(VideoCaptureInterface): self.close() self.open() self._error_occured = False - if not self._cap or not self._cap.isOpened(): raise CaptureError("Le fichier n'est pas ouvert") diff --git a/test_tube_scanner/scanner/models.py b/test_tube_scanner/scanner/models.py index 5f306c9..9089357 100644 --- a/test_tube_scanner/scanner/models.py +++ b/test_tube_scanner/scanner/models.py @@ -78,6 +78,7 @@ class Well(models.Model): ordering = ['name', ] verbose_name = _("Puit") verbose_name_plural = _("Puits") + def __str__(self): return f'{self.name}' diff --git a/test_tube_scanner/scanner/process.py b/test_tube_scanner/scanner/process.py index 1155f02..ce9c1b3 100644 --- a/test_tube_scanner/scanner/process.py +++ b/test_tube_scanner/scanner/process.py @@ -148,7 +148,6 @@ class ScannerProcess(Task): self.cam = None self.grbl = None self.crop = None - #self.multiwel = None self.conf = None self.record_queue = Queue() self.data = ProcessData() @@ -179,27 +178,23 @@ class ScannerProcess(Task): self.crop = self.set_crop_radius(self.crop_radius) if settings.TEST_VIDEOFILE: + video_lists = [] + wells = models.Well.objects.all() + for wl in wells: + video_lists.append(str( settings.MEDIA_ROOT / 'simulation' / f'{wl.name}.mp4') ) + from modules.videofile_capture import VideoFileCapture self.cam = VideoFileCapture( - video_file=settings.MEDIA_ROOT / 'simulation' / 'part4-5fps.mp4', + video_file=settings.MEDIA_ROOT / 'simulation' / 'A1.mp4', fps=self.video_fps, width=self.video_width, height=self.video_height, jpeg_quality=self.video_quality, use_tracking=self.use_tracking, display=self._display, - video_lists=[], parent=self, - ) - ''' - settings.MEDIA_ROOT / 'simulation' / 'part1-5fps.mp4', - settings.MEDIA_ROOT / 'simulation' / 'part2-5fps.mp4', - settings.MEDIA_ROOT / 'simulation' / 'part3-5fps.mp4', - settings.MEDIA_ROOT / 'simulation' / 'part4-5fps.mp4', - settings.MEDIA_ROOT / 'simulation' / 'part5-5fps.mp4', - ] - ) - ''' + video_lists=video_lists, + ) elif not self.conf.use_rpicam: from modules.webcam_capture import WebcamCapture self.cam = WebcamCapture( @@ -312,6 +307,7 @@ class ScannerProcess(Task): pubsub.subscribe(self.group) #self._init_grbl() self.manager = MultiWellManager(process=self) + self.manager.set_calib_debug(False) for message in pubsub.listen(): try: