One or more images from image files (jpeg, bmp, etc.) or MATLAB image arrays. In addition to the usual options all visual elements have, picture property imageCode allows applying any MATLAB code to transform the image(s).
To show multiple pictures in a sequence, use a sequence element. To show multiple pictures as frames of a movie, use tool images2movie in <PsychBench folder>/tools to render them into a movie file and show it using a movie element.
In the unusual case that you draw multiple pictures in the same picture element and they overlap and the top ones have transparency, you need to set property backColor = <cds>"opaque"<cds> for accurate display.
"Ends on its own" means ends automatically at that point. If an element can end on its own, you don't need to set end conditions for it in property end (unless you want it to maybe end earlier).
No—runs until any condition you set in property end.
fileName
dataExpr
bitDepth
crop
height
grayscale
imageCode
positions
rotations
All visual elements
position
depth
nn_eyes
rotation
flipHorz
flipVert
colorMask
alpha
intensity
contrastMult
convolution
shader
filterOrder
filterGrayscale
filterResolutionMult
filterGamma
channelResolution
backColor
addDisplay
All visual elements
position
All adjuster elements have
adjust
All response handler elements
translateResponse
scoreResponse
correctResponse
scoreResponseForStaircase
maxNumResponses
recordDefaultResponse
registerTrigger
autoResponse
autoResponseLatency
All elements
start
end
startBuffer
endBuffer
vary
staircase
All objects
info
report
No defaults
e.g.
<cds>"pictureData"<cds>
<cds>"pictures{5}"<cds>
<cds>"albums.cats(2).pic"<cds>
An image matrix has dimensions height px (rows) × width px (columns) × 1/2/3/4 (1 = L, 2 = LA, 3 = RGB, 4 = RGBA). By default values should be 0–255 (i.e. 8 bits/channel), but you can change this using bitDepth below. Default <cd>[]<cd> = get image using fileName instead.
Default: automatic for images loaded from files, 8 bits/channel for images from image matrixes
Or if you use positions below to show multiple images, you can use a vector for different bit depths.
Default: show whole image
Or if you use positions below to show multiple images, you can use an n×4 matrix for different crops.
Default: 1 px in image = 1 px on screen
OR a string setting overall size of the image on screen:
<cds>"fit" <cds> – fit to window
<cds>"fitw" <cds> – fit width to window
<cds>"fith" <cds> – fit height to window
<cds>"fill" <cds> – fill window
<cds>"px" <cds> – native resolution: 1 pixel in image = 1 pixel on screen (scaled down if you use a partial screen window)
All the fit and fill options assume the image is centered in the window.
Or if you use positions below to show multiple images, you can use a vector, string array, or cell array of numbers and strings for different sizes.
Default: show in color (for a color image)
<cd>true<cd>/<cd>false<cd>: show image in grayscale. Or if you use positions below to show multiple images, you can use a 1×n array for different grayscale settings.
Default: no custom transformation
image is an m × n × 1–4 L/LA/RGB/RGBA matrix:
L (luminance) = grayscale
LA (luminance alpha) = grayscale with transparency
RGB (red green blue) = color
RGBA (red green blue alpha) = color with transparency
Tip: If in doubt, you can include a <cd>size(image)<cd> statement with no semicolon in the code, quit the experiment (Ctrl+Esc), and check the output in the MATLAB command window.
Or if you use positions below to show multiple images, you can use a string or cell array for different custom code.
Default: show one image centered at element position
If you show multiple images then for each of the other properties above and below you can set one value for all of them, or different values for different images using a vector or matrix (see property).
Default: no rotation of each image
If you use positions above to show multiple images, you can apply rotation to each one here. This is rotation clockwise (from +x to +y screen axis, with +y down) about respective image center (deg). Or you can use a vector for different rotations. Note you can still use property rotation to rotate the whole element display, i.e. all the images as a set.
You can vary or allow the subject to adjust the following properties of an object of this type when it's running. If you need to make other properties adjustable, you can edit the element type code—see Element Type Programming Manual.
position
nn_eyes
rotation
colorMask
alpha
intensity
contrastMult
drawCodeVars
(None)
(None)
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.
All response handler elements
response
responseScore
responseTime
responseLatency
d_responseTime
numResponses
All elements
startTime
endTime
duration
n_startFrame
n_endFrame
startLatencyBufferable
endLatencyBufferable