Comments (7)
Have a look at Pupil - Data Format for other information you can get from Pupil (e.g. pupil size). Let me highlight, though, that the "diameter" unit for 2D calibration is pixels, while "diameter_3d" will give you the values in mm.
As for getting the eye camera images:
You were popinting to the correct FramePublishing class, but with today's commit to the master branch, we implemented a quick-to-read example on how to access the image streams. Please download the newest version and have a look at FramePublishing.unity respectively FramePublishingDemoManager.cs
Hope this help!
from hmd-eyes.
I'm still grateful for your help.
The image succeeded in obtaining the desired texture in FramePublishing.unity.
However, there is no way to determine the pupil size.
I checked the value of Diameter () or _3D.Circle.Radius () in PupilData.cs, but it only returns 0. I tried CalibrationMode in 3D, but the result seems to be the same.
PupilCapture It looks like the size of the pupil and the size of the iris are found on the screen. I would like to use it in the Unity Plugin.
I need your help. :-)
from hmd-eyes.
The PupilData methods you mentioned are left-overs from the past (which should maybe be removed). PupilData currently only exemplifies how to handle gaze information. If you want to get information such as 'diameter', you have to subscribe to "pupil.". The dictionary you receive will include values for 'diameter' and you can access it by e.g. adapting the following method from PupilTools:
public static float ConfidenceForDictionary(Dictionary<string,object> dictionary)
{
object conf0;
dictionary.TryGetValue ("confidence", out conf0);
return (float)(double)conf0;
}
Just replace "confidence" with "diameter"
from hmd-eyes.
I wrote the following code in PupilTools.cs,
public static float DiameterForDictionary(Dictionary<string, object> dictionary) { object conf0; dictionary.TryGetValue("diameter", out conf0); return (float)(double)conf0; } public static float Diameter(int eyeID) { if (eyeID == PupilData.rightEyeID && pupil0Dictionary != null) return DiameterForDictionary(pupil0Dictionary); else if (eyeID == PupilData.leftEyeID && pupil1Dictionary != null) return DiameterForDictionary(pupil1Dictionary); else return 0; }
The desired result could be obtained.
It appears that only the result measured at the time of calibration appears.
But what I really want is to find the size of the pupil that changes in real time.
For example, if the background changes from black to white, the size of the pupil will decrease.
I want to measure changes in pupil size in real time.
And, if possible, I wonder if the size of the pupil can be measured by dividing it into a horizontal value and a vertical
from hmd-eyes.
We actually have no implementation in the Unity plugin to record value changes. So this would be something you have to implement on your own. But the code you posted is a good start.
What you can also get from the dictionary is a timestamp, which might be helpful for this, as well.
As for the question about values for horizontal and vertical extend:
It would have been too complicated to post a solution, here, so I just commit an additional Unity scene and script for subscribing to "pupil.". Have a look at it:
The dictionaries you receive also contain an object named "ellipse" that offers the information you need. The axes define the length of the major and minor axis of that ellipse (with "diameter" representing the major axis value). As the axes do not correspond to horizontal and vertical extend, you will also need to use "angle", which indicates how much the ellipse is turned away from the horizontal axis. ( This visualization might help )
Hope this helps!
from hmd-eyes.
@loolsasy I have not heard back from you in a while. Did my last comment and the new Unity scene help you with your endeavor?
Can we close this issue?
from hmd-eyes.
Oh, I'm sorry for the delay.
I was delayed to apply the new plug-in.
Thanks to your help, I was able to implement the functionality I wanted.
You can close this post.
from hmd-eyes.
Related Issues (20)
- Hololens support on V1.2 HOT 1
- VR add-on for Vive pro cannot be recognized after opening Pupil capture HOT 4
- Receive pupil data from both eyes simultaneously HOT 3
- Accessing gaze data before calibration finishes HOT 1
- NullReferenceException Error with Connection? HOT 2
- Multiple ellipse data for one frame in pupil.pldata HOT 1
- What is the best calibration practice? HOT 2
- Would you consider refactoring as a custom package? HOT 2
- Support for OpenXR eye_gaze_interaction extension on Linux and Windows? HOT 3
- IL2CPP build connection error HOT 1
- Alpha: FormatterNotRegisteredException HOT 2
- alpha - Use color to indicate when the gaze estimate marker is not being updated. HOT 1
- "Diameter" Values HOT 3
- Camera Sensor Dimensions and Specifications
- Alpha/Beta: In gazeVisualizer.cs, updating marker position to hit.point is a misleading representation of gaze accuracy. HOT 3
- README - Fix links to docs.pupil-labs.com HOT 1
- Start File Sources in Capture via notification HOT 17
- HMD_Calibration(_3D) does not drop low-confidence samples HOT 2
- How to make Gaze Visualizer invisible for the HMD-user? HOT 1
- Live recording HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hmd-eyes.