test filecapture
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -120,7 +120,6 @@ class VideoFileCapture(VideoCaptureInterface):
|
||||
self.open()
|
||||
self._error_occured = False
|
||||
|
||||
|
||||
if not self._cap or not self._cap.isOpened():
|
||||
raise CaptureError("Le fichier n'est pas ouvert")
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ class Well(models.Model):
|
||||
verbose_name = _("Puit")
|
||||
verbose_name_plural = _("Puits")
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.name}'
|
||||
|
||||
|
||||
@@ -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,
|
||||
video_lists=video_lists,
|
||||
)
|
||||
'''
|
||||
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',
|
||||
]
|
||||
)
|
||||
'''
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user