#Loads Car Results from Car Detection Model output
#CLI: open car_predictions.csv
#CLI: open stitched-images.png
#CLI: open map.svg'
#CLI: open premap.bmp
#CLI: run shell script form path
#Square Root
#Create missing directories for project
getMirrored
(
x = None
,
y = None
)
#Mirror matrix
#Load georefernces from csv file. csv format: image, latTopLeftCorner, longTopLeftCorner, latDownRightCorner, longDownRightCorner
dictGeoreferences
(
path
,
correction=False
)
#Add georefernces to dictionary
calcRes
(
path
,
correction=False
)
#Calculate resolution in meters from georefernces
randomPair
(
latRange
,
lonRange
)
#Random lat lon pair.
#Add earths radius as offset in meters to georefences
coordinatesToMeters
(
point
,
point2
)
#Distance bewtween lat lon coordinates in meters.
coordinatesToPixels
(
coordinates
)
#Distance bewtween lat lon coordinates in pixels.
#Order coorners out of 4 points
randomRectangle
(
latRange
,
lonRange
,
size
)
#Generate random rect
#Load tile georefernces
dictTileReferences
(
path
,
correction=False
)
#Add tile georefernces to dictionary
ConvexHull(object)
#Convex Hull
#Convex Hull
#Add points to convex hull
_get_orientation
(
origin
,
p1
,
p2
)
#Convex hull orientation
#Computes convex hull
#Returns Convex Hull points
#Matplot lib display o Convex Hull Points
giftWrappedBoardSize
(
georeferencesPath
)
#Get size of map out of georefences
coordConvexHull
(
georeferencesPath
)
#Convex Hull fromg georeferences file
bmp_to_svg
(
path
,
pathOut
)
#CLI: potrace bitmap to vector graphics
sekeletonize
(
path
,
pathOut
)
#Lines out of street detection output
loadTiles
(
path
,
amt = None
,
correction=False
)
#Load Tile images from path
loadImages
(
path
,
amt = None
,
correction=False
,
whereFrom='images/image-{}.jpg'
)
#Load Satelite images from path
#Create Empty Map size of all georefences
createBoardPerfectSquares
(
)
#Empty Square Map
fitTiles
(
board
,
tiles
,
res
)
#Fit tiles to empty map
stitchImages
(
path
,
res
,
amt = None
,
correction=False
,
where='images/image-{}.jpg'
,
outputPath='files/stitched-images.png'
)
#Stitch images toghether out of georefences
stitchMasks
(
path
,
res
,
amt = None
,
correction=False
)
#Stitched road detection output as masked map
scale
(
img
,
fullSize1
,
fullSize2
,
roadSize
)
#Scale image
multiple
(
georeferencesPath
,
res
,
correction=False
)
#Multiple satelital images
#Singe satelite image
#Multiple satelite images that do not compose a map
multipleNoSkeleton
(
georeferencesPath
,
res
,
correction=False
)
#Multiple road detection from satelite images
#Single road detection from satelite image
#Multiple road detection satelite images that do not compose a map
#Full standardize routine: creates directories, loads georeferences and calculates resolution, stitches images, detects roads, generates a single map out of all satellital images, detects cars on masked map, outputs map depicting both road detecion and car detection.
#CLI input
#Web Interface main endpoint
#Web Interface check for file upload
#Web Interface favicon
#Web Interface upload files
#Web Interface delete file
#Web Interface Run main routine with executeRoutine()
#Retun results
#Web CLI
#Web Interface display road detection
#Web Interface display car detection
#Launch WSGI server for Web Interface
#Threading for server instance