Convert VACQ_PIX_FORMAT_NV21 into cv::Mat CV_8UC3

Hi,

I’m trying to code own image processing chain, and I would like to know how to convert VACQ_PIX_FORMAT_NV21 image format into OpenCV RGB. I saw on the HelloWorld code how to convert depth (VACQ_PIX_FORMAT_RAW32) into OpenCV CV_32F:

cv::Mat depth_frame(input->frame->height,
			    input->frame->width,
			    CV_32F,
			    (void *)input->frame->planes[0].virt_addr,
			    input->frame->planes[0].stride);

I read the doc about NV21 and tried my own “converter”, but how to know if it’s good ? Is there a way to cv::imwrite the converted image to see if it’s good ?

Best,
Clément

This topic was automatically closed after 30 days. New replies are no longer allowed.