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.
- {glassestools-1.3.2/src/glassesTools.egg-info → glassestools-1.3.3}/PKG-INFO +5 -4
- {glassestools-1.3.2 → glassestools-1.3.3}/README.md +1 -1
- {glassestools-1.3.2 → glassestools-1.3.3}/requirements.txt +3 -2
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/aruco.py +1 -1
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/SMI_ETG.py +4 -3
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/SeeTrue_STONE.py +3 -3
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/adhawk_mindlink.py +1 -1
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/pupilLabs.py +2 -2
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/tobii_G2.py +1 -1
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/tobii_G3.py +1 -1
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/ocv.py +2 -2
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/plane.py +2 -2
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/version.py +1 -1
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/video_utils.py +1 -1
- {glassestools-1.3.2 → glassestools-1.3.3/src/glassesTools.egg-info}/PKG-INFO +5 -4
- glassestools-1.3.3/src/glassesTools.egg-info/requires.txt +10 -0
- glassestools-1.3.2/src/glassesTools.egg-info/requires.txt +0 -9
- {glassestools-1.3.2 → glassestools-1.3.3}/LICENSE +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/MANIFEST.in +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/pyproject.toml +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/setup.cfg +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/setup.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/__init__.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/data_files.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/drawing.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/eyetracker.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/gaze_headref.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/gaze_worldref.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/importing/__init__.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/intervals.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/marker.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/__init__.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/core.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/iso.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/mpeglookups.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/non_iso.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/summary.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/mp4analyser/util.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/recording.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/timestamps.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/transforms.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/utils.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools/video_gui.py +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools.egg-info/SOURCES.txt +0 -0
- {glassestools-1.3.2 → glassestools-1.3.3}/src/glassesTools.egg-info/dependency_links.txt +0 -0
- {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.
|
|
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:
|
|
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:
|
|
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
|
[](https://pypi.org/project/glassesTools/)
|
|
49
50
|
[](https://pypi.org/project/glassesTools/)
|
|
50
51
|
|
|
51
|
-
# GlassesTools v1.3.
|
|
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
|
[](https://pypi.org/project/glassesTools/)
|
|
3
3
|
[](https://pypi.org/project/glassesTools/)
|
|
4
4
|
|
|
5
|
-
# GlassesTools v1.3.
|
|
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>
|
|
@@ -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(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
212
|
+
cv2.imwrite(path, img)
|
|
213
213
|
|
|
214
214
|
return img
|
|
215
215
|
|
|
@@ -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(
|
|
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.
|
|
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:
|
|
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:
|
|
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
|
[](https://pypi.org/project/glassesTools/)
|
|
49
50
|
[](https://pypi.org/project/glassesTools/)
|
|
50
51
|
|
|
51
|
-
# GlassesTools v1.3.
|
|
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>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|