simulation
This commit is contained in:
@@ -468,6 +468,10 @@ class ScannerProcess(Task):
|
||||
msg = self.manager.set_well_position()
|
||||
self._send(**msg)
|
||||
|
||||
elif topic == 'track':
|
||||
self.cam.use_tracking = value=="1"
|
||||
self._send(state=topic, msg=f"Tracking: {self.cam.use_tracking}")
|
||||
|
||||
elif topic in ['min_area_px', 'max_area_ratio', 'max_planarians', 'merge_kernel_size', 'min_contour_dist_px']:
|
||||
value = int(value) if topic in ['min_area_px', 'max_planarians', 'merge_kernel_size', 'min_contour_dist_px'] else float(value)
|
||||
self.manager.tracker_config[topic] = value
|
||||
|
||||
@@ -48,6 +48,7 @@ class ScannerManager {
|
||||
this.max_planarians = options.max_planarians;
|
||||
this.merge_kernel_size = options.merge_kernel_size;
|
||||
this.min_contour_dist_px = options.min_contour_dist_px;
|
||||
this.track = options.track;
|
||||
|
||||
}
|
||||
|
||||
@@ -84,7 +85,7 @@ class ScannerManager {
|
||||
this.max_planarians.addEventListener('change', (e) => { this._send({ type: 'calibrate', topic: "max_planarians", value: e.target.value}); });
|
||||
this.merge_kernel_size.addEventListener('change', (e) => { this._send({ type: 'calibrate', topic: "merge_kernel_size", value: e.target.value}); });
|
||||
this.min_contour_dist_px.addEventListener('change', (e) => { this._send({ type: 'calibrate', topic: "min_contour_dist_px", value: e.target.value }); });
|
||||
|
||||
this.track.addEventListener('click', (e) => { this._send({ type: 'calibrate', topic: "track", value: e.target.value }); });
|
||||
}
|
||||
|
||||
registerSocket(socket) {
|
||||
|
||||
@@ -150,7 +150,9 @@
|
||||
</div>
|
||||
{% if conf.tracking %}
|
||||
<div class="w3-row w3-row-padding w3-light-grey w3-margin-1 w3-round w3-round-large">
|
||||
<div class="w3-col">{% trans 'Configuration du tracking' %}</div>
|
||||
<div class="w3-col"><input id="_track" type="checkbox" value="0" onclick="if (this.checked){this.value='1';}else{ this.value='0';}">
|
||||
{% trans 'Configuration du tracking' %}
|
||||
</div>
|
||||
<div class="w3-half">
|
||||
<input id="_min_area_px" type="number" min="5" max="100" step="1" class="w3-round" value="{{ conf.min_area_px }}"
|
||||
title="{% trans 'surface minimale de contour pour être considéré valide (px carré)' %}"><br>{% trans 'Min contour' %}
|
||||
@@ -257,7 +259,8 @@
|
||||
max_area_ratio : sId("_max_area_ratio"),
|
||||
max_planarians : sId("_max_planarians"),
|
||||
merge_kernel_size : sId("_merge_kernel_size"),
|
||||
min_contour_dist_px : sId("_min_contour_dist_px")
|
||||
min_contour_dist_px : sId("_min_contour_dist_px"),
|
||||
track : sId("_track")
|
||||
};
|
||||
</script>
|
||||
<script src="/static/scanner/js/calibration.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user