There's Quantize COP but I don't want to divide the existing pixels by predefined ranges, instead I would like to extract the dominant colors of an image like Kuler (Adobe Color) does:
Or when a Color Table is generated from an image in Photshop:
Or ImageMagik -colors x:
But I'm unsure about how to go about this. I can see the histogram in the Composite View, but not sure how would I cluster them and sort by occurence:
Am I missing some straight forward way to do this?
not sure whether this is acceptable for your workflow but I have used the cluster point SOP for this.
Thanks. I've looked into and I'm noticing that while it does an interesting job at posterizing, the issue I notice with a lot of solutions is that once you lower the amount of "buckets" is when you start to see some issues: I would expect blue to be dominant while reducing the number of clusters but seems that red gets the cake.
With Adobe Color I also don't get the "importance" of each swatch.
I've been using Attribute Promote Median or Mode but I was looking for something that would offer a more "statistical analysis approach", eheh...
maybe you calculate some attributes for each cluster and use these attributes to sort the clusters. You can take for example the deviation on a cluster. If this value is low, the colors are close together. If you decrease the number of clusters, this value will probably raise and gives less good approximation. Here is an example (modification of Konstantins file).
maybe you calculate some attributes for each cluster and use these attributes to sort the clusters. You can take for example the deviation on a cluster. If this value is low, the colors are close together. If you decrease the number of clusters, this value will probably raise and gives less good approximation. Here is an example (modification of Konstantins file).
Interesting addition! It's actually interesting to look at the "streaks" of color when you do @P = @Cd ; and you can almost see the clusters very clearly then. Thanks for the file!
Konstantin Magnus Ok, I assume you have already checked the fuse SOP then.
I didn't and you're very right, I should have tried, ehehe That looks great, really. I guess it didn't come to mind because one will not set the amount of buckets but a Threshold. Thanks for the file!
maybe you calculate some attributes for each cluster and use these attributes to sort the clusters. You can take for example the deviation on a cluster. If this value is low, the colors are close together. If you decrease the number of clusters, this value will probably raise and gives less good approximation. Here is an example (modification of Konstantins file).
Interesting addition! It's actually interesting to look at the "streaks" of color when you do @P = @Cd ; and you can almost see the clusters very clearly then. Thanks for the file!
Konstantin Magnus Ok, I assume you have already checked the fuse SOP then.
I didn't and you're very right, I should have tried, ehehe That looks great, really. I guess it didn't come to mind because one will not set the amount of buckets but a Threshold. Thanks for the file!
Cheers prb
Something to try would be doing the snapping in a different color space, rather than linear rgb. Maybe try Lab or Y'uv?
maybe you calculate some attributes for each cluster and use these attributes to sort the clusters. You can take for example the deviation on a cluster. If this value is low, the colors are close together. If you decrease the number of clusters, this value will probably raise and gives less good approximation. Here is an example (modification of Konstantins file).
Interesting addition! It's actually interesting to look at the "streaks" of color when you do @P = @Cd ; and you can almost see the clusters very clearly then. Thanks for the file!
Konstantin Magnus Ok, I assume you have already checked the fuse SOP then.
I didn't and you're very right, I should have tried, ehehe That looks great, really. I guess it didn't come to mind because one will not set the amount of buckets but a Threshold. Thanks for the file!
Cheers prb
Something to try would be doing the snapping in a different color space, rather than linear rgb. Maybe try Lab or Y'uv?
Yeah I did try that, although I didn't try with snapping since the values in other spaces can be very wild, so I retook Magnus setup with the clustering and tried a few color spaces with the function ctransform() in VEX. I've found HSV one is broken, so I already reported the bug. Scene attached for example. I liked the results I got with Lab and hsl on my images.