Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit 7e8e8981 authored by Laurent Belcour's avatar Laurent Belcour

core

parent 0c877e68
......@@ -268,7 +268,11 @@ vec vertical_segment::operator[](int i) const
}
vec vertical_segment::get(int i) const
{
return _data[i] ;
const int n = dimX() + dimY();
vec res(n);
for(int k=0; k<n; ++k) { res[k] = _data[i][k]; }
return res ;
}
//! \todo Check the vertical segment size and if the data
......
......@@ -8,6 +8,7 @@
*/
#include <core/args.h>
#include <core/data.h>
#include <core/vertical_segment.h>
#include <core/params.h>
#include <core/function.h>
#include <core/fitter.h>
......@@ -64,6 +65,21 @@ int main(int argc, char** argv)
d->load(args["data-file"]);
}
// Get the output object. In the case where it is not a VS file, we use
// the load object.
data* d_out = NULL;
if(dynamic_cast<vertical_segment*>(d) == NULL)
{
d_out = d;
}
else
{
d_out = new vertical_segment();
d_out->setDimX(d->dimX());
d_out->setDimY(d->dimY());
d_out->setParametrization(d->input_parametrization());
}
// Get the function file
function* f = NULL;
f = plugins_manager::get_function(args["input"]);
......@@ -88,10 +104,10 @@ int main(int argc, char** argv)
x[d->dimX() + j] = y[j];
}
d->set(x);
d_out->set(x);
}
d->save(args["output"]);
d_out->save(args["output"]);
}
else
{
......
......@@ -93,7 +93,7 @@ int main(int argc, char** argv)
}
if(d != NULL)
{
{
for(int i=0; i<d->size(); ++i)
{
vec v = d->get(i) ;
......
......@@ -24,7 +24,7 @@ set ylabel "BRDF x cosine"
# output rational fits
set term unknown
plot "../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162.alta" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.01 ? $4 : 1/0) title "Yellow cloth data", "./results/3d/retro/half/3M_jaune_rat_TK.dat" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.01) ? $4 : 1/0 title "rational interpolation"
plot "../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162.alta" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.01 ? $4 : 1/0) title "Yellow cloth data", "./results/3d/retro/half/3M_jaune_rat_TK2TL.dat" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.01) ? $4 : 1/0 title "rational interpolation"
set term epslatex standalone color font 8
set output "yellow_retro_rat.tex"
......
......@@ -12,14 +12,15 @@
</configuration>
<!-- Fitting the lobe using a back parametrization:
The ABC model uses the dot product between the back and the
normal vectors.
-->
<action name="data2data">
<!-- Input arguments of the action -->
<!--<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_81.alta" />-->
<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162.alta" />
<!--<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/3M_jaune_iso_tvproj_brdfcc_rescaled.alta" />-->
<parameter name="min" value="[0, 0,-2]" />
<parameter name="max" value="[1.5, 2, 2]" />
<!--<parameter name="ymin" value="[0.001]" />-->
<!-- Output arguments of the action -->
<output name="/tmp/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162_TK.alta" />
......@@ -30,21 +31,25 @@
<!-- Input and output arguments of the action -->
<input name="/tmp/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162_TK.alta" />
<!--<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162.alta" />-->
<!--<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/3M_jaune_iso_tvproj_brdfcc_rescaled_vs_relative_min_0.4_max_0.9.alta" />-->
<!--<parameter name="min" value="[0, 0,-2]" />-->
<!--<parameter name="max" value="[1.5, 2, 2]" />-->
<!--<input name="/tmp/yellow_slice_inc30.dat" />-->
<output name="./results/3d/retro/half/3M_jaune_rat_TK.brdf" />
<!-- Define the function to use -->
<function name="rational_function_cosine" />
<!--<function name="rational_function_cosine" />-->
<!--<function name="rational_function_chebychev" />-->
<!--<function name="rational_function_chebychev_opt" />-->
<function name="rational_function_chebychev_opt" />
<!-- Define the ftting procedure to use -->
<!--<plugin type="fitter" name="rational_fitter_quadprog" />-->
<plugin type="fitter" name="rational_fitter_parallel" />
<!--<plugin type="fitter" name="rational_fitter_matlab" />-->
<parameter name="min-np" value="47" />
<parameter name="min-np" value="48" />
<!--<parameter name="min-np" value="53" />-->
<parameter name="min-nq" value="30" />
<parameter name="np" value="1000" />
......@@ -66,11 +71,11 @@
<input name="./results/3d/retro/half/3M_jaune_rat_TK.brdf" />
<output name="./results/3d/retro/half/3M_jaune_rat_TK.dat" />
<parameter name="data" value="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162.alta" />
<!--<parameter name="data" value="/tmp/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162_TK.alta" />-->
<parameter name="data" value="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162.alta" />
<parameter name="min" value="[0, 0,-2]" />
<parameter name="max" value="[1.5, 2, 2]" />
<!--<parameter name="max" value="[1.5, 2, 2]" />-->
</action>
<!-- Fitting the lobe using a light-view parametrization:
......@@ -79,13 +84,15 @@
-->
<action name="data2data">
<!-- Input arguments of the action -->
<!--<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_81.alta" />-->
<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162.alta" />
<!--<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/3M_jaune_iso_tvproj_brdfcc_rescaled.alta" />-->
<parameter name="min" value="[0, 0,-2]" />
<parameter name="max" value="[1.5, 2, 2]" />
<!-- Output arguments of the action -->
<output name="/tmp/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162_TVL.alta" />
<parameter name="param" value="SCHLICK_TL_TVL_PROJ_DPHI" />
<parameter name="param" value="RETRO_TL_TVL_PROJ_DPHI" />
</action>
<action name="data2brdf">
......@@ -93,8 +100,9 @@
<input name="/tmp/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162_TVL.alta" />
<!--<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162.alta" />-->
<!--<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/3M_jaune_iso_tvproj_brdfcc_rescaled_vs_relative_min_0.4_max_0.9.alta" />-->
<parameter name="min" value="[0, 0,-2]" />
<parameter name="max" value="[1.5, 2, 2]" />
<!--<parameter name="min" value="[0, 0,-2]" />-->
<!--<parameter name="max" value="[1.5, 2, 2]" />-->
<!--<parameter name="ymin" value="[0.001]" />-->
<!--<input name="/tmp/yellow_slice_inc30.dat" />-->
......@@ -110,7 +118,7 @@
<plugin type="fitter" name="rational_fitter_parallel" />
<!--<plugin type="fitter" name="rational_fitter_matlab" />-->
<parameter name="min-np" value="47" />
<parameter name="min-np" value="48" />
<!--<parameter name="min-np" value="53" />-->
<parameter name="min-nq" value="30" />
<parameter name="np" value="1000" />
......@@ -134,8 +142,9 @@
<!-- Output arguments of the action -->
<output name="./results/3d/retro/half/3M_jaune_rat_TVL.dat" />
<parameter name="data" value="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162.alta" />
<!--<parameter name="data" value="/tmp/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162_TVL.alta" />-->
<parameter name="data" value="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_dense__nbsgrid_162.alta" />
<parameter name="min" value="[0, 0,-2]" />
<parameter name="max" value="[1.5, 2, 2]" />
<!--<parameter name="max" value="[1.5, 2, 2]" />-->
</action>
</alta>
......@@ -23,7 +23,7 @@ set ylabel "BRDF x cosine"
# output Lafotune fit
set terminal unknown
plot "../papers/retro/mesures/original/Bande_fluo_grise/3d/633nm/Fichiers\ definitifs/densityHelmholtz/Bande_grise_3D+3DS+3DR_dense__nbsgrid_162.alta" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.01 ? $4 : 1/0) title "Gray cloth data", "./results/3d/retro/half/Bande_fluo_rat.dat" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.01 ? $4 : 1/0) title "Rational interpolation"
plot "../papers/retro/mesures/original/Bande_fluo_grise/3d/633nm/Fichiers\ definitifs/densityHelmholtz/Bande_grise_3D+3DS+3DR_dense__nbsgrid_162.alta" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.01 ? $4 : 1/0) title "Gray cloth data", "./results/3d/retro/half/Bande_fluo_rat_TK2TL.dat" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.01 ? $4 : 1/0) title "Rational interpolation"
set term epslatex standalone color font 8
set output "gray_retro_rat.tex"
......
......@@ -23,7 +23,7 @@ set ylabel "BRDF x cosine"
# output Rational fit
set term unknown
plot "../papers/retro/mesures/original/Bande_orange/3d/633nm/Fichiers_definitifs/densify_helmholtz/Bande_orange_3D_dense__nbsgrid_162.alta" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.05 ? $4 : 1/0) title "Orange cloth data", "./results/3d/retro/half/Bande_orange_rat.dat" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.05 ? $4 : 1/0) title "Rational interpolation"
plot "../papers/retro/mesures/original/Bande_orange/3d/633nm/Fichiers_definitifs/densify_helmholtz/Bande_orange_3D_dense__nbsgrid_162.alta" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.05 ? $4 : 1/0) title "Orange cloth data", "./results/3d/retro/half/Bande_orange_rat_TK2TL.dat" using (180/pi*$2):($2 > 0.0 && $3 > -0.01 && $3 < 0.05 ? $4 : 1/0) title "Rational interpolation"
set term epslatex standalone color font 8
set output "orange_retro_rat.tex"
......
......@@ -11,48 +11,66 @@
<parameter name="lib-dir" value="./build" />
</configuration>
<!-- Rational interpolation of the Orange data in the classical parametrization.
This will only interpolate vertical segments of the retro part of the
BRDF.
<!-- Conversion of data to the Back parametrization.
This will only export the retro reflective part of the data.
-->
<action name="data2brdf">
<action name="data2data">
<!-- Input arguments of the action -->
<!--- Input data file -->
<input name="../papers/retro/mesures/original/Bande_orange/3d/633nm/Fichiers_definitifs/densify_helmholtz/Bande_orange_3D_dense__nbsgrid_162.alta" />
<parameter name="min" value="[0, 0,-2]" />
<parameter name="max" value="[0.9, 2, 2]" />
<parameter name="max" value="[1.5, 2, 2]" />
<!-- Output data file -->
<output name="/tmp/orange_TK.alta" />
<!-- Parameters -->
<parameter name="param" value="SCHLICK_TL_TK_PROJ_DPHI" />
</action>
<action name="data2brdf">
<!-- Input arguments of the action -->
<input name="/tmp/orange_TK.alta" />
<parameter name="dt" value="0.5" />
<!--<parameter name="dt-relative" value="" />-->
<parameter name="dt-positive" value="" />
<!-- Output arguments of the action -->
<output name="./results/3d/retro/half/Bande_orange_half_cparam_rat.brdf" />
<output name="./results/3d/retro/half/Bande_orange_rat_TK.brdf" />
<!-- Define the function to use -->
<!--<function name="rational_function_cosine" />-->
<function name="rational_function_chebychev" />
<function name="rational_function_cosine" />
<!--<function name="rational_function_chebychev" />-->
<!-- Define the ftting procedure to use -->
<plugin type="fitter" name="rational_fitter_parallel" />
<parameter name="min-np" value="56" />
<parameter name="min-np" value="59" />
<parameter name="np" value="100" />
<parameter name="np-step" value="1" />
<parameter name="nb-starting-points" value="1000" />
<parameter name="nb-starting-points" value="3000" />
</action>
<!-- Export the fit -->
<action name="brdf2gnuplot">
<action name="brdf2data">
<!-- Input and output arguments of the action -->
<input name="./results/3d/retro/half/Bande_orange_half_cparam_rat.brdf" />
<output name="./results/3d/retro/half/Bande_orange_half_cparam_rat.dat" />
<input name="./results/3d/retro/half/Bande_orange_rat_TK.brdf" />
<output name="./results/3d/retro/half/Bande_orange_rat_TK.dat" />
<parameter name="data" value="../papers/retro/mesures/original/Bande_orange/3d/633nm/Fichiers_definitifs/densify_helmholtz/Bande_orange_3D_dense__nbsgrid_162.alta" />
<parameter name="min" value="[0, 0,-2]" />
<parameter name="max" value="[2, 2, 2]" />
<parameter name="data-file" value="/tmp/orange_TK.alta" />
</action>
<action name="data2data">
<!-- Input and output arguments of the action -->
<input name="./results/3d/retro/half/Bande_orange_rat_TK.dat" />
<output name="./results/3d/retro/half/Bande_orange_rat_TK2TL.dat" />
<parameter name="param" value="ISOTROPIC_TL_TV_PROJ_DPHI" />
</action>
......@@ -64,88 +82,54 @@
<!--- Input data file -->
<input name="../papers/retro/mesures/original/Bande_orange/3d/633nm/Fichiers_definitifs/densify_helmholtz/Bande_orange_3D_dense__nbsgrid_162.alta" />
<parameter name="min" value="[0, 0,-2]" />
<parameter name="max" value="[0.9, 2, 2]" />
<parameter name="max" value="[1.5, 2, 2]" />
<!-- Output data file -->
<output name="/tmp/Bande_orange_back.dat" />
<output name="/tmp/orange_TVL.alta" />
<!-- Parameters -->
<parameter name="param" value="SCHLICK_TL_TK_PROJ_DPHI" />
<parameter name="param" value="RETRO_TL_TVL_PROJ_DPHI" />
</action>
<action name="data2brdf">
<!-- Input arguments of the action -->
<input name="/tmp/Bande_orange_back.dat" />
<input name="/tmp/orange_TVL.alta" />
<parameter name="dt" value="0.5" />
<!--<parameter name="dt-relative" value="" />-->
<parameter name="dt-positive" value="" />
<!-- Output arguments of the action -->
<output name="./results/3d/retro/half/Bande_orange_half_bparam_rat.brdf" />
<output name="./results/3d/retro/half/Bande_orange_rat_TVL.brdf" />
<!-- Define the function to use -->
<!--<function name="rational_function_cosine" />-->
<function name="rational_function_chebychev" />
<function name="rational_function_cosine" />
<!--<function name="rational_function_chebychev" />-->
<!-- Define the ftting procedure to use -->
<plugin type="fitter" name="rational_fitter_parallel" />
<parameter name="min-np" value="45" />
<parameter name="min-np" value="59" />
<parameter name="np" value="100" />
<parameter name="np-step" value="5" />
<parameter name="nb-starting-points" value="1000" />
<parameter name="np-step" value="1" />
<parameter name="nb-starting-points" value="3000" />
</action>
<!-- Export the fit -->
<action name="brdf2gnuplot">
<action name="brdf2data">
<!-- Input and output arguments of the action -->
<input name="./results/3d/retro/half/Bande_orange_half_bparam_rat.brdf" />
<output name="./results/3d/retro/half/Bande_orange_half_bparam_rat.dat" />
<input name="./results/3d/retro/half/Bande_orange_rat_TVL.brdf" />
<output name="./results/3d/retro/half/Bande_orange_rat_TVL.dat" />
<parameter name="data" value="../papers/retro/mesures/original/Bande_orange/3d/633nm/Fichiers_definitifs/densify_helmholtz/Bande_orange_3D_dense__nbsgrid_162.alta" />
<parameter name="min" value="[0, 0,-2]" />
<parameter name="max" value="[2, 2, 2]" />
<parameter name="data-file" value="/tmp/orange_TVL.alta" />
</action>
<!-- Full rational interpolation of the Orange cloth sample.
-->
<action name="data2brdf">
<!-- Input arguments of the action -->
<input name="../papers/retro/mesures/original/Bande_orange/3d/633nm/Fichiers_definitifs/densify_helmholtz/Bande_orange_3D_dense__nbsgrid_162.alta" />
<parameter name="dt" value="0.5" />
<parameter name="data-positive" value="" />
<!--<parameter name="dt-relative" value="" />-->
<parameter name="min" value="[0, 0,-2]" />
<parameter name="max" value="[0.9, 2, 2]" />
<!-- Output arguments of the action -->
<output name="./results/3d/retro/half/Bande_orange_rat.brdf" />
<!-- Define the function to use -->
<!--<function name="rational_function_cosine" />-->
<function name="rational_function_chebychev" />
<!-- Define the ftting procedure to use -->
<!--<plugin type="fitter" name="rational_fitter_quadprog" />-->
<plugin type="fitter" name="rational_fitter_parallel" />
<parameter name="min-np" value="70" />
<parameter name="np" value="100" />
<parameter name="nb-starting-points" value="1000" />
</action>
<!-- Export the fit -->
<action name="brdf2gnuplot">
<action name="data2data">
<!-- Input and output arguments of the action -->
<input name="./results/3d/retro/half/Bande_orange_rat.brdf" />
<output name="./results/3d/retro/half/Bande_orange_rat.dat" />
<parameter name="data" value="../papers/retro/mesures/original/Bande_orange/3d/633nm/Fichiers_definitifs/densify_helmholtz/Bande_orange_3D_dense__nbsgrid_162.alta" />
<!--<parameter name="data" value="/tmp/yellow_slice_inc30.dat" />-->
<input name="./results/3d/retro/half/Bande_orange_rat_TVL.dat" />
<output name="./results/3d/retro/half/Bande_orange_rat_TVL2TL.dat" />
<parameter name="param" value="ISOTROPIC_TL_TV_PROJ_DPHI" />
</action>
</alta>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment