Open vshesh opened 4 years ago
I think the dependency comes from camera_capture, which unfortunately only supports Windows and Linux. I think that actually should be a dev dependency, as its not required for detecting or localizing LFTags in images, and is only required for the example code which detects tags from the webcam.
If you are interested in detecting tags in images/videos, try to move the camera_capture dependency into dev-dependencies (and if it works, a pull request with that modification would be great), but if you want to detect tags from the webcam, there is no rust library for webcam capture as far as I know.
I have moved the dependency to dev as you suggested, and now am encountering a different error (I guess it finished building dependencies and is now trying to build the package)...
error[E0554]: `#![feature]` may not be used on the stable release channel
--> src/lib.rs:1:1
|
1 | #![feature(test)]
| ^^^^^^^^^^^^^^^^^
do you build against nightly/is there some other way to build this?
also as far as reading video frames goes - I notice you have opencv as a dependency. does it's VideoCapture module not work for reading frames from a webcam? (I would like to detect using a webcam, hence I ask)
thanks again for all the help and sure if i get this working I can make a pull request
Hi,
back to trying to get this to work.
I have changed the imageproc
depedency to 0.19.0
from 0.18.0
to solve a compiler error (imageproc 0.18 doesn't compile on rust stable > 1.48), and now am seeing:
error[E0277]: the trait bound `Luma<u16>: image::traits::Pixel` is not satisfied
--> src/decode.rs:316:5
|
316 | / pub fn decode_lftag(root: &LFTagComponents, camera: CameraIntrinsics, gradient: &mut Image<Luma<u16>>) -> Option<DecodedLFTag> {
317 | | if let LFTagComponents::Root { nodes, class, bg } = root {
318 | | let mut fvs: Vec<_> = nodes.iter().map(|n| {
319 | | if let LFTagComponents::Normal {node: fv} = n {
... |
554 | | }
555 | | }
| |_____^ the trait `image::traits::Pixel` is not implemented for `Luma<u16>`
error: aborting due to previous error; 22 warnings emitted
For more information about this error, try `rustc --explain E0277`.
error: could not compile `fiducial`
How do I go about figuring out what type signature would work? I checked the image crate documentation and found nothing that would explain why Luma<u16>
doesn't work and what I could replace it with.
Thanks in advance.
I suspect the issue is that the versions of imageproc and image need to be aligned, try bumping the image crate version too?
For easier discussion, would you mind joining the rust-cv discord? I often hang out there (I go by @kindiana
there) and I think synchronously working through these issues would be easier.
alright, i'm joining the discord. thank you for all the help. bumping the image crate and image proc to newest versions didn't help - generated more errors, actually.
Hi,
Read your paper and saw this implementation which is exciting. Want to use LFTags in a project I'm working on, but cannot get this to compile on a mac.
cargo build
uses the v4l2 library somewhere in the dependency chain and this causes the build to fail:is there some alternate way to get this working without rscam/v4l2 - some mac equivalent?