Let's say I was to change from RGB to HSV using a software like Matlab and then convert the result back to RGB using the same software. I know that there are going to be some slight noise and error in the colour values due to this conversion. Does anyone have any ideas on how one can preserve the colour values during such conversion or somehow reduce the noise or perhaps retrieve the loss in the colour data?

1 Answer 1


As someone who regularly works in other spaces (most frequently Lab) I'd say not to worry about it.

Since your rationale for going to another space is to make changes you're expecting that your RGB output will not be identical to your RGB input. Any noise should be well within acceptable boundaries.

HSV is by no means perfect and it could theoretically be an issue if you roundtrip between the two spaces a lot, but usually if you're doing that then there's a good chance something else is probably wrong in your workflow.

If you need extra accuracy then you can always increase the bit-depth before conversion, work in the higher accuracy and convert back after going back to RGB but realistically it's worth testing your RGB-HSV-RGB roundtrip a hundred times or so and see if you actually need to worry about the noise at all.

Depending on matlab's capabilities you could also set a threshold in the HSV-RGB conversion where if the pixel value is within a certain range of the original to pass back the original RGB value instead of the new one.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.