picture

 elements

An image from an image file (jpeg, bmp, etc.) or MATLAB image array.

For each trial you define in an experiment script, you can make one or more 

picture

 objects using 

picture

Object and input them to addTrial.

For each trial you define in an experiment script, you can make one or more 

picture

 objects using 

picture

Object and input them to addTrial.

Input properties

Adjustable properties

You can allow the subject to adjust the following input properties of an object of this type during the experiment using an adjuster element. If you need to make other properties adjustable, you can copy the element type using newPbType and edit it.

position
nn_eyes
rotation
opacity

(None)

(None)

fileName
dataExpr

No defaults

Set one of:

fileName is a string that is name of picture file to show. Include path if the file is not in the MATLAB current folder or search path (or not the first file with that name on the search path). File can be any format MATLAB imread accepts.

OR

dataExpr: Use this to get the picture from an image array in the base MATLAB workspace. The image array is an n (px height) × m (px width) × 1/2/3/4 (1 = L, 2 = LA, 3 = RGB, 4 = RGBA) numeric array. By default values should be 0–255, but you can change this using bitDepth below. dataExpr is a string that is the expression pointing to the data. This can be just a variable name, or it can include indexes, field names, etc.

e.g.
<cds>"pictureData"<cds>
<cds>"pictures{5}"<cds>
<cds>"albums.cats(2).pic"<cds>

height

Default: fit picture to window

A number that is height on screen to show at (deg).

OR a string setting overall size of the picture on screen:

<cds>"fit"  <cds> – fit movie to window
<cds>"fitw" <cds> – fit movie width to window
<cds>"fith" <cds> – fit movie height to window
<cds>"fill" <cds> – fill window with movie
<cds>"px"   <cds> – native resolution: 1 pixel in movie = 1 pixel on screen

All the fit and fill options assume the picture is centered in the window.

crop

Default: show whole picture

A 1x4 vector <cd>[x_tl y_tl x_br y_br]<cd> setting part of the picture to show. + = right/down, <cd>[0 0]<cd> = top left of picture. Units are px in the image file (independent of your screen). For right and bottom you can use <cd>inf<cd> to mean that edge of the picture (e.g. <cd>[0 0 inf inf]<cd> = show whole picture).

bitDepth

Default: 8

PsychBench automatically detects this for most pictures loaded from files. If it can't, or if you use dataExpr above to get the picture from an image array, then you can specify bits per pixel color component (e.g. RGB) here. Usually leave at default = 8 (each pixel component between 0–255).

Input properties all visual elements have

position

Input properties all adjuster elements have

adjust

Input properties all objects have

report
info

Record properties

PsychBench uses record properties to record information during experiments. You can't set record properties but you can see them in experiment results using input property report.