简体   繁体   English

负RGB值

[英]Negative RGB Values

How do I visualize negative RGB values?. 如何可视化负RGB值?
As per OpenCV Documentation: 根据OpenCV文档:
CV_8S - 8-bit signed integers ( -128..127 ) CV_8S-8位有符号整数(-128..127)
Does it mean that -128 mean 0 and 127 means 255? 是否表示-128表示0,而127表示255?
If yes, then why do we need to have 如果是,那为什么我们需要
CV_8U - 8-bit unsigned integers ( 0..255 )? CV_8U-8位无符号整数(0..255)?
I am sorry if my question is trivial. 如果我的问题不重要,对不起。

-1 is the same as 255, -2 is 254, -3 is 253 and so forth - -128 is like 128. The positive numbers are the same - signed an unsigned. -1等于255,-2等于254,-3等于253,依此类推--128类似于128。正数相同-带符号的为无符号。

You should read about signed and unsigned integers . 您应该阅读有符号和无符号整数

A possible reason for 8-bit signed values for pixel calculation comes from the necessity to represent RGB colors in YUV, YCrCb or other modes with chrominance. 8位带符号值进行像素计算的可能原因是必须用YUV,YCrCb或其他具有色度的模式表示RGB颜色。 The Chrominance channels are encoded as differences in Green-Blue and Green-Red or Green-Yellow, Red-Blue etc. to simplify the answer. 色度通道被编码为绿色-蓝色和绿色-红色或绿色-黄色,红色-蓝色等中的差异,以简化答案。 This range has also negative values. 此范围也具有负值。

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

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