Corpsecreate
1st July 2024, 13:17
Hi,
I'm trying to figure what formula this is using under the hood to make the conversion. Reason for this is that I'm doing some image processing in Python using OpenCV and I would like to replicate the formula performed by this function. The formula I am currently using is:
result = (np.clip( (LUMA - 16) / (235 - 16), 0.0, 1.0) * 255).round().astype(np.uint8)
This is really close, but seems to be more aggressive in the blacks compared with ColorYUV. Any ideas?
Thanks!
I'm trying to figure what formula this is using under the hood to make the conversion. Reason for this is that I'm doing some image processing in Python using OpenCV and I would like to replicate the formula performed by this function. The formula I am currently using is:
result = (np.clip( (LUMA - 16) / (235 - 16), 0.0, 1.0) * 255).round().astype(np.uint8)
This is really close, but seems to be more aggressive in the blacks compared with ColorYUV. Any ideas?
Thanks!