简体   繁体   English

我应该将像素的rgb值视为一个值吗?

[英]Should I consider rgb values of a pixel as one value?

I was reading this paper for a project work using imagmagick and C++. 我在读纸使用imagmagick和C ++的一个项目工作。

We train on 1.6 million 32*32 color images that have been preprocessed by subtracting from each pixel its mean value over all images and then dividing by the standard deviation of all pixels over all images. 我们训练了160万张32 * 32彩色图像,这些图像已经过预处理,方法是从每个像素中减去所有图像的平均值,然后除以所有图像中所有像素的标准差。

I've trouble distinguishing between "from each pixel its mean value over all images" and "standard deviation of all pixels over all images". 我很难区分“每个像素在所有图像上的平均值”和“所有像素在所有图像上的标准偏差”之间。

Since, I'm dealing with color images, can I just take rgb values of each pixel as one value or should I calculate the mean and SD for every color differently? 既然我正在处理彩色图像,是否可以仅将每个像素的rgb值作为一个值,还是应该以不同的方式计算每种颜色的均值和SD?

For example if I have r=255, g=255, b=255, can I take pixel value as (in binary), (r<<16)+(g<<8)+b ? 例如,如果我有r = 255,g = 255,b = 255,我可以将像素值取为(二进制),(r << 16)+(g << 8)+ b吗?

Color channel values should be used independently. 颜色通道值应独立使用。 If you would use 32 bit representation of the pixels, you would get big value differences between very near colors which differ in red or green channel. 如果使用像素的32位表示,则在红色或绿色通道不同的非常接近的颜色之间将获得较大的值差异。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM