Blackbody crashes on some thermogams
Issue #1
resolved
No description provided.
Comments (6)
-
reporter -
reporter Error for E40 is the following:
thread 'main' panicked at 'slice index starts at 38912 but ends at 2476', /[..]/flyr-0.4.0/src/lib/flyr.rs:145:30 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Which corresponds to these lines in
flyr
, specifically line 6’s&bytes[start..end]
. I doubt this line is wrong, otherwise other thermograms would fail to load. Perhaps for these models, the length is stored differently.fn parse_camera_info( bytes: &[u8], metadata: &FlirRecordEntryMetadata, ) -> Result<FlirCameraInfo, io::Error> { let start = metadata.offset as usize; let end = metadata.length as usize; let camera_info_bytes = &bytes[start..end]; match Cursor::new(camera_info_bytes).read_be::<FlirCameraInfo>() { Ok(camera_info) => Ok(camera_info), _ => Err(io::Error::new(io::ErrorKind::InvalidData, "Failed reading FLIR image's camera info")), } }
-
reporter Error for B400 is the same, probably the same issue:
thread 'main' panicked at 'slice index starts at 154720 but ends at 2476', /[..]/flyr.rs:145:30
-
reporter -
assigned issue to
-
assigned issue to
-
reporter Due to unwraps for camera model S60 NTSC:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ShapeError/IncompatibleShape: incompatible shapes', /[..]/flyr-0.4.2/src/lib/flyr.rs:239:45
-
reporter - changed status to resolved
Issue resolved for the B400 and E40. Lost the S60 camera examples, so can’t test with those anymore.
- Log in to comment
Notably, those from ThermoCam B400 and E40.