Skip to content

Commit 32b2cad

Browse files
committed
slalom work
1 parent 1aeb0c0 commit 32b2cad

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

playstreams.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ trap 'echo "Stopping streams..."; pkill -P $SCRIPT_PID; exit' SIGINT
1212
# Start both mpv streams as child processes
1313
mpv rtsp://192.168.2.5:8554/front.mp4 --title=Front --no-cache --untimed --no-demuxer-thread --vd-lavc-threads=1 --profile=low-latency --no-correct-pts --osc=no &
1414
mpv rtsp://192.168.2.5:8554/bottom.mp4 --title=Bottom --no-cache --untimed --no-demuxer-thread --vd-lavc-threads=1 --profile=low-latency --no-correct-pts --osc=no &
15-
mpv rtsp://192.168.2.5:8554/front_annotated.mp4 --title=Bottom --no-cache --untimed --no-demuxer-thread --vd-lavc-threads=1 --profile=low-latency --no-correct-pts --osc=no &
15+
# mpv rtsp://192.168.2.5:8554/front_annotated.mp4 --title=Bottom --no-cache --untimed --no-demuxer-thread --vd-lavc-threads=1 --profile=low-latency --no-correct-pts --osc=no &
16+
# mpv rtsp://127.0.0.1:8554/front.mp4 --title=Front --no-cache --untimed --no-demuxer-thread --vd-lavc-threads=1 --profile=low-latency --no-correct-pts --osc=no &
17+
# mpv rtsp://127.0.0.1:8554/bottom.mp4 --title=Bottom --no-cache --untimed --no-demuxer-thread --vd-lavc-threads=1 --profile=low-latency --no-correct-pts --osc=no &
1618

1719

1820
# Wait for child processes

src/vision/slalom.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ impl VisualDetector<f64> for Slalom {
7272
&mut self,
7373
input_image: &Mat,
7474
) -> anyhow::Result<Vec<VisualDetection<Self::ClassEnum, Self::Position>>> {
75-
const MIN_AREA: f64 = 1000.0;
76-
const MAX_AREA: f64 = 11000.0;
75+
let areas = self.area_bounds.clone();
76+
let MIN_AREA = areas.start();
77+
let MAX_AREA = areas.end();
7778

7879
self.image = resize(input_image, &self.size)?.into();
7980
let mut yuv_image = Mat::default();
@@ -113,7 +114,7 @@ impl VisualDetector<f64> for Slalom {
113114
#[cfg(feature = "logging")]
114115
logln!("AREA: {area}");
115116

116-
if area > MIN_AREA && area < MAX_AREA {
117+
if area > *MIN_AREA && area < *MAX_AREA {
117118
let rect = min_area_rect(&contour)?;
118119

119120
let mut box_rect = Mat::default();

0 commit comments

Comments
 (0)