Pixel Size

Hi everyone,

I am trying to work out how big one pixel is on a display (my laptop, for starters, but ideally in a dynamic way). Screen ('PixelSize') should give this, right?

However, the documentation for Screen does not state what unit PixelSize returns in. When I run it on my laptop, I get

ans =

32


However, I have a 14' display that has a resolution of 1600x900, so a quick calculation says every pixel should be 0.0076 inches wide (or 0.0193 cm).

Can anyone help me out?
the documentation for Screen('OpenWindow') says that the pixelSize parameter refers to the bit depth of each pixel, not the pixel dimensions...


--- In psychtoolbox@yahoogroups.com, "jan.freyberg" <jan.freyberg@...> wrote:
>
> Hi everyone,
>
> I am trying to work out how big one pixel is on a display (my laptop, for starters, but ideally in a dynamic way). Screen ('PixelSize') should give this, right?
>
> However, the documentation for Screen does not state what unit PixelSize returns in. When I run it on my laptop, I get
>
> ans =
>
> 32
>
>
> However, I have a 14' display that has a resolution of 1600x900, so a quick calculation says every pixel should be 0.0076 inches wide (or 0.0193 cm).
>
> Can anyone help me out?
>
The way I do it in my lab is to find out the hostname and the set whatever display specific details I need from that:

% find out machine, configure properly
[tmp, machine] = dos('hostname');


switch lower(machine(1:end-1))
case 'take_dell'
stereoMode = 4;
scrnNum = 2;
lutFile = 'c:\alan\hpd256_9_23_11.mat';
case '3dtv'
% etc
end

On Thu, Dec 6, 2012 at 2:24 PM, elladawu <elladawu@...> wrote:


the documentation for Screen('OpenWindow') says that the pixelSize parameter refers to the bit depth of each pixel, not the pixel dimensions...

--- In psychtoolbox@yahoogroups.com, "jan.freyberg" <jan.freyberg@...> wrote:
>
> Hi everyone,
>
> I am trying to work out how big one pixel is on a display (my laptop, for starters, but ideally in a dynamic way). Screen ('PixelSize') should give this, right?
>
> However, the documentation for Screen does not state what unit PixelSize returns in. When I run it on my laptop, I get
>
> ans =
>
> 32
>
>
> However, I have a 14' display that has a resolution of 1600x900, so a quick calculation says every pixel should be 0.0076 inches wide (or 0.0193 cm).
>
> Can anyone help me out?
>


Hi Jan,

I usually do this to get my pixel size in degrees of visual angle:

screenDistCm = 60;
[window,dispRect] = Screen(whichScreen, 'OpenWindow');
[screemwidthMm]=Screen('DisplaySize',window);
screenwidthDeg = 2*atand(screemwidthMm/(20*screenDistCm));
degPerPixel = screenwidthDeg/dispRect(3);

of course pixel size in mm would be simpler:
mmPerPixel = screemwidthMm/dispRect(3);

But see the output of Screen DisplaySize? which tells you that this method may give you misleading results.

Best,
Max


Am 06.12.2012 um 23:28 schrieb Alan Robinson <arcogsci@...>:

 

The way I do it in my lab is to find out the hostname and the set whatever display specific details I need from that:


% find out machine, configure properly
[tmp, machine] = dos('hostname');


switch lower(machine(1:end-1))
    case 'take_dell'
        stereoMode = 4;
        scrnNum = 2;
        lutFile = 'c:\alan\hpd256_9_23_11.mat';
    case '3dtv'
% etc
end

On Thu, Dec 6, 2012 at 2:24 PM, elladawu <elladawu@...> wrote:
 


the documentation for Screen('OpenWindow') says that the pixelSize parameter refers to the bit depth of each pixel, not the pixel dimensions...

--- In psychtoolbox@yahoogroups.com, "jan.freyberg" <jan.freyberg@...> wrote:
>
> Hi everyone,
>
> I am trying to work out how big one pixel is on a display (my laptop, for starters, but ideally in a dynamic way). Screen ('PixelSize') should give this, right?
>
> However, the documentation for Screen does not state what unit PixelSize returns in. When I run it on my laptop, I get
>
> ans =
>
> 32
>
>
> However, I have a 14' display that has a resolution of 1600x900, so a quick calculation says every pixel should be 0.0076 inches wide (or 0.0193 cm).
>
> Can anyone help me out?
>




_____________________________________________________________

Dr. phil. Maximilian Bruchmann, Dipl. Psych.
Institut für Biomagnetismus und Biosignalanalyse
Universitätsklinikum Münster


Adresse:    Malmedyweg 15
                 48149 Münster
                 Telefon:    +49-(0)251-83-52547
E-Mail:      Maximilian.Bruchmann@...
Internet:    http://biomag.uni-muenster.de
_____________________________________________________________

Hi maximilian,

thanks for your help. This makes a lot of sense - digging around a little bit showed that PixelSize is something completely different!

Unfortunately my display does not return accurate numbers. I guess I will just have to calculate it by hand.

all the best,
Jan


On Fri, Dec 7, 2012 at 11:11 AM, Maximilian Bruchmann <Maximilian.Bruchmann@...> wrote:

Hi Jan,


I usually do this to get my pixel size in degrees of visual angle:

screenDistCm = 60;
[window,dispRect] = Screen(whichScreen, 'OpenWindow');
[screemwidthMm]=Screen('DisplaySize',window);
screenwidthDeg = 2*atand(screemwidthMm/(20*screenDistCm));
degPerPixel = screenwidthDeg/dispRect(3);

of course pixel size in mm would be simpler:
mmPerPixel = screemwidthMm/dispRect(3);

But see the output of Screen DisplaySize? which tells you that this method may give you misleading results.

Best,
Max


Am 06.12.2012 um 23:28 schrieb Alan Robinson <arcogsci@...>:

The way I do it in my lab is to find out the hostname and the set whatever display specific details I need from that:


% find out machine, configure properly
[tmp, machine] = dos('hostname');


switch lower(machine(1:end-1))
case 'take_dell'
stereoMode = 4;
scrnNum = 2;
lutFile = 'c:\alan\hpd256_9_23_11.mat';
case '3dtv'
% etc
end

On Thu, Dec 6, 2012 at 2:24 PM, elladawu <elladawu@...> wrote:


the documentation for Screen('OpenWindow') says that the pixelSize parameter refers to the bit depth of each pixel, not the pixel dimensions...

--- In psychtoolbox@yahoogroups.com, "jan.freyberg" <jan.freyberg@...> wrote:
>
> Hi everyone,
>
> I am trying to work out how big one pixel is on a display (my laptop, for starters, but ideally in a dynamic way). Screen ('PixelSize') should give this, right?
>
> However, the documentation for Screen does not state what unit PixelSize returns in. When I run it on my laptop, I get
>
> ans =
>
> 32
>
>
> However, I have a 14' display that has a resolution of 1600x900, so a quick calculation says every pixel should be 0.0076 inches wide (or 0.0193 cm).
>
> Can anyone help me out?
>




_____________________________________________________________

Dr. phil. Maximilian Bruchmann, Dipl. Psych.
Institut für Biomagnetismus und Biosignalanalyse
Universitätsklinikum Münster


Adresse: Malmedyweg 15
48149 Münster
Telefon: +49-(0)251-83-52547
E-Mail: Maximilian.Bruchmann@...
Internet: http://biomag.uni-muenster.de
_____________________________________________________________