The conventional ranges for R, G, and B channel values are:
- 0 to 255 for CV_8U images
- 0 to 65535 for CV_16U images
- 0 to 1 for CV_32F images
所以当CV_8UC1转换为CV_32F时需要乘1/255;反之乘255;
当CV_8UC1转换为CV_8UC3时:cvtColor(src,dst,CV_GRAY2BGR)
The conventional ranges for R, G, and B channel values are:
所以当CV_8UC1转换为CV_32F时需要乘1/255;反之乘255;
当CV_8UC1转换为CV_8UC3时:cvtColor(src,dst,CV_GRAY2BGR)