Howdy, Stranger!

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

Supported by

[open] Pictures from blurry to clear

edited April 2013 in OpenSesame

Hello. I'm working on my bachelor study Psychology. In the experiment we use OpenSesame. Part of the experiment is a task that tests the implicit memory about a movie. We want to let go a image from the film very slowly from blurred to sharp. The participants have to press a button when they recognize the subjects. The reaction time should then be saved as a measure.

Who can help us to program?


  • edited 9:28AM

    Hi Donna,

    The easy-but-time-consuming way would be to create blurred copies of your image using a graphics program (e.g. gimp).

    However, you can also do the blurring automatically using an inline script, for example using the Picture.blur() method, which is part of Expyriment. The following script shows an image with various levels of blurring and halts the presentation when a key is pressed (see code for comments):

    from expyriment.stimuli import Picture
    from openexp.keyboard import keyboard
    # Presentation duration
    dur = 500
    # Maximum blurring
    maxBlur = 10
    # Minimum blurring (1 = no blur)
    minBlur = 1
    # Get a picture path from the file pool
    picPath = exp.get_file('armadillo.jpg')
    # Create a keyboard object
    my_keyboard = keyboard(exp)
    # Create a list of pictures with different
    # levels of blur
    picList = []
    # Loop from maxBlur to minBlur with decreasing steps
    for blurLevel in range(maxBlur, minBlur-1, -1):
        # New picture
        pic = Picture(picPath)
        # Apply blur
        # Add picture to list
    # Note the start time
    t1 = self.time()
    # Show all pictures!
    for pic in picList:
        # Wait and poll the keyboard. If a key is pressed
        # exit the loop.
        response, t2 = my_keyboard.get_key(timeout=dur)
        if response != None:
    # Set the response variables
    response_time = t2 - t1
    exp.set('response_time', response_time)
    exp.set('response', response)

    This requires the xpyriment back-end, as directly invokes functionality from Expyriment. For more information, see:

    Hope this helps!


  • edited 9:28AM

    Thanks you very much!!

Sign In or Register to comment.