Skip to content

videoio: test for V4L using virtual device#23944

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
mshabunin:test-v4l2
Jul 10, 2023
Merged

videoio: test for V4L using virtual device#23944
asmorkalov merged 1 commit intoopencv:4.xfrom
mshabunin:test-v4l2

Conversation

@mshabunin
Copy link
Copy Markdown
Contributor

@mshabunin mshabunin commented Jul 7, 2023

This PR will support future improvement in #18498

Instruction (from cap_v4l.cpp comment):
  • create 1 virtual device of type CAP (0x1) at /dev/video10
    sudo modprobe vivid ndevs=1 node_types=0x1 vid_cap_nr=10`
    
  • make sure user have read/write access (e.g. via group 'video')
    $ ls -l /dev/video10
    crw-rw----+ 1 root video ... /dev/video10
    
  • set environment variable:
    export OPENCV_TEST_V4L2_VIVID_DEVICE=/dev/video10
    
  • run v4l2 tests:
    opencv_test_videoio --gtest_filter=*videoio_v4l2*
    

Reference: https://www.kernel.org/doc/html/v4.8/media/v4l-drivers/vivid.html

Notes:
  • minor logging improvements in cap_v4l.cpp
  • not all formats are tested for now, excluded more complex JPEG and Bayer formats
  • picture contents is not tested

Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Tested manually with Ubuntu 18.04.

@asmorkalov asmorkalov added this to the 4.9.0 milestone Jul 10, 2023
@asmorkalov asmorkalov merged commit fdc0c12 into opencv:4.x Jul 10, 2023
@mshabunin mshabunin deleted the test-v4l2 branch July 10, 2023 13:53
asmorkalov pushed a commit that referenced this pull request Jul 14, 2023
Add V4L2_PIX_FMT_Y16_BE pixel format #18498

Address #18495
relates to #23944

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
- [ ] The PR is proposed to proper branch
- [x] There is reference to original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
- [ ] Test using Melexis MLX90640
@asmorkalov asmorkalov mentioned this pull request Jul 27, 2023
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
Add V4L2_PIX_FMT_Y16_BE pixel format opencv#18498

Address opencv#18495
relates to opencv#23944

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
- [ ] The PR is proposed to proper branch
- [x] There is reference to original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
- [ ] Test using Melexis MLX90640
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
Add V4L2_PIX_FMT_Y16_BE pixel format opencv#18498

Address opencv#18495
relates to opencv#23944

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
- [ ] The PR is proposed to proper branch
- [x] There is reference to original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
- [ ] Test using Melexis MLX90640
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants