3 ms·
I'm not an expert in the topic, but my understanding is RGB is a poor color space for computing color difference. This could be why your mosaics end up so washe
by dfbrown 8y ago
I'm not an expert in the topic, but my understanding is RGB is a poor color space for computing color difference. This could be why your mosaics end up so washed out. [1] suggests using a CIELAB color space [2].
Edit: Looking at the code more closely it looks like you were using Lab at one point but commented it out[3], so I'm guessing you're already aware of this.
1: https://stackoverflow.com/a/9019461/185171 https://stackoverflow.com/a/9019461/185171
2: https://en.wikipedia.org/wiki/CIELAB_color_space#CIELAB https://en.wikipedia.org/wiki/CIELAB_color_space#CIELAB
3: https://github.com/worldveil/photomosaic/blob/bb720efda11383fbb037a05bec41eea942ddb189/emosaic/image.py#L63 https://github.com/worldveil/photomosaic/blob/bb720efda11383...
- muzakthings 8y agoIt didn’t make a ton of difference empirically when I tried it. But you’re correct, generally that’s the space you want to be in.
- deleted 8y ago[deleted]
- gedy 8y agoIt is quite noticeable when you are using a limited selection of tiles or image has desaturated colors. I've done some similar work[1], but issue with L*ab color is it's terrifically slow to calculate diff, at least in JS. [1] https://imgur.com/a/g3EzcSV https://imgur.com/a/g3EzcSV
- muzakthings 8y agoTotally. Everything improves with more images since that’s your palette for painting, so to speak. The ones I posted were with less than 100 images so you can definitely do better. L*b was very slow, yes. It’s all done offline but I tend to like quicker feedback...
- itronitron 8y agothere is no perfect way to measure color distances, mostly because it needs to account for human perception of color and there are individual differences in color perception among people.