File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ trap 'echo "Stopping streams..."; pkill -P $SCRIPT_PID; exit' SIGINT
1212# Start both mpv streams as child processes
1313mpv 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 &
1414mpv 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
Original file line number Diff line number Diff 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 ( ) ;
You can’t perform that action at this time.
0 commit comments