Linfeng-Tang / SeAFusion

The code of " Image fusion in the loop of high-level vision tasks: A semantic-aware real-time infrared and visible image fusion network"
MIT License
184 stars 34 forks source link

RGB转YCbCr公式问题 #24

Open limyoonahh opened 11 months ago

limyoonahh commented 11 months ago

作者您好,您在代码中RGB转YCbCr用的是如下式子, Y = 0.299 R + 0.587 G + 0.114 B Cr = (R - Y) 0.713 + 0.5 Cb = (B - Y) * 0.564 + 0.5 但我在网上查到很多式子在Cb和Cr部分都是加128而不是0.5,请问您是提前对数据进行处理了吗

Linfeng-Tang commented 11 months ago

这个主要看你数据范围是[0, 255]还是[0, 1].