Good Morning everyone,
currently i am starting a recording remotly via the network API and i am also setting a pupil timestamp. Is the pupil timestamp a set via "pupil_remote.send_string("T " + str(time.time()))" set in all created data files (gaze_position.csv, fixation.csv, world_timestamps after exporting via pupil player)? Or is it only set in the pupil_postions.csv ?
Cobe
Hi @user-b91cdf. That command resets current Pupil time. All data subsequently produced will share this new time base. May I ask, why are you modifying Pupil Time in your script?
Thanks Neil! I am gathering GPS, illuminance data and another recording via a raspberry pi. For Time Synchronization i am setting the Pupil Timestamp to the system time of the raspberry pi. 🙂
Thanks for clarifying. Depending on how much temporal accuracy you need, you might want to account for network latency associated with script–Pupil Capture communications. Further details in this example script that calculates the offset between a custom "local" clock and the clock used in Pupil Core software in real time: https://github.com/pupil-labs/pupil-helpers/blob/6e2cd2fc28c8aa954bfba068441dfb582846f773/python/simple_realtime_time_sync.py
Thanks ! I'll have a look
Hello, I just submitted a pull request that should allow the very useful pupil-detectors library to be installed in an anaconda environment, using the binaries installed by anaconda for opencv and eigen3. I hope this can minimize installation complexity; it works for me on Mac and Linux machines! Happy to chat here or via github about the PR.
Thank you for your contribution. Please see my review on github.
Hi! I have some questions about the code for gaze mapping in 3d! Is there someone specific I should talk to?
Hello all, I am trying to create a LSL using Pupil labs LSL plugin python file but i am getting an error No module named 'plugin' Can anyone help me out with this error ?
3D Gaze Mapping questions
👍
Hi! I need to extract how open the eye is i.e. I want to measure the distance from bottom eyelid to top eyelid in the center of the eye. How can I best achieve this? Is there already a solution for this? Should I create a new plugin or can I maybe extend the pupil algorithm? Algorithm suggestions?
Hello,
I am currently working on a pupil detection project using open cv and python. I found out about pupil labs while doing research for the project. And I thought of asking my question here in the discord channel.
I am not using any pupil labs software as of now, instead I am trying to do pupil detection on my own using open cv. My current code is able to detect the pupil when the subject is looking in a forward direction. But the code finds it difficult when the pupil is looking in the left/right, up/down direction or when the eye blinks (see images).
Current pipeline used for detection:-
I think I have reached a roadblock with the current implementation and I need to change the structure of the pipeline to detect pupil in left/right and up/down locations. Therefore, if you can suggest some new ideas or points that I am missing, it would be really helpful. Some alternative ideas which I thought of was using adaptive threshold and creating different models of Houghcircles for different usecases. Any kind of feedback is welcome Thanks again
Hi, depending on Hough circles is probably your performance bottle neck. If the pupil is occluded or elliptic (as it is the case when not looking straight into the cameras) the algorithm fails.
Is developing your own algorithm a requirement for your experiment? Otherwise, check out our 2d pupil detection algorithm here https://github.com/pupil-labs/pupil-detectors/ (implementation) and here https://arxiv.org/pdf/1405.0006.pdf (tech report)
Thank you for the reply. Yes, I think the shape of pupil will change, when pupil is not looking towards the camera. And a better solution will be an ellipse fitting instead of circle. Hough circles seemed easier to implement at that time so I went with it. I will have a look at the links provided.
I actually read the paper before starting to work on the project. It also uses a pipeline similar to my simplified version, but with canny edge detection, histogram analysis for pupil and ellipse fitting. It was really interesting and I got a lot of insight about the topic by reading it.
Hi, I am investigating the possibility of tracking 2 pupils in the same video feed (thus in the same eye process). How easy do you think that could be implemented ? From the code it seems that having 2 detector plugins running in the same process, fed with 2 different ROIs should be possible with some refactoring of the code (now detectors are kind of singletons). WDYT? Of course, another option could be to re-detect one of the eyes offline.
Technically, this should be possible. You might need to create a subclass of the 2d detector s.t. you can differentiate the results from both detectors.
See here on how to write a custom detector https://docs.pupil-labs.com/developer/core/plugin-api/#pupil-detection-plugins
The detector is unique by_class
by default. You might need to overwrite the attribute in your subclass https://docs.pupil-labs.com/developer/core/plugin-api/#plugin-class-attributes
Thanks for the pointers! That is really helpful.
Hello, I am trying to read the video from the Pupil Core in real time in Python with the Examples in https://pupil-labs-realtime-api.readthedocs.io/en/latest/examples/simple.html#simple-discovery-example, but I can't find anything, how can I do it?
Hi, you are referring to our new Realtime API for Pupil Invisible. You can find more about the Pupil Core Realtime API here https://docs.pupil-labs.com/developer/core/network-api/ You can use this example to receive video from Pupil Capture https://github.com/pupil-labs/pupil-helpers/blob/master/python/recv_world_video_frames_with_visualization.py
Okay thank you, is there any way to receive the video without Pupil Capture?
You can access the Pupil Core cameras using UVC (the video camera USB protocol). The recommended packages would be https://github.com/pupil-labs/libuvc (low level access library) and its Python wrapper https://github.com/pupil-labs/pyuvc See the Pupil Capture source installation instructions for details about these two libs https://github.com/pupil-labs/pupil/tree/master/docs