Skip to content
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

opencv: Add a override option to enable V4L2 support #313062

Open
Sigmanificient opened this issue May 20, 2024 · 0 comments
Open

opencv: Add a override option to enable V4L2 support #313062

Sigmanificient opened this issue May 20, 2024 · 0 comments

Comments

@Sigmanificient
Copy link
Member

Issue description

I would like to compile a software that uses opencv with the V4L2 module, but currently facing a compile error:

src/camera/new_camera.cpp: In function 't_bunny_camera* bunny_new_camera(int)':
src/camera/new_camera.cpp:18:42: error: 'CAP_V4L2' is not a member of 'cv'
   18 |       cam = new cv::VideoCapture(id, cv::CAP_V4L2);
      |                                     

Additional context

I didn't find any override option to enable it, but on stack overflow, I found a post about it which suggest to add the following cmake flags:

-DWITH_V4L=ON 
-DWITH_LIBV4L=ON

However I couldn't get it to work.

Notify maintainers

@basvandijk

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.30, NixOS, 24.05 (Uakari), 24.05.20240511.062ca2a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos-23.05"`
 - channels(sigmanificient): `""`
 - nixpkgs: `/nix/store/pfc56yr7y3wflvbgnrpscf2n1m4j3xd7-source`
@Sigmanificient Sigmanificient changed the title opencv: Add a override option to enable V4L opencv: Add a override option to enable V4L2 support May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant