Issues (58)

scripts/stickscaler.py (2 issues)

1
#!/usr/bin/env python
2
"""Takes a point cloud containing only the red segments of scale sticks and
3
returns the scale estimation and a confidence indication.
4
5
Usage: stickscaler.py [-e <eps>] [-s <minsamples>] <infile>
6
7
Options:
8
    -e <eps>, --eps <eps>   The maximum distance between two samples for them
9
                        to be considered as in the same neighborhood
10
                        [default: 0.1].
11
    -s <minsamples>, --minSamples <minsamples>
12
                        The number of samples in a neighborhood for a point to
13
                        be considered a core point [default: 20].
14
"""
15
16
from __future__ import print_function
17
from docopt import docopt
18
from patty.utils import load
19
from patty.registration.stickscale import get_stick_scale
20
21
# Takes a point cloud containing only the red segments of scale sticks and
22
# returns the scale estimation and a confidence indication.
23
24
if __name__ == '__main__':
25
    args = docopt(__doc__)
0 ignored issues
show
Coding Style Naming introduced by
The name args does not conform to the constant naming conventions ((([A-Z_][A-Z0-9_]*)|(__.*__))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
26
    pc = load(args['<infile>'])
0 ignored issues
show
Coding Style Naming introduced by
The name pc does not conform to the constant naming conventions ((([A-Z_][A-Z0-9_]*)|(__.*__))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
27
28
    print(get_stick_scale(pc, float(args['--eps']), int(args['--minSamples'])))
29