anlumo / gvf_snakes

A Rust implementation of the Gradient Vector Flow Snakes algorithm for image segmentation and object boundary detection.
0 stars 0 forks source link

First point Point { x: 0, y: 0 } == last point Point { x: 0, y: 0 } #1

Closed davehorner closed 9 months ago

davehorner commented 10 months ago
imageproc-0.23.0\src\drawing\polygon.rs:39:9:
First point Point { x: 0, y: 0 } == last point Point { x: 0, y: 0 }
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/635124704849eeead4e3a7bb6e663c5351571d93/library\std\src\panicking.rs:647
   1: core::panicking::panic_fmt
             at /rustc/635124704849eeead4e3a7bb6e663c5351571d93/library\core\src\panicking.rs:72
   2: imageproc::drawing::polygon::draw_polygon_mut<image::buffer_::ImageBuffer<image::color::Rgb<u8>,alloc::vec::Vec<u8,alloc::alloc::Global> > >
             at \imageproc-0.23.0\src\drawing\polygon.rs:39
   3: gvf_snakes::draw_snake_on_image
             at .\src\lib.rs:218
   4: gvf_snakes::run_gvf_snakes
             at .\src\lib.rs:338
   5: basic::main
             at .\examples\basic.rs:13
   6: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/635124704849eeead4e3a7bb6e663c5351571d93\library\core\src\ops\function.rs:250
   7: core::hint::black_box
             at /rustc/635124704849eeead4e3a7bb6e663c5351571d93\library\core\src\hint.rs:334
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

using the sample input.jpg, I get a panic.

anlumo commented 10 months ago

Well, it's a work in progress, as the README states…

This code was generated using ChatGPT4, and it doesn't work properly, even in best case scenarios. I've tried to understand the reason for this, but haven't gotten anywhere so far.

davehorner commented 9 months ago

All good, I learn in trying things and reporting errors too. I think I did get some results out of it. Thanks for sharing.