FSRCNN-pytorch icon indicating copy to clipboard operation
FSRCNN-pytorch copied to clipboard

rgb to ycbcr formula coefficient problem.

Open BarCodeReader opened this issue 5 years ago • 2 comments

hi, I checked your image transformation part in file utils.py the formula for rgb to ycbcr image is a little different from Wikipedia: yours: y = 16. + (64.738 * img[..., 0] + 129.057 * img[..., 1] + 25.064 * img[..., 2]) / 256. wiki: y = 16. + (65.738 * img[..., 0] + 129.057 * img[..., 1] + 25.064 * img[..., 2]) / 256.

and actually in all of your implementations, you use 64.738. i tested both and seems this minor difference does not affect the prediction accuracy... but still, want to point out this and make this work better.

BarCodeReader avatar Apr 26 '20 11:04 BarCodeReader

maybe an typing error, btw, did you have any color difference in you experiment?

kyz20 avatar Apr 16 '21 07:04 kyz20

maybe an typing error, btw, did you have any color difference in you experiment?

i think the error is trivial and I did not observe a significant difference in the final result.

BarCodeReader avatar Aug 23 '21 13:08 BarCodeReader