mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-02-07 12:21:50 +03:00
Updated to 1.9.5, and optimize calibration and device
This commit is contained in:
16
src/libslic3r/ObjColorUtils.cpp
Normal file
16
src/libslic3r/ObjColorUtils.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "ObjColorUtils.hpp"
|
||||
|
||||
|
||||
//1.9.5
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user