在C#中将黑白图像转换为灰度图像 [英] Convert Black and White image to Grayscale Image in C#

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

问题描述

我想将黑白图像转换为灰度图像。有没有办法在C#中转换它?

I want to convert Black and White image to Grayscale Image. Is there any way to convert it in C#?

推荐答案

这是一个如何转换为灰度的教程:



http://www.codersource.net/MicrosoftNet/CImageProcessing/TutorialonConvertingImagestoGrayscale.aspx [ ^ ]



请注意,只有2种颜色的黑/白图像永远不会是任何东西,即使是灰度图像。你不能从一开始就添加那些不存在的颜色(好吧,也许如果你使用某种插值,但我从来没有听说过)。



这就像拍摄低分辨率的图像并尝试提高分辨率。你可以这样做,但由于这个原因,图像不会得到更好的质量。
Here is a tutorial on how to convert to Grayscale:

http://www.codersource.net/MicrosoftNet/CImageProcessing/TutorialonConvertingImagestoGrayscale.aspx[^]

Just be aware that a black/white image with only 2 colors will never be anything but that, even as a grayscale image. You can't add colors that aren't there from the beginning (well, perhaps if you use some kind of interpolation, but I've never heard of that).

It's like taking an image with a low resolution and try to make the resolution higher. You can do that, but the image won't get a better quality because of that.


我刚刚在下面的链接上找到了非常有趣的文章。



用.NET(C#)灰度图像的快速方法 [< a href =http://www.liensberger.it/web/blog/?p=155target =_ blanktitle =New Window> ^ ]

< a href =http://msdn.microsoft.com/en-us/library/ms749020.aspx>如何:将图像转换为灰度[msdn] [ ^ ]



如何将图像转换为灰度
[ ^ ]



问候......:笑:
I just found very interesting article on below link.

A fast way to grayscale an image in .NET (C#)[^]
How to: Convert an Image to Greyscale [msdn] [^]

How to convert an image to grayscale
[^]

Regards..:laugh:


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

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