Browse Source

Added FOV projection functions

Ioannis Agtzidis 5 năm trước cách đây
mục cha
commit
fc127adae6
2 tập tin đã thay đổi với 38 bổ sung0 xóa
  1. 19 0
      ProjectEquirect2Fov.m
  2. 19 0
      ProjectEquirect2FovFile.m

+ 19 - 0
ProjectEquirect2Fov.m

@@ -0,0 +1,19 @@
+% ProjectEquirect2FovFile.m
+%
+% This function projects the gaze vectors from the equirectangular
+% representation into the FOV and stores the new data in the output file. The
+% change in the new file is indicated throught the relation name, which is set
+% to gaze_fov.
+%
+%
+% input:
+%   arffFile    - file to process
+%   outputFile  - file to store converted data
+
+function Projectequirect2Fov(arffFile, outputFile)
+    [data, metadata, attributes, relation, comments] = LoadArff(arffFile);
+
+    [fovData, fovMetadata, fovAttributes, fovRelation] = ProjectEquirect2Fov(data, metadata, attributes, relation);
+
+    SaveArff(outputFile, fovData, fovMetadata, fovAttributes, fovRelation, comments);
+end

+ 19 - 0
ProjectEquirect2FovFile.m

@@ -0,0 +1,19 @@
+% ProjectEquirect2FovFile.m
+%
+% This function projects the gaze vectors from the equirectangular
+% representation into the FOV and stores the new data in the output file. The
+% change in the new file is indicated throught the relation name, which is set
+% to gaze_fov.
+%
+%
+% input:
+%   arffFile    - file to process
+%   outputFile  - file to store converted data
+
+function Projectequirect2Fov(arffFile, outputFile)
+    [data, metadata, attributes, relation, comments] = LoadArff(arffFile);
+
+    [fovData, fovMetadata, fovAttributes, fovRelation] = ProjectEquirect2Fov(data, metadata, attributes, relation);
+
+    SaveArff(outputFile, fovData, fovMetadata, fovAttributes, fovRelation, comments);
+end