关于PixelType_Gvsp_BayerRG8等相机格式处理
if (en_dst_pixel_type == PixelType_Gvsp_RGB8_Packed) { std::cout << " ----" << std::endl; cv::Mat src_image = cv::Mat(st_out_frame.stFrameInfo.nHeight,st_out_frame.stFrameInfo.nWidth,CV_8UC1,st_out_frame.pBufAddr); cvtColor(src_image,src_image, cv::COLOR_BayerBG2BGR); cam_data.image = GMat(st_out_frame.stFrameInfo.nHeight, st_out_frame.stFrameInfo.nWidth, GMatType<uint8_t, 3>::Type, src_image.data) .Clone(); }
if (en_dst_pixel_type == PixelType_Gvsp_RGB8_Packed) { std::cout << " ----" << std::endl; cv::Mat src_image = cv::Mat(st_out_frame.stFrameInfo.nHeight,st_out_frame.stFrameInfo.nWidth,CV_8UC1,st_out_frame.pBufAddr); cvtColor(src_image,src_image, cv::COLOR_BayerBG2BGR); cam_data.image = GMat(st_out_frame.stFrameInfo.nHeight, st_out_frame.stFrameInfo.nWidth, GMatType<uint8_t, 3>::Type, src_image.data) .Clone(); }
后续针对BayerRG8等相机进行适配