Parcourir la source

Merge branch 'release/v1.0.0'

Jérôme BUISINE il y a 4 ans
Parent
commit
620db4e4f8

+ 4 - 2
run/compare_folder.sh

@@ -25,6 +25,7 @@ markdown_file=$3
 
 
 header_line="# | "
+table_line="---|"
 for image in $(ls ${folder_path}/)
 do
     IFS='.' read -ra ADDR <<< "${image}"
@@ -34,11 +35,13 @@ do
     image_index=${ADDR[-1]}
 
     header_line="${header_line} ${image_index} |"
+    table_line="${table_line}---|"
 done
 
 echo $folder_path > $markdown_file
 echo ""
 echo ${header_line} >> $markdown_file
+echo ${table_line} >> $markdown_file
 
 for image_i in $(ls ${folder_path}/)
 do
@@ -59,5 +62,4 @@ do
     done
 
     echo ${line} >> $markdown_file
-done
-
+done

+ 53 - 0
run/h_flip_folder.sh

@@ -0,0 +1,53 @@
+#! /bin/bash
+if [ -z "$1" ]
+  then
+    echo "No argument supplied"
+    echo "Need folder argument"
+    exit 1
+fi
+
+if [ -z "$2" ]
+  then
+    echo "No argument supplied"
+    echo "Need output extension"
+    exit 1
+fi
+
+if [ -z "$3" ]
+  then
+    echo "No argument supplied"
+    echo "Need output folder"
+    exit 1
+fi
+
+
+main_folder=$1
+prefix="p3d_"
+build_folder="build"
+
+ext=$2
+output_folder=$3
+
+for folder in $(ls ${main_folder})
+do
+  echo $folder
+  mkdir -p ${output_folder}/${folder}
+  for file in $(ls ${main_folder}/$folder)
+  do 
+      filename=${main_folder}/${folder}/${file}
+      filename_fixed=${filename//\/\//\/}
+
+      IFS='.' read -ra ADDR <<< "${file}"
+
+      filename_without_ext=${ADDR[0]}
+      outfile="${filename_without_ext}.${ext}"
+
+      echo ${filename_fixed}
+      echo ${output_folder}/${folder}/${outfile}
+
+      #check if filename contains 
+      # if [[ "$file" == ${prefix}* ]]; then
+            ./${build_folder}/main/rawls_h_flip --image ${filename_fixed} --outfile ${output_folder}/${folder}/${outfile}
+      # fi
+  done 
+done

+ 50 - 0
run/h_flip_subfolder.sh

@@ -0,0 +1,50 @@
+#! /bin/bash
+if [ -z "$1" ]
+  then
+    echo "No argument supplied"
+    echo "Need folder argument"
+    exit 1
+fi
+
+if [ -z "$2" ]
+  then
+    echo "No argument supplied"
+    echo "Need output extension"
+    exit 1
+fi
+
+if [ -z "$3" ]
+  then
+    echo "No argument supplied"
+    echo "Need output folder"
+    exit 1
+fi
+
+
+main_folder=$1
+prefix="p3d_"
+build_folder="build"
+
+ext=$2
+output_folder=$3
+
+
+mkdir -p ${output_folder}
+for file in $(ls ${main_folder})
+do 
+    filename=${main_folder}/${file}
+    filename_fixed=${filename//\/\//\/}
+
+    IFS='.' read -ra ADDR <<< "${file}"
+
+    filename_without_ext=${ADDR[0]}
+    outfile="${filename_without_ext}.${ext}"
+
+    echo ${filename_fixed}
+    echo ${output_folder}/${outfile}
+
+    #check if filename contains 
+    # if [[ "$file" == ${prefix}* ]]; then
+          ./${build_folder}/main/rawls_h_flip --image ${filename_fixed} --outfile ${output_folder}/${outfile}
+    # fi
+done 

run/reconstruct_png.sh → run/reconstruct_png_all.sh


+ 1 - 1
run/reconstruct_png_step.sh

@@ -40,7 +40,7 @@ startindex=0
 while [ $startindex -lt $nb_elements ]
 do
 
-  outfile="${folder}_${step}_${counter}.png"
+  outfile="${folder}_${step}_${counter}.rawls"
   echo $outfile
 
   ./${build_folder}/main/rawls_merge_mean --folder ${folder_path} --random 0 --samples ${step} --startindex $startindex --outfile $output_folder/$outfile