Parcourir la source

Encore debuggage ycurve

Rémi Synave il y a 2 ans
Parent
commit
dfcafec698
3 fichiers modifiés avec 11 ajouts et 6 suppressions
  1. 3 4
      HDRip/ImageHDR.cpp
  2. 7 1
      HDRip/all_processings.cpp
  3. 1 1
      Makefile

+ 3 - 4
HDRip/ImageHDR.cpp

@@ -358,18 +358,17 @@ void ImageHDR::ycurve_histogram_regularization(float* colorDataY, float* colorDa
 void ImageHDR::yCurve(float s, float b, float m, float w, float h)
 {
   
-  std::cout << data[0] << std::endl;
+  display_debug();
   
   if (linear)
   {
     linear_to_non_linear();
     linear = false;
   }
-
-
+  
   float* colorDataY = Conversion::sRGB_to_Y_of_XYZ(data, width * height);
 
-  std::cout << colorDataY[0] << std::endl;
+  //std::cout << colorDataY[0] << std::endl;
 
   YCurve yc(s, b, m, w, h, 200);
 

+ 7 - 1
HDRip/all_processings.cpp

@@ -55,9 +55,15 @@ float* contrast(float* data, unsigned int width, unsigned int height, float cons
 
   img.contrast(constrast);
 
+  img.non_linear_to_linear();
+  
+  img.linear=true;
+  
   float* ret = new float[width * height * 3];
   memcpy(ret, img.data, width * height * 3 * sizeof(float));
 
+  img.display_debug();
+  
   return ret;
 }
 
@@ -76,7 +82,7 @@ float* yCurve(float* data, unsigned int width, unsigned int height, float yCs, f
   float* ret = new float[width * height * 3];
   memcpy(ret, img.data, width * height * 3 * sizeof(float));
 
-  img.display_debug();
+  //img.display_debug();
 
   return ret;
 }

+ 1 - 1
Makefile

@@ -1,7 +1,7 @@
 CXX = g++
 MT = -D_MT_=8
 LINUX = -D_LINUX
-INCLUDE = -I. -I/HDRip/
+INCLUDE = -I. -I./HDRip/ -I./HDRip/eigen
 CXXFLAGS = -Wall -O3 $(MT) $(LINUX) -D_REENTRANT -fPIC
 LDLIBS = -lm