Welcome! Log In Create A New Profile

Advanced

Coordinates in pixel and heatmaps

Posted by lancora90 
Coordinates in pixel and heatmaps
April 19, 2024 08:26AM
Hi all,

I am trying to build heatmapts after converting degree coordinates in pixel using Eyecal function.
~
In the example I have attached I compare what happened in the first second and first frame vs what was elaborated when recording the trial.

However when building the heatmaps from the export data it seems there is a shift on the right which is not present when exporting the video trial.
Can someone help me on this matter?

Thank you
Leonardo
Attachments:
open | download - frame0-00-00.000.png (620.8 KB)
open | download - vlcsnap-2024-04-19-13h29m40s073.png (1.24 MB)
open | download - vlcsnap-2024-04-19-13h29m50s773.png (1.29 MB)
open | download - vlcsnap-2024-04-19-13h29m58s276.png (1.29 MB)
Re: Coordinates in pixel and heatmaps
April 19, 2024 10:30AM
I do not know what kind of help you expect, but, there is very little that anyone can do without knowing how you drew it. You need to show the script that you wrote with the original data.
Re: Coordinates in pixel and heatmaps
April 19, 2024 10:51AM
Hi,

Thank for the reply.

I literallly just build a 2d histogram and applied a gaussian filter on XY coordinates ( I attached the code).

I've also plot on the image the pixel coordinates I have obtained from eyecal. The only thing I did it scaled them in 1280x720 from an original 1920x1080 screen (Scaling by 1.5)

I would like to know if when the MLplayer is plotting the tracer is doing anything else then just plot the coordinates after converted them in pixels.
Because even if I plot the XY coordinates after converting they appear different from the trial and I am running out of ideas.

Thank you for your help
Leonardo
Attachments:
open | download - frame0-00-00.000.png (622.4 KB)
open | download - code.txt (1.2 KB)
open | download - Data.txt (41.7 KB)
Re: Coordinates in pixel and heatmaps
April 19, 2024 01:42PM
You did not do your math correctly. The size of your image (1280x720) has not been changed between your experiment and analysis, so there is no need to rescale anything.

What changed was the origin of the pixel coordinates. When you presented the image during the experiment, there were borders around the image. However, you plotted only the image without the borders, when you drew the heat map. You should compensate the difference. Since the upper-left corner of your image was at (320, 180) in the screen, you need to subtract 320 from eyeX and 180 from eyeY to make the eye traces overlapped with the image correctly in the heat map.


See the following manual page for coordinate conversion.
https://monkeylogic.nimh.nih.gov/docs_CoordinateConversion.html
Attachments:
open | download - different_origins.png (403.2 KB)
Re: Coordinates in pixel and heatmaps
April 30, 2024 10:54AM
Thank you very much for your help! Appreciate it

Leo

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.