mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-10 00:37:46 -07:00
jira: STUDIO-10927 Change-Id: I46b2c63a625f91d0caafa78cf47bf0fc8589015b (cherry picked from commit 9e2bfb7d7e56d886a85c0ee8c0e90dbc6ccfa932)
15 lines
No EOL
612 B
C++
15 lines
No EOL
612 B
C++
#include "ObjColorUtils.hpp"
|
|
|
|
bool obj_color_deal_algo(std::vector<Slic3r::RGBA> & input_colors,
|
|
std::vector<Slic3r::RGBA> & cluster_colors_from_algo,
|
|
std::vector<int> & cluster_labels_from_algo,
|
|
char & cluster_number,
|
|
int max_cluster)
|
|
{
|
|
QuantKMeans quant(10);
|
|
quant.apply(input_colors, cluster_colors_from_algo, cluster_labels_from_algo, (int) cluster_number, max_cluster);
|
|
if (cluster_number == -1) {
|
|
return false;
|
|
}
|
|
return true;
|
|
} |