You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although pyIDI supports inputting numpy.ndarray objects into the pyIDI constructor, instead of paths to .cih files (#13 ), setting the LucasKanade ('lk') method up with such objects currently won't work, because this method will automatically attempt to create temporary analysis files, looking at the .cih file path for their location.
This is the error log:
TypeError Traceback (most recent call last)
<ipython-input-10-7ed824ef8d61> in <module>
----> 1 video.set_method('lk', roi_size=(31, 31))
2 video.show_points()
c:\program files\python38\lib\site-packages\pyidi\pyidi.py in set_method(self, method, **kwargs)
78 """
79 if isinstance(method, str) and method in self.available_methods.keys():
---> 80 self.method = self.available_methods[method]['IDIMethod'](self, **kwargs)
81 elif callable(method) and hasattr(method, 'calculate_displacements'):
82 try:
c:\program files\python38\lib\site-packages\pyidi\methods\idi_method.py in __init__(self, video, *args, **kwargs)
13 """
14 self.video = video
---> 15 self.configure(*args, **kwargs)
16
17
c:\program files\python38\lib\site-packages\pyidi\methods\_lucas_kanade.py in configure(self, roi_size, pad, max_nfev, tol, int_order, verbose, show_pbar, processes, pbar_type, multi_type, resume_analysis, process_number, reference_image)
107
108 self.start_time = 1
--> 109 self.temp_dir = os.path.join(os.path.split(self.video.cih_file)[0], 'temp_file')
110 self.settings_filename = os.path.join(self.temp_dir, 'settings.pkl')
111 self.analysis_run = 0
c:\program files\python38\lib\ntpath.py in split(p)
183 Return tuple (head, tail) where tail is everything after the final slash.
184 Either part may be empty."""
--> 185 p = os.fspath(p)
186 seps = _get_bothseps(p)
187 d, p = splitdrive(p)
TypeError: expected str, bytes or os.PathLike object, not numpy.ndarray
This could be solved either by omitting the automatic creation of analysis files if the cih_file argument of the pyIDI constructor is not a valid path, choosing another location (e.g. os.getcwd()) for these files.
The text was updated successfully, but these errors were encountered:
Although pyIDI supports inputting
numpy.ndarray
objects into thepyIDI
constructor, instead of paths to .cih files (#13 ), setting theLucasKanade
('lk'
) method up with such objects currently won't work, because this method will automatically attempt to create temporary analysis files, looking at the .cih file path for their location.This is the error log:
This could be solved either by omitting the automatic creation of analysis files if the
cih_file
argument of the pyIDI constructor is not a valid path, choosing another location (e.g.os.getcwd()
) for these files.The text was updated successfully, but these errors were encountered: