-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is vcpkg required if I installed from Chocolaty #118
Comments
Please also set |
Well, the build log says:
so something is not right. Here another Windows user is mentioning the need to restart so you can maybe try that. |
Did you have any luck? |
I suggest you check the whole thread in #113, that error was also mentioned there (and solved). |
I copied all the I just downloaded it from here but not sure where shall I put it |
I believe that when you install OpenCV from vcpkg you get different modules in separate files, so you should have opencv_core, opencv_imgproc and do on. But generally can you please post the full output of the following command:
|
mm, before the full log, actuall I installed opencv in multiple way, from python, from GoCV 'faileda from chocolaty and vcpkg, trying to do cleaning to avoid conflicting issues, anyhow, here is the full log as it is very long: https://gist.github.com/hyousef-rusty/7e41a48c35754b70696081f62887250a |
As far as I can see there is a version mismatch between what you have in headers and library file name:
So I believe you installed version 4.1.2 so you'd need to link to |
Oooof, finally got it, I removed everything I've though I'm not sure if really required, but wanted to do as fresh install.
[dependencies]
opencv = {version = "0.34", features = ["buildtime-bindgen"]}
use opencv::{
core,
highgui,
prelude::*,
videoio,
};
fn run() -> opencv::Result<()> {
let window = "video capture";
highgui::named_window(window, 1)?;
#[cfg(feature = "opencv-32")]
let mut cam = videoio::VideoCapture::new_default(0)?; // 0 is the default camera
#[cfg(not(feature = "opencv-32"))]
let mut cam = videoio::VideoCapture::new(0, videoio::CAP_ANY)?; // 0 is the default camera
let opened = videoio::VideoCapture::is_opened(&cam)?;
if !opened {
panic!("Unable to open default camera!");
}
loop {
let mut frame = core::Mat::default()?;
cam.read(&mut frame)?;
if frame.size()?.width > 0 {
highgui::imshow(window, &mut frame)?;
}
let key = highgui::wait_key(10)?;
if key > 0 && key != 255 {
break;
}
}
Ok(())
}
fn main() {
run().unwrap()
}
|
I’m glad it worked! |
For
Only this line should not have ? operator (Rust documentation). Others return |
Hi, I also cannot use opencv on windows #326. Could anyone give some hints? Thanks! |
Why does this code cause an error in reading? |
I use version 0.70 |
Can you please open a new issue and post the full output you're getting in console? |
The following is all the information related to this problem that I got on the console
|
Try using |
@twistedfall So what should I do if I want to get a picture file through the camera? What is the format of the picture? |
I followed the exact steps and im getting these errors [note that i didnt do anything related to vcpkg manager and used only choco but its asking to use vcpkg configs something.. ]
|
At Window10, I installed opencv and llvm using chocolaty, trying to run simple example:
With Toml as:
But I got the below error:
The text was updated successfully, but these errors were encountered: