SlideShare a Scribd company logo
1 of 29
Download to read offline
i
UNIVERSITY OF WATERLOO
Faculty of Engineering
Nanotechnology Engineering
A New Approach to Investigate the Threshold Level of Stereopsis in Adults and
Children
Prepared by
Chuqi (Steven) Wei
2A Nanotechnology Engineering
Confidential level-1
ii
UNIVERSITY OF WATERLOO
Faculty of Engineering
Nanotechnology Engineering
A New Approach to Investigate the Threshold Level of Stereopsis in Adults and
Children
Names of co-op employers:
Dr. Daphne McCulloch
Dr. Ben Thompson
Location of co-op employer:
University of Waterloo
School of Optometry
Prepared by
Chuqi (Steven) Wei
ID: 20518399
User ID: c27wei
Previous Academic term: 2A
Confidential level-1
iii
Letter of Submittal
Unit 218, 50 Clegg Road,
Markham, Ontario
L6G 0C6
May 1, 2015
Shirley Tang, director
Nanotechnology Engineering
University of Waterloo
Waterloo, Ontario
N2L 3G1
Dear Dr. Tang,
This report, entitled “A new approach to investigate the threshold level of stereopsis in adults and
children”, was prepared as my 2A work term report for University of Waterloo, School of Optometry
and Vision Science. This report is in fulfillment of the course WKPRT 200. The purpose of this report
is to demonstrate a new approach to investigate the threshold level of human stereopsis, using self-
coded stimuli. The main difference of this approach is the introduction of noise to the stimuli which
was not the main focus of previous studies. This study focuses on two aspects, a visually evoked
potential (VEP) recording system to monitor participants’ brain waves while the stimuli are on
display and a visual psychophysics experiment to determine the stereopsis threshold level based on
participants’ response. It’s a confidential-1 report.
The University of Waterloo School of Optometry and Vision Science provides the only English
optometric training in Canada. The School delivers an accredited, four year degree program leading
to a professional Doctor of Optometry (OD). An extensive clinic program provides practical
experience for students and health services for the public. Through the past four months, I worked
under the supervision of Dr. Daphne McCulloch and Dr. Ben Thompson and was primarily involved
with stimuli and user interface design as well as pilot study of adult binocular vision.
I would like to thank Dr. McCulloch and Dr. Thompson for providing valuable advice and guidance,
including necessary visual science knowledge and programming techniques. I would also like to
thank Greg Schumacher for helping with some technical issues regarding the BNC cables connecting
the systems. I hereby confirm that I have received no further help other than what is mentioned above
in writing this report. I also confirm this report has not been previously submitted for academic credit
at this or any other academic institution.
Sincerely,
Chuqi (Steven) Wei
ID 20518399
iv
Contributions
The team that I have worked with is very small and are currently recruiting. Because we are at the very
early stage of the study, so for now it has been just me, Dr. McCulloch and Dr. Thompson.
The study was commenced this January and is predicted to last for at least five years. The overall goal
of this study is to obtain better understanding the development of stereopsis, especially with children.
Research into binocular vision and its early development can be advanced by measuring the binocular
integration of patterns with a range of signal to noise levels that differ between the two eyes, hence this
new approach. Studying the behavioral threshold and the development of stereopsis can help find the
causes of and diagnose various stereopsis anomalies such as turned eyes and amblyopia in children.
This study can also contribute to the treatment and recovery of such diseases by providing a new set of
measurements for stereopsis thus the doctors would have a more comprehensive understanding of
patients’ status. At this early stage, our team’s goal was to develop a suitable stimuli to conduct pilot
tests on adults and children, and based on the feedbacks, modify and adjust the stimuli. Hopefully the
stimuli and its interface will serve as a useful tool for not only our current study but also for different
studies in the future.
My tasks were developing a suit of stimuli according to the instruction from my supervisors and
designing a user interface associated with the stimuli. My task also involved testing the trigger and
synchronization between the stimuli display system and the VEP system to support the pilot studies.
Based on the feedbacks from both supervisors and some participants, I made modification and
adaptation to the stimuli and user interface. Different patterns and types of noise were programmed as
well as correlogram display with black and white dots. During the design of the interface, I integrated
all previous programs into two-window interface with options to conduct psychophysics and VEP
experiments. Different parameters are taken into consideration, including both basic parameters such
as the number of dots presented in the stimulus, the size of the dots and etc. and advanced parameters
like the percentage of the noise applied to the stimuli, the amplitude of the wave pattern and percentage
of contrast applied to the black/white correlogram. More than fifty sets of codes have been written and
tested. The programming involve using MATLAB Psychotoolbox (PTB) and data acquisition system
developed by VPixx Technologies.
This report is a summary and a review of what I have done and achieved through this co-op term.
Through working with Dr. McCulloch and Dr. Thompson, my programming skills, critical analysis
skills, research skills and learning skills have all been improved. And through the preparation process
v
of this report, I had an opportunity to review my work which enables me to practice my summarization,
evaluation and presentation skills. The majority of the job is to use user-installed Psychotoolbox (PTB)
package within MATLAB to program the stimuli. The PTB toolbox was unknown to me before this
job, however, it only took me less than two weeks to start program the prototype of our stimuli. The
learning methodology I developed was quick and efficient. By dissecting the tutorial codes, I was able
to extract most useful and relative information and commands, and created patterns and shapes, both
static and dynamic, which are related most closely to our project. In this way, both my learning skills
and my programming skills have been improved as well solidified my understanding of MATLAB. My
critical analysis skills were improved by developing and revising the stimuli I have coded. When
received an instruction from my supervisors, I would think how I can achieve the effect they expect
using the knowledge I have already had. I discovered that when starting a completely new set of code,
doing it on paper first would help me figure out the structure of the entire program. Utilizing the exiting
knowledge, I could isolate the section which can be completed successfully, the section which can be
completed but had room for improvements and the section which needed further research before
proceeding.
Writing test suites is another example of applying critical analysis skills as well as organization skills.
For each interface window, I had two or three test suites written before implementing on the actual
interface file. Test suites are helpful because when there was an error, you could always trace back to
the source code as well as my thought process. Also, different modifications have been made to
different test suites, so if there was a new instruction given regarding to the interface, I could examine
all the test suites to evaluate which modification will be most suitable. During the preparation of this
report, I needed to review all my previous works which gives me a better understanding of the scale of
my job. Also, in order to write the report in the most technically correct way, I needed to comment all
my programs which is crucial in programming. And surprisingly, during the commenting, I was able to
find some room for improvements. It was also a good practice for my summarization skills, to
categorize, evaluate, structure and review everything piece of work that I have done for the past four
months.
The stimuli and the interface I developed are considered as important research tools for Dr. McCulloch
and Dr. Thompson’s future study on the subject of human binocular vision. The interface is capable to
conduct experiments such as to investigate how different types of noise affect stereopsis, to investigate
the human sensitivity toward different patterns (vertical/horizontal/oblique patterns, sinusoidal or
square waves), to investigate the number of cycles of pattern a person can detect under certain amount
and type of noise, and etc. The programs have potentially very wide use in the field of binocular vision.
vi
The new type of stimuli with a focus on the signal-to-noise ratio can provide a fresh approach to
stereopsis study. More comprehensive and new information can be revealed to researchers, and the
relation between stereopsis and visual electrical potentials can be more thoroughly examined.
vii
Executive Summary
The following report is to summarize and review the work I have done for the past four months under
Dr. Daphne McCulloch and Dr. Ben Thompson in University of Waterloo, School of Optometry. The
scope of this report contains the theory the stimuli program is based on, the structure and applied
techniques of the program, the some limitation and deficiencies of the program and its connection with
other systems and at last, some pilot study result.
The major points of this report will contain an introduction of the background and scope of the research
project. The development of the stimuli and interface programs will be examined and elaborated on.
Meanwhile, test suites development and some main challenges during the course of the development
will also be brought up and analysed. Some pilot study data will be presented. Synchronization and
triggering mechanism between the stimuli display system and visual evoked potential (VEP) recording
system will be discussed.
The major conclusions in this report are the followings. Firstly, the stimuli programs are able to be used
as a research tool to provide more comprehensive information about the behavioral threshold of
stereopsis in human. Secondly, the user interface integrates and simplifies the process of setting up
experiments. Thirdly, successfully connecting the stimuli display system with the VEP system enables
researchers to monitor participant’s brain activities while the stimuli are on display; this also opens the
possibility of other instrumental integration based on the stimuli programs to deeper the understanding
of binocular vision. Those conclusions are preliminary since the research project was newly
commenced, further study and data collections are needed to draw more accurate and comprehensive
conclusions.
The major recommendations in the report are mainly about the user interface. The parameters for some
of the experiments are standardized, so it would be more efficient if those parameters can be directly
imported from a database. Also the psychophysics experiments can be long and tedious, so to keep the
participants, especially children interested, some modifications can be made to keep the participants
entertained.
viii
Table of Contents
Contributions ··························································································· iv
Executive Summary ···················································································· vii
List of figures ··························································································· ix
List of tables ···························································································· x
1. Introduction························································································· 1
2. Stimuli development ············································································· 2
2.1 Design Requirements ···································································· 2
2.2 Overview ················································································· 3
2.3 Theory ····················································································· 4
2.4 Stimuli patterns ··········································································· 5
2.5 Noise types ··············································································· 6
2.5.1 Non-disparity noise ······················································· 7
2.5.2 Normal-distributed additive noise ······································· 7
2.5.3 Flat-band noise ···························································· 8
2.6 Correlogram development ······························································ 8
3. Graphical user interfaces and experiments ····················································· 8
3.1 VEP interface and experiment ························································· 8
3.2 Psychophysics interface and experiment ·············································· 10
4. Results from the pilot study ······································································ 11
4.1 VEP experiment ·········································································· 11
4.2 Psychophysics experiment ······························································ 13
5. Conclusions························································································· 15
6. Recommendations ················································································· 16
Glossary·································································································· 17
References ······························································································· 18
Appendix A Relevant MATLAB and Psychotoolbox commands····························· 19
ix
List of figures
Figure 2-1. Sinusoidal pattern offset positions ……………………………………………5
Figure 2-2. The normal-distributed function ……………………………………......................7
Figure 3-1. The VEP experiment user interface …………………………………………...9
Figure 3-2. Psychophysics experiment user interface ……………………………….……11
Figure 4-1. Red/Green VEP sample from the pilot study…………………………………12
Figure 4-2. Stereo VEP from pilot study …………………………………………………………..13
Figure 4-3. Psychophysics staircase graph…………………………………….. …………14
x
List of tables
Table 4-1. Results from a psychophysics experiment on participant X…………………………14
1
1. Introduction
Binocular vision for animals is one of the greatest achievements of natural evolution. Two eyes each
perceives an image and through binocular fusion which happens in the visual cortex of the brain, a
single image with comprehensive information of the environment is formed. This ability is absolutely
essential to a species survival, humans included. Binocular vision has various advantages compared to
monocular vision, such as wider field of view, compensation of blind spots, a spare eye when one is
damaged and the development of stereopsis which is the focus of this report [1]. Different animals have
developed binocular visions with different focuses. Predatory animals usually have their eyes placed in
front of their heads to provide best stereopsis while the prey animals usually have their eyes placed in
the opposite sides of their heads to maximize the field of vision. Thus being able to best utilize binocular
vision is crucial to the survival of a species.
Stereopsis is one of the most important features of binocular vision. It’s the ability to detect depth and
3-dimensional structures base on the information obtained by both eyes [2]. The principle of stereopsis
is to utilize the slight horizontal binocular disparities between the images from both eyes to yield depth
perception. However, stereopsis can be disrupted. When the two eyes are ill-aligned, or one eye is
experiencing some damages, stereopsis will be impaired or sometimes lost completely. Diseases such
as amblyopia and strabismus can significantly affect stereopsis. Both diseases need to be treated as soon
as possible, when the formation of stereopsis is still in process. Thus to develop a more comprehensive
vision test is the key to diagnose the mentioned diseases early onset.
The traditional approach to test one’s stereopsis is to design a set of visual stimuli consisting two
identical images, then superimposing them but with slight horizontal disparities to form a stereogram.
This method focuses on the amplitude of disparities, in another word, the distance between a dot in the
left-eye image and its counterpart in the right-eye image. This test can provide information of depth
perception in a uniformly shaped environment, however, in real life, the environment is not always in
a uniform shape, and there are sometimes ‘noises’ to our visual perception. How this ‘noise’ affects
one’s stereopsis is not commonly studied.
To fill this gap, Dr. McCulloch and Dr. Thompson of University of Waterloo, School of Optometry and
Vision Science decided to embark a new study which focuses on how signal-to-noise ratio is going to
affect stereopsis and gaining better understanding of its formation. By designing a new set of stimuli
emphasizing its noise aspect, the amount of noise and types of noise presented in the stimuli can be
controlled. At this stage of the study, two experiments are being conducted; the first experiment is to
2
attach electrodes to participants’ scalps while presenting them with the stimuli continuously, this way,
the potential difference in participants’ visual cortex can be monitored and studied; the other experiment
is to conduct a psychophysics test, the participants will be presented will stimuli frame by frame, after
each frame, they will be allowed a certain amount of time to make a choice indicating which stimulus
pattern was presented in the frame and based on participants’ responses, threshold can be calculated.
As stated before, this study has only been commenced four months ago, there’s still a lot work need to
be done. So far, with the basic graphical user interface, both experiments can be carried out in a timely
fashion. The interface allows user to set the test parameters and save the test results. Some pilot studies
have been conducted using this current set of interfaces and received positive feedbacks. The next step
would be to further perfect the program and the interfaces to make it more sophisticated and
professional; to explore more areas where the program can be applied is also among the next stage of
this research. The long term goal of this research project is to apply the information acquired to deeper
the understanding of the development of stereopsis, especially among children. The interface and the
program hopefully can become useful tools to diagnose stereopsis diseases such as amblyopia and
strabismus. The project is expected to last for five years, so any conclusions drawn in the report will be
preliminary, and with limited amount of data collected, the accuracy of conclusions and analysis is also
limited and needs further study.
2. Stimuli Development
The design of the stimuli is the core task of this co-op term. The stimuli required in the study has a
focus on its signal-to-noise ratio. Based on the random dots stereogram most popularly known for the
work done by Dr. Béla Julesz, the team decided to adapt it as the basis of the stimuli. The development
tools include engineering software MATLAB, a programming toolbox commonly used in vision
science research called Psychotoolbox and a data acquisition and 3-D display system from Vpixx
Technologies, ViewPixx/3D. Equipped with NAVIDIA 3D shutter glasses, the experiments can be
carried out in one of the two stereo modes, either the basic red/green mode using the common red/green
polarized glasses or the frame-sequential mode using the shutter glasses.
2.1 Design Requirements
There are a number of design requirements. Firstly, corrugated patterns need to be applied to the stimuli
with selectable parameters; secondly, different types of noises can be conveniently added to the display
with selectable parameters; thirdly, for VEP experiments, the stimuli need to be dynamic and
3
continuous; fourthly, for psychophysics experiments, the percentage of noise present can be modified
in real-time based on participants’ responses; lastly, the stimuli can be integrated into a user-friendly
graphical user interface (GUI).
2.2 Overview
The first step of developing the stimuli is to randomize the position of all the dots. During this stage,
Dr. Thompson raised a concern about the overlapping position of the random dots, so an algorithm was
developed to prevent such situation, however, the algorithm is time-consuming, so later in some more
time-sensitive experiments, this section of the code was sometimes disabled (commented). The
positions of the dots are refreshed every frame, Dr. McCulloch proposed that some sets of positions
could be stored and repeated instead of refreshing every frame, this method was tried but dismissed due
to the insignificance of the time difference between the two methods. The randomization of the
positions is the key to a dynamic stimulus which is the displayed stimuli for the VEP experiment.
The second step is to apply different patterns to the stimuli. Details about this step will later be
elaborated in section 2.4 of this report. The general principle is to apply horizontal disparities to the
images of one eye while the other stay at its original positions. The disparities are applied using pre-
determined mathematical functions. So far there are two types of corrugated patterns each categorized
into three sub-types. The main types are sinusoidal wave pattern and square wave pattern. A box shaped
pattern was developed but not incorporated into the interface. In the psychophysics experiment, the
participants will be asked to choose from the three sub-types displayed, the main type of pattern is pre-
selected by the experimenter.
The next step is to apply noise to the stimuli. Details about this step will later be elaborated in section
2.5 of this report. The general principle is to separate the noise-affected dot positions from the
unaffected ones. The main patterns are carried out by the unaffected positions, while different types of
noise are applied to the noise-affected positions. At this point, three types of noises have been
incorporated into the interface; a non-disparity noise where the noise is represented by the dots with
zero disparity; a normal-distributed random floating noise where randomly positioned dots are applied
with a normal distribution function as their disparities; and a flat-band noise where the noise disparities
are artificially selected between a certain band of amplitude are randomly applied to the affected dots.
The last step is to display the stimuli. The programming toolbox Psychotoolbox allows the user to
display the stimuli of both eyes independently. There are two drawing buffers in the ViewPixx/3D
system, the left eye buffer and the right eye buffer. The user can select the buffer he or she wants to
4
work on. In this case, the left eye buffer is selected to draw the original positions and the right eye
buffer is selected to draw the shifted and noise-applied positions. As explained before, a stereogram is
superimposing two identical images with slight horizontal disparities between the two. So when
programming, one buffer draws an image while the other draws another identical image which some
horizontal disparities are applied. To better accommodate and display the stimuli, half the disparities is
applied to each buffer to the opposite direction. When patterns in both buffers have been programmed,
flip the buffers to display the patterns using. The rate of the flip can be changed, normally the multiply
of the screen’s flip interval. If a screen’s flip interval is 120Hz, then the rate of the flip is normally set
with respect to 1/120Hz, roughly 0.0083s.
2.3 Theory
The theoretical basis of the stimuli is the random-dot stereogram technique developed by Dr. Béla
Julesz in 1960s. The intention of developing this new technique was to devise an ideal environment
which patterns can’t be perceived when viewed monocularly but can be perceived when viewed
binocularly. The previous used stimuli were defective in such way that when viewed monocularly, due
to the difference of the coarseness of the surface, a monocular cue was provided thus the pattern could
be detected[3]. The random-dot stereogram ensures the deprivation of the monocular cue so that
patterns can only be revealed when viewed binocularly. An individual image of a random-dot
stereogram contains numerous dots without any recognizable feature, only when a second image with
horizontal disparity is added on top of the first can the featured be perceived. When human eyes
perceive an object, due to the horizontal position difference of the eyes, binocular disparity is constant
present. In an experimental environment, an artificial disparity is created in the stimuli to simulate the
real objects, the depth perceived in this way is called stereoscopic depth [2].
Many studies have shown that the magnitude of binocular disparity can affect depth perception. But
most of stimuli used in those studies have binocular disparities uniformly distributed. The focus of most
those studies are whether the stereopsis is present or not and how the amplitude of horizontal disparities
affect the perception. However, the relationship between the quality of stereopsis and the quality of
disparities are not commonly studied. The notion of horizontal and vertical noise was mentioned in an
article published in 2001. The article mentioned how the addition of noise affects the detection of
corrugated pattern [4]. Based on this study, we improved the stimuli with more dynamic features and
incorporated with VEP recording system. The psychophysical aspect of the study is also improved by
a more sophisticated method of determining the threshold of stereopsis with static stimuli.
5
2.4 Stimuli patterns
The corrugated patterns are divided into sinusoidal and square waves. Each type is then sub-divided
into three orientations, horizontal stripes, vertical stripes or oblique stripes. Beside the corrugated
patterns, some other patterns such as correlograms which will later be elaborated on and a random-dot
box pattern are also developed. The stimuli are developed using MATLAB and Psychotoolbox package.
First, set variables such as number of dots, amplitude of the disparity functions and limits of position
coordinates.
Based on the number of dots presented in the stimuli, a mathematical sinusoidal or square function is
generated. Set a variable ‘a’ to be the index, ‘a’ is a 1× (number of dots) matrix, which ranges from 0
to n*2π, in which ‘n’ represents how many cycles are needed in the stimuli. The amplitude of the
sinusoidal and square wave can be modified by the experimenters. Though not used in this experiment,
a ‘PhaseShift’ variable is added for mathematical accuracy. Use ‘sin’ and ‘square’ command in
MATLAB to generate the functions. These functions determine the disparities of the dots. Figure 2-1
is an illustration of a sinusoidal function consisting all the disparity offsets.
Figure 2-1. Sinusoidal pattern offset positions
Use random number generating command ‘rand’ to generate x/y position coordinates. During the
development of the stimuli, Dr. Thompson raised a concern of the overlapping of dots’ positions, so an
algorithm to re-randomize the dots’ coordinates when two dots are too close to each other was
6
developed. The algorithm significantly reduces the overlapping issue, but it is considerably time-
consuming, so in some time-sensitive experiments, this part of the code is disabled.
The horizontal stripes was the first to be developed. In order to form such pattern, the disparity functions
are applied vertically. Based on the y-coordinate of each dot, a corresponding value in the disparity
function is selected and stored in a ‘shift’ matrix. From top of the screen which corresponds to the first
term (0) in the disparity function to the maximum y-coordinate which corresponds to the last term
(n×2π) in the disparity function, the distance in between is equally divided into width-of-display parts.
For example, if a dot has a y-coordinate of 842, then the 842nd
value on the disparity function would be
the disparity value for this particular point. Loop through all the dots to complete the ‘shift’ matrix.
Because the coordination values are double precision due to random number generating function, so
before applying the disparity, the y-coordinate values must be rounded to the nearest integer values
using ‘round’ command. Later the Gabor envelop, normal distribution function are applied in the same
manner.
Similarly, the vertical stripes is formed by applying the disparity functions horizontally. Based on the
x-coordinate of each dot, corresponding disparity values are selected and stored.
The oblique pattern is slightly different from the two patterns above. For oblique pattern, it’s the
distance between a dot and the top-left corner that determines the selected value on the disparity
function. As a result, the oblique pattern is not really oblique rather than a quarter of a circle with the
top-left corner of the display rectangle as the origin.
One thing needed to be noted is that the patterns are only applied to those dots which are not affected
by the noise. The noised dots and unaffected dots are separated in the beginning to process
independently. In this study, the first (percent coherence) × number-of-dots will be designated as
unaffected dots, the rest will be designated as the noised dots. Because the positions of the dots are
randomized in the first place, so the orderly designation will not affect the randomness of the entire
stimuli. For example, if there are 2000 dots to start with, if the percentage of noise applied in this
particular stimuli display is 50%, then only the first 1000 dots (the first 1000 x/y coordinate pairs) will
be applied with pattern, the other 1000 will be applied with selected type of noise.
2.5 Noise types
So far there are five types of noise in total have been developed. They are non-disparity noise, normal-
distributed additive disparity noise, flat-band noise, Gabor-distributed additive noise and vertical
7
disparity noise (uniform/non-uniform). The first three of these five types have been incorporated into
the GUI.
2.5.1 Non-disparity noise
The non-disparity noise means that the noised dots don’t have any disparities in the drawing buffers, in
another word, the positions in the left eye completely overlap the positions in the right eye. So when
viewed binocularly, due to the lack of disparity, these dots become noise to the unaffected dots. To
program non-disparity, firstly, separate the noised dots and unaffected dots, then loop through all the
dots, if the dots are within the unaffected range, based on the method described in section 2.4, store
disparity values in ‘shift’ matrix, and if the dots are within the noised range, assign ‘0’ to ‘shift’ matrix..
2.5.2 Normal-distributed additive noise
The normal-distributed additive noise means applying normal distribution function to dots in order to
create noise. Because those dots are randomly positioned, thus constituting noise to the pattern. To
program this noise, a mathematical normal distribution function is created. The magnifying amplitudes
are applied to the shifts, this enables the shifts to resemble normal distribution feature. Figure 2-2 shows
the normal function used in the script, the magnifying magnitude ranging from 0.4 to 2.4 in this
particular function. Multiplying this magnitude with the shifts creating a noise effect.
Figure 2-2. The normal-distributed function. This is used to modify disparity in order to create noise.
8
2.5.3 Flat-band noise
The last type of noise that has been incorporated into the GUI is the flat-band noise. The flat band noise
selects noise values from a certain designated range. In this case, the selection is made from negative
amplitude to positive amplitude (the amplitude of the disparity function). Applying those values which
are randomly selected, to the x-coordinates of noised dots constitutes a noise to the pattern.
2.6 Correlogram Development
This is a part of the VEP experiment. The correlogram is different from the patterns mentioned above,
it doesn’t have clear patterns. The stimulus consists only random dots, but the display method
distinguishes itself from other stimuli. The correlogram consists two parts, correlation display and anti-
correlation display. For correlation display, a certain amount of dots are selected to be black, others
white. The positions of black and white dots in both buffers overlap. For anti-correlation display, the
positions of black dots in one buffer overlap with the positions of white dots in the other buffer creating
binocular rivalry. Alternating between the two displays creating a dynamic stimulus and connecting
with the VEP system, the participants’ brain activity can be monitored and studied. The purpose of
correlogram is to study the relationship of binocular fusion and binocular rivalry.
3. Graphical user interface (GUI) and experiments
The Graphical user interface (GUI) is created to integrate all aspects including parameter setting, results
display and plot display, of both VEP and psychophysics experiments. The design of the GUI is
completed via MATLAB building graphical user interface design toolbox. When the GUI is started, a
main window pops up and asks the users to choose which experiment they would like to run. After the
choice is made, the main window disappears and the selected experiment window pops up. Both
experiments’ interfaces have the option of ‘Back’ which leads back to the main window, ‘Run’ which
runs the experiment after all the parameters are set, and ‘next trial’ which clears some parameters and
updates the title and data file name. After each run is finished, the data and parameters can be stored in
a designated folder.
3.1 VEP interface and experiment
Visually evoked potential refers to the electrical potential recorded from the part of the scalp which is
directly on top of the visual cortex. This potential is caused by brief exposure to visual stimuli and by
studying the correspondence between the VEP and visual stimuli can help the researchers better
9
understand functionality of optic nerves [5]. In this particular study, Dr. McCulloch and Dr. Thompson
focus on the relationship between the VEP and stereopsis. Depth perception will reflect on the VEP as
a peak or a trough, and by averaging all the VEP samples collected during the experiment period,
normally from 25s to 50s, a clear view of depth perception and its corresponding potential is obtained.
The VEP user interface has the following features. It enables the user to set experimenting parameters
conveniently. Those parameters include the percentage of noise, the type of noise, the type of
stereomode, the pattern being displayed, the number of cycles, the alternating frequency and etc. The
correlogram option is in the type of pattern pop-up menu. The interface is also responsible for sending
triggers to Espion VEP recording system for brain wave recording. Once the parameters are set, and
the’ run’ button is hit, the stimuli will be displayed in ViewPixx/3D screen adjacent to the computer,
depending on which stereomode is selected, a red/green mode or frame-sequential mode, a red/green
filtering glasses or a shutter glasses respectively will be worn by the participants. Electrodes will be
attached to participant’s forehead and visual cortex at the back of the head to measure the evoked
potential due to stimuli presentation. Figure 3-1 shows the VEP user interface. There are total 14
different parameters so far, possibly more parameters will be added in the future.
Figure 3-1. VEP experiment user interface
10
The presentation of stimuli will follow such fashion. When ‘Run’ button is hit, the display monitor will
display a grey screen, when the recording system is ready, the user hit ‘enter’ to initiate stimulus and a
trigger is sent from the monitor to the recording system. For stereogram, in a single second, a set number
of frames with depth are displayed, followed by equal number of frames without depth. For correlogram,
a set number of correlation frames are displayed followed by equal number of anti-correlation frames.
The recording system only records when a trigger is received and record for1s, so every second, after
a cycle of frames (depth/no-depth or correlation/anti-correlation) is displayed, a new trigger is set to
the system to start next cycle of recording. During the pilot study, it was discovered that noise from
recording channels were amplified so a clear VEP curve was hard to obtain. This problem was discussed
and it was suggested that if triggers can be delayed for 1/120 Hz, noise can be reduced due to destructive
interference. The new trigger mechanism was tested and result in a much better quality VEP image.
3.2 Psychophysics interface and experiment
The psychophysics experiment is a mean to study visual threshold. By asking the participants if they
can tell which pattern is being displayed and increase or decrease the coherence level of the stimuli
based on their responses, a series of coherence level is recorded and forms a staircase graph. This is a
combination of method of adjustment and staircase method [6].
The psychophysics interface enables the user to set parameters and display results. The axis on the right
is used to display the coherence levels as staircase graph. Similar to the VEP experiments, the
parameters are very much alike and both stereo modes are available. After each frame of stimulus is
displayed, the participants will be asked to make a choice on which pattern was on the frame, a
horizontal pattern (choose by pressing ‘H’), a vertical pattern (choose by pressing ‘V’) or an oblique
pattern (choose by pressing ‘O’). Based on their responses, the coherence level of next frames will be
adjusted. If a participant makes two consecutive correct choices, the coherence level will be decreased
by a set percentage; at any time if a wrong choice is made, the coherence level will increase. The
termination of the experiment is reached either by user hitting ‘esc’ or reaching the set maximum
number of reversals. A reversal means when the trend of increase or decrease is reversed. A reversal is
constituted when one of the two scenario happens. When two correct choices followed by a wrong
choice (correct, correct, wrong), or a wrong choice is followed by two consecutive correct choices
(wrong, correct, correct). The threshold is calculated by averaging the coherence levels at the last four
reversal points. Also there’s a maximum response time for a single frame of stimulus, if a participant
fails to make a choice within the maximum response time, a wrong is automatically recorded. Normally,
a maximum reversal of six will take twenty to thirty frames to complete, so it could be sometimes
11
tedious, especially in the late stage when the patterns are so vague that the participant relies on pure
guess. So to keep the participant engaged, an easy stimulus with 100% coherence will be displayed
every set number of frames, the result of these easy frames will not be recorded in the calculating matrix.
Figure 3-2 shows the interface for the psychophysics experiment, the axis on the right will display the
staircase graph of coherence levels and parameter settings are on the left. The last box on the left will
display an averaged threshold value.
Figure 3-2. Psychophysics experiment user interface
4. Results from the pilot study
The majority of stimuli design was completed between the end of March and early April. System
configuration started after the BNC connector arrived in mid-April and pilot study started near the end
of the month. So given the limited amount of data, only preliminary analysis and conclusions are
available. The purposes of this pilot study are, firstly, to test the equipment, see if all systems are
synchronized; secondly, to examine the stimuli under experimental environment and find room for
modification and improvements.
4.1 The VEP experiment
The VEP experiment is comprised of three parts, the computer that initiate the stimuli, a screen to
display the stimuli and send triggers and the Espion data acquisition system to record the VEP. TTL
12
triggers are sent via a digital-to-BNC cable. Currently, the TTL triggers are sent based on a pre-set
schedule, which is not very flexible. If different experiment duration time is set, or the number of depth
frame in 1s is changed, the schedule needs to be reset. The recording system records the evoked
potential after receiving the trigger, each cycle of recording lasts for 1s and in the end, the system
averages all cycles of recording to generate a clear VEP graph.
Dr. Thompson volunteered to be the first pilot study participant. A few trials were conducted, but a
clear VEP was hard to obtain. Possible explanations were firstly, the noise coming from the loose
channel may have interacted with connected channels acting like a noise amplifier; secondly, the noise
from each cycle was being amplified by constructive interference. So after a modification of trigger
delay, the quality of the VEP graph was improved significantly.
The VEPs collected have shown that Dr. Thompson’s brain responded to the stimuli. In both red/green
mode and frame-sequential mode, the VEPs shown the change in potential when frames of depth were
displayed. Figure 4-1 is the result from the pilot study under red/green stereo mode. Figure 4-2 is the
result from the pilot study under frame-sequential stereo mode. Comparatively speaking, the red/green
VEP better resembles the expected results with distinct peaks and troughs matching the timeline. Both
tests were run with 100% coherence which means there were no noise applied, given the purpose of
this pilot study, the amount of noise present is not essential. When the trigger has been sent and received
successfully and clear VEPs are produced due to stimuli, the VEP pilot study can be considered
successful. However, there are certain aspects requiring more investigation and adjustment, they will
be elaborated on the concluding summary section.
Figure 4-1. Red/Green VEP sample from the pilot study. Each lane corresponds to a channel, channel
2 was malfunctioning at the time of the experiment, but from channel 1 and channel 3, clear VEP graphs
are obtained. Take channel 1 for an example, the number of peaks and troughs matches stimuli pattern
13
displayed. There are ten peaks in a single second, which is the same as the number of stereo frames in
a second.
Figure 4-2. Stereo VEP from pilot study. This is a VEP graph obtained from pilot study. The two
functional channels are channel 1 and 3, same as the figure above. In channel 1, evoked potentials
(small peaks) corresponding to frame change is clearly observed, however, evoked potentials
corresponding to depth change is not clearly visible.
4.2 Psychophysics experiment
The psychophysics experiment was conducted earlier than the VEP experiment. As explained in section
3.2, the psychophysics experiment determines the threshold of stereopsis via participants’ choices of
pattern. The program delivered expected results, staircase graphs of stereopsis threshold were produced.
By averaging the coherence levels, threshold values were obtained. Figure 4-3 is the staircase graph
from one psychophysics experiment. It shows in 27 trials, the participant reached six reversals and the
tendency matches the expected shape. The graph proves the interface is capable of conducting basic
psychophysics experiment which exceeds the goal of this term. Table 4-1 is the data collected from
another set of pilot study conducted using this interface. Participant X followed the instruction and
made choice of pattern displayed under different amplitude. The theory is that there exists an ideal
value which the threshold is maximum, however, based on this set of data, the experiment is
inconclusive. More systematic experiments need to be conducted and it’s possible that there are flaws
in the interface itself, further inspection is required. During the experiment, participant X complained
14
about the length and the tediousness of the experiment, hence it is an important aspect to improve,
especially considering children will be involved in future study. Normally, a six-reversal experiment
could take more than thirty trials to complete which is approximately six minutes. Due to the nature of
the experiment, this process could indeed be dull and sometimes tedious. Currently, the method to keep
participants interested is to present an easy trial with 100% coherence level every five trials, by doing
this, the participants can be motivated to keep going.
Figure 4-3. Psychophysics staircase graph. This staircase graph shows the tendency of the coherences
as the experiment proceeded. As mentioned before, two consecutive correct will result a decrease in
coherence level and a wrong will result an increase.
Table 4-1. Results from a psychophysics experiment on participant X
Amplitude 1 3 5 12 27 40 50
Threshold 19% 14% 15% 17% 15% 28% 18%
Amplitude: measured in pixels. Threshold: measured in percent coherence.
15
5. Conclusions
The goal of this work term was to design stimuli and user interface that can be used as experimental
tools for future research, and at this point, it can be concluded that the goal is achieved.
Using noised stimuli to determine the threshold of human stereopsis is relatively new .The stimuli
consist two types, sinusoidal wave and square wave; each type contains three orientation, horizontal
stripes, vertical stripes and oblique stripes. After applying disparities, stereopsis is achieved. The noise
is then added to disturb the coherence of the stimuli and investigate participants’ tolerance of selected
types of noise. Three types of noise, non-disparity noise, normal-distributed additive noise and flat-
band noise are incorporated into the GUI.
The stimuli GUI also functions well. Pilot studies were conducted with both the VEP and psychophysics
interfaces with satisfying results. Conclusions for both experiments are provided independently below.
For the VEP experiment, two sets of protocols, stereo stimuli and an on/off random-dots screen, with
two stereo modes were tested. Four clear VEP graphs were generated and compared with the VEP graph
from standard protocol. In those VEP graphs, clear indications of both frame change and depth change
were shown as peaks and troughs in first participant, Dr. Thompson’s brain waves, and these indications
were consistent with features present in the standard VEP graph. Comparatively speaking, the evoked
potential magnitude in frame-sequential stereo mode is relatively lower than that of red/green stereo
mode. The triggering mechanism embedded is responsible for the communication between the
programming computer and VEP recording system and as the latest addition to the script, certain
properties are still in need of future inspection. The conclusions are the following, firstly, the stimuli
and its interface are successfully developed and consequently pilot studies have been successfully
conducted; next, the triggering mechanism still needs further improvements for the experiment going
more smoothly; finally, preliminary results indicates that at 100% coherence, it’s very likely for
participant to observe corrugated pattern with depth.
For the psychophysics experiment, the pilot study was conducted earlier than the VEP experiment and
with more frequency. At least twenty tests were conducted on me and other participants. The
complicated part of this experiment is to adjust the coherence level according to participant’s responses.
Psychotoolbox is able to record and recognize the keys pressed, this property is used to check
participant’s choices and increase or decrease the coherence level in the next cycle. Successful
experiments were conducted after implementing the algorithm to the interface. Staircase graphs were
generated and threshold values were calculated after averaging the coherence levels on the reversal
16
spots. Since no systematic experiments were conducted, it would not be accurate to draw any
quantitative conclusions, but qualitative speaking, the interface is capable to conduct basic
psychophysics experiment and with selectable variables such as the amplitude of the disparity, the types
of noise implemented and etc. more systematic and comparative experiments can also be conducted
using this interface. Preliminary conclusions are the following, firstly, the stimuli and interface have
been developed successfully and based on the experience from the pilot study, the protocol is ready to
be deployed for clinical use; next, the length of the experiment may prove to be a problem for
participants especially with children; finally, systematic experiments are needed.
6. Recommendations
Recommendations for improving the performance of the VEP stimuli and its interface are as follows.
The major recommendation is with regard to the triggering mechanism. It is recommended that the
trigger being sent only at the starting frame of each second. In this way, the trigger is independent from
the duration of the experiment and the frame switching frequency. A secondary recommendation is also
with regard to triggering mechanism. It’s being tested that a slight onset delay, about 0.008s, can be
helpful to generate more clear VEP graphs due to destructive interference. However, the exact nature
of this delay still remains unclear. It is recommended that more thorough investigation about this delay
should be conducted so that confusions can be avoided in future experiments.
Recommendations for improving the performance of the psychophysics and its interface are as follows.
The major recommendation is with regard to length of the experiment. However, it is recommended
that more interesting features such as smiley faces, encouraging texts or sounds should be applied.
Using such measures, it’s easy to keep children participants interested in the test. A secondary
recommendation is with regard to the database. We haven’t constructed our database due to insufficient
time, however, it is recommended to have a database with multiple sets of parameters ready to be
imported, and it’s especially important in future comparative and systematic studies. In order to add an
option of importing from existing database, minor modification of the interface is required.
As stated before, all conclusions and recommendations are based on the work done in this four-month
time, thus they are most likely inconclusive. Since the project is still in an early stage, further
investigation is needed to obtain more data and draw more comprehensive conclusions.
17
Glossary
VEP: Visually Evoked Potential. Generated by brief exposure to visual stimuli.
GUI: Graphical User Interface. An interface where the user sets parameters and runs the experiment.
TTL: Transistor-Transistor Logic. A type of trigger commonly used in system communication.
BNC connector: Bayonet Neill-Concelman connector. A type of connector with one pin, commonly
used in system communication.
18
Reference
[1] R.Bhola. (2006, Jan.) Binocular Vision. [Online].
http://webeye.ophth.uiowa.edu/eyeforum/tutorials/BINOCULAR-VISION.pdf
[2] I. P. Howard and B. J. Rogers. Binocular vision and stereopsis. New York: Oxford University
Press, 1995.
[3] B. Julesz, “Binocular depth perception without familiarity cues,” AAAS, Science, New Series,
vol. 145, no. 3630, pp. 356-362, Jul. 1964.
[4] S. Palmisano, R. S. Allison, and I. P. Howard, “Effects of horizontal and vertical additive
disparity noise on stereoscopic corrugation detection,” Vision Res., vol. 41, no. 24, pp. 3133–3143,
2001.
[5] D. J. Creel. (2014, Sept.) Visually Evoked Potential. [Online].
http://webvision.med.utah.edu/book/electrophysiology/visually-evoked-potentials/
[6] M. Kalloniatis and C. Luu. (2011, Aug.) Psychophysics of Vision. [Online].
http://webvision.med.utah.edu/book/part-viii-gabac-receptors/psychophysics-of-vision/
19
Appendix A: Relevant MATLAB and Psychotoolbox commands
Screen (‘OpenWindow’,[]…): opens a new window on the external monitor for stimuli display.
Screen (‘DrawDots’, []…): draw dots based on information given by the user.
Screen (‘SelectStereoDrawBuffer’, []….): choose which stereo buffer to program.
Screen (‘Flip’, []…): flip the buffers to display stimuli.
Screen (‘screens’): get screen ID.
Datapixx (‘SetVideoStereoVesaWaveform’,[]): activate the shutter glasses.
Screen (‘GetFlipInterval’,[]…):acquire the flip interval of the screen.
KbCheck: used to check if a key is pressed, and detect which key is pressed.
WaitSecs(): Pause the program for a set amount of time.
sca: close all open windows;
if…end: a statement to determine whether a criteria is met or not, if met, continue the execution of the
script.
for…end: a loop statement. Loop for a set number of times.
while…end : a loop statement. Loop for indefinite number of times the criteria for continuation is not
met.
break: break a ‘for’ or ‘while’ loop.
sin: generate sin functions.
square: generate square wave function with -1 and 1 as the low and high points respectively.
rand: generate random numbers between 0 and 1.

More Related Content

Viewers also liked

BlxCorpPresentationJul2016 small
BlxCorpPresentationJul2016 smallBlxCorpPresentationJul2016 small
BlxCorpPresentationJul2016 smallTrevor Pickett
 
Traning & Development
Traning & DevelopmentTraning & Development
Traning & DevelopmentMd Ismail
 
Workterm Report 300 Chuqi Wei 20518399_edited
Workterm Report 300 Chuqi Wei 20518399_editedWorkterm Report 300 Chuqi Wei 20518399_edited
Workterm Report 300 Chuqi Wei 20518399_editedSteven Wei
 

Viewers also liked (7)

BlxCorpPresentationJul2016 small
BlxCorpPresentationJul2016 smallBlxCorpPresentationJul2016 small
BlxCorpPresentationJul2016 small
 
Dr. tarique anwer Resume
Dr. tarique anwer ResumeDr. tarique anwer Resume
Dr. tarique anwer Resume
 
Traning & Development
Traning & DevelopmentTraning & Development
Traning & Development
 
ColumbiaBrochure
ColumbiaBrochureColumbiaBrochure
ColumbiaBrochure
 
ColumbiaBooklet
ColumbiaBookletColumbiaBooklet
ColumbiaBooklet
 
Presentacion Albacrome
Presentacion AlbacromePresentacion Albacrome
Presentacion Albacrome
 
Workterm Report 300 Chuqi Wei 20518399_edited
Workterm Report 300 Chuqi Wei 20518399_editedWorkterm Report 300 Chuqi Wei 20518399_edited
Workterm Report 300 Chuqi Wei 20518399_edited
 

Similar to workterm report winter 2015

zbeardUXportfolio816
zbeardUXportfolio816zbeardUXportfolio816
zbeardUXportfolio816Zach Beard
 
Journal of Otolaryngology-Head and Neck Surgery Face and Content Validity of ...
Journal of Otolaryngology-Head and Neck Surgery Face and Content Validity of ...Journal of Otolaryngology-Head and Neck Surgery Face and Content Validity of ...
Journal of Otolaryngology-Head and Neck Surgery Face and Content Validity of ...Jordan Lewis
 
An investigation into the physical build and psychological aspects of an inte...
An investigation into the physical build and psychological aspects of an inte...An investigation into the physical build and psychological aspects of an inte...
An investigation into the physical build and psychological aspects of an inte...Jessica Navarro
 
ASIS&T Diane Sonnenwald Information Science as a Career
ASIS&T Diane Sonnenwald Information Science as a Career ASIS&T Diane Sonnenwald Information Science as a Career
ASIS&T Diane Sonnenwald Information Science as a Career ASIS&T
 
Gesture detection in real time that serve as feedback to improve the user exp...
Gesture detection in real time that serve as feedback to improve the user exp...Gesture detection in real time that serve as feedback to improve the user exp...
Gesture detection in real time that serve as feedback to improve the user exp...Carlos Iván Quiroz Ramírez
 
Journal Club - Best Practices for Scientific Computing
Journal Club - Best Practices for Scientific ComputingJournal Club - Best Practices for Scientific Computing
Journal Club - Best Practices for Scientific ComputingBram Zandbelt
 
navin kumar hs - may 2015
navin kumar hs - may 2015navin kumar hs - may 2015
navin kumar hs - may 2015Navin Kumar
 
Assignment InstructionsYouTube httpswww.youtube.comPCTECH.docx
Assignment InstructionsYouTube httpswww.youtube.comPCTECH.docxAssignment InstructionsYouTube httpswww.youtube.comPCTECH.docx
Assignment InstructionsYouTube httpswww.youtube.comPCTECH.docxhoward4little59962
 
A Study On Hybrid System
A Study On Hybrid SystemA Study On Hybrid System
A Study On Hybrid SystemCarmen Sanborn
 
Research proposal
Research proposalResearch proposal
Research proposalBalaji P
 
MasterthesisToPrint
MasterthesisToPrintMasterthesisToPrint
MasterthesisToPrintDeepa Iyer
 
PH-HISTO-PPT.FINAL DEF.pptx
PH-HISTO-PPT.FINAL DEF.pptxPH-HISTO-PPT.FINAL DEF.pptx
PH-HISTO-PPT.FINAL DEF.pptxJcModelo
 
Omics Logic - Bioinformatics 2.0
Omics Logic - Bioinformatics 2.0Omics Logic - Bioinformatics 2.0
Omics Logic - Bioinformatics 2.0Elia Brodsky
 
Use of case pairs can potentially improve the efficiency and effectiveness of...
Use of case pairs can potentially improve the efficiency and effectiveness of...Use of case pairs can potentially improve the efficiency and effectiveness of...
Use of case pairs can potentially improve the efficiency and effectiveness of...Poh-Sun Goh
 
Portfolio - HCI.pdf
Portfolio - HCI.pdfPortfolio - HCI.pdf
Portfolio - HCI.pdfAllyScott7
 

Similar to workterm report winter 2015 (20)

zbeardUXportfolio816
zbeardUXportfolio816zbeardUXportfolio816
zbeardUXportfolio816
 
Journal of Otolaryngology-Head and Neck Surgery Face and Content Validity of ...
Journal of Otolaryngology-Head and Neck Surgery Face and Content Validity of ...Journal of Otolaryngology-Head and Neck Surgery Face and Content Validity of ...
Journal of Otolaryngology-Head and Neck Surgery Face and Content Validity of ...
 
An investigation into the physical build and psychological aspects of an inte...
An investigation into the physical build and psychological aspects of an inte...An investigation into the physical build and psychological aspects of an inte...
An investigation into the physical build and psychological aspects of an inte...
 
ASIS&T Diane Sonnenwald Information Science as a Career
ASIS&T Diane Sonnenwald Information Science as a Career ASIS&T Diane Sonnenwald Information Science as a Career
ASIS&T Diane Sonnenwald Information Science as a Career
 
thesis_v63
thesis_v63thesis_v63
thesis_v63
 
PS-Science
PS-SciencePS-Science
PS-Science
 
PS-Science
PS-SciencePS-Science
PS-Science
 
Nov1 webinar intro_slides v
Nov1 webinar intro_slides vNov1 webinar intro_slides v
Nov1 webinar intro_slides v
 
Gesture detection in real time that serve as feedback to improve the user exp...
Gesture detection in real time that serve as feedback to improve the user exp...Gesture detection in real time that serve as feedback to improve the user exp...
Gesture detection in real time that serve as feedback to improve the user exp...
 
Journal Club - Best Practices for Scientific Computing
Journal Club - Best Practices for Scientific ComputingJournal Club - Best Practices for Scientific Computing
Journal Club - Best Practices for Scientific Computing
 
navin kumar hs - may 2015
navin kumar hs - may 2015navin kumar hs - may 2015
navin kumar hs - may 2015
 
Senior Design Final Report
Senior Design Final ReportSenior Design Final Report
Senior Design Final Report
 
Assignment InstructionsYouTube httpswww.youtube.comPCTECH.docx
Assignment InstructionsYouTube httpswww.youtube.comPCTECH.docxAssignment InstructionsYouTube httpswww.youtube.comPCTECH.docx
Assignment InstructionsYouTube httpswww.youtube.comPCTECH.docx
 
A Study On Hybrid System
A Study On Hybrid SystemA Study On Hybrid System
A Study On Hybrid System
 
Research proposal
Research proposalResearch proposal
Research proposal
 
MasterthesisToPrint
MasterthesisToPrintMasterthesisToPrint
MasterthesisToPrint
 
PH-HISTO-PPT.FINAL DEF.pptx
PH-HISTO-PPT.FINAL DEF.pptxPH-HISTO-PPT.FINAL DEF.pptx
PH-HISTO-PPT.FINAL DEF.pptx
 
Omics Logic - Bioinformatics 2.0
Omics Logic - Bioinformatics 2.0Omics Logic - Bioinformatics 2.0
Omics Logic - Bioinformatics 2.0
 
Use of case pairs can potentially improve the efficiency and effectiveness of...
Use of case pairs can potentially improve the efficiency and effectiveness of...Use of case pairs can potentially improve the efficiency and effectiveness of...
Use of case pairs can potentially improve the efficiency and effectiveness of...
 
Portfolio - HCI.pdf
Portfolio - HCI.pdfPortfolio - HCI.pdf
Portfolio - HCI.pdf
 

workterm report winter 2015

  • 1. i UNIVERSITY OF WATERLOO Faculty of Engineering Nanotechnology Engineering A New Approach to Investigate the Threshold Level of Stereopsis in Adults and Children Prepared by Chuqi (Steven) Wei 2A Nanotechnology Engineering Confidential level-1
  • 2. ii UNIVERSITY OF WATERLOO Faculty of Engineering Nanotechnology Engineering A New Approach to Investigate the Threshold Level of Stereopsis in Adults and Children Names of co-op employers: Dr. Daphne McCulloch Dr. Ben Thompson Location of co-op employer: University of Waterloo School of Optometry Prepared by Chuqi (Steven) Wei ID: 20518399 User ID: c27wei Previous Academic term: 2A Confidential level-1
  • 3. iii Letter of Submittal Unit 218, 50 Clegg Road, Markham, Ontario L6G 0C6 May 1, 2015 Shirley Tang, director Nanotechnology Engineering University of Waterloo Waterloo, Ontario N2L 3G1 Dear Dr. Tang, This report, entitled “A new approach to investigate the threshold level of stereopsis in adults and children”, was prepared as my 2A work term report for University of Waterloo, School of Optometry and Vision Science. This report is in fulfillment of the course WKPRT 200. The purpose of this report is to demonstrate a new approach to investigate the threshold level of human stereopsis, using self- coded stimuli. The main difference of this approach is the introduction of noise to the stimuli which was not the main focus of previous studies. This study focuses on two aspects, a visually evoked potential (VEP) recording system to monitor participants’ brain waves while the stimuli are on display and a visual psychophysics experiment to determine the stereopsis threshold level based on participants’ response. It’s a confidential-1 report. The University of Waterloo School of Optometry and Vision Science provides the only English optometric training in Canada. The School delivers an accredited, four year degree program leading to a professional Doctor of Optometry (OD). An extensive clinic program provides practical experience for students and health services for the public. Through the past four months, I worked under the supervision of Dr. Daphne McCulloch and Dr. Ben Thompson and was primarily involved with stimuli and user interface design as well as pilot study of adult binocular vision. I would like to thank Dr. McCulloch and Dr. Thompson for providing valuable advice and guidance, including necessary visual science knowledge and programming techniques. I would also like to thank Greg Schumacher for helping with some technical issues regarding the BNC cables connecting the systems. I hereby confirm that I have received no further help other than what is mentioned above in writing this report. I also confirm this report has not been previously submitted for academic credit at this or any other academic institution. Sincerely, Chuqi (Steven) Wei ID 20518399
  • 4. iv Contributions The team that I have worked with is very small and are currently recruiting. Because we are at the very early stage of the study, so for now it has been just me, Dr. McCulloch and Dr. Thompson. The study was commenced this January and is predicted to last for at least five years. The overall goal of this study is to obtain better understanding the development of stereopsis, especially with children. Research into binocular vision and its early development can be advanced by measuring the binocular integration of patterns with a range of signal to noise levels that differ between the two eyes, hence this new approach. Studying the behavioral threshold and the development of stereopsis can help find the causes of and diagnose various stereopsis anomalies such as turned eyes and amblyopia in children. This study can also contribute to the treatment and recovery of such diseases by providing a new set of measurements for stereopsis thus the doctors would have a more comprehensive understanding of patients’ status. At this early stage, our team’s goal was to develop a suitable stimuli to conduct pilot tests on adults and children, and based on the feedbacks, modify and adjust the stimuli. Hopefully the stimuli and its interface will serve as a useful tool for not only our current study but also for different studies in the future. My tasks were developing a suit of stimuli according to the instruction from my supervisors and designing a user interface associated with the stimuli. My task also involved testing the trigger and synchronization between the stimuli display system and the VEP system to support the pilot studies. Based on the feedbacks from both supervisors and some participants, I made modification and adaptation to the stimuli and user interface. Different patterns and types of noise were programmed as well as correlogram display with black and white dots. During the design of the interface, I integrated all previous programs into two-window interface with options to conduct psychophysics and VEP experiments. Different parameters are taken into consideration, including both basic parameters such as the number of dots presented in the stimulus, the size of the dots and etc. and advanced parameters like the percentage of the noise applied to the stimuli, the amplitude of the wave pattern and percentage of contrast applied to the black/white correlogram. More than fifty sets of codes have been written and tested. The programming involve using MATLAB Psychotoolbox (PTB) and data acquisition system developed by VPixx Technologies. This report is a summary and a review of what I have done and achieved through this co-op term. Through working with Dr. McCulloch and Dr. Thompson, my programming skills, critical analysis skills, research skills and learning skills have all been improved. And through the preparation process
  • 5. v of this report, I had an opportunity to review my work which enables me to practice my summarization, evaluation and presentation skills. The majority of the job is to use user-installed Psychotoolbox (PTB) package within MATLAB to program the stimuli. The PTB toolbox was unknown to me before this job, however, it only took me less than two weeks to start program the prototype of our stimuli. The learning methodology I developed was quick and efficient. By dissecting the tutorial codes, I was able to extract most useful and relative information and commands, and created patterns and shapes, both static and dynamic, which are related most closely to our project. In this way, both my learning skills and my programming skills have been improved as well solidified my understanding of MATLAB. My critical analysis skills were improved by developing and revising the stimuli I have coded. When received an instruction from my supervisors, I would think how I can achieve the effect they expect using the knowledge I have already had. I discovered that when starting a completely new set of code, doing it on paper first would help me figure out the structure of the entire program. Utilizing the exiting knowledge, I could isolate the section which can be completed successfully, the section which can be completed but had room for improvements and the section which needed further research before proceeding. Writing test suites is another example of applying critical analysis skills as well as organization skills. For each interface window, I had two or three test suites written before implementing on the actual interface file. Test suites are helpful because when there was an error, you could always trace back to the source code as well as my thought process. Also, different modifications have been made to different test suites, so if there was a new instruction given regarding to the interface, I could examine all the test suites to evaluate which modification will be most suitable. During the preparation of this report, I needed to review all my previous works which gives me a better understanding of the scale of my job. Also, in order to write the report in the most technically correct way, I needed to comment all my programs which is crucial in programming. And surprisingly, during the commenting, I was able to find some room for improvements. It was also a good practice for my summarization skills, to categorize, evaluate, structure and review everything piece of work that I have done for the past four months. The stimuli and the interface I developed are considered as important research tools for Dr. McCulloch and Dr. Thompson’s future study on the subject of human binocular vision. The interface is capable to conduct experiments such as to investigate how different types of noise affect stereopsis, to investigate the human sensitivity toward different patterns (vertical/horizontal/oblique patterns, sinusoidal or square waves), to investigate the number of cycles of pattern a person can detect under certain amount and type of noise, and etc. The programs have potentially very wide use in the field of binocular vision.
  • 6. vi The new type of stimuli with a focus on the signal-to-noise ratio can provide a fresh approach to stereopsis study. More comprehensive and new information can be revealed to researchers, and the relation between stereopsis and visual electrical potentials can be more thoroughly examined.
  • 7. vii Executive Summary The following report is to summarize and review the work I have done for the past four months under Dr. Daphne McCulloch and Dr. Ben Thompson in University of Waterloo, School of Optometry. The scope of this report contains the theory the stimuli program is based on, the structure and applied techniques of the program, the some limitation and deficiencies of the program and its connection with other systems and at last, some pilot study result. The major points of this report will contain an introduction of the background and scope of the research project. The development of the stimuli and interface programs will be examined and elaborated on. Meanwhile, test suites development and some main challenges during the course of the development will also be brought up and analysed. Some pilot study data will be presented. Synchronization and triggering mechanism between the stimuli display system and visual evoked potential (VEP) recording system will be discussed. The major conclusions in this report are the followings. Firstly, the stimuli programs are able to be used as a research tool to provide more comprehensive information about the behavioral threshold of stereopsis in human. Secondly, the user interface integrates and simplifies the process of setting up experiments. Thirdly, successfully connecting the stimuli display system with the VEP system enables researchers to monitor participant’s brain activities while the stimuli are on display; this also opens the possibility of other instrumental integration based on the stimuli programs to deeper the understanding of binocular vision. Those conclusions are preliminary since the research project was newly commenced, further study and data collections are needed to draw more accurate and comprehensive conclusions. The major recommendations in the report are mainly about the user interface. The parameters for some of the experiments are standardized, so it would be more efficient if those parameters can be directly imported from a database. Also the psychophysics experiments can be long and tedious, so to keep the participants, especially children interested, some modifications can be made to keep the participants entertained.
  • 8. viii Table of Contents Contributions ··························································································· iv Executive Summary ···················································································· vii List of figures ··························································································· ix List of tables ···························································································· x 1. Introduction························································································· 1 2. Stimuli development ············································································· 2 2.1 Design Requirements ···································································· 2 2.2 Overview ················································································· 3 2.3 Theory ····················································································· 4 2.4 Stimuli patterns ··········································································· 5 2.5 Noise types ··············································································· 6 2.5.1 Non-disparity noise ······················································· 7 2.5.2 Normal-distributed additive noise ······································· 7 2.5.3 Flat-band noise ···························································· 8 2.6 Correlogram development ······························································ 8 3. Graphical user interfaces and experiments ····················································· 8 3.1 VEP interface and experiment ························································· 8 3.2 Psychophysics interface and experiment ·············································· 10 4. Results from the pilot study ······································································ 11 4.1 VEP experiment ·········································································· 11 4.2 Psychophysics experiment ······························································ 13 5. Conclusions························································································· 15 6. Recommendations ················································································· 16 Glossary·································································································· 17 References ······························································································· 18 Appendix A Relevant MATLAB and Psychotoolbox commands····························· 19
  • 9. ix List of figures Figure 2-1. Sinusoidal pattern offset positions ……………………………………………5 Figure 2-2. The normal-distributed function ……………………………………......................7 Figure 3-1. The VEP experiment user interface …………………………………………...9 Figure 3-2. Psychophysics experiment user interface ……………………………….……11 Figure 4-1. Red/Green VEP sample from the pilot study…………………………………12 Figure 4-2. Stereo VEP from pilot study …………………………………………………………..13 Figure 4-3. Psychophysics staircase graph…………………………………….. …………14
  • 10. x List of tables Table 4-1. Results from a psychophysics experiment on participant X…………………………14
  • 11. 1 1. Introduction Binocular vision for animals is one of the greatest achievements of natural evolution. Two eyes each perceives an image and through binocular fusion which happens in the visual cortex of the brain, a single image with comprehensive information of the environment is formed. This ability is absolutely essential to a species survival, humans included. Binocular vision has various advantages compared to monocular vision, such as wider field of view, compensation of blind spots, a spare eye when one is damaged and the development of stereopsis which is the focus of this report [1]. Different animals have developed binocular visions with different focuses. Predatory animals usually have their eyes placed in front of their heads to provide best stereopsis while the prey animals usually have their eyes placed in the opposite sides of their heads to maximize the field of vision. Thus being able to best utilize binocular vision is crucial to the survival of a species. Stereopsis is one of the most important features of binocular vision. It’s the ability to detect depth and 3-dimensional structures base on the information obtained by both eyes [2]. The principle of stereopsis is to utilize the slight horizontal binocular disparities between the images from both eyes to yield depth perception. However, stereopsis can be disrupted. When the two eyes are ill-aligned, or one eye is experiencing some damages, stereopsis will be impaired or sometimes lost completely. Diseases such as amblyopia and strabismus can significantly affect stereopsis. Both diseases need to be treated as soon as possible, when the formation of stereopsis is still in process. Thus to develop a more comprehensive vision test is the key to diagnose the mentioned diseases early onset. The traditional approach to test one’s stereopsis is to design a set of visual stimuli consisting two identical images, then superimposing them but with slight horizontal disparities to form a stereogram. This method focuses on the amplitude of disparities, in another word, the distance between a dot in the left-eye image and its counterpart in the right-eye image. This test can provide information of depth perception in a uniformly shaped environment, however, in real life, the environment is not always in a uniform shape, and there are sometimes ‘noises’ to our visual perception. How this ‘noise’ affects one’s stereopsis is not commonly studied. To fill this gap, Dr. McCulloch and Dr. Thompson of University of Waterloo, School of Optometry and Vision Science decided to embark a new study which focuses on how signal-to-noise ratio is going to affect stereopsis and gaining better understanding of its formation. By designing a new set of stimuli emphasizing its noise aspect, the amount of noise and types of noise presented in the stimuli can be controlled. At this stage of the study, two experiments are being conducted; the first experiment is to
  • 12. 2 attach electrodes to participants’ scalps while presenting them with the stimuli continuously, this way, the potential difference in participants’ visual cortex can be monitored and studied; the other experiment is to conduct a psychophysics test, the participants will be presented will stimuli frame by frame, after each frame, they will be allowed a certain amount of time to make a choice indicating which stimulus pattern was presented in the frame and based on participants’ responses, threshold can be calculated. As stated before, this study has only been commenced four months ago, there’s still a lot work need to be done. So far, with the basic graphical user interface, both experiments can be carried out in a timely fashion. The interface allows user to set the test parameters and save the test results. Some pilot studies have been conducted using this current set of interfaces and received positive feedbacks. The next step would be to further perfect the program and the interfaces to make it more sophisticated and professional; to explore more areas where the program can be applied is also among the next stage of this research. The long term goal of this research project is to apply the information acquired to deeper the understanding of the development of stereopsis, especially among children. The interface and the program hopefully can become useful tools to diagnose stereopsis diseases such as amblyopia and strabismus. The project is expected to last for five years, so any conclusions drawn in the report will be preliminary, and with limited amount of data collected, the accuracy of conclusions and analysis is also limited and needs further study. 2. Stimuli Development The design of the stimuli is the core task of this co-op term. The stimuli required in the study has a focus on its signal-to-noise ratio. Based on the random dots stereogram most popularly known for the work done by Dr. Béla Julesz, the team decided to adapt it as the basis of the stimuli. The development tools include engineering software MATLAB, a programming toolbox commonly used in vision science research called Psychotoolbox and a data acquisition and 3-D display system from Vpixx Technologies, ViewPixx/3D. Equipped with NAVIDIA 3D shutter glasses, the experiments can be carried out in one of the two stereo modes, either the basic red/green mode using the common red/green polarized glasses or the frame-sequential mode using the shutter glasses. 2.1 Design Requirements There are a number of design requirements. Firstly, corrugated patterns need to be applied to the stimuli with selectable parameters; secondly, different types of noises can be conveniently added to the display with selectable parameters; thirdly, for VEP experiments, the stimuli need to be dynamic and
  • 13. 3 continuous; fourthly, for psychophysics experiments, the percentage of noise present can be modified in real-time based on participants’ responses; lastly, the stimuli can be integrated into a user-friendly graphical user interface (GUI). 2.2 Overview The first step of developing the stimuli is to randomize the position of all the dots. During this stage, Dr. Thompson raised a concern about the overlapping position of the random dots, so an algorithm was developed to prevent such situation, however, the algorithm is time-consuming, so later in some more time-sensitive experiments, this section of the code was sometimes disabled (commented). The positions of the dots are refreshed every frame, Dr. McCulloch proposed that some sets of positions could be stored and repeated instead of refreshing every frame, this method was tried but dismissed due to the insignificance of the time difference between the two methods. The randomization of the positions is the key to a dynamic stimulus which is the displayed stimuli for the VEP experiment. The second step is to apply different patterns to the stimuli. Details about this step will later be elaborated in section 2.4 of this report. The general principle is to apply horizontal disparities to the images of one eye while the other stay at its original positions. The disparities are applied using pre- determined mathematical functions. So far there are two types of corrugated patterns each categorized into three sub-types. The main types are sinusoidal wave pattern and square wave pattern. A box shaped pattern was developed but not incorporated into the interface. In the psychophysics experiment, the participants will be asked to choose from the three sub-types displayed, the main type of pattern is pre- selected by the experimenter. The next step is to apply noise to the stimuli. Details about this step will later be elaborated in section 2.5 of this report. The general principle is to separate the noise-affected dot positions from the unaffected ones. The main patterns are carried out by the unaffected positions, while different types of noise are applied to the noise-affected positions. At this point, three types of noises have been incorporated into the interface; a non-disparity noise where the noise is represented by the dots with zero disparity; a normal-distributed random floating noise where randomly positioned dots are applied with a normal distribution function as their disparities; and a flat-band noise where the noise disparities are artificially selected between a certain band of amplitude are randomly applied to the affected dots. The last step is to display the stimuli. The programming toolbox Psychotoolbox allows the user to display the stimuli of both eyes independently. There are two drawing buffers in the ViewPixx/3D system, the left eye buffer and the right eye buffer. The user can select the buffer he or she wants to
  • 14. 4 work on. In this case, the left eye buffer is selected to draw the original positions and the right eye buffer is selected to draw the shifted and noise-applied positions. As explained before, a stereogram is superimposing two identical images with slight horizontal disparities between the two. So when programming, one buffer draws an image while the other draws another identical image which some horizontal disparities are applied. To better accommodate and display the stimuli, half the disparities is applied to each buffer to the opposite direction. When patterns in both buffers have been programmed, flip the buffers to display the patterns using. The rate of the flip can be changed, normally the multiply of the screen’s flip interval. If a screen’s flip interval is 120Hz, then the rate of the flip is normally set with respect to 1/120Hz, roughly 0.0083s. 2.3 Theory The theoretical basis of the stimuli is the random-dot stereogram technique developed by Dr. Béla Julesz in 1960s. The intention of developing this new technique was to devise an ideal environment which patterns can’t be perceived when viewed monocularly but can be perceived when viewed binocularly. The previous used stimuli were defective in such way that when viewed monocularly, due to the difference of the coarseness of the surface, a monocular cue was provided thus the pattern could be detected[3]. The random-dot stereogram ensures the deprivation of the monocular cue so that patterns can only be revealed when viewed binocularly. An individual image of a random-dot stereogram contains numerous dots without any recognizable feature, only when a second image with horizontal disparity is added on top of the first can the featured be perceived. When human eyes perceive an object, due to the horizontal position difference of the eyes, binocular disparity is constant present. In an experimental environment, an artificial disparity is created in the stimuli to simulate the real objects, the depth perceived in this way is called stereoscopic depth [2]. Many studies have shown that the magnitude of binocular disparity can affect depth perception. But most of stimuli used in those studies have binocular disparities uniformly distributed. The focus of most those studies are whether the stereopsis is present or not and how the amplitude of horizontal disparities affect the perception. However, the relationship between the quality of stereopsis and the quality of disparities are not commonly studied. The notion of horizontal and vertical noise was mentioned in an article published in 2001. The article mentioned how the addition of noise affects the detection of corrugated pattern [4]. Based on this study, we improved the stimuli with more dynamic features and incorporated with VEP recording system. The psychophysical aspect of the study is also improved by a more sophisticated method of determining the threshold of stereopsis with static stimuli.
  • 15. 5 2.4 Stimuli patterns The corrugated patterns are divided into sinusoidal and square waves. Each type is then sub-divided into three orientations, horizontal stripes, vertical stripes or oblique stripes. Beside the corrugated patterns, some other patterns such as correlograms which will later be elaborated on and a random-dot box pattern are also developed. The stimuli are developed using MATLAB and Psychotoolbox package. First, set variables such as number of dots, amplitude of the disparity functions and limits of position coordinates. Based on the number of dots presented in the stimuli, a mathematical sinusoidal or square function is generated. Set a variable ‘a’ to be the index, ‘a’ is a 1× (number of dots) matrix, which ranges from 0 to n*2π, in which ‘n’ represents how many cycles are needed in the stimuli. The amplitude of the sinusoidal and square wave can be modified by the experimenters. Though not used in this experiment, a ‘PhaseShift’ variable is added for mathematical accuracy. Use ‘sin’ and ‘square’ command in MATLAB to generate the functions. These functions determine the disparities of the dots. Figure 2-1 is an illustration of a sinusoidal function consisting all the disparity offsets. Figure 2-1. Sinusoidal pattern offset positions Use random number generating command ‘rand’ to generate x/y position coordinates. During the development of the stimuli, Dr. Thompson raised a concern of the overlapping of dots’ positions, so an algorithm to re-randomize the dots’ coordinates when two dots are too close to each other was
  • 16. 6 developed. The algorithm significantly reduces the overlapping issue, but it is considerably time- consuming, so in some time-sensitive experiments, this part of the code is disabled. The horizontal stripes was the first to be developed. In order to form such pattern, the disparity functions are applied vertically. Based on the y-coordinate of each dot, a corresponding value in the disparity function is selected and stored in a ‘shift’ matrix. From top of the screen which corresponds to the first term (0) in the disparity function to the maximum y-coordinate which corresponds to the last term (n×2π) in the disparity function, the distance in between is equally divided into width-of-display parts. For example, if a dot has a y-coordinate of 842, then the 842nd value on the disparity function would be the disparity value for this particular point. Loop through all the dots to complete the ‘shift’ matrix. Because the coordination values are double precision due to random number generating function, so before applying the disparity, the y-coordinate values must be rounded to the nearest integer values using ‘round’ command. Later the Gabor envelop, normal distribution function are applied in the same manner. Similarly, the vertical stripes is formed by applying the disparity functions horizontally. Based on the x-coordinate of each dot, corresponding disparity values are selected and stored. The oblique pattern is slightly different from the two patterns above. For oblique pattern, it’s the distance between a dot and the top-left corner that determines the selected value on the disparity function. As a result, the oblique pattern is not really oblique rather than a quarter of a circle with the top-left corner of the display rectangle as the origin. One thing needed to be noted is that the patterns are only applied to those dots which are not affected by the noise. The noised dots and unaffected dots are separated in the beginning to process independently. In this study, the first (percent coherence) × number-of-dots will be designated as unaffected dots, the rest will be designated as the noised dots. Because the positions of the dots are randomized in the first place, so the orderly designation will not affect the randomness of the entire stimuli. For example, if there are 2000 dots to start with, if the percentage of noise applied in this particular stimuli display is 50%, then only the first 1000 dots (the first 1000 x/y coordinate pairs) will be applied with pattern, the other 1000 will be applied with selected type of noise. 2.5 Noise types So far there are five types of noise in total have been developed. They are non-disparity noise, normal- distributed additive disparity noise, flat-band noise, Gabor-distributed additive noise and vertical
  • 17. 7 disparity noise (uniform/non-uniform). The first three of these five types have been incorporated into the GUI. 2.5.1 Non-disparity noise The non-disparity noise means that the noised dots don’t have any disparities in the drawing buffers, in another word, the positions in the left eye completely overlap the positions in the right eye. So when viewed binocularly, due to the lack of disparity, these dots become noise to the unaffected dots. To program non-disparity, firstly, separate the noised dots and unaffected dots, then loop through all the dots, if the dots are within the unaffected range, based on the method described in section 2.4, store disparity values in ‘shift’ matrix, and if the dots are within the noised range, assign ‘0’ to ‘shift’ matrix.. 2.5.2 Normal-distributed additive noise The normal-distributed additive noise means applying normal distribution function to dots in order to create noise. Because those dots are randomly positioned, thus constituting noise to the pattern. To program this noise, a mathematical normal distribution function is created. The magnifying amplitudes are applied to the shifts, this enables the shifts to resemble normal distribution feature. Figure 2-2 shows the normal function used in the script, the magnifying magnitude ranging from 0.4 to 2.4 in this particular function. Multiplying this magnitude with the shifts creating a noise effect. Figure 2-2. The normal-distributed function. This is used to modify disparity in order to create noise.
  • 18. 8 2.5.3 Flat-band noise The last type of noise that has been incorporated into the GUI is the flat-band noise. The flat band noise selects noise values from a certain designated range. In this case, the selection is made from negative amplitude to positive amplitude (the amplitude of the disparity function). Applying those values which are randomly selected, to the x-coordinates of noised dots constitutes a noise to the pattern. 2.6 Correlogram Development This is a part of the VEP experiment. The correlogram is different from the patterns mentioned above, it doesn’t have clear patterns. The stimulus consists only random dots, but the display method distinguishes itself from other stimuli. The correlogram consists two parts, correlation display and anti- correlation display. For correlation display, a certain amount of dots are selected to be black, others white. The positions of black and white dots in both buffers overlap. For anti-correlation display, the positions of black dots in one buffer overlap with the positions of white dots in the other buffer creating binocular rivalry. Alternating between the two displays creating a dynamic stimulus and connecting with the VEP system, the participants’ brain activity can be monitored and studied. The purpose of correlogram is to study the relationship of binocular fusion and binocular rivalry. 3. Graphical user interface (GUI) and experiments The Graphical user interface (GUI) is created to integrate all aspects including parameter setting, results display and plot display, of both VEP and psychophysics experiments. The design of the GUI is completed via MATLAB building graphical user interface design toolbox. When the GUI is started, a main window pops up and asks the users to choose which experiment they would like to run. After the choice is made, the main window disappears and the selected experiment window pops up. Both experiments’ interfaces have the option of ‘Back’ which leads back to the main window, ‘Run’ which runs the experiment after all the parameters are set, and ‘next trial’ which clears some parameters and updates the title and data file name. After each run is finished, the data and parameters can be stored in a designated folder. 3.1 VEP interface and experiment Visually evoked potential refers to the electrical potential recorded from the part of the scalp which is directly on top of the visual cortex. This potential is caused by brief exposure to visual stimuli and by studying the correspondence between the VEP and visual stimuli can help the researchers better
  • 19. 9 understand functionality of optic nerves [5]. In this particular study, Dr. McCulloch and Dr. Thompson focus on the relationship between the VEP and stereopsis. Depth perception will reflect on the VEP as a peak or a trough, and by averaging all the VEP samples collected during the experiment period, normally from 25s to 50s, a clear view of depth perception and its corresponding potential is obtained. The VEP user interface has the following features. It enables the user to set experimenting parameters conveniently. Those parameters include the percentage of noise, the type of noise, the type of stereomode, the pattern being displayed, the number of cycles, the alternating frequency and etc. The correlogram option is in the type of pattern pop-up menu. The interface is also responsible for sending triggers to Espion VEP recording system for brain wave recording. Once the parameters are set, and the’ run’ button is hit, the stimuli will be displayed in ViewPixx/3D screen adjacent to the computer, depending on which stereomode is selected, a red/green mode or frame-sequential mode, a red/green filtering glasses or a shutter glasses respectively will be worn by the participants. Electrodes will be attached to participant’s forehead and visual cortex at the back of the head to measure the evoked potential due to stimuli presentation. Figure 3-1 shows the VEP user interface. There are total 14 different parameters so far, possibly more parameters will be added in the future. Figure 3-1. VEP experiment user interface
  • 20. 10 The presentation of stimuli will follow such fashion. When ‘Run’ button is hit, the display monitor will display a grey screen, when the recording system is ready, the user hit ‘enter’ to initiate stimulus and a trigger is sent from the monitor to the recording system. For stereogram, in a single second, a set number of frames with depth are displayed, followed by equal number of frames without depth. For correlogram, a set number of correlation frames are displayed followed by equal number of anti-correlation frames. The recording system only records when a trigger is received and record for1s, so every second, after a cycle of frames (depth/no-depth or correlation/anti-correlation) is displayed, a new trigger is set to the system to start next cycle of recording. During the pilot study, it was discovered that noise from recording channels were amplified so a clear VEP curve was hard to obtain. This problem was discussed and it was suggested that if triggers can be delayed for 1/120 Hz, noise can be reduced due to destructive interference. The new trigger mechanism was tested and result in a much better quality VEP image. 3.2 Psychophysics interface and experiment The psychophysics experiment is a mean to study visual threshold. By asking the participants if they can tell which pattern is being displayed and increase or decrease the coherence level of the stimuli based on their responses, a series of coherence level is recorded and forms a staircase graph. This is a combination of method of adjustment and staircase method [6]. The psychophysics interface enables the user to set parameters and display results. The axis on the right is used to display the coherence levels as staircase graph. Similar to the VEP experiments, the parameters are very much alike and both stereo modes are available. After each frame of stimulus is displayed, the participants will be asked to make a choice on which pattern was on the frame, a horizontal pattern (choose by pressing ‘H’), a vertical pattern (choose by pressing ‘V’) or an oblique pattern (choose by pressing ‘O’). Based on their responses, the coherence level of next frames will be adjusted. If a participant makes two consecutive correct choices, the coherence level will be decreased by a set percentage; at any time if a wrong choice is made, the coherence level will increase. The termination of the experiment is reached either by user hitting ‘esc’ or reaching the set maximum number of reversals. A reversal means when the trend of increase or decrease is reversed. A reversal is constituted when one of the two scenario happens. When two correct choices followed by a wrong choice (correct, correct, wrong), or a wrong choice is followed by two consecutive correct choices (wrong, correct, correct). The threshold is calculated by averaging the coherence levels at the last four reversal points. Also there’s a maximum response time for a single frame of stimulus, if a participant fails to make a choice within the maximum response time, a wrong is automatically recorded. Normally, a maximum reversal of six will take twenty to thirty frames to complete, so it could be sometimes
  • 21. 11 tedious, especially in the late stage when the patterns are so vague that the participant relies on pure guess. So to keep the participant engaged, an easy stimulus with 100% coherence will be displayed every set number of frames, the result of these easy frames will not be recorded in the calculating matrix. Figure 3-2 shows the interface for the psychophysics experiment, the axis on the right will display the staircase graph of coherence levels and parameter settings are on the left. The last box on the left will display an averaged threshold value. Figure 3-2. Psychophysics experiment user interface 4. Results from the pilot study The majority of stimuli design was completed between the end of March and early April. System configuration started after the BNC connector arrived in mid-April and pilot study started near the end of the month. So given the limited amount of data, only preliminary analysis and conclusions are available. The purposes of this pilot study are, firstly, to test the equipment, see if all systems are synchronized; secondly, to examine the stimuli under experimental environment and find room for modification and improvements. 4.1 The VEP experiment The VEP experiment is comprised of three parts, the computer that initiate the stimuli, a screen to display the stimuli and send triggers and the Espion data acquisition system to record the VEP. TTL
  • 22. 12 triggers are sent via a digital-to-BNC cable. Currently, the TTL triggers are sent based on a pre-set schedule, which is not very flexible. If different experiment duration time is set, or the number of depth frame in 1s is changed, the schedule needs to be reset. The recording system records the evoked potential after receiving the trigger, each cycle of recording lasts for 1s and in the end, the system averages all cycles of recording to generate a clear VEP graph. Dr. Thompson volunteered to be the first pilot study participant. A few trials were conducted, but a clear VEP was hard to obtain. Possible explanations were firstly, the noise coming from the loose channel may have interacted with connected channels acting like a noise amplifier; secondly, the noise from each cycle was being amplified by constructive interference. So after a modification of trigger delay, the quality of the VEP graph was improved significantly. The VEPs collected have shown that Dr. Thompson’s brain responded to the stimuli. In both red/green mode and frame-sequential mode, the VEPs shown the change in potential when frames of depth were displayed. Figure 4-1 is the result from the pilot study under red/green stereo mode. Figure 4-2 is the result from the pilot study under frame-sequential stereo mode. Comparatively speaking, the red/green VEP better resembles the expected results with distinct peaks and troughs matching the timeline. Both tests were run with 100% coherence which means there were no noise applied, given the purpose of this pilot study, the amount of noise present is not essential. When the trigger has been sent and received successfully and clear VEPs are produced due to stimuli, the VEP pilot study can be considered successful. However, there are certain aspects requiring more investigation and adjustment, they will be elaborated on the concluding summary section. Figure 4-1. Red/Green VEP sample from the pilot study. Each lane corresponds to a channel, channel 2 was malfunctioning at the time of the experiment, but from channel 1 and channel 3, clear VEP graphs are obtained. Take channel 1 for an example, the number of peaks and troughs matches stimuli pattern
  • 23. 13 displayed. There are ten peaks in a single second, which is the same as the number of stereo frames in a second. Figure 4-2. Stereo VEP from pilot study. This is a VEP graph obtained from pilot study. The two functional channels are channel 1 and 3, same as the figure above. In channel 1, evoked potentials (small peaks) corresponding to frame change is clearly observed, however, evoked potentials corresponding to depth change is not clearly visible. 4.2 Psychophysics experiment The psychophysics experiment was conducted earlier than the VEP experiment. As explained in section 3.2, the psychophysics experiment determines the threshold of stereopsis via participants’ choices of pattern. The program delivered expected results, staircase graphs of stereopsis threshold were produced. By averaging the coherence levels, threshold values were obtained. Figure 4-3 is the staircase graph from one psychophysics experiment. It shows in 27 trials, the participant reached six reversals and the tendency matches the expected shape. The graph proves the interface is capable of conducting basic psychophysics experiment which exceeds the goal of this term. Table 4-1 is the data collected from another set of pilot study conducted using this interface. Participant X followed the instruction and made choice of pattern displayed under different amplitude. The theory is that there exists an ideal value which the threshold is maximum, however, based on this set of data, the experiment is inconclusive. More systematic experiments need to be conducted and it’s possible that there are flaws in the interface itself, further inspection is required. During the experiment, participant X complained
  • 24. 14 about the length and the tediousness of the experiment, hence it is an important aspect to improve, especially considering children will be involved in future study. Normally, a six-reversal experiment could take more than thirty trials to complete which is approximately six minutes. Due to the nature of the experiment, this process could indeed be dull and sometimes tedious. Currently, the method to keep participants interested is to present an easy trial with 100% coherence level every five trials, by doing this, the participants can be motivated to keep going. Figure 4-3. Psychophysics staircase graph. This staircase graph shows the tendency of the coherences as the experiment proceeded. As mentioned before, two consecutive correct will result a decrease in coherence level and a wrong will result an increase. Table 4-1. Results from a psychophysics experiment on participant X Amplitude 1 3 5 12 27 40 50 Threshold 19% 14% 15% 17% 15% 28% 18% Amplitude: measured in pixels. Threshold: measured in percent coherence.
  • 25. 15 5. Conclusions The goal of this work term was to design stimuli and user interface that can be used as experimental tools for future research, and at this point, it can be concluded that the goal is achieved. Using noised stimuli to determine the threshold of human stereopsis is relatively new .The stimuli consist two types, sinusoidal wave and square wave; each type contains three orientation, horizontal stripes, vertical stripes and oblique stripes. After applying disparities, stereopsis is achieved. The noise is then added to disturb the coherence of the stimuli and investigate participants’ tolerance of selected types of noise. Three types of noise, non-disparity noise, normal-distributed additive noise and flat- band noise are incorporated into the GUI. The stimuli GUI also functions well. Pilot studies were conducted with both the VEP and psychophysics interfaces with satisfying results. Conclusions for both experiments are provided independently below. For the VEP experiment, two sets of protocols, stereo stimuli and an on/off random-dots screen, with two stereo modes were tested. Four clear VEP graphs were generated and compared with the VEP graph from standard protocol. In those VEP graphs, clear indications of both frame change and depth change were shown as peaks and troughs in first participant, Dr. Thompson’s brain waves, and these indications were consistent with features present in the standard VEP graph. Comparatively speaking, the evoked potential magnitude in frame-sequential stereo mode is relatively lower than that of red/green stereo mode. The triggering mechanism embedded is responsible for the communication between the programming computer and VEP recording system and as the latest addition to the script, certain properties are still in need of future inspection. The conclusions are the following, firstly, the stimuli and its interface are successfully developed and consequently pilot studies have been successfully conducted; next, the triggering mechanism still needs further improvements for the experiment going more smoothly; finally, preliminary results indicates that at 100% coherence, it’s very likely for participant to observe corrugated pattern with depth. For the psychophysics experiment, the pilot study was conducted earlier than the VEP experiment and with more frequency. At least twenty tests were conducted on me and other participants. The complicated part of this experiment is to adjust the coherence level according to participant’s responses. Psychotoolbox is able to record and recognize the keys pressed, this property is used to check participant’s choices and increase or decrease the coherence level in the next cycle. Successful experiments were conducted after implementing the algorithm to the interface. Staircase graphs were generated and threshold values were calculated after averaging the coherence levels on the reversal
  • 26. 16 spots. Since no systematic experiments were conducted, it would not be accurate to draw any quantitative conclusions, but qualitative speaking, the interface is capable to conduct basic psychophysics experiment and with selectable variables such as the amplitude of the disparity, the types of noise implemented and etc. more systematic and comparative experiments can also be conducted using this interface. Preliminary conclusions are the following, firstly, the stimuli and interface have been developed successfully and based on the experience from the pilot study, the protocol is ready to be deployed for clinical use; next, the length of the experiment may prove to be a problem for participants especially with children; finally, systematic experiments are needed. 6. Recommendations Recommendations for improving the performance of the VEP stimuli and its interface are as follows. The major recommendation is with regard to the triggering mechanism. It is recommended that the trigger being sent only at the starting frame of each second. In this way, the trigger is independent from the duration of the experiment and the frame switching frequency. A secondary recommendation is also with regard to triggering mechanism. It’s being tested that a slight onset delay, about 0.008s, can be helpful to generate more clear VEP graphs due to destructive interference. However, the exact nature of this delay still remains unclear. It is recommended that more thorough investigation about this delay should be conducted so that confusions can be avoided in future experiments. Recommendations for improving the performance of the psychophysics and its interface are as follows. The major recommendation is with regard to length of the experiment. However, it is recommended that more interesting features such as smiley faces, encouraging texts or sounds should be applied. Using such measures, it’s easy to keep children participants interested in the test. A secondary recommendation is with regard to the database. We haven’t constructed our database due to insufficient time, however, it is recommended to have a database with multiple sets of parameters ready to be imported, and it’s especially important in future comparative and systematic studies. In order to add an option of importing from existing database, minor modification of the interface is required. As stated before, all conclusions and recommendations are based on the work done in this four-month time, thus they are most likely inconclusive. Since the project is still in an early stage, further investigation is needed to obtain more data and draw more comprehensive conclusions.
  • 27. 17 Glossary VEP: Visually Evoked Potential. Generated by brief exposure to visual stimuli. GUI: Graphical User Interface. An interface where the user sets parameters and runs the experiment. TTL: Transistor-Transistor Logic. A type of trigger commonly used in system communication. BNC connector: Bayonet Neill-Concelman connector. A type of connector with one pin, commonly used in system communication.
  • 28. 18 Reference [1] R.Bhola. (2006, Jan.) Binocular Vision. [Online]. http://webeye.ophth.uiowa.edu/eyeforum/tutorials/BINOCULAR-VISION.pdf [2] I. P. Howard and B. J. Rogers. Binocular vision and stereopsis. New York: Oxford University Press, 1995. [3] B. Julesz, “Binocular depth perception without familiarity cues,” AAAS, Science, New Series, vol. 145, no. 3630, pp. 356-362, Jul. 1964. [4] S. Palmisano, R. S. Allison, and I. P. Howard, “Effects of horizontal and vertical additive disparity noise on stereoscopic corrugation detection,” Vision Res., vol. 41, no. 24, pp. 3133–3143, 2001. [5] D. J. Creel. (2014, Sept.) Visually Evoked Potential. [Online]. http://webvision.med.utah.edu/book/electrophysiology/visually-evoked-potentials/ [6] M. Kalloniatis and C. Luu. (2011, Aug.) Psychophysics of Vision. [Online]. http://webvision.med.utah.edu/book/part-viii-gabac-receptors/psychophysics-of-vision/
  • 29. 19 Appendix A: Relevant MATLAB and Psychotoolbox commands Screen (‘OpenWindow’,[]…): opens a new window on the external monitor for stimuli display. Screen (‘DrawDots’, []…): draw dots based on information given by the user. Screen (‘SelectStereoDrawBuffer’, []….): choose which stereo buffer to program. Screen (‘Flip’, []…): flip the buffers to display stimuli. Screen (‘screens’): get screen ID. Datapixx (‘SetVideoStereoVesaWaveform’,[]): activate the shutter glasses. Screen (‘GetFlipInterval’,[]…):acquire the flip interval of the screen. KbCheck: used to check if a key is pressed, and detect which key is pressed. WaitSecs(): Pause the program for a set amount of time. sca: close all open windows; if…end: a statement to determine whether a criteria is met or not, if met, continue the execution of the script. for…end: a loop statement. Loop for a set number of times. while…end : a loop statement. Loop for indefinite number of times the criteria for continuation is not met. break: break a ‘for’ or ‘while’ loop. sin: generate sin functions. square: generate square wave function with -1 and 1 as the low and high points respectively. rand: generate random numbers between 0 and 1.