opencv中为什么图像局矩阵是以BGR而不是RGB显示像素的大小?
发布网友
发布时间:2022-04-27 00:06
我来回答
共3个回答
热心网友
时间:2022-06-20 22:53
这就跟计算机的大小端起源一样,最先定义色彩空间的几个牛人互相不服,所以不同的软件习惯用不同的空间。比如,openCV和Gamegear都习惯用BGR,而大多数软件都用RGB
热心网友
时间:2022-06-20 22:54
官方教程上面写:
Note that the order of the channels is inverse: BGR instead of RGB. Because in many cases the memory is large
enough to store the rows in a successive fashion the rows may follow one after another, creating a single long row.
Because everything is in a single place following one after another this may help to speed up the scanning process.
We can use the isContinuous() function to ask the matrix if this is the case. Continue on to the next section to find an
example.
可以看出来是为了效率考虑,但是为什么效率就高了呢,我也没想明白
热心网友
时间:2022-06-20 22:54
习惯顺序了吧。就算是DIB图也是这个顺序。