def parse_args(): '''parse command line arguments''' if 1 == len(sys.argv): from MAVProxy.modules.lib.optparse_gui import OptionParser file_type='file' directory_type='directory' else: from optparse import OptionParser file_type='str' directory_type='str' parser = OptionParser("pgm_convert.py [options] <directory>") parser.add_option("--directory", default=None, type=directory_type, help="directory containing PGM image files") parser.add_option("--output-directory", default=None, type=directory_type, help="directory to use for converted files") parser.add_option("--format", default='png', help="type of file to convert to (png or jpg)") return parser.parse_args()
def parse_args(): '''parse command line arguments''' if 1 == len(sys.argv): from MAVProxy.modules.lib.optparse_gui import OptionParser file_type = 'file' directory_type = 'directory' else: from optparse import OptionParser file_type = 'str' directory_type = 'str' parser = OptionParser("pgm_convert.py [options] <directory>") parser.add_option("--directory", default=None, type=directory_type, help="directory containing PGM image files") parser.add_option("--output-directory", default=None, type=directory_type, help="directory to use for converted files") parser.add_option("--format", default='png', help="type of file to convert to (png or jpg)") return parser.parse_args()
def parse_args(): """parse command line arguments""" if 1 == len(sys.argv): from MAVProxy.modules.lib.optparse_gui import OptionParser file_type = "file" directory_type = "directory" else: from optparse import OptionParser file_type = "str" directory_type = "str" parser = OptionParser("geosearch.py [options] <directory>", description="GeoSearch") parser.add_option("--directory", default=None, type=directory_type, help="directory containing image files") parser.add_option("--mission", default=None, type=file_type, help="mission file to display") parser.add_option("--mavlog", default=None, type=file_type, help="MAVLink telemetry log file") parser.add_option("--kmzlog", default=None, type=file_type, help="kmz file for image positions") parser.add_option("--triggerlog", default=None, type=file_type, help="robota trigger file for image positions") parser.add_option( "--time-offset", type="float", default=0, help="offset between camera and mavlink log times (seconds)" ) parser.add_option("--view", action="store_true", default=False, help="show images") parser.add_option("--saveview", action="store_true", default=False, help="save image view") parser.add_option("--lens", default=28.0, type="float", help="lens focal length") parser.add_option("--sensorwidth", default=35.0, type="float", help="sensor width") parser.add_option("--service", default="MicrosoftSat", help="map service") parser.add_option("--camera-params", default=None, type=file_type, help="camera calibration json file from OpenCV") parser.add_option("--debug", default=False, action="store_true", help="enable debug info") parser.add_option("--roll-stabilised", default=False, action="store_true", help="assume roll stabilised camera") parser.add_option("--rotate-180", default=False, action="store_true", help="rotate images 180 degrees") parser.add_option("--altitude", default=0, type="float", help="altitude (0 for auto)") parser.add_option("--thumbsize", default=60, type="int", help="thumbnail size") parser.add_option("--mosaic-thumbsize", default=35, type="int", help="mosaic thumbnail size") parser.add_option("--minscore", default=100, type="int", help="minimum score") parser.add_option("--gammalog", default=None, type="str", help="gamma.log from flight") parser.add_option("--target", default=None, type="str", help="lat,lon,radius target") parser.add_option("--categories", default=None, type=str, help="xml file containing categories for classification") if 1 != len(sys.argv): parser.add_option("--flag", default=[], type="str", action="append", help="flag positions"), parser.add_option("--blue-emphasis", default=False, action="store_true", help="enable blue emphasis in scanner") return parser.parse_args()
def parse_args(): '''parse command line arguments''' if 1 == len(sys.argv): from MAVProxy.modules.lib.optparse_gui import OptionParser file_type = 'file' directory_type = 'directory' else: from optparse import OptionParser file_type = 'str' directory_type = 'str' parser = OptionParser("geosearch.py [options] <directory>", description='GeoSearch') parser.add_option("--directory", default=None, type=directory_type, help="directory containing image files") parser.add_option("--mission", default=None, type=file_type, help="mission file to display") parser.add_option("--mavlog", default=None, type=file_type, help="MAVLink telemetry log file") parser.add_option("--kmzlog", default=None, type=file_type, help="kmz file for image positions") parser.add_option("--triggerlog", default=None, type=file_type, help="robota trigger file for image positions") parser.add_option( "--time-offset", type='int', default=0, help="offset between camera and mavlink log times (seconds)") parser.add_option("--view", action='store_true', default=False, help="show images") parser.add_option("--lens", default=28.0, type='float', help="lens focal length") parser.add_option("--sensorwidth", default=35.0, type='float', help="sensor width") parser.add_option("--service", default='MicrosoftSat', help="map service") parser.add_option("--camera-params", default=None, type=file_type, help="camera calibration json file from OpenCV") parser.add_option("--debug", default=False, action='store_true', help="enable debug info") return parser.parse_args()
def parse_args(): '''parse command line arguments''' if 1 == len(sys.argv): from MAVProxy.modules.lib.optparse_gui import OptionParser file_type = 'file' directory_type = 'directory' else: from optparse import OptionParser file_type = 'str' directory_type = 'str' parser = OptionParser("geosearch.py [options] <directory>", description='GeoSearch') parser.add_option("--directory", default=None, type=directory_type, help="directory containing image files") parser.add_option("--mission", default=None, type=file_type, help="mission file to display") parser.add_option("--mavlog", default=None, type=file_type, help="MAVLink telemetry log file") parser.add_option("--kmzlog", default=None, type=file_type, help="kmz file for image positions") parser.add_option("--triggerlog", default=None, type=file_type, help="robota trigger file for image positions") parser.add_option( "--time-offset", type='float', default=0, help="offset between camera and mavlink log times (seconds)") parser.add_option("--view", action='store_true', default=False, help="show images") parser.add_option("--saveview", action='store_true', default=False, help="save image view") parser.add_option("--lens", default=28.0, type='float', help="lens focal length") parser.add_option("--sensorwidth", default=35.0, type='float', help="sensor width") parser.add_option("--service", default='MicrosoftSat', help="map service") parser.add_option("--camera-params", default=None, type=file_type, help="camera calibration json file from OpenCV") parser.add_option("--debug", default=False, action='store_true', help="enable debug info") parser.add_option("--roll-stabilised", default=False, action='store_true', help="assume roll stabilised camera") parser.add_option("--rotate-180", default=False, action='store_true', help="rotate images 180 degrees") parser.add_option("--altitude", default=0, type='float', help="altitude (0 for auto)") parser.add_option("--thumbsize", default=60, type='int', help="thumbnail size") parser.add_option("--mosaic-thumbsize", default=35, type='int', help="mosaic thumbnail size") parser.add_option("--minscore", default=100, type='int', help="minimum score") parser.add_option("--gammalog", default=None, type='str', help="gamma.log from flight") parser.add_option("--target", default=None, type='str', help="lat,lon,radius target") parser.add_option("--categories", default=None, type=str, help="xml file containing categories for classification") if 1 != len(sys.argv): parser.add_option("--flag", default=[], type='str', action='append', help="flag positions"), parser.add_option("--blue-emphasis", default=False, action='store_true', help="enable blue emphasis in scanner") return parser.parse_args()
def parse_args(): '''parse command line arguments''' if 1 == len(sys.argv): from MAVProxy.modules.lib.optparse_gui import OptionParser file_type='file' directory_type='directory' else: from optparse import OptionParser file_type='str' directory_type='str' parser = OptionParser("geosearch.py [options] <directory>") parser.add_option("--directory", default=None, type=directory_type, help="directory containing image files") parser.add_option("--mission", default=None, type=file_type, help="mission file to display") parser.add_option("--mavlog", default=None, type=file_type, help="MAVLink telemetry log file") parser.add_option("--minscore", default=500, type='int', help="minimum score") parser.add_option("--filter-type", type='choice', default='simple', choices=['simple', 'compactness'], help="object filter type") parser.add_option("--time-offset", type='int', default=0, help="offset between camera and mavlink log times (seconds)") parser.add_option("--altitude", type='int', default=90, help="camera altitude above ground (meters)") parser.add_option("--grid", action='store_true', default=False, help="add a UTM grid") parser.add_option("--view", action='store_true', default=False, help="show images") parser.add_option("--lens", default=4.0, type='float', help="lens focal length") parser.add_option("--camera-params", default=None, type=file_type, help="camera calibration json file from OpenCV") parser.add_option("--roll-stabilised", default=False, action='store_true', help="roll is stabilised") return parser.parse_args()
def parse_args(): '''parse command line arguments''' if 1 == len(sys.argv): from MAVProxy.modules.lib.optparse_gui import OptionParser file_type='file' directory_type='directory' else: from optparse import OptionParser file_type='str' directory_type='str' parser = OptionParser("geosearch.py [options] <directory>", description='GeoSearch') parser.add_option("--directory", default=None, type=directory_type, help="directory containing image files") parser.add_option("--mission", default=None, type=file_type, help="mission file to display") parser.add_option("--mavlog", default=None, type=file_type, help="MAVLink telemetry log file") parser.add_option("--kmzlog", default=None, type=file_type, help="kmz file for image positions") parser.add_option("--triggerlog", default=None, type=file_type, help="robota trigger file for image positions") parser.add_option("--time-offset", type='int', default=0, help="offset between camera and mavlink log times (seconds)") parser.add_option("--view", action='store_true', default=False, help="show images") parser.add_option("--lens", default=28.0, type='float', help="lens focal length") parser.add_option("--sensorwidth", default=35.0, type='float', help="sensor width") parser.add_option("--service", default='MicrosoftSat', help="map service") parser.add_option("--camera-params", default=None, type=file_type, help="camera calibration json file from OpenCV") parser.add_option("--debug", default=False, action='store_true', help="enable debug info") return parser.parse_args()
def parse_args(): '''parse command line arguments''' if 1 == len(sys.argv): from MAVProxy.modules.lib.optparse_gui import OptionParser file_type='file' directory_type='directory' else: from optparse import OptionParser file_type='str' directory_type='str' parser = OptionParser("geosearch.py [options] <directory>", description='GeoSearch') parser.add_option("--directory", default=None, type=directory_type, help="directory containing image files") parser.add_option("--mission", default=None, type=file_type, help="mission file to display") parser.add_option("--mavlog", default=None, type=file_type, help="MAVLink telemetry log file") parser.add_option("--kmzlog", default=None, type=file_type, help="kmz file for image positions") parser.add_option("--triggerlog", default=None, type=file_type, help="robota trigger file for image positions") parser.add_option("--minscore", default=500, type='int', help="minimum score") parser.add_option("--filter-type", type='choice', default='simple', choices=['simple', 'compactness'], help="object filter type") parser.add_option("--time-offset", type='int', default=0, help="offset between camera and mavlink log times (seconds)") parser.add_option("--altitude", type='int', default=None, help="camera altitude above ground (meters)") parser.add_option("--view", action='store_true', default=False, help="show images") parser.add_option("--lens", default=28.0, type='float', help="lens focal length") parser.add_option("--sensorwidth", default=35.0, type='float', help="sensor width") parser.add_option("--service", default='MicrosoftSat', help="map service") parser.add_option("--camera-params", default=None, type=file_type, help="camera calibration json file from OpenCV") parser.add_option("--roll-stabilised", default=False, action='store_true', help="roll is stabilised") parser.add_option("--fullres", action='store_true', default=False, help="scan at full resolution") parser.add_option("--min-region-area", default=0.15, type='float', help="minimum region area (m^2)") parser.add_option("--max-region-area", default=2.0, type='float', help="maximum region area (m^2)") parser.add_option("--min-region-size", default=0.1, type='float', help="minimum region size (m)") parser.add_option("--max-region-size", default=2.0, type='float', help="maximum region size (m)") parser.add_option("--region-merge", default=3.0, type='float', help="region merge size (m)") parser.add_option("--max-rarity-pct", default=0.02, type='float', help="maximum percentage rarity (percent)") parser.add_option("--debug", default=False, action='store_true', help="enable debug info") return parser.parse_args()
def parse_args(): '''parse command line arguments''' if 1 == len(sys.argv): from MAVProxy.modules.lib.optparse_gui import OptionParser file_type = 'file' directory_type = 'directory' else: from optparse import OptionParser file_type = 'str' directory_type = 'str' parser = OptionParser("geosearch.py [options] <directory>", description='GeoSearch') parser.add_option("--directory", default=None, type=directory_type, help="directory containing image files") parser.add_option("--mission", default=None, type=file_type, help="mission file to display") parser.add_option("--mavlog", default=None, type=file_type, help="MAVLink telemetry log file") parser.add_option("--kmzlog", default=None, type=file_type, help="kmz file for image positions") parser.add_option("--triggerlog", default=None, type=file_type, help="robota trigger file for image positions") parser.add_option("--minscore", default=500, type='int', help="minimum score") parser.add_option("--filter-type", type='choice', default='simple', choices=['simple', 'compactness'], help="object filter type") parser.add_option( "--time-offset", type='int', default=0, help="offset between camera and mavlink log times (seconds)") parser.add_option("--altitude", type='int', default=90, help="camera altitude above ground (meters)") parser.add_option("--view", action='store_true', default=False, help="show images") parser.add_option("--lens", default=28.0, type='float', help="lens focal length") parser.add_option("--sensorwidth", default=35.0, type='float', help="sensor width") parser.add_option("--service", default='MicrosoftSat', help="map service") parser.add_option("--camera-params", default=None, type=file_type, help="camera calibration json file from OpenCV") parser.add_option("--roll-stabilised", default=False, action='store_true', help="roll is stabilised") parser.add_option("--fullres", action='store_true', default=False, help="scan at full resolution") parser.add_option("--min-region-area", default=0.003, type='float', help="minimum region area (m^2)") parser.add_option("--max-region-area", default=2.0, type='float', help="maximum region area (m^2)") parser.add_option("--min-region-size", default=0.05, type='float', help="minimum region size (m)") parser.add_option("--max-region-size", default=2.0, type='float', help="maximum region size (m)") parser.add_option("--region-merge", default=0.5, type='float', help="region merge size (m)") parser.add_option("--max-rarity-pct", default=0.02, type='float', help="maximum percentage rarity (percent)") return parser.parse_args()