Giter VIP home page Giter VIP logo

Comments (5)

oli-obk avatar oli-obk commented on August 15, 2024

Hmm... this looks to me like a failure to find your webcam. I'm not sure I can debug this, since my hardware works.

from camera_capture.

tpltnt avatar tpltnt commented on August 15, 2024

Interesting. The problem actually seems to be on my end. I can use my webcam with a browser, but not via processing (as a quick test). Either way, a more graceful error-handling should help future users.

from camera_capture.

maurokenny avatar maurokenny commented on August 15, 2024

I've tried
sudo apt-get install -y libv4l-dev
and
sudo apt-get install libjpeg-dev
It resolves this problem but now I have another one:

 RUST_BACKTRACE=1 cargo run --example hello_camera
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s
     Running `target/debug/examples/hello_camera`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidFps([0.0])', examples/hello_camera.rs:5:15
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1504
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:511
  11: rust_begin_unwind
             at src/libstd/panicking.rs:419
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:111
  13: core::option::expect_none_failed
             at src/libcore/option.rs:1268
  14: core::result::Result<T,E>::unwrap
             at /home/kenny/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/result.rs:1005
  15: hello_camera::main
             at examples/hello_camera.rs:5
  16: std::rt::lang_start::{{closure}}
             at /home/kenny/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
  17: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  18: std::panicking::try::do_call
             at src/libstd/panicking.rs:331
  19: std::panicking::try
             at src/libstd/panicking.rs:274
  20: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  21: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  22: std::rt::lang_start
             at /home/kenny/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/rt.rs:67
  23: main
  24: __libc_start_main
  25: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

from camera_capture.

maurokenny avatar maurokenny commented on August 15, 2024

I fixed this error increasing the number of frames as:
let cam = cam.fps(30.0).unwrap().start().unwrap();

from camera_capture.

oli-obk avatar oli-obk commented on August 15, 2024

oh. I hardcoded a fps in the examples? Yea we should fix that. I don't remember how to extract the fps and don't have time right now to really dig into this crate again, but I'll happily accept PRs

from camera_capture.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.