colinlaney / animal-tracking

Object tracking with OpenCV in open field behavioral test (overhead view maze)
https://youtu.be/GebcshN4OdE
Creative Commons Zero v1.0 Universal
50 stars 23 forks source link

Issue with tkinter gui #17

Closed Hatem-Jr closed 3 years ago

Hatem-Jr commented 3 years ago

the thing is I checked if the cv2.imwrite works or not by adding this:

if not cv2.imwrite(RELATIVE_DESTINATION_PATH + 'traces/' + name + '[distance]=%.2f' % distance + '[time]=%.1fs' % t + '.png', cv2.resize(imgTrack, (max(HD), max(HD)))): raise Exception("Could not write image")

and the exception is always raised

and If the problem is that I'm passing file path and not just the file name to the trace method then how to get the .mp4 part of the path from "GUI.filepath" only ?