|
@@ -67,7 +67,10 @@ void ImageHDR::display_pixel(unsigned int i) const
|
|
|
else
|
|
|
std::cout << "NON LINEAIRE - ";
|
|
|
|
|
|
- std::cout << "Pixel : ( " << data[i * 3] << " " << data[i * 3 + 1] << " " << data[i * 3 + 2] << " )" << std::endl;
|
|
|
+ int x = i%width;
|
|
|
+ int y = i/width;
|
|
|
+
|
|
|
+ std::cout << "Pixel ( " << x << " , " << y << " ) : [ " << data[i * 3] << " " << data[i * 3 + 1] << " " << data[i * 3 + 2] << " ]" << std::endl;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -76,6 +79,21 @@ void ImageHDR::display_pixel(unsigned int i, unsigned int j) const
|
|
|
display_pixel(j * width + i);
|
|
|
}
|
|
|
|
|
|
+void ImageHDR::display_debug() const
|
|
|
+{
|
|
|
+ std::cout << "---------------------------------" << std::endl;
|
|
|
+ display_pixel(0,0);
|
|
|
+ display_pixel(width-1,0);
|
|
|
+ display_pixel(width/4,height/4);
|
|
|
+ display_pixel(width*3/4,height/4);
|
|
|
+ display_pixel(width/2,height/2);
|
|
|
+ display_pixel(width/4,height*3/4);
|
|
|
+ display_pixel(width*3/4,height*3/4);
|
|
|
+ display_pixel(0,height-1);
|
|
|
+ display_pixel(width-1,height-1);
|
|
|
+ std::cout << "---------------------------------" << std::endl;
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
|
|
|
/****************************************/
|
|
@@ -339,7 +357,9 @@ 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;
|
|
|
+
|
|
|
if (linear)
|
|
|
{
|
|
|
linear_to_non_linear();
|
|
@@ -349,6 +369,8 @@ void ImageHDR::yCurve(float s, float b, float m, float w, float h)
|
|
|
|
|
|
float* colorDataY = Conversion::sRGB_to_Y_of_XYZ(data, width * height);
|
|
|
|
|
|
+ std::cout << colorDataY[0] << std::endl;
|
|
|
+
|
|
|
YCurve yc(s, b, m, w, h, 200);
|
|
|
|
|
|
|