Jump to content

Ihshan Gumilar

Verified Members
  • Posts

    11
  • Joined

  • Last visited

Reputation

1 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, I am trying to convert gaze direction into angle. However, I cannot find any information regarding the explanation about normalized gaze diretion x, y, and z. What does this normalized gaze direction mean ? is it in radian or what ? is it in the range -1 and 1 ? Is there a way to convert directly into angle ? Thanks for your help in advance Ihshan
  2. Hi @Corvus, Thanks for the code. Yet, I could not find for EyeTool. Where does it refer to ? Cheers,
  3. Hi, Nope. It does not have any MainCamera tag. I tried to put it. But it does not work Thanks
  4. Hi, I have been trying to track what object that a person is looking at by using focus function. But I still don't get it. I don't understand what enableDataCallback mean. Could anyone give me a hand ? how do I know whether it is activated or not ?. It is a bit difficult to follow the example for checking focus. What should I do to fix this code please ? I tried to call this function from update function of UNITY. Yet, it only printed : Debug.Log("Hit Collider Inside CheckFocus"); and Debug.Log("Hit Collider inside foreach"); It seems that it never get into if (eye_callback_registered) I would like to get the information (name of game object that a person is looking at). Thanks a lot for your help =================== I declare the following variables as global private static EyeData eyeData = new EyeData(); private bool eye_callback_registered = false; private readonly GazeIndex[] GazePriority = new GazeIndex[] { GazeIndex.COMBINE, GazeIndex.LEFT, GazeIndex.RIGHT }; public void CheckFocus() { if (SRanipal_Eye_Framework.Instance.EnableEyeDataCallback == true && eye_callback_registered == false) { SRanipal_Eye.WrapperRegisterEyeDataCallback(Marshal.GetFunctionPointerForDelegate((SRanipal_Eye.CallbackBasic)EyeCallback)); eye_callback_registered = true; } else if (SRanipal_Eye_Framework.Instance.EnableEyeDataCallback == false && eye_callback_registered == true) { SRanipal_Eye.WrapperUnRegisterEyeDataCallback(Marshal.GetFunctionPointerForDelegate((SRanipal_Eye.CallbackBasic)EyeCallback)); eye_callback_registered = false; } Debug.Log("Hit Collider Inside CheckFocus"); foreach (GazeIndex index in GazePriority) { Debug.Log("Hit Collider inside foreach"); Ray GazeRay; bool eye_focus; if (eye_callback_registered) { eye_focus = SRanipal_Eye.Focus(index, out GazeRay, out focusInfo); if (eye_focus) { Debug.Log("Hit Collider inside EyeFocus"); Debug.Log(focusInfo); Debug.Log(GazeRay); } else { Debug.Log(eye_focus); } } private static void EyeCallback(ref EyeData eye_data) { eyeData = eye_data; }
  5. Thank you very much. I did not realize that. Cheers
  6. Hi, I am trying to use SRanipal SDK. I would like to detect which object that is being looked at. By just returning the name of objects that are being looked at should be fine with me. Could anyone give me a hand please ? I am trying to look at the sample script but could not really get it. Here is the script that I call from Update function in UNITY using Photon.Pun; using System; using System.IO; using UnityEngine; using ViveSR.anipal.Eye; void Update() { CheckFocus(); } public void CheckFocus() { Ray GazeRay; bool eyeFocus; if (SRanipal_Eye.Focus(GazeIndex.COMBINE, out GazeRay, out focusInfo)) { } else if (SRanipal_Eye.Focus(GazeIndex.RIGHT, out GazeRay, out focusInfo)) { } else if (SRanipal_Eye.Focus(GazeIndex.LEFT, out GazeRay, out focusInfo)) { } else return; var currentFocusObject = focusInfo.collider.gameObject.name; } Kindly see the error that I have got. NullReferenceException: Object reference not set to an instance of an object ViveSR.anipal.Eye.SRanipal_Eye.Focus (ViveSR.anipal.Eye.GazeIndex index, UnityEngine.Ray& ray, ViveSR.anipal.Eye.FocusInfo& focusInfo, System.Single radius, System.Single maxDistance, System.Int32 focusableLayer, ViveSR.anipal.Eye.EyeData eye_data) (at Assets/ViveSR/Scripts/Eye/SRanipal_Eye.cs:357) ViveSR.anipal.Eye.SRanipal_Eye.Focus (ViveSR.anipal.Eye.GazeIndex index, UnityEngine.Ray& ray, ViveSR.anipal.Eye.FocusInfo& focusInfo, ViveSR.anipal.Eye.EyeData eye_data) (at Assets/ViveSR/Scripts/Eye/SRanipal_Eye.cs:462) ViveSR.anipal.Eye.SRanipal_Eye.Focus (ViveSR.anipal.Eye.GazeIndex index, UnityEngine.Ray& ray, ViveSR.anipal.Eye.FocusInfo& focusInfo) (at Assets/ViveSR/Scripts/Eye/SRanipal_Eye.cs:475) EyeInfo.CheckFocus () (at Assets/Scripts/EyeInfo.cs:180) EyeInfo.Update () (at Assets/Scripts/EyeInfo.cs:63) Thanks
  7. Hi @Corvus I did. But it is just too short for me to understand Thanks
  8. Hi Friends, Would you like to let me know how to create heatmap and eye gaze directions (a sequence where a person is looking during a session or accross participants) what people look at based on eye data from vive pro eye ? I am wondering what kind of features that are needed to be extracted to create the heatmap and eye gaze directions ? Thanks IG
  9. Hi, Would anyone help how to get eye gaze direction or information from Vive pro eye ? Thanks IG
  10. Hi, I am following this forum but I still cannot get it. It maybe because I am pretty new to vive pro eye. I just don't know how to get timestamp data ? I follow this ViveSR.anipal.Eye.EyeData_v2.timestamp but it does not work. I tried to use this code SRanipal_Eye_API.GetEyeData(ref eyeData); // Timestamp timeStampList.Add(eyeData.timestamp); Kindly see the result that I saved into CSV. The first column (TimeStamp) is the one that is produced by using the exact above code while the second column (UnixTimeStamp) is produced by using the following code var unixTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds; unixTimeStampList.Add(unixTimestamp); I don't understand why in the first column, it only produced two same timestamp. What does it mean ? Sorry I am so confused. Could anyone give me some help to get a propriate way of recording timestamp ? Thank you IG @Corvus
×
×
  • Create New...