glassesTools 1.3.2__tar.gz → 1.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. {glassestools-1.3.2/src/glassesTools.egg-info → glassestools-1.3.3}/PKG-INFO +5 -4
  2. {glassestools-1.3.2 → glassestools-1.3.3}/README.md +1 -1
  3. {glassestools-1.3.2 → glassestools-1.3.3}/requirements.txt +3 -2
  4. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/aruco.py +1 -1
  5. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/SMI_ETG.py +4 -3
  6. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/SeeTrue_STONE.py +3 -3
  7. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/adhawk_mindlink.py +1 -1
  8. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/pupilLabs.py +2 -2
  9. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/tobii_G2.py +1 -1
  10. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/tobii_G3.py +1 -1
  11. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/ocv.py +2 -2
  12. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/plane.py +2 -2
  13. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/version.py +1 -1
  14. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/video_utils.py +1 -1
  15. {glassestools-1.3.2 → glassestools-1.3.3/src/glassesTools.egg-info}/PKG-INFO +5 -4
  16. glassestools-1.3.3/src/glassesTools.egg-info/requires.txt +10 -0
  17. glassestools-1.3.2/src/glassesTools.egg-info/requires.txt +0 -9
  18. {glassestools-1.3.2 → glassestools-1.3.3}/LICENSE +0 -0
  19. {glassestools-1.3.2 → glassestools-1.3.3}/MANIFEST.in +0 -0
  20. {glassestools-1.3.2 → glassestools-1.3.3}/pyproject.toml +0 -0
  21. {glassestools-1.3.2 → glassestools-1.3.3}/setup.cfg +0 -0
  22. {glassestools-1.3.2 → glassestools-1.3.3}/setup.py +0 -0
  23. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/__init__.py +0 -0
  24. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/data_files.py +0 -0
  25. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/drawing.py +0 -0
  26. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/eyetracker.py +0 -0
  27. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/gaze_headref.py +0 -0
  28. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/gaze_worldref.py +0 -0
  29. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/__init__.py +0 -0
  30. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/intervals.py +0 -0
  31. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/marker.py +0 -0
  32. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/__init__.py +0 -0
  33. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/core.py +0 -0
  34. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/iso.py +0 -0
  35. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/mpeglookups.py +0 -0
  36. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/non_iso.py +0 -0
  37. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/summary.py +0 -0
  38. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/util.py +0 -0
  39. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/recording.py +0 -0
  40. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/timestamps.py +0 -0
  41. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/transforms.py +0 -0
  42. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/utils.py +0 -0
  43. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/video_gui.py +0 -0
  44. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools.egg-info/SOURCES.txt +0 -0
  45. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools.egg-info/dependency_links.txt +0 -0
  46. {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: glassesTools
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: Tools for processing wearable eye tracker recordings.
5
5
  Home-page: https://github.com/dcnieho/glassesTools
6
6
  Author: Diederick Niehorster
@@ -38,9 +38,10 @@ License-File: LICENSE
38
38
  Requires-Dist: numpy
39
39
  Requires-Dist: pandas
40
40
  Requires-Dist: msgpack
41
- Requires-Dist: opencv-python-headless==4.9.0.80
41
+ Requires-Dist: imgui_bundle==1.3.0
42
+ Requires-Dist: opencv-python-headless==4.10.0.82
42
43
  Requires-Dist: ffpyplayer
43
- Requires-Dist: scipy==1.11.3
44
+ Requires-Dist: eulerangles
44
45
  Provides-Extra: gui
45
46
  Requires-Dist: imgui_bundle==1.3.0; extra == "gui"
46
47
 
@@ -48,7 +49,7 @@ Requires-Dist: imgui_bundle==1.3.0; extra == "gui"
48
49
  [![PyPI Latest Release](https://img.shields.io/pypi/v/glassesTools.svg)](https://pypi.org/project/glassesTools/)
49
50
  [![image](https://img.shields.io/pypi/pyversions/glassesTools.svg)](https://pypi.org/project/glassesTools/)
50
51
 
51
- # GlassesTools v1.3.2
52
+ # GlassesTools v1.3.3
52
53
  Tools for processing wearable eye tracker recordings.
53
54
 
54
55
  If you use this package or any of the code in this repository, please cite:<br>
@@ -2,7 +2,7 @@
2
2
  [![PyPI Latest Release](https://img.shields.io/pypi/v/glassesTools.svg)](https://pypi.org/project/glassesTools/)
3
3
  [![image](https://img.shields.io/pypi/pyversions/glassesTools.svg)](https://pypi.org/project/glassesTools/)
4
4
 
5
- # GlassesTools v1.3.2
5
+ # GlassesTools v1.3.3
6
6
  Tools for processing wearable eye tracker recordings.
7
7
 
8
8
  If you use this package or any of the code in this repository, please cite:<br>
@@ -1,6 +1,7 @@
1
1
  numpy
2
2
  pandas
3
3
  msgpack
4
- opencv-python-headless==4.9.0.80
4
+ imgui_bundle==1.3.0
5
+ opencv-python-headless==4.10.0.82
5
6
  ffpyplayer # comes with ffmpeg binaries we need
6
- scipy==1.11.3
7
+ eulerangles
@@ -193,7 +193,7 @@ def run_pose_estimation(in_video, frame_timestamp_file, camera_calibration_file,
193
193
  # keys is populated above
194
194
  if 's' in keys:
195
195
  # screenshot
196
- cv2.imwrite(str(output_dir / ('detect_frame_%d.png' % frame_idx)), frame)
196
+ cv2.imwrite(output_dir / f'detect_frame_{frame_idx}.png', frame)
197
197
  gui.update_image(frame, frame_ts/1000., frame_idx)
198
198
  closed, = gui.get_state()
199
199
  if closed:
@@ -20,7 +20,7 @@ import numpy as np
20
20
  import math
21
21
  import configparser
22
22
  from io import StringIO
23
- from scipy.spatial.transform import Rotation
23
+ import eulerangles
24
24
 
25
25
  from ..recording import Recording
26
26
  from ..eyetracker import EyeTracker
@@ -187,7 +187,8 @@ def getCameraFromFile(inputDir: str|pathlib.Path, outputDir: str|pathlib.Path):
187
187
  # 2. sensor offsets seem to be relative to center of sensor
188
188
  camera['principalPoint'] = camera['resolution']/2.+camera['sensorOffsets']
189
189
  # 3. turn euler angles into rotation matrix (180-Rz because poster space has positive X rightward and positive Y downward)
190
- camera['rotation'] = Rotation.from_euler('XYZ', [camera['eulerAngles'][0], camera['eulerAngles'][1], 180-camera['eulerAngles'][2]], degrees=True).as_matrix()
190
+ eulers = [camera['eulerAngles'][0], camera['eulerAngles'][1], 180-camera['eulerAngles'][2]]
191
+ camera['rotation'] = eulerangles.euler2matrix(eulers, 'xyz', intrinsic=True, right_handed_rotation=True)
191
192
 
192
193
  # turn into camera matrix and distortion coefficients as used by OpenCV
193
194
  camera['cameraMatrix'] = np.identity(3)
@@ -203,7 +204,7 @@ def getCameraFromFile(inputDir: str|pathlib.Path, outputDir: str|pathlib.Path):
203
204
 
204
205
 
205
206
  # store to file
206
- fs = cv2.FileStorage(str(outputDir / 'calibration.xml'), cv2.FILE_STORAGE_WRITE)
207
+ fs = cv2.FileStorage(outputDir / 'calibration.xml', cv2.FILE_STORAGE_WRITE)
207
208
  for key,value in camera.items():
208
209
  fs.write(name=key,val=value)
209
210
  fs.release()
@@ -127,7 +127,7 @@ def copySeeTrueRecording(inputDir: pathlib.Path, outputDir: pathlib.Path, recInf
127
127
  # get scene video dimensions by interrogating a frame in sceneVidDir
128
128
  sceneVidDir = inputDir / ('ScenePics_' + recInfo.name)
129
129
  frame = next(sceneVidDir.glob('*.jpeg'))
130
- h,w,_ = cv2.imread(str(frame)).shape
130
+ h,w,_ = cv2.imread(frame).shape
131
131
 
132
132
  # prep gaze data and get video frame timestamps from it
133
133
  print(' Prepping gaze data...')
@@ -182,7 +182,7 @@ def copySeeTrueRecording(inputDir: pathlib.Path, outputDir: pathlib.Path, recInf
182
182
  blackIm = np.zeros((h,w,3), np.uint8) # black image
183
183
  for f in blackFrames:
184
184
  # store black frame to file
185
- cv2.imwrite(str(sceneVidDir / 'frame_{:d}.jpeg'.format(f)),blackIm)
185
+ cv2.imwrite(sceneVidDir / f'frame_{f:d}.jpeg',blackIm)
186
186
  frames.append(f)
187
187
  frames = sorted(frames)
188
188
 
@@ -253,7 +253,7 @@ def getCameraHardcoded(outputDir: str|pathlib.Path):
253
253
  camera['resolution'] = np.array([640, 480])
254
254
 
255
255
  # store to file
256
- fs = cv2.FileStorage(str(outputDir / 'calibration.xml'), cv2.FILE_STORAGE_WRITE)
256
+ fs = cv2.FileStorage(outputDir / 'calibration.xml', cv2.FILE_STORAGE_WRITE)
257
257
  for key,value in camera.items():
258
258
  fs.write(name=key,val=value)
259
259
  fs.release()
@@ -168,7 +168,7 @@ def getCameraHardcoded(outputDir: str|pathlib.Path):
168
168
  camera['rotation'] = cv2.Rodrigues(np.radians(np.array([12.000000000000043, 0.0, 0.0])))[0]
169
169
 
170
170
  # store to file
171
- fs = cv2.FileStorage(str(outputDir / 'calibration.xml'), cv2.FILE_STORAGE_WRITE)
171
+ fs = cv2.FileStorage(outputDir / 'calibration.xml', cv2.FILE_STORAGE_WRITE)
172
172
  for key,value in camera.items():
173
173
  fs.write(name=key,val=value)
174
174
  fs.release()
@@ -354,7 +354,7 @@ def getCameraCalFromCloudExport(inputDir: str|pathlib.Path, outputDir: str|pathl
354
354
  return camInfo['resolution']
355
355
 
356
356
  def storeCameraCalibration(camInfo: dict[str, typing.Any], outputDir: str|pathlib.Path):
357
- fs = cv2.FileStorage(str(outputDir / 'calibration.xml'), cv2.FILE_STORAGE_WRITE)
357
+ fs = cv2.FileStorage(outputDir / 'calibration.xml', cv2.FILE_STORAGE_WRITE)
358
358
  for key,value in camInfo.items():
359
359
  fs.write(name=key,val=value)
360
360
  fs.release()
@@ -376,7 +376,7 @@ def getSceneCameraResolution(inputDir: str|pathlib.Path, recInfo: Recording):
376
376
  return np.array(getCamInfo(inputDir / 'world.intrinsics')['resolution'])
377
377
  else:
378
378
  import cv2
379
- cap = cv2.VideoCapture(str(recInfo.get_scene_video_path()))
379
+ cap = cv2.VideoCapture(recInfo.get_scene_video_path())
380
380
  if cap.isOpened():
381
381
  width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
382
382
  height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
@@ -205,7 +205,7 @@ def getCameraFromTSLV(inputDir: str|pathlib.Path):
205
205
 
206
206
 
207
207
  # store to file
208
- fs = cv2.FileStorage(str(inputDir / 'calibration.xml'), cv2.FILE_STORAGE_WRITE)
208
+ fs = cv2.FileStorage(inputDir / 'calibration.xml', cv2.FILE_STORAGE_WRITE)
209
209
  for key,value in camera.items():
210
210
  fs.write(name=key,val=value)
211
211
  fs.release()
@@ -185,7 +185,7 @@ def getCameraFromJson(inputDir: str|pathlib.Path, outputDir: str|pathlib.Path):
185
185
 
186
186
 
187
187
  # store to file
188
- fs = cv2.FileStorage(str(outputDir / 'calibration.xml'), cv2.FILE_STORAGE_WRITE)
188
+ fs = cv2.FileStorage(outputDir / 'calibration.xml', cv2.FILE_STORAGE_WRITE)
189
189
  for key,value in camera.items():
190
190
  fs.write(name=key,val=value)
191
191
  fs.release()
@@ -26,7 +26,7 @@ class CameraParams:
26
26
  if not fileName.is_file():
27
27
  return CameraParams(None,None)
28
28
 
29
- fs = cv2.FileStorage(str(fileName), cv2.FILE_STORAGE_READ)
29
+ fs = cv2.FileStorage(fileName, cv2.FILE_STORAGE_READ)
30
30
  resolution = fs.getNode("resolution").mat()
31
31
  cameraMatrix = fs.getNode("cameraMatrix").mat()
32
32
  distCoeff = fs.getNode("distCoeff").mat()
@@ -53,7 +53,7 @@ class CV2VideoReader:
53
53
  else:
54
54
  self.ts = timestamps
55
55
 
56
- self.cap = cv2.VideoCapture(str(self.file))
56
+ self.cap = cv2.VideoCapture(self.file)
57
57
  if not self.cap.isOpened():
58
58
  raise RuntimeError('the file "{}" could not be opened'.format(str(self.file)))
59
59
  self.nframes= float(self.cap.get(cv2.CAP_PROP_FRAME_COUNT))
@@ -44,7 +44,7 @@ class Plane:
44
44
  img = None
45
45
  # read from file if image exists
46
46
  if ref_image_store_path is not None and ref_image_store_path.is_file():
47
- img = cv2.imread(str(ref_image_store_path), cv2.IMREAD_COLOR)
47
+ img = cv2.imread(ref_image_store_path, cv2.IMREAD_COLOR)
48
48
  # if image doesn't exist or is the wrong size, create
49
49
  if img is None or img.shape[1]!=ref_image_width:
50
50
  img = self._store_reference_image(ref_image_store_path, ref_image_width)
@@ -209,7 +209,7 @@ class Plane:
209
209
  img[idxs[0]:idxs[1], idxs[2]:idxs[3]] = mark
210
210
 
211
211
  if path:
212
- cv2.imwrite(str(path), img)
212
+ cv2.imwrite(path, img)
213
213
 
214
214
  return img
215
215
 
@@ -1,4 +1,4 @@
1
- __version__ = "1.3.2"
1
+ __version__ = "1.3.3"
2
2
 
3
3
  __title__ = "glassesTools"
4
4
  __description__ = "Tools for processing wearable eye tracker recordings."
@@ -118,7 +118,7 @@ def getFrameTimestampsFromVideo(vid_file):
118
118
  frameTs = (dts+empty_duration)/media_time_scale*1000
119
119
  else:
120
120
  # open file with opencv and get timestamps of each frame
121
- vid = cv2.VideoCapture(str(vid_file))
121
+ vid = cv2.VideoCapture(vid_file)
122
122
  nframes = float(vid.get(cv2.CAP_PROP_FRAME_COUNT))
123
123
  frameTs = []
124
124
  frame_idx = 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: glassesTools
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: Tools for processing wearable eye tracker recordings.
5
5
  Home-page: https://github.com/dcnieho/glassesTools
6
6
  Author: Diederick Niehorster
@@ -38,9 +38,10 @@ License-File: LICENSE
38
38
  Requires-Dist: numpy
39
39
  Requires-Dist: pandas
40
40
  Requires-Dist: msgpack
41
- Requires-Dist: opencv-python-headless==4.9.0.80
41
+ Requires-Dist: imgui_bundle==1.3.0
42
+ Requires-Dist: opencv-python-headless==4.10.0.82
42
43
  Requires-Dist: ffpyplayer
43
- Requires-Dist: scipy==1.11.3
44
+ Requires-Dist: eulerangles
44
45
  Provides-Extra: gui
45
46
  Requires-Dist: imgui_bundle==1.3.0; extra == "gui"
46
47
 
@@ -48,7 +49,7 @@ Requires-Dist: imgui_bundle==1.3.0; extra == "gui"
48
49
  [![PyPI Latest Release](https://img.shields.io/pypi/v/glassesTools.svg)](https://pypi.org/project/glassesTools/)
49
50
  [![image](https://img.shields.io/pypi/pyversions/glassesTools.svg)](https://pypi.org/project/glassesTools/)
50
51
 
51
- # GlassesTools v1.3.2
52
+ # GlassesTools v1.3.3
52
53
  Tools for processing wearable eye tracker recordings.
53
54
 
54
55
  If you use this package or any of the code in this repository, please cite:<br>
@@ -0,0 +1,10 @@
1
+ numpy
2
+ pandas
3
+ msgpack
4
+ imgui_bundle==1.3.0
5
+ opencv-python-headless==4.10.0.82
6
+ ffpyplayer
7
+ eulerangles
8
+
9
+ [GUI]
10
+ imgui_bundle==1.3.0
@@ -1,9 +0,0 @@
1
- numpy
2
- pandas
3
- msgpack
4
- opencv-python-headless==4.9.0.80
5
- ffpyplayer
6
- scipy==1.11.3
7
-
8
- [GUI]
9
- imgui_bundle==1.3.0
File without changes
File without changes
File without changes
File without changes