Commit fd59d956 authored by Adam Paquette's avatar Adam Paquette
Browse files

Minor changes and removal of .json file.

parent a0d755cb
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
{
	"AS15-M-0414_sub4.cub": ["AS15-M-0413_sub4.cub", "AS15-M-0412_sub4.cub"],
	"AS15-M-0413_sub4.cub": ["AS15-M-0414_sub4.cub", "AS15-M-0412_sub4.cub"],
	"AS15-M-0412_sub4.cub": ["AS15-M-0413_sub4.cub", "AS15-M-0414_sub4.cub"]
}
 No newline at end of file
+19 −37
Original line number Diff line number Diff line
@@ -8,21 +8,9 @@ from autocnet.graph.network import CandidateGraph
from autocnet.fileio.io_controlnetwork import to_isis
from autocnet.fileio.io_controlnetwork import write_filelist

if __name__ == '__main__':

    # parses command line arguments into a single args variable
    def parse_arguments():
        parser = argparse.ArgumentParser()
        parser.add_argument('input_filename', action='store', help='Provide the name of the file list/adjacency list')
        parser.add_argument('output_filename', action='store', help='Provide the name of the output file')
        args = parser.parse_args()

        return args

# Matches the images in the input file using various candidate graph methods
# produces two files usable in isis
    def match_images(args):
        cg = CandidateGraph.from_adjacency(args.input_filename, basepath='/home/acpaquette/Desktop/')
cg = CandidateGraph.from_adjacency(sys.argv[1], basepath='')

# Apply SIFT to extract features
cg.extract_features(method='sift', extractor_parameters={'nfeatures': 1000})
@@ -46,13 +34,7 @@ if __name__ == '__main__':
cnet = cg.to_cnet(clean_keys=['subpixel'], isis_serials=True)

filelist = cg.to_filelist()
        write_filelist(filelist, args.input_filename + '.lis')

        to_isis(args.input_filename + '.net', cnet, mode='wb', targetname='Moon')
write_filelist(filelist,'TestFile.lis')

        # Ticket calls for a user specified "file list".
        # What kind of "file list" should this ui take? Should it be in the form of a .json file or should we allow the user
        # to enter the images he/she wants to look at in particular and parse them into a .json?
to_isis('TestFile.net', cnet, mode='wb', targetname='Moon')
    command_line_args = parse_arguments()
    match_images(command_line_args)
 No newline at end of file