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

final changes to base image_match.py

parent b94bfbc0
Loading
Loading
Loading
Loading
+6 −11
Original line number Diff line number Diff line
@@ -8,17 +8,10 @@ from autocnet.graph.network import CandidateGraph
from autocnet.fileio.io_controlnetwork import to_isis
from autocnet.fileio.io_controlnetwork import write_filelist

'''
parser = argparse.ArgumentParser()
parser.add_argument('filename', action='store')

print(parser.parse_args())
'''

cg = CandidateGraph.from_adjacency(sys.argv[1], basepath='/home/acpaquette/Desktop/')
cg = CandidateGraph.from_adjacency(args.filename, basepath='/home/acpaquette/Desktop/')

# Apply SIFT to extract features
cg.extract_features(method='sift', extractor_parameters={'nfeatures': 500})
cg.extract_features(method='sift', extractor_parameters={'nfeatures': 1000})

# Match
cg.match_features()
@@ -32,10 +25,10 @@ m = cg.edge[0][1].masks
# Compute a homography and apply RANSAC
cg.compute_fundamental_matrices(clean_keys=['ratio', 'symmetry'])

cg.suppress(clean_keys=['fundamental'])

cg.subpixel_register(clean_keys=['fundamental', 'symmetry', 'ratio'], template_size=5, search_size=15)

cg.suppress(clean_keys=['fundamental'], k=50)

cnet = cg.to_cnet(clean_keys=['subpixel'], isis_serials=True)

filelist = cg.to_filelist()
@@ -43,6 +36,8 @@ write_filelist(filelist, 'TestList.lis')

to_isis('TestList.net', cnet, mode='wb', targetname='Moon')

if __

# 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?