Created
December 11, 2020 12:10
-
-
Save envyen/846f6e6f5e28e27aa2750c5c4baa43a5 to your computer and use it in GitHub Desktop.
NV12 buffer to BGR in OpenCV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cv::Mat BGR; | |
cv::Mat NV12 = cv::Mat(height * 3/2, Width, CV_8UC1, nv12Buffer); | |
cv::cvtColor(NV12, BGR, CV_YUV2BGR_YV12); | |
cv::imwrite("bgr.png", BGR); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment