Skip to content

V4L2: Add V4L2_PIX_FMT_Y12 (12 bit grey) support#16626

Merged
alalek merged 4 commits intoopencv:3.4from
firebladed:firebladed-v4l2_pix_fmt_y12
Feb 28, 2020
Merged

V4L2: Add V4L2_PIX_FMT_Y12 (12 bit grey) support#16626
alalek merged 4 commits intoopencv:3.4from
firebladed:firebladed-v4l2_pix_fmt_y12

Conversation

@firebladed
Copy link
Copy Markdown
Contributor

@firebladed firebladed commented Feb 20, 2020

resolves #16620

Pull Request Readiness Checklist

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

  • I agree to contribute to the project under OpenCV (BSD) License.
  • 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
  • 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

@asmorkalov
Copy link
Copy Markdown
Contributor

Hello @firebladed Thanks for the patch! Please pay attention that CI bot reports compilation issue on linux: https://pullrequest.opencv.org/buildbot/builders/precommit_linux64/builds/24932/steps/compile%20release/logs/stdio

/build/precommit_linux64/3.4/opencv/modules/videoio/src/cap_v4l.cpp: In member function 'void cv::CvCaptureCAM_V4L::convertToRgb(const cv::Buffer&)':
/build/precommit_linux64/3.4/opencv/modules/videoio/src/cap_v4l.cpp:1591:90: error: expected ')' before ';' token
         cv::Mat(imageSize, CV_16UC1, currentBuffer.start).convertTo(temp, CV_8U, 1.0 / 16;
                                                                                          ^
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_v4l.cpp.o] Error 1
make[2]: Leaving directory `/build/precommit_linux64/build'
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2

Also could you provide list of cameras or other hardware you used to test the solution or you expect that it should work for?

@alalek
Copy link
Copy Markdown
Member

alalek commented Feb 27, 2020

@firebladed Thank you for contribution!
Did you have a chance to validate patch on your camera?

@firebladed
Copy link
Copy Markdown
Contributor Author

not yet, im going to look into it tommorow

@firebladed
Copy link
Copy Markdown
Contributor Author

Ive tested it and get images out of it, processing the limited range greyscale outputs is not something i am experienced with so i am unsure of their "accuracy" but it is defiantly functioning

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@alalek alalek merged commit f00607c into opencv:3.4 Feb 28, 2020
@alalek alalek mentioned this pull request Feb 28, 2020
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.

missing V4L2_PIX_FMT_Y12 support

3 participants