NEW:active "import obj color" in command line

jira: none
Change-Id: I8bc5d4a1eea116305037b8194ff1d2e8aab83ce9
(cherry picked from commit 7df9f9d27d174b30a54ed27756d4a4a157557019)
(cherry picked from commit b97d44dae4854c342b835d3fd5265a22aec5d174)
This commit is contained in:
zhou.xu
2024-06-18 17:25:12 +08:00
committed by Noisyfox
parent b54c5769ff
commit cfa00b938f
10 changed files with 77 additions and 44 deletions

View File

@@ -0,0 +1,14 @@
#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)
{
QuantKMeans quant(10);
quant.apply(input_colors, cluster_colors_from_algo, cluster_labels_from_algo, (int) cluster_number);
if (cluster_number == -1) {
return false;
}
return true;
}