Skip to content

Commit a361537

Browse files
committed
flydra-feature-detector: simplify
1 parent ad74077 commit a361537

File tree

1 file changed

+1
-16
lines changed
  • flydra-feature-detector/src

1 file changed

+1
-16
lines changed

flydra-feature-detector/src/lib.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ impl TrackingState {
164164

165165
fn do_work<S1, S2>(
166166
&mut self,
167-
// corrected_framenumber: usize,
168167
raw_im_full: &S1,
169168
cfg: &ImPtDetectCfg,
170169
maybe_mask_image: Option<&S2>,
@@ -814,21 +813,7 @@ impl FlydraFeatureDetector {
814813
state.frames_since_background_update += 1;
815814
}
816815
// The following can take 40+ msec? e.g. 2018-08-29T08:41:19.582785551Z
817-
let points = if let Some(ref mask_image) = self.mask_image {
818-
state.do_work(
819-
//corrected_frame,
820-
&raw_im_full,
821-
&self.cfg,
822-
Some(mask_image),
823-
)?
824-
} else {
825-
state.do_work::<_, FastImageData<Chan1, u8>>(
826-
// corrected_frame,
827-
&raw_im_full,
828-
&self.cfg,
829-
None,
830-
)?
831-
};
816+
let points = state.do_work(&raw_im_full, &self.cfg, self.mask_image.as_ref())?;
832817

833818
let radius = self.cfg.feature_window_size;
834819
let point_data: Vec<_> = points

0 commit comments

Comments
 (0)