Hi, I want to create an Image color detection system. There will be a camera plugin which will capture image from webcam or mobile cam and then it will just tell which RGB colors are being used most commonly in that image. The image can be stored in local database also. The application is made on reactive.Something like this :https://cloud.google.com/vision/docs/detecting-properties?apix_params=%7B%22resource%22%3A%7B%22requests%22%3A%5B%7B%22features%22%3A%5B%7B%22maxResults%22%3A10%2C%22type%22%3A%22IMAGE_PROPERTIES%22%7D%5D%2C%22image%22%3A%7B%22source%22%3A%7B%22imageUri%22%3A%22gs%3A%2F%2Fcloud-samples-data%2Fvision%2Fimage_properties%2Fbali.jpeg%22%7D%7D%7D%5D%7D%7D#vision_image_property_detection-drest
If anyone can help me with this challenge ?
There's already a component that takes the main colour and a palette of colours on an image. Check this component from forge. It's based on colour thief
https://www.outsystems.com/forge/component-overview/11558/color-thief
But what's probably missing here is the function to get the palette of colours, but you can find examples on the link that I shared, I think so.
Regards,
Márcio
Hi @Márcio Carvalho o, Thanks a lot as this is what I actually for looking for.
Hi. Attached is a quick sample using ColorThief Color Thief (lokeshdhakar.com) (the client action runs, when a file gets uploaded)
ColorThief has two functions getColor (used in this example) to detect the dominant color and getPalette to get similar color clusters.
Your question indicates that you more looking for a server side processing. There is also a C# port of Color Thief, so you most likley will end up in an extension. (or you are just using Google vision via REST API ? )
Best
Stefan
Hi @Stefan Weber, thanks for helping. But it is giving only one single color. How can I get all the colors being used in this picture or maybe the most common colors?
Hi. to get the palette there is another Javascript method getPalette (not in the oml i provided). See @Márcio Carvalho post below, there is a color thief component already in the forge (for whatever reason i havent found it) which you can use for both (dominant color and palette). Stefan
Thank you