图像亮度问题 [英] Problem With Image Brightness
本文介绍了图像亮度问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我的程序从彩色图像中提取特征
但是我的代码提取了颜色的指定范围(R,G,B)
实时测试程序时出现问题
关于亮度的问题
拍摄图像时的亮度
更改颜色,使其超出我的颜色代码范围
我需要有关如何通过预处理解决此问题的帮助
注意:如果我使范围变长,则会提取更多不需要的颜色.
hi all
My program extracting features from a colored image
but my code extract specified range (R,G,B) of a color
i have a problem when i test the program in a real time
the problem about Brightness
the brightness of the time of capturing the image
change colors so it be out of my code range of color
I need a help about how i get over this problem by a pre-processing
Note : if i make the range long more unwanted colors will extracted
推荐答案
您可能需要将图像转换为其他颜色空间,例如HSL或HSB.因此,您可以将亮度视为向量的一部分.
从本文开始,它包含完整的c#代码.
要了解色彩空间,请阅读此,或通过Google对其进行查找.
You probably need to convert your image into another color space, like HSL or HSB for example. So your can treat brightness as a component of the vector.
Start from this article, it contains a complete c# code.
To understand color spaces read this, or google for it.
谢谢回答ZoltánZörgő
我在AForge中使用了亮度"滤镜
这非常有用
Thank you For Answer Zoltán Zörgő
I Used The Brightness filter in AForge
It is very useful
private void button1_Click(object sender, EventArgs e)
{
ApplyFilter(new BrightnessCorrection() , image1);
}
private void ApplyFilter(IFilter filter , Bitmap x)
{
x = filter.Apply(x);
// display filtered image
pictureBox2.Image = x;
}
这篇关于图像亮度问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文