|
@@ -185,3 +185,86 @@ float* full_process(float* data, unsigned int width, unsigned int height,
|
|
|
|
|
|
return ret;
|
|
|
}
|
|
|
+
|
|
|
+float* full_process_5CO(float* data, unsigned int width, unsigned int height,
|
|
|
+ float exposure,
|
|
|
+ float contrast,
|
|
|
+ float yCs, float yCb, float yCm, float yCw, float yCh,
|
|
|
+ bool lms, bool lmb, bool lmm, bool lmw, bool lmh,
|
|
|
+ float saturation,
|
|
|
+ float ce_sel_light_l_co1, float ce_sel_light_h_co1, float ce_sel_chr_l_co1, float ce_sel_chr_h_co1, float ce_sel_hue_l_co1, float ce_sel_hue_h_co1, float ce_tol_co1, float ce_edit_hue_co1, float ce_edit_expo_co1, float ce_edit_con_co1, float ce_edit_sat_co1, bool ce_mask_co1,
|
|
|
+ float ce_sel_light_l_co2, float ce_sel_light_h_co2, float ce_sel_chr_l_co2, float ce_sel_chr_h_co2, float ce_sel_hue_l_co2, float ce_sel_hue_h_co2, float ce_tol_co2, float ce_edit_hue_co2, float ce_edit_expo_co2, float ce_edit_con_co2, float ce_edit_sat_co2, bool ce_mask_co2,
|
|
|
+ float ce_sel_light_l_co3, float ce_sel_light_h_co3, float ce_sel_chr_l_co3, float ce_sel_chr_h_co3, float ce_sel_hue_l_co3, float ce_sel_hue_h_co3, float ce_tol_co3, float ce_edit_hue_co3, float ce_edit_expo_co3, float ce_edit_con_co3, float ce_edit_sat_co3, bool ce_mask_co3,
|
|
|
+ float ce_sel_light_l_co4, float ce_sel_light_h_co4, float ce_sel_chr_l_co4, float ce_sel_chr_h_co4, float ce_sel_hue_l_co4, float ce_sel_hue_h_co4, float ce_tol_co4, float ce_edit_hue_co4, float ce_edit_expo_co4, float ce_edit_con_co4, float ce_edit_sat_co4, bool ce_mask_co4,
|
|
|
+ float ce_sel_light_l_co5, float ce_sel_light_h_co5, float ce_sel_chr_l_co5, float ce_sel_chr_h_co5, float ce_sel_hue_l_co5, float ce_sel_hue_h_co5, float ce_tol_co5, float ce_edit_hue_co5, float ce_edit_expo_co5, float ce_edit_con_co5, float ce_edit_sat_co5, bool ce_mask_co5)
|
|
|
+{
|
|
|
+ ImageHDR img(data, width, height);
|
|
|
+
|
|
|
+ // ******************************************
|
|
|
+ img.exposure(exposure);
|
|
|
+ // ******************************************
|
|
|
+
|
|
|
+ // ******************************************
|
|
|
+ img.contrast(contrast);
|
|
|
+ // ******************************************
|
|
|
+
|
|
|
+ // ******************************************
|
|
|
+ img.yCurve(yCs, yCb, yCm, yCw, yCh);
|
|
|
+ // ******************************************
|
|
|
+
|
|
|
+ // ******************************************
|
|
|
+ img.lightnessMask(lms, lmb, lmm, lmw, lmh);
|
|
|
+ // ******************************************
|
|
|
+
|
|
|
+ // ******************************************
|
|
|
+ img.saturation(saturation);
|
|
|
+ // ******************************************
|
|
|
+
|
|
|
+ // ******************************************
|
|
|
+ // COLOR EDITOR 1
|
|
|
+ float sel_light[2] = { ce_sel_light_l_co1, ce_sel_light_h_co1 };
|
|
|
+ float sel_chr[2] = { ce_sel_chr_l_co1, ce_sel_chr_h_co1 };
|
|
|
+ float sel_hue[2] = { ce_sel_hue_l_co1, ce_sel_hue_h_co1 };
|
|
|
+
|
|
|
+ img.colorEditor(sel_light, sel_chr, sel_hue, ce_tol_co1, ce_edit_hue_co1, ce_edit_expo_co1, ce_edit_con_co1, ce_edit_sat_co1, ce_mask_co1);
|
|
|
+ // ******************************************
|
|
|
+ // COLOR EDITOR 2
|
|
|
+ sel_light[0] = ce_sel_light_l_co2; sel_light[1] = ce_sel_light_h_co2;
|
|
|
+ sel_chr[0] = ce_sel_chr_l_co2; sel_chr[1] = ce_sel_chr_h_co2;
|
|
|
+ sel_hue[0] = ce_sel_hue_l_co2; sel_hue[1] = ce_sel_hue_h_co2;
|
|
|
+
|
|
|
+ img.colorEditor(sel_light, sel_chr, sel_hue, ce_tol_co2, ce_edit_hue_co2, ce_edit_expo_co2, ce_edit_con_co2, ce_edit_sat_co2, ce_mask_co2);
|
|
|
+ // ******************************************
|
|
|
+ // COLOR EDITOR 3
|
|
|
+ sel_light[0] = ce_sel_light_l_co3; sel_light[1] = ce_sel_light_h_co3;
|
|
|
+ sel_chr[0] = ce_sel_chr_l_co3; sel_chr[1] = ce_sel_chr_h_co3;
|
|
|
+ sel_hue[0] = ce_sel_hue_l_co3; sel_hue[1] = ce_sel_hue_h_co3;
|
|
|
+
|
|
|
+ img.colorEditor(sel_light, sel_chr, sel_hue, ce_tol_co3, ce_edit_hue_co3, ce_edit_expo_co3, ce_edit_con_co3, ce_edit_sat_co3, ce_mask_co3);
|
|
|
+ // ******************************************
|
|
|
+ // COLOR EDITOR 4
|
|
|
+ sel_light[0] = ce_sel_light_l_co4; sel_light[1] = ce_sel_light_h_co4;
|
|
|
+ sel_chr[0] = ce_sel_chr_l_co4; sel_chr[1] = ce_sel_chr_h_co4;
|
|
|
+ sel_hue[0] = ce_sel_hue_l_co4; sel_hue[1] = ce_sel_hue_h_co4;
|
|
|
+
|
|
|
+ img.colorEditor(sel_light, sel_chr, sel_hue, ce_tol_co4, ce_edit_hue_co4, ce_edit_expo_co4, ce_edit_con_co4, ce_edit_sat_co4, ce_mask_co4);
|
|
|
+ // ******************************************
|
|
|
+ // COLOR EDITOR 5
|
|
|
+ sel_light[0] = ce_sel_light_l_co5; sel_light[1] = ce_sel_light_h_co5;
|
|
|
+ sel_chr[0] = ce_sel_chr_l_co5; sel_chr[1] = ce_sel_chr_h_co5;
|
|
|
+ sel_hue[0] = ce_sel_hue_l_co5; sel_hue[1] = ce_sel_hue_h_co5;
|
|
|
+
|
|
|
+ img.colorEditor(sel_light, sel_chr, sel_hue, ce_tol_co5, ce_edit_hue_co5, ce_edit_expo_co5, ce_edit_con_co5, ce_edit_sat_co5, ce_mask_co5);
|
|
|
+ // ******************************************
|
|
|
+
|
|
|
+
|
|
|
+ if (img.linear == false) {
|
|
|
+ img.non_linear_to_linear();
|
|
|
+ img.linear = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ float* ret = new float[width * height * 3];
|
|
|
+ memcpy(ret, img.data, width * height * 3 * sizeof(float));
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|