Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Areas Of Interest (eye tracking)

edited June 2015 in OpenSesame

I am using Open Sesame with Eyelink plug-ins for a face recognition experiment. I cannot figure out how to define different interest ares for each face. My experiment will have 2 blocks: 1 Male and 1 Female. Within each block there will be 4 loops. Each loop should contain contain different faces. Each face within the loop should have the same interest area. The interest areas across the loops will vary.
Thank you very much !


  • edited June 2014


    Are you using the gaze behaviour (i.e. the number of fixations and dwell time per area of interest) online? That is: do you adept your experiment based on where participants are looking? If so, you might want to check out the AOI plug-in (see here).

    If you're just interested in measuring gaze behaviour, without doing anything gaze contingent, I would suggest analysing your data offline. Make sure to save your gaze data sensibly (use lots of log messages to keep track of what image was shown and when!), so that you can analyse it after collection. Usually, AOIs are only defined afterwards and are subject to change (e.g. as a function of your data quality).

    Another tip: make sure to do a test run of your experiment, and to analyse the data of this test run before you start testing on a larger scale.

    Good luck!


  • edited 5:19AM

    Thank you Edwin!
    You're right I am looking at gaze behaviour. Participants will look at different faces with interest areas I will define in advance. Then I will analyze the distributions to each area (eyes, mouth, nose) .

    I am using an inline script tool and typed in :

    exp.eyelink.log("!V IAREA FREEHAND <Brad-Pitt_151.jpg> <32, -64> <-64, 128> <128,128> [nose]")
    I got the x,y coordinates from sketchpad tool.

    But I think what I'm looking for is a way to define a different interest area for each face in the same loop. Do I just keep adding the same line to the inline script (my inline script is located above the sketchpad item) and just changing the 'id' for each photo? Also please let me know if what I typed in makes sense. I followed this format:

    exp.eyelink.log("!V IAREA FREEHAND <x1, y1> <x2, y2> <x3, y3> [label]")
    for id I put the name of the file and for [label] i put region of the face. Is that correct?

  • edited 5:19AM

    I think you might have missed my point. You don't know the quality of your data beforehand, but this does have a potentially large effect on your AOI analysis. Therefore it would be wiser to use an offline analysis. Obviously, a custom analysis script would allow you to do so, but SR Research' Data Viewer offers the same possibility (see the manual, page 36).

    If you really want to pursue an online analysis, please refer to the plug-in I mentioned before. This allows you to create several AOIs and calculate the amount of fixations. If you simply want to log a message whenever an AOI is hit, it would be very easy to adopt the code of that plug-in to do so.

    Another possibility, the one you seem to be keen on using, is using EyeLink's own function for defining an AOI. The procedure for this is explained on the last page of the OpenSesame and EyeLink manual. The syntax for the log message is !V IAREA FREEHAND <x1, y1> <x2, y2 > ... <xn, yn> [label], as illustrated by the example below:

    # AOI 1
    exp.eyelink.log("!V IAREA FREEHAND 1 100,100 100,200 200,150 nose")

    Note that the id should be an integer, the coordinates are absolute coordinates with (0,0) as the top left (not the coordinates that are relative to the screen centre, as they are defined in the sketchpad!), and that the label is optional.

    Good luck!

  • edited 5:19AM

    Thank you very much Edwin!

  • edited 5:19AM

    I can't seem to figure out how to get the absolute coordinates. Also how do I set a difefrent id integer for each photo?
    Thank you!

  • edited 5:19AM

    The ID integers are for the AOIs, not for the different photos. The absolute coordinates can be calculated: simply add half of the screen size to the relative coordinates (that use (0,0) for the centre).


    Coordinate (0,0) is the screen centre, on a screen with a resolution of 1920x1080. To recalculate this to absolute coordinates, simply add half of the screen width to the horizontal coordinate and half of the screen height to the vertical coordinate, like so:

    0 + 1920/2 = 960

    0 + 1080/2 = 540

    Thus the absolute coordinate of the screen centre would be (960,540) in this example.

    In OpenSesame, using a Python inline_script:

    # define your coordinate here
    relcor = (0,0)
    # calculate the absolute coordinate
    newx = relcor[0] + self.get("width") / 2
    newy = relcor[1] + self.get("height") / 2
    # save under a new variable name
    newcor = (newx, newy)
  • edited 5:19AM

    Hi all,

    I'd like to define Regions of Interest as well. Using TheEyetribe eyetracker I already fiddled around with the aoi plugin but couldn't convince it to work.

    Any suggestions for a starting point?

    Thx, Digo

  • edited 5:19AM

    I'm removing that link from your post, as it seems to be completely unrelated (and thus most likely spam). If you can explain why it's not, please do appeal.

    As I missed the comment by @hiwi68, here's an extremely late answer: that plug-in was written for the EyeTracker plug-ins, which is a precedent of the PyGaze plug-ins. I'm afraid they only worked with SMI and EyeLink trackers. Sorry!

    You can implement your own AOI analysis post-experiment. Unless you really need to do it online (which is where the AOI plug-in was for); then you could opt for using the sample method within an inline_script to check where a participant's gaze is.

  • Hi Edwin, can I ask a different question. I am looking to compare two groups of participants. I want to calculate the Euclidean distance by either:

    (1) take the distance of each participant from a fixed point in the display (display centre, corner). Please how do I find the display centre and corner? OR

    (2) take the distance of each participant from their group centre. Again, does the group centre here mean the mean x and y for that group?

    Thanks for all your response.


Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games