Skip to content

Commit

Permalink
flydra-feature-detector: remove cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Jan 12, 2025
1 parent 214837c commit b9f2755
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 30 deletions.
8 changes: 0 additions & 8 deletions flydra-feature-detector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ pub struct FlydraFeatureDetector {
last_sent_raw_image_time: std::time::Instant,
mask_image: Option<FastImageData<Chan1, u8>>,
background_update_state: BackgroundAcquisitionState, // command from UI "take a new bg image"
frame_offset: Option<u64>,
acquisition_histogram: AcquisitionHistogram,
acquisition_duration_allowed_imprecision_msec: Option<f64>,

Expand Down Expand Up @@ -546,7 +545,6 @@ impl FlydraFeatureDetector {
w: u32,
h: u32,
cfg: ImPtDetectCfg,
frame_offset: Option<u64>,
transmit_feature_detect_settings_tx: Option<
mpsc::Sender<flydra_feature_detector_types::ImPtDetectCfg>,
>,
Expand All @@ -562,7 +560,6 @@ impl FlydraFeatureDetector {
mask_image: None,
last_sent_raw_image_time: std::time::Instant::now(),
background_update_state: BackgroundAcquisitionState::Initialization,
frame_offset,
acquisition_histogram,
acquisition_duration_allowed_imprecision_msec,
transmit_feature_detect_settings_tx,
Expand Down Expand Up @@ -593,11 +590,6 @@ impl FlydraFeatureDetector {
Ok(())
}

pub fn set_frame_offset(&mut self, value: u64) {
debug!("set_frame_offset");
self.frame_offset = Some(value);
}

// command from UI to say "take a new bg image"
pub fn do_take_current_image_as_background(&mut self) -> Result<()> {
debug!("taking bg image in camera");
Expand Down
3 changes: 0 additions & 3 deletions flydra-feature-detector/tests/test-fmf-tracking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ async fn track_fmf() -> anyhow::Result<()> {

let cfg = flydra_pt_detect_cfg::default_absdiff();

let frame_offset = None;

let mut ft = FlydraFeatureDetector::new(
&flydra_types::RawCamName::new("fmf".to_string()),
reader.width(),
reader.height(),
cfg,
frame_offset,
None,
None,
)?;
Expand Down
6 changes: 0 additions & 6 deletions flydra-feature-detector/tests/test-small.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ async fn track_small() -> anyhow::Result<()> {

let cfg = flydra_pt_detect_cfg::default_absdiff();

let frame_offset = None;

let mut ft = FlydraFeatureDetector::new(
&flydra_types::RawCamName::new("small-test-image".to_string()),
W,
H,
cfg,
frame_offset,
None,
None,
)?;
Expand Down Expand Up @@ -52,14 +49,11 @@ async fn track_moving_stride() -> anyhow::Result<()> {

let cfg = flydra_pt_detect_cfg::default_absdiff();

let frame_offset = None;

let mut ft = FlydraFeatureDetector::new(
&flydra_types::RawCamName::new("moving".to_string()),
W,
H,
cfg,
frame_offset,
None,
None,
)?;
Expand Down
13 changes: 0 additions & 13 deletions strand-cam/src/frame_process_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,6 @@ pub(crate) async fn frame_process_task<'a>(
#[allow(unused_assignments)]
let mut is_doing_object_detection = is_braid;

#[cfg(feature = "flydra_feat_detect")]
let frame_offset = if is_braid {
// We start initially unsynchronized. We wait for synchronizaton.
None
} else {
Some(0)
};

let transmit_feature_detect_settings_tx = if is_braid {
let (transmit_feature_detect_settings_tx, transmit_feature_detect_settings_rx) =
tokio::sync::mpsc::channel::<ImPtDetectCfg>(10);
Expand Down Expand Up @@ -157,7 +149,6 @@ pub(crate) async fn frame_process_task<'a>(
width,
height,
im_pt_detect_cfg.clone(),
frame_offset,
transmit_feature_detect_settings_tx,
acquisition_duration_allowed_imprecision_msec,
)?;
Expand Down Expand Up @@ -1463,10 +1454,6 @@ pub(crate) async fn frame_process_task<'a>(
}
Msg::SetFrameOffset(fo) => {
opt_frame_offset = Some(fo);
#[cfg(feature = "flydra_feat_detect")]
{
im_tracker.set_frame_offset(fo);
}
}
Msg::SetTriggerboxClockModel(cm) => {
triggerbox_clock_model = cm;
Expand Down

0 comments on commit b9f2755

Please sign in to comment.