diff --git a/apps/specular_estimation/CMakeFiles/specular_estimation.dir/src/specular_estimation.cc.o b/apps/specular_estimation/CMakeFiles/specular_estimation.dir/src/specular_estimation.cc.o index 4431f8128689c72f9e8966ddd3c7e7d29264c483..a3092e33248015acf89f0932891eaf0911f1d551 100644 Binary files a/apps/specular_estimation/CMakeFiles/specular_estimation.dir/src/specular_estimation.cc.o and b/apps/specular_estimation/CMakeFiles/specular_estimation.dir/src/specular_estimation.cc.o differ diff --git a/apps/specular_estimation/src/Ceres.h b/apps/specular_estimation/src/Ceres.h index e2b5d0d8e7bb9767856a42c29854f1b213d39c2e..752776ae5d7e9a1b4e9dde3784795d2113d3dd2f 100644 --- a/apps/specular_estimation/src/Ceres.h +++ b/apps/specular_estimation/src/Ceres.h @@ -111,7 +111,7 @@ void specularMinimisation(double& SpecularIntensity, double& SpecularPower, doub stm << imageName << " " << initialSpecularIntensity << " " << initialSpecularPower << " " << initialGain << " " << initialBias << ".txt"; std::string outputFileName = stm.str(); std::ofstream outputFile(outputFileName, std::ios::trunc); // Erase the previous contents of the file - outputFile << "Specular Intensity" << "\t" << "Specular Power" << "\t" << "Gain" << "\t" << "Bias" << "\t" << "Resiudal" << std::endl; + outputFile << "Roughness" << "\t" << "Metallic" << "\t" << "Light Distance" << "\t" << "Light Intensity" << "\t" << "Resiudal" << std::endl; // Build the problem. ceres::Problem problem; @@ -183,10 +183,10 @@ void specularMinimisation(double& SpecularIntensity, double& SpecularPower, doub std::cout << summary.BriefReport() << std::endl; //std::cout << summary.FullReport() << std::endl; - std::cout << "Specular Intensity: " << initialSpecularIntensity << " -> " << SpecularIntensity << std::endl; - std::cout << "Specular Power: " << initialSpecularPower << " -> " << SpecularPower << std::endl; - std::cout << "Gain: " << initialGain << " -> " << Gain << std::endl; - std::cout << "Bias: " << initialBias << " -> " << Bias << std::endl; + std::cout << "Roughness: " << initialSpecularIntensity << " -> " << SpecularIntensity << std::endl; + std::cout << "Metallic: " << initialSpecularPower << " -> " << SpecularPower << std::endl; + std::cout << "Light Distance: " << initialGain << " -> " << Gain << std::endl; + std::cout << "Light Intensity: " << initialBias << " -> " << Bias << std::endl; } void outputToFile(std::string outputFileName, double specularIntensity, double specularPower, double gain, double bias, double resiudal) { diff --git a/bin/specular_estimation b/bin/specular_estimation index 5952f7d01b9844858582f7abf5cd7b8819adb673..79f1cba010347a16e1d2065312a3573bc0c42ed5 100755 Binary files a/bin/specular_estimation and b/bin/specular_estimation differ diff --git a/shirt6 0.5 0.5 0.5 0.5.txt b/shirt6 0.5 0.5 0.5 0.5.txt new file mode 100644 index 0000000000000000000000000000000000000000..bb98c226e6c6d88f1d7b2f9ecdc00e840619e71c --- /dev/null +++ b/shirt6 0.5 0.5 0.5 0.5.txt @@ -0,0 +1,381 @@ +Roughness Metallic Light Distance Light Intensity Resiudal +0.5 0.5 1 0 628.141 +0.5 0.5 1 0 628.141 +0.499999 0.5 1 0 628.142 +0.5 0.5 1 0 628.141 +0.5 0.499999 1 0 628.141 +0.5 0.5 1 0 628.141 +0.5 0.5 1 0 628.141 +0.5 0.5 1 0 628.141 +0.5 0.5 1 0 628.141 +0.648475 1 1 0 1129.23 +0.648475 1 1 0 1129.23 +0.648474 1 1 0 1129.23 +0.648475 1 1 0 1129.23 +0.648475 0.999999 1 0 1129.23 +0.648475 1 1 0 1129.23 +0.648475 1 1 0 1129.23 +0.648475 1 1 0 1129.23 +0.648475 1 1 0 1129.23 +0.515313 0.624432 1 0 626.833 +0.515314 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624431 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515314 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624431 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.515313 0.624432 1 0 626.833 +0.703842 0 1 0 1129.23 +0.703842 0 1 0 1129.23 +0.703841 0 1 0 1129.23 +0.703842 1.49012e-08 1 0 1129.23 +0.703842 -1.49012e-08 1 0 1129.23 +0.703842 0 1 0 45148.9 +0.703842 0 1 0 45148.9 +0.703842 0 1 0 1129.23 +0.703842 0 1 0 1129.23 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.908 +0.534676 0.481852 1 0 603.91 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.908 +0.534676 0.481852 1 0 603.91 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.534677 0.481852 1 0 603.909 +0.646379 1 1 0 1129.23 +0.646379 1 1 0 1129.23 +0.646378 1 1 0 1129.23 +0.646379 1 1 0 1129.23 +0.646379 0.999999 1 0 1129.23 +0.646379 1 1 0 1129.23 +0.646379 1 1 0 1129.23 +0.646379 1 1 0 1129.23 +0.646379 1 1 0 1129.23 +0.545325 0.59191 1 0 574.181 +0.545326 0.59191 1 0 574.181 +0.545325 0.59191 1 0 574.182 +0.545325 0.59191 1 0 574.181 +0.545325 0.591909 1 0 574.181 +0.545325 0.59191 1 0 574.181 +0.545325 0.59191 1 0 574.181 +0.545325 0.59191 1 0 574.181 +0.545325 0.59191 1 0 574.181 +0.545325 0.59191 1 0 574.181 +0.545325 0.59191 1 0 574.181 +0.545326 0.59191 1 0 574.181 +0.545325 0.59191 1 0 574.182 +0.545325 0.59191 1 0 574.181 +0.545325 0.591909 1 0 574.181 +0.545325 0.59191 1 0 574.181 +0.545325 0.59191 1 0 574.181 +0.545325 0.59191 1 0 574.181 +0.545325 0.59191 1 0 574.181 +0.682162 0 1 0 1129.23 +0.682162 0 1 0 1129.23 +0.682161 0 1 0 1129.23 +0.682162 1.49012e-08 1 0 1129.23 +0.682162 -1.49012e-08 1 0 1129.23 +0.682162 0 1 0 45148.9 +0.682162 0 1 0 45148.9 +0.682162 0 1 0 1129.23 +0.682162 0 1 0 1129.23 +0.557117 0.300628 1 0 1116.98 +0.557117 0.300628 1 0 1116.98 +0.557116 0.300628 1 0 1116.98 +0.557117 0.300628 1 0 1116.98 +0.557117 0.300628 1 0 1116.98 +0.557117 0.300628 1 0 1116.98 +0.557117 0.300628 1 0 1116.98 +0.557117 0.300628 1 0 1116.98 +0.557117 0.300628 1 0 1116.98 +0.549793 0.481538 1 0 601.834 +0.549794 0.481538 1 0 601.833 +0.549793 0.481538 1 0 601.834 +0.549793 0.481538 1 0 601.834 +0.549793 0.481537 1 0 601.834 +0.549793 0.481538 1 0 601.833 +0.549793 0.481538 1 0 601.834 +0.549793 0.481538 1 0 601.834 +0.549793 0.481538 1 0 601.833 +0.545652 0.583834 1 0 572.179 +0.545653 0.583834 1 0 572.178 +0.545651 0.583834 1 0 572.18 +0.545652 0.583835 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.545653 0.583834 1 0 572.178 +0.545651 0.583834 1 0 572.18 +0.545652 0.583835 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.545652 0.583834 1 0 572.179 +0.680874 0 1 0 667.393 +0.680875 0 1 0 667.393 +0.680873 0 1 0 667.393 +0.680874 1.49012e-08 1 0 667.393 +0.680874 -1.49012e-08 1 0 667.393 +0.680874 0 1 0 667.393 +0.680874 0 1 0 667.392 +0.680874 0 1 0 667.393 +0.680874 0 1 0 667.393 +0.584358 0 1 0 553.849 +0.584359 0 1 0 553.849 +0.584358 0 1 0 553.849 +0.584358 1.49012e-08 1 0 553.849 +0.584358 -1.49012e-08 1 0 553.849 +0.584358 0 1 0 553.849 +0.584358 0 1 0 553.849 +0.584358 0 1 0 553.849 +0.584358 0 1 0 553.849 +0.584358 0 1 0 553.849 +0.584358 0 1 0 553.849 +0.584359 0 1 0 553.849 +0.584358 0 1 0 553.849 +0.584358 1.49012e-08 1 0 553.849 +0.584358 -1.49012e-08 1 0 553.849 +0.584358 0 1 0 553.849 +0.584358 0 1 0 553.849 +0.584358 0 1 0 553.849 +0.584358 0 1 0 553.849 +0.970788 0 1 0 1129.23 +0.970789 0 1 0 1129.23 +0.970787 0 1 0 1129.23 +0.970788 1.49012e-08 1 0 1129.23 +0.970788 -1.49012e-08 1 0 1129.23 +0.970788 0 1 0 45148.9 +0.970788 0 1 0 45148.9 +0.970788 0 1 0 1129.23 +0.970788 0 1 0 1129.23 +0.615332 0 1 0 494.514 +0.615332 0 1 0 494.514 +0.615331 0 1 0 494.515 +0.615332 1.49012e-08 1 0 494.514 +0.615332 -1.49012e-08 1 0 494.514 +0.615332 0 1 0 494.515 +0.615332 0 1 0 494.514 +0.615332 0 1 0 494.514 +0.615332 0 1 0 494.515 +0.615332 0 1 0 494.514 +0.615332 0 1 0 494.514 +0.615332 0 1 0 494.514 +0.615331 0 1 0 494.515 +0.615332 1.49012e-08 1 0 494.514 +0.615332 -1.49012e-08 1 0 494.514 +0.615332 0 1 0 494.515 +0.615332 0 1 0 494.514 +0.615332 0 1 0 494.514 +0.615332 0 1 0 494.515 +0.82796 0 1 0 1129.23 +0.82796 0 1 0 1129.23 +0.827959 0 1 0 1129.23 +0.82796 1.49012e-08 1 0 1129.23 +0.82796 -1.49012e-08 1 0 1129.23 +0.82796 0 1 0 45148.9 +0.82796 0 1 0 45148.9 +0.82796 0 1 0 1129.23 +0.82796 0 1 0 1129.23 +0.628917 0 1 0 486.208 +0.628917 0 1 0 486.207 +0.628916 0 1 0 486.209 +0.628917 1.49012e-08 1 0 486.208 +0.628917 -1.49012e-08 1 0 486.208 +0.628917 0 1 0 486.208 +0.628917 0 1 0 486.208 +0.628917 0 1 0 486.208 +0.628917 0 1 0 486.208 +0.628917 0 1 0 486.208 +0.628917 0 1 0 486.208 +0.628917 0 1 0 486.207 +0.628916 0 1 0 486.209 +0.628917 1.49012e-08 1 0 486.208 +0.628917 -1.49012e-08 1 0 486.208 +0.628917 0 1 0 486.208 +0.628917 0 1 0 486.208 +0.628917 0 1 0 486.208 +0.628917 0 1 0 486.208 +0.77084 0 1 0 1129.23 +0.770841 0 1 0 1129.23 +0.77084 0 1 0 1129.23 +0.77084 1.49012e-08 1 0 1129.23 +0.77084 -1.49012e-08 1 0 1129.23 +0.77084 0 1 0 1129.23 +0.77084 0 1 0 1129.23 +0.77084 0 1 0 1129.23 +0.77084 0 1 0 1129.23 +0.637679 0 1 0 1129.23 +0.637679 0 1 0 1129.23 +0.637678 0 1 0 1129.23 +0.637679 1.49012e-08 1 0 1129.23 +0.637679 -1.49012e-08 1 0 1129.23 +0.637679 0 1 0 1129.23 +0.637679 0 1 0 1129.23 +0.637679 0 1 0 1129.23 +0.637679 0 1 0 1129.23 +0.628954 0 1 0 484.85 +0.628955 0 1 0 484.849 +0.628953 0 1 0 484.851 +0.628954 1.49012e-08 1 0 484.85 +0.628954 -1.49012e-08 1 0 484.85 +0.628954 0 1 0 484.85 +0.628954 0 1 0 484.85 +0.628954 0 1 0 484.85 +0.628954 0 1 0 484.85 +0.628954 0 1 0 484.85 +0.628954 0 1 0 484.85 +0.628955 0 1 0 484.849 +0.628953 0 1 0 484.851 +0.628954 1.49012e-08 1 0 484.85 +0.628954 -1.49012e-08 1 0 484.85 +0.628954 0 1 0 484.85 +0.628954 0 1 0 484.85 +0.628954 0 1 0 484.85 +0.628954 0 1 0 484.85 +0.752702 0 1 0 1129.23 +0.752703 0 1 0 1129.23 +0.752701 0 1 0 1129.23 +0.752702 1.49012e-08 1 0 1129.23 +0.752702 -1.49012e-08 1 0 1129.23 +0.752702 0 1 0 1129.23 +0.752702 0 1 0 1129.23 +0.752702 0 1 0 1129.23 +0.752702 0 1 0 1129.23 +0.636544 0 1 0 487.6 +0.636545 0 1 0 487.6 +0.636544 0 1 0 487.601 +0.636544 1.49012e-08 1 0 487.6 +0.636544 -1.49012e-08 1 0 487.6 +0.636544 0 1 0 487.601 +0.636544 0 1 0 487.6 +0.636544 0 1 0 487.6 +0.636544 0 1 0 487.601 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.562 +0.633164 0 1 0 475.563 +0.633165 1.49012e-08 1 0 475.563 +0.633165 -1.49012e-08 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.562 +0.633164 0 1 0 475.563 +0.633165 1.49012e-08 1 0 475.563 +0.633165 -1.49012e-08 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.843459 0 1 0 1129.23 +0.84346 0 1 0 1129.23 +0.843458 0 1 0 1129.23 +0.843459 1.49012e-08 1 0 1129.23 +0.843459 -1.49012e-08 1 0 1129.23 +0.843459 0 1 0 1129.23 +0.843459 0 1 0 1129.23 +0.843459 0 1 0 1129.23 +0.843459 0 1 0 1129.23 +0.645555 0 1 0 503.806 +0.645555 0 1 0 503.806 +0.645554 0 1 0 503.807 +0.645555 1.49012e-08 1 0 503.806 +0.645555 -1.49012e-08 1 0 503.806 +0.645555 0 1 0 503.807 +0.645555 0 1 0 503.806 +0.645555 0 1 0 503.806 +0.645555 0 1 0 503.806 +0.635413 0 1 0 476.855 +0.635414 0 1 0 476.855 +0.635413 0 1 0 476.856 +0.635413 1.49012e-08 1 0 476.855 +0.635413 -1.49012e-08 1 0 476.855 +0.635413 0 1 0 476.855 +0.635413 0 1 0 476.855 +0.635413 0 1 0 476.855 +0.635413 0 1 0 476.855 +0.633848 0 1 0 475.749 +0.633849 0 1 0 475.749 +0.633847 0 1 0 475.75 +0.633848 1.49012e-08 1 0 475.749 +0.633848 -1.49012e-08 1 0 475.749 +0.633848 0 1 0 475.749 +0.633848 0 1 0 475.749 +0.633848 0 1 0 475.749 +0.633848 0 1 0 475.749 +0.633352 0 1 0 475.59 +0.633353 0 1 0 475.589 +0.633352 0 1 0 475.59 +0.633352 1.49012e-08 1 0 475.59 +0.633352 -1.49012e-08 1 0 475.59 +0.633352 0 1 0 475.59 +0.633352 0 1 0 475.59 +0.633352 0 1 0 475.59 +0.633352 0 1 0 475.59 +0.633211 0 1 0 475.566 +0.633211 0 1 0 475.566 +0.63321 0 1 0 475.567 +0.633211 1.49012e-08 1 0 475.566 +0.633211 -1.49012e-08 1 0 475.566 +0.633211 0 1 0 475.566 +0.633211 0 1 0 475.566 +0.633211 0 1 0 475.566 +0.633211 0 1 0 475.566 +0.633175 0 1 0 475.565 +0.633175 0 1 0 475.564 +0.633174 0 1 0 475.565 +0.633175 1.49012e-08 1 0 475.565 +0.633175 -1.49012e-08 1 0 475.565 +0.633175 0 1 0 475.565 +0.633175 0 1 0 475.565 +0.633175 0 1 0 475.565 +0.633175 0 1 0 475.565 +0.633167 0 1 0 475.563 +0.633168 0 1 0 475.562 +0.633167 0 1 0 475.563 +0.633167 1.49012e-08 1 0 475.563 +0.633167 -1.49012e-08 1 0 475.563 +0.633167 0 1 0 475.563 +0.633167 0 1 0 475.563 +0.633167 0 1 0 475.563 +0.633167 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633166 0 1 0 475.562 +0.633164 0 1 0 475.563 +0.633165 1.49012e-08 1 0 475.563 +0.633165 -1.49012e-08 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563 +0.633165 0 1 0 475.563