- All empty UCM solved

Part of #2, it solves the case when the input image is completely flat

I’ve added a test to check it works
- Added test for reproducibility
- Minor edits