从相机普罗硅中保存垫子图像
Save Mat image from camera prosilica
我正在开发一个程序来从prosilica相机获取图像。
我将帧恢复为包含 ImageBuffer 变量的 strcut。
为了保存恢复的图像,我这样做:
tPvFrame frame;// a struct given by the SDK camera.
Mat Image=Mat(frame->Height, frame->Width, CV_32FC3, frame->ImageBuffer);
//the image depth is 5.
cout<<"Depth Image---------------------------"<<Image.depth()<<endl;
//The program has unexpectedly finished here
imwrite("image.jpg", Image);
请问有什么问题?
如果使用CV_32FC3
,Mat
图像深度为 3。然后,您无法创建Mat
映像,并且当您尝试写入该映像时,它会崩溃。
相关文章:
- 如何使用OpenCV将RBG图像转换为HSV,并将H、S和V值保存为C++中的3个独立图像
- 使用FFMPEG将RGB图像序列保存到.mp4时出现问题
- 将RGB图像保存为PPM格式
- Gstreamer:每 5 秒使用多文件墨水保存图像/jpeg
- 是否可以通过每次在内存中仅保存一个平铺来处理完整的平铺 tiff 图像?
- 将图像魔术 blob 保存到节点缓冲区
- 是否可以将图像列表保存到文件中?
- 在opencv c++目录中从/加载/保存多个图像
- 将 JPG 编码数组从 ROS sensor_msgs/压缩图像保存到 roscpp 中的文件
- 我想将 OpenCV 中处理后的图像保存为“input_name+enhanced.input_image_format
- 无法将图像保存在具有白色背景的JPG中 OpenCV
- c++:尝试将创建的图像保存到.jpg文件,但图像无法打开
- 将许多图像保存到矢量中,但它们不显示
- QT:将整个QSCrollarea内容作为图像保存
- 打开CV图像保存以较小的尺寸,无需压缩
- 将图像保存到内存
- Boost::GIL如何将图像保存为JPEG或PNG为char*
- c++ 32位tiff图像保存和加载
- 如何将图像保存为字符串的c++源代码
- 使用opencv将图像保存为ycbcr格式