zuoqing1988 / ZQCNN

一款推理框架,同时有很多有用的demo,觉得好用请点星啊
MIT License
2.22k stars 508 forks source link

Image Save #28

Closed w136111526 closed 5 years ago

w136111526 commented 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);

zuoqing1988 commented 5 years ago

可能有padding,你最好挨个赋值