在C#中将图像(.raw)转换为位图 [英] Converting an image (.raw) to bitmap in C#

查看:875
本文介绍了在C#中将图像(.raw)转换为位图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



基本上我正在研究一个目前正在计算2张图像的PSNR(峰值信噪比)的项目(一个是原始的和另一种是颜色量化的)。



为了让我计算PSNR,我的图像需要采用位图格式,现在对于ppm我已经管理了转换,但是对于.raw的图像格式我正在努力寻找解决方案,任何人都可以请我来源或解释如何在C#中完成这项工作?



非常感谢



Arj

Hi everyone,

Basically I am working on a project that is currently calculating the PSNR (peak signal noise ratio) of 2 images (one is the original and the other being the colour quantised one).

In order for me to calculate the PSNR my images need to be in bitmap format, now for ppm I have managed the conversion, however for images that are of .raw format I am struggling to find a solution, could anyone please lead me to a source or explain how this can be done in C#?

Many thanks

Arj

推荐答案

最好的办法是找出图像格式,RAW暗示它只是原始像素数据,并使用我的图像处理文章中的代码创建了一个Bitmap,你可以直接访问像素,并复制你的像素数据。
Your best bet is to find out the image format, RAW implies it's just raw pixel data, and using the code in my image processing articles to create a Bitmap you can access the pixels of directly, and copy in your pixel data.


这篇关于在C#中将图像(.raw)转换为位图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆