Python Forum
Functions to make an image zoom in until a response is made
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Functions to make an image zoom in until a response is made
#1
Hello,

I am inexperienced with python and coding in general. I am currently completing my PhD in cognitive neuroscience, and would like to program a task for participants to complete, using one of the software programs that use Python.
I would like my task to have a feature that is not provided in the GUIs of these programs, so I believe I will need to program it myself.
During my task, I would like an image to appear on the screen, and (as soon as it has appeared), start zooming in until the participant makes a response key press, after which time, the image will zoom out until it disappears. If the participant fails to make a response key press, I would like the image to continue zooming until it takes up the entire screen, after which time feedback (correct or incorrect response) is provided.

I have tried searching the forums and the internet in general for clues as to how this could be done, but all I seem to be able to find is how to create programs that allow the user to manually zoom in on images, whereas I would like this zooming in and out to be automatic, and initiated by a single key press.

Is this possible using Python? I would greatly appreciate any directions to tutorials for this or script/functions that could be useful to program this into my task.

(I am considering using Psychopy to program the task, and am using Mac OS High Sierra 10.13.4)

Thank you in advance.
Reply
#2
You should be able to create this effect in wxpython (need to load package with command 'pip install wxpython')
using the floatcanvas package: see https://wxpython.org/Phoenix/docs/html/w...anvas.html.

Please note that the wxpython phoenix GUI package is the one you want. It only runs in python 3, and will automatically be loaded by pip if your default pip is linked to python 3 or newer, can test with command 'pip -V'
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Spyder console zoom in not working? Dionysis 2 459 Feb-06-2024, 03:31 PM
Last Post: paul18fr
  How to zoom on/follow MOUTH in FACE? (OPENCV Face Detection) buzzdarkyear 2 1,803 Jan-12-2022, 12:31 AM
Last Post: buzzdarkyear
  How to make general functions for ecuations Mondata 6 2,793 Mar-11-2021, 09:15 PM
Last Post: Mondata
  make a turtle object an image Agusben 2 12,744 Apr-15-2020, 01:47 PM
Last Post: newbieAuggie2019
  How can I make this Python script add a limit to trades made with API? streetlaw 0 2,020 Oct-12-2018, 11:41 AM
Last Post: streetlaw
  How do you make functions that take a variable that is not defined? magic 6 4,437 Sep-24-2018, 01:30 PM
Last Post: gruntfutuk

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020