Welcome! Log In Create A New Profile

Advanced

Webcam display on subject screen

Posted by Hobart10 
Webcam display on subject screen
December 31, 2021 01:52AM
Hi Jaewon,

Is there a way to display live videos by webcam on the subject screen as well? Can I modify the WebcamMonitor adapter to achieve this?
I'm sorry I don't know enough about ML and Matlab, Any of your reply will be highly appreciated!
Re: Webcam display on subject screen
January 01, 2022 01:46AM
I don't understand why people ask if there is a way. The answer to that kind of question is always yes. You can modify anything as you want. Just keep the modified adapters with your other task files so that you do not lose them.
Re: Webcam display on subject screen
January 09, 2022 11:43PM
After many days, thank you for answering.

I'm sorry I still don't know how to specifically modify it for my purpose, especially with the use of "mdqmex.mexw64" file (or it's not related?) And simply adding " screen = 1" or "mglpresent(1)" doesn't work. I am wondering can I assign the webcam by commands similar to the one used to switch the subject screen device on the video panel?

I know it's a silly question, but I can't seem to solve it except to ask you... Thank you so much for your time!
Re: Webcam display on subject screen
January 10, 2022 04:40PM
Please tell me first why you need such a component and what it should do during the task.
Re: Webcam display on subject screen
January 11, 2022 08:36AM
Generally, we want to build an instant network interaction media (a kind of substitutional reality for subject monkey, in a format like zoom meeting).
Also, if possible, design a trigger condition (e.g., a button) in the task, so the instant live video can be accessed with no time lag when the subject monkey actively pushes the button. (or if the time lag is unavoidable, this step can be controlled by hardware like an opaque “curtain” in front of the monitor.)
We think ML could help us to mark and record the monkeys' behavior along with choices during this kind of interaction. So how to display instant video on the subject screen is the current problem.

Thank you for your kind help!
Re: Webcam display on subject screen
January 11, 2022 09:00AM
Please download the package again. The WebcamMonitor adapter is updated so that you can select the screen to show the live video on with the "Screen" property. You may want to set UpdateInterval to 1 for your purpose.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#WebcamMonitor

FYI, there is a little time lag in the webcam input. You can see it when you wave your hand in front of the cam. But it is an internal delay of the cam so there is not so much we can do about it.
Re: Webcam display on subject screen
January 15, 2022 07:54AM
I think we can overcome this problem! The research team thanks you for your help!

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.