yifita / 3PU

Patch-base progressive 3D Point Set Upsampling
165 stars 23 forks source link

Cannot Sample Points from Given Script #4

Closed frostinassiky closed 4 years ago

frostinassiky commented 5 years ago

Hello,

I could not sample the point from command ./run_pd_sampling.sh ../../train_mesh ../../train_mesh_PD "**/*.off" 8989.

The error is:

input: ../../train_mesh output: ../../train_mesh_PD extension: **/*.off

gargo_aligned
SubTool-0-11417966_aligned
_: line 10: 8989: command not found
angel4_aligned
_: line 10: 8989: command not found
_: line 10: 8989: command not found
buddha_sit_aligned
_: line 10: 8989: command not found
ganesha_aligned
ladylady_aligned
_: line 10: 8989: command not found
_: line 10: 8989: command not found
angel2_aligned
_: line 10: 8989: command not found
hercules_aligned
statue_oxen_aligned

Looking into the file ./run_pd_sampling.sh, the binary file is defined but not used.

$4 is the number of sample points, but it becomes the binary argument in the function poisson_disk

./prepare_data/Poisson_sample/run_pd_sampling.sh

function poisson_disk () {
    iFile="$1"
    iName="$(basename $iFile)"
    # remove last extension
    iName="${iName%.*}"
    iDir="$(dirname $iFile)"
    oDir="$2/$iDir"
    oFile="$oDir/$iName.xyz"
    numSample="$3"
    binary="$4"
    echo "$iName"
    if [ ! -f "$oFile" ]; then
        $binary $numSample $iFile $oFile
    fi
}
yifita commented 5 years ago

does anyone else come across this problem? According to run_pd_sampling.sh#L34, $binary is indeed the 4th argument

xiazhiwang-zz commented 5 years ago

According to my experiments, the output points is not exactly the same as the input sample points, always more points are sampled. May I know how to get the specific output points? (I run C++ file directly, and cannot run ".sh" file.) Thanks.

yifita commented 4 years ago

@Frostinassiky Sorry I misunderstood your comment, https://github.com/yifita/3PU/commit/51ef0c86091761a3803545e02ed084a8ede162a9 should fix this issue.

yifita commented 4 years ago

According to my experiments, the output points is not exactly the same as the input sample points, always more points are sampled. May I know how to get the specific output points? (I run C++ file directly, and cannot run ".sh" file.) Thanks.

Could you please open another issue? THis is somewhat unrelated to the initial post. (BTW I rebuilt the binary, ran the sampling script and managed to get always the correct number of points)