现在数据采集到的是一个黑白图像(U8,即8位无符号整数),图像的形成是通过一个二维数组得到的
现在的问题是我需要通过这个二维数组将图像转换为彩色图像(RGB图像),而这个转换函数要求的输入为U32 or U64两种类型,
如果直接把上面的U8当做U32连接到函数会出现图像类型不对的错误,求高手知道要怎样把U8转换为U32,或者有什么其他方法获取彩色(RGB)图像。
You can NOT convert a gray scale image (黑白图像) to color image. You can only convert the data format to RGB.
The easist way is set R=G=B=gray scale index for every pixel.
The data size will be 3+ times bigger.