Skip to content

Commit

Permalink
Fixed windows paths for vision
Browse files Browse the repository at this point in the history
  • Loading branch information
amymcgovern committed Feb 11, 2018
1 parent 1611c68 commit 7fa90cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DroneVision.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,15 @@ def open_video(self):
# we have bypassed the old opencv VideoCapture method because it was unreliable for rtsp
fullPath = inspect.getfile(DroneVision)
shortPathIndex = fullPath.rfind("/")
if (shortPathIndex == -1):
# handle Windows paths
shortPathIndex = fullPath.rfind("\\")
print(shortPathIndex)
shortPath = fullPath[0:shortPathIndex]
imagePath = join(shortPath, "images")
utilPath = join(shortPath, "utils")
print(imagePath)
print(utilPath)

# the first step is to open the rtsp stream through ffmpeg first
# this step creates a directory full of images, one per frame
Expand Down

0 comments on commit 7fa90cc

Please sign in to comment.