mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
ENH: consider colors with de < 5 as the same
1. Use cie de2000 as color distance 2.Consider colors with de < 5 as the same color when calculating flush jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I4b451910a21c9db3471c63c270f1f120e3c5d160 (cherry picked from commit 72bc6f44cfab9145aecdb843ac4a03a9338a8cc6)
This commit is contained in:
@@ -49,7 +49,9 @@ int FlushVolCalculator::calc_flush_vol_rgb(unsigned char src_r, unsigned char sr
|
||||
{
|
||||
auto& pd = FlushVolPredictor::get_instance();
|
||||
float ret_flush_volume = 0;
|
||||
bool success = pd.predict(src_r, src_g, src_b, dst_r, dst_g, dst_b, ret_flush_volume);
|
||||
FlushPredict::RGBColor src(src_r, src_g, src_b);
|
||||
FlushPredict::RGBColor dst(dst_r, dst_g, dst_b);
|
||||
bool success = pd.predict(src, dst, ret_flush_volume);
|
||||
// if we could find the color pair from dataset, we need to recalculate
|
||||
if (!success) {
|
||||
float src_r_f, src_g_f, src_b_f, dst_r_f, dst_g_f, dst_b_f;
|
||||
|
||||
Reference in New Issue
Block a user