|
@@ -33,6 +33,80 @@ float* exposure(float* data, unsigned int width, unsigned int height, float expo
|
|
|
|
|
|
|
|
|
|
|
|
+float* contrast(float* data, unsigned int width, unsigned int height, float constrast)
|
|
|
+{
|
|
|
+ ImageHDR img(data, width, height);
|
|
|
+
|
|
|
+ img.contrast(constrast);
|
|
|
+
|
|
|
+ float* ret = new float[width * height * 3];
|
|
|
+ memcpy(ret, img.data, width * height * 3 * sizeof(float));
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+float* yCurve(float* data, unsigned int width, unsigned int height, float yCs, float yCb, float yCm, float yCw, float yCh)
|
|
|
+{
|
|
|
+ ImageHDR img(data, width, height);
|
|
|
+
|
|
|
+ img.yCurve(yCs, yCb, yCm, yCw, yCh);
|
|
|
+
|
|
|
+ float* ret = new float[width * height * 3];
|
|
|
+ memcpy(ret, img.data, width * height * 3 * sizeof(float));
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+float* lightnessMask(float* data, unsigned int width, unsigned int height, bool lms, bool lmb, bool lmm, bool lmw, bool lmh)
|
|
|
+{
|
|
|
+ ImageHDR img(data, width, height);
|
|
|
+
|
|
|
+ img.lightnessMask(lms, lmb, lmm, lmw, lmh);
|
|
|
+
|
|
|
+ float* ret = new float[width * height * 3];
|
|
|
+ memcpy(ret, img.data, width * height * 3 * sizeof(float));
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+float* saturation(float* data, unsigned int width, unsigned int height, float saturation)
|
|
|
+{
|
|
|
+ ImageHDR img(data, width, height);
|
|
|
+
|
|
|
+ img.saturation(saturation);
|
|
|
+
|
|
|
+ float* ret = new float[width * height * 3];
|
|
|
+ memcpy(ret, img.data, width * height * 3 * sizeof(float));
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+float* colorEditor(float* data, unsigned int width, unsigned int height, float ce_sel_light_l, float ce_sel_light_h, float ce_sel_chr_l, float ce_sel_chr_h, float ce_sel_hue_l, float ce_sel_hue_h, float ce_tol, float ce_edit_hue, float ce_edit_expo, float ce_edit_con, float ce_edit_sat, bool ce_mask)
|
|
|
+{
|
|
|
+ ImageHDR img(data, width, height);
|
|
|
+
|
|
|
+ float sel_light[2] = { ce_sel_light_l, ce_sel_light_h };
|
|
|
+ float sel_chr[2] = { ce_sel_chr_l, ce_sel_chr_h };
|
|
|
+ float sel_hue[2] = { ce_sel_hue_l, ce_sel_hue_h };
|
|
|
+
|
|
|
+ img.colorEditor(sel_light, sel_chr, sel_hue, ce_tol, ce_edit_hue, ce_edit_expo, ce_edit_con, ce_edit_sat, ce_mask);
|
|
|
+
|
|
|
+ float* ret = new float[width * height * 3];
|
|
|
+ memcpy(ret, img.data, width * height * 3 * sizeof(float));
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
float* full_process(float* data, unsigned int width, unsigned int height,
|
|
|
float exposure,
|
|
|
float contrast,
|