I want to program a visual search task in which participants are presented with a visual scene and have to identify a target object by clicking on it, at which point the trial ends. For each visual scene with embedded target (visual scene stimuli) I have an accompanying image that is completely blank except for the target (target stimuli), which is black, and in the same exact position as it is in the visual scene stimuli.
I have already created trials in which python pulls a visual scene from an image bank and presents it to participants, like so..
for i in range(numTrials):
theTrial = trialOrder[i] # grab pre-shuffled trial index
win.flip()
core.wait(1.0) # wait one second
living_images[i].draw()
However, I do not know how to create an area of interest for the target for each visual scene stimuli and to make a trial end if that portion is clicked.
I imagine i should create a CSV with the visual scene stimuli in one column and the target in another column, then tell python to create an area of interest for each visual scene stimuli based on the RGB value of each corresponding target image(since they are blank except for black target in the same position as in the visual scene stimuli).