Color Conversion
marcussacana opened this issue · 17 comments
I'm testing and looks this color conversion don't give the best color
Atual color table:
I think this color brown dosen't is right
If you can't write a better color conversion can generate a preview of result picture?
maybe putting manually colors in a image editor and generating a preview to see can help the bot
You can provide the image for test?
Anyway, i have wroted a tool to manually allow try "convert" the picture:
PixelConvert.zip
with sat 200 + bri 1000 in the mode 3 he give a good result with this pic, after this i fix wrong parts with the paint and i have this result now:
I studied a little bit and I keep thinking it best to draw the images in the colors of the pixelcanvas.io.
isn't to place new colors, just to allow preview the picture with the color conversion is good...
Maybe the user like me can try manually paint with the pixelcanvas colors to give a best color result, and to this a preview is needed...
If possible new algorithms to convert the color too...
So, what I studied exists three ways to convert colors, but I do not want to put too much complexity in this bot. Because if you imagine, the bot will not know what images the users will use. I will never know what is the best mode to convert.
no problem, but maybe write a preview generator is a soluction...
by now i'm closing the issue anyway
@marcussacana I'm not interested because I'm busy. :/ sorry.
I do not think the algorithm is complete. It does not produce very inconsistent results. I'm just incompatible with the color scale of PixelCanvasio.
Visually, colors seem to be irrelevant. It's not supposed to be mathematical. I need to check if there is a logical error in the mathematical side of the line. I will do this when you are available. But I can not guarantee that I can do the algorithm better.
@Qh0stM4N I don't know if you already read this, but here a link:
https://stackoverflow.com/questions/27374550/how-to-compare-color-object-and-get-closest-color-in-an-color
https://stackoverflow.com/a/4356523 The algorithm I take is great. I am very surprised that the results may be so unstable. I'm more likely to have made a mistake when implementing this algorithm for python.
Taking the sum of the squares of the differences of the two color channels and applying it to all the colors in the palette with the color that comes in. And ultimately to compare it with all colors and to accept the closest color with the lowest square root. I think that when comparing RGB images, we can get geometrically the best result.
no problem, but maybe write a preview generator is a soluction...
by now i'm closing the issue anyway
I think it's worth making a preview picture, just to be able to check the results.
We even have images that do not have standard colors and can be converted to standard colors. And it works faster.
thx for your work... i will try on finish draw this picture ✌️
Opened this problem: Too much black very little white
When we translate the results we have obtained all the color spectrum.
As far as I can tell, the black color is very dominant. But very little color is interpreted as white.
I will brighten the picture a little to improve the distribution and reduce the color loss. too much color is converted to black because it is closer to black.
reworked and optimized color rounding algorithm.
1 = original image
2 = old conversion result
3 = optimized
4 = 15 brightness image + optimized (final result)
with #50
Thank for your work, friend.