Skip to content

Commit

Permalink
modified paths for query phots and maps
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLonelyFighter committed Oct 15, 2022
1 parent 35c0b9f commit 94de470
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/build_map.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Module used for writing csv files"""
"""Module used for automatically building satellite maps with Google Maps API"""
import csv
import math
import shutil
Expand Down
2 changes: 1 addition & 1 deletion src/extract_image_meta_exif.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Script that reads the EXIF data from the drone images and extracts the GNSS coordinates to a csv file"""
import subprocess
import re
import os

############################################################################################################
# Script that reads the EXIF data from the drone images and extracts the GNSS coordinates to a csv file
# Requires exiftool to be installed: https://exiftool.org/
# You might have to modify the scripts to match the EXIF metadata of your drone photos
# Use https://www.metadata2go.com/ to easily check the metadata of your images
Expand Down
1 change: 1 addition & 0 deletions src/plot_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Plots data output from wildnav"""
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
Expand Down
2 changes: 1 addition & 1 deletion src/superglue_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def match_image():
Wrapper function for matching two images, provides an interface to superglue model
"""
center = None
input = '../assets/map/'
input = '../assets/maps/map_1/'
output_dir = "../results"
image_glob = ['*.png', '*.jpg', '*.jpeg', '*.JPG']
skip = 1
Expand Down
11 changes: 6 additions & 5 deletions src/wildnav.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import cv2
"""Core module. Contains the main functions for the project."""
import csv
import superglue_utils

import cv2
import haversine as hs
from haversine import Unit
import superglue_utils

############################################################################################################
# Important variables
############################################################################################################

map_filename = "../assets/map/map.csv" # csv file with the sattelite geo tagged images
map_path = "../assets/maps/map_1/"
map_filename = "../assets/maps/map_1/map.csv" # csv file with the sattelite geo tagged images
drone_photos_filename = "../assets/query/photo_metadata.csv" # csv file with the geo tagged drone images;
# the geo coordinates are only used to compare
# the calculated coordinates with the real ones
Expand Down Expand Up @@ -177,7 +178,7 @@ def calculate_geo_pose(geo_photo, center, features_mean, shape):
for rot in rotations:

# Write the query photo to the map folder
cv2.imwrite("../assets/map/1_query_image.png", photo)
cv2.imwrite(map_path + "1_query_image.png", photo)

#Call superglue wrapper function to match the query image to the map
satellite_map_index_new, center_new, located_image_new, features_mean_new, query_image_new, feature_number = superglue_utils.match_image()
Expand Down

0 comments on commit 94de470

Please sign in to comment.