Show backdrop image on EyeLink host with pygaze
I am using OpenSesame with pygaze to connect with an EyeLink eyetracker and so far it's working great!
I just have a question regarding setting backdrop image. EyeLink provides a plugin with methods bitmackBackdrop:
img = PIL_Image.open(image_path) w,h = img.size im_pixels = img.load() # use the list comprehension trick to convert all image pixels into a <pixel> format # supported by the Host PC, pixels = [line1, ...lineH], line = [pix1,...pixW], pix=(R,G,B) pixels = [[im_pixels[i, j] for i in range(w)] for j in range(h)] # call the bitmapBackdrop() command to show backdrop image on the Host # arguments: width, height, pixel, crop_x, crop_y, crop_width, crop_height, x, y on Host, option pos_x = int(var.width/2.0 - w/2.0) pos_y = int(var.height/2 - h/2.0) exp.eyelink.bitmapBackdrop(w, h, pixels, pos, 0, w, h, pos_x, pos_y, pylink.BX_MAXCONTRAST)
exp.eyelink.imageBackdrop(image_path, 0, 0, scn_width, scn_height, pylink.BX_MAXCONTRAST)
to send a backdrop image to EyeLink host. I saw that this eyelink plugin was discontinued in favor of pygaze, but could not find an equivalent in pygaze documentation.
Do such methods exist in pygaze?
Thanks for your help.
When you say "Eyelink provides such a functionality" do you mean the pylink library? Or the old Eyelink plugins? It looks like Pygaze hasn't implemented that option. Still, if that option exits in pylink( which I think does), you will probably be able to access it somehow and project your image to the eye tracker, but there is a chance that this will be a bit complicated, depending on how this method is implemented. I don't have access to the Pylink library at the moment, so I can't look into it unfortunately. If you can provide me with that info, I might be able to give a somewhat more informed guess on whether and how it is possible, though not having access to an eyetracker is still a problem...