Skip to content

How to use a and b about ellipse to get pupil diameter #16

Answered by BZandi
QJieWang asked this question in Q&A
Discussion options

You must be logged in to vote

The code of the applied pupil detection procedures are provided (see here), so you can directly verify how the ellipse parameters are determined from the raw contour data.

For example, the ElSe method (see line 249 in this file) uses the elipsefit method (see here) from the OpenCV library, which returns the centre coordinates, angle and size (height and width) of the ellipse.

In pupillometry, the longer axis (major axis) is always used as the pupil diameter to minimise pupil foreshortening error. Thus, in PupilEXT, we check which size is greater (height or width) and set the major axis as pupil diameter (see here). Note that all ellipse parameters are provided in the recorded CSV log file…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by QJieWang
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants