我正在尝试将Flycapture2图像保存为浮点EXR图像。我从相机得到的像素格式是YUV420,为了保存它,我需要将它转换成RGB。做这件事最好的方法是什么?在这方面,精确度非常重要。
发布于 2017-04-07 20:27:21
您可以使用Flycapture SDK设置您的图像格式:
FlyCapture2::Format7ImageSettings fmt7ImageSettings;
FlyCapture2::Error error;
fmt7ImageSettings.pixelFormat = FlyCapture2::PixelFormat::PIXEL_FORMAT_BGR;
// Validate Format 7 settings
bool valid;
error = cam.ValidateFormat7Settings(&fmt7ImageSettings, &valid, &fmt7PacketInfo);
unsigned int num_bytes = fmt7PacketInfo.recommendedBytesPerPacket;
// Set Format 7 (partial image mode) settings
error = cam.SetFormat7Configuration(&fmt7ImageSettings, num_bytes);
if (error != FlyCapture2::ErrorType::PGRERROR_OK)
{
error.PrintErrorTrace();
}https://stackoverflow.com/questions/29307704
复制相似问题