Skip to content

Commit

Permalink
fix: unit test for fish headtail works
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrutchf committed May 28, 2024
1 parent 41bd3d9 commit 43ae2f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fish/fish_head_tail_detector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ mod tests {

#[test]
fn test() {
let rust_img = image::io::Reader::open("./src/segmentations.png").unwrap().decode().unwrap().as_luma8().unwrap().clone();
let rust_img = image::io::Reader::open("./data/segmentations.png").unwrap().decode().unwrap().as_luma8().unwrap().clone();
let mask: ArrayBase<OwnedRepr<u8>, Dim<[usize; 2]>> = Array2::from_shape_vec((rust_img.height() as usize, rust_img.width() as usize), rust_img.as_raw().clone()).unwrap();
let res = FishHeadTailDetector::find_head_tail(mask);
assert_eq!(res, (array![1073, 1114], array![2317,1054]));
Expand Down

0 comments on commit 43ae2f6

Please sign in to comment.