Closed w136111526 closed 5 years ago
我想把你rnet图片保存下来看看,怎么写出来的不对啊,下面是我的代码: ZQ_CNN_Tensor4D_NHW_C_Align128bit& net_Img = task_rnet_images[0]; int nWidth = net_Img.GetW(); int nHeight = net_Img.GetH(); auto data = netImg.GetFirstPixelPtr(); cv::Mat mat(nHeight, nWidth, CV32FC4, data); cv::imwrite("e:\temp.jpg", mat);
可能有padding,你最好挨个赋值
我想把你rnet图片保存下来看看,怎么写出来的不对啊,下面是我的代码: ZQ_CNN_Tensor4D_NHW_C_Align128bit& net_Img = task_rnet_images[0]; int nWidth = net_Img.GetW(); int nHeight = net_Img.GetH(); auto data = netImg.GetFirstPixelPtr(); cv::Mat mat(nHeight, nWidth, CV32FC4, data); cv::imwrite("e:\temp.jpg", mat);